Exit Full View

Games Cupboard / gamescupboard-client / build / compileSync / main / productionExecutable / kotlin / GamesCupboard-gamescupboard-client.js

(function (root, factory) {
  if (typeof define === 'function' && define.amd)
    define(['exports', './korlibs-korge.js', './korlibs-korim.js', './kotlin-kotlin-stdlib-js-ir.js', './korlibs-korma.js', './korlibs-korgw.js', './GamesCupboard-gamescupboard-common-js-ir.js', './korlibs-klock.js', './ktor-ktor-websockets-js-ir.js', './kotlinx-serialization-kotlinx-serialization-core-js-ir.js', './korlibs-korio.js', './korlibs-kmem.js', './korlibs-korau.js', './ktor-ktor-client-core-js-ir.js', './kotlinx-serialization-kotlinx-serialization-json-js-ir.js', './korlibs-kds.js'], factory);
  else if (typeof exports === 'object')
    factory(module.exports, require('./korlibs-korge.js'), require('./korlibs-korim.js'), require('./kotlin-kotlin-stdlib-js-ir.js'), require('./korlibs-korma.js'), require('./korlibs-korgw.js'), require('./GamesCupboard-gamescupboard-common-js-ir.js'), require('./korlibs-klock.js'), require('./ktor-ktor-websockets-js-ir.js'), require('./kotlinx-serialization-kotlinx-serialization-core-js-ir.js'), require('./korlibs-korio.js'), require('./korlibs-kmem.js'), require('./korlibs-korau.js'), require('./ktor-ktor-client-core-js-ir.js'), require('./kotlinx-serialization-kotlinx-serialization-json-js-ir.js'), require('./korlibs-kds.js'));
  else {
    if (typeof this['korlibs-korge'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-korge' was not found. Please, check whether 'korlibs-korge' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-korim'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-korim' was not found. Please, check whether 'korlibs-korim' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-korma'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-korma' was not found. Please, check whether 'korlibs-korma' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-korgw'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-korgw' was not found. Please, check whether 'korlibs-korgw' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['GamesCupboard-gamescupboard-common-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'GamesCupboard-gamescupboard-common-js-ir' was not found. Please, check whether 'GamesCupboard-gamescupboard-common-js-ir' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-klock'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-klock' was not found. Please, check whether 'korlibs-klock' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['ktor-ktor-websockets-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'ktor-ktor-websockets-js-ir' was not found. Please, check whether 'ktor-ktor-websockets-js-ir' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['kotlinx-serialization-kotlinx-serialization-core-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core-js-ir' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core-js-ir' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-korio'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-korio' was not found. Please, check whether 'korlibs-korio' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-kmem'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-kmem' was not found. Please, check whether 'korlibs-kmem' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-korau'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-korau' was not found. Please, check whether 'korlibs-korau' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['ktor-ktor-client-core-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'ktor-ktor-client-core-js-ir' was not found. Please, check whether 'ktor-ktor-client-core-js-ir' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['kotlinx-serialization-kotlinx-serialization-json-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json-js-ir' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json-js-ir' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    if (typeof this['korlibs-kds'] === 'undefined') {
      throw new Error("Error loading module 'GamesCupboard-gamescupboard-client'. Its dependency 'korlibs-kds' was not found. Please, check whether 'korlibs-kds' is loaded prior to 'GamesCupboard-gamescupboard-client'.");
    }
    root['GamesCupboard-gamescupboard-client'] = factory(typeof this['GamesCupboard-gamescupboard-client'] === 'undefined' ? {} : this['GamesCupboard-gamescupboard-client'], this['korlibs-korge'], this['korlibs-korim'], this['kotlin-kotlin-stdlib-js-ir'], this['korlibs-korma'], this['korlibs-korgw'], this['GamesCupboard-gamescupboard-common-js-ir'], this['korlibs-klock'], this['ktor-ktor-websockets-js-ir'], this['kotlinx-serialization-kotlinx-serialization-core-js-ir'], this['korlibs-korio'], this['korlibs-kmem'], this['korlibs-korau'], this['ktor-ktor-client-core-js-ir'], this['kotlinx-serialization-kotlinx-serialization-json-js-ir'], this['korlibs-kds']);
  }
}(this, function (_, kotlin_com_soywiz_korlibs_korge2_korge, kotlin_com_soywiz_korlibs_korim_korim, kotlin_kotlin, kotlin_com_soywiz_korlibs_korma_korma, kotlin_com_soywiz_korlibs_korgw_korgw, kotlin_GamesCupboard_gamescupboard_common, kotlin_com_soywiz_korlibs_klock_klock, kotlin_io_ktor_ktor_websockets, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_com_soywiz_korlibs_korio_korio, kotlin_com_soywiz_korlibs_kmem_kmem, kotlin_com_soywiz_korlibs_korau_korau, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_com_soywiz_korlibs_kds_kds) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var ClipContainer = kotlin_com_soywiz_korlibs_korge2_korge.$_$.c1;
  var Colors_getInstance = kotlin_com_soywiz_korlibs_korim_korim.$_$.t3;
  var SolidRect = kotlin_com_soywiz_korlibs_korge2_korge.$_$.h1;
  var addTo = kotlin_com_soywiz_korlibs_korge2_korge.$_$.l1;
  var Unit_getInstance = kotlin_kotlin.$_$.k5;
  var classMeta = kotlin_kotlin.$_$.pc;
  var Companion_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.r5;
  var BitmapSlice_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.n2;
  var THROW_CCE = kotlin_kotlin.$_$.di;
  var isCharSequence = kotlin_kotlin.$_$.dd;
  var trim = kotlin_kotlin.$_$.kh;
  var toString = kotlin_kotlin.$_$.ae;
  var startsWith$default = kotlin_kotlin.$_$.d1;
  var endsWith$default = kotlin_kotlin.$_$.t;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m1;
  var indexOf$default = kotlin_kotlin.$_$.v;
  var Key_UP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.x3;
  var Key_DOWN_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.i3;
  var ChatMessage = kotlin_GamesCupboard_gamescupboard_common.$_$.e;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.p3;
  var indexOf$default_0 = kotlin_kotlin.$_$.w;
  var emptyList = kotlin_kotlin.$_$.w7;
  var Pair = kotlin_kotlin.$_$.ai;
  var charSequenceLength = kotlin_kotlin.$_$.nc;
  var charSequenceGet = kotlin_kotlin.$_$.mc;
  var Char = kotlin_kotlin.$_$.nh;
  var equals = kotlin_kotlin.$_$.rc;
  var isBlank = kotlin_kotlin.$_$.tf;
  var CoroutineImpl = kotlin_kotlin.$_$.yb;
  var KeyEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b1;
  var Container = kotlin_com_soywiz_korlibs_korge2_korge.$_$.d1;
  var get_keys = kotlin_com_soywiz_korlibs_korge2_korge.$_$.e;
  var Storage = kotlin_com_soywiz_korlibs_korge2_korge.$_$.g;
  var startsWith$default_0 = kotlin_kotlin.$_$.e1;
  var RunCommand = kotlin_GamesCupboard_gamescupboard_common.$_$.u;
  var joinToString$default = kotlin_kotlin.$_$.m;
  var SuspendFunction1 = kotlin_kotlin.$_$.ac;
  var get_dockHeight = kotlin_GamesCupboard_gamescupboard_common.$_$.m1;
  var FixedSizeContainer = kotlin_com_soywiz_korlibs_korge2_korge.$_$.e1;
  var FixedSizeContainer_init_$Init$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.b2;
  var get_playingAreaWidth = kotlin_GamesCupboard_gamescupboard_common.$_$.s1;
  var position = kotlin_com_soywiz_korlibs_korge2_korge.$_$.o1;
  var get_mouse = kotlin_com_soywiz_korlibs_korge2_korge.$_$.f;
  var interfaceMeta = kotlin_kotlin.$_$.yc;
  var _interpolate = kotlin_com_soywiz_korlibs_korge2_korge.$_$.i;
  var Text_init_$Create$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.f2;
  var get_degrees = kotlin_com_soywiz_korlibs_korma_korma.$_$.f2;
  var get_dockWidth = kotlin_GamesCupboard_gamescupboard_common.$_$.n1;
  var V2_init_$Create$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.x1;
  var Companion_getInstance_0 = kotlin_com_soywiz_korlibs_klock_klock.$_$.e1;
  var Companion_getInstance_1 = kotlin_com_soywiz_korlibs_korma_korma.$_$.w5;
  var KMutableProperty0 = kotlin_kotlin.$_$.af;
  var getPropertyCallableRef = kotlin_kotlin.$_$.vc;
  var Image_init_$Create$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.d2;
  var anchor = kotlin_com_soywiz_korlibs_korge2_korge.$_$.m1;
  var getOrNull = kotlin_kotlin.$_$.k8;
  var Key_ESCAPE_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.k3;
  var AreaType_PRIVATE_getInstance = kotlin_GamesCupboard_gamescupboard_common.$_$.y;
  var ensureNotNull = kotlin_kotlin.$_$.ri;
  var println = kotlin_kotlin.$_$.fc;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.gb;
  var readText = kotlin_io_ktor_ktor_websockets.$_$.q;
  var Packet = kotlin_GamesCupboard_gamescupboard_common.$_$.o;
  var getKClass = kotlin_kotlin.$_$.d;
  var arrayOf = kotlin_kotlin.$_$.oi;
  var createKType = kotlin_kotlin.$_$.a;
  var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r2;
  var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l2;
  var isInterface = kotlin_kotlin.$_$.id;
  var Exception = kotlin_kotlin.$_$.uh;
  var Text = kotlin_io_ktor_ktor_websockets.$_$.m;
  var NotInvited = kotlin_GamesCupboard_gamescupboard_common.$_$.n;
  var printStackTrace = kotlin_kotlin.$_$.bj;
  var HighlightMouse = kotlin_GamesCupboard_gamescupboard_common.$_$.l;
  var AddBin = kotlin_GamesCupboard_gamescupboard_common.$_$.a;
  var ScoreSheetData = kotlin_GamesCupboard_gamescupboard_common.$_$.w;
  var CommandError = kotlin_GamesCupboard_gamescupboard_common.$_$.f;
  var CommandOk = kotlin_GamesCupboard_gamescupboard_common.$_$.g;
  var ChangeImage = kotlin_GamesCupboard_gamescupboard_common.$_$.c;
  var CycleText = kotlin_GamesCupboard_gamescupboard_common.$_$.h;
  var ScaleObject = kotlin_GamesCupboard_gamescupboard_common.$_$.v;
  var FaceUpOrDown = kotlin_GamesCupboard_gamescupboard_common.$_$.j;
  var ChangePrivacy = kotlin_GamesCupboard_gamescupboard_common.$_$.d;
  var DragObject = kotlin_GamesCupboard_gamescupboard_common.$_$.i;
  var MoveObject = kotlin_GamesCupboard_gamescupboard_common.$_$.m;
  var RemoveObjects = kotlin_GamesCupboard_gamescupboard_common.$_$.r;
  var AddObjects = kotlin_GamesCupboard_gamescupboard_common.$_$.b;
  var RenamePlayer = kotlin_GamesCupboard_gamescupboard_common.$_$.s;
  var PlayerLeft = kotlin_GamesCupboard_gamescupboard_common.$_$.q;
  var PlayerJoined = kotlin_GamesCupboard_gamescupboard_common.$_$.p;
  var ResetGame = kotlin_GamesCupboard_gamescupboard_common.$_$.t;
  var GameInfo = kotlin_GamesCupboard_gamescupboard_common.$_$.k;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.p6;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l1;
  var RGBA = kotlin_com_soywiz_korlibs_korim_korim.$_$.c1;
  var get_resourcesVfs = kotlin_com_soywiz_korlibs_korio_korio.$_$.p;
  var readBitmap$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.j2;
  var reversed = kotlin_kotlin.$_$.q9;
  var get_UI_DEFAULT_WIDTH = kotlin_com_soywiz_korlibs_korge2_korge.$_$.p;
  var get_UI_DEFAULT_HEIGHT = kotlin_com_soywiz_korlibs_korge2_korge.$_$.o;
  var UIButton = kotlin_com_soywiz_korlibs_korge2_korge.$_$.j;
  var listOf = kotlin_kotlin.$_$.c9;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.zi;
  var Avatar = kotlin_GamesCupboard_gamescupboard_common.$_$.e1;
  var GridImageObject = kotlin_GamesCupboard_gamescupboard_common.$_$.g1;
  var FlippableImageObject = kotlin_GamesCupboard_gamescupboard_common.$_$.f1;
  var MultipleGridImageObject = kotlin_GamesCupboard_gamescupboard_common.$_$.i1;
  var ImageObject = kotlin_GamesCupboard_gamescupboard_common.$_$.h1;
  var TextStyle_PLAIN_getInstance = kotlin_GamesCupboard_gamescupboard_common.$_$.z;
  var PieceAtPointCounter = kotlin_GamesCupboard_gamescupboard_common.$_$.j1;
  var TextObject = kotlin_GamesCupboard_gamescupboard_common.$_$.l1;
  var tween$default = kotlin_com_soywiz_korlibs_korge2_korge.$_$.w1;
  var get_playingAreaHeight = kotlin_GamesCupboard_gamescupboard_common.$_$.r1;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v1;
  var get_toolbarHeight = kotlin_GamesCupboard_gamescupboard_common.$_$.v1;
  var listOf_0 = kotlin_kotlin.$_$.d9;
  var sorted = kotlin_kotlin.$_$.y9;
  var RoundRect = kotlin_com_soywiz_korlibs_korge2_korge.$_$.g1;
  var alignLeftToRightOf$default = kotlin_com_soywiz_korlibs_korge2_korge.$_$.u1;
  var onStageResized$default = kotlin_com_soywiz_korlibs_korge2_korge.$_$.t1;
  var View = kotlin_com_soywiz_korlibs_korge2_korge.$_$.k1;
  var alignTopToBottomOf$default = kotlin_com_soywiz_korlibs_korge2_korge.$_$.v1;
  var toIntOrNull = kotlin_kotlin.$_$.qg;
  var RoundRect_init_$Create$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.e2;
  var last = kotlin_kotlin.$_$.a9;
  var Companion_getInstance_2 = kotlin_com_soywiz_korlibs_korge2_korge.$_$.j2;
  var get_DefaultTtfFont = kotlin_com_soywiz_korlibs_korim_korim.$_$.g1;
  var Companion_getInstance_3 = kotlin_com_soywiz_korlibs_korim_korim.$_$.w3;
  var get_DefaultStringTextRenderer = kotlin_com_soywiz_korlibs_korim_korim.$_$.p1;
  var Text_0 = kotlin_com_soywiz_korlibs_korge2_korge.$_$.j1;
  var getNumberHashCode = kotlin_kotlin.$_$.uc;
  var hashCode = kotlin_kotlin.$_$.xc;
  var Long = kotlin_kotlin.$_$.xh;
  var numberToInt = kotlin_kotlin.$_$.ud;
  var get_uiFocusManager = kotlin_com_soywiz_korlibs_korge2_korge.$_$.v;
  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_MINUS_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.r3;
  var Key_EQUAL_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.j3;
  var Key_PLUS_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.s3;
  var Type_DRAG_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d4;
  var clamp = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.e1;
  var isPublicOrNull = kotlin_GamesCupboard_gamescupboard_common.$_$.p1;
  var isPrivate = kotlin_GamesCupboard_gamescupboard_common.$_$.o1;
  var isPublic = kotlin_GamesCupboard_gamescupboard_common.$_$.q1;
  var Companion_getInstance_4 = kotlin_com_soywiz_korlibs_klock_klock.$_$.b1;
  var _DateTime___get_unixMillisLong__impl__sdx9bd = kotlin_com_soywiz_korlibs_klock_klock.$_$.k;
  var DragObject_init_$Create$ = kotlin_GamesCupboard_gamescupboard_common.$_$.a1;
  var ChangeZOrder_NO_CHANGE_getInstance = kotlin_GamesCupboard_gamescupboard_common.$_$.x;
  var RegenGameObject = kotlin_GamesCupboard_gamescupboard_common.$_$.k1;
  var doubleClick = kotlin_com_soywiz_korlibs_korge2_korge.$_$.d;
  var Cursor_HAND_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.n4;
  var set_cursor = kotlin_com_soywiz_korlibs_korge2_korge.$_$.c;
  var lastIndexOf$default = kotlin_kotlin.$_$.y;
  var trimStart = kotlin_kotlin.$_$.hh;
  var substr = kotlin_com_soywiz_korlibs_korio_korio.$_$.n1;
  var MouseEvents = kotlin_com_soywiz_korlibs_korge2_korge.$_$.b;
  var launchImmediately = kotlin_com_soywiz_korlibs_korio_korio.$_$.c;
  var UIScrollable = kotlin_com_soywiz_korlibs_korge2_korge.$_$.l;
  var KProperty1 = kotlin_kotlin.$_$.ef;
  var SuspendFunction0 = kotlin_kotlin.$_$.zb;
  var IntCompanionObject_getInstance = kotlin_kotlin.$_$.w4;
  var split$default = kotlin_kotlin.$_$.c1;
  var BoxUISkin_init_$Create$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.y1;
  var toDoubleOrNull = kotlin_kotlin.$_$.ng;
  var UIText = kotlin_com_soywiz_korlibs_korge2_korge.$_$.m;
  var round = kotlin_kotlin.$_$.fe;
  var NativeImage$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.z1;
  var UiSkinKind_BUTTON_getInstance = kotlin_com_soywiz_korlibs_korge2_korge.$_$.p1;
  var UiSkinKind_RADIO_getInstance = kotlin_com_soywiz_korlibs_korge2_korge.$_$.q1;
  var _UiSkinType___init__impl__kunrii = kotlin_com_soywiz_korlibs_korge2_korge.$_$.g2;
  var numberToDouble = kotlin_kotlin.$_$.td;
  var mipmaps = kotlin_com_soywiz_korlibs_korim_korim.$_$.w;
  var Companion_getInstance_5 = kotlin_com_soywiz_korlibs_korim_korim.$_$.u3;
  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 Companion_getInstance_6 = kotlin_com_soywiz_korlibs_korge2_korge.$_$.h2;
  var roundRect = kotlin_com_soywiz_korlibs_korma_korma.$_$.c1;
  var circle = kotlin_com_soywiz_korlibs_korma_korma.$_$.n;
  var UISkin_init_$Create$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.a2;
  var set_textSize = kotlin_com_soywiz_korlibs_korge2_korge.$_$.u;
  var set_uiSkinBitmap = kotlin_com_soywiz_korlibs_korge2_korge.$_$.z;
  var get_textSize = kotlin_com_soywiz_korlibs_korge2_korge.$_$.t;
  var UIButton_init_$Create$ = kotlin_com_soywiz_korlibs_korge2_korge.$_$.z1;
  var set_uiSkin = kotlin_com_soywiz_korlibs_korge2_korge.$_$.y;
  var mutableListOf = kotlin_kotlin.$_$.j9;
  var launch = kotlin_com_soywiz_korlibs_korio_korio.$_$.g;
  var Easing = kotlin_com_soywiz_korlibs_korma_korma.$_$.y2;
  var Packet_init_$Create$ = kotlin_GamesCupboard_gamescupboard_common.$_$.c1;
  var send = kotlin_io_ktor_ktor_websockets.$_$.d;
  var tween = kotlin_com_soywiz_korlibs_korge2_korge.$_$.r1;
  var readSound$default = kotlin_com_soywiz_korlibs_korau_korau.$_$.a;
  var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.ej;
  var Plugin_getInstance = kotlin_io_ktor_ktor_client_core.$_$.b;
  var DefaultClientWebSocketSession = kotlin_io_ktor_ktor_client_core.$_$.c;
  var close$default = kotlin_io_ktor_ktor_websockets.$_$.e;
  var Stage = kotlin_com_soywiz_korlibs_korge2_korge.$_$.i1;
  var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.d;
  var ws$default = kotlin_io_ktor_ktor_client_core.$_$.a;
  var Korge_getInstance = kotlin_com_soywiz_korlibs_korge2_korge.$_$.k2;
  var get_stageWidth = kotlin_GamesCupboard_gamescupboard_common.$_$.u1;
  var get_stageHeight = kotlin_GamesCupboard_gamescupboard_common.$_$.t1;
  var Companion_getInstance_7 = kotlin_com_soywiz_korlibs_korma_korma.$_$.s5;
  var Companion_getInstance_8 = kotlin_com_soywiz_korlibs_korma_korma.$_$.i5;
  var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;
  var get_EmptyContinuation = kotlin_kotlin.$_$.jb;
  var UIView = kotlin_com_soywiz_korlibs_korge2_korge.$_$.n;
  var SoftKeyboardConfig_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.o5;
  var RenderableView = kotlin_com_soywiz_korlibs_korge2_korge.$_$.f1;
  var Companion_getInstance_9 = kotlin_com_soywiz_korlibs_korma_korma.$_$.l5;
  var focus = kotlin_com_soywiz_korlibs_korge2_korge.$_$.s;
  var Rectangle = kotlin_com_soywiz_korlibs_korma_korma.$_$.r1;
  var without = kotlin_com_soywiz_korlibs_korma_korma.$_$.x2;
  var bounds = kotlin_com_soywiz_korlibs_korge2_korge.$_$.n1;
  var ISoftKeyboardConfig = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a1;
  var KProperty0 = kotlin_kotlin.$_$.df;
  var KMutableProperty1 = kotlin_kotlin.$_$.bf;
  var getStringHashCode = kotlin_kotlin.$_$.wc;
  var numberRangeToNumber = kotlin_kotlin.$_$.rd;
  var clamp_0 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.d1;
  var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.x3;
  var withoutIndex = kotlin_com_soywiz_korlibs_korio_korio.$_$.s1;
  var Key_BACKSPACE_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.h3;
  var withoutRange = kotlin_com_soywiz_korlibs_korio_korio.$_$.t1;
  var get_length = kotlin_com_soywiz_korlibs_korio_korio.$_$.l2;
  var TextClipboardData_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.r5;
  var TextClipboardData = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.n1;
  var blur = kotlin_com_soywiz_korlibs_korge2_korge.$_$.q;
  var set_focusable = kotlin_com_soywiz_korlibs_korge2_korge.$_$.r;
  var CancellableGroup = kotlin_com_soywiz_korlibs_korge2_korge.$_$.a1;
  var Signal_init_$Create$ = kotlin_com_soywiz_korlibs_korio_korio.$_$.z3;
  var DrawType_TRIANGLE_STRIP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b3;
  var DebugVertexView = kotlin_com_soywiz_korlibs_korge2_korge.$_$.b1;
  var Companion_getInstance_10 = kotlin_com_soywiz_korlibs_korge2_korge.$_$.i2;
  var onNewAttachDetach$default = kotlin_com_soywiz_korlibs_korge2_korge.$_$.s1;
  var HistoryStack_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.o2;
  var Cursor_TEXT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.o4;
  var get_timers = kotlin_com_soywiz_korlibs_korge2_korge.$_$.h;
  var KeysEvents = kotlin_com_soywiz_korlibs_korge2_korge.$_$.a;
  var withInsertion = kotlin_com_soywiz_korlibs_korio_korio.$_$.r1;
  var Font = kotlin_com_soywiz_korlibs_korim_korim.$_$.h1;
  var abs = kotlin_kotlin.$_$.ce;
  var until = kotlin_kotlin.$_$.ye;
  var Companion_getInstance_11 = kotlin_com_soywiz_korlibs_korma_korma.$_$.o5;
  var Bezier_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.y3;
  var DoubleCompanionObject_getInstance = kotlin_kotlin.$_$.u4;
  var PointArrayList = kotlin_com_soywiz_korlibs_korma_korma.$_$.n1;
  var firstPoint$default = kotlin_com_soywiz_korlibs_korma_korma.$_$.v3;
  var lastPoint$default = kotlin_com_soywiz_korlibs_korma_korma.$_$.w3;
  var get_sign = kotlin_kotlin.$_$.ge;
  var isLetterOrDigit = kotlin_kotlin.$_$.vf;
  var set_uiFocusedView = kotlin_com_soywiz_korlibs_korge2_korge.$_$.x;
  var get_uiFocusedView = kotlin_com_soywiz_korlibs_korge2_korge.$_$.w;
  var Companion_getInstance_12 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.w3;
  var cancel = kotlin_com_soywiz_korlibs_korio_korio.$_$.f1;
  var Closeable = kotlin_com_soywiz_korlibs_korio_korio.$_$.w;
  var UIFocusable = kotlin_com_soywiz_korlibs_korge2_korge.$_$.k;
  var Point = kotlin_com_soywiz_korlibs_korma_korma.$_$.p1;
  var RestoreFromBin_getInstance = kotlin_GamesCupboard_gamescupboard_common.$_$.d1;
  var MoveObject_init_$Create$ = kotlin_GamesCupboard_gamescupboard_common.$_$.b1;
  var Image_init_$Create$_0 = kotlin_com_soywiz_korlibs_korge2_korge.$_$.c2;
  var objectMeta = kotlin_kotlin.$_$.wd;
  var firstOrNull = kotlin_kotlin.$_$.rf;
  var substr_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.o1;
  //endregion
  //region block: pre-declaration
  BackgroundArea.prototype = Object.create(ClipContainer.prototype);
  BackgroundArea.prototype.constructor = BackgroundArea;
  ChatInput$textInput$slambda.prototype = Object.create(CoroutineImpl.prototype);
  ChatInput$textInput$slambda.prototype.constructor = ChatInput$textInput$slambda;
  ChatInput.prototype = Object.create(Container.prototype);
  ChatInput.prototype.constructor = ChatInput;
  ChatLog.prototype = Object.create(TextButtonDockable.prototype);
  ChatLog.prototype.constructor = ChatLog;
  Dock.prototype = Object.create(FixedSizeContainer.prototype);
  Dock.prototype.constructor = Dock;
  ForegroundArea.prototype = Object.create(ClipContainer.prototype);
  ForegroundArea.prototype.constructor = ForegroundArea;
  GamesCupboardClient$slambda.prototype = Object.create(CoroutineImpl.prototype);
  GamesCupboardClient$slambda.prototype.constructor = GamesCupboardClient$slambda;
  $listenCOROUTINE$0.prototype = Object.create(CoroutineImpl.prototype);
  $listenCOROUTINE$0.prototype.constructor = $listenCOROUTINE$0;
  $processMessageCOROUTINE$1.prototype = Object.create(CoroutineImpl.prototype);
  $processMessageCOROUTINE$1.prototype.constructor = $processMessageCOROUTINE$1;
  $gameInfoCOROUTINE$2.prototype = Object.create(CoroutineImpl.prototype);
  $gameInfoCOROUTINE$2.prototype.constructor = $gameInfoCOROUTINE$2;
  $resetGameCOROUTINE$3.prototype = Object.create(CoroutineImpl.prototype);
  $resetGameCOROUTINE$3.prototype.constructor = $resetGameCOROUTINE$3;
  $newGameObjectCOROUTINE$4.prototype = Object.create(CoroutineImpl.prototype);
  $newGameObjectCOROUTINE$4.prototype.constructor = $newGameObjectCOROUTINE$4;
  $loadAndCacheBitmapCOROUTINE$5.prototype = Object.create(CoroutineImpl.prototype);
  $loadAndCacheBitmapCOROUTINE$5.prototype.constructor = $loadAndCacheBitmapCOROUTINE$5;
  $loadBitmapCOROUTINE$6.prototype = Object.create(CoroutineImpl.prototype);
  $loadBitmapCOROUTINE$6.prototype.constructor = $loadBitmapCOROUTINE$6;
  $createGameObjectViewCOROUTINE$7.prototype = Object.create(CoroutineImpl.prototype);
  $createGameObjectViewCOROUTINE$7.prototype.constructor = $createGameObjectViewCOROUTINE$7;
  $dragObjectCOROUTINE$8.prototype = Object.create(CoroutineImpl.prototype);
  $dragObjectCOROUTINE$8.prototype.constructor = $dragObjectCOROUTINE$8;
  $addBinCOROUTINE$9.prototype = Object.create(CoroutineImpl.prototype);
  $addBinCOROUTINE$9.prototype.constructor = $addBinCOROUTINE$9;
  HelpArea.prototype = Object.create(Container.prototype);
  HelpArea.prototype.constructor = HelpArea;
  PlayingArea$begin$slambda.prototype = Object.create(CoroutineImpl.prototype);
  PlayingArea$begin$slambda.prototype.constructor = PlayingArea$begin$slambda;
  PlayingArea$begin$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
  PlayingArea$begin$slambda_1.prototype.constructor = PlayingArea$begin$slambda_1;
  PlayingArea.prototype = Object.create(ClipContainer.prototype);
  PlayingArea.prototype.constructor = PlayingArea;
  PrintContainer$tryToFit$slambda.prototype = Object.create(CoroutineImpl.prototype);
  PrintContainer$tryToFit$slambda.prototype.constructor = PrintContainer$tryToFit$slambda;
  PrintContainer$tryToFit$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
  PrintContainer$tryToFit$lambda$slambda.prototype.constructor = PrintContainer$tryToFit$lambda$slambda;
  PrintContainer.prototype = Object.create(UIScrollable.prototype);
  PrintContainer.prototype.constructor = PrintContainer;
  HyperlinkStyle.prototype = Object.create(RulesStyle.prototype);
  HyperlinkStyle.prototype.constructor = HyperlinkStyle;
  Rules.prototype = Object.create(TextButtonDockable.prototype);
  Rules.prototype.constructor = Rules;
  Row.prototype = Object.create(Container.prototype);
  Row.prototype.constructor = Row;
  ScoreSheet.prototype = Object.create(TextButtonDockable.prototype);
  ScoreSheet.prototype.constructor = ScoreSheet;
  CustomisableSkinBitmapBuilder.prototype = Object.create(SkinBitmapBuilder.prototype);
  CustomisableSkinBitmapBuilder.prototype.constructor = CustomisableSkinBitmapBuilder;
  SpeechBubble.prototype = Object.create(Container.prototype);
  SpeechBubble.prototype.constructor = SpeechBubble;
  Toolbar.prototype = Object.create(FixedSizeContainer.prototype);
  Toolbar.prototype.constructor = Toolbar;
  sendMessage$slambda.prototype = Object.create(CoroutineImpl.prototype);
  sendMessage$slambda.prototype.constructor = sendMessage$slambda;
  localAndSend$slambda.prototype = Object.create(CoroutineImpl.prototype);
  localAndSend$slambda.prototype.constructor = localAndSend$slambda;
  playSound$slambda.prototype = Object.create(CoroutineImpl.prototype);
  playSound$slambda.prototype.constructor = playSound$slambda;
  playSound$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
  playSound$slambda_1.prototype.constructor = playSound$slambda_1;
  launchTween$slambda.prototype = Object.create(CoroutineImpl.prototype);
  launchTween$slambda.prototype.constructor = launchTween$slambda;
  launchTweenThen$slambda.prototype = Object.create(CoroutineImpl.prototype);
  launchTweenThen$slambda.prototype.constructor = launchTweenThen$slambda;
  $loadAndCacheSoundCOROUTINE$10.prototype = Object.create(CoroutineImpl.prototype);
  $loadAndCacheSoundCOROUTINE$10.prototype.constructor = $loadAndCacheSoundCOROUTINE$10;
  main$slambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
  main$slambda$slambda.prototype.constructor = main$slambda$slambda;
  main$slambda.prototype = Object.create(CoroutineImpl.prototype);
  main$slambda.prototype.constructor = main$slambda;
  $mainCOROUTINE$11.prototype = Object.create(CoroutineImpl.prototype);
  $mainCOROUTINE$11.prototype.constructor = $mainCOROUTINE$11;
  TextInput.prototype = Object.create(UIView.prototype);
  TextInput.prototype.constructor = TextInput;
  TextInputController$slambda.prototype = Object.create(CoroutineImpl.prototype);
  TextInputController$slambda.prototype.constructor = TextInputController$slambda;
  TextInputController$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
  TextInputController$slambda_1.prototype.constructor = TextInputController$slambda_1;
  GameObjectView.prototype = Object.create(Container.prototype);
  GameObjectView.prototype.constructor = GameObjectView;
  AvatarView.prototype = Object.create(GameObjectView.prototype);
  AvatarView.prototype.constructor = AvatarView;
  ImageObjectView.prototype = Object.create(GameObjectView.prototype);
  ImageObjectView.prototype.constructor = ImageObjectView;
  BinView.prototype = Object.create(ImageObjectView.prototype);
  BinView.prototype.constructor = BinView;
  GridImageObjectView.prototype = Object.create(GameObjectView.prototype);
  GridImageObjectView.prototype.constructor = GridImageObjectView;
  FlippableImageObjectView.prototype = Object.create(GridImageObjectView.prototype);
  FlippableImageObjectView.prototype.constructor = FlippableImageObjectView;
  MultipleImageView.prototype = Object.create(GameObjectView.prototype);
  MultipleImageView.prototype.constructor = MultipleImageView;
  TextObjectView.prototype = Object.create(GameObjectView.prototype);
  TextObjectView.prototype.constructor = TextObjectView;
  //endregion
  function BackgroundArea(width, height) {
    ClipContainer.call(this, width, height);
    var tmp = this;
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.solidRect' call
    var tmp0_solidRect = Colors_getInstance().l8k('#33333');
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new SolidRect(width, height, tmp0_solidRect);
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.solidRect.<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.bkd_1 = tmp$ret$3;
  }
  BackgroundArea.prototype.ckd = function (v) {
    this.bkd_1.zih(v);
  };
  BackgroundArea.$metadata$ = classMeta('BackgroundArea', undefined, undefined, undefined, undefined, ClipContainer.prototype);
  function BitmapGrid(bitmap, grid) {
    this.dkd_1 = grid;
    var tmp = this;
    var tmp_0 = Companion_getInstance().g7d(0, 0, bitmap.d72(), bitmap.e72());
    tmp.ekd_1 = BitmapSlice_init_$Create$(bitmap, tmp_0, null, null, null, 16, null);
  }
  BitmapGrid.prototype.r2u = function (x, y) {
    var rect = Companion_getInstance().g7d(imul(x, this.dkd_1.y1o_1), imul(y, this.dkd_1.z1o_1), this.dkd_1.y1o_1, this.dkd_1.z1o_1);
    return this.ekd_1.t8b(rect, null, null, 6, null);
  };
  BitmapGrid.$metadata$ = classMeta('BitmapGrid');
  function chatInput(_this__u8e3s4) {
    var ci = new ChatInput();
    addTo(ci, _this__u8e3s4);
    return ci;
  }
  function replaceText($this, text) {
    get_gamesCupboardClient().ukd_1.x7();
    $this.kkg_1.gck(text);
    $this.kkg_1.gkj_1.rkk($this.kkg_1.u67().length);
    $this.kkg_1.acn();
  }
  function onTextUpdated($this, text) {
    var tmp$ret$0;
    // Inline function 'kotlin.text.trim' call
    tmp$ret$0 = toString(trim(isCharSequence(text) ? text : THROW_CCE()));
    var textTrimmed = tmp$ret$0;
    if (text === '?') {
      var tmp$ret$1;
      // Inline function 'kotlin.with' call
      var tmp0_with = get_gamesCupboardClient().ukd_1;
      // Inline function 'kotlin.contracts.contract' call
      tmp0_with.x7();
      tmp0_with.ukk('Chat to 1 Player', ChatInput$onTextUpdated$lambda($this));
      if (!isSpectator()) {
        tmp0_with.ukk('Sounds', ChatInput$onTextUpdated$lambda_0($this));
      }
      tmp0_with.ukk('Commands', ChatInput$onTextUpdated$lambda_1($this));
      tmp0_with.tkk();
      tmp$ret$1 = Unit_getInstance();
    } else {
      if (startsWith$default(textTrimmed, '@', false, 2, null)) {
        var tmp$ret$3;
        // Inline function 'kotlin.text.substring' call
        var tmp$ret$2;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$2 = textTrimmed;
        tmp$ret$3 = tmp$ret$2.substring(1);
        var withoutAt = tmp$ret$3;
        var space = indexOf$default(withoutAt, ' ', 0, false, 6, null);
        var tmp;
        if (space < 0) {
          tmp = withoutAt;
        } else {
          var tmp$ret$5;
          // Inline function 'kotlin.text.substring' call
          var tmp$ret$4;
          // Inline function 'kotlin.js.asDynamic' call
          tmp$ret$4 = withoutAt;
          tmp$ret$5 = tmp$ret$4.substring(space);
          tmp = tmp$ret$5;
        }
        var playerName = tmp;
        var player = get_gamesCupboardClient().vkk(playerName);
        var tmp$ret$6;
        // Inline function 'kotlin.with' call
        var tmp1_with = get_gamesCupboardClient().ukd_1;
        // Inline function 'kotlin.contracts.contract' call
        tmp1_with.x7();
        var otherPlayers = get_gamesCupboardClient().wkk();
        if (otherPlayers.p()) {
          tmp1_with.skk('There are no other players present');
          tmp1_with.tkk();
          return Unit_getInstance();
        } else {
          tmp1_with.skk('Chat to a single player');
        }
        var tmp0_iterator = otherPlayers.j();
        while (tmp0_iterator.k()) {
          var name = tmp0_iterator.l();
          tmp1_with.ukk(name, ChatInput$onTextUpdated$lambda_2($this, name));
        }
        if (!isSpectator()) {
          tmp1_with.skk('Sounds');
          var tmp1_iterator = get_gamesCupboardClient().wkd_1.j();
          while (tmp1_iterator.k()) {
            var taunt = tmp1_iterator.l();
            tmp1_with.ukk(taunt, ChatInput$onTextUpdated$lambda_3($this, taunt, player));
          }
        }
        tmp1_with.tkk();
        tmp$ret$6 = Unit_getInstance();
      } else {
        var tmp_0;
        if (startsWith$default(textTrimmed, '!', false, 2, null)) {
          tmp_0 = !isSpectator();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          var tmp$ret$7;
          // Inline function 'kotlin.with' call
          var tmp2_with = get_gamesCupboardClient().ukd_1;
          // Inline function 'kotlin.contracts.contract' call
          tmp2_with.x7();
          tmp2_with.skk('Sounds');
          var tmp0_iterator_0 = get_gamesCupboardClient().wkd_1.j();
          while (tmp0_iterator_0.k()) {
            var taunt_0 = tmp0_iterator_0.l();
            tmp2_with.ukk(taunt_0, ChatInput$onTextUpdated$lambda_4($this, taunt_0));
          }
          tmp2_with.tkk();
          tmp$ret$7 = Unit_getInstance();
        } else {
          if (startsWith$default(textTrimmed, ':', false, 2, null)) {
            var tmp$ret$16;
            // Inline function 'kotlin.with' call
            var tmp3_with = get_gamesCupboardClient().ukd_1;
            // Inline function 'kotlin.contracts.contract' call
            tmp3_with.x7();
            var tmp_1;
            if (isSpectator()) {
              var tmp$ret$8;
              // Inline function 'kotlin.with' call
              var tmp0_with_0 = get_gamesCupboardClient().ukd_1;
              // Inline function 'kotlin.contracts.contract' call
              tmp0_with_0.skk('Commands : ');
              tmp0_with_0.ukk('name', ChatInput$onTextUpdated$lambda_5($this));
              tmp0_with_0.tkk();
              tmp$ret$8 = Unit_getInstance();
              tmp_1 = tmp$ret$8;
            } else {
              var tmp0_container = parseCommand($this, textTrimmed);
              var commandName = tmp0_container.n4();
              var parameters = tmp0_container.o4();
              var tmp$ret$10;
              $l$block: {
                // Inline function 'kotlin.collections.firstOrNull' call
                var tmp1_firstOrNull = get_gamesCupboardClient().rkd_1;
                var tmp0_iterator_1 = tmp1_firstOrNull.j();
                while (tmp0_iterator_1.k()) {
                  var element = tmp0_iterator_1.l();
                  var tmp$ret$9;
                  // Inline function 'uk.co.nickthecoder.gamescupboard.client.ChatInput.onTextUpdated.<anonymous>.<anonymous>' call
                  tmp$ret$9 = element.o1n_1 === commandName;
                  if (tmp$ret$9) {
                    tmp$ret$10 = element;
                    break $l$block;
                  }
                }
                tmp$ret$10 = null;
              }
              var commandInfo = tmp$ret$10;
              var tmp_2;
              if (commandInfo == null) {
                var tmp$ret$14;
                // Inline function 'kotlin.with' call
                var tmp2_with_0 = get_gamesCupboardClient().ukd_1;
                // Inline function 'kotlin.contracts.contract' call
                tmp2_with_0.skk('Commands : ');
                var tmp$ret$13;
                // Inline function 'kotlin.collections.filter' call
                var tmp0_filter = get_gamesCupboardClient().rkd_1;
                var tmp$ret$12;
                // Inline function 'kotlin.collections.filterTo' call
                var tmp0_filterTo = ArrayList_init_$Create$();
                var tmp0_iterator_2 = tmp0_filter.j();
                while (tmp0_iterator_2.k()) {
                  var element_0 = tmp0_iterator_2.l();
                  var tmp$ret$11;
                  // Inline function 'uk.co.nickthecoder.gamescupboard.client.ChatInput.onTextUpdated.<anonymous>.<anonymous>.<anonymous>' call
                  tmp$ret$11 = startsWith$default(element_0.o1n_1, commandName, false, 2, null);
                  if (tmp$ret$11) {
                    tmp0_filterTo.c(element_0);
                  }
                }
                tmp$ret$12 = tmp0_filterTo;
                tmp$ret$13 = tmp$ret$12;
                var tmp0_iterator_3 = tmp$ret$13.j();
                while (tmp0_iterator_3.k()) {
                  var command = tmp0_iterator_3.l();
                  tmp2_with_0.ukk(command.o1n_1, ChatInput$onTextUpdated$lambda_6($this, command));
                }
                tmp2_with_0.tkk();
                tmp$ret$14 = Unit_getInstance();
                tmp_2 = tmp$ret$14;
              } else {
                tmp3_with.skk(':' + commandInfo.o1n_1 + ' : ' + commandInfo.p1n_1);
                tmp3_with.tkk();
                var tmp_3 = parameters.i();
                var tmp_4;
                var tmp_5;
                var tmp$ret$15;
                // Inline function 'kotlin.collections.isNotEmpty' call
                tmp$ret$15 = !parameters.p();
                if (tmp$ret$15) {
                  tmp_5 = !endsWith$default(textTrimmed, ' ', false, 2, null);
                } else {
                  tmp_5 = false;
                }
                if (tmp_5) {
                  tmp_4 = -1;
                } else {
                  tmp_4 = 0;
                }
                var paramIndex = tmp_3 + tmp_4 | 0;
                var tmp_6;
                if (paramIndex < commandInfo.s1n_1.i()) {
                  tmp3_with.skk('Parameter #' + (paramIndex + 1 | 0) + ' : ' + commandInfo.s1n_1.m(paramIndex));
                  tmp3_with.tkk();
                  tmp_6 = Unit_getInstance();
                }
                tmp_2 = tmp_6;
              }
              tmp_1 = tmp_2;
            }
            tmp$ret$16 = tmp_1;
          } else {
            get_gamesCupboardClient().ukd_1.x7();
          }
        }
      }
    }
  }
  function onKeyDown($this, e) {
    if (e.gc6_1.equals(Key_UP_getInstance())) {
      if ($this.jkg_1 > 0) {
        var tmp0_this = $this;
        tmp0_this.jkg_1 = tmp0_this.jkg_1 - 1 | 0;
        $this.kkg_1.gck($this.ikg_1.m(tmp0_this.jkg_1));
        $this.kkg_1.gkj_1.rkk($this.kkg_1.u67().length);
      }
    }
    if (e.gc6_1.equals(Key_DOWN_getInstance())) {
      if ($this.jkg_1 >= ($this.ikg_1.i() - 1 | 0)) {
        $this.kkg_1.gck('');
        $this.jkg_1 = $this.ikg_1.i();
      } else {
        var tmp1_this = $this;
        tmp1_this.jkg_1 = tmp1_this.jkg_1 + 1 | 0;
        $this.kkg_1.gck($this.ikg_1.m(tmp1_this.jkg_1));
        $this.kkg_1.gkj_1.rkk($this.kkg_1.u67().length);
      }
    }
  }
  function sendChat($this, text, to) {
    var tmp = localPlayerId();
    var tmp0_safe_receiver = to;
    var chatMessage = new ChatMessage(tmp, text, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e1r_1);
    localAndSend(chatMessage);
  }
  function sendChat$default($this, text, to, $mask0, $handler) {
    if (!(($mask0 & 4) === 0))
      to = null;
    return sendChat($this, text, to);
  }
  function parseCommand($this, text) {
    var tmp = _Char___init__impl__6a9atx(32);
    var space = indexOf$default_0(text, tmp, 0, false, 6, null);
    var tmp_0;
    if (space > 0) {
      var tmp$ret$1;
      // Inline function 'kotlin.text.substring' call
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = text;
      tmp$ret$1 = tmp$ret$0.substring(1, space);
      var tmp_1 = tmp$ret$1;
      var tmp$ret$3;
      // Inline function 'kotlin.text.substring' call
      var tmp0_substring = space + 1 | 0;
      var tmp$ret$2;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$2 = text;
      tmp$ret$3 = tmp$ret$2.substring(tmp0_substring);
      tmp_0 = new Pair(tmp_1, parseParameters($this, tmp$ret$3));
    } else {
      var tmp$ret$5;
      // Inline function 'kotlin.text.substring' call
      var tmp$ret$4;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$4 = text;
      tmp$ret$5 = tmp$ret$4.substring(1);
      tmp_0 = new Pair(tmp$ret$5, emptyList());
    }
    return tmp_0;
  }
  function parseParameters($this, str) {
    var openQuote = null;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$0 = ArrayList_init_$Create$();
    var result = tmp$ret$0;
    var wordStart = 0;
    var inductionVariable = 0;
    var last = charSequenceLength(str) - 1 | 0;
    if (inductionVariable <= last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var c = charSequenceGet(str, i);
        var tmp = new Char(c);
        var tmp_0 = openQuote;
        if (equals(tmp, tmp_0 == null ? null : new Char(tmp_0))) {
          var tmp$ret$2;
          // Inline function 'kotlin.text.substring' call
          var tmp0_substring = wordStart;
          var tmp$ret$1;
          // Inline function 'kotlin.js.asDynamic' call
          tmp$ret$1 = str;
          tmp$ret$2 = tmp$ret$1.substring(tmp0_substring, i);
          result.c(tmp$ret$2);
          openQuote = null;
        } else {
          if (equals(new Char(c), new Char(_Char___init__impl__6a9atx(34))) ? true : equals(new Char(c), new Char(_Char___init__impl__6a9atx(39))) ? i === wordStart : false) {
            openQuote = c;
            var tmp1 = wordStart;
            wordStart = tmp1 + 1 | 0;
          } else {
            var tmp_1;
            if (equals(new Char(c), new Char(_Char___init__impl__6a9atx(32)))) {
              var tmp_2 = openQuote;
              tmp_1 = (tmp_2 == null ? null : new Char(tmp_2)) == null;
            } else {
              tmp_1 = false;
            }
            if (tmp_1) {
              if (!(i === wordStart)) {
                var tmp$ret$4;
                // Inline function 'kotlin.text.substring' call
                var tmp1_substring = wordStart;
                var tmp$ret$3;
                // Inline function 'kotlin.js.asDynamic' call
                tmp$ret$3 = str;
                tmp$ret$4 = tmp$ret$3.substring(tmp1_substring, i);
                result.c(tmp$ret$4);
              }
              wordStart = i + 1 | 0;
            }
          }
        }
      }
       while (inductionVariable <= last);
    var tmp$ret$7;
    // Inline function 'kotlin.text.trim' call
    var tmp$ret$6;
    // Inline function 'kotlin.text.substring' call
    var tmp2_substring = wordStart;
    var tmp$ret$5;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$5 = str;
    tmp$ret$6 = tmp$ret$5.substring(tmp2_substring);
    var tmp3_trim = tmp$ret$6;
    tmp$ret$7 = toString(trim(isCharSequence(tmp3_trim) ? tmp3_trim : THROW_CCE()));
    var remainder = tmp$ret$7;
    var tmp$ret$8;
    // Inline function 'kotlin.text.isNotBlank' call
    tmp$ret$8 = !isBlank(remainder);
    if (tmp$ret$8) {
      result.c(remainder);
    }
    var tmp$ret$12;
    // Inline function 'kotlin.collections.filter' call
    var tmp$ret$11;
    // Inline function 'kotlin.collections.filterTo' call
    var tmp0_filterTo = ArrayList_init_$Create$();
    var tmp0_iterator = result.j();
    while (tmp0_iterator.k()) {
      var element = tmp0_iterator.l();
      var tmp$ret$10;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.ChatInput.parseParameters.<anonymous>' call
      var tmp$ret$9;
      // Inline function 'kotlin.text.isNotBlank' call
      tmp$ret$9 = !isBlank(element);
      tmp$ret$10 = tmp$ret$9;
      if (tmp$ret$10) {
        tmp0_filterTo.c(element);
      }
    }
    tmp$ret$11 = tmp0_filterTo;
    tmp$ret$12 = tmp$ret$11;
    return tmp$ret$12;
  }
  function ChatInput$textInput$lambda(this$0) {
    return function (it) {
      this$0.xkk();
      return Unit_getInstance();
    };
  }
  function ChatInput$textInput$slambda(this$0, resultContinuation) {
    this.gkl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  ChatInput$textInput$slambda.prototype.ngm = function (it, $cont) {
    var tmp = this.ogm(it, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  ChatInput$textInput$slambda.prototype.w7 = function (p1, $cont) {
    return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
  };
  ChatInput$textInput$slambda.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        if (tmp === 0) {
          this.p7_1 = 1;
          onKeyDown(this.gkl_1, this.hkl_1);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.r7_1;
        }
      } catch ($p) {
        throw $p;
      }
     while (true);
  };
  ChatInput$textInput$slambda.prototype.ogm = function (it, completion) {
    var i = new ChatInput$textInput$slambda(this.gkl_1, completion);
    i.hkl_1 = it;
    return i;
  };
  ChatInput$textInput$slambda.$metadata$ = classMeta('ChatInput$textInput$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function ChatInput$textInput$slambda_0(this$0, resultContinuation) {
    var i = new ChatInput$textInput$slambda(this$0, resultContinuation);
    var l = function (it, $cont) {
      return i.ngm(it, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function ChatInput$textInput$lambda_0(this$0, $tmp2_apply) {
    return function (it) {
      onTextUpdated(this$0, $tmp2_apply.u67());
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda(this$0) {
    return function () {
      replaceText(this$0, '@');
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda_0(this$0) {
    return function () {
      replaceText(this$0, '!');
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda_1(this$0) {
    return function () {
      replaceText(this$0, ':');
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda_2(this$0, $name) {
    return function () {
      replaceText(this$0, '@' + $name + ' ');
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda_3(this$0, $taunt, $player) {
    return function () {
      sendChat(this$0, '!' + $taunt, $player);
      playTaunt($taunt);
      replaceText(this$0, '');
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda_4(this$0, $taunt) {
    return function () {
      var tmp = '!' + $taunt;
      sendChat$default(this$0, tmp, null, 4, null);
      playTaunt($taunt);
      replaceText(this$0, '');
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda_5(this$0) {
    return function () {
      replaceText(this$0, ':name ');
      return Unit_getInstance();
    };
  }
  function ChatInput$onTextUpdated$lambda_6(this$0, $command) {
    return function () {
      replaceText(this$0, ':' + $command.o1n_1 + ' ');
      return Unit_getInstance();
    };
  }
  function ChatInput() {
    Container.call(this);
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$0 = ArrayList_init_$Create$();
    tmp.ikg_1 = tmp$ret$0;
    this.jkg_1 = 0;
    var tmp_0 = this;
    var tmp$ret$4;
    // Inline function 'kotlin.apply' call
    var tmp$ret$3;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput' call
    var tmp1_textInput = get_myBoxSkin();
    var tmp$ret$2;
    // Inline function 'kotlin.also' call
    var tmp0_also = addTo(new TextInput('', 500.0, 24.0, tmp1_textInput), this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput.<anonymous>' call
    var tmp$ret$1;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput.<anonymous>' call
    tmp$ret$1 = Unit_getInstance();
    tmp$ret$2 = tmp0_also;
    tmp$ret$3 = tmp$ret$2;
    var tmp2_apply = tmp$ret$3;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.ChatInput.textInput.<anonymous>' call
    tmp2_apply.gkj_1.ikl('Type here to chat. Type ? for help');
    tmp2_apply.gkj_1.jkl(get_textColor());
    tmp2_apply.gkj_1.akk_1.d54(ChatInput$textInput$lambda(this));
    var tmp_1 = get_keys(tmp2_apply);
    tmp_1.sgo(ChatInput$textInput$slambda_0(this, null));
    tmp2_apply.gkj_1.bkk_1.j54(ChatInput$textInput$lambda_0(this, tmp2_apply));
    tmp$ret$4 = tmp2_apply;
    tmp_0.kkg_1 = tmp$ret$4;
  }
  ChatInput.prototype.acn = function () {
    return this.kkg_1.acn();
  };
  ChatInput.prototype.kkl = function (player) {
    this.kkg_1.gck('@' + player.f1r_1 + '  ' + this.kkg_1.u67());
    this.kkg_1.gkj_1.rkk(this.kkg_1.u67().length);
    this.acn();
  };
  ChatInput.prototype.xkk = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.text.trim' call
    var tmp0_trim = this.kkg_1.u67();
    tmp$ret$0 = toString(trim(isCharSequence(tmp0_trim) ? tmp0_trim : THROW_CCE()));
    var text = tmp$ret$0;
    if (text === ':FORGET') {
      (new Storage(get_gamesCupboardClient().fkd_1.hgs_1)).j2x('FORGET', 'true');
      (new Storage(get_gamesCupboardClient().fkd_1.hgs_1)).n2x('playerName');
      return Unit_getInstance();
    } else if (text === ':REMEMBER') {
      (new Storage(get_gamesCupboardClient().fkd_1.hgs_1)).n2x('FORGET');
    }
    this.ikg_1.c(text);
    this.jkg_1 = this.ikg_1.i();
    var tmp$ret$1;
    // Inline function 'kotlin.text.isNotEmpty' call
    tmp$ret$1 = charSequenceLength(text) > 0;
    if (tmp$ret$1) {
      var tmp;
      var tmp_0 = _Char___init__impl__6a9atx(58);
      if (startsWith$default_0(text, tmp_0, false, 2, null)) {
        tmp = !isSpectator();
      } else {
        tmp = false;
      }
      if (tmp) {
        var tmp0_container = parseCommand(this, text);
        var commandName = tmp0_container.n4();
        var parameters = tmp0_container.o4();
        send_0(new RunCommand(commandName, parameters));
        return Unit_getInstance();
      } else {
        var tmp_1 = _Char___init__impl__6a9atx(64);
        if (startsWith$default_0(text, tmp_1, false, 2, null)) {
          var tmp_2 = _Char___init__impl__6a9atx(32);
          var space = indexOf$default_0(text, tmp_2, 0, false, 6, null);
          if (space < 0)
            return Unit_getInstance();
          var tmp$ret$4;
          // Inline function 'kotlin.text.trim' call
          var tmp$ret$3;
          // Inline function 'kotlin.text.substring' call
          var tmp$ret$2;
          // Inline function 'kotlin.js.asDynamic' call
          tmp$ret$2 = text;
          tmp$ret$3 = tmp$ret$2.substring(1, space);
          var tmp1_trim = tmp$ret$3;
          tmp$ret$4 = toString(trim(isCharSequence(tmp1_trim) ? tmp1_trim : THROW_CCE()));
          var name = tmp$ret$4;
          var tmp$ret$7;
          // Inline function 'kotlin.text.trim' call
          var tmp$ret$6;
          // Inline function 'kotlin.text.substring' call
          var tmp2_substring = space + 1 | 0;
          var tmp$ret$5;
          // Inline function 'kotlin.js.asDynamic' call
          tmp$ret$5 = text;
          tmp$ret$6 = tmp$ret$5.substring(tmp2_substring);
          var tmp3_trim = tmp$ret$6;
          tmp$ret$7 = toString(trim(isCharSequence(tmp3_trim) ? tmp3_trim : THROW_CCE()));
          var message = tmp$ret$7;
          var tmp1_elvis_lhs = get_gamesCupboardClient().vkk(name);
          var tmp_3;
          if (tmp1_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_3 = tmp1_elvis_lhs;
          }
          var player = tmp_3;
          sendChat(this, message, player);
        } else {
          sendChat$default(this, text, null, 4, null);
        }
      }
      this.kkg_1.gck('');
    }
  };
  ChatInput.prototype.lkl = function (prototype) {
    var tmp0_$receiver = prototype.z1n_1;
    var tmp1_prefix = ':' + prototype.y1n_1 + ' ';
    this.kkg_1.gck(joinToString$default(tmp0_$receiver, ' ', tmp1_prefix, ' ', 0, null, null, 56, null));
    this.kkg_1.gkj_1.rkk(this.kkg_1.u67().length);
    this.acn();
  };
  ChatInput.$metadata$ = classMeta('ChatInput', undefined, undefined, undefined, undefined, Container.prototype);
  function ChatLog() {
    TextButtonDockable.call(this, 'Chat Log');
    this.qkl_1 = 20.0;
    this.rkl_1 = 10.0;
    this.skl_1 = 20.0;
    var tmp = this;
    var tmp$ret$4;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = new ClipContainer(350.0, get_dockHeight());
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.ChatLog.panel.<anonymous>' call
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.solidRect' call
    var tmp0_solidRect = tmp0_apply.d72();
    var tmp1_solidRect = tmp0_apply.e72();
    var tmp2_solidRect = get_dockableColor();
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new SolidRect(tmp0_solidRect, tmp1_solidRect, tmp2_solidRect);
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = addTo(tmp0_addTo, tmp0_apply);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.solidRect.<anonymous>' call
    tmp$ret$0 = Unit_getInstance();
    tmp$ret$1 = tmp0_apply_0;
    tmp$ret$2 = tmp$ret$1;
    tmp$ret$3 = tmp$ret$2;
    tmp$ret$4 = tmp0_apply;
    tmp.tkl_1 = tmp$ret$4;
    var tmp_0 = this;
    var tmp$ret$5;
    // Inline function 'kotlin.apply' call
    var tmp_1 = this.tkl_1.d72();
    var tmp_2 = this.tkl_1.e72() - this.skl_1;
    var tmp0_apply_1 = PrintContainer_init_$Create$(tmp_1, tmp_2, this.qkl_1, 0.0, this.rkl_1, null, 0.0, null, 232, null);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.ChatLog.out.<anonymous>' call
    tmp0_apply_1.kim_1 = Colors_getInstance().y7z_1;
    this.tkl_1.shz(tmp0_apply_1);
    tmp$ret$5 = tmp0_apply_1;
    tmp_0.ukl_1 = tmp$ret$5;
  }
  ChatLog.prototype.vkl = function () {
    return this.tkl_1;
  };
  ChatLog.prototype.wkl = function (chatMessage) {
    var player = get_gamesCupboardClient().xkl(chatMessage.p1i_1);
    var tmp;
    if (player == null) {
      tmp = '<unknown> : ';
    } else {
      tmp = player.f1r_1 + ' : ';
    }
    var prefix = tmp;
    var tmp_0 = player == null ? get_textColor() : Colors_getInstance().l8k(player.g1r_1);
    this.ukl_1.qkp(prefix, tmp_0, null, 4, null);
    this.ukl_1.rkp(chatMessage.q1i_1, null, 2, null);
  };
  ChatLog.$metadata$ = classMeta('ChatLog', undefined, undefined, undefined, undefined, TextButtonDockable.prototype);
  function selectDockable($this, dockable) {
    if (dockable === $this.oks_1) {
      dockable.zkp(false);
      $this.oks_1 = null;
      return Unit_getInstance();
    }
    var tmp0_safe_receiver = $this.oks_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.zkp(true);
    }
    $this.oks_1 = dockable;
    dockable.tkk();
  }
  function Dock$add$lambda(this$0, $dockable) {
    return function (it) {
      selectDockable(this$0, $dockable);
      return Unit_getInstance();
    };
  }
  function Dock(width, height, dockables) {
    FixedSizeContainer_init_$Init$(width, height, false, 4, null, this);
    this.nks_1 = 8.0;
    this.oks_1 = null;
    this.pks_1 = 10.0;
    this.qks_1 = new Container();
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.solidRect' call
    var tmp0_solidRect = get_dockColor();
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new SolidRect(width, height, tmp0_solidRect);
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.solidRect.<anonymous>' call
    tmp$ret$0 = Unit_getInstance();
    tmp$ret$1 = tmp0_apply;
    tmp$ret$2 = tmp$ret$1;
    tmp$ret$3 = tmp$ret$2;
    this.shz(this.qks_1);
    var tmp0_iterator = dockables.j();
    while (tmp0_iterator.k()) {
      var dockable = tmp0_iterator.l();
      this.rks(dockable);
    }
  }
  Dock.prototype.sks = function (immediately) {
    var tmp0_safe_receiver = this.oks_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp;
      if (tmp0_safe_receiver.vkl().si0() < get_playingAreaWidth()) {
        tmp0_safe_receiver.zkp(immediately);
        this.oks_1 = null;
        tmp = Unit_getInstance();
      }
      tmp$ret$0 = tmp;
    }
  };
  Dock.prototype.rks = function (dockable) {
    position(dockable.vkl(), 0.0, 0.0);
    this.zhz(dockable.vkl(), 0);
    var button = dockable.ih1();
    button.o7c(this.pks_1);
    var tmp = get_mouse(button).kgd_1;
    tmp.d54(Dock$add$lambda(this, dockable));
    this.qks_1.shz(button);
    var tmp0_this = this;
    tmp0_this.pks_1 = tmp0_this.pks_1 + (button.e72() + this.nks_1);
  };
  Dock.$metadata$ = classMeta('Dock', undefined, undefined, undefined, undefined, FixedSizeContainer.prototype);
  function Dockable() {
  }
  Dockable.$metadata$ = interfaceMeta('Dockable');
  function _interpolate$ref() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_0() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function TextButtonDockable(labelStr) {
    this.skp_1 = 10.0;
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = Text_init_$Create$(labelStr, 0.0, null, null, null, null, false, null, null, 510, null);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.TextButtonDockable.label.<anonymous>' call
    tmp0_apply.djp(get_degrees(90));
    tmp0_apply.w8w(tmp0_apply.e72() + (get_dockWidth() - tmp0_apply.e72()) / 2);
    tmp0_apply.o7c(this.skp_1);
    tmp$ret$0 = tmp0_apply;
    tmp.tkp_1 = tmp$ret$0;
    this.ukp_1 = new SolidRect(get_dockWidth(), this.tkp_1.d72() + this.skp_1 * 2, get_dockButtonColor());
    var tmp_0 = this;
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = new Container();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.TextButtonDockable.button.<anonymous>' call
    tmp0_apply_0.shz(this.ukp_1);
    tmp0_apply_0.shz(this.tkp_1);
    tmp$ret$1 = tmp0_apply_0;
    tmp_0.vkp_1 = tmp$ret$1;
  }
  TextButtonDockable.prototype.wkp = function () {
    return this.skp_1;
  };
  TextButtonDockable.prototype.xkp = function () {
    return this.tkp_1;
  };
  TextButtonDockable.prototype.ykp = function () {
    return this.ukp_1;
  };
  TextButtonDockable.prototype.ih1 = function () {
    return this.vkp_1;
  };
  TextButtonDockable.prototype.tkk = function () {
    this.ukp_1.zih(get_dockButtonSelectedColor());
    var tmp = this.vkl();
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.tween.get' call
    var tmp0_get = x$factory(this.vkl());
    var tmp1_get = -this.vkl().d72();
    var tmp_0 = tmp0_get.get();
    var tmp_1 = _interpolate$ref();
    tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp_0, tmp1_get, tmp_1, false, null, null, null, 224, null);
    var tmp_2 = [tmp$ret$0];
    var tmp$ret$1;
    // Inline function 'com.soywiz.klock.seconds' call
    tmp$ret$1 = Companion_getInstance_0().c1i(0.3);
    var tmp_3 = tmp$ret$1;
    var tmp_4 = Companion_getInstance_1().g7u();
    launchTween$default(tmp, tmp_2, tmp_3, tmp_4, null, 8, null);
  };
  TextButtonDockable.prototype.zkp = function (immediately) {
    this.ukp_1.zih(get_dockButtonColor());
    if (immediately) {
      this.vkl().w8w(0.0);
    } else {
      var tmp = this.vkl();
      var tmp$ret$0;
      // Inline function 'com.soywiz.korge.tween.get' call
      var tmp0_get = x$factory_0(this.vkl());
      var tmp_0 = tmp0_get.get();
      var tmp_1 = _interpolate$ref_0();
      tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp_0, 0.0, tmp_1, false, null, null, null, 224, null);
      var tmp_2 = [tmp$ret$0];
      var tmp$ret$1;
      // Inline function 'com.soywiz.klock.seconds' call
      tmp$ret$1 = Companion_getInstance_0().c1i(0.3);
      var tmp_3 = tmp$ret$1;
      var tmp_4 = Companion_getInstance_1().g7u();
      launchTween$default(tmp, tmp_2, tmp_3, tmp_4, null, 8, null);
    }
  };
  TextButtonDockable.$metadata$ = classMeta('TextButtonDockable', [Dockable]);
  function x$factory($b0) {
    return getPropertyCallableRef('x', 0, KMutableProperty0, function () {
      return $b0.d1n();
    }, function (value) {
      return $b0.w8w(value);
    });
  }
  function x$factory_0($b0) {
    return getPropertyCallableRef('x', 0, KMutableProperty0, function () {
      return $b0.d1n();
    }, function (value) {
      return $b0.w8w(value);
    });
  }
  function _interpolate$ref_1() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_2() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function ForegroundArea$hideMouseHighlight$lambda($tmp0_safe_receiver) {
    return function () {
      $tmp0_safe_receiver.tch(false);
      return Unit_getInstance();
    };
  }
  function ForegroundArea(width, height) {
    ClipContainer.call(this, width, height);
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$0 = ArrayList_init_$Create$();
    tmp.gkv_1 = tmp$ret$0;
  }
  ForegroundArea.prototype.hkv = function (colors, bitmap) {
    var tmp0_iterator = colors.j();
    while (tmp0_iterator.k()) {
      var color = tmp0_iterator.l();
      var tmp$ret$2;
      // Inline function 'com.soywiz.korge.view.image' call
      var tmp$ret$1;
      // Inline function 'com.soywiz.korge.view.addTo' call
      var tmp0_addTo = Image_init_$Create$(bitmap, 0.0, 0.0, null, false, 24, null);
      var tmp$ret$0;
      // Inline function 'kotlin.apply' call
      var tmp0_apply = addTo(tmp0_addTo, this);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.ForegroundArea.addMouseHighlights.<anonymous>' call
      anchor(tmp0_apply, 0.5, 0.5);
      tmp0_apply.tch(false);
      tmp0_apply.ejp(Colors_getInstance().l8k(color));
      tmp$ret$0 = tmp0_apply;
      tmp$ret$1 = tmp$ret$0;
      tmp$ret$2 = tmp$ret$1;
      this.gkv_1.c(tmp$ret$2);
    }
  };
  ForegroundArea.prototype.ikv = function (playerId, x, y) {
    var tmp0_safe_receiver = getOrNull(this.gkv_1, playerId - 1 | 0);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$2;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      tmp0_safe_receiver.w8w(x);
      tmp0_safe_receiver.o7c(y);
      tmp0_safe_receiver.tch(true);
      tmp0_safe_receiver.ni0(0.1);
      var tmp$ret$0;
      // Inline function 'com.soywiz.korge.tween.get' call
      var tmp0_get = scale$factory(tmp0_safe_receiver);
      var tmp = tmp0_get.get();
      var tmp_0 = _interpolate$ref_1();
      tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp, 1.0, tmp_0, false, null, null, null, 224, null);
      var tmp_1 = [tmp$ret$0];
      var tmp$ret$1;
      // Inline function 'com.soywiz.klock.seconds' call
      tmp$ret$1 = Companion_getInstance_0().c1i(0.5);
      var tmp_2 = tmp$ret$1;
      launchTween$default(tmp0_safe_receiver, tmp_1, tmp_2, null, null, 12, null);
      tmp$ret$2 = Unit_getInstance();
    }
  };
  ForegroundArea.prototype.jkv = function (playerId) {
    var tmp0_safe_receiver = getOrNull(this.gkv_1, playerId - 1 | 0);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$2;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp$ret$0;
      // Inline function 'com.soywiz.korge.tween.get' call
      var tmp0_get = scale$factory_0(tmp0_safe_receiver);
      var tmp = tmp0_get.get();
      var tmp_0 = _interpolate$ref_2();
      tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp, 0.1, tmp_0, false, null, null, null, 224, null);
      var tmp_1 = [tmp$ret$0];
      var tmp$ret$1;
      // Inline function 'com.soywiz.klock.seconds' call
      tmp$ret$1 = Companion_getInstance_0().c1i(0.5);
      var tmp_2 = tmp$ret$1;
      launchTweenThen$default(tmp0_safe_receiver, tmp_1, tmp_2, null, null, ForegroundArea$hideMouseHighlight$lambda(tmp0_safe_receiver), 12, null);
      tmp$ret$2 = Unit_getInstance();
    }
  };
  ForegroundArea.prototype.kkv = function (playerId, x, y) {
    var tmp0_safe_receiver = getOrNull(this.gkv_1, playerId - 1 | 0);
    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.w8w(x);
      tmp0_safe_receiver.o7c(y);
      tmp$ret$0 = Unit_getInstance();
    }
  };
  ForegroundArea.$metadata$ = classMeta('ForegroundArea', undefined, undefined, undefined, undefined, ClipContainer.prototype);
  function scale$factory($b0) {
    return getPropertyCallableRef('scale', 0, KMutableProperty0, function () {
      return $b0.oi0();
    }, function (value) {
      return $b0.ni0(value);
    });
  }
  function scale$factory_0($b0) {
    return getPropertyCallableRef('scale', 0, KMutableProperty0, function () {
      return $b0.oi0();
    }, function (value) {
      return $b0.ni0(value);
    });
  }
  function onKeyDown_0($this, e) {
    if (e.gc6_1.equals(Key_ESCAPE_getInstance())) {
      $this.jkd_1.cky_1.kkg_1.gck('');
      $this.jkd_1.cky_1.kkg_1.acn();
      $this.lkd_1.fl1();
      $this.ukd_1.x7();
    }
  }
  function stageResized($this) {
    $this.jkd_1.gl1();
    $this.skd_1.w8w($this.fkd_1.qha() - $this.skd_1.d72());
  }
  function gameInfo($this, message, $cont) {
    var tmp = new $gameInfoCOROUTINE$2($this, message, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function resetGame($this, message, $cont) {
    var tmp = new $resetGameCOROUTINE$3($this, message, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function playerJoined($this, player) {
    if (player.h1r_1) {
      $this.okd_1.ukl_1.qkp('Spectator Joined : ', null, null, 6, null);
    } else {
      $this.okd_1.ukl_1.qkp('Player Joined : ', null, null, 6, null);
    }
    $this.okd_1.ukl_1.al3(player.f1r_1, Colors_getInstance().l8k(player.g1r_1));
    // Inline function 'kotlin.collections.set' call
    var tmp0_set = $this.ikd_1;
    var tmp1_set = player.e1r_1;
    tmp0_set.a(tmp1_set, player);
    playSound_0(get_PLAYER_JOINED());
    if (!player.h1r_1) {
      var tmp0_safe_receiver = $this.pkd_1;
      if (tmp0_safe_receiver == null)
        null;
      else {
        tmp0_safe_receiver.tl3(player.e1r_1, player.f1r_1);
      }
      $this.lkd_1.ul3();
    }
  }
  function playerLeft($this, id) {
    var player = $this.ikd_1.y4(id);
    if (!(player == null)) {
      if (player.h1r_1) {
        $this.okd_1.ukl_1.qkp('Spectator Left : ', null, null, 6, null);
      } else {
        $this.okd_1.ukl_1.qkp('Player Left : ', null, null, 6, null);
      }
      $this.okd_1.ukl_1.al3(player.f1r_1, Colors_getInstance().l8k(player.g1r_1));
      playSound_0(get_PLAYER_LEFT());
      if (!player.h1r_1) {
        $this.mkd_1.jkv(id);
      }
    }
  }
  function renamePlayer($this, message) {
    var tmp0_elvis_lhs = $this.ikd_1.q(message.h1k_1);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var player = tmp;
    player.f1r_1 = message.i1k_1;
    var tmp1_safe_receiver = $this.lkd_1.vl3(player.e1r_1);
    if (tmp1_safe_receiver == null) {
    } else {
      tmp1_safe_receiver.sl6(message.i1k_1);
    }
    var tmp$ret$0;
    // Inline function 'kotlin.with' call
    var tmp0_with = $this.okd_1.ukl_1;
    // Inline function 'kotlin.contracts.contract' call
    if (player.h1r_1) {
      var tmp_0 = 'Spectator#' + player.e1r_1;
      var tmp_1 = Colors_getInstance().l8k(player.g1r_1);
      tmp0_with.qkp(tmp_0, tmp_1, null, 4, null);
    } else {
      var tmp_2 = 'Player#' + player.e1r_1;
      var tmp_3 = Colors_getInstance().l8k(player.g1r_1);
      tmp0_with.qkp(tmp_2, tmp_3, null, 4, null);
    }
    tmp0_with.qkp(' renamed to ', null, null, 6, null);
    tmp0_with.al3(player.f1r_1, Colors_getInstance().l8k(player.g1r_1));
    tmp$ret$0 = Unit_getInstance();
    if (!player.h1r_1) {
      var tmp2_safe_receiver = $this.pkd_1;
      if (tmp2_safe_receiver == null)
        null;
      else {
        tmp2_safe_receiver.tl3(message.h1k_1, message.i1k_1);
      }
    }
    if (message.h1k_1 === $this.tl6().e1r_1) {
      (new Storage($this.fkd_1.hgs_1)).j2x('playerName', message.i1k_1);
    }
  }
  function newGameObject($this, message, $cont) {
    var tmp = new $newGameObjectCOROUTINE$4($this, message, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function loadAndCacheBitmap($this, path, $cont) {
    var tmp = new $loadAndCacheBitmapCOROUTINE$5($this, path, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function loadBitmap($this, path, $cont) {
    var tmp = new $loadBitmapCOROUTINE$6($this, path, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function createGameObjectView($this, gameObject, to, $cont) {
    var tmp = new $createGameObjectViewCOROUTINE$7($this, gameObject, to, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function removeObject($this, id) {
    var tmp0_safe_receiver = $this.lkd_1.v4p(id);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$2;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp$ret$1;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.removeObject.<anonymous>' call
      var tmp0_safe_receiver_0 = $this.lkd_1.tl8($this.rl8(tmp0_safe_receiver.d1n()), $this.sl8(tmp0_safe_receiver.e1n()));
      var tmp;
      if (tmp0_safe_receiver_0 == null) {
        tmp = null;
      } else {
        var tmp$ret$0;
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        var tmp0_this = tmp0_safe_receiver_0;
        var tmp1 = tmp0_this.t1s_1;
        tmp0_this.t1s_1 = tmp1 - 1 | 0;
        $this.lkd_1.ul8(tmp0_safe_receiver_0);
        tmp$ret$0 = Unit_getInstance();
        tmp = Unit_getInstance();
      }
      tmp$ret$1 = tmp;
      tmp$ret$2 = tmp$ret$1;
    }
  }
  function removeObject_0($this, message) {
    var tmp0_iterator = message.o1k_1.j();
    while (tmp0_iterator.k()) {
      var id = tmp0_iterator.l();
      removeObject($this, id);
    }
  }
  function moveObject($this, message) {
    var tmp0_safe_receiver = $this.lkd_1.vl8(message.s1k_1);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$6;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      $this.lkd_1.wl8(message.s1k_1);
      var flippedMessageX = $this.xl8(message.t1k_1);
      var flippedGovX = $this.rl8(tmp0_safe_receiver.d1n());
      var flippedMessageY = $this.yl8(message.u1k_1);
      var flippedGovY = $this.sl8(tmp0_safe_receiver.e1n());
      $this.lkd_1.zl8(tmp0_safe_receiver, message.v1k_1);
      tmp0_safe_receiver.egh(1.0);
      tmp0_safe_receiver.klb_1 = false;
      var tmp;
      if (!(flippedGovX === message.t1k_1) ? true : !(flippedGovY === message.u1k_1)) {
        var tmp0_safe_receiver_0 = $this.lkd_1.tl8(flippedGovX, flippedGovY);
        if (tmp0_safe_receiver_0 == null)
          null;
        else {
          var tmp$ret$0;
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          var tmp0_this = tmp0_safe_receiver_0;
          var tmp1 = tmp0_this.t1s_1;
          tmp0_this.t1s_1 = tmp1 - 1 | 0;
          $this.lkd_1.ul8(tmp0_safe_receiver_0);
          tmp$ret$0 = Unit_getInstance();
        }
        var tmp1_safe_receiver = $this.lkd_1.plb(flippedGovX, flippedGovY);
        if (tmp1_safe_receiver == null)
          null;
        else {
          var tmp$ret$1;
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          var tmp_0;
          var tmp_1;
          if (tmp1_safe_receiver.w1r_1.equals(AreaType_PRIVATE_getInstance()) ? tmp0_safe_receiver.nlb_1 === localPlayerId() : false) {
            tmp_1 = tmp0_safe_receiver instanceof FlippableImageObjectView;
          } else {
            tmp_1 = false;
          }
          if (tmp_1) {
            tmp0_safe_receiver.jle(true);
            tmp_0 = Unit_getInstance();
          }
          tmp$ret$1 = tmp_0;
        }
        var tmp$ret$2;
        // Inline function 'com.soywiz.korge.tween.get' call
        var tmp0_get = x$factory_1(tmp0_safe_receiver);
        var tmp1_get = flippedMessageX;
        var tmp_2 = tmp0_get.get();
        var tmp_3 = _interpolate$ref_3();
        tmp$ret$2 = V2_init_$Create$(tmp0_get, tmp_2, tmp1_get, tmp_3, false, null, null, null, 224, null);
        var tmp_4 = tmp$ret$2;
        var tmp$ret$3;
        // Inline function 'com.soywiz.korge.tween.get' call
        var tmp2_get = y$factory(tmp0_safe_receiver);
        var tmp3_get = flippedMessageY;
        var tmp_5 = tmp2_get.get();
        var tmp_6 = _interpolate$ref_4();
        tmp$ret$3 = V2_init_$Create$(tmp2_get, tmp_5, tmp3_get, tmp_6, false, null, null, null, 224, null);
        var tmp_7 = [tmp_4, tmp$ret$3];
        var tmp$ret$4;
        // Inline function 'com.soywiz.klock.milliseconds' call
        var tmp4__get_milliseconds__noiarf = get_moveMessageInterval();
        tmp$ret$4 = Companion_getInstance_0().o1h(tmp4__get_milliseconds__noiarf.cf());
        var tmp_8 = tmp$ret$4;
        launchTween$default(tmp0_safe_receiver, tmp_7, tmp_8, null, null, 12, null);
        var tmp2_safe_receiver = $this.lkd_1.tl8(message.t1k_1, message.u1k_1);
        if (tmp2_safe_receiver == null)
          null;
        else {
          var tmp$ret$5;
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          var tmp0_this_0 = tmp2_safe_receiver;
          var tmp1_0 = tmp0_this_0.t1s_1;
          tmp0_this_0.t1s_1 = tmp1_0 + 1 | 0;
          $this.lkd_1.ul8(tmp2_safe_receiver);
          tmp$ret$5 = Unit_getInstance();
        }
        tmp = Unit_getInstance();
      }
      tmp$ret$6 = tmp;
    }
  }
  function dragObject($this, message, $cont) {
    var tmp = new $dragObjectCOROUTINE$8($this, message, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function changePrivacy($this, message) {
    var tmp0_safe_receiver = $this.lkd_1.vl8(message.e1l_1);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$9;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp$ret$8;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.changePrivacy.<anonymous>' call
      var tmp0_safe_receiver_0 = tmp0_safe_receiver.nlb_1;
      if (tmp0_safe_receiver_0 == null)
        null;
      else {
        var tmp$ret$3;
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        var tmp$ret$2;
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.changePrivacy.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver_1 = $this.lkd_1.vl3(tmp0_safe_receiver_0);
        var tmp;
        if (tmp0_safe_receiver_1 == 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 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.changePrivacy.<anonymous>.<anonymous>.<anonymous>' call
          var tmp0_this = tmp0_safe_receiver_1;
          var tmp1 = tmp0_this.rl6_1;
          tmp0_this.flf(tmp1 - 1 | 0);
          tmp$ret$0 = tmp1;
          tmp$ret$1 = tmp$ret$0;
          tmp = tmp$ret$1;
        }
        tmp$ret$2 = tmp;
        tmp$ret$3 = tmp$ret$2;
      }
      tmp0_safe_receiver.nlb_1 = message.f1l_1;
      tmp0_safe_receiver.tch(message.f1l_1 == null ? true : message.f1l_1 === $this.tl6().e1r_1);
      var tmp1_safe_receiver = tmp0_safe_receiver.nlb_1;
      var tmp_0;
      if (tmp1_safe_receiver == null) {
        tmp_0 = null;
      } else {
        var tmp$ret$7;
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        var tmp$ret$6;
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.changePrivacy.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver_2 = $this.lkd_1.vl3(tmp1_safe_receiver);
        var tmp_1;
        if (tmp0_safe_receiver_2 == 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 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.changePrivacy.<anonymous>.<anonymous>.<anonymous>' call
          var tmp0_this_0 = tmp0_safe_receiver_2;
          var tmp1_0 = tmp0_this_0.rl6_1;
          tmp0_this_0.flf(tmp1_0 + 1 | 0);
          tmp$ret$4 = tmp1_0;
          tmp$ret$5 = tmp$ret$4;
          tmp_1 = tmp$ret$5;
        }
        tmp$ret$6 = tmp_1;
        tmp$ret$7 = tmp$ret$6;
        tmp_0 = tmp$ret$7;
      }
      tmp$ret$8 = tmp_0;
      tmp$ret$9 = tmp$ret$8;
    }
  }
  function faceUpOrDown($this, message) {
    var tmp0_safe_receiver = $this.lkd_1.vl8(message.j1l_1);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp;
      if (tmp0_safe_receiver instanceof FlippableImageObjectView) {
        tmp0_safe_receiver.jle(message.k1l_1);
        tmp = Unit_getInstance();
      }
      tmp$ret$0 = tmp;
    }
  }
  function scaleObject($this, message) {
    var tmp0_safe_receiver = $this.lkd_1.vl8(message.n1l_1);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp;
      if (tmp0_safe_receiver instanceof ImageObjectView) {
        tmp0_safe_receiver.ali(message.o1l_1);
        tmp = Unit_getInstance();
      }
      tmp$ret$0 = tmp;
    }
  }
  function cycleText($this, message) {
    var tmp0_safe_receiver = $this.lkd_1.vl8(message.r1l_1);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp;
      if (tmp0_safe_receiver instanceof TextObjectView) {
        tmp0_safe_receiver.vlk(message.s1l_1);
        tmp = Unit_getInstance();
      }
      tmp$ret$0 = tmp;
    }
  }
  function changeImage($this, message) {
    var tmp0_safe_receiver = $this.lkd_1.vl8(message.v1l_1);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp;
      if (tmp0_safe_receiver instanceof MultipleImageView) {
        tmp0_safe_receiver.oln(message.w1l_1);
        tmp0_safe_receiver.pln();
        tmp = Unit_getInstance();
      }
      tmp$ret$0 = tmp;
    }
  }
  function chatMessage($this, message) {
    $this.okd_1.wkl(message);
    var fromAvatar = $this.lkd_1.vl3(message.p1i_1);
    var toAvatar = message.r1i_1 == null ? null : $this.lkd_1.vl3(ensureNotNull(message.r1i_1));
    var tmp0_safe_receiver = fromAvatar;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.qln(message.q1i_1, toAvatar);
    }
    if (startsWith$default(message.q1i_1, '!', false, 2, null)) {
      var tmp$ret$1;
      // Inline function 'kotlin.text.substring' call
      var tmp0_substring = message.q1i_1;
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp0_substring;
      tmp$ret$1 = tmp$ret$0.substring(1);
      playTaunt(tmp$ret$1);
    }
  }
  function commandOk($this) {
    $this.rln().kkg_1.gck('');
  }
  function commandError($this, message) {
    $this.okd_1.ukl_1.rkp(message.a1m_1, null, 2, null);
    var fromAvatar = $this.lkd_1.vl3($this.tl6().e1r_1);
    var tmp0_safe_receiver = fromAvatar;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.sln(message.a1m_1, null, 2, null);
    }
  }
  function addBin($this, $cont) {
    var tmp = new $addBinCOROUTINE$9($this, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function highlightMouse($this, message) {
    var tmp0_subject = message.k1m_1;
    switch (tmp0_subject) {
      case true:
        $this.mkd_1.ikv(message.h1m_1, $this.xl8(message.i1m_1), $this.yl8(message.j1m_1));
        ;
        break;
      case false:
        $this.mkd_1.jkv(message.h1m_1);
        ;
        break;
      default:
        $this.mkd_1.kkv(message.h1m_1, $this.xl8(message.i1m_1), $this.yl8(message.j1m_1));
        ;
        break;
    }
  }
  function GamesCupboardClient$lambda(this$0) {
    return function ($this$onStageResized, _anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
      stageResized(this$0);
      return Unit_getInstance();
    };
  }
  function GamesCupboardClient$slambda(this$0, resultContinuation) {
    this.klo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  GamesCupboardClient$slambda.prototype.ngm = function (it, $cont) {
    var tmp = this.ogm(it, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  GamesCupboardClient$slambda.prototype.w7 = function (p1, $cont) {
    return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
  };
  GamesCupboardClient$slambda.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        if (tmp === 0) {
          this.p7_1 = 1;
          onKeyDown_0(this.klo_1, this.llo_1);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.r7_1;
        }
      } catch ($p) {
        throw $p;
      }
     while (true);
  };
  GamesCupboardClient$slambda.prototype.ogm = function (it, completion) {
    var i = new GamesCupboardClient$slambda(this.klo_1, completion);
    i.llo_1 = it;
    return i;
  };
  GamesCupboardClient$slambda.$metadata$ = classMeta('GamesCupboardClient$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function GamesCupboardClient$slambda_0(this$0, resultContinuation) {
    var i = new GamesCupboardClient$slambda(this$0, resultContinuation);
    var l = function (it, $cont) {
      return i.ngm(it, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function GamesCupboardClient$gameInfo$lambda($button) {
    return function (it) {
      run($button.j1n_1);
      return Unit_getInstance();
    };
  }
  function _interpolate$ref_3() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_4() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_5() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_6() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function $listenCOROUTINE$0(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ulo_1 = _this__u8e3s4;
  }
  $listenCOROUTINE$0.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 9;
            println('Listen');
            this.p7_1 = 7;
            this.vlo_1 = this.ulo_1.gkd_1.r3d().j();
            this.o7_1 = 1;
            continue $sm;
          case 1:
            this.o7_1 = 2;
            suspendResult = this.vlo_1.q28(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (!suspendResult) {
              this.o7_1 = 6;
              continue $sm;
            }

            this.wlo_1 = this.vlo_1.l();
            var tmp_0 = this.wlo_1;
            if (tmp_0 instanceof Text) {
              this.xlo_1 = readText(this.wlo_1);
              var tmp_1 = this;
              var tmp_2 = this;
              tmp_2.ylo_1 = get_json();
              var tmp_3;
              try {
                var tmp0_serializer = this.ylo_1.cr();
                var tmp0_cast = serializer(tmp0_serializer, createKType(getKClass(Packet), arrayOf([]), true));
                tmp_3 = this.ylo_1.q17(isInterface(tmp0_cast, KSerializer) ? tmp0_cast : THROW_CCE(), this.xlo_1);
              } catch ($p) {
                var tmp_4;
                if ($p instanceof Exception) {
                  tmp_4 = null;
                } else {
                  throw $p;
                }
                tmp_3 = tmp_4;
              }
              tmp_1.zlo_1 = tmp_3;
              if (this.zlo_1 == null) {
                this.o7_1 = 1;
                var tmp_5 = this;
                continue $sm;
              } else {
                this.alp_1 = this.zlo_1;
                this.o7_1 = 3;
                continue $sm;
              }
            } else {
              this.o7_1 = 5;
              continue $sm;
            }

            break;
          case 3:
            this.blp_1 = this.alp_1;
            var tmp_6 = this.blp_1.v1i_1;
            if (tmp_6 instanceof NotInvited) {
              this.ulo_1.okd_1.ukl_1.rkp('Incorrect invitation code.', null, 2, null);
              this.ulo_1.okd_1.tkk();
              return Unit_getInstance();
            }

            this.o7_1 = 4;
            suspendResult = this.ulo_1.clp(this.blp_1.v1i_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.o7_1 = 5;
            continue $sm;
          case 5:
            this.o7_1 = 1;
            continue $sm;
          case 6:
            println('Listen ending normally');
            this.p7_1 = 9;
            this.o7_1 = 8;
            continue $sm;
          case 7:
            this.p7_1 = 9;
            var tmp_7 = this.r7_1;
            if (tmp_7 instanceof Error) {
              var e = this.r7_1;
              printStackTrace(e);
              println('Error while receiving messages: ' + e);
              this.o7_1 = 8;
              continue $sm;
            } else {
              throw this.r7_1;
            }

            break;
          case 8:
            this.p7_1 = 9;
            println('End listen');
            return Unit_getInstance();
          case 9:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 9) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $listenCOROUTINE$0.$metadata$ = classMeta('$listenCOROUTINE$0', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $processMessageCOROUTINE$1(_this__u8e3s4, message, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.llp_1 = _this__u8e3s4;
    this.mlp_1 = message;
  }
  $processMessageCOROUTINE$1.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 7;
            this.nlp_1 = this.mlp_1;
            var tmp_0 = this.nlp_1;
            if (tmp_0 instanceof GameInfo) {
              this.o7_1 = 5;
              suspendResult = gameInfo(this.llp_1, this.mlp_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this.nlp_1;
              if (tmp_1 instanceof ResetGame) {
                this.o7_1 = 4;
                suspendResult = resetGame(this.llp_1, this.mlp_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_2 = this.nlp_1;
                if (tmp_2 instanceof PlayerJoined) {
                  playerJoined(this.llp_1, this.mlp_1.b1k_1);
                  this.o7_1 = 6;
                  continue $sm;
                } else {
                  var tmp_3 = this.nlp_1;
                  if (tmp_3 instanceof PlayerLeft) {
                    playerLeft(this.llp_1, this.mlp_1.e1k_1);
                    this.o7_1 = 6;
                    continue $sm;
                  } else {
                    var tmp_4 = this.nlp_1;
                    if (tmp_4 instanceof RenamePlayer) {
                      renamePlayer(this.llp_1, this.mlp_1);
                      this.o7_1 = 6;
                      continue $sm;
                    } else {
                      var tmp_5 = this.nlp_1;
                      if (tmp_5 instanceof AddObjects) {
                        this.o7_1 = 3;
                        suspendResult = newGameObject(this.llp_1, this.mlp_1, this);
                        if (suspendResult === get_COROUTINE_SUSPENDED()) {
                          return suspendResult;
                        }
                        continue $sm;
                      } else {
                        var tmp_6 = this.nlp_1;
                        if (tmp_6 instanceof RemoveObjects) {
                          removeObject_0(this.llp_1, this.mlp_1);
                          this.o7_1 = 6;
                          continue $sm;
                        } else {
                          var tmp_7 = this.nlp_1;
                          if (tmp_7 instanceof MoveObject) {
                            moveObject(this.llp_1, this.mlp_1);
                            this.o7_1 = 6;
                            continue $sm;
                          } else {
                            var tmp_8 = this.nlp_1;
                            if (tmp_8 instanceof DragObject) {
                              this.o7_1 = 2;
                              suspendResult = dragObject(this.llp_1, this.mlp_1, this);
                              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                                return suspendResult;
                              }
                              continue $sm;
                            } else {
                              var tmp_9 = this.nlp_1;
                              if (tmp_9 instanceof ChangePrivacy) {
                                changePrivacy(this.llp_1, this.mlp_1);
                                this.o7_1 = 6;
                                continue $sm;
                              } else {
                                var tmp_10 = this.nlp_1;
                                if (tmp_10 instanceof FaceUpOrDown) {
                                  faceUpOrDown(this.llp_1, this.mlp_1);
                                  this.o7_1 = 6;
                                  continue $sm;
                                } else {
                                  var tmp_11 = this.nlp_1;
                                  if (tmp_11 instanceof ScaleObject) {
                                    scaleObject(this.llp_1, this.mlp_1);
                                    this.o7_1 = 6;
                                    continue $sm;
                                  } else {
                                    var tmp_12 = this.nlp_1;
                                    if (tmp_12 instanceof CycleText) {
                                      cycleText(this.llp_1, this.mlp_1);
                                      this.o7_1 = 6;
                                      continue $sm;
                                    } else {
                                      var tmp_13 = this.nlp_1;
                                      if (tmp_13 instanceof ChangeImage) {
                                        changeImage(this.llp_1, this.mlp_1);
                                        this.o7_1 = 6;
                                        continue $sm;
                                      } else {
                                        var tmp_14 = this.nlp_1;
                                        if (tmp_14 instanceof CommandOk) {
                                          commandOk(this.llp_1);
                                          this.o7_1 = 6;
                                          continue $sm;
                                        } else {
                                          var tmp_15 = this.nlp_1;
                                          if (tmp_15 instanceof CommandError) {
                                            commandError(this.llp_1, this.mlp_1);
                                            this.o7_1 = 6;
                                            continue $sm;
                                          } else {
                                            var tmp_16 = this.nlp_1;
                                            if (tmp_16 instanceof ChatMessage) {
                                              chatMessage(this.llp_1, this.mlp_1);
                                              this.o7_1 = 6;
                                              continue $sm;
                                            } else {
                                              var tmp_17 = this.nlp_1;
                                              if (tmp_17 instanceof ScoreSheetData) {
                                                var tmp1_safe_receiver = this.llp_1.pkd_1;
                                                if (tmp1_safe_receiver == null)
                                                  null;
                                                else {
                                                  tmp1_safe_receiver.olp(this.mlp_1.d1m_1);
                                                }
                                                this.o7_1 = 6;
                                                continue $sm;
                                              } else {
                                                var tmp_18 = this.nlp_1;
                                                if (tmp_18 instanceof AddBin) {
                                                  this.o7_1 = 1;
                                                  suspendResult = addBin(this.llp_1, this);
                                                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                                                    return suspendResult;
                                                  }
                                                  continue $sm;
                                                } else {
                                                  var tmp_19 = this.nlp_1;
                                                  if (tmp_19 instanceof HighlightMouse) {
                                                    highlightMouse(this.llp_1, this.mlp_1);
                                                    this.o7_1 = 6;
                                                    continue $sm;
                                                  } else {
                                                    this.o7_1 = 6;
                                                    continue $sm;
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }

            break;
          case 1:
            this.o7_1 = 6;
            continue $sm;
          case 2:
            this.o7_1 = 6;
            continue $sm;
          case 3:
            this.o7_1 = 6;
            continue $sm;
          case 4:
            this.o7_1 = 6;
            continue $sm;
          case 5:
            this.o7_1 = 6;
            continue $sm;
          case 6:
            return Unit_getInstance();
          case 7:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 7) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $processMessageCOROUTINE$1.$metadata$ = classMeta('$processMessageCOROUTINE$1', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $gameInfoCOROUTINE$2(_this__u8e3s4, message, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pl1_1 = _this__u8e3s4;
    this.ql1_1 = message;
  }
  $gameInfoCOROUTINE$2.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 16;
            this.pl1_1.lkd_1.plp(this.ql1_1.a1j_1.h1r_1);
            this.pl1_1.okd_1.ukl_1.qkp('Welcome ', null, null, 6, null);
            this.pl1_1.okd_1.ukl_1.al3(this.ql1_1.a1j_1.f1r_1, Colors_getInstance().l8k(this.ql1_1.a1j_1.g1r_1));
            println('PlayerId=' + this.ql1_1.a1j_1.e1r_1 + ' Game : ' + this.ql1_1.d1j_1 + ' (' + this.ql1_1.e1j_1 + ') ' + this.ql1_1.f1j_1);
            this.pl1_1.fkd_1.mii().qch(this.ql1_1.e1j_1 + ' - ' + this.ql1_1.f1j_1);
            this.pl1_1.rkd_1.o(this.ql1_1.k1j_1);
            ;
            var tmp_0 = this;
            tmp_0.rl1_1 = this.ql1_1.t1j_1;
            var tmp_1 = this;
            tmp_1.sl1_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.rl1_1, 10));
            var tmp0_iterator = this.rl1_1.j();
            while (tmp0_iterator.k()) {
              var item = tmp0_iterator.l();
              this.sl1_1.c(new RGBA(Colors_getInstance().l8k(item)));
            }

            this.pl1_1.vkd_1.o(this.sl1_1);
            ;
            this.pl1_1.xkd_1 = this.ql1_1.r1j_1;
            this.pl1_1.ykd_1 = this.ql1_1.s1j_1;
            this.pl1_1.hkd_1 = this.ql1_1.a1j_1;
            var tmp_2 = this;
            tmp_2.tl1_1 = this.pl1_1.ikd_1;
            var tmp_3 = this;
            tmp_3.ul1_1 = this.ql1_1.a1j_1.e1r_1;
            var tmp_4 = this;
            tmp_4.vl1_1 = this.ql1_1.a1j_1;
            this.tl1_1.a(this.ul1_1, this.vl1_1);
            ;
            var tmp_5 = this;
            tmp_5.wl1_1 = this.ql1_1.c1j_1;
            if (!this.wl1_1.p()) {
              this.pl1_1.okd_1.ukl_1.rkp('Players present :', null, 2, null);
              var tmp0_iterator_0 = this.ql1_1.c1j_1.j();
              while (tmp0_iterator_0.k()) {
                var player = tmp0_iterator_0.l();
                this.pl1_1.okd_1.ukl_1.al3('    #' + player.e1r_1 + ' ' + player.f1r_1, Colors_getInstance().l8k(player.g1r_1));
                var tmp5_set = this.pl1_1.ikd_1;
                var tmp6_set = player.e1r_1;
                tmp5_set.a(tmp6_set, player);
              }
            }

            if (isSpectator()) {
              this.pl1_1.okd_1.tkk();
            }

            var tmp1_iterator = this.ql1_1.i1j_1.j();
            while (tmp1_iterator.k()) {
              var area = tmp1_iterator.l();
              this.pl1_1.lkd_1.zl0_1.c(area);
            }

            var tmp2_iterator = this.ql1_1.j1j_1.j();
            while (tmp2_iterator.k()) {
              var point = tmp2_iterator.l();
              this.pl1_1.lkd_1.al1_1.c(point);
            }

            this.xl1_1 = this.ql1_1.h1j_1.j();
            this.o7_1 = 1;
            continue $sm;
          case 1:
            if (!this.xl1_1.k()) {
              this.o7_1 = 3;
              continue $sm;
            }

            this.yl1_1 = this.xl1_1.l();
            this.o7_1 = 2;
            var tmp_6 = get_resourcesVfs().c19(this.yl1_1.v1o_1);
            suspendResult = readBitmap$default(tmp_6, null, this, 1, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.zl1_1 = suspendResult;
            var tmp_7 = this;
            tmp_7.al2_1 = this.pl1_1.nkd_1;
            var tmp_8 = this;
            tmp_8.bl2_1 = this.yl1_1.u1o_1;
            var tmp_9 = this;
            tmp_9.cl2_1 = new BitmapGrid(this.zl1_1, this.yl1_1);
            this.al2_1.a(this.bl2_1, this.cl2_1);
            ;
            this.o7_1 = 1;
            continue $sm;
          case 3:
            var tmp_10 = this;
            tmp_10.dl2_1 = this.ql1_1.g1j_1;
            if (!isBlank(this.dl2_1)) {
              this.pl1_1.kkd_1.ckd(Colors_getInstance().l8k(this.ql1_1.g1j_1));
            }

            this.el2_1 = this.ql1_1.m1j_1.j();
            this.o7_1 = 4;
            continue $sm;
          case 4:
            if (!this.el2_1.k()) {
              this.o7_1 = 6;
              continue $sm;
            }

            this.fl2_1 = this.el2_1.l();
            this.o7_1 = 5;
            suspendResult = createGameObjectView(this.pl1_1, this.fl2_1, this.pl1_1.kkd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            ;
            this.o7_1 = 4;
            continue $sm;
          case 6:
            this.gl2_1 = this.ql1_1.o1j_1.j();
            this.o7_1 = 7;
            continue $sm;
          case 7:
            if (!this.gl2_1.k()) {
              this.o7_1 = 9;
              continue $sm;
            }

            this.hl2_1 = this.gl2_1.l();
            this.o7_1 = 8;
            suspendResult = createGameObjectView(this.pl1_1, this.hl2_1, this.pl1_1.mkd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            ;
            this.o7_1 = 7;
            continue $sm;
          case 9:
            this.il2_1 = this.ql1_1.n1j_1.j();
            this.o7_1 = 10;
            continue $sm;
          case 10:
            if (!this.il2_1.k()) {
              this.o7_1 = 12;
              continue $sm;
            }

            this.jl2_1 = this.il2_1.l();
            this.o7_1 = 11;
            suspendResult = createGameObjectView(this.pl1_1, this.jl2_1, this.pl1_1.lkd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            ;
            this.o7_1 = 10;
            continue $sm;
          case 12:
            this.pl1_1.tkd_1 = this.ql1_1.l1j_1;
            var tmp7_iterator = reversed(this.ql1_1.l1j_1).j();
            while (tmp7_iterator.k()) {
              var prototype = tmp7_iterator.l();
              this.pl1_1.jkd_1.qlp(prototype);
              var tmp8_iterator = prototype.b1o_1.j();
              while (tmp8_iterator.k()) {
                var objectName = tmp8_iterator.l();
                var tmp9_safe_receiver = this.pl1_1.lkd_1.rlp(objectName);
                if (tmp9_safe_receiver == null)
                  null;
                else {
                  tmp9_safe_receiver.slp(prototype);
                }
              }
            }

            var tmp10_iterator = this.ql1_1.q1j_1.j();
            while (tmp10_iterator.k()) {
              var button = tmp10_iterator.l();
              var tmp11_uiButton = this.pl1_1.kkd_1;
              var tmp12_uiButton = button.i1n_1;
              var tmp13_uiButton = get_UI_DEFAULT_WIDTH();
              var tmp14_uiButton = get_UI_DEFAULT_HEIGHT();
              var tmp0_apply = addTo(new UIButton(tmp13_uiButton, tmp14_uiButton, tmp12_uiButton, null), tmp11_uiButton);
              var tmp15_apply = tmp0_apply;
              tmp15_apply.w8w(button.k1n_1 - tmp15_apply.d72() / 2);
              tmp15_apply.o7c(button.l1n_1 - tmp15_apply.e72() / 2);
              tmp15_apply.si9_1.d54(GamesCupboardClient$gameInfo$lambda(button));
            }

            if ((new Storage(this.pl1_1.fkd_1.hgs_1)).ii3('FORGET') == null) {
              var tmp11_safe_receiver = (new Storage(this.pl1_1.fkd_1.hgs_1)).ii3('playerName');
              if (tmp11_safe_receiver == null)
                null;
              else {
                send_0(new RunCommand('name', listOf(tmp11_safe_receiver)));
              }
            }

            var tmp_11 = this.pl1_1;
            var tmp_12 = this;
            tmp_12.kl2_1 = new ScoreSheet(this.ql1_1.b1j_1, this.ql1_1.u1j_1);
            this.pl1_1.skd_1.rks(this.kl2_1);
            ;
            tmp_11.pkd_1 = this.kl2_1;
            var tmp_13 = this;
            tmp_13.ll2_1 = this.ql1_1.p1j_1;
            if (!isBlank(this.ll2_1)) {
              var tmp_14 = this.pl1_1;
              var tmp18_also = new Rules(this.ql1_1.p1j_1);
              this.pl1_1.skd_1.rks(tmp18_also);
              tmp_14.qkd_1 = tmp18_also;
            }

            this.pl1_1.lkd_1.ul3();
            this.p7_1 = 14;
            this.ml2_1 = this.pl1_1.mkd_1;
            this.nl2_1 = this.ql1_1.t1j_1;
            this.o7_1 = 13;
            var tmp_15 = get_resourcesVfs().c19('mouseHighlight.png');
            suspendResult = readBitmap$default(tmp_15, null, this, 1, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            var ARGUMENT = suspendResult;
            this.ml2_1.hkv(this.nl2_1, ARGUMENT);
            this.p7_1 = 16;
            this.o7_1 = 15;
            continue $sm;
          case 14:
            this.p7_1 = 16;
            var tmp_16 = this.r7_1;
            if (tmp_16 instanceof Exception) {
              var e = this.r7_1;
              println('Failed to load mouseHighlight image');
              this.o7_1 = 15;
              continue $sm;
            } else {
              throw this.r7_1;
            }

            break;
          case 15:
            this.p7_1 = 16;
            return Unit_getInstance();
          case 16:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 16) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $gameInfoCOROUTINE$2.$metadata$ = classMeta('$gameInfoCOROUTINE$2', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $resetGameCOROUTINE$3(_this__u8e3s4, message, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wl2_1 = _this__u8e3s4;
    this.xl2_1 = message;
  }
  $resetGameCOROUTINE$3.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 4;
            var tmp0_iterator = this.xl2_1.x1j_1.j();
            while (tmp0_iterator.k()) {
              var id = tmp0_iterator.l();
              var tmp1_safe_receiver = this.wl2_1.lkd_1.vl8(id);
              if (tmp1_safe_receiver == null)
                null;
              else {
                removeObject(this.wl2_1, tmp1_safe_receiver.ilb_1);
              }
            }

            this.yl2_1 = this.xl2_1.y1j_1.j();
            this.o7_1 = 1;
            continue $sm;
          case 1:
            if (!this.yl2_1.k()) {
              this.o7_1 = 3;
              continue $sm;
            }

            this.zl2_1 = this.yl2_1.l();
            this.o7_1 = 2;
            suspendResult = createGameObjectView(this.wl2_1, this.zl2_1, this.wl2_1.lkd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            ;
            this.o7_1 = 1;
            continue $sm;
          case 3:
            this.wl2_1.lkd_1.tlp();
            var tmp3_iterator = this.wl2_1.tkd_1.j();
            while (tmp3_iterator.k()) {
              var prototype = tmp3_iterator.l();
              var tmp4_iterator = prototype.b1o_1.j();
              while (tmp4_iterator.k()) {
                var objectName = tmp4_iterator.l();
                var tmp5_safe_receiver = this.wl2_1.lkd_1.rlp(objectName);
                if (tmp5_safe_receiver == null)
                  null;
                else {
                  tmp5_safe_receiver.slp(prototype);
                }
              }
            }

            this.wl2_1.lkd_1.ul3();
            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);
  };
  $resetGameCOROUTINE$3.$metadata$ = classMeta('$resetGameCOROUTINE$3', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $newGameObjectCOROUTINE$4(_this__u8e3s4, message, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cl7_1 = _this__u8e3s4;
    this.dl7_1 = message;
  }
  $newGameObjectCOROUTINE$4.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.el7_1 = this.dl7_1.l1k_1.j();
            this.o7_1 = 1;
            continue $sm;
          case 1:
            if (!this.el7_1.k()) {
              this.o7_1 = 3;
              continue $sm;
            }

            this.fl7_1 = this.el7_1.l();
            this.o7_1 = 2;
            suspendResult = createGameObjectView(this.cl7_1, this.fl7_1, this.cl7_1.lkd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            ;
            this.o7_1 = 1;
            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);
  };
  $newGameObjectCOROUTINE$4.$metadata$ = classMeta('$newGameObjectCOROUTINE$4', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $loadAndCacheBitmapCOROUTINE$5(_this__u8e3s4, path, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ol7_1 = _this__u8e3s4;
    this.pl7_1 = path;
  }
  $loadAndCacheBitmapCOROUTINE$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;
            var tmp_0 = get_resourcesVfs().c19(this.pl7_1);
            suspendResult = readBitmap$default(tmp_0, null, this, 1, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            var tmp0_set = this.ol7_1.zkd_1;
            tmp0_set.a(this.pl7_1, result);
            ;
            return result;
          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);
  };
  $loadAndCacheBitmapCOROUTINE$5.$metadata$ = classMeta('$loadAndCacheBitmapCOROUTINE$5', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $loadBitmapCOROUTINE$6(_this__u8e3s4, path, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.yl7_1 = _this__u8e3s4;
    this.zl7_1 = path;
  }
  $loadBitmapCOROUTINE$6.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.al8_1 = this.yl7_1.zkd_1.q(this.zl7_1);
            if (this.al8_1 == null) {
              this.o7_1 = 1;
              suspendResult = loadAndCacheBitmap(this.yl7_1, this.zl7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.bl8_1 = this.al8_1;
              this.o7_1 = 2;
              continue $sm;
            }

            break;
          case 1:
            this.bl8_1 = suspendResult;
            this.o7_1 = 2;
            continue $sm;
          case 2:
            return this.bl8_1;
          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);
  };
  $loadBitmapCOROUTINE$6.$metadata$ = classMeta('$loadBitmapCOROUTINE$6', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $createGameObjectViewCOROUTINE$7(_this__u8e3s4, gameObject, to, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kl8_1 = _this__u8e3s4;
    this.ll8_1 = gameObject;
    this.ml8_1 = to;
  }
  $createGameObjectViewCOROUTINE$7.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.nl8_1 = this.ll8_1;
            var tmp_0 = this.nl8_1;
            if (tmp_0 instanceof TextObject) {
              var tmp_1 = this;
              var tmp_2 = this;
              tmp_2.pl8_1 = new TextObjectView(this.ll8_1.c1n(), this.ll8_1.e1t_1, this.ll8_1.f1t_1, this.ll8_1.i1t_1);
              if (!(this.pl8_1.ulk_1 === 0)) {
                this.pl8_1.vlk(this.ll8_1.j1t_1);
              }
              tmp_1.ol8_1 = this.pl8_1;
              this.o7_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this.nl8_1;
              if (tmp_3 instanceof PieceAtPointCounter) {
                var tmp_4 = this;
                var tmp_5 = this.ll8_1.c1n();
                var tmp_6 = TextStyle_PLAIN_getInstance();
                var tov = TextObjectView_init_$Create$(tmp_5, '0', tmp_6, null, 8, null);
                var tmp1_set = this.kl8_1.lkd_1.cl1_1;
                var tmp2_set = this.ll8_1.a1r_1;
                tmp1_set.a(tmp2_set, tov);
                tmp_4.ol8_1 = tov;
                this.o7_1 = 2;
                continue $sm;
              } else {
                var tmp_7 = this.nl8_1;
                if (tmp_7 instanceof ImageObject) {
                  this.ql8_1 = this.ll8_1.c1n();
                  this.o7_1 = 1;
                  suspendResult = loadBitmap(this.kl8_1, this.ll8_1.v1p_1, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  var tmp_8 = this.nl8_1;
                  if (tmp_8 instanceof MultipleGridImageObject) {
                    var tmp_9 = this;
                    var grid = this.kl8_1.nkd_1.q(this.ll8_1.n1q_1.u1o_1);
                    var tmp_10;
                    if (grid == null) {
                      tmp_10 = null;
                    } else {
                      var images = ArrayList_init_$Create$();
                      var inductionVariable = this.ll8_1.q1q_1;
                      var last = this.ll8_1.r1q_1;
                      if (inductionVariable <= last)
                        do {
                          var y = inductionVariable;
                          inductionVariable = inductionVariable + 1 | 0;
                          var inductionVariable_0 = this.ll8_1.o1q_1;
                          var last_0 = this.ll8_1.p1q_1;
                          if (inductionVariable_0 <= last_0)
                            do {
                              var x = inductionVariable_0;
                              inductionVariable_0 = inductionVariable_0 + 1 | 0;
                              images.c(grid.r2u(x, y));
                            }
                             while (!(x === last_0));
                        }
                         while (!(y === last));
                      tmp_10 = new MultipleImageView(this.ll8_1.c1n(), images);
                    }
                    tmp_9.ol8_1 = tmp_10;
                    this.o7_1 = 2;
                    continue $sm;
                  } else {
                    var tmp_11 = this.nl8_1;
                    if (tmp_11 instanceof FlippableImageObject) {
                      var tmp_12 = this;
                      var tmp3_safe_receiver = this.kl8_1.nkd_1.q(this.ll8_1.j1o_1.u1o_1);
                      var tmp_13;
                      if (tmp3_safe_receiver == null) {
                        tmp_13 = null;
                      } else {
                        var tmp0_apply = new FlippableImageObjectView(this.ll8_1.c1n(), tmp3_safe_receiver.r2u(this.ll8_1.k1o_1, this.ll8_1.l1o_1), tmp3_safe_receiver.r2u(this.ll8_1.m1o_1, this.ll8_1.n1o_1), this.ll8_1.o1o_1);
                        if (this.ll8_1.g1l() === this.kl8_1.tl6().e1r_1) {
                          tmp0_apply.jle(true);
                        }
                        tmp_13 = tmp0_apply;
                      }
                      tmp_12.ol8_1 = tmp_13;
                      this.o7_1 = 2;
                      continue $sm;
                    } else {
                      var tmp_14 = this.nl8_1;
                      if (tmp_14 instanceof GridImageObject) {
                        var tmp_15 = this;
                        var tmp4_safe_receiver = this.kl8_1.nkd_1.q(this.ll8_1.j1p_1.u1o_1);
                        var tmp_16;
                        if (tmp4_safe_receiver == null) {
                          tmp_16 = null;
                        } else {
                          tmp_16 = new GridImageObjectView(this.ll8_1.c1n(), tmp4_safe_receiver.r2u(this.ll8_1.k1p_1, this.ll8_1.l1p_1));
                        }
                        tmp_15.ol8_1 = tmp_16;
                        this.o7_1 = 2;
                        continue $sm;
                      } else {
                        var tmp_17 = this.nl8_1;
                        if (tmp_17 instanceof Avatar) {
                          var tmp_18 = this;
                          var tmp5_safe_receiver = this.kl8_1.xkl(this.ll8_1.x1m_1);
                          var tmp_19;
                          if (tmp5_safe_receiver == null) {
                            tmp_19 = null;
                          } else {
                            var side = this.ll8_1.b1n_1;
                            if (!(this.kl8_1.xkd_1 === 0) ? side === 1 ? true : side === 3 : false)
                              side = 4 - side | 0;
                            if (!(this.kl8_1.ykd_1 === 0) ? side === 0 ? true : side === 2 : false)
                              side = 2 - side | 0;
                            tmp_19 = new AvatarView(this.ll8_1.c1n(), tmp5_safe_receiver, Colors_getInstance().l8k(tmp5_safe_receiver.g1r_1), side);
                          }
                          tmp_18.ol8_1 = tmp_19;
                          this.o7_1 = 2;
                          continue $sm;
                        } else {
                          var tmp_20 = this;
                          noWhenBranchMatchedException();
                        }
                      }
                    }
                  }
                }
              }
            }

            break;
          case 1:
            var ARGUMENT = suspendResult;
            var tmp3_apply = new ImageObjectView(this.ql8_1, ARGUMENT);
            if (this.ll8_1.d1q_1) {
              tmp3_apply.wlh_1 = true;
              tmp3_apply.ali(this.ll8_1.y1p_1);
            }

            tmp3_apply.ulp(this.ll8_1.w1p_1);
            tmp3_apply.vlp(this.ll8_1.x1p_1);
            ;
            this.ol8_1 = tmp3_apply;
            this.o7_1 = 2;
            continue $sm;
          case 2:
            var tmp6_elvis_lhs = this.ol8_1;
            var tmp_21;
            if (tmp6_elvis_lhs == null) {
              return null;
            } else {
              tmp_21 = tmp6_elvis_lhs;
            }

            var view = tmp_21;
            view.nlb_1 = this.ll8_1.g1l();
            var tmp_22;
            var tmp_23 = this.ll8_1;
            if (tmp_23 instanceof ImageObject) {
              tmp_22 = view instanceof ImageObjectView;
            } else {
              tmp_22 = false;
            }

            if (tmp_22) {
              view.ali(this.ll8_1.y1p_1);
            }

            var tmp4_isNotBlank = this.ll8_1.t2();
            if (!isBlank(tmp4_isNotBlank)) {
              view.jlb_1 = this.ll8_1.t2();
            }

            view.w8w(this.kl8_1.rl8(this.ll8_1.d1n()));
            view.o7c(this.kl8_1.yl8(this.ll8_1.e1n()));
            view.llb_1 = this.ll8_1.f1n();
            view.tch(this.ll8_1.g1l() == null ? true : this.ll8_1.g1l() === this.kl8_1.tl6().e1r_1);
            if (this.ml8_1 === this.kl8_1.lkd_1) {
              this.kl8_1.lkd_1.wlp(view);
              var tmp7_safe_receiver = this.kl8_1.lkd_1.tl8(view.d1n(), view.e1n());
              if (tmp7_safe_receiver == null)
                null;
              else {
                var tmp0_this = tmp7_safe_receiver;
                var tmp1 = tmp0_this.t1s_1;
                tmp0_this.t1s_1 = tmp1 + 1 | 0;
                this.kl8_1.lkd_1.ul8(tmp7_safe_receiver);
              }
            } else {
              this.ml8_1.shz(view);
            }

            if (view instanceof AvatarView) {
              this.kl8_1.lkd_1.ul3();
            }

            return view;
          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);
  };
  $createGameObjectViewCOROUTINE$7.$metadata$ = classMeta('$createGameObjectViewCOROUTINE$7', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $dragObjectCOROUTINE$8(_this__u8e3s4, message, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.sle_1 = _this__u8e3s4;
    this.tle_1 = message;
  }
  $dragObjectCOROUTINE$8.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.ule_1 = this.sle_1.lkd_1.vl8(this.tle_1.y1k_1);
            if (this.ule_1 == null) {
              this.vle_1 = null;
              this.o7_1 = 2;
              continue $sm;
            } else {
              this.sle_1.lkd_1.wl8(this.tle_1.y1k_1);
              var tmp_0;
              if (this.tle_1.b1l_1) {
                var tmp_1 = this.ule_1;
                tmp_0 = tmp_1 instanceof FlippableImageObjectView;
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                this.ule_1.jle(false);
              }
              this.wle_1 = this.sle_1.xl8(this.tle_1.z1k_1);
              this.xle_1 = this.sle_1.yl8(this.tle_1.a1l_1);
              this.yle_1 = this.sle_1.rl8(this.ule_1.d1n());
              this.zle_1 = this.sle_1.sl8(this.ule_1.e1n());
              var tmp0_safe_receiver = this.sle_1.lkd_1.tl8(this.yle_1, this.zle_1);
              if (tmp0_safe_receiver == null)
                null;
              else {
                var tmp0_this = tmp0_safe_receiver;
                var tmp1 = tmp0_this.t1s_1;
                tmp0_this.t1s_1 = tmp1 - 1 | 0;
                this.sle_1.lkd_1.ul8(tmp0_safe_receiver);
              }
              this.ule_1.egh(0.7);
              this.o7_1 = 1;
              var tmp_2 = this;
              tmp_2.alf_1 = x$factory_2(this.ule_1);
              var tmp_3 = this;
              tmp_3.blf_1 = this.wle_1;
              var tmp_4 = this.alf_1.get();
              var tmp_5 = _interpolate$ref_5();
              var tmp_6 = V2_init_$Create$(this.alf_1, tmp_4, this.blf_1, tmp_5, false, null, null, null, 224, null);
              var tmp_7 = this;
              tmp_7.clf_1 = y$factory_0(this.ule_1);
              var tmp_8 = this;
              tmp_8.dlf_1 = this.xle_1;
              var tmp_9 = this.clf_1.get();
              var tmp_10 = _interpolate$ref_6();
              var tmp_11 = [tmp_6, V2_init_$Create$(this.clf_1, tmp_9, this.dlf_1, tmp_10, false, null, null, null, 224, null)];
              var tmp_12 = this;
              tmp_12.elf_1 = get_moveMessageInterval();
              var tmp_13 = Companion_getInstance_0().o1h(this.elf_1.cf());
              suspendResult = tween$default(this.ule_1, tmp_11, tmp_13, null, null, false, false, null, this, 124, null);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

            break;
          case 1:
            this.ule_1.klb_1 = true;
            var tmp_14 = this;
            var tmp1_safe_receiver = this.sle_1.lkd_1.tl8(this.tle_1.z1k_1, this.tle_1.a1l_1);
            var tmp_15;
            if (tmp1_safe_receiver == null) {
              tmp_15 = null;
            } else {
              var tmp0_this_0 = tmp1_safe_receiver;
              var tmp1_0 = tmp0_this_0.t1s_1;
              tmp0_this_0.t1s_1 = tmp1_0 + 1 | 0;
              this.sle_1.lkd_1.ul8(tmp1_safe_receiver);
              tmp_15 = Unit_getInstance();
            }

            tmp_14.vle_1 = tmp_15;
            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);
  };
  $dragObjectCOROUTINE$8.$metadata$ = classMeta('$dragObjectCOROUTINE$8', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $addBinCOROUTINE$9(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.blo_1 = _this__u8e3s4;
  }
  $addBinCOROUTINE$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;
            var tmp_0 = get_resourcesVfs().c19('bin.png');
            suspendResult = readBitmap$default(tmp_0, null, this, 1, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            var tmp0_apply = new BinView(-1000, ARGUMENT);
            tmp0_apply.w8w(get_playingAreaWidth() / 2.0);
            tmp0_apply.o7c(get_playingAreaHeight() / 2.0);
            tmp0_apply.llb_1 = true;
            var gov = tmp0_apply;
            this.blo_1.lkd_1.xlp(gov);
            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);
  };
  $addBinCOROUTINE$9.$metadata$ = classMeta('$addBinCOROUTINE$9', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function GamesCupboardClient(theStage, session) {
    this.fkd_1 = theStage;
    this.gkd_1 = session;
    this.hkd_1 = null;
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$0 = LinkedHashMap_init_$Create$();
    tmp.ikd_1 = tmp$ret$0;
    this.jkd_1 = new Toolbar(this.fkd_1.d72(), get_toolbarHeight());
    this.kkd_1 = new BackgroundArea(get_playingAreaWidth(), get_playingAreaHeight());
    this.lkd_1 = new PlayingArea(get_playingAreaWidth(), get_playingAreaHeight());
    this.mkd_1 = new ForegroundArea(get_playingAreaWidth(), get_playingAreaHeight());
    var tmp_0 = this;
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$1 = LinkedHashMap_init_$Create$();
    tmp_0.nkd_1 = tmp$ret$1;
    this.okd_1 = new ChatLog();
    this.pkd_1 = null;
    this.qkd_1 = null;
    var tmp_1 = this;
    var tmp$ret$2;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$2 = ArrayList_init_$Create$();
    tmp_1.rkd_1 = tmp$ret$2;
    this.skd_1 = new Dock(get_dockWidth(), this.fkd_1.e72() - this.jkd_1.e72(), listOf(this.okd_1));
    this.tkd_1 = emptyList();
    this.ukd_1 = new HelpArea();
    var tmp_2 = this;
    var tmp$ret$3;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$3 = ArrayList_init_$Create$();
    tmp_2.vkd_1 = tmp$ret$3;
    this.wkd_1 = sorted(listOf_0(['bye', 'yes', 'no', 'go', 'lol']));
    this.xkd_1 = 0;
    this.ykd_1 = 0;
    var tmp$ret$11;
    // Inline function 'kotlin.with' call
    var tmp0_with = this.fkd_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$10;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.<anonymous>' call
    tmp0_with.shz(this.kkd_1);
    tmp0_with.shz(this.lkd_1);
    tmp0_with.shz(this.mkd_1);
    var tmp_3 = this.ukd_1;
    tmp0_with.shz(tmp_3 instanceof HelpArea ? tmp_3 : THROW_CCE());
    tmp0_with.shz(this.jkd_1);
    var tmp$ret$9;
    // Inline function 'kotlin.apply' call
    var tmp$ret$8;
    // Inline function 'com.soywiz.korge.view.roundRect' call
    var tmp0_roundRect = get_playingAreaHeight() + 10 | 0;
    var tmp1_roundRect = get_outsideColor();
    var tmp2_roundRect = Colors_getInstance().s7z_1;
    var tmp$ret$7;
    // Inline function 'com.soywiz.korge.view.roundRect' call
    var tmp1_roundRect_0 = 500.0;
    var tmp2_roundRect_0 = tmp0_roundRect;
    var tmp3_roundRect = 0.0;
    var tmp4_roundRect = 0.0;
    var tmp$ret$6;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new RoundRect(tmp1_roundRect_0, tmp2_roundRect_0, tmp3_roundRect, tmp4_roundRect, new RGBA(tmp1_roundRect), new RGBA(tmp2_roundRect), 0.0, true);
    var tmp$ret$5;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, tmp0_with);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$4;
    // Inline function 'com.soywiz.korge.view.roundRect.<anonymous>' call
    tmp$ret$4 = Unit_getInstance();
    tmp$ret$5 = tmp0_apply;
    tmp$ret$6 = tmp$ret$5;
    tmp$ret$7 = tmp$ret$6;
    tmp$ret$8 = tmp$ret$7;
    var tmp3_apply = tmp$ret$8;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.<anonymous>.<anonymous>' call
    alignLeftToRightOf$default(tmp3_apply, this.lkd_1, 0.0, 2, null);
    tmp3_apply.o7c(this.jkd_1.e72());
    tmp$ret$9 = tmp3_apply;
    tmp0_with.shz(this.skd_1);
    onStageResized$default(tmp0_with, false, GamesCupboardClient$lambda(this), 1, null);
    var tmp_4 = get_keys(tmp0_with instanceof View ? tmp0_with : THROW_CCE());
    tmp$ret$10 = tmp_4.sgo(GamesCupboardClient$slambda_0(this, null));
    tmp$ret$11 = tmp$ret$10;
    var tmp$ret$12;
    // Inline function 'kotlin.with' call
    var tmp1_with = this.jkd_1;
    // Inline function 'kotlin.contracts.contract' call
    tmp1_with.gl1();
    tmp$ret$12 = Unit_getInstance();
    var tmp$ret$14;
    // Inline function 'kotlin.with' call
    var tmp2_with = this.lkd_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$13;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.<anonymous>' call
    tmp$ret$13 = alignTopToBottomOf$default(tmp2_with, this.jkd_1, 0.0, 2, null);
    tmp$ret$14 = tmp$ret$13;
    var tmp$ret$16;
    // Inline function 'kotlin.with' call
    var tmp3_with = this.kkd_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$15;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.<anonymous>' call
    tmp$ret$15 = alignTopToBottomOf$default(tmp3_with, this.jkd_1, 0.0, 2, null);
    tmp$ret$16 = tmp$ret$15;
    var tmp$ret$18;
    // Inline function 'kotlin.with' call
    var tmp4_with = this.mkd_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$17;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.<anonymous>' call
    tmp$ret$17 = alignTopToBottomOf$default(tmp4_with, this.jkd_1, 0.0, 2, null);
    tmp$ret$18 = tmp$ret$17;
    var tmp$ret$19;
    // Inline function 'kotlin.with' call
    var tmp5_with = this.skd_1;
    // Inline function 'kotlin.contracts.contract' call
    tmp5_with.w8w(this.fkd_1.qha() - this.skd_1.d72());
    tmp5_with.o7c(this.jkd_1.e72());
    tmp$ret$19 = Unit_getInstance();
    var tmp_5 = this;
    var tmp$ret$20;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$20 = LinkedHashMap_init_$Create$();
    tmp_5.zkd_1 = tmp$ret$20;
  }
  GamesCupboardClient.prototype.tl6 = function () {
    return ensureNotNull(this.hkd_1);
  };
  GamesCupboardClient.prototype.wkk = function () {
    var tmp$ret$5;
    // Inline function 'kotlin.collections.map' call
    var tmp$ret$2;
    // Inline function 'kotlin.collections.filter' call
    var tmp0_filter = this.ikd_1.lh();
    var tmp$ret$1;
    // Inline function 'kotlin.collections.filterTo' call
    var tmp0_filterTo = ArrayList_init_$Create$();
    var tmp0_iterator = tmp0_filter.j();
    while (tmp0_iterator.k()) {
      var element = tmp0_iterator.l();
      var tmp$ret$0;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.<get-otherPlayerNames>.<anonymous>' call
      tmp$ret$0 = !(element.e1r_1 === this.tl6().e1r_1) ? !element.h1r_1 : false;
      if (tmp$ret$0) {
        tmp0_filterTo.c(element);
      }
    }
    tmp$ret$1 = tmp0_filterTo;
    tmp$ret$2 = tmp$ret$1;
    var tmp1_map = tmp$ret$2;
    var tmp$ret$4;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
    var tmp0_iterator_0 = tmp1_map.j();
    while (tmp0_iterator_0.k()) {
      var item = tmp0_iterator_0.l();
      var tmp$ret$3;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.<get-otherPlayerNames>.<anonymous>' call
      tmp$ret$3 = item.f1r_1;
      tmp0_mapTo.c(tmp$ret$3);
    }
    tmp$ret$4 = tmp0_mapTo;
    tmp$ret$5 = tmp$ret$4;
    return tmp$ret$5;
  };
  GamesCupboardClient.prototype.rln = function () {
    return this.jkd_1.cky_1;
  };
  GamesCupboardClient.prototype.ylp = function () {
    return this.lkd_1;
  };
  GamesCupboardClient.prototype.b7t = function () {
    return this.rkd_1;
  };
  GamesCupboardClient.prototype.zlp = function () {
    return this.skd_1;
  };
  GamesCupboardClient.prototype.alq = function () {
    return this.ukd_1;
  };
  GamesCupboardClient.prototype.blq = function () {
    return this.wkd_1;
  };
  GamesCupboardClient.prototype.rl8 = function (x) {
    return this.xkd_1 === 0 ? x : imul(this.xkd_1, 2) - x;
  };
  GamesCupboardClient.prototype.xl8 = function (x) {
    return this.xkd_1 === 0 ? x : imul(this.xkd_1, 2) - x | 0;
  };
  GamesCupboardClient.prototype.sl8 = function (y) {
    return this.ykd_1 === 0 ? y : imul(this.ykd_1, 2) - y;
  };
  GamesCupboardClient.prototype.yl8 = function (y) {
    return this.ykd_1 === 0 ? y : imul(this.ykd_1, 2) - y | 0;
  };
  GamesCupboardClient.prototype.xkl = function (id) {
    return this.ikd_1.q(id);
  };
  GamesCupboardClient.prototype.vkk = function (name) {
    var tmp$ret$1;
    // Inline function 'kotlin.text.lowercase' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = name;
    tmp$ret$1 = tmp$ret$0.toLowerCase();
    var lower = tmp$ret$1;
    var tmp$ret$5;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_firstOrNull = this.ikd_1.lh();
      var tmp0_iterator = tmp0_firstOrNull.j();
      while (tmp0_iterator.k()) {
        var element = tmp0_iterator.l();
        var tmp$ret$4;
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.GamesCupboardClient.findPlayer.<anonymous>' call
        var tmp$ret$3;
        // Inline function 'kotlin.text.lowercase' call
        var tmp0_lowercase = element.f1r_1;
        var tmp$ret$2;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$2 = tmp0_lowercase;
        tmp$ret$3 = tmp$ret$2.toLowerCase();
        tmp$ret$4 = tmp$ret$3 === lower;
        if (tmp$ret$4) {
          tmp$ret$5 = element;
          break $l$block;
        }
      }
      tmp$ret$5 = null;
    }
    var tmp0_safe_receiver = tmp$ret$5;
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$6;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      return tmp0_safe_receiver;
    }
    if (startsWith$default(name, '#', false, 2, null)) {
      var tmp$ret$8;
      // Inline function 'kotlin.text.substring' call
      var tmp$ret$7;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$7 = name;
      tmp$ret$8 = tmp$ret$7.substring(1);
      var tmp1_safe_receiver = toIntOrNull(tmp$ret$8);
      if (tmp1_safe_receiver == null)
        null;
      else {
        var tmp$ret$9;
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        return this.ikd_1.q(tmp1_safe_receiver);
      }
    }
    return null;
  };
  GamesCupboardClient.prototype.clq = function ($cont) {
    var tmp = new $listenCOROUTINE$0(this, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  GamesCupboardClient.prototype.clp = function (message, $cont) {
    var tmp = new $processMessageCOROUTINE$1(this, message, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  GamesCupboardClient.prototype.dlq = function (id) {
    return this.vkd_1.m(id % this.vkd_1.i() | 0).n8k_1;
  };
  GamesCupboardClient.$metadata$ = classMeta('GamesCupboardClient');
  function x$factory_1($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_2($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 IHelpArea() {
  }
  IHelpArea.$metadata$ = interfaceMeta('IHelpArea');
  function HelpArea$addButton$lambda($action) {
    return function (it) {
      $action();
      return Unit_getInstance();
    };
  }
  function HelpArea() {
    Container.call(this);
    this.mls_1 = 10.0;
    this.nls_1 = 10.0;
    this.ols_1 = 10.0;
    this.pls_1 = 2.0;
    this.qls_1 = 2.0;
    this.rls_1 = this.nls_1;
    this.sls_1 = this.ols_1;
    this.w8w(this.pls_1);
    this.o7c(get_toolbarHeight() + this.qls_1);
  }
  HelpArea.prototype.x7 = function () {
    this.rhz();
    this.rls_1 = this.nls_1;
    this.sls_1 = this.ols_1;
    this.tch(false);
  };
  HelpArea.prototype.tkk = function () {
    var tmp = get_playingAreaWidth() - this.pls_1 * 2;
    var tmp_0 = this.e72() + this.ols_1 * 2;
    var tmp_1 = new RGBA(get_helpBackground());
    this.zhz(RoundRect_init_$Create$(tmp, tmp_0, 10.0, 0.0, tmp_1, null, 0.0, false, 232, null), 0);
    this.tch(true);
    get_gamesCupboardClient().skd_1.sks(false);
  };
  HelpArea.prototype.skk = function (label) {
    if (!(this.rls_1 === this.nls_1)) {
      this.rls_1 = this.nls_1;
      var tmp0_this = this;
      tmp0_this.sls_1 = tmp0_this.sls_1 + (last(this.bhl_1).e72() + this.mls_1);
    }
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.text' call
    var tmp0_text = Companion_getInstance_2().lib_1;
    var tmp1_text = Colors_getInstance().s7z_1;
    var tmp2_text = get_DefaultTtfFont();
    var tmp3_text = Companion_getInstance_3().i8s_1;
    var tmp4_text = get_DefaultStringTextRenderer();
    var tmp5_text = Companion_getInstance_2().mib_1;
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new Text_0(label, tmp0_text, tmp1_text, tmp2_text, tmp3_text, tmp4_text, tmp5_text, null, null);
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.HelpArea.addLabel.<anonymous>' call
    tmp0_apply.w8w(this.rls_1);
    tmp0_apply.o7c(this.sls_1);
    this.rls_1 = this.nls_1;
    var tmp0_this_0 = this;
    tmp0_this_0.sls_1 = tmp0_this_0.sls_1 + (tmp0_apply.e72() + this.mls_1);
    tmp$ret$0 = tmp0_apply;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
  };
  HelpArea.prototype.ukk = function (label, action) {
    var minWidth = 100.0;
    var padding = 10.0;
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.ui.uiButton' call
    var tmp0_uiButton = get_UI_DEFAULT_HEIGHT();
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(new UIButton(minWidth, tmp0_uiButton, label, null), this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.HelpArea.addButton.<anonymous>' call
    var tmp = tmp0_apply.bhl_1.m(1);
    var textView = tmp instanceof Text_0 ? tmp : THROW_CCE();
    textView.gck(label);
    if (textView.d72() + padding * 2 > minWidth) {
      tmp0_apply.cav(tmp0_apply.bhl_1.m(1).d72() + padding * 2);
    }
    tmp0_apply.o7c(this.sls_1);
    tmp0_apply.w8w(this.rls_1);
    var tmp0_this = this;
    tmp0_this.rls_1 = tmp0_this.rls_1 + (tmp0_apply.d72() + this.mls_1);
    if (this.rls_1 > get_playingAreaWidth()) {
      tmp0_apply.w8w(this.nls_1);
      tmp0_apply.o7c(this.sls_1 + tmp0_apply.e72() + this.mls_1);
      this.rls_1 = tmp0_apply.d1n() + tmp0_apply.d72() + this.mls_1;
      this.sls_1 = tmp0_apply.e1n();
    }
    tmp0_apply.si9_1.j54(HelpArea$addButton$lambda(action));
    tmp$ret$0 = tmp0_apply;
    tmp$ret$1 = tmp$ret$0;
  };
  HelpArea.$metadata$ = classMeta('HelpArea', [IHelpArea], undefined, undefined, undefined, Container.prototype);
  function DragData(startX, startY, gameObjectView, offsetX, offsetY, fromArea, fromPoint) {
    this.tls_1 = startX;
    this.uls_1 = startY;
    this.vls_1 = gameObjectView;
    this.wls_1 = offsetX;
    this.xls_1 = offsetY;
    this.yls_1 = fromArea;
    this.zls_1 = fromPoint;
    this.alt_1 = false;
  }
  DragData.prototype.blt = function () {
    return this.vls_1;
  };
  DragData.prototype.clt = function () {
    return this.yls_1;
  };
  DragData.prototype.dlt = function () {
    return this.zls_1;
  };
  DragData.prototype.elt = function () {
    return this.alt_1;
  };
  DragData.prototype.toString = function () {
    return 'DragData(startX=' + this.tls_1 + ', startY=' + this.uls_1 + ', gameObjectView=' + this.vls_1 + ', offsetX=' + this.wls_1 + ', offsetY=' + this.xls_1 + ', fromArea=' + this.yls_1 + ', fromPoint=' + this.zls_1 + ')';
  };
  DragData.prototype.hashCode = function () {
    var result = getNumberHashCode(this.tls_1);
    result = imul(result, 31) + getNumberHashCode(this.uls_1) | 0;
    result = imul(result, 31) + hashCode(this.vls_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.wls_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.xls_1) | 0;
    result = imul(result, 31) + (this.yls_1 == null ? 0 : this.yls_1.hashCode()) | 0;
    result = imul(result, 31) + (this.zls_1 == null ? 0 : this.zls_1.hashCode()) | 0;
    return result;
  };
  DragData.prototype.equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DragData))
      return false;
    var tmp0_other_with_cast = other instanceof DragData ? other : THROW_CCE();
    if (!equals(this.tls_1, tmp0_other_with_cast.tls_1))
      return false;
    if (!equals(this.uls_1, tmp0_other_with_cast.uls_1))
      return false;
    if (!equals(this.vls_1, tmp0_other_with_cast.vls_1))
      return false;
    if (!equals(this.wls_1, tmp0_other_with_cast.wls_1))
      return false;
    if (!equals(this.xls_1, tmp0_other_with_cast.xls_1))
      return false;
    if (!equals(this.yls_1, tmp0_other_with_cast.yls_1))
      return false;
    if (!equals(this.zls_1, tmp0_other_with_cast.zls_1))
      return false;
    return true;
  };
  DragData.$metadata$ = classMeta('DragData');
  function get_moveMessageInterval() {
    return moveMessageInterval;
  }
  var moveMessageInterval;
  function get_highlightPeriod() {
    return highlightPeriod;
  }
  var highlightPeriod;
  function get_highlightScale() {
    return highlightScale;
  }
  var highlightScale;
  function findClickable($this, point) {
    var inductionVariable = $this.tl0_1.i() - 1 | 0;
    if (0 <= inductionVariable)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + -1 | 0;
        var gov = $this.tl0_1.m(i);
        if (((!gov.klb_1 ? gov.llb_1 ? true : gov.mlb_1 : false) ? gov.nlb_1 == null ? true : gov.nlb_1 === localPlayerId() : false) ? gov.flt(point) : false) {
          return gov;
        }
      }
       while (0 <= inductionVariable);
    return null;
  }
  function snapToSpecialPoints($this, gov) {
    var tmp0_safe_receiver = $this.tl8(gov.d1n(), gov.e1n());
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      gov.w8w(tmp0_safe_receiver.o1s_1);
      gov.o7c(tmp0_safe_receiver.p1s_1);
      tmp$ret$0 = Unit_getInstance();
    }
  }
  function snapToGrid($this, gov, area) {
    if (area == null)
      return Unit_getInstance();
    var tmp0_safe_receiver = area.b1s_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var snapped = tmp0_safe_receiver.k1r(numberToInt(gov.d1n() - area.x1r_1), numberToInt(gov.e1n() - area.y1r_1));
      gov.w8w(area.x1r_1 + snapped.d_1);
      gov.o7c(area.y1r_1 + snapped.e_1);
      tmp$ret$0 = Unit_getInstance();
    }
  }
  function isHighlightKey($this, e) {
    var tmp;
    if (e.gc6_1.equals(Key_LEFT_CONTROL_getInstance()) ? true : e.gc6_1.equals(Key_RIGHT_CONTROL_getInstance())) {
      var tmp0_safe_receiver = $this.pgs();
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_uiFocusManager(tmp0_safe_receiver);
      var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lii_1;
      tmp = !(tmp_0 instanceof TextInputController);
    } else {
      tmp = false;
    }
    return tmp;
  }
  function onKeyDown_1($this, e) {
    var tmp0_safe_receiver = $this.xl0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vls_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp;
      var tmp_0;
      if (tmp1_safe_receiver instanceof ImageObjectView) {
        tmp_0 = tmp1_safe_receiver.wlh_1;
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        if (e.gc6_1.equals(Key_MINUS_getInstance())) {
          send_0(new ScaleObject(tmp1_safe_receiver.ilb_1, tmp1_safe_receiver.glt(0.8888888888888888)));
        }
        var tmp_1;
        if (e.gc6_1.equals(Key_PLUS_getInstance()) ? true : e.gc6_1.equals(Key_EQUAL_getInstance())) {
          send_0(new ScaleObject(tmp1_safe_receiver.ilb_1, tmp1_safe_receiver.glt(1.125)));
          tmp_1 = Unit_getInstance();
        }
        tmp = tmp_1;
      }
      tmp$ret$0 = tmp;
    }
    if (!$this.dl1_1 ? isHighlightKey($this, e) : false) {
      $this.dl1_1 = true;
      var tmp_2 = get_gamesCupboardClient().fkd_1.hgs_1;
      var point = $this.ji1(tmp_2, null, 2, null);
      localAndSend(new HighlightMouse(localPlayerId(), get_gamesCupboardClient().xl8(numberToInt(point.y72_1)), get_gamesCupboardClient().yl8(numberToInt(point.z72_1)), true));
    }
  }
  function onKeyUp($this, e) {
    if ($this.dl1_1 ? isHighlightKey($this, e) : false) {
      $this.dl1_1 = false;
      localAndSend(new HighlightMouse(localPlayerId(), 0, 0, false));
    }
  }
  function onDoubleClick($this, e) {
    var point = e.gh1();
    if (e.ih1().lcc()) {
      var tmp0_safe_receiver = findClickable($this, point);
      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.hlt($this);
        tmp$ret$0 = Unit_getInstance();
      }
    }
  }
  function onMouseDown($this, e) {
    var point = e.gh1();
    var tmp;
    if (e.ih1().lcc()) {
      tmp = true;
    } else {
      var tmp0_safe_receiver = e.zge_1;
      tmp = equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jc4_1, Type_DRAG_getInstance());
    }
    if (tmp) {
      var tmp1_safe_receiver = findClickable($this, point);
      if (tmp1_safe_receiver == null)
        null;
      else {
        var tmp$ret$1;
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        var tmp_0;
        if (tmp1_safe_receiver instanceof ImageObjectView) {
          tmp_0 = tmp1_safe_receiver.wlh_1;
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          var tmp$ret$0;
          // Inline function 'kotlin.with' call
          var tmp0_with = get_gamesCupboardClient().ukd_1;
          // Inline function 'kotlin.contracts.contract' call
          tmp0_with.x7();
          tmp0_with.skk('Press PLUS or MINUS while dragging to change the size');
          tmp0_with.skk('Use command :bin for a waste bin to tidy up decorations');
          tmp0_with.tkk();
          tmp$ret$0 = Unit_getInstance();
        }
        $this.el1_1 = new Long(0, 0);
        $this.xl0_1 = new DragData(tmp1_safe_receiver.d1n(), tmp1_safe_receiver.e1n(), tmp1_safe_receiver, point.y72_1 - tmp1_safe_receiver.d1n(), point.z72_1 - tmp1_safe_receiver.e1n(), $this.plb(get_gamesCupboardClient().rl8(tmp1_safe_receiver.d1n()), get_gamesCupboardClient().sl8(tmp1_safe_receiver.e1n())), $this.tl8(get_gamesCupboardClient().rl8(tmp1_safe_receiver.d1n()), get_gamesCupboardClient().sl8(tmp1_safe_receiver.e1n())));
        tmp$ret$1 = Unit_getInstance();
      }
    }
  }
  function onMouseMove($this, e) {
    var point = e.gh1();
    if ($this.dl1_1) {
      localAndSend(new HighlightMouse(localPlayerId(), get_gamesCupboardClient().xl8(numberToInt(point.y72_1)), get_gamesCupboardClient().yl8(numberToInt(point.z72_1)), null));
    }
    var dragData = $this.xl0_1;
    if (dragData == null) {
      var gov = findClickable($this, point);
      if (!equals(gov, $this.yl0_1)) {
        $this.yl0_1 = gov;
        var tmp0_safe_receiver = gov;
        if (tmp0_safe_receiver == null)
          null;
        else {
          tmp0_safe_receiver.pln();
        }
      }
    } else {
      var gov_0 = dragData.vls_1;
      var tmp$ret$0;
      // Inline function 'kotlin.math.abs' call
      var tmp0_abs = gov_0.d1n() - point.y72_1;
      tmp$ret$0 = Math.abs(tmp0_abs);
      var dx = tmp$ret$0;
      var tmp$ret$1;
      // Inline function 'kotlin.math.abs' call
      var tmp1_abs = gov_0.e1n() - point.z72_1;
      tmp$ret$1 = Math.abs(tmp1_abs);
      var dy = tmp$ret$1;
      if ((dragData.alt_1 ? true : dx > 5.0) ? true : dy > 5.0) {
        dragData.alt_1 = true;
        var newArea = $this.plb(get_gamesCupboardClient().rl8(point.y72_1), get_gamesCupboardClient().sl8(point.z72_1));
        gov_0.w8w(clamp(point.y72_1 - dragData.wls_1, 0.0, $this.d72()));
        gov_0.o7c(clamp(point.z72_1 - dragData.xls_1, 0.0, $this.e72()));
        snapToSpecialPoints($this, gov_0);
        snapToGrid($this, gov_0, newArea);
        if (gov_0.nlb_1 == null ? isPrivate(newArea) : false) {
          localAndSend(new ChangePrivacy(gov_0.ilb_1, localPlayerId()));
        } else if (!(gov_0.nlb_1 == null) ? isPublicOrNull(newArea) : false) {
          localAndSend(new ChangePrivacy(gov_0.ilb_1, null));
        }
        var tmp;
        var tmp_0;
        var tmp_1;
        var tmp_2;
        if (gov_0 instanceof FlippableImageObjectView) {
          tmp_2 = gov_0.ile_1;
        } else {
          tmp_2 = false;
        }
        if (tmp_2) {
          tmp_1 = isPrivate(dragData.yls_1);
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp_0 = isPublic(newArea);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          var tmp1_safe_receiver = newArea;
          tmp = (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d1s_1) === true;
        } else {
          tmp = false;
        }
        if (tmp) {
          gov_0.ejp(get_warnCardWillBeVisible());
        } else {
          gov_0.ejp(Colors_getInstance().s7z_1);
        }
        var tmp3_safe_receiver = $this.bl1_1;
        if (tmp3_safe_receiver == null) {
        } else {
          var tmp_3;
          var tmp2_safe_receiver = $this.bl1_1;
          if ((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.flt(e.eh1())) === true) {
            tmp_3 = get_binHighlight();
          } else {
            tmp_3 = Colors_getInstance().s7z_1;
          }
          tmp3_safe_receiver.ejp(tmp_3);
        }
        var now = _DateTime___get_unixMillisLong__impl__sdx9bd(Companion_getInstance_4().d1h());
        if (now.x1($this.el1_1.v8(new Long(100, 0))) > 0) {
          var tmp_4;
          var tmp4_safe_receiver = dragData.yls_1;
          if (equals(tmp4_safe_receiver == null ? null : tmp4_safe_receiver.w1r_1, AreaType_PRIVATE_getInstance())) {
            var tmp5_safe_receiver = newArea;
            tmp_4 = !equals(tmp5_safe_receiver == null ? null : tmp5_safe_receiver.w1r_1, AreaType_PRIVATE_getInstance());
          } else {
            tmp_4 = false;
          }
          var forceFaceDown = tmp_4;
          send_0(DragObject_init_$Create$(gov_0.ilb_1, get_gamesCupboardClient().rl8(gov_0.d1n()), get_gamesCupboardClient().sl8(gov_0.e1n()), forceFaceDown));
          $this.el1_1 = now;
        }
      }
    }
  }
  function onMouseUp($this, e) {
    var tmp0_safe_receiver = $this.xl0_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$4;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      get_gamesCupboardClient().ukd_1.x7();
      var tmp;
      if (tmp0_safe_receiver.alt_1) {
        var gov = tmp0_safe_receiver.vls_1;
        gov.ejp(Colors_getInstance().s7z_1);
        gov.ni0(gov.ilt());
        var newSpecialArea = $this.plb(get_gamesCupboardClient().rl8(gov.sjz().y72_1), get_gamesCupboardClient().sl8(gov.sjz().z72_1));
        var newSpecialPoint = $this.tl8(get_gamesCupboardClient().rl8(gov.d1n()), get_gamesCupboardClient().sl8(gov.e1n()));
        if (gov instanceof FlippableImageObjectView) {
          if (isPrivate(newSpecialArea)) {
            gov.jle(true);
          }
          if ((isPrivate(tmp0_safe_receiver.yls_1) ? isPublic(newSpecialArea) : false) ? gov.ile_1 : false) {
            send_0(new FaceUpOrDown(gov.ilb_1, gov.ile_1));
          }
          if (isPrivate(tmp0_safe_receiver.yls_1) ? newSpecialArea == null : false) {
            gov.jle(false);
          }
          var tmp0_safe_receiver_0 = newSpecialPoint;
          var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.q1s_1;
          if (tmp1_safe_receiver == null)
            null;
          else {
            var tmp$ret$0;
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            var tmp_0;
            if (!(gov.ile_1 === tmp1_safe_receiver)) {
              gov.jle(tmp1_safe_receiver);
              send_0(new FaceUpOrDown(gov.ilb_1, gov.ile_1));
              tmp_0 = Unit_getInstance();
            }
            tmp$ret$0 = tmp_0;
          }
        }
        var tmp2_safe_receiver = tmp0_safe_receiver.zls_1;
        if (tmp2_safe_receiver == null)
          null;
        else {
          var tmp$ret$1;
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          var tmp0_this = tmp2_safe_receiver;
          var tmp1 = tmp0_this.t1s_1;
          tmp0_this.t1s_1 = tmp1 - 1 | 0;
          $this.ul8(tmp2_safe_receiver);
          tmp$ret$1 = Unit_getInstance();
        }
        var tmp3_safe_receiver = newSpecialPoint;
        if (tmp3_safe_receiver == null)
          null;
        else {
          var tmp$ret$2;
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          var tmp0_this_0 = tmp3_safe_receiver;
          var tmp1_0 = tmp0_this_0.t1s_1;
          tmp0_this_0.t1s_1 = tmp1_0 + 1 | 0;
          $this.ul8(tmp3_safe_receiver);
          tmp$ret$2 = Unit_getInstance();
        }
        var tmp4_safe_receiver = newSpecialPoint;
        var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.r1s_1;
        var pointZChange = tmp5_elvis_lhs == null ? ChangeZOrder_NO_CHANGE_getInstance() : tmp5_elvis_lhs;
        if (!pointZChange.equals(ChangeZOrder_NO_CHANGE_getInstance())) {
          $this.zl8(gov, pointZChange);
          send_0(gov.jlt(pointZChange));
        } else {
          var tmp6_safe_receiver = newSpecialArea;
          var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.c1s_1;
          var areaZChange = tmp7_elvis_lhs == null ? ChangeZOrder_NO_CHANGE_getInstance() : tmp7_elvis_lhs;
          if (!areaZChange.equals(ChangeZOrder_NO_CHANGE_getInstance())) {
            $this.zl8(gov, areaZChange);
            send_0(gov.jlt(areaZChange));
          }
        }
        var tmp8_safe_receiver = $this.bl1_1;
        if (tmp8_safe_receiver == null)
          null;
        else {
          var tmp$ret$3;
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          tmp8_safe_receiver.ejp(Colors_getInstance().s7z_1);
          var tmp_1;
          if (!(gov === tmp8_safe_receiver) ? tmp8_safe_receiver.flt(e.eh1()) : false) {
            var tmp_2;
            var tmp_3;
            if (!isInterface(gov, RegenGameObject)) {
              tmp_3 = true;
            } else {
              tmp_3 = !gov.t1o();
            }
            if (tmp_3) {
              localAndSend(new RemoveObjects(listOf(gov.ilb_1), true));
              tmp_2 = Unit_getInstance();
            }
            tmp_1 = tmp_2;
          }
          tmp$ret$3 = tmp_1;
        }
        tmp = Unit_getInstance();
      }
      tmp$ret$4 = tmp;
    }
    $this.xl0_1 = null;
  }
  function PlayingArea$begin$lambda(this$0) {
    return function (it) {
      onMouseDown(this$0, it);
      return Unit_getInstance();
    };
  }
  function PlayingArea$begin$lambda_0(this$0) {
    return function (it) {
      onDoubleClick(this$0, it);
      return Unit_getInstance();
    };
  }
  function PlayingArea$begin$lambda_1(this$0) {
    return function (it) {
      onMouseUp(this$0, it);
      return Unit_getInstance();
    };
  }
  function PlayingArea$begin$lambda_2(this$0) {
    return function (it) {
      onMouseMove(this$0, it);
      return Unit_getInstance();
    };
  }
  function PlayingArea$begin$slambda(this$0, resultContinuation) {
    this.slt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  PlayingArea$begin$slambda.prototype.ngm = function (it, $cont) {
    var tmp = this.ogm(it, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  PlayingArea$begin$slambda.prototype.w7 = function (p1, $cont) {
    return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
  };
  PlayingArea$begin$slambda.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        if (tmp === 0) {
          this.p7_1 = 1;
          onKeyDown_1(this.slt_1, this.tlt_1);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.r7_1;
        }
      } catch ($p) {
        throw $p;
      }
     while (true);
  };
  PlayingArea$begin$slambda.prototype.ogm = function (it, completion) {
    var i = new PlayingArea$begin$slambda(this.slt_1, completion);
    i.tlt_1 = it;
    return i;
  };
  PlayingArea$begin$slambda.$metadata$ = classMeta('PlayingArea$begin$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function PlayingArea$begin$slambda_0(this$0, resultContinuation) {
    var i = new PlayingArea$begin$slambda(this$0, resultContinuation);
    var l = function (it, $cont) {
      return i.ngm(it, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function PlayingArea$begin$slambda_1(this$0, resultContinuation) {
    this.clu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  PlayingArea$begin$slambda_1.prototype.ngm = function (it, $cont) {
    var tmp = this.ogm(it, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  PlayingArea$begin$slambda_1.prototype.w7 = function (p1, $cont) {
    return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
  };
  PlayingArea$begin$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;
          onKeyUp(this.clu_1, this.dlu_1);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.r7_1;
        }
      } catch ($p) {
        throw $p;
      }
     while (true);
  };
  PlayingArea$begin$slambda_1.prototype.ogm = function (it, completion) {
    var i = new PlayingArea$begin$slambda_1(this.clu_1, completion);
    i.dlu_1 = it;
    return i;
  };
  PlayingArea$begin$slambda_1.$metadata$ = classMeta('PlayingArea$begin$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function PlayingArea$begin$slambda_2(this$0, resultContinuation) {
    var i = new PlayingArea$begin$slambda_1(this$0, resultContinuation);
    var l = function (it, $cont) {
      return i.ngm(it, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function PlayingArea(width, height) {
    ClipContainer.call(this, width, height);
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$0 = ArrayList_init_$Create$();
    tmp.tl0_1 = tmp$ret$0;
    var tmp_0 = this;
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$1 = LinkedHashMap_init_$Create$();
    tmp_0.ul0_1 = tmp$ret$1;
    var tmp_1 = this;
    var tmp$ret$2;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$2 = LinkedHashMap_init_$Create$();
    tmp_1.vl0_1 = tmp$ret$2;
    var tmp_2 = this;
    var tmp$ret$3;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$3 = LinkedHashMap_init_$Create$();
    tmp_2.wl0_1 = tmp$ret$3;
    this.xl0_1 = null;
    this.yl0_1 = null;
    var tmp_3 = this;
    var tmp$ret$4;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$4 = ArrayList_init_$Create$();
    tmp_3.zl0_1 = tmp$ret$4;
    var tmp_4 = this;
    var tmp$ret$5;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$5 = ArrayList_init_$Create$();
    tmp_4.al1_1 = tmp$ret$5;
    this.bl1_1 = null;
    var tmp_5 = this;
    var tmp$ret$6;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$6 = LinkedHashMap_init_$Create$();
    tmp_5.cl1_1 = tmp$ret$6;
    this.dl1_1 = false;
    this.el1_1 = new Long(0, 0);
  }
  PlayingArea.prototype.plp = function (isSpectator) {
    if (!isSpectator) {
      var tmp$ret$1;
      // Inline function 'kotlin.with' call
      var tmp0_with = get_mouse(this);
      // Inline function 'kotlin.contracts.contract' call
      var tmp$ret$0;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.PlayingArea.begin.<anonymous>' call
      tmp0_with.ngd_1.j54(PlayingArea$begin$lambda(this));
      doubleClick(tmp0_with, PlayingArea$begin$lambda_0(this));
      tmp0_with.ugd_1.j54(PlayingArea$begin$lambda_1(this));
      tmp$ret$0 = tmp0_with.wgd_1.j54(PlayingArea$begin$lambda_2(this));
      tmp$ret$1 = tmp$ret$0;
      var tmp = get_keys(this);
      tmp.sgo(PlayingArea$begin$slambda_0(this, null));
      var tmp_0 = get_keys(this);
      tmp_0.tgo(PlayingArea$begin$slambda_2(this, null));
    }
  };
  PlayingArea.prototype.xlp = function (gameObjectView) {
    this.wlp(gameObjectView);
    this.bl1_1 = gameObjectView;
  };
  PlayingArea.prototype.wlp = function (gameObject) {
    addTo(gameObject, this);
    // Inline function 'kotlin.collections.set' call
    var tmp0_set = this.ul0_1;
    var tmp1_set = gameObject.ilb_1;
    tmp0_set.a(tmp1_set, gameObject);
    this.tl0_1.c(gameObject);
    if (gameObject instanceof AvatarView) {
      // Inline function 'kotlin.collections.set' call
      var tmp2_set = this.wl0_1;
      var tmp3_set = gameObject.ll6_1.e1r_1;
      var tmp4_set = gameObject;
      tmp2_set.a(tmp3_set, tmp4_set);
    }
    var tmp$ret$0;
    // Inline function 'kotlin.text.isNotBlank' call
    var tmp5_isNotBlank = gameObject.jlb_1;
    tmp$ret$0 = !isBlank(tmp5_isNotBlank);
    if (tmp$ret$0) {
      // Inline function 'kotlin.collections.set' call
      var tmp6_set = this.vl0_1;
      var tmp7_set = gameObject.jlb_1;
      tmp6_set.a(tmp7_set, gameObject);
    }
  };
  PlayingArea.prototype.v4p = function (gameObjectId) {
    var tmp0_elvis_lhs = this.ul0_1.y4(gameObjectId);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return null;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var gov = tmp;
    this.tl0_1.c5(gov);
    this.vl0_1.y4(gov.jlb_1);
    this.ai0(gov);
    if (gov instanceof AvatarView) {
      this.wl0_1.y4(gov.ll6_1.e1r_1);
    }
    return gov;
  };
  PlayingArea.prototype.tlp = function () {
    var tmp0_iterator = this.wl0_1.lh().j();
    while (tmp0_iterator.k()) {
      var a = tmp0_iterator.l();
      a.fi2();
      this.wlp(a);
    }
  };
  PlayingArea.prototype.vl8 = function (id) {
    return this.ul0_1.q(id);
  };
  PlayingArea.prototype.rlp = function (name) {
    return this.vl0_1.q(name);
  };
  PlayingArea.prototype.vl3 = function (playerId) {
    return this.wl0_1.q(playerId);
  };
  PlayingArea.prototype.plb = function (x, y) {
    var tmp0_iterator = this.zl0_1.j();
    while (tmp0_iterator.k()) {
      var area = tmp0_iterator.l();
      if (area.h1s(numberToInt(x), numberToInt(y))) {
        return area;
      }
    }
    return null;
  };
  PlayingArea.prototype.tl8 = function (x, y) {
    var tmp0_iterator = this.al1_1.j();
    while (tmp0_iterator.k()) {
      var specialPoint = tmp0_iterator.l();
      if (specialPoint.h1s(numberToInt(x), numberToInt(y))) {
        return specialPoint;
      }
    }
    return null;
  };
  PlayingArea.prototype.ul3 = function () {
    var tmp0_iterator = this.wl0_1.lh().j();
    while (tmp0_iterator.k()) {
      var avatar = tmp0_iterator.l();
      avatar.flf(0);
    }
    var tmp1_iterator = this.zl0_1.j();
    while (tmp1_iterator.k()) {
      var area = tmp1_iterator.l();
      if (area.w1r_1.equals(AreaType_PRIVATE_getInstance())) {
        var tmp2_iterator = this.tl0_1.j();
        while (tmp2_iterator.k()) {
          var piece = tmp2_iterator.l();
          var tmp3_safe_receiver = piece.nlb_1;
          if (tmp3_safe_receiver == null)
            null;
          else {
            var tmp$ret$3;
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            var tmp$ret$2;
            // Inline function 'uk.co.nickthecoder.gamescupboard.client.PlayingArea.updatePrivatePieceCounts.<anonymous>' call
            var tmp0_safe_receiver = this.vl3(tmp3_safe_receiver);
            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 'uk.co.nickthecoder.gamescupboard.client.PlayingArea.updatePrivatePieceCounts.<anonymous>.<anonymous>' call
              var tmp0_this = tmp0_safe_receiver;
              var tmp1 = tmp0_this.rl6_1;
              tmp0_this.flf(tmp1 + 1 | 0);
              tmp$ret$0 = tmp1;
              tmp$ret$1 = tmp$ret$0;
              tmp = tmp$ret$1;
            }
            tmp$ret$2 = tmp;
            tmp$ret$3 = tmp$ret$2;
          }
        }
      }
    }
  };
  PlayingArea.prototype.ul8 = function (specialPoint) {
    var tmp0_safe_receiver = this.cl1_1.q(specialPoint.n1s_1);
    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.gck(specialPoint.t1s_1.toString());
      tmp$ret$0 = Unit_getInstance();
    }
  };
  PlayingArea.prototype.wl8 = function (id) {
    var tmp0_safe_receiver = this.xl0_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp;
      if (tmp0_safe_receiver.vls_1.ilb_1 === id) {
        tmp0_safe_receiver.vls_1.ejp(Colors_getInstance().s7z_1);
        this.xl0_1 = null;
        playSound_0(get_CANCEL_DRAG());
        tmp = Unit_getInstance();
      }
      tmp$ret$0 = tmp;
    }
  };
  PlayingArea.prototype.fl1 = function () {
    var tmp0_safe_receiver = this.xl0_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var gov = tmp0_safe_receiver.vls_1;
      gov.w8w(tmp0_safe_receiver.tls_1);
      gov.o7c(tmp0_safe_receiver.uls_1);
      send_0(gov.elu());
      gov.ejp(Colors_getInstance().s7z_1);
      this.xl0_1 = null;
      tmp$ret$0 = Unit_getInstance();
    }
  };
  PlayingArea.prototype.zl8 = function (gov, z) {
    var tmp0_subject = z;
    var tmp0 = tmp0_subject.q2_1;
    switch (tmp0) {
      case 2:
        this.tl0_1.c5(gov);
        ;
        this.tl0_1.c(gov);
        ;
        gov.fi2();
        this.shz(gov);
        ;
        break;
      case 0:
        this.tl0_1.c5(gov);
        ;
        this.tl0_1.tg(0, gov);
        gov.fi2();
        this.zhz(gov, 0);
        ;
        break;
      case 1:
        ;
        break;
    }
  };
  PlayingArea.$metadata$ = classMeta('PlayingArea', undefined, undefined, undefined, undefined, ClipContainer.prototype);
  function PrintContainer_init_$Init$(myWidth, myHeight, paddingLeft, paddingRight, paddingTop, font, textSize, defaultColor, $mask0, $marker, $this) {
    if (!(($mask0 & 4) === 0))
      paddingLeft = 0.0;
    if (!(($mask0 & 8) === 0))
      paddingRight = paddingLeft;
    if (!(($mask0 & 16) === 0))
      paddingTop = paddingRight;
    if (!(($mask0 & 32) === 0))
      font = get_DefaultTtfFont();
    if (!(($mask0 & 64) === 0))
      textSize = Companion_getInstance_2().lib_1;
    if (!(($mask0 & 128) === 0))
      defaultColor = get_textColor();
    PrintContainer.call($this, myWidth, myHeight, paddingLeft, paddingRight, paddingTop, font, textSize, defaultColor);
    return $this;
  }
  function PrintContainer_init_$Create$(myWidth, myHeight, paddingLeft, paddingRight, paddingTop, font, textSize, defaultColor, $mask0, $marker) {
    return PrintContainer_init_$Init$(myWidth, myHeight, paddingLeft, paddingRight, paddingTop, font, textSize, defaultColor, $mask0, $marker, Object.create(PrintContainer.prototype));
  }
  function createText($this, str) {
    var tmp0_font = $this.jkp_1;
    var tmp1_textSize = $this.kkp_1;
    var tmp2_color = $this.pkp_1;
    return Text_init_$Create$(str, tmp1_textSize, tmp2_color, tmp0_font, null, null, false, null, null, 496, null);
  }
  function tryToFit($this, firstPart, remainder, clickAction) {
    var tmp$ret$12;
    // Inline function 'kotlin.with' call
    var tmp0_with = $this.xil_1;
    // Inline function 'kotlin.contracts.contract' call
    var text = createText($this, firstPart);
    if (!(clickAction == null)) {
      var tmp$ret$3;
      // Inline function 'com.soywiz.korge.input.onClick' call
      var tmp0_onClick = PrintContainer$tryToFit$slambda_0(clickAction, null);
      var tmp$ret$2;
      // Inline function 'com.soywiz.korge.input.doMouseEvent' call
      var tmp0_doMouseEvent = click$factory();
      var tmp0_safe_receiver = text;
      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(PrintContainer$tryToFit$lambda(tmp1_safe_receiver, tmp0_onClick));
        tmp$ret$1 = tmp$ret$0;
      }
      tmp$ret$2 = text;
      tmp$ret$3 = tmp$ret$2;
      set_cursor(tmp0_with, Cursor_HAND_getInstance());
    }
    if (text.d72() + $this.nkp_1 > $this.fkp_1 - $this.hkp_1) {
      var space = lastIndexOf$default(firstPart, ' ', 0, false, 6, null);
      if (space < 0) {
        if ($this.nkp_1 === $this.gkp_1) {
          position(text, $this.nkp_1, $this.okp_1);
          tmp0_with.shz(text);
          $this.nkp_1 = $this.gkp_1;
          var tmp0_this = $this;
          tmp0_this.okp_1 = tmp0_this.okp_1 + text.e72();
        } else {
          $this.nkp_1 = $this.gkp_1;
          var tmp1_this = $this;
          tmp1_this.okp_1 = tmp1_this.okp_1 + text.e72();
          var tmp$ret$4;
          // Inline function 'kotlin.text.trimStart' call
          tmp$ret$4 = toString(trimStart(isCharSequence(firstPart) ? firstPart : THROW_CCE()));
          var tmp_0 = tmp$ret$4 + ' ';
          var tmp$ret$5;
          // Inline function 'kotlin.text.trimStart' call
          tmp$ret$5 = toString(trimStart(isCharSequence(remainder) ? remainder : THROW_CCE()));
          tryToFit($this, tmp_0 + tmp$ret$5, '', clickAction);
          return Unit_getInstance();
        }
      } else {
        var tmp$ret$7;
        // Inline function 'kotlin.text.substring' call
        var tmp$ret$6;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$6 = firstPart;
        tmp$ret$7 = tmp$ret$6.substring(space);
        var tmp_1 = tmp$ret$7 + ' ';
        var tmp$ret$8;
        // Inline function 'kotlin.text.trimStart' call
        tmp$ret$8 = toString(trimStart(isCharSequence(remainder) ? remainder : THROW_CCE()));
        var newRemainder = tmp_1 + tmp$ret$8;
        tryToFit($this, substr(firstPart, 0, space), newRemainder, clickAction);
        return Unit_getInstance();
      }
    } else {
      position(text, $this.nkp_1, $this.okp_1);
      var tmp2_this = $this;
      tmp2_this.nkp_1 = tmp2_this.nkp_1 + text.d72();
      var tmp$ret$9;
      // Inline function 'kotlin.text.isNotBlank' call
      var tmp1_isNotBlank = text.u67();
      tmp$ret$9 = !isBlank(tmp1_isNotBlank);
      if (tmp$ret$9) {
        tmp0_with.shz(text);
      }
    }
    var tmp_2;
    var tmp$ret$10;
    // Inline function 'kotlin.text.isNotBlank' call
    tmp$ret$10 = !isBlank(remainder);
    if (tmp$ret$10) {
      $this.nkp_1 = $this.gkp_1;
      var tmp3_this = $this;
      tmp3_this.okp_1 = tmp3_this.okp_1 + text.e72();
      var tmp$ret$11;
      // Inline function 'kotlin.text.trimStart' call
      tmp$ret$11 = toString(trimStart(isCharSequence(remainder) ? remainder : THROW_CCE()));
      tryToFit($this, tmp$ret$11, '', clickAction);
      tmp_2 = Unit_getInstance();
    }
    tmp$ret$12 = tmp_2;
  }
  function tryToFit$default($this, firstPart, remainder, clickAction, $mask0, $handler) {
    if (!(($mask0 & 8) === 0))
      clickAction = null;
    return tryToFit($this, firstPart, remainder, clickAction);
  }
  function PrintContainer$tryToFit$slambda($clickAction, resultContinuation) {
    this.nlu_1 = $clickAction;
    CoroutineImpl.call(this, resultContinuation);
  }
  PrintContainer$tryToFit$slambda.prototype.kgt = function (it, $cont) {
    var tmp = this.lgt(it, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  PrintContainer$tryToFit$slambda.prototype.w7 = function (p1, $cont) {
    return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
  };
  PrintContainer$tryToFit$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.nlu_1();
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.r7_1;
        }
      } catch ($p) {
        throw $p;
      }
     while (true);
  };
  PrintContainer$tryToFit$slambda.prototype.lgt = function (it, completion) {
    var i = new PrintContainer$tryToFit$slambda(this.nlu_1, completion);
    i.olu_1 = it;
    return i;
  };
  PrintContainer$tryToFit$slambda.$metadata$ = classMeta('PrintContainer$tryToFit$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function PrintContainer$tryToFit$slambda_0($clickAction, resultContinuation) {
    var i = new PrintContainer$tryToFit$slambda($clickAction, resultContinuation);
    var l = function (it, $cont) {
      return i.kgt(it, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function PrintContainer$tryToFit$lambda$slambda($tmp0_onClick, $it, resultContinuation) {
    this.xlu_1 = $tmp0_onClick;
    this.ylu_1 = $it;
    CoroutineImpl.call(this, resultContinuation);
  }
  PrintContainer$tryToFit$lambda$slambda.prototype.z56 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  PrintContainer$tryToFit$lambda$slambda.prototype.to = function ($cont) {
    return this.z56($cont);
  };
  PrintContainer$tryToFit$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.xlu_1(this.ylu_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);
  };
  PrintContainer$tryToFit$lambda$slambda.prototype.k53 = function (completion) {
    var i = new PrintContainer$tryToFit$lambda$slambda(this.xlu_1, this.ylu_1, completion);
    return i;
  };
  PrintContainer$tryToFit$lambda$slambda.$metadata$ = classMeta('PrintContainer$tryToFit$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function PrintContainer$tryToFit$lambda$slambda_0($tmp0_onClick, $it, resultContinuation) {
    var i = new PrintContainer$tryToFit$lambda$slambda($tmp0_onClick, $it, resultContinuation);
    var l = function ($cont) {
      return i.z56($cont);
    };
    l.$arity = 0;
    return l;
  }
  function PrintContainer$tryToFit$lambda($tmp1_safe_receiver, $tmp0_onClick) {
    return function (it) {
      var tmp = $tmp1_safe_receiver.b1u();
      launchImmediately(tmp, PrintContainer$tryToFit$lambda$slambda_0($tmp0_onClick, it, null));
      return Unit_getInstance();
    };
  }
  function PrintContainer(myWidth, myHeight, paddingLeft, paddingRight, paddingTop, font, textSize, defaultColor) {
    UIScrollable.call(this, myWidth, myHeight);
    this.fkp_1 = myWidth;
    this.gkp_1 = paddingLeft;
    this.hkp_1 = paddingRight;
    this.ikp_1 = paddingTop;
    this.jkp_1 = font;
    this.kkp_1 = textSize;
    this.lkp_1 = defaultColor;
    this.mkp_1 = createText(this, 'X').e72();
    this.nkp_1 = this.gkp_1;
    this.okp_1 = this.ikp_1;
    this.pkp_1 = this.lkp_1;
  }
  PrintContainer.prototype.zlu = function (str, color, clickAction) {
    this.pkp_1 = color;
    tryToFit(this, str, '', clickAction);
    this.pin(1.0);
    this.nin(0.0);
  };
  PrintContainer.prototype.qkp = function (str, color, clickAction, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      color = this.lkp_1;
    if (!(($mask0 & 4) === 0))
      clickAction = null;
    return this.zlu(str, color, clickAction);
  };
  PrintContainer.prototype.gj = function () {
    this.nkp_1 = this.gkp_1;
    var tmp0_this = this;
    tmp0_this.okp_1 = tmp0_this.okp_1 + this.mkp_1;
    this.pin(1.0);
    this.nin(0.0);
  };
  PrintContainer.prototype.al3 = function (str, color) {
    this.pkp_1 = color;
    var tmp$ret$0;
    // Inline function 'kotlin.text.isNotBlank' call
    tmp$ret$0 = !isBlank(str);
    if (tmp$ret$0) {
      tryToFit$default(this, str, '', null, 8, null);
      this.pin(1.0);
      this.nin(0.0);
    }
    this.nkp_1 = this.gkp_1;
    var tmp0_this = this;
    tmp0_this.okp_1 = tmp0_this.okp_1 + this.mkp_1;
  };
  PrintContainer.prototype.rkp = function (str, color, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      color = this.lkp_1;
    return this.al3(str, color);
  };
  PrintContainer.$metadata$ = classMeta('PrintContainer', undefined, undefined, undefined, undefined, UIScrollable.prototype);
  function click$factory() {
    return getPropertyCallableRef('click', 1, KProperty1, function (receiver) {
      return receiver.kgd_1;
    }, null);
  }
  function RulesStyle(prefix, suffix, color) {
    this.alv_1 = prefix;
    this.blv_1 = suffix;
    this.clv_1 = color;
  }
  RulesStyle.$metadata$ = classMeta('RulesStyle');
  function HyperlinkStyle_init_$Init$(separator, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      separator = '|';
    HyperlinkStyle.call($this, separator);
    return $this;
  }
  function HyperlinkStyle_init_$Create$(separator, $mask0, $marker) {
    return HyperlinkStyle_init_$Init$(separator, $mask0, $marker, Object.create(HyperlinkStyle.prototype));
  }
  function HyperlinkStyle(separator) {
    RulesStyle.call(this, '[', ']', get_hyperlinks());
    this.glv_1 = separator;
  }
  HyperlinkStyle.$metadata$ = classMeta('HyperlinkStyle', undefined, undefined, undefined, undefined, RulesStyle.prototype);
  function _init_$styledPrint(printContainer, str, style, action) {
    if (style == null) {
      printContainer.qkp(str, null, null, 6, null);
    } else {
      printContainer.zlu(str, style.clv_1, action);
    }
  }
  function _init_$styledPrint$default(printContainer, str, style, action, $mask0, $handler) {
    if (!(($mask0 & 8) === 0))
      action = null;
    return _init_$styledPrint(printContainer, str, style, action);
  }
  function _init_$processRemainder(styles, printContainer, str, initialStyle) {
    if (isBlank(str))
      return initialStyle;
    if (initialStyle == null) {
      var lowestIndex = IntCompanionObject_getInstance().o1_1;
      var foundStyle = null;
      var tmp0_iterator = styles.j();
      while (tmp0_iterator.k()) {
        var style = tmp0_iterator.l();
        var i = indexOf$default(str, style.alv_1, 0, false, 6, null);
        if (i >= 0 ? i < lowestIndex : false) {
          lowestIndex = i;
          foundStyle = style;
        }
      }
      if (!(foundStyle == null) ? !(lowestIndex === IntCompanionObject_getInstance().o1_1) : false) {
        var tmp$ret$1;
        // Inline function 'kotlin.text.substring' call
        var tmp0_substring = lowestIndex;
        var tmp$ret$0;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$0 = str;
        tmp$ret$1 = tmp$ret$0.substring(0, tmp0_substring);
        var tmp = tmp$ret$1;
        _init_$styledPrint$default(printContainer, tmp, null, null, 8, null);
        var tmp_0 = foundStyle.blv_1;
        var tmp_1 = lowestIndex + foundStyle.alv_1.length | 0;
        var endIndex = indexOf$default(str, tmp_0, tmp_1, false, 4, null);
        if (endIndex >= 0) {
          if (foundStyle instanceof HyperlinkStyle) {
            var tmp_2 = foundStyle.glv_1;
            var tmp_3 = lowestIndex + foundStyle.alv_1.length | 0;
            var sepIndex = indexOf$default(str, tmp_2, tmp_3, false, 4, null);
            if (sepIndex < 0) {
              var tmp$ret$3;
              // Inline function 'kotlin.text.substring' call
              var tmp1_substring = lowestIndex + foundStyle.alv_1.length | 0;
              var tmp$ret$2;
              // Inline function 'kotlin.js.asDynamic' call
              tmp$ret$2 = str;
              tmp$ret$3 = tmp$ret$2.substring(tmp1_substring, endIndex);
              var linkText = tmp$ret$3;
              var tmp_4 = foundStyle;
              _init_$styledPrint(printContainer, linkText, tmp_4, Rules$processRemainder$lambda(linkText));
            } else {
              var tmp$ret$5;
              // Inline function 'kotlin.text.substring' call
              var tmp2_substring = lowestIndex + foundStyle.alv_1.length | 0;
              var tmp$ret$4;
              // Inline function 'kotlin.js.asDynamic' call
              tmp$ret$4 = str;
              tmp$ret$5 = tmp$ret$4.substring(tmp2_substring, sepIndex);
              var linkText_0 = tmp$ret$5;
              var tmp$ret$7;
              // Inline function 'kotlin.text.substring' call
              var tmp3_substring = sepIndex + foundStyle.glv_1.length | 0;
              var tmp$ret$6;
              // Inline function 'kotlin.js.asDynamic' call
              tmp$ret$6 = str;
              tmp$ret$7 = tmp$ret$6.substring(tmp3_substring, endIndex);
              var url = tmp$ret$7;
              var tmp_5 = foundStyle;
              _init_$styledPrint(printContainer, linkText_0, tmp_5, Rules$processRemainder$lambda_0(url));
            }
          } else {
            var tmp$ret$9;
            // Inline function 'kotlin.text.substring' call
            var tmp4_substring = lowestIndex + foundStyle.alv_1.length | 0;
            var tmp$ret$8;
            // Inline function 'kotlin.js.asDynamic' call
            tmp$ret$8 = str;
            tmp$ret$9 = tmp$ret$8.substring(tmp4_substring, endIndex);
            var tmp_6 = tmp$ret$9;
            var tmp_7 = foundStyle;
            _init_$styledPrint$default(printContainer, tmp_6, tmp_7, null, 8, null);
          }
          var tmp$ret$11;
          // Inline function 'kotlin.text.substring' call
          var tmp5_substring = endIndex + foundStyle.blv_1.length | 0;
          var tmp$ret$10;
          // Inline function 'kotlin.js.asDynamic' call
          tmp$ret$10 = str;
          tmp$ret$11 = tmp$ret$10.substring(tmp5_substring);
          return _init_$processRemainder(styles, printContainer, tmp$ret$11, null);
        } else {
          var tmp$ret$13;
          // Inline function 'kotlin.text.substring' call
          var tmp6_substring = lowestIndex + foundStyle.alv_1.length | 0;
          var tmp$ret$12;
          // Inline function 'kotlin.js.asDynamic' call
          tmp$ret$12 = str;
          tmp$ret$13 = tmp$ret$12.substring(tmp6_substring);
          var tmp_8 = tmp$ret$13;
          var tmp_9 = foundStyle;
          _init_$styledPrint$default(printContainer, tmp_8, tmp_9, null, 8, null);
          return null;
        }
      } else {
        _init_$styledPrint$default(printContainer, str, null, null, 8, null);
        return null;
      }
    } else {
      var closeIndex = indexOf$default(str, initialStyle.blv_1, 0, false, 6, null);
      if (closeIndex >= 0) {
        var tmp$ret$15;
        // Inline function 'kotlin.text.substring' call
        var tmp$ret$14;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$14 = str;
        tmp$ret$15 = tmp$ret$14.substring(0, closeIndex);
        var tmp_10 = tmp$ret$15;
        _init_$styledPrint$default(printContainer, tmp_10, initialStyle, null, 8, null);
        var tmp$ret$17;
        // Inline function 'kotlin.text.substring' call
        var tmp7_substring = closeIndex + initialStyle.blv_1.length | 0;
        var tmp$ret$16;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$16 = str;
        tmp$ret$17 = tmp$ret$16.substring(tmp7_substring);
        return _init_$processRemainder(styles, printContainer, tmp$ret$17, null);
      } else {
        _init_$styledPrint$default(printContainer, str, initialStyle, null, 8, null);
        return initialStyle;
      }
    }
  }
  function Rules$processRemainder$lambda($linkText) {
    return function () {
      FollowLink_getInstance().hlv($linkText);
      return Unit_getInstance();
    };
  }
  function Rules$processRemainder$lambda_0($url) {
    return function () {
      FollowLink_getInstance().hlv($url);
      return Unit_getInstance();
    };
  }
  function Rules(str) {
    TextButtonDockable.call(this, 'Rules');
    var tmp = this;
    var tmp$ret$4;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = new ClipContainer(400.0, get_dockHeight());
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.Rules.panel.<anonymous>' call
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.solidRect' call
    var tmp0_solidRect = tmp0_apply.d72();
    var tmp1_solidRect = tmp0_apply.e72();
    var tmp2_solidRect = get_dockableColor();
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new SolidRect(tmp0_solidRect, tmp1_solidRect, tmp2_solidRect);
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = addTo(tmp0_addTo, tmp0_apply);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.solidRect.<anonymous>' call
    tmp$ret$0 = Unit_getInstance();
    tmp$ret$1 = tmp0_apply_0;
    tmp$ret$2 = tmp$ret$1;
    tmp$ret$3 = tmp$ret$2;
    tmp$ret$4 = tmp0_apply;
    tmp.mlv_1 = tmp$ret$4;
    var tmp_0 = new RulesStyle('`', '`', get_boldText());
    var tmp_1 = new RulesStyle('_', '_', get_underscoreText());
    var styles = listOf_0([tmp_0, tmp_1, HyperlinkStyle_init_$Create$(null, 1, null)]);
    var tmp$ret$5;
    // Inline function 'kotlin.apply' call
    var tmp0_myWidth = this.mlv_1.d72();
    var tmp1_myHeight = this.mlv_1.e72() - 20;
    var tmp0_apply_1 = PrintContainer_init_$Create$(tmp0_myWidth, tmp1_myHeight, 20.0, 0.0, 10.0, null, 0.0, null, 232, null);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.Rules.<anonymous>' call
    tmp0_apply_1.kim_1 = Colors_getInstance().y7z_1;
    tmp$ret$5 = tmp0_apply_1;
    var printContainer = tmp$ret$5;
    this.mlv_1.shz(printContainer);
    var lines = split$default(str, ['\n'], false, 0, 6, null);
    var trailingStyle = null;
    var tmp2_iterator = lines.j();
    while (tmp2_iterator.k()) {
      var line = tmp2_iterator.l();
      if (isBlank(line)) {
        printContainer.gj();
        printContainer.gj();
      } else {
        trailingStyle = _init_$processRemainder(styles, printContainer, line, trailingStyle);
        printContainer.qkp(' ', null, null, 6, null);
      }
    }
    printContainer.pin(0.0);
  }
  Rules.prototype.vkl = function () {
    return this.mlv_1;
  };
  Rules.$metadata$ = classMeta('Rules', undefined, undefined, undefined, undefined, TextButtonDockable.prototype);
  function addRow($this) {
    var row = new Row($this);
    row.o7c($this.rl3_1.p() ? 5.0 : last($this.rl3_1).e1n() + $this.jl3_1);
    $this.rl3_1.c(row);
    $this.pl3_1.shz(row);
    $this.ol3_1.pin(1.0);
    $this.ol3_1.nin(0.0);
    return row;
  }
  function recalculateAndSend($this) {
    recalculate($this);
    var tmp$ret$2;
    // Inline function 'kotlin.collections.map' call
    var tmp0_map = $this.rl3_1;
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
    var tmp0_iterator = tmp0_map.j();
    while (tmp0_iterator.k()) {
      var item = tmp0_iterator.l();
      var tmp$ret$0;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.recalculateAndSend.<anonymous>' call
      tmp$ret$0 = item.wlx();
      tmp0_mapTo.c(tmp$ret$0);
    }
    tmp$ret$1 = tmp0_mapTo;
    tmp$ret$2 = tmp$ret$1;
    send_0(new ScoreSheetData(tmp$ret$2));
  }
  function recalculate($this) {
    var inductionVariable = 0;
    var last = $this.fl3_1;
    if (inductionVariable < last)
      do {
        var x = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var total = 0.0;
        var tmp1_iterator = $this.rl3_1.j();
        while (tmp1_iterator.k()) {
          var row = tmp1_iterator.l();
          total = total + row.xlx($this.gl3_1 ? imul(x, 2) + 1 | 0 : x);
        }
        var tmp = $this.sl3_1.bhl_1.m(x);
        (tmp instanceof Text_0 ? tmp : THROW_CCE()).gck(toStringMax1DP(total));
      }
       while (inductionVariable < last);
  }
  function Row($outer) {
    this.vlx_1 = $outer;
    Container.call(this);
    var tx = 0.0;
    var inductionVariable = 0;
    var last = this.vlx_1.fl3_1;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (this.vlx_1.gl3_1) {
          var tmp$ret$1;
          // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput' call
          var tmp1_textInput = this.vlx_1.hl3_1;
          var tmp2_textInput = BoxUISkin_init_$Create$(null, null, 0.0, null, null, null, null, null, 255, null);
          var tmp$ret$0;
          // Inline function 'kotlin.also' call
          var tmp0_also = addTo(new TextInput('0', tmp1_textInput, 24.0, tmp2_textInput), this);
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput.<anonymous>' call
          // Inline function 'uk.co.nickthecoder.gamescupboard.client.Row.<anonymous>' call
          tmp0_also.w8w(tx);
          tmp0_also.o7c(0.0);
          tmp$ret$0 = tmp0_also;
          tmp$ret$1 = tmp$ret$0;
          tx = tx + (this.vlx_1.hl3_1 + this.vlx_1.kl3_1);
        }
        var tmp$ret$3;
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput' call
        var tmp4_textInput = this.vlx_1.hl3_1;
        var tmp5_textInput = BoxUISkin_init_$Create$(null, null, 0.0, null, null, null, null, null, 255, null);
        var tmp$ret$2;
        // Inline function 'kotlin.also' call
        var tmp3_also = addTo(new TextInput('0', tmp4_textInput, 24.0, tmp5_textInput), this);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput.<anonymous>' call
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.Row.<anonymous>' call
        tmp3_also.w8w(tx);
        tmp3_also.o7c(0.0);
        tmp$ret$2 = tmp3_also;
        tmp$ret$3 = tmp$ret$2;
        tx = tx + (this.vlx_1.hl3_1 + this.vlx_1.kl3_1);
      }
       while (inductionVariable < last);
  }
  Row.prototype.ylx = function (data) {
    var iterator = data.j();
    var index = 0;
    while (iterator.k()) {
      var x = index;
      index = index + 1 | 0;
      var item = iterator.l();
      var tmp = this.bhl_1.m(x);
      (tmp instanceof TextInput ? tmp : THROW_CCE()).gck(toStringMax1DP(item));
    }
  };
  Row.prototype.wlx = function () {
    var tmp$ret$2;
    // Inline function 'kotlin.collections.map' call
    var tmp0_map = this.bhl_1;
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
    var tmp0_iterator = tmp0_map.j();
    while (tmp0_iterator.k()) {
      var item = tmp0_iterator.l();
      var tmp$ret$0;
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.Row.values.<anonymous>' call
      var tmp0_elvis_lhs = toDoubleOrNull((item instanceof TextInput ? item : THROW_CCE()).u67());
      tmp$ret$0 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
      tmp0_mapTo.c(tmp$ret$0);
    }
    tmp$ret$1 = tmp0_mapTo;
    tmp$ret$2 = tmp$ret$1;
    return tmp$ret$2;
  };
  Row.prototype.xlx = function (x) {
    var tmp = this.bhl_1.m(x);
    var tmp0_elvis_lhs = toDoubleOrNull((tmp instanceof TextInput ? tmp : THROW_CCE()).u67());
    return tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
  };
  Row.$metadata$ = classMeta('Row', undefined, undefined, undefined, undefined, Container.prototype);
  function ScoreSheet$lambda(this$0) {
    return function (it) {
      addRow(this$0);
      return Unit_getInstance();
    };
  }
  function ScoreSheet$lambda_0(this$0) {
    return function (it) {
      recalculateAndSend(this$0);
      return Unit_getInstance();
    };
  }
  function ScoreSheet(seatCount, hasBidColumn) {
    TextButtonDockable.call(this, 'Score Sheet');
    this.fl3_1 = seatCount;
    this.gl3_1 = hasBidColumn;
    this.hl3_1 = this.gl3_1 ? 60.0 : 100.0;
    this.il3_1 = 10.0;
    this.jl3_1 = 30.0;
    this.kl3_1 = 4.0;
    var tmp = this;
    var tmp_0;
    if (this.gl3_1) {
      tmp_0 = imul(this.fl3_1, 2) * this.hl3_1 + (imul(this.fl3_1, 2) - 1 | 0) * this.kl3_1;
    } else {
      tmp_0 = this.fl3_1 * this.hl3_1 + (this.fl3_1 - 1 | 0) * this.kl3_1;
    }
    tmp.ll3_1 = tmp_0;
    this.ml3_1 = new ClipContainer(this.ll3_1 + this.il3_1 * 2 + this.il3_1, get_dockHeight());
    var tmp_1 = this;
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.solidRect' call
    var tmp0_solidRect = this.ml3_1;
    var tmp1_solidRect = this.ml3_1.d72();
    var tmp2_solidRect = this.ml3_1.e72();
    var tmp3_solidRect = get_dockableColor();
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new SolidRect(tmp1_solidRect, tmp2_solidRect, tmp3_solidRect);
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, tmp0_solidRect);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.solidRect.<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_1.nl3_1 = tmp$ret$3;
    var tmp_2 = this;
    var tmp$ret$9;
    // Inline function 'kotlin.apply' call
    var tmp$ret$8;
    // Inline function 'com.soywiz.korge.ui.uiScrollable' call
    var tmp0_uiScrollable = this.ml3_1;
    var tmp1_uiScrollable = this.ml3_1.d72() - this.il3_1;
    var tmp2_uiScrollable = this.ml3_1.e72() - (this.gl3_1 ? 130 : 110);
    var tmp$ret$7;
    // Inline function 'kotlin.also' call
    var tmp$ret$5;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = addTo(new UIScrollable(tmp1_uiScrollable, tmp2_uiScrollable), tmp0_uiScrollable);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$4;
    // Inline function 'com.soywiz.korge.ui.uiScrollable.<anonymous>' call
    tmp$ret$4 = Unit_getInstance();
    tmp$ret$5 = tmp0_apply_0;
    var tmp1_also = tmp$ret$5;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.korge.ui.uiScrollable.<anonymous>' call
    var tmp$ret$6;
    // Inline function 'com.soywiz.korge.ui.uiScrollable.<anonymous>' call
    var tmp3__anonymous__ufb84q = tmp1_also.xil_1;
    tmp$ret$6 = Unit_getInstance();
    tmp$ret$7 = tmp1_also;
    tmp$ret$8 = tmp$ret$7;
    var tmp4_apply = tmp$ret$8;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.scrollable.<anonymous>' call
    tmp4_apply.w8w(this.il3_1);
    tmp4_apply.o7c(this.gl3_1 ? 50.0 : 30.0);
    tmp4_apply.kim_1 = Colors_getInstance().y7z_1;
    tmp$ret$9 = tmp4_apply;
    tmp_2.ol3_1 = tmp$ret$9;
    this.pl3_1 = this.ol3_1.xil_1;
    var tmp_3 = this;
    var tmp$ret$10;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$10 = ArrayList_init_$Create$();
    tmp_3.ql3_1 = tmp$ret$10;
    var tmp_4 = this;
    var tmp$ret$11;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp$ret$11 = ArrayList_init_$Create$();
    tmp_4.rl3_1 = tmp$ret$11;
    var tmp_5 = this;
    var tmp$ret$14;
    // Inline function 'com.soywiz.korge.view.container' call
    var tmp0_container = this.ml3_1;
    var tmp$ret$13;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp1_addTo = new Container();
    var tmp$ret$12;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_1 = addTo(tmp1_addTo, tmp0_container);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.totals.<anonymous>' call
    alignTopToBottomOf$default(tmp0_apply_1, this.ol3_1, 0.0, 2, null);
    var tmp0_this = tmp0_apply_1;
    tmp0_this.o7c(tmp0_this.e1n() + 10);
    tmp$ret$12 = tmp0_apply_1;
    tmp$ret$13 = tmp$ret$12;
    tmp$ret$14 = tmp$ret$13;
    tmp_5.sl3_1 = tmp$ret$14;
    var tmp$ret$16;
    // Inline function 'com.soywiz.korge.ui.uiButton' call
    var tmp0_uiButton = this.ml3_1;
    var tmp1_uiButton = get_UI_DEFAULT_WIDTH();
    var tmp2_uiButton = get_UI_DEFAULT_HEIGHT();
    var tmp$ret$15;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_2 = addTo(new UIButton(tmp1_uiButton, tmp2_uiButton, 'Add Row', null), tmp0_uiButton);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.<anonymous>' call
    tmp0_apply_2.o7c(this.sl3_1.e1n() + 24);
    tmp0_apply_2.si9_1.j54(ScoreSheet$lambda(this));
    tmp$ret$15 = tmp0_apply_2;
    tmp$ret$16 = tmp$ret$15;
    var addRowButton = tmp$ret$16;
    var tmp$ret$18;
    // Inline function 'com.soywiz.korge.ui.uiButton' call
    var tmp3_uiButton = this.ml3_1;
    var tmp4_uiButton = get_UI_DEFAULT_WIDTH();
    var tmp5_uiButton = get_UI_DEFAULT_HEIGHT();
    var tmp$ret$17;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_3 = addTo(new UIButton(tmp4_uiButton, tmp5_uiButton, 'Total & Send', null), tmp3_uiButton);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.<anonymous>' call
    tmp0_apply_3.o7c(this.sl3_1.e1n() + 24);
    tmp0_apply_3.si9_1.j54(ScoreSheet$lambda_0(this));
    tmp$ret$17 = tmp0_apply_3;
    tmp$ret$18 = tmp$ret$17;
    var recalculateButton = tmp$ret$18;
    var buttonSpace = this.ml3_1.d72() - addRowButton.d72() - recalculateButton.d72();
    addRowButton.w8w(buttonSpace / 3);
    recalculateButton.w8w(this.ml3_1.d72() - recalculateButton.d72() - buttonSpace / 3);
    var inductionVariable = 0;
    var last = this.fl3_1;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var j = this.gl3_1 ? imul(i, 2) + 1 | 0 : i;
        var player = get_gamesCupboardClient().xkl(i + 1 | 0);
        var tmp$ret$19;
        // Inline function 'kotlin.apply' call
        var tmp1_safe_receiver = player;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f1r_1;
        var tmp_6 = tmp2_elvis_lhs == null ? 'vacant' : tmp2_elvis_lhs;
        var tmp_7 = get_gamesCupboardClient().dlq(i);
        var tmp6_apply = Text_init_$Create$(tmp_6, 0.0, tmp_7, null, null, null, false, null, null, 506, null);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.<anonymous>' call
        var tmp_8;
        if (this.gl3_1) {
          tmp_8 = this.il3_1 + imul(i, 2) * (this.hl3_1 + this.kl3_1) + (this.hl3_1 * 2 - tmp6_apply.d72()) / 2;
        } else {
          tmp_8 = this.il3_1 + i * (this.hl3_1 + this.kl3_1) + (this.hl3_1 - tmp6_apply.d72()) / 2;
        }
        tmp6_apply.w8w(tmp_8);
        tmp6_apply.o7c(6.0);
        tmp$ret$19 = tmp6_apply;
        var playerName = tmp$ret$19;
        this.ql3_1.c(playerName);
        this.ml3_1.shz(playerName);
        if (this.gl3_1) {
          var tmp$ret$21;
          // Inline function 'com.soywiz.korge.ui.uiText' call
          var tmp7_uiText = this.ml3_1;
          var tmp$ret$20;
          // Inline function 'kotlin.apply' call
          var tmp0_apply_4 = addTo(new UIText('Bid', 128.0, 18.0), tmp7_uiText);
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.<anonymous>' call
          tmp0_apply_4.w8w(this.il3_1 + (j - 1 | 0) * (this.hl3_1 + this.kl3_1));
          tmp0_apply_4.o7c(27.0);
          tmp$ret$20 = tmp0_apply_4;
          tmp$ret$21 = tmp$ret$20;
          var tmp$ret$23;
          // Inline function 'com.soywiz.korge.ui.uiText' call
          var tmp8_uiText = this.ml3_1;
          var tmp$ret$22;
          // Inline function 'kotlin.apply' call
          var tmp0_apply_5 = addTo(new UIText('Score', 128.0, 18.0), tmp8_uiText);
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.<anonymous>' call
          tmp0_apply_5.w8w(this.il3_1 + j * (this.hl3_1 + this.kl3_1));
          tmp0_apply_5.o7c(27.0);
          tmp$ret$22 = tmp0_apply_5;
          tmp$ret$23 = tmp$ret$22;
        }
        var tmp$ret$26;
        // Inline function 'com.soywiz.korge.view.text' call
        var tmp9_text = this.sl3_1;
        var tmp10_text = Colors_getInstance().s7z_1;
        var tmp11_text = Companion_getInstance_2().lib_1;
        var tmp12_text = get_DefaultTtfFont();
        var tmp13_text = Companion_getInstance_3().i8s_1;
        var tmp14_text = get_DefaultStringTextRenderer();
        var tmp15_text = Companion_getInstance_2().mib_1;
        var tmp$ret$25;
        // Inline function 'com.soywiz.korge.view.addTo' call
        var tmp0_addTo_0 = new Text_0('0', tmp11_text, tmp10_text, tmp12_text, tmp13_text, tmp14_text, tmp15_text, null, null);
        var tmp$ret$24;
        // Inline function 'kotlin.apply' call
        var tmp0_apply_6 = addTo(tmp0_addTo_0, tmp9_text);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'uk.co.nickthecoder.gamescupboard.client.ScoreSheet.<anonymous>' call
        tmp0_apply_6.w8w(this.il3_1 + j * (this.hl3_1 + this.kl3_1));
        tmp$ret$24 = tmp0_apply_6;
        tmp$ret$25 = tmp$ret$24;
        tmp$ret$26 = tmp$ret$25;
      }
       while (inductionVariable < last);
    addRow(this);
  }
  ScoreSheet.prototype.zlx = function () {
    return this.fl3_1;
  };
  ScoreSheet.prototype.aly = function () {
    return this.gl3_1;
  };
  ScoreSheet.prototype.vkl = function () {
    return this.ml3_1;
  };
  ScoreSheet.prototype.tl3 = function (id, name) {
    var tmp$ret$0;
    // Inline function 'kotlin.with' call
    var tmp0_with = this.ql3_1.m(id - 1 | 0);
    // Inline function 'kotlin.contracts.contract' call
    tmp0_with.gck(name);
    var tmp;
    if (this.gl3_1) {
      tmp = this.il3_1 + imul(id - 1 | 0, 2) * (this.hl3_1 + this.kl3_1) + (this.hl3_1 * 2 - tmp0_with.d72()) / 2;
    } else {
      tmp = this.il3_1 + (id - 1 | 0) * (this.hl3_1 + this.kl3_1) + (this.hl3_1 - tmp0_with.d72()) / 2;
    }
    tmp0_with.w8w(tmp);
    tmp$ret$0 = Unit_getInstance();
  };
  ScoreSheet.prototype.olp = function (scores) {
    this.rl3_1.x7();
    this.pl3_1.bhl_1.x7();
    var tmp0_iterator = scores.j();
    while (tmp0_iterator.k()) {
      var scoreRow = tmp0_iterator.l();
      var row = addRow(this);
      row.ylx(scoreRow);
    }
    recalculate(this);
  };
  ScoreSheet.$metadata$ = classMeta('ScoreSheet', undefined, undefined, undefined, undefined, TextButtonDockable.prototype);
  function toStringMax1DP(_this__u8e3s4) {
    var times10 = numberToInt(round(_this__u8e3s4 * 10));
    var tmp;
    if ((times10 % 10 | 0) === 0) {
      tmp = (times10 / 10 | 0).toString();
    } else {
      tmp = (times10 / 10.0).toString();
    }
    return tmp;
  }
  function SkinBitmapBuilder() {
  }
  SkinBitmapBuilder.prototype.bly = function () {
    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 'uk.co.nickthecoder.gamescupboard.client.SkinBitmapBuilder.createBitmap.<anonymous>' call
          var tmp0_iterator = listOf_0([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 = this.cly(_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_0([false, true]).j();
              while (tmp3_iterator.k()) {
                var enabled = tmp3_iterator.l();
                var tmp = this.dly(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;
    return mipmaps(tmp$ret$2, true).w86();
  };
  SkinBitmapBuilder.$metadata$ = classMeta('SkinBitmapBuilder');
  function CustomisableSkinBitmapBuilder_init_$Init$(lineWidth, radius, shapedEnabled, shapedDisabled, normal, over, down, disabled, borderNormal, borderOver, borderDown, borderDisabled, fifthType, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      lineWidth = 4;
    if (!(($mask0 & 2) === 0))
      radius = 6;
    if (!(($mask0 & 4096) === 0))
      fifthType = Colors_getInstance().l8k('#3c3e3e');
    CustomisableSkinBitmapBuilder.call($this, lineWidth, radius, shapedEnabled, shapedDisabled, normal, over, down, disabled, borderNormal, borderOver, borderDown, borderDisabled, fifthType);
    return $this;
  }
  function CustomisableSkinBitmapBuilder_init_$Create$(lineWidth, radius, shapedEnabled, shapedDisabled, normal, over, down, disabled, borderNormal, borderOver, borderDown, borderDisabled, fifthType, $mask0, $marker) {
    return CustomisableSkinBitmapBuilder_init_$Init$(lineWidth, radius, shapedEnabled, shapedDisabled, normal, over, down, disabled, borderNormal, borderOver, borderDown, borderDisabled, fifthType, $mask0, $marker, Object.create(CustomisableSkinBitmapBuilder.prototype));
  }
  function CustomisableSkinBitmapBuilder(lineWidth, radius, shapedEnabled, shapedDisabled, normal, over, down, disabled, borderNormal, borderOver, borderDown, borderDisabled, fifthType) {
    SkinBitmapBuilder.call(this);
    this.ely_1 = lineWidth;
    this.fly_1 = radius;
    this.gly_1 = shapedEnabled;
    this.hly_1 = shapedDisabled;
    this.ily_1 = normal;
    this.jly_1 = over;
    this.kly_1 = down;
    this.lly_1 = disabled;
    this.mly_1 = borderNormal;
    this.nly_1 = borderOver;
    this.oly_1 = borderDown;
    this.ply_1 = borderDisabled;
    this.qly_1 = fifthType;
  }
  CustomisableSkinBitmapBuilder.prototype.rly = function () {
    return this.fly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.sly = function () {
    return this.ily_1;
  };
  CustomisableSkinBitmapBuilder.prototype.tly = function () {
    return this.jly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.uly = function () {
    return this.kly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.vly = function () {
    return this.lly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.wly = function () {
    return this.mly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.xly = function () {
    return this.nly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.yly = function () {
    return this.oly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.zly = function () {
    return this.ply_1;
  };
  CustomisableSkinBitmapBuilder.prototype.alz = function () {
    return this.qly_1;
  };
  CustomisableSkinBitmapBuilder.prototype.dly = function (index, enabled) {
    var color = Companion_getInstance_5().a8l(enabled ? this.gly_1 : this.hly_1);
    var lineWidth = this.ely_1;
    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 'uk.co.nickthecoder.gamescupboard.client.CustomisableSkinBitmapBuilder.buildShape.<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 'uk.co.nickthecoder.gamescupboard.client.CustomisableSkinBitmapBuilder.buildShape.<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 'uk.co.nickthecoder.gamescupboard.client.CustomisableSkinBitmapBuilder.buildShape.<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;
  };
  CustomisableSkinBitmapBuilder.prototype.cly = function (index, kind) {
    var doubleLineWidth = imul(this.ely_1, 2);
    var lineWidth = this.ely_1;
    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 'uk.co.nickthecoder.gamescupboard.client.CustomisableSkinBitmapBuilder.buildButton.<anonymous>' call
          var tmp0_subject = index;
          var fill = tmp0_subject === Companion_getInstance_6().dio_1 ? new RGBA(this.ily_1) : tmp0_subject === Companion_getInstance_6().eio_1 ? new RGBA(this.jly_1) : tmp0_subject === Companion_getInstance_6().fio_1 ? new RGBA(this.kly_1) : tmp0_subject === Companion_getInstance_6().gio_1 ? new RGBA(this.lly_1) : new RGBA(this.qly_1);
          var tmp1_subject = index;
          var border = tmp1_subject === Companion_getInstance_6().dio_1 ? new RGBA(this.mly_1) : tmp1_subject === Companion_getInstance_6().eio_1 ? new RGBA(this.nly_1) : tmp1_subject === Companion_getInstance_6().fio_1 ? new RGBA(this.oly_1) : tmp1_subject === Companion_getInstance_6().gio_1 ? new RGBA(this.ply_1) : new RGBA(this.qly_1);
          // Inline function 'com.soywiz.korim.vector.Context2d.fill' call
          {
            ctx.h8r();
          }
          // Inline function 'uk.co.nickthecoder.gamescupboard.client.CustomisableSkinBitmapBuilder.buildButton.<anonymous>.<anonymous>' call
          // Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
          var tmp0_stroke = doubleLineWidth;
          var tmp1_stroke = ctx.r8u();
          var tmp2_stroke = ctx.s8u();
          var tmp3_stroke = ctx.t8u();
          var tmp4_stroke = ctx.u8u();
          var tmp5_stroke = ctx.v8u();
          {
            ctx.h8r();
          }
          // Inline function 'uk.co.nickthecoder.gamescupboard.client.CustomisableSkinBitmapBuilder.buildButton.<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, lineWidth, lineWidth, 64 - doubleLineWidth | 0, 64 - doubleLineWidth | 0, this.fly_1, this.fly_1);
          }
          // Inline function 'com.soywiz.korim.vector.Context2d.keep' call
          ctx.w8u();
          try {
            // Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
            ctx.x8u(tmp0_stroke);
            ctx.y8u(tmp1_stroke);
            ctx.z8u(tmp2_stroke);
            ctx.a8v(tmp3_stroke);
            ctx.b8v(tmp4_stroke);
            ctx.c8v(tmp5_stroke);
            ctx.d8v(border);
          }finally {
            ctx.e8v();
          }
          ctx.oa4(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;
  };
  CustomisableSkinBitmapBuilder.$metadata$ = classMeta('CustomisableSkinBitmapBuilder', undefined, undefined, undefined, undefined, SkinBitmapBuilder.prototype);
  function speechBubble(_this__u8e3s4, str) {
    var bubble = new SpeechBubble(str);
    _this__u8e3s4.shz(bubble);
    return bubble;
  }
  function SpeechBubble(str) {
    Container.call(this);
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp = get_bubbleTextColor();
    var tmp0_apply = Text_init_$Create$(str, 0.0, tmp, null, null, null, false, null, null, 506, null);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.SpeechBubble.<anonymous>' call
    tmp0_apply.w8w(-tmp0_apply.d72() / 2);
    tmp0_apply.o7c(-tmp0_apply.e72() / 2);
    tmp$ret$0 = tmp0_apply;
    var text = tmp$ret$0;
    var tmp$ret$5;
    // Inline function 'kotlin.apply' call
    var tmp$ret$4;
    // Inline function 'com.soywiz.korge.view.roundRect' call
    var tmp1_roundRect = text.d72() + 20;
    var tmp2_roundRect = text.e72() + 20;
    var tmp3_roundRect = 10.0;
    var tmp4_roundRect = 10.0;
    var tmp5_roundRect = get_bubbleColor();
    var tmp6_roundRect = Colors_getInstance().s7z_1;
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new RoundRect(tmp1_roundRect, tmp2_roundRect, tmp3_roundRect, tmp4_roundRect, new RGBA(tmp5_roundRect), new RGBA(tmp6_roundRect), 0.0, true);
    var tmp$ret$2;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.roundRect.<anonymous>' call
    tmp$ret$1 = Unit_getInstance();
    tmp$ret$2 = tmp0_apply_0;
    tmp$ret$3 = tmp$ret$2;
    tmp$ret$4 = tmp$ret$3;
    var tmp7_apply = tmp$ret$4;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.SpeechBubble.<anonymous>' call
    tmp7_apply.w8w(-tmp7_apply.d72() / 2);
    tmp7_apply.o7c(-tmp7_apply.e72() / 2);
    tmp$ret$5 = tmp7_apply;
    this.shz(text);
  }
  SpeechBubble.$metadata$ = classMeta('SpeechBubble', undefined, undefined, undefined, undefined, Container.prototype);
  function get_windowBackground() {
    init_properties_Style_kt_zuotf();
    return windowBackground;
  }
  var windowBackground;
  function get_outsideColor() {
    init_properties_Style_kt_zuotf();
    return outsideColor;
  }
  var outsideColor;
  var labelColor;
  function get_textColor() {
    init_properties_Style_kt_zuotf();
    return textColor;
  }
  var textColor;
  function get_toolbarColor() {
    init_properties_Style_kt_zuotf();
    return toolbarColor;
  }
  var toolbarColor;
  function get_dockableColor() {
    init_properties_Style_kt_zuotf();
    return dockableColor;
  }
  var dockableColor;
  function get_dockColor() {
    init_properties_Style_kt_zuotf();
    return dockColor;
  }
  var dockColor;
  function get_dockButtonColor() {
    init_properties_Style_kt_zuotf();
    return dockButtonColor;
  }
  var dockButtonColor;
  function get_dockButtonSelectedColor() {
    init_properties_Style_kt_zuotf();
    return dockButtonSelectedColor;
  }
  var dockButtonSelectedColor;
  function get_avatarBorderColor() {
    init_properties_Style_kt_zuotf();
    return avatarBorderColor;
  }
  var avatarBorderColor;
  function get_bubbleColor() {
    init_properties_Style_kt_zuotf();
    return bubbleColor;
  }
  var bubbleColor;
  function get_bubbleTextColor() {
    init_properties_Style_kt_zuotf();
    return bubbleTextColor;
  }
  var bubbleTextColor;
  function get_warnCardWillBeVisible() {
    init_properties_Style_kt_zuotf();
    return warnCardWillBeVisible;
  }
  var warnCardWillBeVisible;
  function get_binHighlight() {
    init_properties_Style_kt_zuotf();
    return binHighlight;
  }
  var binHighlight;
  function get_helpBackground() {
    init_properties_Style_kt_zuotf();
    return helpBackground;
  }
  var helpBackground;
  function get_boldText() {
    init_properties_Style_kt_zuotf();
    return boldText;
  }
  var boldText;
  function get_underscoreText() {
    init_properties_Style_kt_zuotf();
    return underscoreText;
  }
  var underscoreText;
  function get_hyperlinks() {
    init_properties_Style_kt_zuotf();
    return hyperlinks;
  }
  var hyperlinks;
  var spectatorColor;
  var red;
  var blue;
  var orange;
  var yellow;
  var green;
  var magenta;
  var chessBlack;
  var chessWhite;
  function get_myBoxSkin() {
    init_properties_Style_kt_zuotf();
    return myBoxSkin;
  }
  var myBoxSkin;
  function get_mySkipBitmap() {
    init_properties_Style_kt_zuotf();
    return mySkipBitmap;
  }
  var mySkipBitmap;
  function get_mySkin() {
    init_properties_Style_kt_zuotf();
    return mySkin;
  }
  var mySkin;
  function get_toolbarMargin() {
    init_properties_Style_kt_zuotf();
    return toolbarMargin;
  }
  var toolbarMargin;
  function get_toolbarSpacing() {
    init_properties_Style_kt_zuotf();
    return toolbarSpacing;
  }
  var toolbarSpacing;
  function get_toolbarButtonPadding() {
    init_properties_Style_kt_zuotf();
    return toolbarButtonPadding;
  }
  var toolbarButtonPadding;
  function get_toolbarButtonSize() {
    init_properties_Style_kt_zuotf();
    return toolbarButtonSize;
  }
  var toolbarButtonSize;
  function get_stylePlainBackground() {
    init_properties_Style_kt_zuotf();
    return stylePlainBackground;
  }
  var stylePlainBackground;
  function get_stylePlainColor() {
    init_properties_Style_kt_zuotf();
    return stylePlainColor;
  }
  var stylePlainColor;
  function get_avatarTextColor() {
    init_properties_Style_kt_zuotf();
    return avatarTextColor;
  }
  var avatarTextColor;
  var properties_initialized_Style_kt_g79pj5;
  function init_properties_Style_kt_zuotf() {
    if (properties_initialized_Style_kt_g79pj5) {
    } else {
      properties_initialized_Style_kt_g79pj5 = true;
      windowBackground = Colors_getInstance().l8k('#222');
      outsideColor = Colors_getInstance().l8k('#444');
      labelColor = Colors_getInstance().l8k('#ccc');
      textColor = Colors_getInstance().l8k('#eee');
      toolbarColor = Colors_getInstance().l8k('#444');
      dockableColor = Colors_getInstance().l8k('#222e');
      dockColor = Colors_getInstance().l8k('#333');
      dockButtonColor = Colors_getInstance().l8k('#333');
      dockButtonSelectedColor = Colors_getInstance().l8k('#222');
      avatarBorderColor = Colors_getInstance().t7z_1;
      bubbleColor = Colors_getInstance().l8k('#ccc');
      bubbleTextColor = Colors_getInstance().l8k('#444');
      warnCardWillBeVisible = Colors_getInstance().l8k('#f88');
      binHighlight = Colors_getInstance().l8k('#f88');
      helpBackground = Colors_getInstance().l8k('#222e');
      boldText = Colors_getInstance().l8k('4e4');
      underscoreText = Colors_getInstance().l8k('e4ea50');
      hyperlinks = Colors_getInstance().l8k('#c6493e');
      spectatorColor = Colors_getInstance().l8k('#cec');
      red = Colors_getInstance().l8k('#c6493e');
      blue = Colors_getInstance().l8k('#465bc9');
      orange = Colors_getInstance().l8k('#c82');
      yellow = Colors_getInstance().l8k('#e4ea50');
      green = Colors_getInstance().l8k('#282');
      magenta = Colors_getInstance().l8k('#828');
      chessBlack = Colors_getInstance().l8k('#6e645b');
      chessWhite = Colors_getInstance().l8k('#efd5ba');
      var tmp0_bgColor = Colors_getInstance().l8k('#3c3c3c');
      var tmp1_bgColorFocused = Colors_getInstance().l8k('#333');
      var tmp2_bgColorOver = Colors_getInstance().l8k('#383838');
      var tmp3_borderColor = Colors_getInstance().l8k('#666');
      var tmp4_borderColorFocused = Colors_getInstance().l8k('#666');
      var tmp5_borderColorOver = Colors_getInstance().l8k('#666');
      var tmp6_outlineColor = Colors_getInstance().l8k('#444');
      myBoxSkin = BoxUISkin_init_$Create$(tmp0_bgColor, tmp3_borderColor, 0.0, tmp1_bgColorFocused, tmp4_borderColorFocused, tmp2_bgColorOver, tmp5_borderColorOver, tmp6_outlineColor, 4, null);
      var tmp = get_myBoxSkin().qio_1;
      var tmp_0 = get_myBoxSkin().qio_1;
      var tmp_1 = get_myBoxSkin().qio_1;
      var tmp_2 = get_myBoxSkin().vio_1;
      var tmp_3 = get_myBoxSkin().tio_1;
      var tmp_4 = get_myBoxSkin().qio_1;
      var tmp_5 = get_myBoxSkin().qio_1;
      var tmp_6 = get_myBoxSkin().wio_1;
      var tmp_7 = get_myBoxSkin().uio_1;
      var tmp_8 = get_myBoxSkin().qio_1;
      mySkipBitmap = CustomisableSkinBitmapBuilder_init_$Create$(4, 10, tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8, null, 4096, null).bly();
      var tmp$ret$1;
      // Inline function 'com.soywiz.korge.ui.UISkin' call
      var tmp$ret$0;
      // Inline function 'kotlin.apply' call
      var tmp0_apply = UISkin_init_$Create$(null, null, null, 6, null);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.mySkin.<anonymous>' call
      set_textSize(tmp0_apply, 14.0);
      set_uiSkinBitmap(tmp0_apply, get_mySkipBitmap());
      tmp$ret$0 = tmp0_apply;
      tmp$ret$1 = tmp$ret$0;
      mySkin = tmp$ret$1;
      toolbarMargin = 8;
      toolbarSpacing = 4;
      toolbarButtonPadding = 8;
      toolbarButtonSize = 30;
      stylePlainBackground = Colors_getInstance().l8k('#fff4');
      stylePlainColor = Colors_getInstance().t7z_1;
      avatarTextColor = Colors_getInstance().t7z_1;
    }
  }
  function toolbarButton(_this__u8e3s4, label, action) {
    var tmp = get_textSize(get_mySkin());
    var fakeText = Text_init_$Create$(label, tmp, null, null, null, null, false, null, null, 508, null);
    var tmp$ret$0;
    // Inline function 'kotlin.math.max' call
    var tmp0_max = fakeText.d72() + imul(get_toolbarButtonPadding(), 2);
    var tmp1_max = get_toolbarButtonSize();
    tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
    var width = tmp$ret$0;
    var tmp_0 = get_toolbarButtonSize();
    var button = UIButton_init_$Create$(width, tmp_0, label, null, 8, null);
    set_uiSkin(button, get_mySkin());
    button.si9_1.d54(toolbarButton$lambda(action));
    _this__u8e3s4.shz(button);
    return button;
  }
  function Toolbar$sendButton$lambda(this$0) {
    return function () {
      this$0.cky_1.xkk();
      return Unit_getInstance();
    };
  }
  function Toolbar$restartButton$lambda() {
    send_0(new RunCommand('reset', emptyList()));
    return Unit_getInstance();
  }
  function Toolbar$addCommandPrototype$lambda($prototype) {
    return function () {
      run($prototype);
      return Unit_getInstance();
    };
  }
  function Toolbar(width, height) {
    FixedSizeContainer_init_$Init$(width, height, false, 4, null, this);
    this.ykx_1 = get_toolbarMargin();
    this.zkx_1 = get_toolbarSpacing();
    this.aky_1 = 20.0;
    var tmp = this;
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.roundRect' call
    var tmp0_roundRect = width + 2;
    var tmp1_roundRect = get_toolbarColor();
    var tmp2_roundRect = Colors_getInstance().s7z_1;
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new RoundRect(tmp0_roundRect, height, 0.0, 0.0, new RGBA(tmp1_roundRect), new RGBA(tmp2_roundRect), 0.0, true);
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.roundRect.<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.bky_1 = tmp$ret$3;
    var tmp_0 = this;
    var tmp$ret$4;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = chatInput(this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.Toolbar.chatInput.<anonymous>' call
    tmp0_apply_0.w8w(this.ykx_1);
    tmp0_apply_0.o7c((height - tmp0_apply_0.e72()) / 2);
    tmp$ret$4 = tmp0_apply_0;
    tmp_0.cky_1 = tmp$ret$4;
    var tmp_1 = this;
    tmp_1.dky_1 = toolbarButton(this, 'Send', Toolbar$sendButton$lambda(this));
    var tmp_2 = this;
    tmp_2.eky_1 = toolbarButton(this, 'Reset', Toolbar$restartButton$lambda);
    this.fky_1 = mutableListOf([this.eky_1]);
    this.gl1();
  }
  Toolbar.prototype.gl1 = function () {
    var tmp0_safe_receiver = this.pgs();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qha();
    var width = tmp1_elvis_lhs == null ? 800.0 : tmp1_elvis_lhs;
    this.bky_1.cav(width);
    var tx = width - this.ykx_1;
    var tmp2_iterator = this.fky_1.j();
    while (tmp2_iterator.k()) {
      var button = tmp2_iterator.l();
      button.o7c((this.e72() - button.e72()) / 2);
      button.w8w(tx - button.d72());
      tx = button.d1n() - this.zkx_1;
    }
    this.dky_1.o7c((this.e72() - this.dky_1.e72()) / 2);
    this.dky_1.w8w(tx - this.aky_1 - this.dky_1.d72());
    tx = this.dky_1.d1n() - this.zkx_1;
    this.cky_1.kkg_1.cav(tx - this.cky_1.d1n());
  };
  Toolbar.prototype.qlp = function (prototype) {
    var button = toolbarButton(this, prototype.x1n_1, Toolbar$addCommandPrototype$lambda(prototype));
    this.fky_1.c(button);
    this.gl1();
  };
  Toolbar.$metadata$ = classMeta('Toolbar', undefined, undefined, undefined, undefined, FixedSizeContainer.prototype);
  function toolbarButton$lambda($action) {
    return function (it) {
      $action();
      return Unit_getInstance();
    };
  }
  function get_soundCache() {
    init_properties_clientUtils_kt_rz7gsy();
    return soundCache;
  }
  var soundCache;
  function set_lastPlayedTime(_set____db54di) {
    init_properties_clientUtils_kt_rz7gsy();
    lastPlayedTime = _set____db54di;
  }
  function get_lastPlayedTime() {
    init_properties_clientUtils_kt_rz7gsy();
    return lastPlayedTime;
  }
  var lastPlayedTime;
  function get_bubbleEase() {
    init_properties_clientUtils_kt_rz7gsy();
    return bubbleEase;
  }
  var bubbleEase;
  function get_bubbleDuration() {
    init_properties_clientUtils_kt_rz7gsy();
    return bubbleDuration;
  }
  var bubbleDuration;
  function sendMessage(_this__u8e3s4, message) {
    init_properties_clientUtils_kt_rz7gsy();
    launch(_this__u8e3s4, sendMessage$slambda_0(_this__u8e3s4, message, null));
  }
  function send_0(_this__u8e3s4) {
    init_properties_clientUtils_kt_rz7gsy();
    sendMessage(get_gamesCupboardClient().gkd_1, _this__u8e3s4);
  }
  function localAndSend(_this__u8e3s4) {
    init_properties_clientUtils_kt_rz7gsy();
    var tmp = get_gamesCupboardClient().gkd_1;
    launch(tmp, localAndSend$slambda_0(_this__u8e3s4, null));
  }
  function loadAndCacheSound(path, $cont) {
    var tmp = new $loadAndCacheSoundCOROUTINE$10(path, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function playSound(sound) {
    init_properties_clientUtils_kt_rz7gsy();
    var tmp = get_gamesCupboardClient().fkd_1.hgs_1;
    launch(tmp, playSound$slambda_0(sound, null));
  }
  function playSound_0(path) {
    init_properties_clientUtils_kt_rz7gsy();
    var now = Companion_getInstance_4().h1h();
    if (now < get_lastPlayedTime() + 100)
      return Unit_getInstance();
    set_lastPlayedTime(now);
    var tmp0_safe_receiver = get_soundCache().q(path);
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$0;
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      try {
        playSound(tmp0_safe_receiver);
      } catch ($p) {
        if ($p instanceof Exception) {
          println('Failed to play sound : ' + $p);
        } else {
          throw $p;
        }
      }
      return Unit_getInstance();
    }
    var tmp = get_gamesCupboardClient().gkd_1;
    launch(tmp, playSound$slambda_2(path, null));
  }
  function playTaunt(name) {
    init_properties_clientUtils_kt_rz7gsy();
    var tmp$ret$2;
    // Inline function 'kotlin.text.lowercase' call
    var tmp$ret$0;
    // Inline function 'kotlin.text.trim' call
    tmp$ret$0 = toString(trim(isCharSequence(name) ? name : THROW_CCE()));
    var tmp0_lowercase = tmp$ret$0;
    var tmp$ret$1;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$1 = tmp0_lowercase;
    tmp$ret$2 = tmp$ret$1.toLowerCase();
    return playSound_0('/taunts/' + tmp$ret$2 + '.mp3');
  }
  function get_CANCEL_DRAG() {
    return CANCEL_DRAG;
  }
  var CANCEL_DRAG;
  function get_PLAYER_JOINED() {
    return PLAYER_JOINED;
  }
  var PLAYER_JOINED;
  function get_PLAYER_LEFT() {
    return PLAYER_LEFT;
  }
  var PLAYER_LEFT;
  function get_FACE_UP() {
    return FACE_UP;
  }
  var FACE_UP;
  function get_FACE_DOWN() {
    return FACE_DOWN;
  }
  var FACE_DOWN;
  function launchTween(_this__u8e3s4, vs, time, easing, waitTime) {
    init_properties_clientUtils_kt_rz7gsy();
    var tmp0_safe_receiver = _this__u8e3s4.pgs();
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, launchTween$slambda_0(_this__u8e3s4, vs, time, easing, waitTime, null));
    }
  }
  function launchTween$default(_this__u8e3s4, vs, time, easing, waitTime, $mask0, $handler) {
    if (!(($mask0 & 2) === 0)) {
      var tmp$ret$0;
      var tmp$ret$0_0;
      // Inline function 'com.soywiz.klock.seconds' call
      tmp$ret$0 = Companion_getInstance_0().c1i(1.0);
      tmp$ret$0_0 = Unit_getInstance();
      time = tmp$ret$0;
    }
    if (!(($mask0 & 4) === 0))
      easing = Companion_getInstance_1().j7u();
    if (!(($mask0 & 8) === 0))
      waitTime = Companion_getInstance_0().m1h_1;
    return launchTween(_this__u8e3s4, vs, time, easing, waitTime);
  }
  function launchTweenThen(_this__u8e3s4, vs, time, easing, waitTime, then) {
    init_properties_clientUtils_kt_rz7gsy();
    var tmp0_safe_receiver = _this__u8e3s4.pgs();
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, launchTweenThen$slambda_0(vs, easing, then, _this__u8e3s4, time, waitTime, null));
    }
  }
  function launchTweenThen$default(_this__u8e3s4, vs, time, easing, waitTime, then, $mask0, $handler) {
    if (!(($mask0 & 2) === 0)) {
      var tmp$ret$0;
      var tmp$ret$0_0;
      // Inline function 'com.soywiz.klock.seconds' call
      tmp$ret$0 = Companion_getInstance_0().c1i(1.0);
      tmp$ret$0_0 = Unit_getInstance();
      time = tmp$ret$0;
    }
    if (!(($mask0 & 4) === 0))
      easing = Companion_getInstance_1().j7u();
    if (!(($mask0 & 8) === 0))
      waitTime = Companion_getInstance_0().m1h_1;
    return launchTweenThen(_this__u8e3s4, vs, time, easing, waitTime, then);
  }
  function SymmetricFlatEase(source, margin) {
    this.llz_1 = source;
    this.mlz_1 = margin;
  }
  SymmetricFlatEase.prototype.k7u = function (it) {
    var tmp;
    if (it < this.mlz_1) {
      tmp = this.llz_1.k7u(it / this.mlz_1);
    } else if (it > 1 - this.mlz_1) {
      tmp = this.llz_1.k7u((1 - it) / this.mlz_1);
    } else {
      tmp = 1.0;
    }
    return tmp;
  };
  SymmetricFlatEase.$metadata$ = classMeta('SymmetricFlatEase', [Easing]);
  function OnFinishEase(ease, onFinish) {
    this.nlz_1 = ease;
    this.olz_1 = onFinish;
    this.plz_1 = 0.0;
  }
  OnFinishEase.prototype.k7u = function (it) {
    if (it >= 1.0 ? this.plz_1 < 1.0 : false) {
      this.olz_1();
    }
    this.plz_1 = it;
    return this.nlz_1.k7u(it);
  };
  OnFinishEase.$metadata$ = classMeta('OnFinishEase', [Easing]);
  function run(_this__u8e3s4) {
    init_properties_clientUtils_kt_rz7gsy();
    if (_this__u8e3s4.a1o_1) {
      send_0(new RunCommand(_this__u8e3s4.y1n_1, _this__u8e3s4.z1n_1));
    } else {
      get_gamesCupboardClient().rln().lkl(_this__u8e3s4);
    }
  }
  function sendMessage$slambda($this_sendMessage, $message, resultContinuation) {
    this.ylz_1 = $this_sendMessage;
    this.zlz_1 = $message;
    CoroutineImpl.call(this, resultContinuation);
  }
  sendMessage$slambda.prototype.z56 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  sendMessage$slambda.prototype.to = function ($cont) {
    return this.z56($cont);
  };
  sendMessage$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.am0_1 = get_json();
            var tmp_1 = this;
            tmp_1.bm0_1 = Packet_init_$Create$(this.zlz_1, new Long(0, 0), 2, null);
            var tmp_2 = this;
            tmp_2.cm0_1 = this.am0_1.cr();
            var tmp_3 = this;
            tmp_3.dm0_1 = serializer(this.cm0_1, createKType(getKClass(Packet), arrayOf([]), false));
            var tmp_4 = this.dm0_1;
            suspendResult = send(this.ylz_1, this.am0_1.br(isInterface(tmp_4, KSerializer) ? tmp_4 : THROW_CCE(), this.bm0_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);
  };
  sendMessage$slambda.prototype.k53 = function (completion) {
    var i = new sendMessage$slambda(this.ylz_1, this.zlz_1, completion);
    return i;
  };
  sendMessage$slambda.$metadata$ = classMeta('sendMessage$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function sendMessage$slambda_0($this_sendMessage, $message, resultContinuation) {
    var i = new sendMessage$slambda($this_sendMessage, $message, resultContinuation);
    var l = function ($cont) {
      return i.z56($cont);
    };
    l.$arity = 0;
    return l;
  }
  function localAndSend$slambda($this_localAndSend, resultContinuation) {
    this.mm0_1 = $this_localAndSend;
    CoroutineImpl.call(this, resultContinuation);
  }
  localAndSend$slambda.prototype.z56 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  localAndSend$slambda.prototype.to = function ($cont) {
    return this.z56($cont);
  };
  localAndSend$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;
            suspendResult = get_gamesCupboardClient().clp(this.mm0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.o7_1 = 2;
            var tmp_0 = get_gamesCupboardClient().gkd_1;
            var tmp_1 = this;
            tmp_1.nm0_1 = get_json();
            var tmp_2 = this;
            tmp_2.om0_1 = Packet_init_$Create$(this.mm0_1, new Long(0, 0), 2, null);
            var tmp_3 = this;
            tmp_3.pm0_1 = this.nm0_1.cr();
            var tmp_4 = this;
            tmp_4.qm0_1 = serializer(this.pm0_1, createKType(getKClass(Packet), arrayOf([]), false));
            var tmp_5 = this.qm0_1;
            suspendResult = send(tmp_0, this.nm0_1.br(isInterface(tmp_5, KSerializer) ? tmp_5 : THROW_CCE(), this.om0_1), 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);
  };
  localAndSend$slambda.prototype.k53 = function (completion) {
    var i = new localAndSend$slambda(this.mm0_1, completion);
    return i;
  };
  localAndSend$slambda.$metadata$ = classMeta('localAndSend$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function localAndSend$slambda_0($this_localAndSend, resultContinuation) {
    var i = new localAndSend$slambda($this_localAndSend, resultContinuation);
    var l = function ($cont) {
      return i.z56($cont);
    };
    l.$arity = 0;
    return l;
  }
  function playSound$slambda($sound, resultContinuation) {
    this.zm0_1 = $sound;
    CoroutineImpl.call(this, resultContinuation);
  }
  playSound$slambda.prototype.z56 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  playSound$slambda.prototype.to = function ($cont) {
    return this.z56($cont);
  };
  playSound$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.zm0_1.udm(null, this, 1, 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);
  };
  playSound$slambda.prototype.k53 = function (completion) {
    var i = new playSound$slambda(this.zm0_1, completion);
    return i;
  };
  playSound$slambda.$metadata$ = classMeta('playSound$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function playSound$slambda_0($sound, resultContinuation) {
    var i = new playSound$slambda($sound, resultContinuation);
    var l = function ($cont) {
      return i.z56($cont);
    };
    l.$arity = 0;
    return l;
  }
  function playSound$slambda_1($path, resultContinuation) {
    this.im1_1 = $path;
    CoroutineImpl.call(this, resultContinuation);
  }
  playSound$slambda_1.prototype.z56 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  playSound$slambda_1.prototype.to = function ($cont) {
    return this.z56($cont);
  };
  playSound$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 = loadAndCacheSound(this.im1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            if (tmp0_safe_receiver == null)
              null;
            else {
              playSound(tmp0_safe_receiver);
            }

            ;
            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);
  };
  playSound$slambda_1.prototype.k53 = function (completion) {
    var i = new playSound$slambda_1(this.im1_1, completion);
    return i;
  };
  playSound$slambda_1.$metadata$ = classMeta('playSound$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function playSound$slambda_2($path, resultContinuation) {
    var i = new playSound$slambda_1($path, resultContinuation);
    var l = function ($cont) {
      return i.z56($cont);
    };
    l.$arity = 0;
    return l;
  }
  function launchTween$slambda$lambda(it) {
    return Unit_getInstance();
  }
  function launchTween$slambda($this_launchTween, $vs, $time, $easing, $waitTime, resultContinuation) {
    this.rm1_1 = $this_launchTween;
    this.sm1_1 = $vs;
    this.tm1_1 = $time;
    this.um1_1 = $easing;
    this.vm1_1 = $waitTime;
    CoroutineImpl.call(this, resultContinuation);
  }
  launchTween$slambda.prototype.z56 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  launchTween$slambda.prototype.to = function ($cont) {
    return this.z56($cont);
  };
  launchTween$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.sm1_1.slice();
            suspendResult = tween(this.rm1_1, tmp_0, this.tm1_1, this.um1_1, this.vm1_1, false, true, launchTween$slambda$lambda, 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);
  };
  launchTween$slambda.prototype.k53 = function (completion) {
    var i = new launchTween$slambda(this.rm1_1, this.sm1_1, this.tm1_1, this.um1_1, this.vm1_1, completion);
    return i;
  };
  launchTween$slambda.$metadata$ = classMeta('launchTween$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function launchTween$slambda_0($this_launchTween, $vs, $time, $easing, $waitTime, resultContinuation) {
    var i = new launchTween$slambda($this_launchTween, $vs, $time, $easing, $waitTime, resultContinuation);
    var l = function ($cont) {
      return i.z56($cont);
    };
    l.$arity = 0;
    return l;
  }
  function launchTweenThen$slambda$lambda(it) {
    return Unit_getInstance();
  }
  function launchTweenThen$slambda($vs, $easing, $then, $this_launchTweenThen, $time, $waitTime, resultContinuation) {
    this.em2_1 = $vs;
    this.fm2_1 = $easing;
    this.gm2_1 = $then;
    this.hm2_1 = $this_launchTweenThen;
    this.im2_1 = $time;
    this.jm2_1 = $waitTime;
    CoroutineImpl.call(this, resultContinuation);
  }
  launchTweenThen$slambda.prototype.z56 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  launchTweenThen$slambda.prototype.to = function ($cont) {
    return this.z56($cont);
  };
  launchTweenThen$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.km2_1 = this.em2_1.slice();
            this.lm2_1 = new OnFinishEase(this.fm2_1, this.gm2_1);
            this.o7_1 = 1;
            suspendResult = tween(this.hm2_1, this.km2_1, this.im2_1, this.lm2_1, this.jm2_1, false, true, launchTweenThen$slambda$lambda, 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);
  };
  launchTweenThen$slambda.prototype.k53 = function (completion) {
    var i = new launchTweenThen$slambda(this.em2_1, this.fm2_1, this.gm2_1, this.hm2_1, this.im2_1, this.jm2_1, completion);
    return i;
  };
  launchTweenThen$slambda.$metadata$ = classMeta('launchTweenThen$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function launchTweenThen$slambda_0($vs, $easing, $then, $this_launchTweenThen, $time, $waitTime, resultContinuation) {
    var i = new launchTweenThen$slambda($vs, $easing, $then, $this_launchTweenThen, $time, $waitTime, resultContinuation);
    var l = function ($cont) {
      return i.z56($cont);
    };
    l.$arity = 0;
    return l;
  }
  function $loadAndCacheSoundCOROUTINE$10(path, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jlz_1 = path;
  }
  $loadAndCacheSoundCOROUTINE$10.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;
            var tmp_0 = get_resourcesVfs().c19(this.jlz_1);
            suspendResult = readSound$default(tmp_0, null, false, this, 3, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            var tmp0_set = get_soundCache();
            tmp0_set.a(this.jlz_1, result);
            ;
            this.klz_1 = result;
            this.p7_1 = 3;
            this.o7_1 = 4;
            continue $sm;
          case 2:
            this.p7_1 = 3;
            var tmp_1 = this.r7_1;
            if (tmp_1 instanceof Exception) {
              var e = this.r7_1;
              var tmp_2 = this;
              println('Failed to load sound ' + this.jlz_1 + ' : ' + e);
              tmp_2.klz_1 = null;
              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 this.klz_1;
        }
      } catch ($p) {
        if (this.p7_1 === 3) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $loadAndCacheSoundCOROUTINE$10.$metadata$ = classMeta('$loadAndCacheSoundCOROUTINE$10', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  var properties_initialized_clientUtils_kt_9fx56;
  function init_properties_clientUtils_kt_rz7gsy() {
    if (properties_initialized_clientUtils_kt_9fx56) {
    } else {
      properties_initialized_clientUtils_kt_9fx56 = true;
      var tmp$ret$0;
      // Inline function 'kotlin.collections.mutableMapOf' call
      tmp$ret$0 = LinkedHashMap_init_$Create$();
      soundCache = tmp$ret$0;
      lastPlayedTime = 0.0;
      bubbleEase = new SymmetricFlatEase(Companion_getInstance_1().h7u(), 0.1);
      var tmp$ret$0_0;
      // Inline function 'com.soywiz.klock.seconds' call
      tmp$ret$0_0 = Companion_getInstance_0().c1i(5.0);
      bubbleDuration = tmp$ret$0_0;
    }
  }
  function get_json() {
    init_properties_main_kt_adsr1d();
    return json;
  }
  var json;
  function set_gamesCupboardClient(_set____db54di) {
    init_properties_main_kt_adsr1d();
    gamesCupboardClient = _set____db54di;
  }
  function get_gamesCupboardClient() {
    init_properties_main_kt_adsr1d();
    var tmp = gamesCupboardClient;
    if (!(tmp == null))
      return tmp;
    else {
      throwUninitializedPropertyAccessException('gamesCupboardClient');
    }
  }
  var gamesCupboardClient;
  function localPlayerId() {
    init_properties_main_kt_adsr1d();
    return get_gamesCupboardClient().tl6().e1r_1;
  }
  function isSpectator() {
    init_properties_main_kt_adsr1d();
    return get_gamesCupboardClient().tl6().h1r_1;
  }
  function main($cont) {
    var tmp = new $mainCOROUTINE$11($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  }
  function main$slambda$lambda($this$HttpClient) {
    var tmp = Plugin_getInstance();
    $this$HttpClient.u3o(tmp, null, 2, null);
    return Unit_getInstance();
  }
  function main$slambda$slambda($this_invoke, resultContinuation) {
    this.jm3_1 = $this_invoke;
    CoroutineImpl.call(this, resultContinuation);
  }
  main$slambda$slambda.prototype.qm3 = function ($this$ws, $cont) {
    var tmp = this.rm3($this$ws, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  main$slambda$slambda.prototype.w7 = function (p1, $cont) {
    return this.qm3(p1 instanceof DefaultClientWebSocketSession ? p1 : THROW_CCE(), $cont);
  };
  main$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 = 16;
            this.o7_1 = 1;
            continue $sm;
          case 1:
            this.p7_1 = 4;
            this.p7_1 = 3;
            set_gamesCupboardClient(new GamesCupboardClient(this.jm3_1, this.km3_1));
            this.o7_1 = 2;
            suspendResult = get_gamesCupboardClient().clq(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.lm3_1 = suspendResult;
            this.p7_1 = 16;
            this.o7_1 = 10;
            continue $sm;
          case 3:
            this.p7_1 = 4;
            var tmp_0 = this.r7_1;
            if (tmp_0 instanceof Error) {
              this.mm3_1 = this.r7_1;
              var tmp_1 = this;
              printStackTrace(this.mm3_1);
              tmp_1.lm3_1 = Unit_getInstance();
              this.p7_1 = 16;
              this.o7_1 = 10;
              continue $sm;
            } else {
              throw this.r7_1;
            }

            break;
          case 4:
            this.p7_1 = 16;
            this.nm3_1 = this.r7_1;
            this.p7_1 = 6;
            println('Closing websocket');
            this.o7_1 = 5;
            suspendResult = close$default(this.km3_1, null, this, 1, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            println('Closed websocket');
            this.p7_1 = 16;
            this.o7_1 = 7;
            continue $sm;
          case 6:
            this.p7_1 = 16;
            var tmp_2 = this.r7_1;
            if (tmp_2 instanceof Error) {
              this.om3_1 = this.r7_1;
              this.o7_1 = 7;
              continue $sm;
            } else {
              throw this.r7_1;
            }

            break;
          case 7:
            this.p7_1 = 16;
            this.p7_1 = 8;
            this.p7_1 = 16;
            this.o7_1 = 9;
            continue $sm;
          case 8:
            this.p7_1 = 16;
            var tmp_3 = this.r7_1;
            if (tmp_3 instanceof Error) {
              this.pm3_1 = this.r7_1;
              this.o7_1 = 9;
              continue $sm;
            } else {
              throw this.r7_1;
            }

            break;
          case 9:
            this.p7_1 = 16;
            throw this.nm3_1;
          case 10:
            this.p7_1 = 12;
            println('Closing websocket');
            this.o7_1 = 11;
            suspendResult = close$default(this.km3_1, null, this, 1, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            println('Closed websocket');
            this.p7_1 = 16;
            this.o7_1 = 13;
            continue $sm;
          case 12:
            this.p7_1 = 16;
            var tmp_4 = this.r7_1;
            if (tmp_4 instanceof Error) {
              var _ = this.r7_1;
              this.o7_1 = 13;
              continue $sm;
            } else {
              throw this.r7_1;
            }

            break;
          case 13:
            this.p7_1 = 16;
            this.p7_1 = 14;
            this.p7_1 = 16;
            this.o7_1 = 15;
            continue $sm;
          case 14:
            this.p7_1 = 16;
            var tmp_5 = this.r7_1;
            if (tmp_5 instanceof Error) {
              var __0 = this.r7_1;
              this.o7_1 = 15;
              continue $sm;
            } else {
              throw this.r7_1;
            }

            break;
          case 15:
            this.p7_1 = 16;
            println('End of session block');
            return Unit_getInstance();
          case 16:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 16) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  main$slambda$slambda.prototype.rm3 = function ($this$ws, completion) {
    var i = new main$slambda$slambda(this.jm3_1, completion);
    i.km3_1 = $this$ws;
    return i;
  };
  main$slambda$slambda.$metadata$ = classMeta('main$slambda$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function main$slambda$slambda_0($this_invoke, resultContinuation) {
    var i = new main$slambda$slambda($this_invoke, resultContinuation);
    var l = function ($this$ws, $cont) {
      return i.qm3($this$ws, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function main$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  main$slambda.prototype.jm4 = function ($this$invoke, $cont) {
    var tmp = this.km4($this$invoke, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  main$slambda.prototype.w7 = function (p1, $cont) {
    return this.jm4(p1 instanceof Stage ? p1 : THROW_CCE(), $cont);
  };
  main$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;
            var tmp0_elvis_lhs = Companion_getInstance_13().c19('gameId');
            tmp_0.bm4_1 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
            var tmp_1 = this;
            var tmp1_elvis_lhs = Companion_getInstance_13().c19('seat');
            tmp_1.cm4_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            this.dm4_1 = Companion_getInstance_13().c19('spectate') === 'true';
            this.em4_1 = Companion_getInstance_13().c19('code');
            var tmp_2 = this;
            var tmp_3;
            if (this.em4_1 == null ? true : isBlank(this.em4_1)) {
              tmp_3 = '';
            } else {
              tmp_3 = '&code=' + this.em4_1;
            }

            tmp_2.fm4_1 = tmp_3;
            this.gm4_1 = Companion_getInstance_13().r3b();
            this.hm4_1 = Companion_getInstance_13().s3b();
            println('Joining Game#' + toString(this.bm4_1) + ' on ' + this.gm4_1 + ':' + this.hm4_1 + ' wantsToBeASpectator=' + this.dm4_1);
            var tmp_4 = this;
            var tmp_5 = '/websocket/' + toString(this.bm4_1) + '?';
            var tmp_6;
            if (this.dm4_1) {
              tmp_6 = 'spectate=true' + this.fm4_1;
            } else {
              tmp_6 = 'seat=' + toString(this.cm4_1) + this.fm4_1;
            }

            tmp_4.im4_1 = tmp_5 + tmp_6;
            this.o7_1 = 1;
            var tmp_7 = HttpClient(main$slambda$lambda);
            suspendResult = ws$default(tmp_7, null, this.gm4_1, this.hm4_1, this.im4_1, null, main$slambda$slambda_0(this.am4_1, null), this, 17, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            println('End of main');
            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);
  };
  main$slambda.prototype.km4 = function ($this$invoke, completion) {
    var i = new main$slambda(completion);
    i.am4_1 = $this$invoke;
    return i;
  };
  main$slambda.$metadata$ = classMeta('main$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function main$slambda_0(resultContinuation) {
    var i = new main$slambda(resultContinuation);
    var l = function ($this$invoke, $cont) {
      return i.jm4($this$invoke, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function $mainCOROUTINE$11(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  $mainCOROUTINE$11.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.um2_1 = Korge_getInstance();
            this.o7_1 = 1;
            var tmp_0 = get_resourcesVfs().c19('icon.png');
            suspendResult = readBitmap$default(tmp_0, null, this, 1, null);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vm2_1 = suspendResult;
            this.wm2_1 = get_stageWidth();
            this.xm2_1 = get_stageHeight();
            this.ym2_1 = get_windowBackground();
            this.zm2_1 = Companion_getInstance_7().p7d();
            this.am3_1 = Companion_getInstance_8().u6z_1;
            this.o7_1 = 2;
            suspendResult = this.um2_1.og6('Games Cupboard', this.wm2_1, this.xm2_1, 0, 0, this.vm2_1, null, null, null, 0.0, this.am3_1, this.zm2_1, false, this.ym2_1, false, 0.0, null, null, null, null, null, null, false, false, null, null, 0, null, false, main$slambda_0(null), this, 536855512, null);
            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);
  };
  $mainCOROUTINE$11.$metadata$ = classMeta('$mainCOROUTINE$11', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  var properties_initialized_main_kt_ask6ij;
  function init_properties_main_kt_adsr1d() {
    if (properties_initialized_main_kt_ask6ij) {
    } else {
      properties_initialized_main_kt_ask6ij = true;
      json = Default_getInstance();
    }
  }
  function textInput(_this__u8e3s4, initialText, width, height, skin, block) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = addTo(new TextInput(initialText, width, height, skin), _this__u8e3s4);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.textInput.<anonymous>' call
    block(tmp0_also);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function TextInput(initialText, width, height, skin) {
    UIView.call(this, width, height);
    var tmp = this;
    tmp.bkj_1 = SoftKeyboardConfig_init_$Create$(null, null, null, null, null, null, false, null, null, null, false, 2047, null);
    var tmp_0 = this;
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.renderableView' call
    tmp$ret$0 = addTo(new RenderableView(width, height, skin), this);
    tmp_0.ckj_1 = tmp$ret$0;
    this.dkj_1 = viewRenderer$factory(this.ckj_1);
    var tmp_1 = this;
    var tmp$ret$4;
    // Inline function 'com.soywiz.korge.view.clipContainer' call
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp1_addTo = new ClipContainer(0.0, 0.0);
    var tmp$ret$2;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp1_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.clipContainer.<anonymous>' call
    tmp$ret$1 = Unit_getInstance();
    tmp$ret$2 = tmp0_apply;
    tmp$ret$3 = tmp$ret$2;
    tmp$ret$4 = tmp$ret$3;
    tmp_1.ekj_1 = tmp$ret$4;
    var tmp_2 = this;
    var tmp$ret$8;
    // Inline function 'com.soywiz.korge.view.text' call
    var tmp0_text = this.ekj_1;
    var tmp1_text = Colors_getInstance().t7z_1;
    var tmp2_text = get_DefaultTtfFont();
    var tmp3_text = Companion_getInstance_3().i8s_1;
    var tmp4_text = get_DefaultStringTextRenderer();
    var tmp5_text = Companion_getInstance_2().mib_1;
    var tmp$ret$7;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new Text_0(initialText, 16.0, tmp1_text, tmp2_text, tmp3_text, tmp4_text, tmp5_text, null, null);
    var tmp$ret$6;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = addTo(tmp0_addTo, tmp0_text);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$5;
    // Inline function 'com.soywiz.korge.view.text.<anonymous>' call
    tmp$ret$5 = Unit_getInstance();
    tmp$ret$6 = tmp0_apply_0;
    tmp$ret$7 = tmp$ret$6;
    tmp$ret$8 = tmp$ret$7;
    tmp_2.fkj_1 = tmp$ret$8;
    this.gkj_1 = new TextInputController(this.fkj_1, this.fkj_1, this, this.ckj_1);
    this.hkj_1 = text$factory(this.gkj_1);
    this.ikj_1 = textSize$factory(this.gkj_1);
    this.jkj_1 = font$factory(this.gkj_1);
    this.kkj_1 = onReturnPressed$factory(this.gkj_1);
    this.lkj_1 = onEscPressed$factory(this.gkj_1);
    this.mkj_1 = onFocusLost$factory(this.gkj_1);
    this.nkj_1 = selectionRange$factory(this.gkj_1);
    this.okj_1 = selectionStart$factory(this.gkj_1);
    this.pkj_1 = selectionEnd$factory(this.gkj_1);
    this.qkj_1 = selectionLength$factory(this.gkj_1);
    this.rkj_1 = Companion_getInstance_9().d74(3.0, 2.0, 2.0, 2.0);
    this.rhw();
  }
  TextInput.prototype.mm4 = function () {
    return this.gkj_1;
  };
  TextInput.prototype.gck = function (_set____db54di) {
    var tmp0_setValue = text$factory_0();
    return this.hkj_1.set(_set____db54di);
  };
  TextInput.prototype.u67 = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.getValue' call
    var tmp0_getValue = text$factory_1();
    tmp$ret$0 = this.hkj_1.get();
    return tmp$ret$0;
  };
  TextInput.prototype.acn = function () {
    return focus(this.gkj_1);
  };
  TextInput.prototype.rhw = function () {
    this.ckj_1.phm(this.d72(), this.e72());
    bounds(this.ekj_1, without(new Rectangle(0.0, 0.0, this.d72(), this.e72()), this.rkj_1));
  };
  TextInput.$metadata$ = classMeta('TextInput', [ISoftKeyboardConfig], undefined, undefined, undefined, UIView.prototype);
  function viewRenderer$factory($b0) {
    return getPropertyCallableRef('viewRenderer', 0, KMutableProperty0, function () {
      return $b0.xit_1;
    }, function (value) {
      $b0.xit_1 = value;
      return Unit_getInstance();
    });
  }
  function text$factory($b0) {
    return getPropertyCallableRef('text', 0, KMutableProperty0, function () {
      return $b0.u67();
    }, function (value) {
      return $b0.gck(value);
    });
  }
  function textSize$factory($b0) {
    return getPropertyCallableRef('textSize', 0, KMutableProperty0, function () {
      return $b0.nm4();
    }, function (value) {
      return $b0.yih(value);
    });
  }
  function font$factory($b0) {
    return getPropertyCallableRef('font', 0, KMutableProperty0, function () {
      return $b0.r8w();
    }, function (value) {
      return $b0.om4(value);
    });
  }
  function onReturnPressed$factory($b0) {
    return getPropertyCallableRef('onReturnPressed', 0, KProperty0, function () {
      return $b0.akk_1;
    }, null);
  }
  function onEscPressed$factory($b0) {
    return getPropertyCallableRef('onEscPressed', 0, KProperty0, function () {
      return $b0.zkj_1;
    }, null);
  }
  function onFocusLost$factory($b0) {
    return getPropertyCallableRef('onFocusLost', 0, KProperty0, function () {
      return $b0.dkk_1;
    }, null);
  }
  function selectionRange$factory($b0) {
    return getPropertyCallableRef('selectionRange', 0, KMutableProperty0, function () {
      return $b0.pm4();
    }, function (value) {
      return $b0.qm4(value);
    });
  }
  function selectionStart$factory($b0) {
    return getPropertyCallableRef('selectionStart', 0, KMutableProperty0, function () {
      return $b0.rm4();
    }, function (value) {
      return $b0.sm4(value);
    });
  }
  function selectionEnd$factory($b0) {
    return getPropertyCallableRef('selectionEnd', 0, KMutableProperty0, function () {
      return $b0.tm4();
    }, function (value) {
      return $b0.um4(value);
    });
  }
  function selectionLength$factory($b0) {
    return getPropertyCallableRef('selectionLength', 0, KProperty0, function () {
      return $b0.vm4();
    }, null);
  }
  function text$factory_0() {
    return getPropertyCallableRef('text', 1, KMutableProperty1, function (receiver) {
      return receiver.u67();
    }, function (receiver, value) {
      return receiver.gck(value);
    });
  }
  function text$factory_1() {
    return getPropertyCallableRef('text', 1, KMutableProperty1, function (receiver) {
      return receiver.u67();
    }, function (receiver, value) {
      return receiver.gck(value);
    });
  }
  function TextSnapshot(text, selectionRange) {
    this.wm4_1 = text;
    this.xm4_1 = selectionRange;
  }
  TextSnapshot.prototype.ym4 = function (out) {
    var tmp = this.wm4_1;
    setTextNoSnapshot$default(out, tmp, null, 4, null);
    out.zm4(this.xm4_1);
  };
  TextSnapshot.prototype.toString = function () {
    return 'TextSnapshot(text=' + this.wm4_1 + ', selectionRange=' + this.xm4_1 + ')';
  };
  TextSnapshot.prototype.hashCode = function () {
    var result = getStringHashCode(this.wm4_1);
    result = imul(result, 31) + this.xm4_1.hashCode() | 0;
    return result;
  };
  TextSnapshot.prototype.equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TextSnapshot))
      return false;
    var tmp0_other_with_cast = other instanceof TextSnapshot ? other : THROW_CCE();
    if (!(this.wm4_1 === tmp0_other_with_cast.wm4_1))
      return false;
    if (!this.xm4_1.equals(tmp0_other_with_cast.xm4_1))
      return false;
    return true;
  };
  TextSnapshot.$metadata$ = classMeta('TextSnapshot');
  function setTextNoSnapshot($this, text, out) {
    if (!$this.qkk_1($this.skj_1.u67(), text))
      return null;
    out.wm4_1 = $this.skj_1.u67();
    out.xm4_1 = $this.pm4();
    $this.skj_1.gck(text);
    reclampSelection($this);
    $this.bkk_1.k54($this);
    return out;
  }
  function setTextNoSnapshot$default($this, text, out, $mask0, $handler) {
    if (!(($mask0 & 4) === 0))
      out = new TextSnapshot('', numberRangeToNumber(0, 0));
    return setTextNoSnapshot($this, text, out);
  }
  function clampIndex($this, index) {
    return clamp_0(index, 0, $this.u67().length);
  }
  function reclampSelection($this) {
    $this.am5($this.rm4(), $this.tm4());
    $this.sm4($this.rm4());
  }
  function _get_gameWindow__b33wdz($this) {
    return ensureNotNull($this.skj_1.pgs()).hgs_1.hfw_1;
  }
  function TextInputController$lambda($this$onNewAttachDetach, it) {
    get_uiFocusManager($this$onNewAttachDetach.lfx_1);
    return Unit_getInstance();
  }
  function TextInputController$acceptTextChange$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return true;
  }
  function TextInputController$lambda_0(this$0) {
    return function () {
      var tmp;
      if (!this$0.bm5()) {
        this$0.hkk_1.tch(false);
        tmp = Unit_getInstance();
      } else {
        var tmp_0;
        if (this$0.vm4() === 0) {
          this$0.hkk_1.tch(!this$0.hkk_1.pck());
          tmp_0 = Unit_getInstance();
        } else {
          this$0.hkk_1.tch(true);
          tmp_0 = Unit_getInstance();
        }
        tmp = tmp_0;
      }
      return Unit_getInstance();
    };
  }
  function TextInputController$slambda(this$0, resultContinuation) {
    this.km5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  TextInputController$slambda.prototype.ngm = function (it, $cont) {
    var tmp = this.ogm(it, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  TextInputController$slambda.prototype.w7 = function (p1, $cont) {
    return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
  };
  TextInputController$slambda.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        if (tmp === 0) {
          this.p7_1 = 1;
          if (!this.km5_1.bm5())
            return Unit_getInstance();
          if (this.lm5_1.mc6_1 ? true : this.lm5_1.kc6_1)
            return Unit_getInstance();
          var tmp0__get_code__88qj9g = this.lm5_1.ic6_1;
          var code = Char__toInt_impl_vasixd(tmp0__get_code__88qj9g);
          var tmp0_subject = code;
          switch (tmp0_subject) {
            case 8:
            case 127:
              ;
              break;
            case 9:
            case 10:
            case 13:
              if (code === 10 ? true : code === 13) {
                this.km5_1.akk_1.k54(this.km5_1);
              }

              break;
            case 27:
              this.km5_1.zkj_1.k54(this.km5_1);
              ;
              break;
            default:
              this.km5_1.mm5(this.lm5_1.ac7());
              ;
              break;
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.r7_1;
        }
      } catch ($p) {
        throw $p;
      }
     while (true);
  };
  TextInputController$slambda.prototype.ogm = function (it, completion) {
    var i = new TextInputController$slambda(this.km5_1, completion);
    i.lm5_1 = it;
    return i;
  };
  TextInputController$slambda.$metadata$ = classMeta('TextInputController$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function TextInputController$slambda_0(this$0, resultContinuation) {
    var i = new TextInputController$slambda(this$0, resultContinuation);
    var l = function (it, $cont) {
      return i.ngm(it, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function TextInputController$slambda_1(this$0, resultContinuation) {
    this.vm5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  TextInputController$slambda_1.prototype.ngm = function (it, $cont) {
    var tmp = this.ogm(it, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  TextInputController$slambda_1.prototype.w7 = function (p1, $cont) {
    return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
  };
  TextInputController$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 = 6;
            if (!this.vm5_1.bm5())
              return Unit_getInstance();
            this.xm5_1 = this.wm5_1.gc6_1;
            this.ym5_1 = this.xm5_1.q2_1;
            if (((this.ym5_1 === 25 ? true : this.ym5_1 === 44) ? true : this.ym5_1 === 48) ? true : this.ym5_1 === 23) {
              if (this.vm5_1.lm6(this.wm5_1)) {
                this.zm5_1 = this.wm5_1.gc6_1;
                this.am6_1 = this.zm5_1.q2_1;
                if (this.am6_1 === 48) {
                  if (this.wm5_1.jc6_1) {
                    this.vm5_1.km6();
                  } else {
                    this.vm5_1.jm6();
                  }
                  this.o7_1 = 3;
                  continue $sm;
                } else {
                  if (this.am6_1 === 25) {
                    this.o7_1 = 2;
                    var tmp_0 = _get_gameWindow__b33wdz(this.vm5_1);
                    var tmp_1 = this.vm5_1.im6();
                    suspendResult = tmp_0.yci(TextClipboardData_init_$Create$(tmp_1, null, 2, null), this);
                    if (suspendResult === get_COROUTINE_SUSPENDED()) {
                      return suspendResult;
                    }
                    continue $sm;
                  } else {
                    if (this.am6_1 === 44) {
                      this.o7_1 = 1;
                      suspendResult = _get_gameWindow__b33wdz(this.vm5_1).zci(this);
                      if (suspendResult === get_COROUTINE_SUSPENDED()) {
                        return suspendResult;
                      }
                      continue $sm;
                    } else {
                      if (this.am6_1 === 23) {
                        this.vm5_1.hm6();
                        this.o7_1 = 3;
                        continue $sm;
                      } else {
                        this.o7_1 = 3;
                        continue $sm;
                      }
                    }
                  }
                }
              } else {
                this.o7_1 = 4;
                continue $sm;
              }
            } else {
              if (this.ym5_1 === 59 ? true : this.ym5_1 === 61) {
                var range = this.vm5_1.pm4();
                if (get_length(range) > 0) {
                  this.vm5_1.gck(withoutRange(this.vm5_1.u67(), range));
                  this.vm5_1.rkk(range.r1_1);
                } else {
                  if (this.wm5_1.gc6_1.equals(Key_BACKSPACE_getInstance())) {
                    if (this.vm5_1.gm6() > 0) {
                      var oldCursorIndex = this.vm5_1.gm6();
                      this.vm5_1.gck(withoutIndex(this.vm5_1.u67(), this.vm5_1.gm6() - 1 | 0));
                      this.vm5_1.rkk(oldCursorIndex - 1 | 0);
                    }
                  } else {
                    if (this.vm5_1.gm6() < this.vm5_1.u67().length) {
                      this.vm5_1.gck(withoutIndex(this.vm5_1.u67(), this.vm5_1.gm6()));
                    }
                  }
                }
                this.o7_1 = 5;
                continue $sm;
              } else {
                if (this.ym5_1 === 63) {
                  if (this.vm5_1.em6(this.wm5_1)) {
                    this.vm5_1.bm6(this.wm5_1.jc6_1, 0);
                  } else {
                    this.vm5_1.bm6(this.wm5_1.jc6_1, this.vm5_1.fm6(this.vm5_1.rm4(), this.vm5_1.cm6(this.wm5_1)));
                  }
                  this.o7_1 = 5;
                  continue $sm;
                } else {
                  if (this.ym5_1 === 62) {
                    if (this.vm5_1.em6(this.wm5_1)) {
                      this.vm5_1.bm6(this.wm5_1.jc6_1, this.vm5_1.u67().length);
                    } else {
                      this.vm5_1.bm6(this.wm5_1.jc6_1, this.vm5_1.dm6(this.vm5_1.rm4(), this.vm5_1.cm6(this.wm5_1)));
                    }
                    this.o7_1 = 5;
                    continue $sm;
                  } else {
                    if (this.ym5_1 === 74) {
                      this.vm5_1.bm6(this.wm5_1.jc6_1, 0);
                      this.o7_1 = 5;
                      continue $sm;
                    } else {
                      if (this.ym5_1 === 75) {
                        this.vm5_1.bm6(this.wm5_1.jc6_1, this.vm5_1.u67().length);
                        this.o7_1 = 5;
                        continue $sm;
                      } else {
                        this.o7_1 = 5;
                        continue $sm;
                      }
                    }
                  }
                }
              }
            }

            break;
          case 1:
            var tmp2_safe_receiver = (suspendResult == null ? true : suspendResult instanceof TextClipboardData) ? suspendResult : null;
            var rtext = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qcj_1;
            if (!(rtext == null)) {
              this.vm5_1.mm5(rtext);
            }

            this.o7_1 = 3;
            continue $sm;
          case 2:
            this.o7_1 = 3;
            continue $sm;
          case 3:
            this.o7_1 = 4;
            continue $sm;
          case 4:
            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);
  };
  TextInputController$slambda_1.prototype.ogm = function (it, completion) {
    var i = new TextInputController$slambda_1(this.vm5_1, completion);
    i.wm5_1 = it;
    return i;
  };
  TextInputController$slambda_1.$metadata$ = classMeta('TextInputController$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
  function TextInputController$slambda_2(this$0, resultContinuation) {
    var i = new TextInputController$slambda_1(this$0, resultContinuation);
    var l = function (it, $cont) {
      return i.ngm(it, $cont);
    };
    l.$arity = 1;
    return l;
  }
  function TextInputController$lambda_1(this$0) {
    return function (it) {
      this$0.ekk_1.k54(this$0);
      var tmp0_safe_receiver = this$0.vkj_1;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = Unit_getInstance();
      } else {
        tmp0_safe_receiver.zit_1 = true;
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function TextInputController$lambda_2(this$0) {
    return function (it) {
      this$0.fkk_1.k54(this$0);
      var tmp0_safe_receiver = this$0.vkj_1;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = Unit_getInstance();
      } else {
        tmp0_safe_receiver.zit_1 = false;
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function TextInputController$lambda_3(this$0) {
    return function (it) {
      this$0.rkk(this$0.mm6(it.gh1()));
      this$0.hii(true);
      return Unit_getInstance();
    };
  }
  function TextInputController$lambda_4(this$0) {
    return function (it) {
      this$0.rkk(this$0.mm6(it.gh1()));
      return Unit_getInstance();
    };
  }
  function TextInputController$lambda_5(this$0) {
    return function (it) {
      var tmp;
      if (this$0.bm5()) {
        this$0.hii(false);
        blur(this$0);
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function TextInputController$lambda_6(this$0) {
    return function (it) {
      var tmp;
      if (this$0.bm5() ? it.kh1() : false) {
        this$0.um4(this$0.mm6(it.gh1()));
        it.ic3();
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function TextInputController$lambda_7(it) {
    return Unit_getInstance();
  }
  function TextInputController$lambda_8(this$0) {
    return function (it) {
      var index = this$0.mm6(it.gh1());
      this$0.am5(this$0.fm6(index, true), this$0.dm6(index, true));
      return Unit_getInstance();
    };
  }
  function TextInputController(textView, caretContainer, eventHandler, bg) {
    this.skj_1 = textView;
    this.tkj_1 = caretContainer;
    this.ukj_1 = eventHandler;
    this.vkj_1 = bg;
    var tmp = this;
    tmp.wkj_1 = SoftKeyboardConfig_init_$Create$(null, null, null, null, null, null, false, null, null, null, false, 2047, null);
    set_focusable(this.skj_1, this);
    this.xkj_1 = this.skj_1.u67();
    this.ykj_1 = new CancellableGroup();
    var tmp_0 = this;
    tmp_0.zkj_1 = Signal_init_$Create$(null, 1, null);
    var tmp_1 = this;
    tmp_1.akk_1 = Signal_init_$Create$(null, 1, null);
    var tmp_2 = this;
    tmp_2.bkk_1 = Signal_init_$Create$(null, 1, null);
    var tmp_3 = this;
    tmp_3.ckk_1 = Signal_init_$Create$(null, 1, null);
    var tmp_4 = this;
    tmp_4.dkk_1 = Signal_init_$Create$(null, 1, null);
    var tmp_5 = this;
    tmp_5.ekk_1 = Signal_init_$Create$(null, 1, null);
    var tmp_6 = this;
    tmp_6.fkk_1 = Signal_init_$Create$(null, 1, null);
    var tmp_7 = this;
    tmp_7.gkk_1 = Signal_init_$Create$(null, 1, null);
    var tmp_8 = this;
    var tmp$ret$5;
    // Inline function 'kotlin.also' call
    var tmp$ret$4;
    // Inline function 'com.soywiz.korge.view.debug.debugVertexView' call
    var tmp0_debugVertexView = this.tkj_1;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.listOf' call
    tmp$ret$0 = emptyList();
    var tmp1_debugVertexView = tmp$ret$0;
    var tmp2_debugVertexView = Colors_getInstance().s7z_1;
    var tmp3_debugVertexView = DrawType_TRIANGLE_STRIP_getInstance();
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new DebugVertexView(tmp1_debugVertexView, tmp2_debugVertexView, tmp3_debugVertexView);
    var tmp$ret$2;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, tmp0_debugVertexView);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.debug.debugVertexView.<anonymous>' call
    tmp$ret$1 = Unit_getInstance();
    tmp$ret$2 = tmp0_apply;
    tmp$ret$3 = tmp$ret$2;
    tmp$ret$4 = tmp$ret$3;
    var tmp4_also = tmp$ret$4;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.TextInputController.caret.<anonymous>' call
    tmp4_also.dhc(Companion_getInstance_10().yg8_1);
    tmp4_also.tch(false);
    tmp$ret$5 = tmp4_also;
    tmp_8.hkk_1 = tmp$ret$5;
    this.ikk_1 = Companion_getInstance_9().d74(3.0, 2.0, 2.0, 2.0);
    var tmp0_this = this;
    var tmp_9 = TextInputController$lambda;
    tmp0_this.ykj_1.rj2(onNewAttachDetach$default(this.skj_1, null, tmp_9, null, 5, null));
    this.gkk_1.k54(this);
    var tmp_10 = this;
    tmp_10.jkk_1 = HistoryStack_init_$Create$(0, 0, 3, null);
    this.kkk_1 = isBlank(this.skj_1.u67());
    this.lkk_1 = '';
    this.mkk_1 = color$factory(this.skj_1);
    this.nkk_1 = this.xkj_1.length;
    this.okk_1 = this.nkk_1;
    this.pkk_1 = 0;
    var tmp_11 = this;
    tmp_11.qkk_1 = TextInputController$acceptTextChange$lambda;
    set_cursor(this.ukj_1, Cursor_TEXT_getInstance());
    var tmp0_this_0 = this;
    var tmp_12 = get_timers(this.ukj_1);
    var tmp$ret$6;
    // Inline function 'com.soywiz.klock.seconds' call
    tmp$ret$6 = Companion_getInstance_0().c1i(0.5);
    var tmp_13 = tmp$ret$6;
    tmp0_this_0.ykj_1.rj2(tmp_12.ai4(tmp_13, TextInputController$lambda_0(this)));
    var tmp1_this = this;
    var tmp$ret$8;
    // Inline function 'com.soywiz.korge.input.newKeys' call
    var tmp0_newKeys = this.ukj_1;
    var tmp$ret$7;
    // Inline function 'kotlin.also' call
    var tmp0_also = new KeysEvents(tmp0_newKeys);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.korge.input.newKeys.<anonymous>' call
    tmp0_newKeys.lg8(tmp0_also);
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.TextInputController.<anonymous>' call
    tmp0_also.ugo(TextInputController$slambda_0(this, null));
    tmp0_also.sgo(TextInputController$slambda_2(this, null));
    tmp$ret$7 = tmp0_also;
    tmp$ret$8 = tmp$ret$7;
    tmp1_this.ykj_1.igh(tmp$ret$8);
    var tmp2_this = this;
    var tmp$ret$10;
    // Inline function 'com.soywiz.korge.input.newMouse' call
    var tmp1_newMouse = this.ukj_1;
    var tmp$ret$9;
    // Inline function 'kotlin.also' call
    var tmp0_also_0 = new MouseEvents(tmp1_newMouse);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.korge.input.newMouse.<anonymous>' call
    tmp1_newMouse.lg8(tmp0_also_0);
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.text.TextInputController.<anonymous>' call
    var tmp0_safe_receiver = this.vkj_1;
    if (tmp0_safe_receiver == null) {
    } else
      tmp0_safe_receiver.zit_1 = false;
    this.fkk_1.k54(this);
    tmp0_also_0.lgd_1.j54(TextInputController$lambda_1(this));
    tmp0_also_0.mgd_1.j54(TextInputController$lambda_2(this));
    tmp0_also_0.jgd_1.j54(TextInputController$lambda_3(this));
    tmp0_also_0.ngd_1.j54(TextInputController$lambda_4(this));
    tmp0_also_0.ogd_1.j54(TextInputController$lambda_5(this));
    tmp0_also_0.wgd_1.j54(TextInputController$lambda_6(this));
    tmp0_also_0.rgd_1.j54(TextInputController$lambda_7);
    doubleClick(tmp0_also_0, TextInputController$lambda_8(this));
    tmp$ret$9 = tmp0_also_0;
    tmp$ret$10 = tmp$ret$9;
    tmp2_this.ykj_1.igh(tmp$ret$10);
    this.nm6();
  }
  TextInputController.prototype.om6 = function () {
    return this.vkj_1;
  };
  TextInputController.prototype.pgs = function () {
    return this.skj_1.pgs();
  };
  TextInputController.prototype.fii = function (_this__u8e3s4) {
    return this.skj_1;
  };
  TextInputController.prototype.pm6 = function () {
    return this.zkj_1;
  };
  TextInputController.prototype.qm6 = function () {
    return this.akk_1;
  };
  TextInputController.prototype.rm6 = function () {
    return this.bkk_1;
  };
  TextInputController.prototype.sm6 = function () {
    return this.ekk_1;
  };
  TextInputController.prototype.tm6 = function () {
    return this.fkk_1;
  };
  TextInputController.prototype.ikl = function (v) {
    this.lkk_1 = v;
    if (this.kkk_1) {
      var tmp = this.bm5() ? '' : this.lkk_1;
      var snapshot = setTextNoSnapshot$default(this, tmp, null, 4, null);
      if (!(snapshot == null)) {
        this.jkk_1.n4r(snapshot);
      }
    }
  };
  TextInputController.prototype.gck = function (value) {
    this.kkk_1 = isBlank(value);
    var tmp = (this.kkk_1 ? !this.bm5() : false) ? this.lkk_1 : value;
    var snapshot = setTextNoSnapshot$default(this, tmp, null, 4, null);
    if (!(snapshot == null)) {
      this.jkk_1.n4r(snapshot);
    }
  };
  TextInputController.prototype.u67 = function () {
    return this.kkk_1 ? '' : this.skj_1.u67();
  };
  TextInputController.prototype.jm6 = function () {
    var tmp0_safe_receiver = this.jkk_1.o4r();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.ym4(this);
    }
  };
  TextInputController.prototype.km6 = function () {
    var tmp0_safe_receiver = this.jkk_1.p4r();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.ym4(this);
    }
  };
  TextInputController.prototype.mm5 = function (substr) {
    var tmp = withoutRange(this.u67(), this.pm4());
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.rm4();
    var tmp1_min = this.tm4();
    tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
    this.gck(withInsertion(tmp, tmp$ret$0, substr));
    var tmp0_this = this;
    tmp0_this.rkk(tmp0_this.gm6() + substr.length | 0);
  };
  TextInputController.prototype.om4 = function (value) {
    this.skj_1.xih(value);
    this.nm6();
  };
  TextInputController.prototype.r8w = function () {
    var tmp = this.skj_1.sig_1;
    return isInterface(tmp, Font) ? tmp : THROW_CCE();
  };
  TextInputController.prototype.yih = function (value) {
    this.skj_1.yih(value);
    this.nm6();
  };
  TextInputController.prototype.nm4 = function () {
    return this.skj_1.tig_1;
  };
  TextInputController.prototype.jkl = function (_set____db54di) {
    var tmp0_setValue = textColor$factory();
    return this.mkk_1.set(new RGBA(_set____db54di));
  };
  TextInputController.prototype.um6 = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.getValue' call
    var tmp0_getValue = textColor$factory_0();
    tmp$ret$0 = this.mkk_1.get().n8k_1;
    return tmp$ret$0;
  };
  TextInputController.prototype.sm4 = function (value) {
    this.nkk_1 = clampIndex(this, value);
    this.nm6();
  };
  TextInputController.prototype.rm4 = function () {
    return this.nkk_1;
  };
  TextInputController.prototype.um4 = function (value) {
    this.okk_1 = clampIndex(this, value);
    this.nm6();
  };
  TextInputController.prototype.tm4 = function () {
    return this.okk_1;
  };
  TextInputController.prototype.rkk = function (value) {
    var value_0 = clampIndex(this, value);
    this.nkk_1 = value_0;
    this.okk_1 = value_0;
    this.nm6();
  };
  TextInputController.prototype.gm6 = function () {
    return this.rm4();
  };
  TextInputController.prototype.am5 = function (start, end) {
    this.nkk_1 = clampIndex(this, start);
    this.okk_1 = clampIndex(this, end);
    this.nm6();
  };
  TextInputController.prototype.zm4 = function (range) {
    this.am5(range.r1_1, range.s1_1 + 1 | 0);
  };
  TextInputController.prototype.hm6 = function () {
    this.am5(0, this.u67().length);
  };
  TextInputController.prototype.vm4 = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.math.absoluteValue' call
    var tmp0__get_absoluteValue__nukmtt = this.tm4() - this.rm4() | 0;
    tmp$ret$0 = abs(tmp0__get_absoluteValue__nukmtt);
    return tmp$ret$0;
  };
  TextInputController.prototype.im6 = function () {
    var tmp$ret$3;
    // Inline function 'kotlin.text.substring' call
    var tmp4_substring = this.u67();
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.rm4();
    var tmp1_min = this.tm4();
    tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
    var tmp5_substring = tmp$ret$0;
    var tmp$ret$1;
    // Inline function 'kotlin.math.max' call
    var tmp2_max = this.rm4();
    var tmp3_max = this.tm4();
    tmp$ret$1 = Math.max(tmp2_max, tmp3_max);
    var tmp6_substring = tmp$ret$1;
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = tmp4_substring;
    tmp$ret$3 = tmp$ret$2.substring(tmp5_substring, tmp6_substring);
    return tmp$ret$3;
  };
  TextInputController.prototype.qm4 = function (value) {
    this.zm4(value);
  };
  TextInputController.prototype.pm4 = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.rm4();
    var tmp1_min = this.tm4();
    tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
    var tmp = tmp$ret$0;
    var tmp$ret$1;
    // Inline function 'kotlin.math.max' call
    var tmp2_max = this.rm4();
    var tmp3_max = this.tm4();
    tmp$ret$1 = Math.max(tmp2_max, tmp3_max);
    return until(tmp, tmp$ret$1);
  };
  TextInputController.prototype.vm6 = function (index) {
    var tmp0_this = this.skj_1;
    tmp0_this.gck(tmp0_this.u67() + 'X');
    var glyphPositions = this.skj_1.qjz().f8r_1;
    var tmp$ret$1;
    // Inline function 'kotlin.text.substring' call
    var tmp0_substring = this.skj_1.u67();
    var tmp1_substring = this.skj_1.u67().length - 1 | 0;
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = tmp0_substring;
    tmp$ret$1 = tmp$ret$0.substring(0, tmp1_substring);
    this.skj_1.gck(tmp$ret$1);
    if (glyphPositions.p()) {
      return Bezier_init_$Create$([Companion_getInstance_11().zp(), Companion_getInstance_11().zp()]);
    }
    var tmp$ret$2;
    // Inline function 'kotlin.math.min' call
    var tmp2_min = glyphPositions.i() - 1 | 0;
    tmp$ret$2 = Math.min(index, tmp2_min);
    var glyph = glyphPositions.m(tmp$ret$2);
    return index < glyphPositions.i() ? glyph.f8u() : glyph.g8u();
  };
  TextInputController.prototype.mm6 = function (pos) {
    var glyphPositions = this.skj_1.qjz().f8r_1;
    var index = 0;
    DoubleCompanionObject_getInstance();
    var minDist = Infinity;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp$ret$0 = !glyphPositions.p();
    if (tmp$ret$0) {
      var inductionVariable = 0;
      var last = glyphPositions.i();
      if (inductionVariable <= last)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$1;
          // Inline function 'kotlin.math.min' call
          var tmp0_min = glyphPositions.i() - 1 | 0;
          tmp$ret$1 = Math.min(tmp0_min, n);
          var glyph = glyphPositions.m(tmp$ret$1);
          var dist = glyph.j8u(pos, null, 2, null);
          if (minDist > dist) {
            minDist = dist;
            index = ((n >= (glyphPositions.i() - 1 | 0) ? !(dist === 0.0) : false) ? glyph.i8u(pos, false) < glyph.i8u(pos, true) : false) ? n + 1 | 0 : n;
          }
        }
         while (!(n === last));
    }
    return index;
  };
  TextInputController.prototype.nm6 = function () {
    var range = this.pm4();
    var array = new PointArrayList(2);
    if (range.p()) {
      var last = range.r1_1 >= this.u67().length;
      var caret = this.vm6(range.r1_1);
      var sign = last ? -1.0 : 1.0;
      var normal = caret.q7h(0.0, null, 2, null).x7a(1 * sign);
      var tmp = caret.h7c();
      var p0 = firstPoint$default(tmp, null, 1, null);
      var tmp_0 = caret.h7c();
      var p1 = lastPoint$default(tmp_0, null, 1, null);
      array.u7b(p0.w7a(normal));
      array.u7b(p1.w7a(normal));
      array.u7b(p0.v7a(normal));
      array.u7b(p1.v7a(normal));
    } else {
      var inductionVariable = range.r1_1;
      var last_0 = range.s1_1 + 1 | 0;
      if (inductionVariable <= last_0)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var caret_0 = this.vm6(n);
          var tmp_1 = caret_0.h7c();
          var p0_0 = firstPoint$default(tmp_1, null, 1, null);
          var tmp_2 = caret_0.h7c();
          var p1_0 = lastPoint$default(tmp_2, null, 1, null);
          array.u7b(p0_0);
          array.u7b(p1_0);
        }
         while (!(n === last_0));
    }
    this.hkk_1.x8j(Colors_getInstance().s7z_1);
    this.hkk_1.ik5(listOf(array));
    this.hkk_1.tch(this.bm5());
    this.skj_1.dg8();
  };
  TextInputController.prototype.bm6 = function (selection, index) {
    if (selection) {
      this.sm4(index);
    } else {
      this.rkk(index);
    }
  };
  TextInputController.prototype.wm6 = function (index, direction, word) {
    var dir = get_sign(direction);
    if (word) {
      var sidx = index + dir | 0;
      var idx = sidx;
      while (true) {
        if (!(0 <= idx ? idx <= (charSequenceLength(this.u67()) - 1 | 0) : false)) {
          if (dir < 0) {
            return idx - dir | 0;
          } else {
            return idx;
          }
        }
        if (!isLetterOrDigit(charSequenceGet(this.u67(), idx))) {
          if (dir < 0) {
            if (idx === sidx)
              return idx;
            return idx - dir | 0;
          } else {
            return idx;
          }
        }
        idx = idx + dir | 0;
      }
    }
    return index + dir | 0;
  };
  TextInputController.prototype.fm6 = function (index, word) {
    return this.wm6(index, -1, word);
  };
  TextInputController.prototype.dm6 = function (index, word) {
    return this.wm6(index, 1, word);
  };
  TextInputController.prototype.gii = function () {
    return this.pkk_1;
  };
  TextInputController.prototype.hii = function (value) {
    if (value === this.bm5())
      return Unit_getInstance();
    var tmp0_safe_receiver = this.vkj_1;
    if (tmp0_safe_receiver == null) {
    } else
      tmp0_safe_receiver.yit_1 = value;
    if (value) {
      var tmp1_safe_receiver = this.pgs();
      if (!equals(tmp1_safe_receiver == null ? null : get_uiFocusedView(tmp1_safe_receiver), this)) {
        var tmp2_safe_receiver = this.pgs();
        var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : get_uiFocusedView(tmp2_safe_receiver);
        if (tmp3_safe_receiver == null)
          null;
        else {
          blur(tmp3_safe_receiver);
        }
        var tmp4_safe_receiver = this.pgs();
        if (tmp4_safe_receiver == null) {
        } else {
          set_uiFocusedView(tmp4_safe_receiver, this);
        }
      }
      this.hkk_1.tch(true);
      var tmp5_safe_receiver = this.pgs();
      var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : get_uiFocusManager(tmp5_safe_receiver);
      if (tmp6_safe_receiver == null)
        null;
      else {
        tmp6_safe_receiver.nii(true, this);
      }
    } else {
      var tmp7_safe_receiver = this.pgs();
      if (equals(tmp7_safe_receiver == null ? null : get_uiFocusedView(tmp7_safe_receiver), this)) {
        var tmp8_safe_receiver = this.pgs();
        if (tmp8_safe_receiver == null) {
        } else {
          set_uiFocusedView(tmp8_safe_receiver, null);
        }
        this.hkk_1.tch(false);
        var tmp9_safe_receiver = this.pgs();
        var tmp = tmp9_safe_receiver == null ? null : get_uiFocusedView(tmp9_safe_receiver);
        if (!(!(tmp == null) ? isInterface(tmp, ISoftKeyboardConfig) : false)) {
          var tmp10_safe_receiver = this.pgs();
          var tmp11_safe_receiver = tmp10_safe_receiver == null ? null : get_uiFocusManager(tmp10_safe_receiver);
          if (tmp11_safe_receiver == null)
            null;
          else {
            tmp11_safe_receiver.nii(false, null);
          }
        }
      }
    }
    if (value) {
      this.ckk_1.k54(this);
    } else {
      this.dkk_1.k54(this);
    }
    if (this.kkk_1) {
      var tmp_0 = this.bm5() ? '' : this.lkk_1;
      var snapshot = setTextNoSnapshot$default(this, tmp_0, null, 4, null);
      if (!(snapshot == null)) {
        this.jkk_1.n4r(snapshot);
      }
    }
  };
  TextInputController.prototype.bm5 = function () {
    var tmp0_safe_receiver = this.pgs();
    return equals(tmp0_safe_receiver == null ? null : get_uiFocusedView(tmp0_safe_receiver), this);
  };
  TextInputController.prototype.cm6 = function (_this__u8e3s4) {
    return Companion_getInstance_12().z4y().y4y() ? _this__u8e3s4.lc6_1 : _this__u8e3s4.kc6_1;
  };
  TextInputController.prototype.em6 = function (_this__u8e3s4) {
    return _this__u8e3s4.mc6_1 ? Companion_getInstance_12().z4y().y4y() : false;
  };
  TextInputController.prototype.lm6 = function (_this__u8e3s4) {
    return Companion_getInstance_12().z4y().y4y() ? _this__u8e3s4.mc6_1 : _this__u8e3s4.kc6_1;
  };
  TextInputController.prototype.x2c = function () {
    set_cursor(this.skj_1, null);
    cancel(this.ykj_1);
    set_focusable(this.skj_1, null);
  };
  TextInputController.$metadata$ = classMeta('TextInputController', [Closeable, UIFocusable, ISoftKeyboardConfig]);
  function color$factory($b0) {
    return getPropertyCallableRef('color', 0, KMutableProperty0, function () {
      return new RGBA($b0.s9g());
    }, function (value) {
      return $b0.zih(value.n8k_1);
    });
  }
  function textColor$factory() {
    return getPropertyCallableRef('textColor', 1, KMutableProperty1, function (receiver) {
      return new RGBA(receiver.um6());
    }, function (receiver, value) {
      return receiver.jkl(value.n8k_1);
    });
  }
  function textColor$factory_0() {
    return getPropertyCallableRef('textColor', 1, KMutableProperty1, function (receiver) {
      return new RGBA(receiver.um6());
    }, function (receiver, value) {
      return receiver.jkl(value.n8k_1);
    });
  }
  function updateText($this) {
    var tmp$ret$1;
    // Inline function 'kotlin.with' call
    var tmp0_with = $this.pl6_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.AvatarView.updateText.<anonymous>' call
    var count = $this.rl6_1;
    var tmp;
    if (count === 0) {
      tmp = $this.ql6_1;
    } else {
      tmp = $this.ql6_1 + ' (' + count + ')';
    }
    tmp0_with.gck(tmp);
    tmp$ret$0 = position(tmp0_with, -tmp0_with.d72() / 2, -tmp0_with.e72() / 2);
    tmp$ret$1 = tmp$ret$0;
  }
  function onClick($this) {
    get_gamesCupboardClient().rln().kkl($this.ll6_1);
  }
  function bubblePosition($this, bubble) {
    var main = $this.ol6_1;
    var tmp0_subject = $this.ml6_1;
    {
      var local;
      switch (tmp0_subject) {
        case 0:
          local = new Point(0.0, main.e72() / 2 + bubble.e72() / 2 + 10);
          break;
        case 1:
          local = new Point(-main.d72() / 2 - bubble.d72() / 2 - 10, 0.0);
          break;
        case 2:
          local = new Point(0.0, -main.e72() / 2 - bubble.e72() / 2 - 10);
          break;
        default:
          local = new Point(main.d72() / 2 + bubble.d72() / 2 + 10, 0.0);
          break;
      }
    }
    var tmp$ret$1;
    // Inline function 'kotlin.math.min' call
    var tmp2_min = get_playingAreaWidth() - bubble.d72() / 2;
    var tmp$ret$0;
    // Inline function 'kotlin.math.max' call
    var tmp0_max = bubble.d72() / 2;
    var tmp1_max = local.y72_1 + $this.d1n();
    tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
    var tmp3_min = tmp$ret$0;
    tmp$ret$1 = Math.min(tmp2_min, tmp3_min);
    var tmp = tmp$ret$1;
    var tmp$ret$3;
    // Inline function 'kotlin.math.min' call
    var tmp6_min = get_playingAreaHeight() - bubble.e72() / 2;
    var tmp$ret$2;
    // Inline function 'kotlin.math.max' call
    var tmp4_max = bubble.e72() / 2;
    var tmp5_max = local.z72_1 + $this.e1n();
    tmp$ret$2 = Math.max(tmp4_max, tmp5_max);
    var tmp7_min = tmp$ret$2;
    tmp$ret$3 = Math.min(tmp6_min, tmp7_min);
    return new Point(tmp, tmp$ret$3);
  }
  function AvatarView$lambda(this$0) {
    return function (it) {
      onClick(this$0);
      return Unit_getInstance();
    };
  }
  function _interpolate$ref_7() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function AvatarView$speak$lambda(this$0, $bubble) {
    return function () {
      this$0.ai0($bubble);
      return Unit_getInstance();
    };
  }
  function _interpolate$ref_8() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_9() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function AvatarView(id, player, bgColor, side) {
    GameObjectView.call(this, id);
    this.ll6_1 = player;
    this.ml6_1 = side;
    var tmp = this;
    var tmp_0;
    if (this.ll6_1.e1r_1 === localPlayerId()) {
      var tmp$ret$0;
      // Inline function 'kotlin.apply' call
      var tmp_1 = new RGBA(get_avatarBorderColor());
      var tmp0_apply = RoundRect_init_$Create$(104.0, 44.0, 8.0, 0.0, tmp_1, null, 0.0, false, 232, null);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.AvatarView.border.<anonymous>' call
      position(tmp0_apply, -tmp0_apply.d72() / 2, -tmp0_apply.e72() / 2);
      this.shz(tmp0_apply);
      tmp$ret$0 = tmp0_apply;
      tmp_0 = tmp$ret$0;
    } else {
      tmp_0 = null;
    }
    tmp.nl6_1 = tmp_0;
    var tmp_2 = this;
    var tmp$ret$3;
    // Inline function 'com.soywiz.korge.view.roundRect' call
    var tmp0_roundRect = 100.0;
    var tmp1_roundRect = 40.0;
    var tmp2_roundRect = Colors_getInstance().s7z_1;
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = new RoundRect(tmp0_roundRect, tmp1_roundRect, 6.0, 6.0, new RGBA(bgColor), new RGBA(tmp2_roundRect), 0.0, true);
    var tmp$ret$1;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_0 = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.AvatarView.background.<anonymous>' call
    position(tmp0_apply_0, -tmp0_apply_0.d72() / 2, -tmp0_apply_0.e72() / 2);
    tmp$ret$1 = tmp0_apply_0;
    tmp$ret$2 = tmp$ret$1;
    tmp$ret$3 = tmp$ret$2;
    tmp_2.ol6_1 = tmp$ret$3;
    var tmp_3 = this;
    var tmp$ret$6;
    // Inline function 'com.soywiz.korge.view.text' call
    var tmp0_text = this.ll6_1.f1r_1;
    var tmp1_text = get_avatarTextColor();
    var tmp2_text = Companion_getInstance_2().lib_1;
    var tmp3_text = get_DefaultTtfFont();
    var tmp4_text = Companion_getInstance_3().i8s_1;
    var tmp5_text = get_DefaultStringTextRenderer();
    var tmp6_text = Companion_getInstance_2().mib_1;
    var tmp$ret$5;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo_0 = new Text_0(tmp0_text, tmp2_text, tmp1_text, tmp3_text, tmp4_text, tmp5_text, tmp6_text, null, null);
    var tmp$ret$4;
    // Inline function 'kotlin.apply' call
    var tmp0_apply_1 = addTo(tmp0_addTo_0, this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.AvatarView.textView.<anonymous>' call
    position(tmp0_apply_1, -tmp0_apply_1.d72() / 2, -tmp0_apply_1.e72() / 2);
    tmp$ret$4 = tmp0_apply_1;
    tmp$ret$5 = tmp$ret$4;
    tmp$ret$6 = tmp$ret$5;
    tmp_3.pl6_1 = tmp$ret$6;
    var tmp_4 = get_mouse(this).kgd_1;
    tmp_4.d54(AvatarView$lambda(this));
    this.ql6_1 = this.ll6_1.f1r_1;
    this.rl6_1 = 0;
  }
  AvatarView.prototype.sl6 = function (v) {
    this.ql6_1 = v;
    updateText(this);
  };
  AvatarView.prototype.xm6 = function () {
    return this.ql6_1;
  };
  AvatarView.prototype.flf = function (v) {
    this.rl6_1 = v;
    updateText(this);
  };
  AvatarView.prototype.ym6 = function () {
    return this.rl6_1;
  };
  AvatarView.prototype.flt = function (point) {
    return ((point.y72_1 >= this.d1n() - this.ol6_1.d72() / 2 ? point.y72_1 <= this.d1n() + this.ol6_1.d72() / 2 : false) ? point.z72_1 >= this.e1n() - this.ol6_1.e72() / 2 : false) ? point.z72_1 <= this.e1n() + this.ol6_1.e72() / 2 : false;
  };
  AvatarView.prototype.qln = function (message, toAvatar) {
    var bubble = speechBubble(get_gamesCupboardClient().lkd_1, message);
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.view.position' call
    var tmp0_position = bubblePosition(this, bubble);
    tmp$ret$0 = position(bubble, tmp0_position.d1n(), tmp0_position.e1n());
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.tween.get' call
    var tmp1_get = alpha$factory(bubble);
    var tmp = _interpolate$ref_7();
    tmp$ret$1 = V2_init_$Create$(tmp1_get, 0.0, 1.0, tmp, true, null, null, null, 224, null);
    var tmp_0 = [tmp$ret$1];
    var tmp_1 = get_bubbleDuration();
    var tmp_2 = get_bubbleEase();
    var tmp_3 = new OnFinishEase(tmp_2, AvatarView$speak$lambda(this, bubble));
    launchTween$default(bubble, tmp_0, tmp_1, tmp_3, null, 8, null);
    if (!(toAvatar == null)) {
      var to = bubblePosition(toAvatar, bubble);
      var tmp$ret$2;
      // Inline function 'com.soywiz.korge.tween.get' call
      var tmp2_get = x$factory_3(bubble);
      var tmp3_get = to.d1n();
      var tmp_4 = tmp2_get.get();
      var tmp_5 = _interpolate$ref_8();
      tmp$ret$2 = V2_init_$Create$(tmp2_get, tmp_4, tmp3_get, tmp_5, false, null, null, null, 224, null);
      var tmp_6 = tmp$ret$2;
      var tmp$ret$3;
      // Inline function 'com.soywiz.korge.tween.get' call
      var tmp4_get = y$factory_1(bubble);
      var tmp5_get = to.e1n();
      var tmp_7 = tmp4_get.get();
      var tmp_8 = _interpolate$ref_9();
      tmp$ret$3 = V2_init_$Create$(tmp4_get, tmp_7, tmp5_get, tmp_8, false, null, null, null, 224, null);
      var tmp_9 = [tmp_6, tmp$ret$3];
      var tmp$ret$4;
      // Inline function 'com.soywiz.klock.seconds' call
      tmp$ret$4 = Companion_getInstance_0().c1i(0.5);
      var tmp_10 = tmp$ret$4;
      launchTween$default(bubble, tmp_9, tmp_10, null, null, 12, null);
    }
  };
  AvatarView.prototype.sln = function (message, toAvatar, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      toAvatar = null;
    return this.qln(message, toAvatar);
  };
  AvatarView.$metadata$ = classMeta('AvatarView', undefined, undefined, undefined, undefined, GameObjectView.prototype);
  function alpha$factory($b0) {
    return getPropertyCallableRef('alpha', 0, KMutableProperty0, function () {
      return $b0.ea2();
    }, function (value) {
      return $b0.egh(value);
    });
  }
  function x$factory_3($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 BinView(id, bitmap) {
    ImageObjectView.call(this, id, bitmap);
  }
  BinView.prototype.hlt = function (playingArea) {
    send_0(RestoreFromBin_getInstance());
  };
  BinView.$metadata$ = classMeta('BinView', undefined, undefined, undefined, undefined, ImageObjectView.prototype);
  function FlippableImageObjectView(id, faceUpImage, faceDownImage, isFaceUp) {
    GridImageObjectView.call(this, id, isFaceUp ? faceUpImage : faceDownImage);
    this.gle_1 = faceUpImage;
    this.hle_1 = faceDownImage;
    this.ile_1 = isFaceUp;
  }
  FlippableImageObjectView.prototype.jle = function (v) {
    if (!(this.ile_1 === v)) {
      this.ile_1 = v;
      if (v) {
        this.kmc_1.pj2(this.gle_1);
      } else {
        this.kmc_1.pj2(this.hle_1);
      }
      playSound_0(v ? get_FACE_UP() : get_FACE_DOWN());
    }
  };
  FlippableImageObjectView.prototype.u1s = function () {
    return this.ile_1;
  };
  FlippableImageObjectView.prototype.hlt = function (playingArea) {
    this.jle(!this.ile_1);
    send_0(new FaceUpOrDown(this.ilb_1, this.ile_1));
  };
  FlippableImageObjectView.$metadata$ = classMeta('FlippableImageObjectView', undefined, undefined, undefined, undefined, GridImageObjectView.prototype);
  function GameObjectView$_set_commandPrototype_$lambda_r984t9($v) {
    return function (it) {
      var tmp;
      if ($v.a1o_1) {
        send_0(new RunCommand($v.y1n_1, $v.z1n_1));
        tmp = Unit_getInstance();
      } else {
        get_gamesCupboardClient().rln().lkl($v);
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function _interpolate$ref_10() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_11() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function GameObjectView$highlight$lambda(this$0) {
    return function () {
      var tmp$ret$0;
      // Inline function 'com.soywiz.korge.tween.get' call
      var tmp0_get = scale$factory_2(this$0);
      var tmp = tmp0_get.get();
      var tmp_0 = _interpolate$ref_11();
      tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp, 1.0, tmp_0, false, null, null, null, 224, null);
      var tmp0_vs = [tmp$ret$0];
      var tmp1_easing = Companion_getInstance_1().i7u();
      var tmp$ret$1;
      // Inline function 'com.soywiz.klock.milliseconds' call
      var tmp1__get_milliseconds__r2e6ua = get_highlightPeriod();
      tmp$ret$1 = Companion_getInstance_0().o1h(tmp1__get_milliseconds__r2e6ua.cf());
      var tmp2_time = tmp$ret$1;
      launchTween$default(this$0, tmp0_vs, tmp2_time, tmp1_easing, null, 8, null);
      return Unit_getInstance();
    };
  }
  function GameObjectView(id) {
    Container.call(this);
    this.ilb_1 = id;
    this.jlb_1 = '';
    this.klb_1 = false;
    this.llb_1 = false;
    this.mlb_1 = false;
    this.nlb_1 = null;
    this.olb_1 = null;
  }
  GameObjectView.prototype.c1n = function () {
    return this.ilb_1;
  };
  GameObjectView.prototype.zm6 = function (_set____db54di) {
    this.nlb_1 = _set____db54di;
  };
  GameObjectView.prototype.g1l = function () {
    return this.nlb_1;
  };
  GameObjectView.prototype.slp = function (v) {
    this.olb_1 = v;
    if (!(v == null)) {
      var tmp = get_mouse(this).kgd_1;
      tmp.j54(GameObjectView$_set_commandPrototype_$lambda_r984t9(v));
    }
  };
  GameObjectView.prototype.elu = function () {
    return MoveObject_init_$Create$(this.ilb_1, get_gamesCupboardClient().rl8(this.d1n()), get_gamesCupboardClient().sl8(this.e1n()), ChangeZOrder_NO_CHANGE_getInstance());
  };
  GameObjectView.prototype.jlt = function (changeZOrder) {
    return MoveObject_init_$Create$(this.ilb_1, get_gamesCupboardClient().rl8(this.d1n()), get_gamesCupboardClient().sl8(this.e1n()), changeZOrder);
  };
  GameObjectView.prototype.ilt = function () {
    return 1.0;
  };
  GameObjectView.prototype.hlt = function (playingArea) {
  };
  GameObjectView.prototype.pln = function () {
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.tween.get' call
    var tmp0_get = scale$factory_1(this);
    var tmp1_get = get_highlightScale();
    var tmp = tmp0_get.get();
    var tmp_0 = _interpolate$ref_10();
    tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp, tmp1_get, tmp_0, false, null, null, null, 224, null);
    var tmp0_vs = [tmp$ret$0];
    var tmp1_easing = Companion_getInstance_1().i7u();
    var tmp$ret$1;
    // Inline function 'com.soywiz.klock.milliseconds' call
    var tmp2__get_milliseconds__xtspmr = get_highlightPeriod();
    tmp$ret$1 = Companion_getInstance_0().o1h(tmp2__get_milliseconds__xtspmr.cf());
    var tmp2_time = tmp$ret$1;
    launchTweenThen$default(this, tmp0_vs, tmp2_time, tmp1_easing, null, GameObjectView$highlight$lambda(this), 8, null);
  };
  GameObjectView.$metadata$ = classMeta('GameObjectView', undefined, undefined, undefined, undefined, Container.prototype);
  function scale$factory_1($b0) {
    return getPropertyCallableRef('scale', 0, KMutableProperty0, function () {
      return $b0.oi0();
    }, function (value) {
      return $b0.ni0(value);
    });
  }
  function scale$factory_2($b0) {
    return getPropertyCallableRef('scale', 0, KMutableProperty0, function () {
      return $b0.oi0();
    }, function (value) {
      return $b0.ni0(value);
    });
  }
  function GridImageObjectView(id, bitmap) {
    GameObjectView.call(this, id);
    var tmp = this;
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.image' call
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = Image_init_$Create$_0(bitmap, 0.0, 0.0, null, false, 24, null);
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.GridImageObjectView.image.<anonymous>' call
    tmp0_apply.w8w(-tmp0_apply.d72() / 2);
    tmp0_apply.o7c(-tmp0_apply.e72() / 2);
    tmp$ret$0 = tmp0_apply;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    tmp.kmc_1 = tmp$ret$2;
  }
  GridImageObjectView.prototype.flt = function (point) {
    return ((point.y72_1 >= this.d1n() - this.kmc_1.d72() / 2 ? point.y72_1 <= this.d1n() + this.kmc_1.d72() / 2 : false) ? point.z72_1 >= this.e1n() - this.kmc_1.e72() / 2 : false) ? point.z72_1 <= this.e1n() + this.kmc_1.e72() / 2 : false;
  };
  GridImageObjectView.$metadata$ = classMeta('GridImageObjectView', undefined, undefined, undefined, undefined, GameObjectView.prototype);
  function _interpolate$ref_12() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function _interpolate$ref_13() {
    var l = function (p0, p1, p2) {
      return _interpolate(p0, p1, p2);
    };
    l.callableName = '_interpolate';
    return l;
  }
  function ImageObjectView$highlight$lambda(this$0) {
    return function () {
      var tmp$ret$0;
      // Inline function 'com.soywiz.korge.tween.get' call
      var tmp0_get = scale$factory_4(this$0);
      var tmp1_get = this$0.vlh_1;
      var tmp = tmp0_get.get();
      var tmp_0 = _interpolate$ref_13();
      tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp, tmp1_get, tmp_0, false, null, null, null, 224, null);
      var tmp0_vs = [tmp$ret$0];
      var tmp1_easing = Companion_getInstance_1().i7u();
      var tmp$ret$1;
      // Inline function 'com.soywiz.klock.milliseconds' call
      var tmp2__get_milliseconds__xtspmr = get_highlightPeriod();
      tmp$ret$1 = Companion_getInstance_0().o1h(tmp2__get_milliseconds__xtspmr.cf());
      var tmp2_time = tmp$ret$1;
      launchTween$default(this$0, tmp0_vs, tmp2_time, tmp1_easing, null, 8, null);
      return Unit_getInstance();
    };
  }
  function ImageObjectView(id, bitmap) {
    GameObjectView.call(this, id);
    this.vlh_1 = 1.0;
    this.wlh_1 = false;
    this.xlh_1 = false;
    this.ylh_1 = false;
    var tmp = this;
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.image' call
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = Image_init_$Create$(bitmap, 0.0, 0.0, null, false, 24, null);
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.ImageObjectView.image.<anonymous>' call
    tmp0_apply.w8w(-tmp0_apply.d72() / 2);
    tmp0_apply.o7c(-tmp0_apply.e72() / 2);
    tmp$ret$0 = tmp0_apply;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    tmp.zlh_1 = tmp$ret$2;
  }
  ImageObjectView.prototype.um9 = function () {
    return this.wlh_1;
  };
  ImageObjectView.prototype.ulp = function (v) {
    this.xlh_1 = v;
    this.li0(-this.vlh_1);
  };
  ImageObjectView.prototype.vlp = function (v) {
    this.ylh_1 = v;
    this.mi0(-this.vlh_1);
  };
  ImageObjectView.prototype.ilt = function () {
    return this.vlh_1;
  };
  ImageObjectView.prototype.ali = function (to) {
    this.vlh_1 = to;
    this.li0(to);
    this.mi0(this.ylh_1 ? -to : to);
  };
  ImageObjectView.prototype.glt = function (by) {
    this.ali(this.vlh_1 * by);
    return this.vlh_1;
  };
  ImageObjectView.prototype.pln = function () {
    var tmp$ret$0;
    // Inline function 'com.soywiz.korge.tween.get' call
    var tmp0_get = scale$factory_3(this);
    var tmp1_get = this.vlh_1 * get_highlightScale();
    var tmp = tmp0_get.get();
    var tmp_0 = _interpolate$ref_12();
    tmp$ret$0 = V2_init_$Create$(tmp0_get, tmp, tmp1_get, tmp_0, false, null, null, null, 224, null);
    var tmp0_vs = [tmp$ret$0];
    var tmp1_easing = Companion_getInstance_1().i7u();
    var tmp$ret$1;
    // Inline function 'com.soywiz.klock.milliseconds' call
    var tmp2__get_milliseconds__xtspmr = get_highlightPeriod();
    tmp$ret$1 = Companion_getInstance_0().o1h(tmp2__get_milliseconds__xtspmr.cf());
    var tmp2_time = tmp$ret$1;
    launchTweenThen$default(this, tmp0_vs, tmp2_time, tmp1_easing, null, ImageObjectView$highlight$lambda(this), 8, null);
  };
  ImageObjectView.prototype.flt = function (point) {
    return ((point.y72_1 >= this.d1n() - this.zlh_1.d72() / 2 ? point.y72_1 <= this.d1n() + this.zlh_1.d72() / 2 : false) ? point.z72_1 >= this.e1n() - this.zlh_1.e72() / 2 : false) ? point.z72_1 <= this.e1n() + this.zlh_1.e72() / 2 : false;
  };
  ImageObjectView.$metadata$ = classMeta('ImageObjectView', undefined, undefined, undefined, undefined, GameObjectView.prototype);
  function scale$factory_3($b0) {
    return getPropertyCallableRef('scale', 0, KMutableProperty0, function () {
      return $b0.oi0();
    }, function (value) {
      return $b0.ni0(value);
    });
  }
  function scale$factory_4($b0) {
    return getPropertyCallableRef('scale', 0, KMutableProperty0, function () {
      return $b0.oi0();
    }, function (value) {
      return $b0.ni0(value);
    });
  }
  function MultipleImageView(id, images) {
    GameObjectView.call(this, id);
    this.lln_1 = images;
    var tmp = this;
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.image' call
    var tmp0_image = this.lln_1.m(0);
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = Image_init_$Create$_0(tmp0_image, 0.0, 0.0, null, false, 24, null);
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.MultipleImageView.image.<anonymous>' call
    tmp0_apply.w8w(-tmp0_apply.d72() / 2);
    tmp0_apply.o7c(-tmp0_apply.e72() / 2);
    tmp$ret$0 = tmp0_apply;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    tmp.mln_1 = tmp$ret$2;
    this.nln_1 = 0;
  }
  MultipleImageView.prototype.oln = function (v) {
    this.nln_1 = v;
    var oldImage = this.mln_1;
    var tmp = this;
    var tmp$ret$2;
    // Inline function 'com.soywiz.korge.view.image' call
    var tmp0_image = this.lln_1.m(v);
    var tmp$ret$1;
    // Inline function 'com.soywiz.korge.view.addTo' call
    var tmp0_addTo = Image_init_$Create$_0(tmp0_image, 0.0, 0.0, null, false, 24, null);
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = addTo(tmp0_addTo, this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.MultipleImageView.<set-imageNumber>.<anonymous>' call
    tmp0_apply.w8w(-tmp0_apply.d72() / 2);
    tmp0_apply.o7c(-tmp0_apply.e72() / 2);
    tmp$ret$0 = tmp0_apply;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    tmp.mln_1 = tmp$ret$2;
    oldImage.fi2();
  };
  MultipleImageView.prototype.flt = function (point) {
    return ((point.y72_1 >= this.d1n() - this.mln_1.d72() / 2 ? point.y72_1 <= this.d1n() + this.mln_1.d72() / 2 : false) ? point.z72_1 >= this.e1n() - this.mln_1.e72() / 2 : false) ? point.z72_1 <= this.e1n() + this.mln_1.e72() / 2 : false;
  };
  MultipleImageView.prototype.toString = function () {
    return 'MultipleImageView @ ' + this.d1n() + ', ' + this.e1n() + ' image#' + this.nln_1 + ' : ' + this.mln_1;
  };
  MultipleImageView.$metadata$ = classMeta('MultipleImageView', undefined, undefined, undefined, undefined, GameObjectView.prototype);
  function TextObjectView_init_$Init$(id, str, style, cyclicText, $mask0, $marker, $this) {
    if (!(($mask0 & 8) === 0))
      cyclicText = emptyList();
    TextObjectView.call($this, id, str, style, cyclicText);
    return $this;
  }
  function TextObjectView_init_$Create$(id, str, style, cyclicText, $mask0, $marker) {
    return TextObjectView_init_$Init$(id, str, style, cyclicText, $mask0, $marker, Object.create(TextObjectView.prototype));
  }
  function textColor_0($this) {
    var tmp0_subject = $this.qlk_1;
    return get_stylePlainColor();
  }
  function createBackground($this) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_subject = $this.qlk_1;
    var tmp0 = tmp0_subject.q2_1;
    var tmp;
    switch (tmp0) {
      case 1:
        var tmp_0 = $this.slk_1.d72() + 10;
        var tmp_1 = $this.slk_1.e72() + 10;
        var tmp_2 = new RGBA(Colors_getInstance().s7z_1);
        tmp = RoundRect_init_$Create$(tmp_0, tmp_1, 9.0, 0.0, tmp_2, null, 0.0, false, 232, null);
        break;
      case 2:
        var tmp_3 = $this.slk_1.d72() + 10;
        var tmp_4 = $this.slk_1.e72() + 10;
        var tmp_5 = new RGBA(get_stylePlainBackground());
        tmp = RoundRect_init_$Create$(tmp_3, tmp_4, 9.0, 0.0, tmp_5, null, 0.0, false, 232, null);
        break;
      default:
        tmp = new SolidRect($this.slk_1.d72() + 4, $this.slk_1.e72() + 4, Colors_getInstance().y7z_1);
        break;
    }
    var tmp0_apply = tmp;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.TextObjectView.createBackground.<anonymous>' call
    position(tmp0_apply, -tmp0_apply.d72() / 2, -tmp0_apply.e72() / 2);
    tmp$ret$0 = tmp0_apply;
    return tmp$ret$0;
  }
  function TextObjectView$lambda(this$0, $id) {
    return function (it) {
      var tmp;
      if (it.xge_1 === 2) {
        var tmp0_this = this$0;
        var tmp1 = tmp0_this.ulk_1;
        tmp0_this.vlk(tmp1 + 1 | 0);
        send_0(new CycleText($id, this$0.ulk_1));
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function TextObjectView(id, str, style, cyclicText) {
    GameObjectView.call(this, id);
    this.qlk_1 = style;
    this.rlk_1 = cyclicText;
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp_0 = textColor_0(this);
    var tmp0_apply = Text_init_$Create$(str, 0.0, tmp_0, null, null, null, false, null, null, 506, null);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.TextObjectView.textView.<anonymous>' call
    position(tmp0_apply, -tmp0_apply.d72() / 2, -tmp0_apply.e72() / 2);
    tmp$ret$0 = tmp0_apply;
    tmp.slk_1 = tmp$ret$0;
    this.tlk_1 = createBackground(this);
    this.ulk_1 = 0;
    this.shz(this.tlk_1);
    this.shz(this.slk_1);
    var tmp$ret$1;
    // Inline function 'kotlin.collections.isNotEmpty' call
    var tmp0_isNotEmpty = this.rlk_1;
    tmp$ret$1 = !tmp0_isNotEmpty.p();
    if (tmp$ret$1) {
      var tmp_1 = get_mouse(this);
      doubleClick(tmp_1, TextObjectView$lambda(this, id));
    }
  }
  TextObjectView.prototype.gck = function (v) {
    var tmp$ret$1;
    // Inline function 'kotlin.with' call
    var tmp0_with = this.slk_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'uk.co.nickthecoder.gamescupboard.client.view.TextObjectView.<set-text>.<anonymous>' call
    tmp0_with.gck(v);
    tmp$ret$0 = position(tmp0_with, -tmp0_with.d72() / 2, -tmp0_with.e72() / 2);
    tmp$ret$1 = tmp$ret$0;
    this.tlk_1.fi2();
    this.tlk_1 = createBackground(this);
    this.zhz(this.tlk_1, 0);
  };
  TextObjectView.prototype.vlk = function (v) {
    this.ulk_1 = v % this.rlk_1.i() | 0;
    this.gck(this.rlk_1.m(this.ulk_1));
  };
  TextObjectView.prototype.flt = function (point) {
    return ((point.y72_1 >= this.d1n() - this.tlk_1.d72() / 2 ? point.y72_1 <= this.d1n() + this.tlk_1.d72() / 2 : false) ? point.z72_1 >= this.e1n() - this.tlk_1.e72() / 2 : false) ? point.z72_1 <= this.e1n() + this.tlk_1.e72() / 2 : false;
  };
  TextObjectView.$metadata$ = classMeta('TextObjectView', undefined, undefined, undefined, undefined, GameObjectView.prototype);
  function FollowLink() {
    FollowLink_instance = this;
  }
  FollowLink.prototype.hlv = function (url) {
    window.open(url, '_blank');
  };
  FollowLink.$metadata$ = objectMeta('FollowLink');
  var FollowLink_instance;
  function FollowLink_getInstance() {
    if (FollowLink_instance == null)
      new FollowLink();
    return FollowLink_instance;
  }
  function Companion() {
    Companion_instance = this;
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp$ret$0 = LinkedHashMap_init_$Create$();
    tmp.lm4_1 = tmp$ret$0;
    var search = window.location.search;
    var tmp_0 = firstOrNull(search);
    if (equals(tmp_0 == null ? null : new Char(tmp_0), new Char(_Char___init__impl__6a9atx(63))))
      search = substr_0(search, 1);
    var tmp_1 = search;
    var params = split$default(tmp_1, ['&'], false, 0, 6, null);
    var tmp0_iterator = params.j();
    while (tmp0_iterator.k()) {
      var param = tmp0_iterator.l();
      var tmp_2 = _Char___init__impl__6a9atx(61);
      var eq = indexOf$default_0(param, tmp_2, 0, false, 6, null);
      if (eq > 0) {
        var tmp$ret$2;
        // Inline function 'kotlin.text.substring' call
        var tmp$ret$1;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$1 = param;
        tmp$ret$2 = tmp$ret$1.substring(0, eq);
        var tmp_3 = tmp$ret$2;
        var tmp$ret$4;
        // Inline function 'kotlin.text.substring' call
        var tmp0_substring = eq + 1 | 0;
        var tmp$ret$3;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$3 = param;
        tmp$ret$4 = tmp$ret$3.substring(tmp0_substring);
        println('Put ' + tmp_3 + " -> '" + tmp$ret$4 + "'");
        // Inline function 'kotlin.collections.set' call
        var tmp2_set = this.lm4_1;
        var tmp$ret$6;
        // Inline function 'kotlin.text.substring' call
        var tmp$ret$5;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$5 = param;
        tmp$ret$6 = tmp$ret$5.substring(0, eq);
        var tmp3_set = tmp$ret$6;
        var tmp$ret$8;
        // Inline function 'kotlin.text.substring' call
        var tmp1_substring = eq + 1 | 0;
        var tmp$ret$7;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$7 = param;
        tmp$ret$8 = tmp$ret$7.substring(tmp1_substring);
        var tmp4_set = tmp$ret$8;
        tmp2_set.a(tmp3_set, tmp4_set);
      }
    }
  }
  Companion.prototype.r3b = function () {
    return window.location.hostname;
  };
  Companion.prototype.s3b = function () {
    var tmp0_elvis_lhs = toIntOrNull(window.location.port);
    return tmp0_elvis_lhs == null ? 80 : tmp0_elvis_lhs;
  };
  Companion.prototype.c19 = function (name) {
    return this.lm4_1.q(name);
  };
  Companion.$metadata$ = objectMeta('Companion');
  var Companion_instance;
  function Companion_getInstance_13() {
    if (Companion_instance == null)
      new Companion();
    return Companion_instance;
  }
  //region block: init
  moveMessageInterval = new Long(100, 0);
  highlightPeriod = new Long(250, 0);
  highlightScale = 1.15;
  CANCEL_DRAG = 'sounds/cancelDrag.mp3';
  PLAYER_JOINED = 'sounds/playerJoined.mp3';
  PLAYER_LEFT = 'sounds/playerLeft.mp3';
  FACE_UP = 'sounds/faceUp.mp3';
  FACE_DOWN = 'sounds/faceDown.mp3';
  //endregion
  main(get_EmptyContinuation());
  return _;
}));

//# sourceMappingURL=GamesCupboard-gamescupboard-client.js.map