(function (root, factory) {
if (typeof define === 'function' && define.amd)
define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './korlibs-korma.js', './korlibs-kds.js', './korlibs-kmem.js', './korlibs-korio.js', './korlibs-krypto.js', './korlibs-klock.js', './korlibs-klogger.js', './kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js'], factory);
else if (typeof exports === 'object')
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./korlibs-korma.js'), require('./korlibs-kds.js'), require('./korlibs-kmem.js'), require('./korlibs-korio.js'), require('./korlibs-krypto.js'), require('./korlibs-klock.js'), require('./korlibs-klogger.js'), require('./kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js'));
else {
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['korlibs-korma'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'korlibs-korma' was not found. Please, check whether 'korlibs-korma' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['korlibs-kds'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'korlibs-kds' was not found. Please, check whether 'korlibs-kds' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['korlibs-kmem'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'korlibs-kmem' was not found. Please, check whether 'korlibs-kmem' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['korlibs-korio'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'korlibs-korio' was not found. Please, check whether 'korlibs-korio' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['korlibs-krypto'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'korlibs-krypto' was not found. Please, check whether 'korlibs-krypto' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['korlibs-klock'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'korlibs-klock' was not found. Please, check whether 'korlibs-klock' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['korlibs-klogger'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'korlibs-klogger' was not found. Please, check whether 'korlibs-klogger' is loaded prior to 'korlibs-korim'.");
}
if (typeof this['kotlinx.coroutines-kotlinx-coroutines-core-js-ir'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korim'. Its dependency 'kotlinx.coroutines-kotlinx-coroutines-core-js-ir' was not found. Please, check whether 'kotlinx.coroutines-kotlinx-coroutines-core-js-ir' is loaded prior to 'korlibs-korim'.");
}
root['korlibs-korim'] = factory(typeof this['korlibs-korim'] === 'undefined' ? {} : this['korlibs-korim'], this['kotlin-kotlin-stdlib-js-ir'], this['korlibs-korma'], this['korlibs-kds'], this['korlibs-kmem'], this['korlibs-korio'], this['korlibs-krypto'], this['korlibs-klock'], this['korlibs-klogger'], this['kotlinx.coroutines-kotlinx-coroutines-core-js-ir']);
}
}(this, function (_, kotlin_kotlin, kotlin_com_soywiz_korlibs_korma_korma, kotlin_com_soywiz_korlibs_kds_kds, kotlin_com_soywiz_korlibs_kmem_kmem, kotlin_com_soywiz_korlibs_korio_korio, kotlin_com_soywiz_korlibs_krypto_krypto, kotlin_com_soywiz_korlibs_klock_klock, kotlin_com_soywiz_korlibs_klogger_klogger, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core) {
'use strict';
//region block: imports
var imul = Math.imul;
var log2 = Math.log2;
var hashCode = kotlin_kotlin.$_$.xc;
var THROW_CCE = kotlin_kotlin.$_$.di;
var equals = kotlin_kotlin.$_$.rc;
var classMeta = kotlin_kotlin.$_$.pc;
var toList = kotlin_kotlin.$_$.na;
var Companion_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.f5;
var toString = kotlin_kotlin.$_$.ae;
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.x2;
var Mixin_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.k2;
var lazy = kotlin_kotlin.$_$.yi;
var Companion_getInstance_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.q5;
var Unit_getInstance = kotlin_kotlin.$_$.k5;
var kdsIsFrozen = kotlin_com_soywiz_korlibs_kds_kds.$_$.b;
var NotImplementedError_init_$Create$ = kotlin_kotlin.$_$.k1;
var toIntFloor = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.c3;
var toIntCeil = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.b3;
var clamp = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.d1;
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.n3;
var invalidOp = kotlin_com_soywiz_korlibs_korio_korio.$_$.j1;
var Sizeable = kotlin_com_soywiz_korlibs_korma_korma.$_$.t1;
var ISizeInt = kotlin_com_soywiz_korlibs_korma_korma.$_$.l1;
var Extra = kotlin_com_soywiz_korlibs_kds_kds.$_$.g;
var KProperty1 = kotlin_kotlin.$_$.ef;
var getPropertyCallableRef = kotlin_kotlin.$_$.vc;
var fill$default = kotlin_kotlin.$_$.j;
var objectMeta = kotlin_kotlin.$_$.wd;
var CoroutineImpl = kotlin_kotlin.$_$.yb;
var SequenceScope = kotlin_kotlin.$_$.gf;
var until = kotlin_kotlin.$_$.ye;
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.gb;
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.i3;
var Companion_getInstance_1 = kotlin_com_soywiz_korlibs_korma_korma.$_$.r5;
var RectangleInt = kotlin_com_soywiz_korlibs_korma_korma.$_$.q1;
var arraycopy = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.k;
var _RectangleInt___get_left__impl__rhzld = kotlin_com_soywiz_korlibs_korma_korma.$_$.r4;
var _RectangleInt___get_top__impl__ie2ifj = kotlin_com_soywiz_korlibs_korma_korma.$_$.u4;
var _RectangleInt___get_right__impl__9c8zzq = kotlin_com_soywiz_korlibs_korma_korma.$_$.t4;
var _RectangleInt___get_bottom__impl__za67bh = kotlin_com_soywiz_korlibs_korma_korma.$_$.n4;
var iterator = kotlin_kotlin.$_$.hf;
var Iterable = kotlin_kotlin.$_$.s5;
var get_left = kotlin_com_soywiz_korlibs_korma_korma.$_$.k2;
var get_top = kotlin_com_soywiz_korlibs_korma_korma.$_$.t2;
var get_right = kotlin_com_soywiz_korlibs_korma_korma.$_$.n2;
var get_bottom = kotlin_com_soywiz_korlibs_korma_korma.$_$.y1;
var SuspendFunction1 = kotlin_kotlin.$_$.ac;
var UByteArrayInt__get_impl_px6q8a = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.q3;
var UByteArrayInt__set_impl_gn4532 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.r3;
var arraycopy_0 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.i;
var Enum = kotlin_kotlin.$_$.sh;
var _UByteArrayInt___init__impl__xif7bu = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.o3;
var ilog2 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.q1;
var extract = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.j1;
var insert = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.s1;
var Companion_getInstance_2 = kotlin_com_soywiz_korlibs_korma_korma.$_$.u5;
var _RectangleInt___get_width__impl__gtay8w = kotlin_com_soywiz_korlibs_korma_korma.$_$.v4;
var _RectangleInt___get_height__impl__gd473j = kotlin_com_soywiz_korlibs_korma_korma.$_$.p4;
var SizeInt = kotlin_com_soywiz_korlibs_korma_korma.$_$.s1;
var roundToInt = kotlin_kotlin.$_$.ee;
var Companion_getInstance_3 = kotlin_com_soywiz_korlibs_korma_korma.$_$.p5;
var PointInt = kotlin_com_soywiz_korlibs_korma_korma.$_$.o1;
var _RectangleInt___get_x__impl__6tm2y6 = kotlin_com_soywiz_korlibs_korma_korma.$_$.x4;
var _RectangleInt___set_width__impl__dh3830 = kotlin_com_soywiz_korlibs_korma_korma.$_$.w4;
var _RectangleInt___set_x__impl__wfudb6 = kotlin_com_soywiz_korlibs_korma_korma.$_$.y4;
var _RectangleInt___get_y__impl__zdvhyr = kotlin_com_soywiz_korlibs_korma_korma.$_$.z4;
var _RectangleInt___set_height__impl__vwuxnn = kotlin_com_soywiz_korlibs_korma_korma.$_$.q4;
var _RectangleInt___set_y__impl__9rn7lr = kotlin_com_soywiz_korlibs_korma_korma.$_$.a5;
var _PointInt___set_x__impl__gw06o3 = kotlin_com_soywiz_korlibs_korma_korma.$_$.k4;
var _PointInt___set_y__impl__pbhe8u = kotlin_com_soywiz_korlibs_korma_korma.$_$.m4;
var _PointInt___get_x__impl__8q83ox = kotlin_com_soywiz_korlibs_korma_korma.$_$.j4;
var _PointInt___get_y__impl__k3edda = kotlin_com_soywiz_korlibs_korma_korma.$_$.l4;
var numberToInt = kotlin_kotlin.$_$.ud;
var Companion_getInstance_4 = kotlin_com_soywiz_korlibs_korma_korma.$_$.o5;
var Closeable = kotlin_com_soywiz_korlibs_korio_korio.$_$.w;
var Resourceable = kotlin_com_soywiz_korlibs_korio_korio.$_$.u1;
var interfaceMeta = kotlin_kotlin.$_$.yc;
var getNumberHashCode = kotlin_kotlin.$_$.uc;
var getStringHashCode = kotlin_kotlin.$_$.wc;
var RectangleInt__hashCode_impl_wuqys2 = kotlin_com_soywiz_korlibs_korma_korma.$_$.o4;
var isInterface = kotlin_kotlin.$_$.id;
var FastArrayList_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.d2;
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.ej;
var to = kotlin_kotlin.$_$.ij;
var ensureNotNull = kotlin_kotlin.$_$.ri;
var listOf = kotlin_kotlin.$_$.d9;
var get_length = kotlin_com_soywiz_korlibs_korio_korio.$_$.l2;
var clamp_0 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.e1;
var collectionSizeOrDefault = kotlin_kotlin.$_$.p6;
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l1;
var toFastList = kotlin_com_soywiz_korlibs_kds_kds.$_$.u1;
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m1;
var IntCompanionObject_getInstance = kotlin_kotlin.$_$.w4;
var sum = kotlin_kotlin.$_$.aa;
var checkIndexOverflow = kotlin_kotlin.$_$.n6;
var sum_0 = kotlin_kotlin.$_$.z9;
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.h2;
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s2;
var readU16LE = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.t2;
var readU16BE = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.s2;
var readU24LE = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.w2;
var readU24BE = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.v2;
var readS32LE = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.n2;
var readS32BE = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.m2;
var get_shex = kotlin_com_soywiz_korlibs_krypto_krypto.$_$.d;
var interpolate = kotlin_com_soywiz_korlibs_korma_korma.$_$.b3;
var interpolate_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.c3;
var numberToDouble = kotlin_kotlin.$_$.td;
var get_niceStr = kotlin_com_soywiz_korlibs_korio_korio.$_$.m2;
var MutableInterpolable = kotlin_com_soywiz_korlibs_korma_korma.$_$.a3;
var Interpolable = kotlin_com_soywiz_korlibs_korma_korma.$_$.z2;
var mapOf = kotlin_kotlin.$_$.g9;
var removePrefix = kotlin_kotlin.$_$.dg;
var removeSuffix = kotlin_kotlin.$_$.eg;
var split$default = kotlin_kotlin.$_$.c1;
var get_lastIndex = kotlin_kotlin.$_$.w8;
var toIntOrNull = kotlin_kotlin.$_$.qg;
var toDoubleOrNull = kotlin_kotlin.$_$.ng;
var startsWith = kotlin_kotlin.$_$.jg;
var substr = kotlin_com_soywiz_korlibs_korio_korio.$_$.o1;
var setOf = kotlin_kotlin.$_$.s9;
var substr_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.n1;
var toInt = kotlin_kotlin.$_$.sg;
var startsWith$default = kotlin_kotlin.$_$.d1;
var printStackTrace = kotlin_kotlin.$_$.bj;
var clamp01 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.b1;
var clampUByte = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.c1;
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.p3;
var appendHexByte = kotlin_com_soywiz_korlibs_krypto_krypto.$_$.a;
var get_niceStr_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.n2;
var compareTo = kotlin_kotlin.$_$.qc;
var Comparable = kotlin_kotlin.$_$.oh;
var GenericSubList = kotlin_com_soywiz_korlibs_kds_kds.$_$.o;
var contains = kotlin_kotlin.$_$.r6;
var Collection = kotlin_kotlin.$_$.o5;
var indexOf = kotlin_kotlin.$_$.r8;
var GenericListIterator = kotlin_com_soywiz_korlibs_kds_kds.$_$.n;
var List = kotlin_kotlin.$_$.x5;
var fill = kotlin_kotlin.$_$.z7;
var Vector3D = kotlin_com_soywiz_korlibs_korma_korma.$_$.u1;
var isCharSequence = kotlin_kotlin.$_$.dd;
var trim = kotlin_kotlin.$_$.kh;
var HashMap_init_$Create$ = kotlin_kotlin.$_$.p1;
var NotImplementedError = kotlin_kotlin.$_$.zh;
var startsWith$default_0 = kotlin_kotlin.$_$.e1;
var Xml = kotlin_com_soywiz_korlibs_korio_korio.$_$.x1;
var firstOrNull = kotlin_kotlin.$_$.f8;
var get = kotlin_com_soywiz_korlibs_korio_korio.$_$.y1;
var first = kotlin_kotlin.$_$.h8;
var toMap = kotlin_kotlin.$_$.qa;
var toIntMap = kotlin_com_soywiz_korlibs_kds_kds.$_$.x1;
var lines = kotlin_kotlin.$_$.cg;
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v1;
var charArrayOf = kotlin_kotlin.$_$.kc;
var split$default_0 = kotlin_kotlin.$_$.b1;
var plus = kotlin_kotlin.$_$.m9;
var get_dyn = kotlin_com_soywiz_korlibs_korio_korio.$_$.k;
var Dyn__get_impl_6l2p80 = kotlin_com_soywiz_korlibs_korio_korio.$_$.e4;
var _Dyn___get_int__impl__sh8lhm = kotlin_com_soywiz_korlibs_korio_korio.$_$.f4;
var numberToChar = kotlin_kotlin.$_$.sd;
var Char = kotlin_kotlin.$_$.nh;
var toInt_0 = kotlin_kotlin.$_$.rg;
var unquote = kotlin_com_soywiz_korlibs_korio_korio.$_$.q2;
var toDouble = kotlin_kotlin.$_$.og;
var associateByInt = kotlin_com_soywiz_korlibs_kds_kds.$_$.x;
var PerformanceCounter_getInstance = kotlin_com_soywiz_korlibs_klock_klock.$_$.c1;
var Companion_getInstance_5 = kotlin_com_soywiz_korlibs_klock_klock.$_$.e1;
var TimedResult = kotlin_com_soywiz_korlibs_klock_klock.$_$.d;
var fromBase64$default = kotlin_com_soywiz_korlibs_krypto_krypto.$_$.e;
var Companion_getInstance_6 = kotlin_com_soywiz_korlibs_korio_korio.$_$.i4;
var uncompress$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.h3;
var emptyList = kotlin_kotlin.$_$.w7;
var BoundsBuilder = kotlin_com_soywiz_korlibs_korma_korma.$_$.k1;
var add$default = kotlin_com_soywiz_korlibs_korma_korma.$_$.t3;
var bounds = kotlin_com_soywiz_korlibs_korma_korma.$_$.b2;
var Rectangle = kotlin_com_soywiz_korlibs_korma_korma.$_$.r1;
var VectorPath_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.b4;
var rect = kotlin_com_soywiz_korlibs_korma_korma.$_$.b1;
var Matrix_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.c4;
var applyTransform = kotlin_com_soywiz_korlibs_korma_korma.$_$.l;
var getCurves = kotlin_com_soywiz_korlibs_korma_korma.$_$.o;
var println = kotlin_kotlin.$_$.fc;
var toBezier = kotlin_com_soywiz_korlibs_korma_korma.$_$.b;
var noWhenBranchMatchedException = kotlin_kotlin.$_$.zi;
var Point_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.z3;
var toIntRound = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.d3;
var firstOrNull_0 = kotlin_kotlin.$_$.e8;
var mapCapacity = kotlin_kotlin.$_$.e9;
var coerceAtLeast = kotlin_kotlin.$_$.me;
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u1;
var openFastStream$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.n3;
var copyOfRange = kotlin_kotlin.$_$.g7;
var toList_0 = kotlin_kotlin.$_$.ka;
var emptyMap = kotlin_kotlin.$_$.x7;
var last = kotlin_kotlin.$_$.a9;
var first_0 = kotlin_kotlin.$_$.g8;
var reserved = kotlin_com_soywiz_korlibs_korio_korio.$_$.m1;
var IntArrayList = kotlin_com_soywiz_korlibs_kds_kds.$_$.p;
var THROW_IAE = kotlin_kotlin.$_$.ei;
var getProgressionLastElement = kotlin_kotlin.$_$.ec;
var isNumber = kotlin_kotlin.$_$.kd;
var get_unreachable = kotlin_com_soywiz_korlibs_korio_korio.$_$.p1;
var get_reserved = kotlin_com_soywiz_korlibs_korio_korio.$_$.l1;
var toShort = kotlin_kotlin.$_$.zd;
var AssertionError_init_$Create$ = kotlin_kotlin.$_$.i2;
var Char__plus_impl_qi7pgj = kotlin_kotlin.$_$.u3;
var rMoveTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.z;
var rLineTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.y;
var Default_getInstance = kotlin_kotlin.$_$.a5;
var step = kotlin_kotlin.$_$.we;
var reverse$default = kotlin_com_soywiz_korlibs_kds_kds.$_$.a2;
var DoubleArrayList = kotlin_com_soywiz_korlibs_kds_kds.$_$.d;
var fillArrayVal = kotlin_kotlin.$_$.tc;
var FastByteArrayInputStream_init_$Create$ = kotlin_com_soywiz_korlibs_korio_korio.$_$.c4;
var get_UTF8 = kotlin_com_soywiz_korlibs_korio_korio.$_$.b1;
var charSequenceLength = kotlin_kotlin.$_$.nc;
var charSequenceGet = kotlin_kotlin.$_$.mc;
var get_UTF16_BE = kotlin_com_soywiz_korlibs_korio_korio.$_$.a1;
var toSyncStream = kotlin_com_soywiz_korlibs_korio_korio.$_$.j2;
var IntIntMap_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.q2;
var getCyclic = kotlin_com_soywiz_korlibs_kds_kds.$_$.i1;
var toList_1 = kotlin_kotlin.$_$.oa;
var IVectorPath = kotlin_com_soywiz_korlibs_korma_korma.$_$.f;
var listOf_0 = kotlin_kotlin.$_$.c9;
var moveTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.w;
var lineTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.s;
var quadTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.x;
var IntMap_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.r2;
var get_invalidOp = kotlin_com_soywiz_korlibs_korio_korio.$_$.i1;
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.x3;
var get_hex = kotlin_com_soywiz_korlibs_krypto_krypto.$_$.c;
var Long = kotlin_kotlin.$_$.xh;
var copyOfRange_0 = kotlin_kotlin.$_$.f7;
var toIntArrayList = kotlin_com_soywiz_korlibs_kds_kds.$_$.w1;
var repeat = kotlin_kotlin.$_$.fg;
var getOrNull = kotlin_kotlin.$_$.j8;
var joinToString$default = kotlin_kotlin.$_$.m;
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.c3;
var Companion_getInstance_7 = kotlin_com_soywiz_korlibs_korio_korio.$_$.o4;
var primitiveArrayConcat = kotlin_kotlin.$_$.e;
var toIntArray = kotlin_kotlin.$_$.ja;
var first_1 = kotlin_kotlin.$_$.i8;
var getOrNull_0 = kotlin_kotlin.$_$.l8;
var extractSigned = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.i1;
var lastOrNull = kotlin_kotlin.$_$.z8;
var IntArrayList_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.p2;
var insert16 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.r1;
var get_baseName = kotlin_com_soywiz_korlibs_korio_korio.$_$.r;
var readU16 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.u2;
var readS32 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.o2;
var sliceHere$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.w3;
var Charsets_getInstance = kotlin_com_soywiz_korlibs_korio_korio.$_$.l4;
var readString = kotlin_com_soywiz_korlibs_korio_korio.$_$.d3;
var Endian_LITTLE_ENDIAN_getInstance = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.g3;
var Endian_BIG_ENDIAN_getInstance = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.f3;
var readU16_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.e3;
var readS32_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.b3;
var Console_getInstance = kotlin_com_soywiz_korlibs_klogger_klogger.$_$.e;
var readBytesExact = kotlin_com_soywiz_korlibs_korio_korio.$_$.w2;
var toLong = kotlin_kotlin.$_$.yd;
var sliceStart$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.x3;
var readStringz$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.u3;
var skipToAlign = kotlin_com_soywiz_korlibs_korio_korio.$_$.g2;
var addAll = kotlin_kotlin.$_$.j6;
var distinct = kotlin_kotlin.$_$.t7;
var sortedWith = kotlin_kotlin.$_$.x9;
var Comparator = kotlin_kotlin.$_$.ph;
var compareValues = kotlin_kotlin.$_$.db;
var fastArrayListOf = kotlin_com_soywiz_korlibs_kds_kds.$_$.b1;
var toSet = kotlin_kotlin.$_$.va;
var openSync$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.o3;
var Exception = kotlin_kotlin.$_$.uh;
var kdsFreeze = kotlin_com_soywiz_korlibs_kds_kds.$_$.a;
var KorAtomicRef = kotlin_com_soywiz_korlibs_korio_korio.$_$.i;
var sliceStart$default_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.r3;
var CancellationException = kotlin_kotlin.$_$.fb;
var ASCII_getInstance = kotlin_com_soywiz_korlibs_korio_korio.$_$.k4;
var readString_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.e2;
var readBytes = kotlin_com_soywiz_korlibs_korio_korio.$_$.b2;
var get_hex_0 = kotlin_com_soywiz_korlibs_krypto_krypto.$_$.b;
var toString$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.j3;
var toMutableSet = kotlin_kotlin.$_$.ua;
var setOf_0 = kotlin_kotlin.$_$.r9;
var KMutableProperty1 = kotlin_kotlin.$_$.bf;
var NonRecursiveLock = kotlin_com_soywiz_korlibs_kds_kds.$_$.c;
var TimeSpan = kotlin_com_soywiz_korlibs_klock_klock.$_$.c;
var toMap_0 = kotlin_com_soywiz_korlibs_kds_kds.$_$.y1;
var setExtra = kotlin_com_soywiz_korlibs_kds_kds.$_$.q1;
var hasExtra = kotlin_com_soywiz_korlibs_kds_kds.$_$.m1;
var Property_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.l2;
var readAll = kotlin_com_soywiz_korlibs_korio_korio.$_$.v2;
var FileNotFoundException = kotlin_com_soywiz_korlibs_korio_korio.$_$.z;
var readS32BE_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.c2;
var ByteArrayBuilder_init_$Create$ = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.n3;
var UByteArrayInt = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.f;
var get_eof = kotlin_com_soywiz_korlibs_korio_korio.$_$.z1;
var toIntArray_0 = kotlin_kotlin.$_$.ia;
var asByteArray = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.y;
var readStringz$default_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.p3;
var readStream = kotlin_com_soywiz_korlibs_korio_korio.$_$.d2;
var readU8 = kotlin_com_soywiz_korlibs_korio_korio.$_$.f2;
var readAll_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.a2;
var runBlockingNoSuspensions = kotlin_com_soywiz_korlibs_korio_korio.$_$.h;
var openAsync$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.m3;
var abs = kotlin_kotlin.$_$.ce;
var _UByteArrayInt___get_size__impl__bcjnte = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.t3;
var SuspendFunction0 = kotlin_kotlin.$_$.zb;
var clamp01_0 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.a1;
var DoubleArrayList_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.j2;
var Companion_getInstance_8 = kotlin_com_soywiz_korlibs_korma_korma.$_$.j5;
var Angle_between = kotlin_com_soywiz_korlibs_korma_korma.$_$.i1;
var unaryMinus = kotlin_com_soywiz_korlibs_korma_korma.$_$.w2;
var get_degrees = kotlin_com_soywiz_korlibs_korma_korma.$_$.f2;
var div = kotlin_com_soywiz_korlibs_korma_korma.$_$.g2;
var Angle__hashCode_impl_szcndt = kotlin_com_soywiz_korlibs_korma_korma.$_$.h4;
var DoubleCompanionObject_getInstance = kotlin_kotlin.$_$.u4;
var EnumLike = kotlin_com_soywiz_korlibs_korio_korio.$_$.y;
var Anchor = kotlin_com_soywiz_korlibs_korma_korma.$_$.h1;
var getOrNull_1 = kotlin_kotlin.$_$.k8;
var get_radians = kotlin_com_soywiz_korlibs_korma_korma.$_$.l2;
var _Angle___get_degrees__impl__qg56vw = kotlin_com_soywiz_korlibs_korma_korma.$_$.g4;
var doubleArrayListOf = kotlin_com_soywiz_korlibs_kds_kds.$_$.z;
var Transform_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.d4;
var get_radians_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.m2;
var _Angle___get_radians__impl__n00yt5 = kotlin_com_soywiz_korlibs_korma_korma.$_$.i4;
var WStringReader_init_$Create$ = kotlin_com_soywiz_korlibs_korio_korio.$_$.a4;
var _WChar___get_codePoint__impl__c8brwu = kotlin_com_soywiz_korlibs_korio_korio.$_$.h4;
var WString = kotlin_com_soywiz_korlibs_korio_korio.$_$.c1;
var intArrayListOf = kotlin_com_soywiz_korlibs_kds_kds.$_$.n1;
var fill_0 = kotlin_kotlin.$_$.a8;
var Companion_getInstance_9 = kotlin_com_soywiz_korlibs_korma_korma.$_$.g5;
var coerceIn = kotlin_kotlin.$_$.qe;
var get_float = kotlin_com_soywiz_korlibs_korma_korma.$_$.j2;
var Winding_EVEN_ODD_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.n3;
var StrokeToFill = kotlin_com_soywiz_korlibs_korma_korma.$_$.j;
var strokeToFill = kotlin_com_soywiz_korlibs_korma_korma.$_$.e1;
var Command_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.h5;
var Companion_getInstance_10 = kotlin_com_soywiz_korlibs_korma_korma.$_$.e5;
var LineScaleMode_NORMAL_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.m3;
var LineCap_BUTT_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.i3;
var LineJoin_MITER_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.k3;
var _TGenStack___init__impl__yynjgt = kotlin_com_soywiz_korlibs_kds_kds.$_$.b3;
var TGenStack__push_impl_9yh33t = kotlin_com_soywiz_korlibs_kds_kds.$_$.a3;
var TGenStack__pop_impl_qisxa0 = kotlin_com_soywiz_korlibs_kds_kds.$_$.z2;
var isEmpty = kotlin_com_soywiz_korlibs_korma_korma.$_$.p;
var rect_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.a1;
var Winding_NON_ZERO_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.o3;
var VectorBuilder = kotlin_com_soywiz_korlibs_korma_korma.$_$.k;
var Disposable = kotlin_com_soywiz_korlibs_korio_korio.$_$.x;
var umod = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.e3;
var toCurvesList = kotlin_com_soywiz_korlibs_korma_korma.$_$.f1;
var get_isConvex = kotlin_com_soywiz_korlibs_korma_korma.$_$.a;
var strokeToFill$default = kotlin_com_soywiz_korlibs_korma_korma.$_$.u3;
var niceStr = kotlin_com_soywiz_korlibs_korio_korio.$_$.o2;
var KProperty0 = kotlin_kotlin.$_$.df;
var StrokeInfo = kotlin_com_soywiz_korlibs_korma_korma.$_$.i;
var toStringDecimal = kotlin_com_soywiz_korlibs_korio_korio.$_$.p2;
var RastScale = kotlin_com_soywiz_korlibs_korma_korma.$_$.h;
var PolygonScanline = kotlin_com_soywiz_korlibs_korma_korma.$_$.g;
var IntSegmentSet = kotlin_com_soywiz_korlibs_korma_korma.$_$.f3;
var transformed = kotlin_com_soywiz_korlibs_korma_korma.$_$.g1;
var Type_IDENTITY_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.q3;
var OS_getInstance = kotlin_com_soywiz_korlibs_korio_korio.$_$.q4;
var UrlVfs = kotlin_com_soywiz_korlibs_korio_korio.$_$.n;
var LocalVfs = kotlin_com_soywiz_korlibs_korio_korio.$_$.l;
var TimeSpan__minus_impl_5w5v8s = kotlin_com_soywiz_korlibs_klock_klock.$_$.v;
var TimeSpan__compareTo_impl_zidry4 = kotlin_com_soywiz_korlibs_klock_klock.$_$.m;
var asInt32Buffer = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.z;
var Companion_getInstance_11 = kotlin_kotlin.$_$.f5;
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.z3;
var createFailure = kotlin_kotlin.$_$.qi;
var intercepted = kotlin_kotlin.$_$.ib;
var get_MODE_CANCELLABLE = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w1;
var CancellableContinuationImpl = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
var toTypedArray = kotlin_kotlin.$_$.ya;
//endregion
//region block: pre-declaration
Bitmap32$iterator$slambda.prototype = Object.create(CoroutineImpl.prototype);
Bitmap32$iterator$slambda.prototype.constructor = Bitmap32$iterator$slambda;
Bitmap32.prototype = Object.create(Bitmap.prototype);
Bitmap32.prototype.constructor = Bitmap32;
BitmapIndexed.prototype = Object.create(Bitmap.prototype);
BitmapIndexed.prototype.constructor = BitmapIndexed;
Bitmap8.prototype = Object.create(BitmapIndexed.prototype);
Bitmap8.prototype.constructor = Bitmap8;
BitmapChannel.prototype = Object.create(Enum.prototype);
BitmapChannel.prototype.constructor = BitmapChannel;
function getOrNull_2() {
return this;
}
function get_baseWidth() {
return this.x8b().d72();
}
function get_baseHeight() {
return this.x8b().e72();
}
function get_name() {
return null;
}
function get_left_0() {
return numberToInt(this.a8c() * this.n8c());
}
function get_top_0() {
return numberToInt(this.b8c() * this.o8c());
}
function get_width() {
return numberToInt(Companion_getInstance_4().j7a(this.a8c() * this.n8c(), this.b8c() * this.o8c(), this.c8c() * this.n8c(), this.d8c() * this.o8c()));
}
function get_height() {
return numberToInt(Companion_getInstance_4().j7a(this.a8c() * this.n8c(), this.b8c() * this.o8c(), this.g8c() * this.n8c(), this.h8c() * this.o8c()));
}
function get_virtFrame() {
return null;
}
function get_frameOffsetX() {
var tmp0_safe_receiver = this.w8b();
var tmp;
var tmp_0 = tmp0_safe_receiver;
if ((tmp_0 == null ? null : new RectangleInt(tmp_0)) == null) {
tmp = null;
} else {
tmp = _RectangleInt___get_x__impl__6tm2y6(tmp0_safe_receiver);
}
var tmp1_elvis_lhs = tmp;
return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
}
function get_frameOffsetY() {
var tmp0_safe_receiver = this.w8b();
var tmp;
var tmp_0 = tmp0_safe_receiver;
if ((tmp_0 == null ? null : new RectangleInt(tmp_0)) == null) {
tmp = null;
} else {
tmp = _RectangleInt___get_y__impl__zdvhyr(tmp0_safe_receiver);
}
var tmp1_elvis_lhs = tmp;
return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
}
function get_frameWidth() {
var tmp0_safe_receiver = this.w8b();
var tmp;
var tmp_0 = tmp0_safe_receiver;
if ((tmp_0 == null ? null : new RectangleInt(tmp_0)) == null) {
tmp = null;
} else {
tmp = _RectangleInt___get_width__impl__gtay8w(tmp0_safe_receiver);
}
var tmp1_elvis_lhs = tmp;
return tmp1_elvis_lhs == null ? this.d72() : tmp1_elvis_lhs;
}
function get_frameHeight() {
var tmp0_safe_receiver = this.w8b();
var tmp;
var tmp_0 = tmp0_safe_receiver;
if ((tmp_0 == null ? null : new RectangleInt(tmp_0)) == null) {
tmp = null;
} else {
tmp = _RectangleInt___get_height__impl__gd473j(tmp0_safe_receiver);
}
var tmp1_elvis_lhs = tmp;
return tmp1_elvis_lhs == null ? this.e72() : tmp1_elvis_lhs;
}
function get_area() {
return imul(this.d72(), this.e72());
}
function get_isRotatedInBaseDeg90() {
return (this.d72() > 1 ? this.a8c() === this.c8c() : false) ? true : this.e72() > 1 ? this.b8c() === this.h8c() : false;
}
function close() {
return Unit_getInstance();
}
function subCoords(bounds, imageOrientation) {
if (_RectangleInt___get_x__impl__6tm2y6(bounds) < 0) {
var tmp0_this = bounds;
_RectangleInt___set_width__impl__dh3830(tmp0_this, _RectangleInt___get_width__impl__gtay8w(tmp0_this) + _RectangleInt___get_x__impl__6tm2y6(bounds) | 0);
_RectangleInt___set_x__impl__wfudb6(bounds, 0);
}
if (_RectangleInt___get_y__impl__zdvhyr(bounds) < 0) {
var tmp1_this = bounds;
_RectangleInt___set_height__impl__vwuxnn(tmp1_this, _RectangleInt___get_height__impl__gd473j(tmp1_this) + _RectangleInt___get_y__impl__zdvhyr(bounds) | 0);
_RectangleInt___set_y__impl__9rn7lr(bounds, 0);
}
var ioRotated = imageOrientation.d8d_1;
_RectangleInt___set_width__impl__dh3830(bounds, ioRotated ? clamp(_RectangleInt___get_width__impl__gtay8w(bounds), 0, this.e72() - _RectangleInt___get_y__impl__zdvhyr(bounds) | 0) : clamp(_RectangleInt___get_width__impl__gtay8w(bounds), 0, this.d72() - _RectangleInt___get_x__impl__6tm2y6(bounds) | 0));
_RectangleInt___set_height__impl__vwuxnn(bounds, ioRotated ? clamp(_RectangleInt___get_height__impl__gd473j(bounds), 0, this.d72() - _RectangleInt___get_x__impl__6tm2y6(bounds) | 0) : clamp(_RectangleInt___get_height__impl__gd473j(bounds), 0, this.e72() - _RectangleInt___get_y__impl__zdvhyr(bounds) | 0));
var dx = this.e8c() - this.a8c();
var dy = this.f8c() - this.b8c();
var x = _RectangleInt___get_x__impl__6tm2y6(bounds);
var y = _RectangleInt___get_y__impl__zdvhyr(bounds);
var w = _RectangleInt___get_width__impl__gtay8w(bounds);
var h = _RectangleInt___get_height__impl__gd473j(bounds);
var bw = this.d72();
var bh = this.e72();
var flipDim = !!(this.r8c() ^ ioRotated);
var xDim = flipDim ? h : w;
var yDim = flipDim ? w : h;
var _bw = this.r8c() ? bh : bw;
var _bh = this.r8c() ? bw : bh;
var _x = this.r8c() ? y : x;
var _y = this.r8c() ? x : y;
var tlX = this.a8c() + _x / _bw * dx;
var tlY = this.b8c() + _y / _bh * dy;
var brX = tlX + xDim / _bw * dx;
var brY = tlY + yDim / _bh * dy;
var trX = this.r8c() ? tlX : brX;
var trY = this.r8c() ? brY : tlY;
var blX = this.r8c() ? brX : tlX;
var blY = this.r8c() ? tlY : brY;
var tmp = this.x8b();
return withImageOrientation(copy$default(this, tmp, tlX, tlY, trX, trY, brX, brY, blX, blY, null, null, false, 3584, null), imageOrientation);
}
BitmapSlice.prototype = Object.create(BmpSlice.prototype);
BitmapSlice.prototype.constructor = BitmapSlice;
BmpCoordsWithInstance.prototype = Object.create(BmpCoordsWithInstanceBase.prototype);
BmpCoordsWithInstance.prototype.constructor = BmpCoordsWithInstance;
FloatBitmap32.prototype = Object.create(Bitmap.prototype);
FloatBitmap32.prototype.constructor = FloatBitmap32;
MultiBitmap.prototype = Object.create(Bitmap.prototype);
MultiBitmap.prototype.constructor = MultiBitmap;
NativeImage.prototype = Object.create(Bitmap.prototype);
NativeImage.prototype.constructor = NativeImage;
function get_forcedTexTarget() {
Companion_getInstance_15();
return 3553;
}
$readNinePatchCOROUTINE$0.prototype = Object.create(CoroutineImpl.prototype);
$readNinePatchCOROUTINE$0.prototype.constructor = $readNinePatchCOROUTINE$0;
RGB.prototype = Object.create(ColorFormat24.prototype);
RGB.prototype.constructor = RGB;
Companion_6.prototype = Object.create(RGB.prototype);
Companion_6.prototype.constructor = Companion_6;
Companion_8.prototype = Object.create(ColorFormat32.prototype);
Companion_8.prototype.constructor = Companion_8;
function getOrNull_3() {
return this;
}
function getFontMetrics$default(size, metrics, $mask0, $handler) {
if (!(($mask0 & 2) === 0)) {
metrics = FontMetrics_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255, null);
}
return $handler == null ? this.t8m(size, metrics) : $handler(size, metrics);
}
$readBitmapFontCOROUTINE$1.prototype = Object.create(CoroutineImpl.prototype);
$readBitmapFontCOROUTINE$1.prototype.constructor = $readBitmapFontCOROUTINE$1;
$readBitmapFontXmlCOROUTINE$2.prototype = Object.create(CoroutineImpl.prototype);
$readBitmapFontXmlCOROUTINE$2.prototype.constructor = $readBitmapFontXmlCOROUTINE$2;
$readBitmapFontTxtCOROUTINE$3.prototype = Object.create(CoroutineImpl.prototype);
$readBitmapFontTxtCOROUTINE$3.prototype.constructor = $readBitmapFontTxtCOROUTINE$3;
function reset() {
this.w8w(0.0);
this.o7c(0.0);
}
function advance(x) {
var tmp0_this = this;
tmp0_this.w8w(tmp0_this.d1n() + x);
}
function newLine(y, end) {
this.w8w(0.0);
var tmp0_this = this;
tmp0_this.o7c(tmp0_this.e1n() + y);
var tmp1_this = this;
var tmp2 = tmp1_this.m8w();
tmp1_this.u8w(tmp2 + 1 | 0);
}
drawText$actions$1.prototype = Object.create(TextRendererActions.prototype);
drawText$actions$1.prototype.constructor = drawText$actions$1;
$readFontCOROUTINE$4.prototype = Object.create(CoroutineImpl.prototype);
$readFontCOROUTINE$4.prototype.constructor = $readFontCOROUTINE$4;
Op.prototype = Object.create(Enum.prototype);
Op.prototype.constructor = Op;
Op_0.prototype = Object.create(Enum.prototype);
Op_0.prototype.constructor = Op_0;
function getGlyphPath$default(size, codePoint, path, reader, $mask0, $handler) {
if (!(($mask0 & 4) === 0)) {
path = GlyphPath_init_$Create$(null, null, null, null, null, null, 0.0, 127, null);
}
if (!(($mask0 & 8) === 0))
reader = null;
return $handler == null ? this.m96(size, codePoint, path, reader) : $handler(size, codePoint, path, reader);
}
function renderGlyph(ctx, size, codePoint, x, y, fill, metrics, reader, beforeDraw) {
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korio.lang.keep' call
var tmp0_safe_receiver = reader;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y5y_1;
var old = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.VectorFont.renderGlyph.<anonymous>' call
tmp$ret$0 = this.e8n(size, codePoint, metrics, reader);
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
var tmp2_safe_receiver = reader;
if (tmp2_safe_receiver == null) {
} else
tmp2_safe_receiver.y5y_1 = old;
}
}
var g = this.n96(size, codePoint, null, reader, 4, null);
if (!(g == null)) {
if (!(fill == null)) {
ctx.h8r();
}
if (!g.b8y()) {
var tmp0_safe_receiver_0 = beforeDraw;
if (tmp0_safe_receiver_0 == null)
null;
else
tmp0_safe_receiver_0();
}
// Inline function 'com.soywiz.korim.vector.Context2d.keepTransform' call
var t = ctx.a87_1.o8n_1;
var a = t.i74_1;
var b = t.j74_1;
var c = t.k74_1;
var d = t.l74_1;
var tx = t.m74_1;
var ty = t.n74_1;
try {
// Inline function 'com.soywiz.korim.font.VectorFont.renderGlyph.<anonymous>' call
ctx.o8w(x, y);
g.c8y(ctx);
}finally {
t.e76(a, b, c, d, tx, ty);
}
var tmp1_subject = fill;
switch (tmp1_subject) {
case true:
ctx.m8u(null, 1, null);
;
break;
case false:
ctx.l8u();
;
break;
case null:
;
break;
}
return !g.b8y();
}
return false;
}
TtfFont.prototype = Object.create(BaseTtfFont.prototype);
TtfFont.prototype.constructor = TtfFont;
NameId.prototype = Object.create(Enum.prototype);
NameId.prototype.constructor = NameId;
Colrv1Paint.prototype = Object.create(Enum.prototype);
Colrv1Paint.prototype.constructor = Colrv1Paint;
function getColorShape$default(pal, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
pal = 0;
return $handler == null ? this.e9h(pal) : $handler(pal);
}
CompositeGlyph.prototype = Object.create(Glyph_0.prototype);
CompositeGlyph.prototype.constructor = CompositeGlyph;
CFFGlyph.prototype = Object.create(Glyph_0.prototype);
CFFGlyph.prototype.constructor = CFFGlyph;
SimpleGlyph.prototype = Object.create(Glyph_0.prototype);
SimpleGlyph.prototype.constructor = SimpleGlyph;
$readTtfFontCOROUTINE$11.prototype = Object.create(CoroutineImpl.prototype);
$readTtfFontCOROUTINE$11.prototype.constructor = $readTtfFontCOROUTINE$11;
DataFormat.prototype = Object.create(Enum.prototype);
DataFormat.prototype.constructor = DataFormat;
$readExifBaseCOROUTINE$15.prototype = Object.create(CoroutineImpl.prototype);
$readExifBaseCOROUTINE$15.prototype.constructor = $readExifBaseCOROUTINE$15;
Direction.prototype = Object.create(Enum.prototype);
Direction.prototype.constructor = Direction;
$decodeCOROUTINE$19.prototype = Object.create(CoroutineImpl.prototype);
$decodeCOROUTINE$19.prototype.constructor = $decodeCOROUTINE$19;
ImageDecoderNotFoundException.prototype = Object.create(Exception.prototype);
ImageDecoderNotFoundException.prototype.constructor = ImageDecoderNotFoundException;
ImageFormats.prototype = Object.create(ImageFormat.prototype);
ImageFormats.prototype.constructor = ImageFormats;
ImageFormatsMutable.prototype = Object.create(ImageFormats.prototype);
ImageFormatsMutable.prototype.constructor = ImageFormatsMutable;
Type.prototype = Object.create(Enum.prototype);
Type.prototype.constructor = Type;
Rotation.prototype = Object.create(Enum.prototype);
Rotation.prototype.constructor = Rotation;
$readBitmapSliceCOROUTINE$24.prototype = Object.create(CoroutineImpl.prototype);
$readBitmapSliceCOROUTINE$24.prototype.constructor = $readBitmapSliceCOROUTINE$24;
$readBitmapCOROUTINE$25.prototype = Object.create(CoroutineImpl.prototype);
$readBitmapCOROUTINE$25.prototype.constructor = $readBitmapCOROUTINE$25;
$_readBitmapCOROUTINE$26.prototype = Object.create(CoroutineImpl.prototype);
$_readBitmapCOROUTINE$26.prototype.constructor = $_readBitmapCOROUTINE$26;
$decodeInternalCOROUTINE$28.prototype = Object.create(CoroutineImpl.prototype);
$decodeInternalCOROUTINE$28.prototype.constructor = $decodeInternalCOROUTINE$28;
$decodeSuspendCOROUTINE$32.prototype = Object.create(CoroutineImpl.prototype);
$decodeSuspendCOROUTINE$32.prototype.constructor = $decodeSuspendCOROUTINE$32;
$decodeCOROUTINE$33.prototype = Object.create(CoroutineImpl.prototype);
$decodeCOROUTINE$33.prototype.constructor = $decodeCOROUTINE$33;
$decodeCOROUTINE$34.prototype = Object.create(CoroutineImpl.prototype);
$decodeCOROUTINE$34.prototype.constructor = $decodeCOROUTINE$34;
BaseNativeImageFormatProvider.prototype = Object.create(NativeImageFormatProvider.prototype);
BaseNativeImageFormatProvider.prototype.constructor = BaseNativeImageFormatProvider;
BitmapNativeImage.prototype = Object.create(NativeImage.prototype);
BitmapNativeImage.prototype.constructor = BitmapNativeImage;
Colorspace.prototype = Object.create(Enum.prototype);
Colorspace.prototype.constructor = Colorspace;
PNG$readCommon$readChunk$slambda.prototype = Object.create(CoroutineImpl.prototype);
PNG$readCommon$readChunk$slambda.prototype.constructor = PNG$readCommon$readChunk$slambda;
PNG.prototype = Object.create(ImageFormat.prototype);
PNG.prototype.constructor = PNG;
ColorFiller.prototype = Object.create(BaseFiller.prototype);
ColorFiller.prototype.constructor = ColorFiller;
GradientFiller.prototype = Object.create(BaseFiller.prototype);
GradientFiller.prototype.constructor = GradientFiller;
BitmapFiller.prototype = Object.create(BaseFiller.prototype);
BitmapFiller.prototype.constructor = BitmapFiller;
NoneFiller.prototype = Object.create(BaseFiller.prototype);
NoneFiller.prototype.constructor = NoneFiller;
GradientKind.prototype = Object.create(Enum.prototype);
GradientKind.prototype.constructor = GradientKind;
GradientInterpolationMethod.prototype = Object.create(Enum.prototype);
GradientInterpolationMethod.prototype.constructor = GradientInterpolationMethod;
GradientUnits.prototype = Object.create(Enum.prototype);
GradientUnits.prototype.constructor = GradientUnits;
function get_version() {
return 0;
}
BoundBuilderTextRendererActions.prototype = Object.create(TextRendererActions.prototype);
BoundBuilderTextRendererActions.prototype.constructor = BoundBuilderTextRendererActions;
Text2TextRendererActions.prototype = Object.create(TextRendererActions.prototype);
Text2TextRendererActions.prototype.constructor = Text2TextRendererActions;
Bitmap32Context2d.prototype = Object.create(Renderer.prototype);
Bitmap32Context2d.prototype.constructor = Bitmap32Context2d;
CompositeMode.prototype = Object.create(Enum.prototype);
CompositeMode.prototype.constructor = CompositeMode;
BlendMode.prototype = Object.create(Enum.prototype);
BlendMode.prototype.constructor = BlendMode;
CycleMethod.prototype = Object.create(Enum.prototype);
CycleMethod.prototype.constructor = CycleMethod;
function getPath(path) {
return path;
}
function getPath$default(path, $mask0, $handler) {
if (!(($mask0 & 1) === 0)) {
path = VectorPath_init_$Create$(null, null, null, false, 15, null);
}
return $handler == null ? this.ba5(path) : $handler(path);
}
function getBounds(includeStrokes) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new BoundsBuilder();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.Shape.getBounds.<anonymous>' call
this.aa5(tmp0_also, includeStrokes);
tmp$ret$0 = tmp0_also;
var tmp = tmp$ret$0;
return tmp.c72(null, 1, null);
}
function get_bounds() {
return this.da5(true);
}
function get_path() {
return null;
}
function addBounds(bb, includeStrokes) {
var tmp0_safe_receiver = this.q5n();
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$0;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
add$default(bb, tmp0_safe_receiver, null, 2, null);
tmp$ret$0 = Unit_getInstance();
}
}
function getPath_0(path) {
var tmp$ret$1;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.StyledShape.getPath.<anonymous>' call
var tmp0_safe_receiver = this.q5n();
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$0;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
path.u7t(tmp0_safe_receiver, null, 2, null);
tmp$ret$0 = Unit_getInstance();
}
tmp$ret$1 = path;
return tmp$ret$1;
}
function draw(c) {
// Inline function 'com.soywiz.korim.vector.Context2d.keepTransform' call
var t = c.a87_1.o8n_1;
var a = t.i74_1;
var b = t.j74_1;
var c_0 = t.k74_1;
var d = t.l74_1;
var tx = t.m74_1;
var ty = t.n74_1;
try {
// Inline function 'com.soywiz.korim.vector.StyledShape.draw.<anonymous>' call
c.h8r();
var tmp0_safe_receiver = this.q5n();
if (tmp0_safe_receiver == null)
null;
else {
draw_0(tmp0_safe_receiver, c);
}
if (!(this.la5() == null)) {
draw_0(ensureNotNull(this.la5()), c);
c.va4(null, null, 3, null);
}
c.q8w(this.p8w());
this.pa5(c);
}finally {
t.e76(a, b, c_0, d, tx, ty);
}
}
function drawInternal(c) {
}
ShapeBuilder.prototype = Object.create(Context2d.prototype);
ShapeBuilder.prototype.constructor = ShapeBuilder;
Rasterizer.prototype = Object.create(RastScale.prototype);
Rasterizer.prototype.constructor = Rasterizer;
DummyRenderer.prototype = Object.create(Renderer.prototype);
DummyRenderer.prototype.constructor = DummyRenderer;
Companion_36.prototype = Object.create(DummyRenderer.prototype);
Companion_36.prototype.constructor = Companion_36;
NodeJsNativeImageFormatProvider.prototype = Object.create(BaseNativeImageFormatProvider.prototype);
NodeJsNativeImageFormatProvider.prototype.constructor = NodeJsNativeImageFormatProvider;
$decodeInternalCOROUTINE$35.prototype = Object.create(CoroutineImpl.prototype);
$decodeInternalCOROUTINE$35.prototype.constructor = $decodeInternalCOROUTINE$35;
$decodeInternalCOROUTINE$36.prototype = Object.create(CoroutineImpl.prototype);
$decodeInternalCOROUTINE$36.prototype.constructor = $decodeInternalCOROUTINE$36;
HtmlNativeImageFormatProvider.prototype = Object.create(NativeImageFormatProvider.prototype);
HtmlNativeImageFormatProvider.prototype.constructor = HtmlNativeImageFormatProvider;
HtmlNativeImage.prototype = Object.create(NativeImage.prototype);
HtmlNativeImage.prototype.constructor = HtmlNativeImage;
$decodeToCanvasCOROUTINE$37.prototype = Object.create(CoroutineImpl.prototype);
$decodeToCanvasCOROUTINE$37.prototype.constructor = $decodeToCanvasCOROUTINE$37;
$loadCanvasCOROUTINE$38.prototype = Object.create(CoroutineImpl.prototype);
$loadCanvasCOROUTINE$38.prototype.constructor = $loadCanvasCOROUTINE$38;
CanvasContext2dRenderer.prototype = Object.create(Renderer.prototype);
CanvasContext2dRenderer.prototype.constructor = CanvasContext2dRenderer;
//endregion
function Entry(slice, data) {
this.m7x_1 = slice;
this.n7x_1 = data;
}
Entry.prototype.toString = function () {
return 'Entry(slice=' + this.m7x_1 + ', data=' + this.n7x_1 + ')';
};
Entry.prototype.hashCode = function () {
var result = hashCode(this.m7x_1);
result = imul(result, 31) + (this.n7x_1 == null ? 0 : hashCode(this.n7x_1)) | 0;
return result;
};
Entry.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof Entry))
return false;
var tmp0_other_with_cast = other instanceof Entry ? other : THROW_CCE();
if (!equals(this.m7x_1, tmp0_other_with_cast.m7x_1))
return false;
if (!equals(this.n7x_1, tmp0_other_with_cast.n7x_1))
return false;
return true;
};
Entry.$metadata$ = classMeta('Entry');
function reconstructWithSize($this, width, height) {
var slices = toList($this.v7x_1);
var tmp = $this;
var tmp_0 = Companion_getInstance();
tmp.o7x_1 = tmp_0.y7k(width, height, null, 4, null);
var tmp_1 = $this;
tmp_1.t7x_1 = Bitmap32_init_$Create$(width, height, null, $this.q7x_1, 4, null);
$this.u7x_1.x7();
$this.u7x_1.c($this.t7x_1);
$this.w7x_1.x7();
$this.v7x_1.x7();
var tmp0_iterator = slices.j();
while (tmp0_iterator.k()) {
var entry = tmp0_iterator.l();
$this.m7y(entry.m7x_1, entry.n7x_1, entry.m7x_1.t2());
}
}
function growAtlas($this, bmp) {
var tmp0_subject = $this.s7x_1;
var tmp0 = tmp0_subject.q2_1;
if (tmp0 === 0) {
reconstructWithSize($this, imul($this.d72(), 2), imul($this.e72(), 2));
} else if (tmp0 === 1) {
if (bmp.d72() > $this.d72() ? true : bmp.e72() > $this.e72()) {
// Inline function 'kotlin.error' call
var tmp0_error = 'Atlas is too small (' + $this.d72() + 'x' + $this.e72() + ') to hold a slice of (' + bmp.d72() + 'x' + bmp.e72() + ')';
throw IllegalStateException_init_$Create$(toString(tmp0_error));
}
var tmp = $this;
var tmp_0 = Companion_getInstance();
var tmp_1 = $this.d72();
var tmp_2 = $this.e72();
tmp.o7x_1 = tmp_0.y7k(tmp_1, tmp_2, null, 4, null);
var tmp_3 = $this;
var tmp_4 = $this.d72();
var tmp_5 = $this.e72();
tmp_3.t7x_1 = Bitmap32_init_$Create$(tmp_4, tmp_5, null, $this.q7x_1, 4, null);
$this.u7x_1.c($this.t7x_1);
}
}
function Bitmap$tempInts$delegate$lambda(this$0) {
return function () {
return new Int32Array(imul(this$0.d72(), 2));
};
}
function Bitmap(width, height, bpp, premultiplied, backingArray) {
this.n7y_1 = width;
this.o7y_1 = height;
this.p7y_1 = bpp;
this.q7y_1 = backingArray;
var tmp = this;
tmp.r7y_1 = Mixin_init_$Create$(null, 1, null);
this.s7y_1 = premultiplied;
this.t7y_1 = false;
var tmp_0 = this;
tmp_0.u7y_1 = lazy(Bitmap$tempInts$delegate$lambda(this));
this.v7y_1 = 0;
this.w7y_1 = null;
this.x7y_1 = null;
this.y7y_1 = Companion_getInstance_0().zp();
this.z7y_1 = false;
}
Bitmap.prototype.d72 = function () {
return this.n7y_1;
};
Bitmap.prototype.e72 = function () {
return this.o7y_1;
};
Bitmap.prototype.a7z = function () {
return this.p7y_1;
};
Bitmap.prototype.e4v = function (_set____db54di) {
this.r7y_1.e4v(_set____db54di);
};
Bitmap.prototype.f4v = function () {
return this.r7y_1.f4v();
};
Bitmap.prototype.b7z = function () {
return this.s7y_1;
};
Bitmap.prototype.c7z = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = tempInts$factory();
tmp$ret$0 = this.u7y_1.l1();
return tmp$ret$0;
};
Bitmap.prototype.d7z = function () {
return _RgbaArray___init__impl__oib4y4(this.c7z());
};
Bitmap.prototype.e7z = function (_set____db54di) {
this.z7y_1 = _set____db54di;
};
Bitmap.prototype.f7z = function () {
return imul(this.d72(), this.p7y_1) / 8 | 0;
};
Bitmap.prototype.g7z = function () {
return imul(this.d72(), this.e72());
};
Bitmap.prototype.h7z = function (x, y) {
return imul(y, this.d72()) + x | 0;
};
Bitmap.prototype.i7z = function () {
if (!(this.x7y_1 == null)) {
if (!kdsIsFrozen(this)) {
this.x7y_1 = null;
}
}
};
Bitmap.prototype.j7z = function () {
return Unit_getInstance();
};
Bitmap.prototype.k7z = function (rect) {
if (!(rect == null)) {
if (this.x7y_1 == null) {
this.y7y_1.u7c(rect);
} else {
this.y7y_1.a7d(this.y7y_1, rect);
}
} else {
this.y7y_1.t7c(0, 0, this.d72(), this.e72());
}
this.x7y_1 = this.y7y_1;
var tmp0_this = this;
tmp0_this.v7y_1 = tmp0_this.v7y_1 + 1 | 0;
return tmp0_this.v7y_1;
};
Bitmap.prototype.l7z = function (rect, doLock, block) {
if (doLock) {
this.j7z();
}
try {
block();
}finally {
return doLock ? this.k7z(rect) : 0;
}
};
Bitmap.prototype.m7z = function (x, y, width, height, out, offset) {
var n = offset;
var inductionVariable = 0;
if (inductionVariable < height)
do {
var y0 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var inductionVariable_0 = 0;
if (inductionVariable_0 < width)
do {
var x0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp2 = n;
n = tmp2 + 1 | 0;
out[tmp2] = _RGBA___get_value__impl__hhco8v(this.n7z(x0 + x | 0, y0 + y | 0));
}
while (inductionVariable_0 < width);
}
while (inductionVariable < height);
};
Bitmap.prototype.o7z = function (x, y, width, height, out, offset, $mask0, $handler) {
if (!(($mask0 & 32) === 0))
offset = 0;
var tmp;
if ($handler == null) {
this.m7z(x, y, width, height, out, offset);
tmp = Unit_getInstance();
} else {
tmp = $handler(x, y, width, height, out, offset);
}
return tmp;
};
Bitmap.prototype.p7z = function (x, y, width, height, out, offset) {
var n = offset;
var inductionVariable = 0;
if (inductionVariable < height)
do {
var y0 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var inductionVariable_0 = 0;
if (inductionVariable_0 < width)
do {
var x0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp = x0 + x | 0;
var tmp_0 = y0 + y | 0;
var tmp2 = n;
n = tmp2 + 1 | 0;
this.q7z(tmp, tmp_0, _RGBA___init__impl__lqpay5(out[tmp2]));
}
while (inductionVariable_0 < width);
}
while (inductionVariable < height);
};
Bitmap.prototype.r7z = function (x, y, width, height, out, offset, $mask0, $handler) {
if (!(($mask0 & 32) === 0))
offset = 0;
var tmp;
if ($handler == null) {
this.p7z(x, y, width, height, out, offset);
tmp = Unit_getInstance();
} else {
tmp = $handler(x, y, width, height, out, offset);
}
return tmp;
};
Bitmap.prototype.q7z = function (x, y, v) {
throw NotImplementedError_init_$Create$(null, 1, null);
};
Bitmap.prototype.n7z = function (x, y) {
return Colors_getInstance().x7z_1;
};
Bitmap.prototype.k85 = function (x, y, color) {
return Unit_getInstance();
};
Bitmap.prototype.l85 = function (x, y) {
return 0;
};
Bitmap.prototype.m85 = function (x, y) {
var x0 = toIntFloor(x);
var y0 = toIntFloor(y);
if (((x0 < 0 ? true : y0 < 0) ? true : x0 >= this.d72()) ? true : y0 > this.e72())
return Colors_getInstance().x7z_1;
var x1 = toIntCeil(x);
var y1 = toIntCeil(y);
var x1Inside = x1 < (this.d72() - 1 | 0);
var y1Inside = y1 < (this.e72() - 1 | 0);
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.fract' call
tmp$ret$0 = x - toIntFloor(x);
var xratio = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.fract' call
tmp$ret$1 = y - toIntFloor(y);
var yratio = tmp$ret$1;
var c00 = this.n7z(x0, y0);
var c10 = x1Inside ? this.n7z(x1, y0) : c00;
var c01 = y1Inside ? this.n7z(x0, y1) : c00;
var c11 = (x1Inside ? y1Inside : false) ? this.n7z(x1, y1) : c01;
return Companion_getInstance_21().s85(c00, c10, c01, c11, xratio, yratio);
};
Bitmap.prototype.t85 = function (srcX, srcY, dst, dstX, dstY, width, height) {
var src = this;
var srcX0 = src.u85(srcX);
var srcX1 = src.u85(srcX + width | 0);
var srcY0 = src.v85(srcY);
var srcY1 = src.v85(srcY + height | 0);
var dstX0 = dst.u85(dstX);
var dstX1 = dst.u85(dstX + width | 0);
var dstY0 = dst.v85(dstY);
var dstY1 = dst.v85(dstY + height | 0);
var srcX_0 = srcX0;
var srcY_0 = srcY0;
var dstX_0 = dstX0;
var dstY_0 = dstY0;
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = srcX1 - srcX0 | 0;
var tmp1_min = dstX1 - dstX0 | 0;
tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
var width_0 = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.min' call
var tmp2_min = srcY1 - srcY0 | 0;
var tmp3_min = dstY1 - dstY0 | 0;
tmp$ret$1 = Math.min(tmp2_min, tmp3_min);
var height_0 = tmp$ret$1;
this.w85(srcX_0, srcY_0, dst, dstX_0, dstY_0, width_0, height_0);
};
Bitmap.prototype.w85 = function (srcX, srcY, dst, dstX, dstY, width, height) {
var inductionVariable = 0;
if (inductionVariable < height)
do {
var y = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.m7z(srcX, srcY + y | 0, width, 1, this.c7z(), 0);
dst.p7z(dstX, dstY + y | 0, width, 1, this.c7z(), 0);
}
while (inductionVariable < height);
};
Bitmap.prototype.u85 = function (x) {
return clamp(x, 0, this.d72());
};
Bitmap.prototype.v85 = function (y) {
return clamp(y, 0, this.e72());
};
Bitmap.prototype.x85 = function () {
var inductionVariable = 0;
var last = this.e72() / 2 | 0;
if (inductionVariable < last)
do {
var y = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.y85(y, (this.e72() - y | 0) - 1 | 0);
}
while (inductionVariable < last);
return this;
};
Bitmap.prototype.z85 = function () {
var inductionVariable = 0;
var last = this.d72() / 2 | 0;
if (inductionVariable < last)
do {
var x = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.a86(x, (this.d72() - x | 0) - 1 | 0);
}
while (inductionVariable < last);
return this;
};
Bitmap.prototype.y85 = function (y0, y1) {
var inductionVariable = 0;
var last = this.d72();
if (inductionVariable < last)
do {
var x = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c0 = this.l85(x, y0);
var c1 = this.l85(x, y1);
this.k85(x, y0, c1);
this.k85(x, y1, c0);
}
while (inductionVariable < last);
};
Bitmap.prototype.a86 = function (x0, x1) {
var inductionVariable = 0;
var last = this.e72();
if (inductionVariable < last)
do {
var y = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c0 = this.l85(x0, y);
var c1 = this.l85(x1, y);
this.k85(x0, y, c1);
this.k85(x1, y, c0);
}
while (inductionVariable < last);
};
Bitmap.prototype.b86 = function (antialiasing) {
throw UnsupportedOperationException_init_$Create$('Not implemented context2d on Bitmap, please use NativeImage or Bitmap32 instead');
};
Bitmap.prototype.c86 = function (width, height) {
invalidOp('Unsupported createWithThisFormat (' + this + ')');
};
Bitmap.prototype.d86 = function () {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp = this.d72();
var tmp_0 = this.e72();
var tmp0_also = Bitmap32_init_$Create$(tmp, tmp_0, null, this.s7y_1, 4, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.Bitmap.toBMP32.<anonymous>' call
this.m7z(0, 0, this.d72(), this.e72(), tmp0_also.r86_1, 0);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
};
Bitmap.prototype.w86 = function () {
var tmp;
if (this instanceof Bitmap32) {
tmp = this;
} else {
tmp = this.d86();
}
return tmp;
};
Bitmap.$metadata$ = classMeta('Bitmap', [Sizeable, ISizeInt, Extra]);
function mipmaps(_this__u8e3s4, enable) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.mipmaps.<anonymous>' call
_this__u8e3s4.z7y_1 = enable;
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0;
}
function context2d(_this__u8e3s4, antialiased, doLock, callback) {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
if (doLock) {
_this__u8e3s4.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx = _this__u8e3s4.b86(antialiased);
try {
callback(ctx);
}finally {
ctx.s1x();
}
}finally {
tmp$ret$0 = doLock ? _this__u8e3s4.k7z(null) : 0;
break $l$block;
}
}
return _this__u8e3s4;
}
function extract_0(_this__u8e3s4, x, y, width, height) {
var out = createWithThisFormatTyped(_this__u8e3s4, width, height);
_this__u8e3s4.t85(x, y, out, 0, 0, width, height);
return out;
}
function createWithThisFormatTyped(_this__u8e3s4, width, height) {
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp0_fastCastTo = _this__u8e3s4.c86(width, height);
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_fastCastTo;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
}
function asumePremultiplied(_this__u8e3s4) {
_this__u8e3s4.s7y_1 = true;
_this__u8e3s4.t7y_1 = true;
return _this__u8e3s4;
}
function tempInts$factory() {
return getPropertyCallableRef('tempInts', 1, KProperty1, function (receiver) {
return receiver.c7z();
}, null);
}
function Bitmap32_init_$Init$(width, height, ints, premultiplied, $mask0, $marker, $this) {
if (!(($mask0 & 4) === 0))
ints = new Int32Array(imul(width, height));
Bitmap32.call($this, width, height, ints, premultiplied);
return $this;
}
function Bitmap32_init_$Create$(width, height, ints, premultiplied, $mask0, $marker) {
return Bitmap32_init_$Init$(width, height, ints, premultiplied, $mask0, $marker, Object.create(Bitmap32.prototype));
}
function Bitmap32_init_$Init$_0(width, height, $this) {
Bitmap32_init_$Init$(width, height, null, false, 4, null, $this);
return $this;
}
function Bitmap32_init_$Create$_0(width, height) {
return Bitmap32_init_$Init$_0(width, height, Object.create(Bitmap32.prototype));
}
function Companion() {
Companion_instance = this;
var tmp = this;
tmp.g87_1 = Bitmap32_init_$Create$(0, 0, null, true, 4, null);
}
Companion.prototype.h87 = function (width, height, value) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = Bitmap32_init_$Create$(width, height, null, true, 4, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.Companion.invoke.<anonymous>' call
var tmp = _RGBAPremultiplied___get_value__impl__bqfhud(value);
fill$default(tmp0_apply.r86_1, tmp, 0, 0, 6, null);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
};
Companion.prototype.i87 = function (width, height, premultiplied) {
return new Bitmap32(width, height, new Int32Array(imul(width, height)), premultiplied);
};
Companion.prototype.j87 = function (src, srcChannel, dst, dstChannel) {
var srcShift = srcChannel.n87_1;
var dstShift = dstChannel.n87_1;
var dstClear = dstChannel.p87_1;
var dstData = dst.r86_1;
var srcData = src.r86_1;
var inductionVariable = 0;
var last = dst.g7z();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c = (srcData[n] >>> srcShift | 0) & 255;
dstData[n] = dstData[n] & dstClear | c << dstShift;
}
while (inductionVariable < last);
};
Companion.$metadata$ = objectMeta('Companion');
var Companion_instance;
function Companion_getInstance_12() {
if (Companion_instance == null)
new Companion();
return Companion_instance;
}
function Bitmap32$iterator$slambda(this$0, resultContinuation) {
this.y87_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
Bitmap32$iterator$slambda.prototype.c88 = function ($this$iterator, $cont) {
var tmp = this.d88($this$iterator, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Bitmap32$iterator$slambda.prototype.w7 = function (p1, $cont) {
return this.c88(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $cont);
};
Bitmap32$iterator$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 4;
this.a88_1 = until(0, this.y87_1.g7z()).j();
this.o7_1 = 1;
continue $sm;
case 1:
if (!this.a88_1.k()) {
this.o7_1 = 3;
continue $sm;
}
this.b88_1 = this.a88_1.l();
this.o7_1 = 2;
suspendResult = this.z87_1.h5(new RGBA(this.y87_1.e88(this.b88_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);
};
Bitmap32$iterator$slambda.prototype.d88 = function ($this$iterator, completion) {
var i = new Bitmap32$iterator$slambda(this.y87_1, completion);
i.z87_1 = $this$iterator;
return i;
};
Bitmap32$iterator$slambda.$metadata$ = classMeta('Bitmap32$iterator$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function Bitmap32$iterator$slambda_0(this$0, resultContinuation) {
var i = new Bitmap32$iterator$slambda(this$0, resultContinuation);
var l = function ($this$iterator, $cont) {
return i.c88($this$iterator, $cont);
};
l.$arity = 1;
return l;
}
function Bitmap32(width, height, ints, premultiplied) {
Companion_getInstance_12();
Bitmap.call(this, width, height, 32, premultiplied, ints);
this.r86_1 = ints;
this.s86_1 = _RgbaArray___init__impl__oib4y4(this.r86_1);
this.t86_1 = _RgbaPremultipliedArray___init__impl__lx83hy(this.r86_1);
if (this.r86_1.length < imul(width, height))
throw RuntimeException_init_$Create$('Bitmap data is too short: width=' + width + ', height=' + height + ', data=ByteArray(' + this.r86_1.length + '), area=' + imul(width, height));
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
tmp$ret$0 = Math.max(width, height);
tmp.u86_1 = new Int32Array(tmp$ret$0);
this.v86_1 = new RectangleInt(Companion_getInstance_1().g7d(0, 0, width, height));
}
Bitmap32.prototype.f88 = function () {
return this.r86_1;
};
Bitmap32.prototype.c86 = function (width, height) {
return Bitmap32_init_$Create$(width, height, null, this.s7y_1, 4, null);
};
Bitmap32.prototype.w85 = function (srcX, srcY, dst, dstX, dstY, width, height) {
if (!(dst instanceof Bitmap32))
return Bitmap.prototype.w85.call(this, srcX, srcY, dst, dstX, dstY, width, height);
var src = this;
var srcArray = src.r86_1;
var dstArray = dst.r86_1;
var inductionVariable = 0;
if (inductionVariable < height)
do {
var y = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
arraycopy(srcArray, src.h7z(srcX, srcY + y | 0), dstArray, dst.h7z(dstX, dstY + y | 0), width);
}
while (inductionVariable < height);
};
Bitmap32.prototype.g88 = function (x, y) {
return this.h88(x, y);
};
Bitmap32.prototype.k85 = function (x, y, color) {
this.r86_1[this.h7z(x, y)] = color;
};
Bitmap32.prototype.l85 = function (x, y) {
return this.r86_1[this.h7z(x, y)];
};
Bitmap32.prototype.n7z = function (x, y) {
return _RGBA___init__impl__lqpay5(this.l85(x, y));
};
Bitmap32.prototype.q7z = function (x, y, v) {
return this.k85(x, y, _RGBA___get_value__impl__hhco8v(v));
};
Bitmap32.prototype.h88 = function (x, y) {
return this.e88(this.h7z(x, y));
};
Bitmap32.prototype.i88 = function (n, color) {
this.r86_1[n] = this.s7y_1 ? _RGBAPremultiplied___get_value__impl__bqfhud(_RGBA___get_premultiplied__impl__3bulqc(color)) : _RGBA___get_value__impl__hhco8v(color);
};
Bitmap32.prototype.j88 = function (n, color) {
this.r86_1[n] = this.s7y_1 ? _RGBAPremultiplied___get_value__impl__bqfhud(color) : _RGBA___get_value__impl__hhco8v(_RGBAPremultiplied___get_depremultiplied__impl__q1zu93(color));
};
Bitmap32.prototype.e88 = function (n) {
return this.s7y_1 ? _RGBAPremultiplied___get_depremultiplied__impl__q1zu93(_RGBAPremultiplied___init__impl__uos02x(this.r86_1[n])) : _RGBA___init__impl__lqpay5(this.r86_1[n]);
};
Bitmap32.prototype.k88 = function (n) {
return this.s7y_1 ? _RGBAPremultiplied___init__impl__uos02x(this.r86_1[n]) : _RGBA___get_premultiplied__impl__3bulqc(_RGBA___init__impl__lqpay5(this.r86_1[n]));
};
Bitmap32.prototype.l88 = function (src, dx, dy, sleft, stop, sright, sbottom, mix_0) {
var dst = this;
var width = sright - sleft | 0;
var height = sbottom - stop | 0;
var inductionVariable = 0;
if (inductionVariable < height)
do {
var y = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var dstOffset = dst.h7z(dx, dy + y | 0);
var srcOffset = src.h7z(sleft, stop + y | 0);
if (mix_0) {
var inductionVariable_0 = 0;
if (inductionVariable_0 < width)
do {
var x = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
dst.j88(dstOffset + x | 0, mix(dst.k88(dstOffset + x | 0), src.k88(srcOffset + x | 0)));
}
while (inductionVariable_0 < width);
} else {
if (dst.s7y_1 === src.s7y_1) {
arraycopy(src.r86_1, srcOffset, dst.r86_1, dstOffset, width);
} else if (!dst.s7y_1) {
var inductionVariable_1 = 0;
if (inductionVariable_1 < width)
do {
var x_0 = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
dst.i88(dstOffset + x_0 | 0, src.e88(srcOffset + x_0 | 0));
}
while (inductionVariable_1 < width);
} else {
var inductionVariable_2 = 0;
if (inductionVariable_2 < width)
do {
var x_1 = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
dst.j88(dstOffset + x_1 | 0, src.k88(srcOffset + x_1 | 0));
}
while (inductionVariable_2 < width);
}
}
}
while (inductionVariable < height);
};
Bitmap32.prototype.m88 = function (src, dx, dy, sleft, stop, sright, sbottom, mix) {
var sleft_0 = sleft;
var stop_0 = stop;
var dx_0 = dx;
var dy_0 = dy;
if (dx_0 < 0) {
sleft_0 = sleft_0 - dx_0 | 0;
dx_0 = 0;
}
if (dy_0 < 0) {
stop_0 = stop_0 - dy_0 | 0;
dy_0 = 0;
}
var availableWidth = this.d72() - dx_0 | 0;
var availableHeight = this.e72() - dy_0 | 0;
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = sright - sleft_0 | 0;
tmp$ret$0 = Math.min(availableWidth, tmp0_min);
var awidth = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.min' call
var tmp1_min = sbottom - stop_0 | 0;
tmp$ret$1 = Math.min(availableHeight, tmp1_min);
var aheight = tmp$ret$1;
this.l88(src, dx_0, dy_0, sleft_0, stop_0, sleft_0 + awidth | 0, stop_0 + aheight | 0, mix);
};
Bitmap32.prototype.n88 = function (src, dx, dy, mix) {
var b = src.z7x_1;
this.m88(src.c89_1, dx, dy, _RectangleInt___get_left__impl__rhzld(b), _RectangleInt___get_top__impl__ie2ifj(b), _RectangleInt___get_right__impl__9c8zzq(b), _RectangleInt___get_bottom__impl__za67bh(b), mix);
};
Bitmap32.prototype.e89 = function (src, dx, dy) {
return this.n88(src, dx, dy, true);
};
Bitmap32.prototype.f89 = function (destination, input, source) {
return Companion_getInstance_12().j87(input, source, this, destination);
};
Bitmap32.prototype.toString = function () {
return 'Bitmap32(' + this.d72() + ', ' + this.e72() + ')';
};
Bitmap32.prototype.y85 = function (y0, y1) {
var s0 = this.h7z(0, y0);
var s1 = this.h7z(0, y1);
arraycopy(this.r86_1, s0, this.u86_1, 0, this.d72());
arraycopy(this.r86_1, s1, this.r86_1, s0, this.d72());
arraycopy(this.u86_1, 0, this.r86_1, s1, this.d72());
};
Bitmap32.prototype.z4n = function () {
var tmp = this.d72();
var tmp_0 = this.e72();
var tmp$ret$1;
// Inline function 'kotlin.collections.copyOf' call
var tmp0_copyOf = this.r86_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_copyOf;
tmp$ret$1 = tmp$ret$0.slice();
return new Bitmap32(tmp, tmp_0, tmp$ret$1, this.s7y_1);
};
Bitmap32.prototype.b86 = function (antialiasing) {
var tmp = new Bitmap32Context2d(this, antialiasing);
return Context2d_init_$Create$(tmp, null, null, 6, null);
};
Bitmap32.prototype.g89 = function () {
return this.s7y_1 ? this : this.copyPremultiplied();
};
Bitmap32.prototype.h89 = function () {
return !this.s7y_1 ? this : this.i89();
};
Bitmap32.prototype.copyPremultiplied = function () {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = this.z4n();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.Bitmap32.premultiplied.<anonymous>' call
tmp0_apply.j89();
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
};
Bitmap32.prototype.i89 = function () {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = this.z4n();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.Bitmap32.depremultiplied.<anonymous>' call
tmp0_apply.k89();
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
};
Bitmap32.prototype.j89 = function () {
if (this.s7y_1)
return Unit_getInstance();
this.s7y_1 = true;
var inductionVariable = 0;
var last = this.g7z();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.r86_1[n] = _RGBAPremultiplied___get_value__impl__bqfhud(_RGBA___get_premultiplied__impl__3bulqc(_RGBA___init__impl__lqpay5(this.r86_1[n])));
}
while (inductionVariable < last);
};
Bitmap32.prototype.k89 = function () {
if (!this.s7y_1)
return Unit_getInstance();
this.s7y_1 = false;
var inductionVariable = 0;
var last = this.g7z();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.r86_1[n] = _RGBA___get_value__impl__hhco8v(_RGBAPremultiplied___get_depremultiplied__impl__q1zu93(_RGBAPremultiplied___init__impl__uos02x(this.r86_1[n])));
}
while (inductionVariable < last);
};
Bitmap32.prototype.j = function () {
return iterator(Bitmap32$iterator$slambda_0(this, null));
};
Bitmap32.prototype.l89 = function (x, y, data, width, increment) {
if (increment === 1) {
arraycopy(_RgbaArray___get_ints__impl__u2kps1(data), 0, this.r86_1, this.h7z(x, y), width);
} else {
var m = this.h7z(x, y);
var inductionVariable = 0;
if (inductionVariable < width)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.r86_1[m] = _RgbaArray___get_ints__impl__u2kps1(data)[n];
m = m + increment | 0;
}
while (inductionVariable < width);
}
};
Bitmap32.prototype.d86 = function () {
return this;
};
Bitmap32.$metadata$ = classMeta('Bitmap32', [Iterable], undefined, undefined, undefined, Bitmap.prototype);
function isFullyTransparent(_this__u8e3s4) {
var bmp = _this__u8e3s4.c89_1;
var data = _RgbaArray___init__impl__oib4y4(_this__u8e3s4.c89_1.r86_1);
var width = _this__u8e3s4.z73() - _this__u8e3s4.b74() | 0;
var inductionVariable = _this__u8e3s4.y73();
var last = _this__u8e3s4.a74();
if (inductionVariable < last)
do {
var y = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var index = bmp.h7z(_this__u8e3s4.b74(), y);
var inductionVariable_0 = 0;
if (inductionVariable_0 < width)
do {
var n = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
if (!(_RGBA___get_a__impl__6msvu7(RgbaArray__get_impl_nzyo1o(data, index + n | 0)) === 0))
return false;
}
while (inductionVariable_0 < width);
}
while (inductionVariable < last);
return true;
}
function expandBorder(_this__u8e3s4, area, border) {
var data = _this__u8e3s4.r86_1;
var x0Index = _this__u8e3s4.h7z(get_left(area), get_top(area));
var x1Index = _this__u8e3s4.h7z(get_right(area) - 1 | 0, get_top(area));
var inductionVariable = 0;
var last = area.e72();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var x0Color = data[x0Index];
var x1Color = data[x1Index];
var inductionVariable_0 = 0;
if (inductionVariable_0 < border)
do {
var m = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
data[(x0Index - m | 0) - 1 | 0] = x0Color;
data[(x1Index + m | 0) + 1 | 0] = x1Color;
}
while (inductionVariable_0 < border);
x0Index = x0Index + _this__u8e3s4.d72() | 0;
x1Index = x1Index + _this__u8e3s4.d72() | 0;
}
while (inductionVariable < last);
var inductionVariable_1 = 0;
if (inductionVariable_1 < border)
do {
var m_0 = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var x = get_left(area) - border | 0;
var npixels = area.d72() + imul(border, 2) | 0;
arraycopy(data, _this__u8e3s4.h7z(x, get_top(area)), data, _this__u8e3s4.h7z(x, (get_top(area) - m_0 | 0) - 1 | 0), npixels);
arraycopy(data, _this__u8e3s4.h7z(x, get_bottom(area) - 1 | 0), data, _this__u8e3s4.h7z(x, get_bottom(area) + m_0 | 0), npixels);
}
while (inductionVariable_1 < border);
}
function Bitmap8_init_$Init$(width, height, data, palette, $mask0, $marker, $this) {
if (!(($mask0 & 4) === 0))
data = new Int8Array(imul(width, height));
if (!(($mask0 & 8) === 0))
palette = Companion_getInstance_22().m89(256);
Bitmap8.call($this, width, height, data, palette);
return $this;
}
function Bitmap8_init_$Create$(width, height, data, palette, $mask0, $marker) {
return Bitmap8_init_$Init$(width, height, data, palette, $mask0, $marker, Object.create(Bitmap8.prototype));
}
function Companion_0() {
Companion_instance_0 = this;
}
Companion_0.$metadata$ = objectMeta('Companion');
var Companion_instance_0;
function Companion_getInstance_13() {
if (Companion_instance_0 == null)
new Companion_0();
return Companion_instance_0;
}
function Bitmap8(width, height, data, palette) {
Companion_getInstance_13();
BitmapIndexed.call(this, 8, width, height, data, palette);
}
Bitmap8.prototype.c86 = function (width, height) {
return Bitmap8_init_$Create$(width, height, null, this.v8a_1, 4, null);
};
Bitmap8.prototype.k85 = function (x, y, color) {
return this.b8b(this.h7z(x, y), color);
};
Bitmap8.prototype.l85 = function (x, y) {
return UByteArrayInt__get_impl_px6q8a(this.x8a_1, this.h7z(x, y));
};
Bitmap8.prototype.n7z = function (x, y) {
var tmp = this.v8a_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.BitmapIndexed.get' call
tmp$ret$0 = this.l85(x, y);
return RgbaArray__get_impl_nzyo1o(tmp, tmp$ret$0);
};
Bitmap8.prototype.c8b = function (n) {
return UByteArrayInt__get_impl_px6q8a(this.x8a_1, n);
};
Bitmap8.prototype.b8b = function (n, color) {
UByteArrayInt__set_impl_gn4532(this.x8a_1, n, color);
};
Bitmap8.prototype.w85 = function (srcX, srcY, dst, dstX, dstY, width, height) {
if (!(dst instanceof Bitmap8))
return BitmapIndexed.prototype.w85.call(this, srcX, srcY, dst, dstX, dstY, width, height);
var inductionVariable = 0;
if (inductionVariable < height)
do {
var y = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp = this.s3l();
var tmp_0 = this.h7z(srcX, srcY + y | 0);
arraycopy_0(tmp, tmp_0, (dst instanceof Bitmap8 ? dst : THROW_CCE()).s3l(), dst.h7z(dstX, dstY + y | 0), width);
}
while (inductionVariable < height);
};
Bitmap8.prototype.toString = function () {
return 'Bitmap8(' + this.d72() + ', ' + this.e72() + ', palette=' + _RgbaArray___get_size__impl__imxef8(this.v8a_1) + ')';
};
Bitmap8.$metadata$ = classMeta('Bitmap8', undefined, undefined, undefined, undefined, BitmapIndexed.prototype);
var BitmapChannel_RED_instance;
var BitmapChannel_GREEN_instance;
var BitmapChannel_BLUE_instance;
var BitmapChannel_ALPHA_instance;
function Companion_1() {
Companion_instance_1 = this;
this.j8b_1 = values();
}
Companion_1.$metadata$ = objectMeta('Companion');
var Companion_instance_1;
function Companion_getInstance_14() {
BitmapChannel_initEntries();
if (Companion_instance_1 == null)
new Companion_1();
return Companion_instance_1;
}
function values() {
return [BitmapChannel_RED_getInstance(), BitmapChannel_GREEN_getInstance(), BitmapChannel_BLUE_getInstance(), BitmapChannel_ALPHA_getInstance()];
}
var BitmapChannel_entriesInitialized;
function BitmapChannel_initEntries() {
if (BitmapChannel_entriesInitialized)
return Unit_getInstance();
BitmapChannel_entriesInitialized = true;
BitmapChannel_RED_instance = new BitmapChannel('RED', 0, 0);
BitmapChannel_GREEN_instance = new BitmapChannel('GREEN', 1, 1);
BitmapChannel_BLUE_instance = new BitmapChannel('BLUE', 2, 2);
BitmapChannel_ALPHA_instance = new BitmapChannel('ALPHA', 3, 3);
Companion_getInstance_14();
}
function BitmapChannel(name, ordinal, index) {
Enum.call(this, name, ordinal);
this.m87_1 = index;
this.n87_1 = imul(this.m87_1, 8);
this.o87_1 = 255 << this.n87_1;
this.p87_1 = ~this.o87_1;
}
BitmapChannel.$metadata$ = classMeta('BitmapChannel', undefined, undefined, undefined, undefined, Enum.prototype);
function BitmapChannel_RED_getInstance() {
BitmapChannel_initEntries();
return BitmapChannel_RED_instance;
}
function BitmapChannel_GREEN_getInstance() {
BitmapChannel_initEntries();
return BitmapChannel_GREEN_instance;
}
function BitmapChannel_BLUE_getInstance() {
BitmapChannel_initEntries();
return BitmapChannel_BLUE_instance;
}
function BitmapChannel_ALPHA_getInstance() {
BitmapChannel_initEntries();
return BitmapChannel_ALPHA_instance;
}
function BitmapIndexed(bpp, width, height, bytes, palette) {
Bitmap.call(this, width, height, bpp, false, bytes);
this.u8a_1 = bytes;
this.v8a_1 = palette;
if (this.u8a_1.length < (imul(width, height) / (8 / bpp | 0) | 0))
throw RuntimeException_init_$Create$('Bitmap data is too short: width=' + width + ', height=' + height + ', data=ByteArray(' + this.s3l().length + '), area=' + imul(width, height));
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
tmp$ret$0 = Math.max(width, height);
tmp.w8a_1 = new Int8Array(tmp$ret$0);
this.x8a_1 = _UByteArrayInt___init__impl__xif7bu(this.s3l());
this.y8a_1 = 8 / bpp | 0;
this.z8a_1 = ilog2(this.y8a_1);
this.a8b_1 = this.y8a_1 - 1 | 0;
}
BitmapIndexed.prototype.d8b = function () {
return this.v8a_1;
};
BitmapIndexed.prototype.s3l = function () {
return this.u8a_1;
};
BitmapIndexed.prototype.toString = function () {
return 'BitmapIndexed(bpp=' + this.p7y_1 + ', width=' + this.d72() + ', height=' + this.e72() + ', clut=' + _RgbaArray___get_size__impl__imxef8(this.v8a_1) + ')';
};
BitmapIndexed.prototype.l78 = function (x, y) {
return this.l85(x, y);
};
BitmapIndexed.prototype.e8b = function (x, y, color) {
return this.k85(x, y, color);
};
BitmapIndexed.prototype.l85 = function (x, y) {
return this.c8b(this.h7z(x, y));
};
BitmapIndexed.prototype.k85 = function (x, y, color) {
return this.b8b(this.h7z(x, y), color);
};
BitmapIndexed.prototype.c8b = function (n) {
var iD = this.g8b(n);
var iM = this.h8b(n);
return extract(UByteArrayInt__get_impl_px6q8a(this.x8a_1, iD), imul(this.p7y_1, iM), this.p7y_1);
};
BitmapIndexed.prototype.b8b = function (n, color) {
var iD = this.g8b(n);
var iM = this.h8b(n);
UByteArrayInt__set_impl_gn4532(this.x8a_1, iD, insert(UByteArrayInt__get_impl_px6q8a(this.x8a_1, iD), color, imul(this.p7y_1, iM), this.p7y_1));
};
BitmapIndexed.prototype.n7z = function (x, y) {
var tmp = this.v8a_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.BitmapIndexed.get' call
tmp$ret$0 = this.l85(x, y);
return RgbaArray__get_impl_nzyo1o(tmp, tmp$ret$0);
};
BitmapIndexed.prototype.f8b = function (x, y) {
return this.g8b(this.h7z(x, y));
};
BitmapIndexed.prototype.g8b = function (n) {
return n >>> this.z8a_1 | 0;
};
BitmapIndexed.prototype.h8b = function (n) {
return n & this.a8b_1;
};
BitmapIndexed.prototype.y85 = function (y0, y1) {
var s0 = this.f8b(0, y0);
var s1 = this.f8b(0, y1);
arraycopy_0(this.s3l(), s0, this.w8a_1, 0, this.f7z());
arraycopy_0(this.s3l(), s1, this.s3l(), s0, this.f7z());
arraycopy_0(this.w8a_1, 0, this.s3l(), s1, this.f7z());
};
BitmapIndexed.prototype.i8b = function (x, y, data, width, increment) {
if (increment === 1) {
arraycopy_0(data, 0, this.s3l(), this.h7z(x, y), width / this.y8a_1 | 0);
} else {
var m = this.h7z(x, y);
var inductionVariable = 0;
var last = width / this.y8a_1 | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.s3l()[m] = data[n];
m = m + increment | 0;
}
while (inductionVariable < last);
}
};
BitmapIndexed.prototype.d86 = function () {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp = this.d72();
var tmp_0 = this.e72();
var tmp0_also = Bitmap32_init_$Create$(tmp, tmp_0, null, this.s7y_1, 4, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.BitmapIndexed.toBMP32.<anonymous>' call
var out = tmp0_also.r86_1;
var pal = _RgbaArray___get_ints__impl__u2kps1(this.v8a_1);
var inductionVariable = 0;
var last = this.g7z();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
out[n] = pal[this.c8b(n)];
}
while (inductionVariable < last);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
};
BitmapIndexed.$metadata$ = classMeta('BitmapIndexed', undefined, undefined, undefined, undefined, Bitmap.prototype);
function BitmapSlice_init_$Init$(bmp, bounds, name, virtFrame, bmpCoords, $mask0, $marker, $this) {
if (!(($mask0 & 4) === 0))
name = null;
if (!(($mask0 & 8) === 0))
virtFrame = null;
if (!(($mask0 & 16) === 0)) {
bmpCoords = BmpCoordsWithInstance_init_$Create$(bmp, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, null, null, bmp.s7y_1, 2046, null);
}
BitmapSlice.call($this, bmp, bounds, name, virtFrame, bmpCoords);
return $this;
}
function BitmapSlice_init_$Create$(bmp, bounds, name, virtFrame, bmpCoords, $mask0, $marker) {
return BitmapSlice_init_$Init$(bmp, bounds, name, virtFrame, bmpCoords, $mask0, $marker, Object.create(BitmapSlice.prototype));
}
function BitmapSlice(bmp, bounds, name, virtFrame, bmpCoords) {
BmpSlice.call(this, bmp, bounds, name, virtFrame, bmpCoords);
this.c89_1 = bmp;
var tmp = this;
tmp.d89_1 = Mixin_init_$Create$(null, 1, null);
}
BitmapSlice.prototype.k8b = function () {
return this.c89_1;
};
BitmapSlice.prototype.e4v = function (_set____db54di) {
this.d89_1.e4v(_set____db54di);
};
BitmapSlice.prototype.f4v = function () {
return this.d89_1.f4v();
};
BitmapSlice.prototype.b7z = function () {
return this.c89_1.s7y_1;
};
BitmapSlice.prototype.l8b = function () {
return this.m8b(this.c89_1);
};
BitmapSlice.prototype.n8b = function (left, top, right, bottom, name, imageOrientation) {
return this.o8b(Companion_getInstance_1().g7d(left, top, right - left | 0, bottom - top | 0), name, imageOrientation);
};
BitmapSlice.prototype.q8b = function (x, y, width, height, name, imageOrientation) {
return this.o8b(Companion_getInstance_1().g7d(x, y, width, height), name, imageOrientation);
};
BitmapSlice.prototype.o8b = function (rect, name, imageOrientation) {
return BitmapSlice_init_$Create$(this.c89_1, rect, name, null, this.s8b(rect, imageOrientation), 8, null);
};
BitmapSlice.prototype.toString = function () {
return 'BitmapSlice(' + this.t2() + ':' + new SizeInt(Companion_getInstance_2().y7d(_RectangleInt___get_width__impl__gtay8w(this.z7x_1), _RectangleInt___get_height__impl__gd473j(this.z7x_1))) + ')';
};
BitmapSlice.$metadata$ = classMeta('BitmapSlice', [Extra], undefined, undefined, undefined, BmpSlice.prototype);
function slice(_this__u8e3s4, bounds, name, imageOrientation) {
var tmp$ret$1;
// Inline function 'kotlin.let' call
var tmp = Companion_getInstance_1().g7d(0, 0, _this__u8e3s4.d72(), _this__u8e3s4.e72());
var tmp0_let = BitmapSlice_init_$Create$(_this__u8e3s4, tmp, name, null, BmpCoordsWithInstance_init_$Create$(_this__u8e3s4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, null, null, _this__u8e3s4.s7y_1, 2046, null), 8, null);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.slice.<anonymous>' call
var tmp_0;
if (!equals(bounds, tmp0_let.z7x_1) ? true : !imageOrientation.equals(Companion_getInstance_38().s8c_1)) {
tmp_0 = tmp0_let.o8b(bounds, name, imageOrientation);
} else {
tmp_0 = tmp0_let;
}
tmp$ret$0 = tmp_0;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function slice$default(_this__u8e3s4, bounds, name, imageOrientation, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
bounds = Companion_getInstance_1().g7d(0, 0, _this__u8e3s4.d72(), _this__u8e3s4.e72());
if (!(($mask0 & 2) === 0))
name = null;
if (!(($mask0 & 4) === 0))
imageOrientation = Companion_getInstance_38().s8c_1;
return slice(_this__u8e3s4, bounds, name, imageOrientation);
}
function _get_pixelOffsets__f6x0x($this) {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = pixelOffsets$factory();
tmp$ret$0 = $this.k7y_1.l1();
return tmp$ret$0;
}
function BmpSlice$pixelOffsets$delegate$lambda(this$0) {
return function () {
var tmp$ret$0;
// Inline function 'kotlin.math.roundToInt' call
var tmp0_roundToInt = this$0.a8c() * this$0.n8c();
tmp$ret$0 = roundToInt(tmp0_roundToInt);
var x = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.roundToInt' call
var tmp1_roundToInt = this$0.b8c() * this$0.o8c();
tmp$ret$1 = roundToInt(tmp1_roundToInt);
var y = tmp$ret$1;
var xOff = this$0.a8c() > this$0.e8c() ? x - 1 | 0 : x;
var yOff = this$0.b8c() > this$0.f8c() ? y - 1 | 0 : y;
var xDir = this$0.a8c() < this$0.e8c() ? 1 : -1;
var yDir = this$0.b8c() < this$0.f8c() ? 1 : -1;
var tmp;
if (this$0.r8c()) {
var tmp$ret$2;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$2 = new Int32Array([xOff, yOff, 0, xDir, 0, yDir]);
tmp = tmp$ret$2;
} else {
var tmp$ret$3;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$3 = new Int32Array([xOff, yOff, xDir, 0, yDir, 0]);
tmp = tmp$ret$3;
}
return tmp;
};
}
function BmpSlice$tmpPoint$delegate$lambda() {
return new PointInt(Companion_getInstance_3().j7b());
}
function BmpSlice(bmpBase, bounds, name, virtFrame, bmpCoords) {
this.y7x_1 = bmpBase;
this.z7x_1 = bounds;
this.a7y_1 = name;
this.b7y_1 = virtFrame;
this.c7y_1 = this.y7x_1;
this.d7y_1 = bmpCoords;
if (_RectangleInt___get_x__impl__6tm2y6(this.z7x_1) < 0) {
var tmp0_this = this.z7x_1;
_RectangleInt___set_width__impl__dh3830(tmp0_this, _RectangleInt___get_width__impl__gtay8w(tmp0_this) + _RectangleInt___get_x__impl__6tm2y6(this.z7x_1) | 0);
_RectangleInt___set_x__impl__wfudb6(this.z7x_1, 0);
}
if (_RectangleInt___get_y__impl__zdvhyr(this.z7x_1) < 0) {
var tmp1_this = this.z7x_1;
_RectangleInt___set_height__impl__vwuxnn(tmp1_this, _RectangleInt___get_height__impl__gd473j(tmp1_this) + _RectangleInt___get_y__impl__zdvhyr(this.z7x_1) | 0);
_RectangleInt___set_y__impl__9rn7lr(this.z7x_1, 0);
}
if (_RectangleInt___get_width__impl__gtay8w(this.z7x_1) < 0) {
_RectangleInt___set_width__impl__dh3830(this.z7x_1, 0);
}
if (_RectangleInt___get_height__impl__gd473j(this.z7x_1) < 0) {
_RectangleInt___set_height__impl__vwuxnn(this.z7x_1, 0);
}
var tmp = this;
var tmp_0 = this.b7y_1;
tmp.e7y_1 = !((tmp_0 == null ? null : new RectangleInt(tmp_0)) == null);
var tmp_1 = this;
var tmp0_safe_receiver = this.b7y_1;
var tmp_2;
var tmp_3 = tmp0_safe_receiver;
if ((tmp_3 == null ? null : new RectangleInt(tmp_3)) == null) {
tmp_2 = null;
} else {
tmp_2 = _RectangleInt___get_width__impl__gtay8w(tmp0_safe_receiver);
}
var tmp1_elvis_lhs = tmp_2;
tmp_1.f7y_1 = tmp1_elvis_lhs == null ? _RectangleInt___get_width__impl__gtay8w(this.z7x_1) : tmp1_elvis_lhs;
var tmp_4 = this;
var tmp0_safe_receiver_0 = this.b7y_1;
var tmp_5;
var tmp_6 = tmp0_safe_receiver_0;
if ((tmp_6 == null ? null : new RectangleInt(tmp_6)) == null) {
tmp_5 = null;
} else {
tmp_5 = _RectangleInt___get_height__impl__gd473j(tmp0_safe_receiver_0);
}
var tmp1_elvis_lhs_0 = tmp_5;
tmp_4.g7y_1 = tmp1_elvis_lhs_0 == null ? _RectangleInt___get_height__impl__gd473j(this.z7x_1) : tmp1_elvis_lhs_0;
this.h7y_1 = null;
this.i7y_1 = false;
this.j7y_1 = 0;
var tmp_7 = this;
tmp_7.k7y_1 = lazy(BmpSlice$pixelOffsets$delegate$lambda(this));
var tmp_8 = this;
tmp_8.l7y_1 = lazy(BmpSlice$tmpPoint$delegate$lambda);
}
BmpSlice.prototype.u8b = function () {
return this.y7x_1;
};
BmpSlice.prototype.v8b = function () {
return this.z7x_1;
};
BmpSlice.prototype.t2 = function () {
return this.a7y_1;
};
BmpSlice.prototype.w8b = function () {
return this.b7y_1;
};
BmpSlice.prototype.x8b = function () {
return this.y7x_1;
};
BmpSlice.prototype.k8b = function () {
return this.c7y_1;
};
BmpSlice.prototype.b74 = function () {
return _RectangleInt___get_left__impl__rhzld(this.z7x_1);
};
BmpSlice.prototype.y73 = function () {
return _RectangleInt___get_top__impl__ie2ifj(this.z7x_1);
};
BmpSlice.prototype.d72 = function () {
return _RectangleInt___get_width__impl__gtay8w(this.z7x_1);
};
BmpSlice.prototype.e72 = function () {
return _RectangleInt___get_height__impl__gd473j(this.z7x_1);
};
BmpSlice.prototype.z73 = function () {
return _RectangleInt___get_right__impl__9c8zzq(this.z7x_1);
};
BmpSlice.prototype.a74 = function () {
return _RectangleInt___get_bottom__impl__za67bh(this.z7x_1);
};
BmpSlice.prototype.y8b = function () {
return this.f7y_1;
};
BmpSlice.prototype.z8b = function () {
return this.g7y_1;
};
BmpSlice.prototype.a8c = function () {
return this.d7y_1.a8c();
};
BmpSlice.prototype.b8c = function () {
return this.d7y_1.b8c();
};
BmpSlice.prototype.c8c = function () {
return this.d7y_1.c8c();
};
BmpSlice.prototype.d8c = function () {
return this.d7y_1.d8c();
};
BmpSlice.prototype.e8c = function () {
return this.d7y_1.e8c();
};
BmpSlice.prototype.f8c = function () {
return this.d7y_1.f8c();
};
BmpSlice.prototype.g8c = function () {
return this.d7y_1.g8c();
};
BmpSlice.prototype.h8c = function () {
return this.d7y_1.h8c();
};
BmpSlice.prototype.i8c = function (x, y) {
return (0 <= x ? x < this.y8b() : false) ? 0 <= y ? y < this.z8b() : false : false;
};
BmpSlice.prototype.j8c = function (x, y, out) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.BmpSlice.basePixelPosUnsafe.<anonymous>' call
var offsetX = x - this.p8c() | 0;
var offsetY = y - this.q8c() | 0;
if (((offsetX < 0 ? true : offsetY < 0) ? true : offsetX >= this.d72()) ? true : offsetY >= this.e72()) {
return null;
}
_PointInt___set_x__impl__gw06o3(out, (_get_pixelOffsets__f6x0x(this)[0] + imul(_get_pixelOffsets__f6x0x(this)[2], offsetX) | 0) + imul(_get_pixelOffsets__f6x0x(this)[3], offsetY) | 0);
_PointInt___set_y__impl__pbhe8u(out, (_get_pixelOffsets__f6x0x(this)[1] + imul(_get_pixelOffsets__f6x0x(this)[4], offsetY) | 0) + imul(_get_pixelOffsets__f6x0x(this)[5], offsetX) | 0);
tmp$ret$0 = out;
return tmp$ret$0;
};
BmpSlice.prototype.k8c = function (x, y, width, height, out, offset) {
// Inline function 'kotlin.check' call
var tmp0_check = this.i8c(x, y);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'kotlin.check' call
// Inline function 'kotlin.contracts.contract' call
if (!tmp0_check) {
var tmp$ret$0;
// Inline function 'kotlin.check.<anonymous>' call
tmp$ret$0 = 'Check failed.';
var message = tmp$ret$0;
throw IllegalStateException_init_$Create$(toString(message));
}
// Inline function 'kotlin.check' call
var tmp1_check = this.i8c((x + width | 0) - 1 | 0, (y + height | 0) - 1 | 0);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'kotlin.check' call
// Inline function 'kotlin.contracts.contract' call
if (!tmp1_check) {
var tmp$ret$1;
// Inline function 'kotlin.check.<anonymous>' call
tmp$ret$1 = 'Check failed.';
var message_0 = tmp$ret$1;
throw IllegalStateException_init_$Create$(toString(message_0));
}
// Inline function 'kotlin.check' call
var tmp2_check = _RgbaArray___get_size__impl__imxef8(out) >= (offset + imul(width, height) | 0);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'kotlin.check' call
// Inline function 'kotlin.contracts.contract' call
if (!tmp2_check) {
var tmp$ret$2;
// Inline function 'kotlin.check.<anonymous>' call
tmp$ret$2 = 'Check failed.';
var message_1 = tmp$ret$2;
throw IllegalStateException_init_$Create$(toString(message_1));
}
this.m8c(x, y, width, height, out, offset);
return out;
};
BmpSlice.prototype.l8c = function (x, y, width, height, out, offset, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
out = Companion_getInstance_22().m89(imul(width, height));
if (!(($mask0 & 32) === 0))
offset = 0;
return this.k8c(x, y, width, height, out, offset);
};
BmpSlice.prototype.m8c = function (x, y, width, height, out, offset) {
var n = offset;
var p = Companion_getInstance_3().j7b();
var inductionVariable = 0;
if (inductionVariable < height)
do {
var y0 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var inductionVariable_0 = 0;
if (inductionVariable_0 < width)
do {
var x0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp = this.j8c(x0 + x | 0, y0 + y | 0, p);
if (!((tmp == null ? null : new PointInt(tmp)) == null)) {
var tmp2 = n;
n = tmp2 + 1 | 0;
RgbaArray__set_impl_epw2wg(out, tmp2, this.y7x_1.n7z(_PointInt___get_x__impl__8q83ox(p), _PointInt___get_y__impl__k3edda(p)));
} else {
var tmp3 = n;
n = tmp3 + 1 | 0;
RgbaArray__set_impl_epw2wg(out, tmp3, Colors_getInstance().x7z_1);
}
}
while (inductionVariable_0 < width);
}
while (inductionVariable < height);
};
BmpSlice.prototype.n8b = function (left, top, right, bottom, name, imageOrientation) {
return this.o8b(Companion_getInstance_1().g7d(left, top, right - left | 0, bottom - top | 0), name, imageOrientation);
};
BmpSlice.prototype.p8b = function (left, top, right, bottom, name, imageOrientation, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
name = null;
if (!(($mask0 & 32) === 0))
imageOrientation = Companion_getInstance_38().s8c_1;
return $handler == null ? this.n8b(left, top, right, bottom, name, imageOrientation) : $handler(left, top, right, bottom, name, imageOrientation);
};
BmpSlice.prototype.q8b = function (x, y, width, height, name, imageOrientation) {
return this.o8b(Companion_getInstance_1().g7d(x, y, width, height), name, imageOrientation);
};
BmpSlice.prototype.r8b = function (x, y, width, height, name, imageOrientation, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
name = null;
if (!(($mask0 & 32) === 0))
imageOrientation = Companion_getInstance_38().s8c_1;
return $handler == null ? this.q8b(x, y, width, height, name, imageOrientation) : $handler(x, y, width, height, name, imageOrientation);
};
BmpSlice.prototype.o8b = function (rect, name, imageOrientation) {
var tmp = this.k8b();
return BitmapSlice_init_$Create$(tmp, rect, name, null, this.s8b(rect, imageOrientation), 8, null);
};
BmpSlice.prototype.t8b = function (rect, name, imageOrientation, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
name = null;
if (!(($mask0 & 4) === 0))
imageOrientation = Companion_getInstance_38().s8c_1;
return $handler == null ? this.o8b(rect, name, imageOrientation) : $handler(new RectangleInt(rect), name, imageOrientation);
};
BmpSlice.prototype.m8b = function (base) {
var tmp$ret$3;
// Inline function 'kotlin.math.roundToInt' call
var tmp$ret$2;
// Inline function 'kotlin.math.min' call
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = this.a8c();
var tmp1_min = this.c8c();
tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
var tmp4_min = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.min' call
var tmp2_min = this.g8c();
var tmp3_min = this.e8c();
tmp$ret$1 = Math.min(tmp2_min, tmp3_min);
var tmp5_min = tmp$ret$1;
tmp$ret$2 = Math.min(tmp4_min, tmp5_min);
var tmp6_roundToInt = tmp$ret$2 * this.n8c();
tmp$ret$3 = roundToInt(tmp6_roundToInt);
var x = tmp$ret$3;
var tmp$ret$7;
// Inline function 'kotlin.math.roundToInt' call
var tmp$ret$6;
// Inline function 'kotlin.math.min' call
var tmp$ret$4;
// Inline function 'kotlin.math.min' call
var tmp7_min = this.b8c();
var tmp8_min = this.d8c();
tmp$ret$4 = Math.min(tmp7_min, tmp8_min);
var tmp11_min = tmp$ret$4;
var tmp$ret$5;
// Inline function 'kotlin.math.min' call
var tmp9_min = this.h8c();
var tmp10_min = this.f8c();
tmp$ret$5 = Math.min(tmp9_min, tmp10_min);
var tmp12_min = tmp$ret$5;
tmp$ret$6 = Math.min(tmp11_min, tmp12_min);
var tmp13_roundToInt = tmp$ret$6 * this.o8c();
tmp$ret$7 = roundToInt(tmp13_roundToInt);
var y = tmp$ret$7;
var rotated = this.r8c();
var reverseX = this.d72() > 1 ? rotated ? this.b8c() > this.f8c() : this.a8c() > this.e8c() : false;
var reverseY = this.e72() > 1 ? rotated ? this.a8c() > this.e8c() : this.b8c() > this.f8c() : false;
var tmp;
if (reverseX) {
tmp = (this.y8b() - this.d72() | 0) - this.p8c() | 0;
} else {
tmp = this.p8c();
}
var offsetX = tmp;
var tmp_0;
if (reverseY) {
tmp_0 = (this.z8b() - this.e72() | 0) - this.q8c() | 0;
} else {
tmp_0 = this.q8c();
}
var offsetY = tmp_0;
var tmp_1;
if ((((!rotated ? offsetX === 0 : false) ? offsetY === 0 : false) ? this.y8b() === this.d72() : false) ? this.z8b() === this.e72() : false) {
tmp_1 = extract_0(base, x, y, this.d72(), this.e72());
} else {
var tmp$ret$8;
// Inline function 'kotlin.also' call
var tmp14_also = createWithThisFormatTyped(base, this.y8b(), this.z8b());
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.BmpSlice.extractWithBase.<anonymous>' call
if (!rotated) {
this.k8b().w85(x, y, tmp14_also, offsetX, offsetY, this.d72(), this.e72());
} else {
var rgbaArray = new Int32Array(this.d72());
var inductionVariable = 0;
var last = this.e72();
if (inductionVariable < last)
do {
var x0 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp_2 = this.k8b();
var tmp_3 = x + x0 | 0;
var tmp_4 = this.d72();
tmp_2.o7z(tmp_3, y, 1, tmp_4, rgbaArray, 0, 32, null);
var tmp_5 = offsetY + x0 | 0;
var tmp_6 = this.d72();
tmp14_also.r7z(offsetX, tmp_5, tmp_6, 1, rgbaArray, 0, 32, null);
}
while (inductionVariable < last);
}
tmp$ret$8 = tmp14_also;
tmp_1 = tmp$ret$8;
}
var out = tmp_1;
if (reverseX) {
out.z85();
}
if (reverseY) {
out.x85();
}
return out;
};
BmpSlice.$metadata$ = classMeta('BmpSlice', [Extra, BmpCoordsWithT]);
function extract_1(_this__u8e3s4) {
return _this__u8e3s4.m8b(_this__u8e3s4.y7x_1);
}
function BmpCoordsWithT() {
}
BmpCoordsWithT.$metadata$ = interfaceMeta('BmpCoordsWithT', [BmpCoords, Closeable, Resourceable]);
function sliceWithSize(_this__u8e3s4, x, y, width, height, name, imageOrientation) {
return slice(_this__u8e3s4, Companion_getInstance_1().g7d(x, y, width, height), name, imageOrientation);
}
function sliceWithSize$default(_this__u8e3s4, x, y, width, height, name, imageOrientation, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
name = null;
if (!(($mask0 & 32) === 0))
imageOrientation = Companion_getInstance_38().s8c_1;
return sliceWithSize(_this__u8e3s4, x, y, width, height, name, imageOrientation);
}
function BmpCoordsWithInstance_init_$Init$(base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
tl_x = 0.0;
if (!(($mask0 & 4) === 0))
tl_y = 0.0;
if (!(($mask0 & 8) === 0))
tr_x = 1.0;
if (!(($mask0 & 16) === 0))
tr_y = 0.0;
if (!(($mask0 & 32) === 0))
br_x = 1.0;
if (!(($mask0 & 64) === 0))
br_y = 1.0;
if (!(($mask0 & 128) === 0))
bl_x = 0.0;
if (!(($mask0 & 256) === 0))
bl_y = 1.0;
if (!(($mask0 & 512) === 0))
name = null;
if (!(($mask0 & 1024) === 0))
virtFrame = null;
BmpCoordsWithInstance.call($this, base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied);
return $this;
}
function BmpCoordsWithInstance_init_$Create$(base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied, $mask0, $marker) {
return BmpCoordsWithInstance_init_$Init$(base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied, $mask0, $marker, Object.create(BmpCoordsWithInstance.prototype));
}
function BmpCoordsWithInstance_init_$Init$_0(base, coords, name, virtFrame, $this) {
BmpCoordsWithInstance.call($this, base, coords.a8c(), coords.b8c(), coords.c8c(), coords.d8c(), coords.e8c(), coords.f8c(), coords.g8c(), coords.h8c(), name, virtFrame, coords.b7z());
return $this;
}
function BmpCoordsWithInstance_init_$Init$_1(base, coords, name, virtFrame, $mask0, $marker, $this) {
if (!(($mask0 & 4) === 0))
name = null;
if (!(($mask0 & 8) === 0))
virtFrame = null;
BmpCoordsWithInstance_init_$Init$_0(base, coords, name, virtFrame, $this);
return $this;
}
function BmpCoordsWithInstance_init_$Create$_0(base, coords, name, virtFrame, $mask0, $marker) {
return BmpCoordsWithInstance_init_$Init$_1(base, coords, name, virtFrame, $mask0, $marker, Object.create(BmpCoordsWithInstance.prototype));
}
function BmpCoordsWithInstance(base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied) {
BmpCoordsWithInstanceBase.call(this, base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied);
this.q8d_1 = base;
this.r8d_1 = tl_x;
this.s8d_1 = tl_y;
this.t8d_1 = tr_x;
this.u8d_1 = tr_y;
this.v8d_1 = br_x;
this.w8d_1 = br_y;
this.x8d_1 = bl_x;
this.y8d_1 = bl_y;
this.z8d_1 = name;
this.a8e_1 = virtFrame;
this.b8e_1 = premultiplied;
}
BmpCoordsWithInstance.prototype.x8b = function () {
return this.q8d_1;
};
BmpCoordsWithInstance.prototype.a8c = function () {
return this.r8d_1;
};
BmpCoordsWithInstance.prototype.b8c = function () {
return this.s8d_1;
};
BmpCoordsWithInstance.prototype.c8c = function () {
return this.t8d_1;
};
BmpCoordsWithInstance.prototype.d8c = function () {
return this.u8d_1;
};
BmpCoordsWithInstance.prototype.e8c = function () {
return this.v8d_1;
};
BmpCoordsWithInstance.prototype.f8c = function () {
return this.w8d_1;
};
BmpCoordsWithInstance.prototype.g8c = function () {
return this.x8d_1;
};
BmpCoordsWithInstance.prototype.h8c = function () {
return this.y8d_1;
};
BmpCoordsWithInstance.prototype.t2 = function () {
return this.z8d_1;
};
BmpCoordsWithInstance.prototype.w8b = function () {
return this.a8e_1;
};
BmpCoordsWithInstance.prototype.b7z = function () {
return this.b8e_1;
};
BmpCoordsWithInstance.prototype.toString = function () {
var tmp = this.a8e_1;
return 'BmpCoordsWithInstance(base=' + this.q8d_1 + ', tl_x=' + this.r8d_1 + ', tl_y=' + this.s8d_1 + ', tr_x=' + this.t8d_1 + ', tr_y=' + this.u8d_1 + ', br_x=' + this.v8d_1 + ', br_y=' + this.w8d_1 + ', bl_x=' + this.x8d_1 + ', bl_y=' + this.y8d_1 + ', name=' + this.z8d_1 + ', virtFrame=' + (tmp == null ? null : new RectangleInt(tmp)) + ', premultiplied=' + this.b8e_1 + ')';
};
BmpCoordsWithInstance.prototype.hashCode = function () {
var result = hashCode(this.q8d_1);
result = imul(result, 31) + getNumberHashCode(this.r8d_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.s8d_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.t8d_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.u8d_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.v8d_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.w8d_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.x8d_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.y8d_1) | 0;
result = imul(result, 31) + (this.z8d_1 == null ? 0 : getStringHashCode(this.z8d_1)) | 0;
var tmp = imul(result, 31);
var tmp_0;
var tmp_1 = this.a8e_1;
if ((tmp_1 == null ? null : new RectangleInt(tmp_1)) == null) {
tmp_0 = 0;
} else {
tmp_0 = RectangleInt__hashCode_impl_wuqys2(this.a8e_1);
}
result = tmp + tmp_0 | 0;
result = imul(result, 31) + (this.b8e_1 | 0) | 0;
return result;
};
BmpCoordsWithInstance.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof BmpCoordsWithInstance))
return false;
var tmp0_other_with_cast = other instanceof BmpCoordsWithInstance ? other : THROW_CCE();
if (!equals(this.q8d_1, tmp0_other_with_cast.q8d_1))
return false;
if (!equals(this.r8d_1, tmp0_other_with_cast.r8d_1))
return false;
if (!equals(this.s8d_1, tmp0_other_with_cast.s8d_1))
return false;
if (!equals(this.t8d_1, tmp0_other_with_cast.t8d_1))
return false;
if (!equals(this.u8d_1, tmp0_other_with_cast.u8d_1))
return false;
if (!equals(this.v8d_1, tmp0_other_with_cast.v8d_1))
return false;
if (!equals(this.w8d_1, tmp0_other_with_cast.w8d_1))
return false;
if (!equals(this.x8d_1, tmp0_other_with_cast.x8d_1))
return false;
if (!equals(this.y8d_1, tmp0_other_with_cast.y8d_1))
return false;
if (!(this.z8d_1 == tmp0_other_with_cast.z8d_1))
return false;
var tmp = this.a8e_1;
var tmp_0 = tmp == null ? null : new RectangleInt(tmp);
var tmp_1 = tmp0_other_with_cast.a8e_1;
if (!equals(tmp_0, tmp_1 == null ? null : new RectangleInt(tmp_1)))
return false;
if (!(this.b8e_1 === tmp0_other_with_cast.b8e_1))
return false;
return true;
};
BmpCoordsWithInstance.$metadata$ = classMeta('BmpCoordsWithInstance', undefined, undefined, undefined, undefined, BmpCoordsWithInstanceBase.prototype);
function BmpCoords() {
}
BmpCoords.$metadata$ = interfaceMeta('BmpCoords');
function copy(_this__u8e3s4, base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied) {
return new BmpCoordsWithInstance(base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied);
}
function copy$default(_this__u8e3s4, base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
base = _this__u8e3s4.x8b();
if (!(($mask0 & 2) === 0))
tl_x = _this__u8e3s4.a8c();
if (!(($mask0 & 4) === 0))
tl_y = _this__u8e3s4.b8c();
if (!(($mask0 & 8) === 0))
tr_x = _this__u8e3s4.c8c();
if (!(($mask0 & 16) === 0))
tr_y = _this__u8e3s4.d8c();
if (!(($mask0 & 32) === 0))
br_x = _this__u8e3s4.e8c();
if (!(($mask0 & 64) === 0))
br_y = _this__u8e3s4.f8c();
if (!(($mask0 & 128) === 0))
bl_x = _this__u8e3s4.g8c();
if (!(($mask0 & 256) === 0))
bl_y = _this__u8e3s4.h8c();
if (!(($mask0 & 512) === 0))
name = _this__u8e3s4.t2();
if (!(($mask0 & 1024) === 0))
virtFrame = null;
if (!(($mask0 & 2048) === 0))
premultiplied = _this__u8e3s4.b7z();
return copy(_this__u8e3s4, base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied);
}
function BmpCoordsWithInstanceBase(base, tl_x, tl_y, tr_x, tr_y, br_x, br_y, bl_x, bl_y, name, virtFrame, premultiplied) {
this.c8e_1 = base;
this.d8e_1 = tl_x;
this.e8e_1 = tl_y;
this.f8e_1 = tr_x;
this.g8e_1 = tr_y;
this.h8e_1 = br_x;
this.i8e_1 = br_y;
this.j8e_1 = bl_x;
this.k8e_1 = bl_y;
this.l8e_1 = name;
this.m8e_1 = virtFrame;
this.n8e_1 = premultiplied;
}
BmpCoordsWithInstanceBase.prototype.x8b = function () {
return this.c8e_1;
};
BmpCoordsWithInstanceBase.prototype.a8c = function () {
return this.d8e_1;
};
BmpCoordsWithInstanceBase.prototype.b8c = function () {
return this.e8e_1;
};
BmpCoordsWithInstanceBase.prototype.c8c = function () {
return this.f8e_1;
};
BmpCoordsWithInstanceBase.prototype.d8c = function () {
return this.g8e_1;
};
BmpCoordsWithInstanceBase.prototype.e8c = function () {
return this.h8e_1;
};
BmpCoordsWithInstanceBase.prototype.f8c = function () {
return this.i8e_1;
};
BmpCoordsWithInstanceBase.prototype.g8c = function () {
return this.j8e_1;
};
BmpCoordsWithInstanceBase.prototype.h8c = function () {
return this.k8e_1;
};
BmpCoordsWithInstanceBase.prototype.t2 = function () {
return this.l8e_1;
};
BmpCoordsWithInstanceBase.prototype.w8b = function () {
return this.m8e_1;
};
BmpCoordsWithInstanceBase.prototype.b7z = function () {
return this.n8e_1;
};
BmpCoordsWithInstanceBase.prototype.x2c = function () {
var tmp = this.x8b();
var tmp0_safe_receiver = isInterface(tmp, Closeable) ? tmp : null;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.x2c();
}
};
BmpCoordsWithInstanceBase.$metadata$ = classMeta('BmpCoordsWithInstanceBase', [BmpCoordsWithT]);
function flippedX(_this__u8e3s4) {
var tmp = _this__u8e3s4.x8b();
var tmp_0 = _this__u8e3s4.c8c();
var tmp_1 = _this__u8e3s4.d8c();
var tmp_2 = _this__u8e3s4.a8c();
var tmp_3 = _this__u8e3s4.b8c();
var tmp_4 = _this__u8e3s4.g8c();
var tmp_5 = _this__u8e3s4.h8c();
var tmp_6 = _this__u8e3s4.e8c();
var tmp_7 = _this__u8e3s4.f8c();
var tmp_8;
var tmp_9 = _this__u8e3s4.w8b();
if (!((tmp_9 == null ? null : new RectangleInt(tmp_9)) == null)) {
tmp_8 = Companion_getInstance_1().g7d((_this__u8e3s4.y8b() - _this__u8e3s4.d72() | 0) - _this__u8e3s4.p8c() | 0, _this__u8e3s4.q8c(), _this__u8e3s4.y8b(), _this__u8e3s4.z8b());
} else {
tmp_8 = null;
}
var tmp_10 = tmp_8;
return copy$default(_this__u8e3s4, tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, null, tmp_10, false, 2560, null);
}
function flippedY(_this__u8e3s4) {
var tmp = _this__u8e3s4.x8b();
var tmp_0 = _this__u8e3s4.g8c();
var tmp_1 = _this__u8e3s4.h8c();
var tmp_2 = _this__u8e3s4.e8c();
var tmp_3 = _this__u8e3s4.f8c();
var tmp_4 = _this__u8e3s4.c8c();
var tmp_5 = _this__u8e3s4.d8c();
var tmp_6 = _this__u8e3s4.a8c();
var tmp_7 = _this__u8e3s4.b8c();
var tmp_8;
var tmp_9 = _this__u8e3s4.w8b();
if (!((tmp_9 == null ? null : new RectangleInt(tmp_9)) == null)) {
tmp_8 = Companion_getInstance_1().g7d(_this__u8e3s4.p8c(), (_this__u8e3s4.z8b() - _this__u8e3s4.e72() | 0) - _this__u8e3s4.q8c() | 0, _this__u8e3s4.y8b(), _this__u8e3s4.z8b());
} else {
tmp_8 = null;
}
var tmp_10 = tmp_8;
return copy$default(_this__u8e3s4, tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, null, tmp_10, false, 2560, null);
}
function rotatedRight(_this__u8e3s4) {
var tmp = _this__u8e3s4.x8b();
var tmp_0 = _this__u8e3s4.g8c();
var tmp_1 = _this__u8e3s4.h8c();
var tmp_2 = _this__u8e3s4.a8c();
var tmp_3 = _this__u8e3s4.b8c();
var tmp_4 = _this__u8e3s4.c8c();
var tmp_5 = _this__u8e3s4.d8c();
var tmp_6 = _this__u8e3s4.e8c();
var tmp_7 = _this__u8e3s4.f8c();
var tmp_8;
var tmp_9 = _this__u8e3s4.w8b();
if (!((tmp_9 == null ? null : new RectangleInt(tmp_9)) == null)) {
tmp_8 = Companion_getInstance_1().g7d((_this__u8e3s4.z8b() - _this__u8e3s4.e72() | 0) - _this__u8e3s4.q8c() | 0, _this__u8e3s4.p8c(), _this__u8e3s4.z8b(), _this__u8e3s4.y8b());
} else {
tmp_8 = null;
}
var tmp_10 = tmp_8;
return copy$default(_this__u8e3s4, tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, null, tmp_10, false, 2560, null);
}
function pixelOffsets$factory() {
return getPropertyCallableRef('pixelOffsets', 1, KProperty1, function (receiver) {
return _get_pixelOffsets__f6x0x(receiver);
}, null);
}
function get_Bitmaps_transparent() {
init_properties_Bitmaps_kt_3a0sy8();
return Bitmaps_transparent;
}
var Bitmaps_transparent;
function get_Bitmaps_white() {
init_properties_Bitmaps_kt_3a0sy8();
return Bitmaps_white;
}
var Bitmaps_white;
function Bitmaps() {
Bitmaps_instance = this;
}
Bitmaps.prototype.o8e = function () {
return get_Bitmaps_transparent();
};
Bitmaps.prototype.p8e = function () {
return get_Bitmaps_white();
};
Bitmaps.$metadata$ = objectMeta('Bitmaps');
var Bitmaps_instance;
function Bitmaps_getInstance() {
if (Bitmaps_instance == null)
new Bitmaps();
return Bitmaps_instance;
}
var properties_initialized_Bitmaps_kt_qcuk18;
function init_properties_Bitmaps_kt_3a0sy8() {
if (properties_initialized_Bitmaps_kt_qcuk18) {
} else {
properties_initialized_Bitmaps_kt_qcuk18 = true;
var tmp = Companion_getInstance_12().h87(1, 1, _RGBA___get_premultiplied__impl__3bulqc(Colors_getInstance().x7z_1));
Bitmaps_transparent = slice$default(tmp, null, 'transparent', null, 5, null);
var tmp_0 = Companion_getInstance_12().h87(1, 1, _RGBA___get_premultiplied__impl__3bulqc(Colors_getInstance().s7z_1));
Bitmaps_white = slice$default(tmp_0, null, 'white', null, 5, null);
}
}
function FloatBitmap32() {
}
FloatBitmap32.prototype.s3l = function () {
return this.d8f_1;
};
FloatBitmap32.$metadata$ = classMeta('FloatBitmap32', undefined, undefined, undefined, undefined, Bitmap.prototype);
function MultiBitmap() {
}
MultiBitmap.$metadata$ = classMeta('MultiBitmap', undefined, undefined, undefined, undefined, Bitmap.prototype);
function NativeImageOrBitmap32(width, height, native, premultiplied) {
var tmp;
if (native) {
tmp = NativeImage_0(width, height, premultiplied);
} else {
var tmp0_elvis_lhs = premultiplied;
tmp = Bitmap32_init_$Create$(width, height, null, tmp0_elvis_lhs == null ? true : tmp0_elvis_lhs, 4, null);
}
return tmp;
}
function NativeImage(width, height, data, premultiplied) {
Bitmap.call(this, width, height, 32, premultiplied, null);
this.r8f_1 = data;
}
NativeImage.prototype.d86 = function () {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = Companion_getInstance_12().i87(this.d72(), this.e72(), this.s7y_1);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.NativeImage.toBMP32.<anonymous>' call
this.m7z(0, 0, this.d72(), this.e72(), tmp0_also.r86_1, 0);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
};
NativeImage.prototype.q7z = function (x, y, v) {
RgbaArray__set_impl_epw2wg(this.d7z(), 0, v);
this.p7z(x, y, 1, 1, this.c7z(), 0);
};
NativeImage.prototype.n7z = function (x, y) {
this.m7z(x, y, 1, 1, this.c7z(), 0);
return RgbaArray__get_impl_nzyo1o(this.d7z(), 0);
};
NativeImage.prototype.k85 = function (x, y, color) {
return this.q7z(x, y, _RGBA___init__impl__lqpay5(color));
};
NativeImage.prototype.l85 = function (x, y) {
return _RGBA___get_value__impl__hhco8v(this.n7z(x, y));
};
NativeImage.prototype.x85 = function () {
var tmp = this.d72();
var tmp_0 = this.e72();
var tmp_1 = this.d86().x85();
var tmp_2 = (tmp_1 instanceof Bitmap32 ? tmp_1 : THROW_CCE()).r86_1;
this.r7z(0, 0, tmp, tmp_0, tmp_2, 0, 32, null);
return this;
};
NativeImage.prototype.z85 = function () {
var tmp = this.d72();
var tmp_0 = this.e72();
var tmp_1 = this.d86().z85();
var tmp_2 = (tmp_1 instanceof Bitmap32 ? tmp_1 : THROW_CCE()).r86_1;
this.r7z(0, 0, tmp, tmp_0, tmp_2, 0, 32, null);
return this;
};
NativeImage.prototype.y85 = function (y0, y1) {
this.m7z(0, y0, this.d72(), 1, this.c7z(), 0);
this.m7z(0, y1, this.d72(), 1, this.c7z(), this.d72());
this.p7z(0, y1, this.d72(), 1, this.c7z(), 0);
this.p7z(0, y0, this.d72(), 1, this.c7z(), this.d72());
};
NativeImage.prototype.a86 = function (x0, x1) {
this.m7z(x0, 0, 1, this.e72(), this.c7z(), 0);
this.m7z(x1, 0, 1, this.e72(), this.c7z(), this.d72());
this.p7z(x1, 0, 1, this.e72(), this.c7z(), 0);
this.p7z(x0, 0, 1, this.e72(), this.c7z(), this.d72());
};
NativeImage.prototype.c86 = function (width, height) {
return NativeImage$default(width, height, null, 4, null);
};
NativeImage.prototype.toString = function () {
return this.t2() + '(' + this.d72() + ', ' + this.e72() + ')';
};
NativeImage.$metadata$ = classMeta('NativeImage', undefined, undefined, undefined, undefined, Bitmap.prototype);
function ensureNative(_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp;
if (tmp0_subject instanceof NativeImage) {
tmp = _this__u8e3s4;
} else {
tmp = get_nativeImageFormatProvider().s8f(_this__u8e3s4);
}
return tmp;
}
function NativeImage_0(width, height, premultiplied) {
return get_nativeImageFormatProvider().t8f(width, height, premultiplied);
}
function NativeImage$default(width, height, premultiplied, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
premultiplied = null;
return NativeImage_0(width, height, premultiplied);
}
function Companion_2() {
Companion_instance_2 = this;
this.u8f_1 = 3553;
this.v8f_1 = 36197;
}
Companion_2.$metadata$ = objectMeta('Companion');
var Companion_instance_2;
function Companion_getInstance_15() {
if (Companion_instance_2 == null)
new Companion_2();
return Companion_instance_2;
}
function ForcedTexId() {
}
ForcedTexId.$metadata$ = interfaceMeta('ForcedTexId');
function NinePatchBmpSlice_init_$Init$(content, info, bmpSlice, $mask0, $marker, $this) {
if (!(($mask0 & 4) === 0))
bmpSlice = content;
NinePatchBmpSlice.call($this, content, info, bmpSlice);
return $this;
}
function NinePatchBmpSlice_init_$Create$(content, info, bmpSlice, $mask0, $marker) {
return NinePatchBmpSlice_init_$Init$(content, info, bmpSlice, $mask0, $marker, Object.create(NinePatchBmpSlice.prototype));
}
function Companion_3() {
Companion_instance_3 = this;
}
Companion_3.prototype.y8f = function (bmp, left, top, right, bottom) {
var tmp = NinePatchInfo_init_$Create$(bmp.d72(), bmp.e72(), left, top, right, bottom, bmp);
return NinePatchBmpSlice_init_$Create$(bmp, tmp, null, 4, null);
};
Companion_3.prototype.z8f = function (bmp) {
return this.a8g(slice$default(bmp, null, null, null, 7, null));
};
Companion_3.prototype.a8g = function (bmpSlice) {
var tmp = bmpSlice.d72() - 1 | 0;
var tmp_0 = bmpSlice.e72() - 1 | 0;
var content = bmpSlice.p8b(1, 1, tmp, tmp_0, null, null, 48, null);
var tmp$ret$5;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$4;
// Inline function 'com.soywiz.korim.bitmap.Companion.invoke.<anonymous>' call
var tmp_1 = bmpSlice.d72();
var topPixels = bmpSlice.l8c(0, 0, tmp_1, 1, null, 0, 48, null);
var tmp_2 = bmpSlice.e72();
var leftPixels = bmpSlice.l8c(0, 0, 1, tmp_2, null, 0, 48, null);
var tmp$ret$1;
// Inline function 'com.soywiz.korim.bitmap.computeRle' call
var tmp2_computeRle = until(1, bmpSlice.d72() - 1 | 0);
var first = true;
var pos = 0;
var startpos = 0;
var lastRes = null;
var out = FastArrayList_init_$Create$();
var inductionVariable = tmp2_computeRle.r1_1;
var last = tmp2_computeRle.s1_1;
if (inductionVariable <= last)
do {
var it = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Companion.invoke.<anonymous>.<anonymous>' call
tmp$ret$0 = !(_RGBA___get_a__impl__6msvu7(RgbaArray__get_impl_nzyo1o(topPixels, it)) === 0);
var current = tmp$ret$0;
if (!first) {
var tmp_3;
if (lastRes == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_3 = lastRes;
}
if (!(current === tmp_3)) {
// Inline function 'kotlin.collections.plusAssign' call
var tmp_4;
if (lastRes == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_4 = lastRes;
}
var tmp0_plusAssign = to(tmp_4, until(startpos, pos));
out.c(tmp0_plusAssign);
startpos = pos;
}
}
lastRes = current;
first = false;
var tmp1 = pos;
pos = tmp1 + 1 | 0;
}
while (!(it === last));
if (!(startpos === pos)) {
// Inline function 'kotlin.collections.plusAssign' call
var tmp_5;
if (lastRes == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_5 = lastRes;
}
var tmp1_plusAssign = to(tmp_5, until(startpos, pos));
out.c(tmp1_plusAssign);
}
tmp$ret$1 = out;
var tmp_6 = tmp$ret$1;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.bitmap.computeRle' call
var tmp5_computeRle = until(1, bmpSlice.e72() - 1 | 0);
var first_0 = true;
var pos_0 = 0;
var startpos_0 = 0;
var lastRes_0 = null;
var out_0 = FastArrayList_init_$Create$();
var inductionVariable_0 = tmp5_computeRle.r1_1;
var last_0 = tmp5_computeRle.s1_1;
if (inductionVariable_0 <= last_0)
do {
var it_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$2;
// Inline function 'com.soywiz.korim.bitmap.Companion.invoke.<anonymous>.<anonymous>' call
tmp$ret$2 = !(_RGBA___get_a__impl__6msvu7(RgbaArray__get_impl_nzyo1o(leftPixels, it_0)) === 0);
var current_0 = tmp$ret$2;
if (!first_0) {
var tmp_7;
if (lastRes_0 == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_7 = lastRes_0;
}
if (!(current_0 === tmp_7)) {
// Inline function 'kotlin.collections.plusAssign' call
var tmp_8;
if (lastRes_0 == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_8 = lastRes_0;
}
var tmp3_plusAssign = to(tmp_8, until(startpos_0, pos_0));
out_0.c(tmp3_plusAssign);
startpos_0 = pos_0;
}
}
lastRes_0 = current_0;
first_0 = false;
var tmp1_0 = pos_0;
pos_0 = tmp1_0 + 1 | 0;
}
while (!(it_0 === last_0));
if (!(startpos_0 === pos_0)) {
// Inline function 'kotlin.collections.plusAssign' call
var tmp_9;
if (lastRes_0 == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_9 = lastRes_0;
}
var tmp4_plusAssign = to(tmp_9, until(startpos_0, pos_0));
out_0.c(tmp4_plusAssign);
}
tmp$ret$3 = out_0;
tmp$ret$4 = new NinePatchInfo(tmp_6, tmp$ret$3, content.d72(), content.e72(), content);
tmp$ret$5 = tmp$ret$4;
return new NinePatchBmpSlice(content, tmp$ret$5, bmpSlice);
};
Companion_3.$metadata$ = objectMeta('Companion');
var Companion_instance_3;
function Companion_getInstance_16() {
if (Companion_instance_3 == null)
new Companion_3();
return Companion_instance_3;
}
function NinePatchBmpSlice(content, info, bmpSlice) {
Companion_getInstance_16();
this.b8g_1 = content;
this.c8g_1 = info;
this.d8g_1 = bmpSlice;
}
NinePatchBmpSlice.prototype.e8g = function (segment) {
return ensureNotNull(segment.m8g_1);
};
NinePatchBmpSlice.$metadata$ = classMeta('NinePatchBmpSlice');
function asNinePatchSimple(_this__u8e3s4, left, top, right, bottom) {
return Companion_getInstance_16().y8f(_this__u8e3s4, left, top, right, bottom);
}
function NinePatchInfo$Segment$bmp$delegate$lambda(this$0) {
return function () {
var tmp0_safe_receiver = this$0.m8g_1;
return tmp0_safe_receiver == null ? null : extract_1(tmp0_safe_receiver);
};
}
function NinePatchInfo_init_$Init$(width, height, left, top, right, bottom, content, $this) {
NinePatchInfo.call($this, listOf([to(false, until(0, left)), to(true, until(left, right)), to(false, until(right, width))]), listOf([to(false, until(0, top)), to(true, until(top, bottom)), to(false, until(bottom, height))]), width, height, content);
return $this;
}
function NinePatchInfo_init_$Create$(width, height, left, top, right, bottom, content) {
return NinePatchInfo_init_$Init$(width, height, left, top, right, bottom, content, Object.create(NinePatchInfo.prototype));
}
function AxisSegment(scaled, range) {
this.o8g_1 = scaled;
this.p8g_1 = range;
}
AxisSegment.prototype.q8g = function () {
return this.o8g_1;
};
AxisSegment.prototype.xb = function () {
return this.p8g_1;
};
AxisSegment.prototype.r8g = function () {
return !this.o8g_1;
};
AxisSegment.prototype.ze = function () {
return get_length(this.p8g_1);
};
AxisSegment.prototype.s8g = function (axis, boundsLength) {
var scale = clamp_0(boundsLength / axis.t8g_1, 0.0, 1.0);
var tmp;
if (this.r8g()) {
tmp = this.ze() * scale;
} else {
var variableSize = boundsLength - axis.v8g_1 * scale;
tmp = variableSize * (this.ze() / axis.w8g_1);
}
return tmp;
};
AxisSegment.$metadata$ = classMeta('AxisSegment');
function AxisInfo(ranges, totalLen) {
this.t8g_1 = totalLen;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(ranges, 10));
var tmp0_iterator = ranges.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.AxisInfo.segments.<anonymous>' call
tmp$ret$0 = new AxisSegment(item.d_1, item.e_1);
tmp0_mapTo.c(tmp$ret$0);
}
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
tmp.u8g_1 = toFastList(tmp$ret$2);
var tmp_0 = this;
var tmp$ret$8;
// Inline function 'kotlin.math.max' call
var tmp$ret$7;
// Inline function 'kotlin.collections.sumOf' call
var tmp$ret$5;
// Inline function 'kotlin.collections.filter' call
var tmp0_filter = this.u8g_1;
var tmp$ret$4;
// Inline function 'kotlin.collections.filterTo' call
var tmp0_filterTo = ArrayList_init_$Create$_0();
var tmp0_iterator_0 = tmp0_filter.j();
while (tmp0_iterator_0.k()) {
var element = tmp0_iterator_0.l();
var tmp$ret$3;
// Inline function 'com.soywiz.korim.bitmap.AxisInfo.fixedLen.<anonymous>' call
tmp$ret$3 = element.r8g();
if (tmp$ret$3) {
tmp0_filterTo.c(element);
}
}
tmp$ret$4 = tmp0_filterTo;
tmp$ret$5 = tmp$ret$4;
var tmp1_sumOf = tmp$ret$5;
var sum = 0;
var tmp0_iterator_1 = tmp1_sumOf.j();
while (tmp0_iterator_1.k()) {
var element_0 = tmp0_iterator_1.l();
var tmp_1 = sum;
var tmp$ret$6;
// Inline function 'com.soywiz.korim.bitmap.AxisInfo.fixedLen.<anonymous>' call
tmp$ret$6 = element_0.ze();
sum = tmp_1 + tmp$ret$6 | 0;
}
tmp$ret$7 = sum;
var tmp2_max = tmp$ret$7;
tmp$ret$8 = Math.max(1, tmp2_max);
tmp_0.v8g_1 = tmp$ret$8;
var tmp_2 = this;
var tmp$ret$14;
// Inline function 'kotlin.math.max' call
var tmp$ret$13;
// Inline function 'kotlin.collections.sumOf' call
var tmp$ret$11;
// Inline function 'kotlin.collections.filter' call
var tmp0_filter_0 = this.u8g_1;
var tmp$ret$10;
// Inline function 'kotlin.collections.filterTo' call
var tmp0_filterTo_0 = ArrayList_init_$Create$_0();
var tmp0_iterator_2 = tmp0_filter_0.j();
while (tmp0_iterator_2.k()) {
var element_1 = tmp0_iterator_2.l();
var tmp$ret$9;
// Inline function 'com.soywiz.korim.bitmap.AxisInfo.scaledLen.<anonymous>' call
tmp$ret$9 = element_1.o8g_1;
if (tmp$ret$9) {
tmp0_filterTo_0.c(element_1);
}
}
tmp$ret$10 = tmp0_filterTo_0;
tmp$ret$11 = tmp$ret$10;
var tmp1_sumOf_0 = tmp$ret$11;
var sum_0 = 0;
var tmp0_iterator_3 = tmp1_sumOf_0.j();
while (tmp0_iterator_3.k()) {
var element_2 = tmp0_iterator_3.l();
var tmp_3 = sum_0;
var tmp$ret$12;
// Inline function 'com.soywiz.korim.bitmap.AxisInfo.scaledLen.<anonymous>' call
tmp$ret$12 = element_2.ze();
sum_0 = tmp_3 + tmp$ret$12 | 0;
}
tmp$ret$13 = sum_0;
var tmp2_max_0 = tmp$ret$13;
tmp$ret$14 = Math.max(1, tmp2_max_0);
tmp_2.w8g_1 = tmp$ret$14;
}
AxisInfo.$metadata$ = classMeta('AxisInfo');
function Segment(info, rect, x, y) {
this.f8g_1 = info;
this.g8g_1 = rect;
this.h8g_1 = x;
this.i8g_1 = y;
var tmp = this;
tmp.j8g_1 = Mixin_init_$Create$(null, 1, null);
this.k8g_1 = this.h8g_1.o8g_1;
this.l8g_1 = this.i8g_1.o8g_1;
var tmp_0 = this;
var tmp0_safe_receiver = this.f8g_1.b8h_1;
var tmp_1;
if (tmp0_safe_receiver == null) {
tmp_1 = null;
} else {
tmp_1 = tmp0_safe_receiver.t8b(this.g8g_1, null, null, 6, null);
}
tmp_0.m8g_1 = tmp_1;
var tmp_2 = this;
tmp_2.n8g_1 = lazy(NinePatchInfo$Segment$bmp$delegate$lambda(this));
}
Segment.prototype.e4v = function (_set____db54di) {
this.j8g_1.e4v(_set____db54di);
};
Segment.prototype.f4v = function () {
return this.j8g_1.f4v();
};
Segment.$metadata$ = classMeta('Segment', [Extra]);
function NinePatchInfo(xranges, yranges, width, height, content) {
this.x8g_1 = xranges;
this.y8g_1 = yranges;
this.z8g_1 = width;
this.a8h_1 = height;
this.b8h_1 = content;
this.c8h_1 = new AxisInfo(this.x8g_1, this.z8g_1);
this.d8h_1 = new AxisInfo(this.y8g_1, this.a8h_1);
this.e8h_1 = this.c8h_1.u8g_1;
this.f8h_1 = this.d8h_1.u8g_1;
this.g8h_1 = this.c8h_1.v8g_1;
this.h8h_1 = this.d8h_1.v8g_1;
this.i8h_1 = this.c8h_1.w8g_1;
this.j8h_1 = this.d8h_1.w8g_1;
var tmp = this;
var tmp$ret$5;
// Inline function 'kotlin.collections.map' call
var tmp0_map = this.f8h_1;
var tmp$ret$4;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator = tmp0_map.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$3;
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.segments.<anonymous>' call
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map_0 = this.e8h_1;
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map_0, 10));
var tmp0_iterator_0 = tmp0_map_0.j();
while (tmp0_iterator_0.k()) {
var item_0 = tmp0_iterator_0.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.segments.<anonymous>.<anonymous>' call
tmp$ret$0 = new Segment(this, Companion_getInstance_1().i7d(item_0.p8g_1.r1_1, item.p8g_1.r1_1, item_0.p8g_1.s1_1 + 1 | 0, item.p8g_1.s1_1 + 1 | 0), item_0, item);
tmp0_mapTo_0.c(tmp$ret$0);
}
tmp$ret$1 = tmp0_mapTo_0;
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = toFastList(tmp$ret$2);
tmp0_mapTo.c(tmp$ret$3);
}
tmp$ret$4 = tmp0_mapTo;
tmp$ret$5 = tmp$ret$4;
tmp.k8h_1 = toFastList(tmp$ret$5);
this.l8h_1 = new Int32Array(64);
this.m8h_1 = new Int32Array(64);
}
NinePatchInfo.prototype.n8h = function () {
return this.c8h_1;
};
NinePatchInfo.prototype.o8h = function () {
return this.d8h_1;
};
NinePatchInfo.prototype.p8h = function () {
return this.e8h_1;
};
NinePatchInfo.prototype.q8h = function () {
return imul(this.e8h_1.i(), this.f8h_1.i());
};
NinePatchInfo.prototype.r8h = function (bounds, new_0, callback) {
var tmp;
if (new_0) {
this.t8h(bounds, callback);
tmp = Unit_getInstance();
} else {
this.s8h(bounds, callback);
tmp = Unit_getInstance();
}
return tmp;
};
NinePatchInfo.prototype.u8h = function (bounds, new_0, callback, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
new_0 = true;
return this.r8h(bounds, new_0, callback);
};
NinePatchInfo.prototype.s8h = function (bounds, callback) {
var ry = 0;
var iterator = this.f8h_1.j();
var index = 0;
while (iterator.k()) {
var yindex = index;
index = index + 1 | 0;
var y = iterator.l();
var segHeight = numberToInt(y.s8g(this.d8h_1, _RectangleInt___get_height__impl__gd473j(bounds)));
var rx = 0;
var iterator_0 = this.e8h_1.j();
var index_0 = 0;
while (iterator_0.k()) {
var xindex = index_0;
index_0 = index_0 + 1 | 0;
var x = iterator_0.l();
var segWidth = numberToInt(x.s8g(this.c8h_1, _RectangleInt___get_width__impl__gtay8w(bounds)));
var seg = this.k8h_1.m(yindex).m(xindex);
var segLeft = rx + _RectangleInt___get_left__impl__rhzld(bounds) | 0;
var segTop = ry + _RectangleInt___get_top__impl__ie2ifj(bounds) | 0;
callback(seg, segLeft, segTop, segWidth, segHeight);
rx = rx + segWidth | 0;
}
ry = ry + segHeight | 0;
}
};
NinePatchInfo.prototype.t8h = function (bounds, callback) {
// Inline function 'com.soywiz.kds.iterators.fastForEachWithIndex' call
var tmp0_fastForEachWithIndex = this.f8h_1;
var n = 0;
while (n < tmp0_fastForEachWithIndex.i()) {
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
var tmp1__anonymous__uwfjfc = n;
var tmp2__anonymous__z9zvc9 = tmp0_fastForEachWithIndex.m(n);
this.m8h_1[tmp1__anonymous__uwfjfc] = IntCompanionObject_getInstance().o1_1;
var tmp0 = n;
n = tmp0 + 1 | 0;
}
// Inline function 'com.soywiz.kds.iterators.fastForEachWithIndex' call
var tmp3_fastForEachWithIndex = this.e8h_1;
var n_0 = 0;
while (n_0 < tmp3_fastForEachWithIndex.i()) {
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
var tmp4__anonymous__pkmkx7 = n_0;
var tmp5__anonymous__kpxxpo = tmp3_fastForEachWithIndex.m(n_0);
this.l8h_1[tmp4__anonymous__pkmkx7] = IntCompanionObject_getInstance().o1_1;
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
}
// Inline function 'com.soywiz.kds.iterators.fastForEachWithIndex' call
var tmp6_fastForEachWithIndex = this.f8h_1;
var n_1 = 0;
while (n_1 < tmp6_fastForEachWithIndex.i()) {
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
var tmp7__anonymous__b0knam = n_1;
var tmp8__anonymous__65w033 = tmp6_fastForEachWithIndex.m(n_1);
var segHeight = tmp8__anonymous__65w033.s8g(this.d8h_1, _RectangleInt___get_height__impl__gd473j(bounds));
// Inline function 'com.soywiz.kds.iterators.fastForEachWithIndex' call
var tmp0_fastForEachWithIndex_0 = this.e8h_1;
var n_2 = 0;
while (n_2 < tmp0_fastForEachWithIndex_0.i()) {
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>.<anonymous>' call
var tmp1__anonymous__uwfjfc_0 = n_2;
var tmp2__anonymous__z9zvc9_0 = tmp0_fastForEachWithIndex_0.m(n_2);
var segWidth = tmp2__anonymous__z9zvc9_0.s8g(this.c8h_1, _RectangleInt___get_width__impl__gtay8w(bounds));
if (tmp2__anonymous__z9zvc9_0.r8g() ? tmp8__anonymous__65w033.r8g() : false) {
var xScale = segWidth / tmp2__anonymous__z9zvc9_0.ze();
var yScale = segHeight / tmp8__anonymous__65w033.ze();
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
tmp$ret$0 = Math.min(xScale, yScale);
var minScale = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.min' call
var tmp0_min = this.l8h_1[tmp1__anonymous__uwfjfc_0];
var tmp1_min = numberToInt(tmp2__anonymous__z9zvc9_0.ze() * minScale);
tmp$ret$1 = Math.min(tmp0_min, tmp1_min);
this.l8h_1[tmp1__anonymous__uwfjfc_0] = tmp$ret$1;
var tmp$ret$2;
// Inline function 'kotlin.math.min' call
var tmp2_min = this.m8h_1[tmp7__anonymous__b0knam];
var tmp3_min = numberToInt(tmp8__anonymous__65w033.ze() * minScale);
tmp$ret$2 = Math.min(tmp2_min, tmp3_min);
this.m8h_1[tmp7__anonymous__b0knam] = tmp$ret$2;
} else {
var tmp$ret$3;
// Inline function 'kotlin.math.min' call
var tmp4_min = this.l8h_1[tmp1__anonymous__uwfjfc_0];
var tmp5_min = numberToInt(segWidth);
tmp$ret$3 = Math.min(tmp4_min, tmp5_min);
this.l8h_1[tmp1__anonymous__uwfjfc_0] = tmp$ret$3;
var tmp$ret$4;
// Inline function 'kotlin.math.min' call
var tmp6_min = this.m8h_1[tmp7__anonymous__b0knam];
var tmp7_min = numberToInt(segHeight);
tmp$ret$4 = Math.min(tmp6_min, tmp7_min);
this.m8h_1[tmp7__anonymous__b0knam] = tmp$ret$4;
}
var tmp0_1 = n_2;
n_2 = tmp0_1 + 1 | 0;
}
var tmp0_2 = n_1;
n_1 = tmp0_2 + 1 | 0;
}
var denormalizedWidth = sum(this.l8h_1);
var denormalizedHeight = sum(this.m8h_1);
var tmp$ret$7;
// Inline function 'kotlin.collections.mapIndexed' call
var tmp9_mapIndexed = this.e8h_1;
var tmp$ret$6;
// Inline function 'kotlin.collections.mapIndexedTo' call
var tmp0_mapIndexedTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp9_mapIndexed, 10));
var index = 0;
var tmp0_iterator = tmp9_mapIndexed.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$5;
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
var tmp1 = index;
index = tmp1 + 1 | 0;
var tmp10__anonymous__yfiz50 = checkIndexOverflow(tmp1);
tmp$ret$5 = item.o8g_1 ? this.l8h_1[tmp10__anonymous__yfiz50] : 0;
tmp0_mapIndexedTo.c(tmp$ret$5);
}
tmp$ret$6 = tmp0_mapIndexedTo;
tmp$ret$7 = tmp$ret$6;
var denormalizedScaledWidth = sum_0(tmp$ret$7);
var tmp$ret$10;
// Inline function 'kotlin.collections.mapIndexed' call
var tmp11_mapIndexed = this.f8h_1;
var tmp$ret$9;
// Inline function 'kotlin.collections.mapIndexedTo' call
var tmp0_mapIndexedTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp11_mapIndexed, 10));
var index_0 = 0;
var tmp0_iterator_0 = tmp11_mapIndexed.j();
while (tmp0_iterator_0.k()) {
var item_0 = tmp0_iterator_0.l();
var tmp$ret$8;
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
var tmp1_0 = index_0;
index_0 = tmp1_0 + 1 | 0;
var tmp12__anonymous__oq5opy = checkIndexOverflow(tmp1_0);
tmp$ret$8 = item_0.o8g_1 ? this.m8h_1[tmp12__anonymous__oq5opy] : 0;
tmp0_mapIndexedTo_0.c(tmp$ret$8);
}
tmp$ret$9 = tmp0_mapIndexedTo_0;
tmp$ret$10 = tmp$ret$9;
var denormalizedScaledHeight = sum_0(tmp$ret$10);
var xScaledRatio = denormalizedWidth > 0 ? denormalizedScaledWidth / denormalizedWidth : 1.0;
var yScaledRatio = denormalizedWidth > 0 ? denormalizedScaledHeight / denormalizedHeight : 1.0;
var inductionVariable = 0;
if (inductionVariable < 2)
do {
var n_3 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var segments = n_3 === 0 ? this.f8h_1 : this.e8h_1;
var computed = n_3 === 0 ? this.m8h_1 : this.l8h_1;
var denormalizedScaledLen = n_3 === 0 ? denormalizedScaledHeight : denormalizedScaledWidth;
var side = n_3 === 0 ? _RectangleInt___get_height__impl__gd473j(bounds) : _RectangleInt___get_width__impl__gtay8w(bounds);
var scaledRatio = n_3 === 0 ? yScaledRatio : xScaledRatio;
var scaledSide = side * scaledRatio;
// Inline function 'com.soywiz.kds.iterators.fastForEachWithIndex' call
var n_4 = 0;
while (n_4 < segments.i()) {
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
var tmp13__anonymous__jvh1if = n_4;
var tmp14__anonymous__f0seaw = segments.m(n_4);
if (tmp14__anonymous__f0seaw.o8g_1) {
computed[tmp13__anonymous__jvh1if] = numberToInt(scaledSide * (computed[tmp13__anonymous__jvh1if] / denormalizedScaledLen));
}
var tmp0_3 = n_4;
n_4 = tmp0_3 + 1 | 0;
}
}
while (inductionVariable < 2);
var xRemaining = _RectangleInt___get_width__impl__gtay8w(bounds) - sum(this.l8h_1) | 0;
var yRemaining = _RectangleInt___get_height__impl__gd473j(bounds) - sum(this.m8h_1) | 0;
var tmp$ret$12;
$l$block: {
// Inline function 'kotlin.collections.indexOfFirst' call
var tmp15_indexOfFirst = this.e8h_1;
var index_1 = 0;
var tmp0_iterator_1 = tmp15_indexOfFirst.j();
while (tmp0_iterator_1.k()) {
var item_1 = tmp0_iterator_1.l();
var tmp$ret$11;
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
tmp$ret$11 = item_1.o8g_1;
if (tmp$ret$11) {
tmp$ret$12 = index_1;
break $l$block;
}
var tmp1_1 = index_1;
index_1 = tmp1_1 + 1 | 0;
}
tmp$ret$12 = -1;
}
var xScaledFirst = tmp$ret$12;
var tmp$ret$14;
$l$block_0: {
// Inline function 'kotlin.collections.indexOfFirst' call
var tmp16_indexOfFirst = this.f8h_1;
var index_2 = 0;
var tmp0_iterator_2 = tmp16_indexOfFirst.j();
while (tmp0_iterator_2.k()) {
var item_2 = tmp0_iterator_2.l();
var tmp$ret$13;
// Inline function 'com.soywiz.korim.bitmap.NinePatchInfo.computeScaleNew.<anonymous>' call
tmp$ret$13 = item_2.o8g_1;
if (tmp$ret$13) {
tmp$ret$14 = index_2;
break $l$block_0;
}
var tmp1_2 = index_2;
index_2 = tmp1_2 + 1 | 0;
}
tmp$ret$14 = -1;
}
var yScaledFirst = tmp$ret$14;
if (xRemaining > 0 ? xScaledFirst >= 0 : false) {
var tmp1_array = this.l8h_1;
var tmp2_index0 = xScaledFirst;
tmp1_array[tmp2_index0] = tmp1_array[tmp2_index0] + xRemaining | 0;
}
if (yRemaining > 0 ? yScaledFirst >= 0 : false) {
var tmp3_array = this.m8h_1;
var tmp4_index0 = yScaledFirst;
tmp3_array[tmp4_index0] = tmp3_array[tmp4_index0] + yRemaining | 0;
}
var ry = 0;
var inductionVariable_0 = 0;
var last = this.f8h_1.i() - 1 | 0;
if (inductionVariable_0 <= last)
do {
var yindex = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var segHeight_0 = this.m8h_1[yindex];
var rx = 0;
var inductionVariable_1 = 0;
var last_0 = this.e8h_1.i() - 1 | 0;
if (inductionVariable_1 <= last_0)
do {
var xindex = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var segWidth_0 = this.l8h_1[xindex];
var seg = this.k8h_1.m(yindex).m(xindex);
var segLeft = rx + _RectangleInt___get_left__impl__rhzld(bounds) | 0;
var segTop = ry + _RectangleInt___get_top__impl__ie2ifj(bounds) | 0;
callback(seg, segLeft, segTop, segWidth_0, segHeight_0);
rx = rx + segWidth_0 | 0;
}
while (inductionVariable_1 <= last_0);
ry = ry + segHeight_0 | 0;
}
while (inductionVariable_0 <= last);
};
NinePatchInfo.$metadata$ = classMeta('NinePatchInfo');
function readNinePatch(_this__u8e3s4, props, $cont) {
var tmp = new $readNinePatchCOROUTINE$0(_this__u8e3s4, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readNinePatch$default(_this__u8e3s4, props, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
props = Companion_getInstance_35().g8i_1;
return readNinePatch(_this__u8e3s4, props, $cont);
}
function computeRle(_this__u8e3s4, callback) {
var first = true;
var pos = 0;
var startpos = 0;
var lastRes = null;
var out = FastArrayList_init_$Create$();
var tmp0_iterator = _this__u8e3s4.j();
while (tmp0_iterator.k()) {
var it = tmp0_iterator.l();
var current = callback(it);
if (!first) {
var tmp;
if (lastRes == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp = lastRes;
}
if (!equals(current, tmp)) {
// Inline function 'kotlin.collections.plusAssign' call
var tmp_0;
if (lastRes == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_0 = lastRes;
}
var tmp0_plusAssign = to(tmp_0, until(startpos, pos));
out.c(tmp0_plusAssign);
startpos = pos;
}
}
lastRes = current;
first = false;
var tmp1 = pos;
pos = tmp1 + 1 | 0;
}
if (!(startpos === pos)) {
// Inline function 'kotlin.collections.plusAssign' call
var tmp_1;
if (lastRes == null) {
throwUninitializedPropertyAccessException('lastRes');
} else {
tmp_1 = lastRes;
}
var tmp1_plusAssign = to(tmp_1, until(startpos, pos));
out.c(tmp1_plusAssign);
}
return out;
}
function $readNinePatchCOROUTINE$0(_this__u8e3s4, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.d8i_1 = _this__u8e3s4;
this.e8i_1 = props;
}
$readNinePatchCOROUTINE$0.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.f8i_1 = Companion_getInstance_16();
this.o7_1 = 1;
suspendResult = readBitmap_1(this.d8i_1, this.e8i_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
var ARGUMENT_0 = ARGUMENT.d86();
return this.f8i_1.z8f(ARGUMENT_0);
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$readNinePatchCOROUTINE$0.$metadata$ = classMeta('$readNinePatchCOROUTINE$0', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function Palette_init_$Init$(colors, names, changeStart, changeEnd, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
names = null;
if (!(($mask0 & 4) === 0))
changeStart = 0;
if (!(($mask0 & 8) === 0))
changeEnd = 0;
Palette.call($this, colors, names, changeStart, changeEnd);
return $this;
}
function Palette_init_$Create$(colors, names, changeStart, changeEnd, $mask0, $marker) {
return Palette_init_$Init$(colors, names, changeStart, changeEnd, $mask0, $marker, Object.create(Palette.prototype));
}
function Palette(colors, names, changeStart, changeEnd) {
this.j8i_1 = colors;
this.k8i_1 = names;
this.l8i_1 = changeStart;
this.m8i_1 = changeEnd;
}
Palette.prototype.n8i = function () {
return this.j8i_1;
};
Palette.prototype.o8i = function () {
return this.k8i_1;
};
Palette.prototype.toString = function () {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.bitmap.Palette.toString.<anonymous>' call
tmp0_apply.gc('Palette(');
var inductionVariable = 0;
var last = _RgbaArray___get_size__impl__imxef8(this.j8i_1);
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var color = RgbaArray__get_impl_nzyo1o(this.j8i_1, n);
var tmp1_safe_receiver = this.k8i_1;
var name = tmp1_safe_receiver == null ? null : tmp1_safe_receiver[n];
if (n > 0) {
tmp0_apply.gc(', ');
}
if (!(name == null)) {
tmp0_apply.gc(name);
tmp0_apply.gc(': ');
}
tmp0_apply.gc(RGBA__toString_impl_4lw6dp(color));
}
while (inductionVariable < last);
tmp0_apply.gc(')');
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
};
Palette.$metadata$ = classMeta('Palette');
function ColorFormat32() {
this.p8i_1 = 32;
}
ColorFormat32.prototype.a7z = function () {
return this.p8i_1;
};
ColorFormat32.$metadata$ = classMeta('ColorFormat32', [ColorFormat]);
function decode(_this__u8e3s4, data, dataOffset, out, outOffset, size, littleEndian) {
var tmp0_subject = _this__u8e3s4.a7z();
var tmp;
switch (tmp0_subject) {
case 16:
var tmp_0;
if (littleEndian) {
tmp_0 = readU16LE$ref();
} else {
tmp_0 = readU16BE$ref();
}
tmp = tmp_0;
break;
case 24:
var tmp_1;
if (littleEndian) {
tmp_1 = readU24LE$ref();
} else {
tmp_1 = readU24BE$ref();
}
tmp = tmp_1;
break;
case 32:
var tmp_2;
if (littleEndian) {
tmp_2 = readS32LE$ref();
} else {
tmp_2 = readS32BE$ref();
}
tmp = tmp_2;
break;
default:
throw IllegalArgumentException_init_$Create$('Unsupported bpp ' + _this__u8e3s4.a7z());
}
var readFunc = tmp;
// Inline function 'com.soywiz.korim.color.decodeInternal' call
var io = dataOffset;
var oo = outOffset;
var bytesPerPixel = get_bytesPerPixel(_this__u8e3s4);
var outdata = out;
var Bpp = numberToInt(bytesPerPixel);
var inductionVariable = 0;
if (inductionVariable < size)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c = readFunc(data, io);
io = io + Bpp | 0;
var tmp1 = oo;
oo = tmp1 + 1 | 0;
RgbaArray__set_impl_epw2wg(outdata, tmp1, Companion_getInstance_21().u8i(_this__u8e3s4.q8i(c), _this__u8e3s4.r8i(c), _this__u8e3s4.s8i(c), _this__u8e3s4.t8i(c)));
}
while (inductionVariable < size);
}
function decode$default(_this__u8e3s4, data, dataOffset, out, outOffset, size, littleEndian, $mask0, $handler) {
if (!(($mask0 & 32) === 0))
littleEndian = true;
return decode(_this__u8e3s4, data, dataOffset, out, outOffset, size, littleEndian);
}
function ColorFormat() {
}
ColorFormat.$metadata$ = interfaceMeta('ColorFormat');
function decodeInternal(_this__u8e3s4, data, dataOffset, out, outOffset, size, read) {
var io = dataOffset;
var oo = outOffset;
var bytesPerPixel = get_bytesPerPixel(_this__u8e3s4);
var outdata = out;
var Bpp = numberToInt(bytesPerPixel);
var inductionVariable = 0;
if (inductionVariable < size)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c = read(data, io);
io = io + Bpp | 0;
var tmp1 = oo;
oo = tmp1 + 1 | 0;
RgbaArray__set_impl_epw2wg(outdata, tmp1, Companion_getInstance_21().u8i(_this__u8e3s4.q8i(c), _this__u8e3s4.r8i(c), _this__u8e3s4.s8i(c), _this__u8e3s4.t8i(c)));
}
while (inductionVariable < size);
}
function get_bytesPerPixel(_this__u8e3s4) {
return _this__u8e3s4.a7z() / 8;
}
function ColorFormat24() {
this.v8i_1 = 24;
}
ColorFormat24.prototype.a7z = function () {
return this.v8i_1;
};
ColorFormat24.$metadata$ = classMeta('ColorFormat24', [ColorFormat]);
function readU16LE$ref() {
var l = function (p0, p1) {
return readU16LE(p0, p1);
};
l.callableName = 'readU16LE';
return l;
}
function readU16BE$ref() {
var l = function (p0, p1) {
return readU16BE(p0, p1);
};
l.callableName = 'readU16BE';
return l;
}
function readU24LE$ref() {
var l = function (p0, p1) {
return readU24LE(p0, p1);
};
l.callableName = 'readU24LE';
return l;
}
function readU24BE$ref() {
var l = function (p0, p1) {
return readU24BE(p0, p1);
};
l.callableName = 'readU24BE';
return l;
}
function readS32LE$ref() {
var l = function (p0, p1) {
return readS32LE(p0, p1);
};
l.callableName = 'readS32LE';
return l;
}
function readS32BE$ref() {
var l = function (p0, p1) {
return readS32BE(p0, p1);
};
l.callableName = 'readS32BE';
return l;
}
function get_ColorAdd_NEUTRAL() {
init_properties_ColorTransform_kt_ejivzl();
return ColorAdd_NEUTRAL;
}
var ColorAdd_NEUTRAL;
function _ColorAdd___init__impl__q78um5(value) {
return value;
}
function _ColorAdd___get_value__impl__up0ct3($this) {
return $this;
}
function _ColorAdd___get_r__impl__j9xkne($this) {
return ColorAdd_unpackComponent((_ColorAdd___get_value__impl__up0ct3($this) >>> 0 | 0) & 255);
}
function _ColorAdd___get_g__impl__itrhk1($this) {
return ColorAdd_unpackComponent((_ColorAdd___get_value__impl__up0ct3($this) >>> 8 | 0) & 255);
}
function _ColorAdd___get_b__impl__grv87a($this) {
return ColorAdd_unpackComponent((_ColorAdd___get_value__impl__up0ct3($this) >>> 16 | 0) & 255);
}
function _ColorAdd___get_a__impl__c1r8ux($this) {
return ColorAdd_unpackComponent((_ColorAdd___get_value__impl__up0ct3($this) >>> 24 | 0) & 255);
}
function _ColorAdd___get_shex__impl__x5alyq($this) {
return get_shex(_ColorAdd___get_value__impl__up0ct3($this));
}
function Companion_4() {
Companion_instance_4 = this;
}
Companion_4.prototype.w8i = function () {
return get_ColorAdd_NEUTRAL();
};
Companion_4.prototype.x8i = function (r, g, b, a) {
return _ColorAdd___init__impl__q78um5(ColorAdd_pack(r, g, b, a));
};
Companion_4.$metadata$ = objectMeta('Companion');
var Companion_instance_4;
function Companion_getInstance_17() {
if (Companion_instance_4 == null)
new Companion_4();
return Companion_instance_4;
}
function ColorAdd__toString_impl_f5y09v($this) {
return 'ColorAdd(value=' + $this + ')';
}
function ColorAdd__hashCode_impl_6l7wj0($this) {
return $this;
}
function ColorAdd__equals_impl_swq8kw($this, other) {
if (!(other instanceof ColorAdd))
return false;
var tmp0_other_with_cast = other instanceof ColorAdd ? other.y8i_1 : THROW_CCE();
if (!($this === tmp0_other_with_cast))
return false;
return true;
}
function ColorAdd(value) {
Companion_getInstance_17();
this.y8i_1 = value;
}
ColorAdd.prototype.toString = function () {
return ColorAdd__toString_impl_f5y09v(this.y8i_1);
};
ColorAdd.prototype.hashCode = function () {
return ColorAdd__hashCode_impl_6l7wj0(this.y8i_1);
};
ColorAdd.prototype.equals = function (other) {
return ColorAdd__equals_impl_swq8kw(this.y8i_1, other);
};
ColorAdd.$metadata$ = classMeta('ColorAdd');
function ColorAdd_unpackComponent(v) {
init_properties_ColorTransform_kt_ejivzl();
return imul(v - 127 | 0, 2);
}
function ColorAdd_pack(r, g, b, a) {
init_properties_ColorTransform_kt_ejivzl();
return ColorAdd_packComponent(r) << 0 | ColorAdd_packComponent(g) << 8 | ColorAdd_packComponent(b) << 16 | ColorAdd_packComponent(a) << 24;
}
function ColorAdd_packComponent(v) {
init_properties_ColorTransform_kt_ejivzl();
return clamp(127 + (v >> 1) | 0, 0, 255);
}
function Companion_5() {
Companion_instance_5 = this;
}
Companion_5.$metadata$ = objectMeta('Companion');
var Companion_instance_5;
function Companion_getInstance_18() {
if (Companion_instance_5 == null)
new Companion_5();
return Companion_instance_5;
}
function computeColorMul($this) {
if (!$this.h8j_1)
return Unit_getInstance();
$this.h8j_1 = false;
$this.j8j_1 = Companion_getInstance_21().l8j($this.z8i_1, $this.a8j_1, $this.b8j_1, $this.c8j_1);
}
function computeColorAdd($this) {
if (!$this.i8j_1)
return Unit_getInstance();
$this.i8j_1 = false;
var tmp = $this;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.color.Companion.invoke' call
var tmp0_invoke = Companion_getInstance_17();
var tmp1_invoke = $this.d8j_1;
var tmp2_invoke = $this.e8j_1;
var tmp3_invoke = $this.f8j_1;
var tmp4_invoke = $this.g8j_1;
tmp$ret$0 = _ColorAdd___init__impl__q78um5(ColorAdd_pack(tmp1_invoke, tmp2_invoke, tmp3_invoke, tmp4_invoke));
tmp.k8j_1 = tmp$ret$0;
}
function ColorTransform(_mR, _mG, _mB, _mA, _aR, _aG, _aB, _aA) {
Companion_getInstance_18();
this.z8i_1 = _mR;
this.a8j_1 = _mG;
this.b8j_1 = _mB;
this.c8j_1 = _mA;
this.d8j_1 = _aR;
this.e8j_1 = _aG;
this.f8j_1 = _aB;
this.g8j_1 = _aA;
this.h8j_1 = true;
this.i8j_1 = true;
this.j8j_1 = Colors_getInstance().s7z_1;
this.k8j_1 = _ColorAdd___init__impl__q78um5(0);
}
ColorTransform.prototype.m8j = function (ratio, l, r) {
return this.v8j(interpolate(ratio, l.n8j(), r.n8j()), interpolate(ratio, l.o8j(), r.o8j()), interpolate(ratio, l.p8j(), r.p8j()), interpolate(ratio, l.q8j(), r.q8j()), interpolate_0(ratio, l.r8j(), r.r8j()), interpolate_0(ratio, l.s8j(), r.s8j()), interpolate_0(ratio, l.t8j(), r.t8j()), interpolate_0(ratio, l.u8j(), r.u8j()));
};
ColorTransform.prototype.w8j = function (ratio, other) {
var tmp$ret$2;
// Inline function 'com.soywiz.korim.color.ColorTransform' call
var tmp9_ColorTransform = Colors_getInstance().s7z_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.color.Companion.invoke' call
var tmp8_invoke = Companion_getInstance_17();
tmp$ret$0 = _ColorAdd___init__impl__q78um5(ColorAdd_pack(0, 0, 0, 0));
var tmp10_ColorTransform = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.color.ColorTransform' call
var tmp0_ColorTransform = _RGBA___get_rf__impl__kvz75k(tmp9_ColorTransform);
var tmp1_ColorTransform = _RGBA___get_gf__impl__5gcu1f(tmp9_ColorTransform);
var tmp2_ColorTransform = _RGBA___get_bf__impl__1xz5yg(tmp9_ColorTransform);
var tmp3_ColorTransform = _RGBA___get_af__impl__vu36qv(tmp9_ColorTransform);
var tmp4_ColorTransform = _ColorAdd___get_r__impl__j9xkne(tmp10_ColorTransform);
var tmp5_ColorTransform = _ColorAdd___get_g__impl__itrhk1(tmp10_ColorTransform);
var tmp6_ColorTransform = _ColorAdd___get_b__impl__grv87a(tmp10_ColorTransform);
var tmp7_ColorTransform = _ColorAdd___get_a__impl__c1r8ux(tmp10_ColorTransform);
tmp$ret$1 = new ColorTransform(numberToDouble(tmp0_ColorTransform), numberToDouble(tmp1_ColorTransform), numberToDouble(tmp2_ColorTransform), numberToDouble(tmp3_ColorTransform), numberToInt(tmp4_ColorTransform), numberToInt(tmp5_ColorTransform), numberToInt(tmp6_ColorTransform), numberToInt(tmp7_ColorTransform));
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2.m8j(ratio, this, other);
};
ColorTransform.prototype.d70 = function (ratio, other) {
return this.w8j(ratio, other instanceof ColorTransform ? other : THROW_CCE());
};
ColorTransform.prototype.x8j = function (v) {
var mR = _RGBA___get_rd__impl__y9ub0a(v);
var mG = _RGBA___get_gd__impl__7xi9tb(v);
var mB = _RGBA___get_bd__impl__fbu9t6(v);
var mA = _RGBA___get_ad__impl__pt5rdj(v);
if (((!(this.z8i_1 === mR) ? true : !(this.a8j_1 === mG)) ? true : !(this.b8j_1 === mB)) ? true : !(this.c8j_1 === mA)) {
this.z8i_1 = mR;
this.a8j_1 = mG;
this.b8j_1 = mB;
this.c8j_1 = mA;
this.h8j_1 = true;
}
};
ColorTransform.prototype.y8j = function () {
computeColorMul(this);
return this.j8j_1;
};
ColorTransform.prototype.z8j = function () {
computeColorAdd(this);
return this.k8j_1;
};
ColorTransform.prototype.n8j = function () {
return this.z8i_1;
};
ColorTransform.prototype.o8j = function () {
return this.a8j_1;
};
ColorTransform.prototype.p8j = function () {
return this.b8j_1;
};
ColorTransform.prototype.a8k = function (v) {
this.c8j_1 = v;
this.h8j_1 = true;
};
ColorTransform.prototype.q8j = function () {
return this.c8j_1;
};
ColorTransform.prototype.r8j = function () {
return this.d8j_1;
};
ColorTransform.prototype.s8j = function () {
return this.e8j_1;
};
ColorTransform.prototype.t8j = function () {
return this.f8j_1;
};
ColorTransform.prototype.u8j = function () {
return this.g8j_1;
};
ColorTransform.prototype.b8k = function (mR, mG, mB, mA) {
this.z8i_1 = mR;
this.a8j_1 = mG;
this.b8j_1 = mB;
this.c8j_1 = mA;
this.h8j_1 = true;
return this;
};
ColorTransform.prototype.c8k = function (aR, aG, aB, aA) {
this.d8j_1 = aR;
this.e8j_1 = aG;
this.f8j_1 = aB;
this.g8j_1 = aA;
this.i8j_1 = true;
return this;
};
ColorTransform.prototype.v8j = function (mR, mG, mB, mA, aR, aG, aB, aA) {
return this.b8k(mR, mG, mB, mA).c8k(aR, aG, aB, aA);
};
ColorTransform.prototype.d8k = function (t) {
this.z8i_1 = t.z8i_1;
this.a8j_1 = t.a8j_1;
this.b8j_1 = t.b8j_1;
this.c8j_1 = t.c8j_1;
this.d8j_1 = t.d8j_1;
this.e8j_1 = t.e8j_1;
this.f8j_1 = t.f8j_1;
this.g8j_1 = t.g8j_1;
this.h8j_1 = t.h8j_1;
this.i8j_1 = t.i8j_1;
this.k8j_1 = t.k8j_1;
this.j8j_1 = t.j8j_1;
return this;
};
ColorTransform.prototype.e8k = function (l, r) {
return this.v8j(l.n8j() * r.n8j(), l.o8j() * r.o8j(), l.p8j() * r.p8j(), l.q8j() * r.q8j(), l.r8j() + r.r8j() | 0, l.s8j() + r.s8j() | 0, l.t8j() + r.t8j() | 0, l.u8j() + r.u8j() | 0);
};
ColorTransform.prototype.toString = function () {
return 'ColorTransform(*[' + get_niceStr(this.n8j()) + ', ' + get_niceStr(this.o8j()) + ', ' + get_niceStr(this.p8j()) + ', ' + get_niceStr(this.q8j()) + ']+[' + this.r8j() + ', ' + this.s8j() + ', ' + this.t8j() + ', ' + this.u8j() + '])';
};
ColorTransform.prototype.hashCode = function () {
var result = getNumberHashCode(this.z8i_1);
result = imul(result, 31) + getNumberHashCode(this.a8j_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.b8j_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.c8j_1) | 0;
result = imul(result, 31) + this.d8j_1 | 0;
result = imul(result, 31) + this.e8j_1 | 0;
result = imul(result, 31) + this.f8j_1 | 0;
result = imul(result, 31) + this.g8j_1 | 0;
return result;
};
ColorTransform.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ColorTransform))
return false;
var tmp0_other_with_cast = other instanceof ColorTransform ? other : THROW_CCE();
if (!equals(this.z8i_1, tmp0_other_with_cast.z8i_1))
return false;
if (!equals(this.a8j_1, tmp0_other_with_cast.a8j_1))
return false;
if (!equals(this.b8j_1, tmp0_other_with_cast.b8j_1))
return false;
if (!equals(this.c8j_1, tmp0_other_with_cast.c8j_1))
return false;
if (!(this.d8j_1 === tmp0_other_with_cast.d8j_1))
return false;
if (!(this.e8j_1 === tmp0_other_with_cast.e8j_1))
return false;
if (!(this.f8j_1 === tmp0_other_with_cast.f8j_1))
return false;
if (!(this.g8j_1 === tmp0_other_with_cast.g8j_1))
return false;
return true;
};
ColorTransform.$metadata$ = classMeta('ColorTransform', [MutableInterpolable, Interpolable]);
function ColorTransform_0(mR, mG, mB, mA, aR, aG, aB, aA) {
init_properties_ColorTransform_kt_ejivzl();
return new ColorTransform(numberToDouble(mR), numberToDouble(mG), numberToDouble(mB), numberToDouble(mA), numberToInt(aR), numberToInt(aG), numberToInt(aB), numberToInt(aA));
}
function ColorTransform_1(multiply, add) {
init_properties_ColorTransform_kt_ejivzl();
var tmp$ret$1;
// Inline function 'com.soywiz.korim.color.ColorTransform' call
var tmp0_ColorTransform = _RGBA___get_rf__impl__kvz75k(multiply);
var tmp1_ColorTransform = _RGBA___get_gf__impl__5gcu1f(multiply);
var tmp2_ColorTransform = _RGBA___get_bf__impl__1xz5yg(multiply);
var tmp3_ColorTransform = _RGBA___get_af__impl__vu36qv(multiply);
var tmp4_ColorTransform = _ColorAdd___get_r__impl__j9xkne(add);
var tmp5_ColorTransform = _ColorAdd___get_g__impl__itrhk1(add);
var tmp6_ColorTransform = _ColorAdd___get_b__impl__grv87a(add);
var tmp7_ColorTransform = _ColorAdd___get_a__impl__c1r8ux(add);
tmp$ret$1 = new ColorTransform(numberToDouble(tmp0_ColorTransform), numberToDouble(tmp1_ColorTransform), numberToDouble(tmp2_ColorTransform), numberToDouble(tmp3_ColorTransform), numberToInt(tmp4_ColorTransform), numberToInt(tmp5_ColorTransform), numberToInt(tmp6_ColorTransform), numberToInt(tmp7_ColorTransform));
return tmp$ret$1;
}
var properties_initialized_ColorTransform_kt_ub7zbp;
function init_properties_ColorTransform_kt_ejivzl() {
if (properties_initialized_ColorTransform_kt_ub7zbp) {
} else {
properties_initialized_ColorTransform_kt_ub7zbp = true;
ColorAdd_NEUTRAL = _ColorAdd___init__impl__q78um5(2139062143);
}
}
function Colors() {
Colors_instance = this;
this.s7z_1 = Companion_getInstance_21().u8i(255, 255, 255, 255);
this.t7z_1 = Companion_getInstance_21().u8i(0, 0, 0, 255);
this.u7z_1 = Companion_getInstance_21().u8i(255, 0, 0, 255);
this.v7z_1 = Companion_getInstance_21().u8i(0, 255, 0, 255);
this.w7z_1 = Companion_getInstance_21().u8i(0, 0, 255, 255);
this.x7z_1 = Companion_getInstance_21().u8i(0, 0, 0, 0);
this.y7z_1 = Companion_getInstance_21().u8i(255, 255, 255, 0);
this.z7z_1 = Companion_getInstance_21().f8k(240, 248, 255);
this.a80_1 = Companion_getInstance_21().f8k(250, 235, 215);
this.b80_1 = Companion_getInstance_21().f8k(0, 255, 255);
this.c80_1 = Companion_getInstance_21().f8k(127, 255, 212);
this.d80_1 = Companion_getInstance_21().f8k(240, 255, 255);
this.e80_1 = Companion_getInstance_21().f8k(245, 245, 220);
this.f80_1 = Companion_getInstance_21().f8k(255, 228, 196);
this.g80_1 = Companion_getInstance_21().f8k(255, 235, 205);
this.h80_1 = Companion_getInstance_21().f8k(138, 43, 226);
this.i80_1 = Companion_getInstance_21().f8k(165, 42, 42);
this.j80_1 = Companion_getInstance_21().f8k(222, 184, 135);
this.k80_1 = Companion_getInstance_21().f8k(95, 158, 160);
this.l80_1 = Companion_getInstance_21().f8k(127, 255, 0);
this.m80_1 = Companion_getInstance_21().f8k(210, 105, 30);
this.n80_1 = Companion_getInstance_21().f8k(255, 127, 80);
this.o80_1 = Companion_getInstance_21().f8k(100, 149, 237);
this.p80_1 = Companion_getInstance_21().f8k(255, 248, 220);
this.q80_1 = Companion_getInstance_21().f8k(220, 20, 60);
this.r80_1 = Companion_getInstance_21().f8k(0, 0, 139);
this.s80_1 = Companion_getInstance_21().f8k(0, 255, 255);
this.t80_1 = Companion_getInstance_21().f8k(0, 139, 139);
this.u80_1 = Companion_getInstance_21().f8k(184, 134, 11);
this.v80_1 = Companion_getInstance_21().f8k(169, 169, 169);
this.w80_1 = Companion_getInstance_21().f8k(0, 100, 0);
this.x80_1 = Companion_getInstance_21().f8k(169, 169, 169);
this.y80_1 = Companion_getInstance_21().f8k(189, 183, 107);
this.z80_1 = Companion_getInstance_21().f8k(255, 0, 255);
this.a81_1 = Companion_getInstance_21().f8k(139, 0, 139);
this.b81_1 = Companion_getInstance_21().f8k(85, 107, 47);
this.c81_1 = Companion_getInstance_21().f8k(255, 140, 0);
this.d81_1 = Companion_getInstance_21().f8k(153, 50, 204);
this.e81_1 = Companion_getInstance_21().f8k(139, 0, 0);
this.f81_1 = Companion_getInstance_21().f8k(233, 150, 122);
this.g81_1 = Companion_getInstance_21().f8k(143, 188, 143);
this.h81_1 = Companion_getInstance_21().f8k(72, 61, 139);
this.i81_1 = Companion_getInstance_21().f8k(47, 79, 79);
this.j81_1 = Companion_getInstance_21().f8k(47, 79, 79);
this.k81_1 = Companion_getInstance_21().f8k(0, 206, 209);
this.l81_1 = Companion_getInstance_21().f8k(148, 0, 211);
this.m81_1 = Companion_getInstance_21().f8k(255, 20, 147);
this.n81_1 = Companion_getInstance_21().f8k(0, 191, 255);
this.o81_1 = Companion_getInstance_21().f8k(105, 105, 105);
this.p81_1 = Companion_getInstance_21().f8k(105, 105, 105);
this.q81_1 = Companion_getInstance_21().f8k(30, 144, 255);
this.r81_1 = Companion_getInstance_21().f8k(178, 34, 34);
this.s81_1 = Companion_getInstance_21().f8k(255, 250, 240);
this.t81_1 = Companion_getInstance_21().f8k(34, 139, 34);
this.u81_1 = Companion_getInstance_21().f8k(255, 0, 255);
this.v81_1 = Companion_getInstance_21().f8k(220, 220, 220);
this.w81_1 = Companion_getInstance_21().f8k(248, 248, 255);
this.x81_1 = Companion_getInstance_21().f8k(255, 215, 0);
this.y81_1 = Companion_getInstance_21().f8k(218, 165, 32);
this.z81_1 = Companion_getInstance_21().f8k(173, 255, 47);
this.a82_1 = Companion_getInstance_21().f8k(240, 255, 240);
this.b82_1 = Companion_getInstance_21().f8k(255, 105, 180);
this.c82_1 = Companion_getInstance_21().f8k(205, 92, 92);
this.d82_1 = Companion_getInstance_21().f8k(75, 0, 130);
this.e82_1 = Companion_getInstance_21().f8k(255, 255, 240);
this.f82_1 = Companion_getInstance_21().f8k(240, 230, 140);
this.g82_1 = Companion_getInstance_21().f8k(230, 230, 250);
this.h82_1 = Companion_getInstance_21().f8k(255, 240, 245);
this.i82_1 = Companion_getInstance_21().f8k(124, 252, 0);
this.j82_1 = Companion_getInstance_21().f8k(255, 250, 205);
this.k82_1 = Companion_getInstance_21().f8k(173, 216, 230);
this.l82_1 = Companion_getInstance_21().f8k(240, 128, 128);
this.m82_1 = Companion_getInstance_21().f8k(224, 255, 255);
this.n82_1 = Companion_getInstance_21().f8k(250, 250, 210);
this.o82_1 = Companion_getInstance_21().f8k(211, 211, 211);
this.p82_1 = Companion_getInstance_21().f8k(144, 238, 144);
this.q82_1 = Companion_getInstance_21().f8k(211, 211, 211);
this.r82_1 = Companion_getInstance_21().f8k(255, 182, 193);
this.s82_1 = Companion_getInstance_21().f8k(255, 160, 122);
this.t82_1 = Companion_getInstance_21().f8k(32, 178, 170);
this.u82_1 = Companion_getInstance_21().f8k(135, 206, 250);
this.v82_1 = Companion_getInstance_21().f8k(119, 136, 153);
this.w82_1 = Companion_getInstance_21().f8k(119, 136, 153);
this.x82_1 = Companion_getInstance_21().f8k(176, 196, 222);
this.y82_1 = Companion_getInstance_21().f8k(255, 255, 224);
this.z82_1 = Companion_getInstance_21().f8k(0, 255, 0);
this.a83_1 = Companion_getInstance_21().f8k(50, 205, 50);
this.b83_1 = Companion_getInstance_21().f8k(250, 240, 230);
this.c83_1 = Companion_getInstance_21().f8k(128, 0, 0);
this.d83_1 = Companion_getInstance_21().f8k(102, 205, 170);
this.e83_1 = Companion_getInstance_21().f8k(0, 0, 205);
this.f83_1 = Companion_getInstance_21().f8k(186, 85, 211);
this.g83_1 = Companion_getInstance_21().f8k(147, 112, 219);
this.h83_1 = Companion_getInstance_21().f8k(60, 179, 113);
this.i83_1 = Companion_getInstance_21().f8k(123, 104, 238);
this.j83_1 = Companion_getInstance_21().f8k(0, 250, 154);
this.k83_1 = Companion_getInstance_21().f8k(72, 209, 204);
this.l83_1 = Companion_getInstance_21().f8k(199, 21, 133);
this.m83_1 = Companion_getInstance_21().f8k(25, 25, 112);
this.n83_1 = Companion_getInstance_21().f8k(245, 255, 250);
this.o83_1 = Companion_getInstance_21().f8k(255, 228, 225);
this.p83_1 = Companion_getInstance_21().f8k(255, 228, 181);
this.q83_1 = Companion_getInstance_21().f8k(255, 222, 173);
this.r83_1 = Companion_getInstance_21().f8k(0, 0, 128);
this.s83_1 = Companion_getInstance_21().f8k(253, 245, 230);
this.t83_1 = Companion_getInstance_21().f8k(128, 128, 0);
this.u83_1 = Companion_getInstance_21().f8k(107, 142, 35);
this.v83_1 = Companion_getInstance_21().f8k(255, 165, 0);
this.w83_1 = Companion_getInstance_21().f8k(255, 69, 0);
this.x83_1 = Companion_getInstance_21().f8k(218, 112, 214);
this.y83_1 = Companion_getInstance_21().f8k(238, 232, 170);
this.z83_1 = Companion_getInstance_21().f8k(152, 251, 152);
this.a84_1 = Companion_getInstance_21().f8k(175, 238, 238);
this.b84_1 = Companion_getInstance_21().f8k(219, 112, 147);
this.c84_1 = Companion_getInstance_21().f8k(255, 239, 213);
this.d84_1 = Companion_getInstance_21().f8k(255, 218, 185);
this.e84_1 = Companion_getInstance_21().f8k(205, 133, 63);
this.f84_1 = Companion_getInstance_21().f8k(255, 192, 203);
this.g84_1 = Companion_getInstance_21().f8k(221, 160, 221);
this.h84_1 = Companion_getInstance_21().f8k(176, 224, 230);
this.i84_1 = Companion_getInstance_21().f8k(128, 0, 128);
this.j84_1 = Companion_getInstance_21().f8k(188, 143, 143);
this.k84_1 = Companion_getInstance_21().f8k(65, 105, 225);
this.l84_1 = Companion_getInstance_21().f8k(139, 69, 19);
this.m84_1 = Companion_getInstance_21().f8k(250, 128, 114);
this.n84_1 = Companion_getInstance_21().f8k(244, 164, 96);
this.o84_1 = Companion_getInstance_21().f8k(46, 139, 87);
this.p84_1 = Companion_getInstance_21().f8k(255, 245, 238);
this.q84_1 = Companion_getInstance_21().f8k(160, 82, 45);
this.r84_1 = Companion_getInstance_21().f8k(192, 192, 192);
this.s84_1 = Companion_getInstance_21().f8k(135, 206, 235);
this.t84_1 = Companion_getInstance_21().f8k(106, 90, 205);
this.u84_1 = Companion_getInstance_21().f8k(112, 128, 144);
this.v84_1 = Companion_getInstance_21().f8k(112, 128, 144);
this.w84_1 = Companion_getInstance_21().f8k(255, 250, 250);
this.x84_1 = Companion_getInstance_21().f8k(0, 255, 127);
this.y84_1 = Companion_getInstance_21().f8k(70, 130, 180);
this.z84_1 = Companion_getInstance_21().f8k(210, 180, 140);
this.a85_1 = Companion_getInstance_21().f8k(0, 128, 128);
this.b85_1 = Companion_getInstance_21().f8k(216, 191, 216);
this.c85_1 = Companion_getInstance_21().f8k(255, 99, 71);
this.d85_1 = Companion_getInstance_21().f8k(64, 224, 208);
this.e85_1 = Companion_getInstance_21().f8k(238, 130, 238);
this.f85_1 = Companion_getInstance_21().f8k(245, 222, 179);
this.g85_1 = Companion_getInstance_21().f8k(245, 245, 245);
this.h85_1 = Companion_getInstance_21().f8k(154, 205, 50);
this.i85_1 = Companion_getInstance_21().f8k(255, 255, 0);
this.j85_1 = mapOf([to('black', new RGBA(this.t7z_1)), to('white', new RGBA(this.s7z_1)), to('red', new RGBA(this.u7z_1)), to('green', new RGBA(this.v7z_1)), to('blue', new RGBA(this.w7z_1)), to('aliceblue', new RGBA(this.z7z_1)), to('antiquewhite', new RGBA(this.a80_1)), to('aqua', new RGBA(this.b80_1)), to('aquamarine', new RGBA(this.c80_1)), to('azure', new RGBA(this.d80_1)), to('beige', new RGBA(this.e80_1)), to('bisque', new RGBA(this.f80_1)), to('blanchedalmond', new RGBA(this.g80_1)), to('blueviolet', new RGBA(this.h80_1)), to('brown', new RGBA(this.i80_1)), to('burlywood', new RGBA(this.j80_1)), to('cadetblue', new RGBA(this.k80_1)), to('chartreuse', new RGBA(this.l80_1)), to('chocolate', new RGBA(this.m80_1)), to('coral', new RGBA(this.n80_1)), to('cornflowerblue', new RGBA(this.o80_1)), to('cornsilk', new RGBA(this.p80_1)), to('crimson', new RGBA(this.q80_1)), to('cyan', new RGBA(this.s80_1)), to('darkblue', new RGBA(this.r80_1)), to('darkcyan', new RGBA(this.t80_1)), to('darkgoldenrod', new RGBA(this.u80_1)), to('darkgray', new RGBA(this.v80_1)), to('darkgreen', new RGBA(this.w80_1)), to('darkgrey', new RGBA(this.x80_1)), to('darkkhaki', new RGBA(this.y80_1)), to('darkmagenta', new RGBA(this.a81_1)), to('darkolivegreen', new RGBA(this.b81_1)), to('darkorange', new RGBA(this.c81_1)), to('darkorchid', new RGBA(this.d81_1)), to('darkred', new RGBA(this.e81_1)), to('darksalmon', new RGBA(this.f81_1)), to('darkseagreen', new RGBA(this.g81_1)), to('darkslateblue', new RGBA(this.h81_1)), to('darkslategray', new RGBA(this.i81_1)), to('darkslategrey', new RGBA(this.j81_1)), to('darkturquoise', new RGBA(this.k81_1)), to('darkviolet', new RGBA(this.l81_1)), to('deeppink', new RGBA(this.m81_1)), to('deepskyblue', new RGBA(this.n81_1)), to('dimgray', new RGBA(this.o81_1)), to('dimgrey', new RGBA(this.p81_1)), to('dodgerblue', new RGBA(this.q81_1)), to('firebrick', new RGBA(this.r81_1)), to('floralwhite', new RGBA(this.s81_1)), to('forestgreen', new RGBA(this.t81_1)), to('fuchsia', new RGBA(this.u81_1)), to('gainsboro', new RGBA(this.v81_1)), to('ghostwhite', new RGBA(this.w81_1)), to('gold', new RGBA(this.x81_1)), to('goldenrod', new RGBA(this.y81_1)), to('greenyellow', new RGBA(this.z81_1)), to('honeydew', new RGBA(this.a82_1)), to('hotpink', new RGBA(this.b82_1)), to('indianred', new RGBA(this.c82_1)), to('indigo', new RGBA(this.d82_1)), to('ivory', new RGBA(this.e82_1)), to('khaki', new RGBA(this.f82_1)), to('lavender', new RGBA(this.g82_1)), to('lavenderblush', new RGBA(this.h82_1)), to('lawngreen', new RGBA(this.i82_1)), to('lemonchiffon', new RGBA(this.j82_1)), to('lightblue', new RGBA(this.k82_1)), to('lightcoral', new RGBA(this.l82_1)), to('lightcyan', new RGBA(this.m82_1)), to('lightgoldenrodyellow', new RGBA(this.n82_1)), to('lightgray', new RGBA(this.o82_1)), to('lightgreen', new RGBA(this.p82_1)), to('lightgrey', new RGBA(this.q82_1)), to('lightpink', new RGBA(this.r82_1)), to('lightsalmon', new RGBA(this.s82_1)), to('lightseagreen', new RGBA(this.t82_1)), to('lightskyblue', new RGBA(this.u82_1)), to('lightslategray', new RGBA(this.v82_1)), to('lightslategrey', new RGBA(this.w82_1)), to('lightsteelblue', new RGBA(this.x82_1)), to('lightyellow', new RGBA(this.y82_1)), to('lime', new RGBA(this.z82_1)), to('limegreen', new RGBA(this.a83_1)), to('linen', new RGBA(this.b83_1)), to('magenta', new RGBA(this.z80_1)), to('maroon', new RGBA(this.c83_1)), to('mediumaquamarine', new RGBA(this.d83_1)), to('mediumblue', new RGBA(this.e83_1)), to('mediumorchid', new RGBA(this.f83_1)), to('mediumpurple', new RGBA(this.g83_1)), to('mediumseagreen', new RGBA(this.h83_1)), to('mediumslateblue', new RGBA(this.i83_1)), to('mediumspringgreen', new RGBA(this.j83_1)), to('mediumturquoise', new RGBA(this.k83_1)), to('mediumvioletred', new RGBA(this.l83_1)), to('midnightblue', new RGBA(this.m83_1)), to('mintcream', new RGBA(this.n83_1)), to('mistyrose', new RGBA(this.o83_1)), to('moccasin', new RGBA(this.p83_1)), to('navajowhite', new RGBA(this.q83_1)), to('navy', new RGBA(this.r83_1)), to('oldlace', new RGBA(this.s83_1)), to('olive', new RGBA(this.t83_1)), to('olivedrab', new RGBA(this.u83_1)), to('orange', new RGBA(this.v83_1)), to('orangered', new RGBA(this.w83_1)), to('orchid', new RGBA(this.x83_1)), to('palegoldenrod', new RGBA(this.y83_1)), to('palegreen', new RGBA(this.z83_1)), to('paleturquoise', new RGBA(this.a84_1)), to('palevioletred', new RGBA(this.b84_1)), to('papayawhip', new RGBA(this.c84_1)), to('peachpuff', new RGBA(this.d84_1)), to('peru', new RGBA(this.e84_1)), to('pink', new RGBA(this.f84_1)), to('plum', new RGBA(this.g84_1)), to('powderblue', new RGBA(this.h84_1)), to('purple', new RGBA(this.i84_1)), to('rosybrown', new RGBA(this.j84_1)), to('royalblue', new RGBA(this.k84_1)), to('saddlebrown', new RGBA(this.l84_1)), to('salmon', new RGBA(this.m84_1)), to('sandybrown', new RGBA(this.n84_1)), to('seagreen', new RGBA(this.o84_1)), to('seashell', new RGBA(this.p84_1)), to('sienna', new RGBA(this.q84_1)), to('silver', new RGBA(this.r84_1)), to('skyblue', new RGBA(this.s84_1)), to('slateblue', new RGBA(this.t84_1)), to('slategray', new RGBA(this.u84_1)), to('slategrey', new RGBA(this.v84_1)), to('snow', new RGBA(this.w84_1)), to('springgreen', new RGBA(this.x84_1)), to('steelblue', new RGBA(this.y84_1)), to('tan', new RGBA(this.z84_1)), to('teal', new RGBA(this.a85_1)), to('thistle', new RGBA(this.b85_1)), to('tomato', new RGBA(this.c85_1)), to('turquoise', new RGBA(this.d85_1)), to('violet', new RGBA(this.e85_1)), to('wheat', new RGBA(this.f85_1)), to('whitesmoke', new RGBA(this.g85_1)), to('yellowgreen', new RGBA(this.h85_1)), to('yellow', new RGBA(this.i85_1))]);
}
Colors.prototype.g8k = function () {
return this.s7z_1;
};
Colors.prototype.h8k = function () {
return this.x7z_1;
};
Colors.prototype.i8k = function () {
return this.y7z_1;
};
Colors.prototype.j8k = function () {
return this.p81_1;
};
Colors.prototype.k8k = function () {
return this.u81_1;
};
Colors.prototype.l8k = function (str) {
return this.m8k(str, Colors_getInstance().x7z_1, true);
};
Colors.prototype.m8k = function (str, default_0, errorOnDefault) {
try {
if (startsWith$default(str, '#', false, 2, null)) {
var hex = substr(str, 1);
if (!setOf([3, 4, 6, 8]).r(hex.length))
return this.t7z_1;
var chars = hex.length < 6 ? 1 : 2;
var scale = hex.length < 6 ? 17.0 : 1.0;
var hasAlpha = (hex.length / chars | 0) >= 4;
var r = numberToInt(toInt(substr_0(hex, imul(0, chars), chars), 16) * scale);
var g = numberToInt(toInt(substr_0(hex, imul(1, chars), chars), 16) * scale);
var b = numberToInt(toInt(substr_0(hex, imul(2, chars), chars), 16) * scale);
var a = hasAlpha ? numberToInt(toInt(substr_0(hex, imul(3, chars), chars), 16) * scale) : 255;
return Companion_getInstance_21().u8i(r, g, b, a);
} else {
if (startsWith(str, 'RGBA(', true)) {
var tmp$ret$1;
// Inline function 'kotlin.text.toUpperCase' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = str;
tmp$ret$1 = tmp$ret$0.toUpperCase();
var tmp = removeSuffix(removePrefix(tmp$ret$1, 'RGBA('), ')');
var parts = split$default(tmp, [','], false, 0, 6, null);
var tmp$ret$3;
// Inline function 'kotlin.collections.getOrElse' call
var tmp_0;
if (0 <= get_lastIndex(parts)) {
tmp_0 = parts.m(0);
} else {
var tmp$ret$2;
// Inline function 'com.soywiz.korim.color.Colors.get.<anonymous>' call
tmp$ret$2 = '0';
tmp_0 = tmp$ret$2;
}
tmp$ret$3 = tmp_0;
var tmp0_elvis_lhs = toIntOrNull(tmp$ret$3);
var r_0 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
var tmp$ret$5;
// Inline function 'kotlin.collections.getOrElse' call
var tmp_1;
if (1 <= get_lastIndex(parts)) {
tmp_1 = parts.m(1);
} else {
var tmp$ret$4;
// Inline function 'com.soywiz.korim.color.Colors.get.<anonymous>' call
tmp$ret$4 = '0';
tmp_1 = tmp$ret$4;
}
tmp$ret$5 = tmp_1;
var tmp1_elvis_lhs = toIntOrNull(tmp$ret$5);
var g_0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
var tmp$ret$7;
// Inline function 'kotlin.collections.getOrElse' call
var tmp_2;
if (2 <= get_lastIndex(parts)) {
tmp_2 = parts.m(2);
} else {
var tmp$ret$6;
// Inline function 'com.soywiz.korim.color.Colors.get.<anonymous>' call
tmp$ret$6 = '0';
tmp_2 = tmp$ret$6;
}
tmp$ret$7 = tmp_2;
var tmp2_elvis_lhs = toIntOrNull(tmp$ret$7);
var b_0 = tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
var tmp$ret$9;
// Inline function 'kotlin.collections.getOrElse' call
var tmp_3;
if (3 <= get_lastIndex(parts)) {
tmp_3 = parts.m(3);
} else {
var tmp$ret$8;
// Inline function 'com.soywiz.korim.color.Colors.get.<anonymous>' call
tmp$ret$8 = '1.0';
tmp_3 = tmp$ret$8;
}
tmp$ret$9 = tmp_3;
var tmp3_elvis_lhs = toDoubleOrNull(tmp$ret$9);
var af = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
return Companion_getInstance_21().u8i(r_0, g_0, b_0, numberToInt(af * 255));
} else {
var tmp$ret$11;
// Inline function 'kotlin.text.toLowerCase' call
var tmp$ret$10;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$10 = str;
tmp$ret$11 = tmp$ret$10.toLowerCase();
var tmp_4 = this.j85_1.q(tmp$ret$11);
var col = tmp_4 == null ? null : tmp_4.n8k_1;
var tmp_5;
var tmp_6 = col;
if ((tmp_6 == null ? null : new RGBA(tmp_6)) == null) {
tmp_5 = errorOnDefault;
} else {
tmp_5 = false;
}
if (tmp_5) {
var tmp_7 = '#' + str;
return this.o8k(tmp_7, default_0, false, 4, null);
}
var tmp4_elvis_lhs = col;
var tmp_8;
var tmp_9 = tmp4_elvis_lhs;
if ((tmp_9 == null ? null : new RGBA(tmp_9)) == null) {
tmp_8 = default_0;
} else {
tmp_8 = tmp4_elvis_lhs;
}
return tmp_8;
}
}
} catch ($p) {
if ($p instanceof Error) {
printStackTrace($p);
return Colors_getInstance().u7z_1;
} else {
throw $p;
}
}
};
Colors.prototype.o8k = function (str, default_0, errorOnDefault, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
errorOnDefault = false;
return this.m8k(str, default_0, errorOnDefault);
};
Colors.$metadata$ = objectMeta('Colors');
var Colors_instance;
function Colors_getInstance() {
if (Colors_instance == null)
new Colors();
return Colors_instance;
}
function Companion_6() {
Companion_instance_6 = this;
RGB.call(this, 0, 8, 16);
}
Companion_6.$metadata$ = objectMeta('Companion', undefined, undefined, undefined, undefined, RGB.prototype);
var Companion_instance_6;
function Companion_getInstance_19() {
if (Companion_instance_6 == null)
new Companion_6();
return Companion_instance_6;
}
function RGB(rOffset, gOffset, bOffset) {
Companion_getInstance_19();
ColorFormat24.call(this);
this.q8k_1 = rOffset;
this.r8k_1 = gOffset;
this.s8k_1 = bOffset;
}
RGB.prototype.q8i = function (v) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract8' call
var tmp0_extract8 = this.q8k_1;
tmp$ret$0 = (v >>> tmp0_extract8 | 0) & 255;
return tmp$ret$0;
};
RGB.prototype.r8i = function (v) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract8' call
var tmp0_extract8 = this.r8k_1;
tmp$ret$0 = (v >>> tmp0_extract8 | 0) & 255;
return tmp$ret$0;
};
RGB.prototype.s8i = function (v) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract8' call
var tmp0_extract8 = this.s8k_1;
tmp$ret$0 = (v >>> tmp0_extract8 | 0) & 255;
return tmp$ret$0;
};
RGB.prototype.t8i = function (v) {
return 255;
};
RGB.$metadata$ = classMeta('RGB', undefined, undefined, undefined, undefined, ColorFormat24.prototype);
function _RGBAPremultiplied___init__impl__uos02x(value) {
return value;
}
function _RGBAPremultiplied___get_value__impl__bqfhud($this) {
return $this;
}
function _RGBAPremultiplied___init__impl__uos02x_0(r, g, b, a) {
var tmp = _RGBAPremultiplied___init__impl__uos02x(packIntClamped(r, g, b, a));
return tmp;
}
function _RGBAPremultiplied___get_r__impl__m8nz5i($this) {
return (_RGBAPremultiplied___get_value__impl__bqfhud($this) >>> 0 | 0) & 255;
}
function _RGBAPremultiplied___get_g__impl__fv131x($this) {
return (_RGBAPremultiplied___get_value__impl__bqfhud($this) >>> 8 | 0) & 255;
}
function _RGBAPremultiplied___get_b__impl__dt4tp6($this) {
return (_RGBAPremultiplied___get_value__impl__bqfhud($this) >>> 16 | 0) & 255;
}
function _RGBAPremultiplied___get_a__impl__f0hnd1($this) {
return (_RGBAPremultiplied___get_value__impl__bqfhud($this) >>> 24 | 0) & 255;
}
function _RGBAPremultiplied___get_af__impl__euwcjn($this) {
return _RGBAPremultiplied___get_a__impl__f0hnd1($this) / 255.0;
}
function _RGBAPremultiplied___get_depremultiplied__impl__q1zu93($this) {
var A = _RGBAPremultiplied___get_a__impl__f0hnd1($this);
if (A === 0)
return _RGBA___init__impl__lqpay5(0);
if (A === 255)
return _RGBA___init__impl__lqpay5(_RGBAPremultiplied___get_value__impl__bqfhud($this));
var iAf = 255.0 / A;
var Rp = _RGBAPremultiplied___get_r__impl__m8nz5i($this);
var Gp = _RGBAPremultiplied___get_g__impl__fv131x($this);
var Bp = _RGBAPremultiplied___get_b__impl__dt4tp6($this);
var tmp$ret$0;
// Inline function 'kotlin.math.roundToInt' call
var tmp0_roundToInt = Rp * iAf;
tmp$ret$0 = roundToInt(tmp0_roundToInt);
var R = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.roundToInt' call
var tmp1_roundToInt = Gp * iAf;
tmp$ret$1 = roundToInt(tmp1_roundToInt);
var G = tmp$ret$1;
var tmp$ret$2;
// Inline function 'kotlin.math.roundToInt' call
var tmp2_roundToInt = Bp * iAf;
tmp$ret$2 = roundToInt(tmp2_roundToInt);
var B = tmp$ret$2;
return Companion_getInstance_21().u8i(R, G, B, A);
}
function RGBAPremultiplied__scaled256_impl_hjm9ii($this, s) {
var rb = (imul(_RGBAPremultiplied___get_value__impl__bqfhud($this) & 16711935, s) >>> 8 | 0) & 16711935;
var g = (imul(_RGBAPremultiplied___get_value__impl__bqfhud($this) & 65280, s) >>> 8 | 0) & 65280;
var a = (imul(_RGBAPremultiplied___get_value__impl__bqfhud($this) >>> 24 | 0, s) >>> 8 | 0) << 24;
return _RGBAPremultiplied___init__impl__uos02x(rb | g | a);
}
function RGBAPremultiplied__scaled_impl_qz7lg1($this, alpha) {
return RGBAPremultiplied__scaled256_impl_hjm9ii($this, numberToInt(clamp01(alpha) * 256));
}
function Companion_7() {
Companion_instance_7 = this;
this.t8k_1 = 16711935;
this.u8k_1 = -16711936;
}
Companion_7.prototype.v8k = function (dst, src) {
return _RGBAPremultiplied___init__impl__uos02x(sumPacked4MulR(_RGBAPremultiplied___get_value__impl__bqfhud(src), _RGBAPremultiplied___get_value__impl__bqfhud(dst), 256 - _RGBAPremultiplied___get_a__impl__f0hnd1(src) | 0));
};
Companion_7.$metadata$ = objectMeta('Companion');
var Companion_instance_7;
function Companion_getInstance_20() {
if (Companion_instance_7 == null)
new Companion_7();
return Companion_instance_7;
}
function blendComponent($this, c1, c2, factor) {
return numberToInt(c1 * (1.0 - factor) + c2 * factor) & 255;
}
function blendComponent_0($this, c1, c2, factor) {
return numberToInt(c1 * (1.0 - factor) + c2 * factor) & 255;
}
function _RGBA___init__impl__lqpay5(value) {
return value;
}
function _RGBA___get_value__impl__hhco8v($this) {
return $this;
}
function RGBA__clone_impl_w007z0($this) {
return new RGBA($this);
}
function _RGBA___get_color__impl__8x3sb3($this) {
return $this;
}
function _RGBA___get_r__impl__duz7mo($this) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract8' call
var tmp0_extract8 = _RGBA___get_value__impl__hhco8v($this);
Companion_getInstance_21();
var tmp1_extract8 = 0;
tmp$ret$0 = (tmp0_extract8 >>> tmp1_extract8 | 0) & 255;
return tmp$ret$0;
}
function _RGBA___get_g__impl__o8pukr($this) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract8' call
var tmp0_extract8 = _RGBA___get_value__impl__hhco8v($this);
Companion_getInstance_21();
var tmp1_extract8 = 8;
tmp$ret$0 = (tmp0_extract8 >>> tmp1_extract8 | 0) & 255;
return tmp$ret$0;
}
function _RGBA___get_b__impl__m6tl80($this) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract8' call
var tmp0_extract8 = _RGBA___get_value__impl__hhco8v($this);
Companion_getInstance_21();
var tmp1_extract8 = 16;
tmp$ret$0 = (tmp0_extract8 >>> tmp1_extract8 | 0) & 255;
return tmp$ret$0;
}
function _RGBA___get_a__impl__6msvu7($this) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract8' call
var tmp0_extract8 = _RGBA___get_value__impl__hhco8v($this);
Companion_getInstance_21();
var tmp1_extract8 = 24;
tmp$ret$0 = (tmp0_extract8 >>> tmp1_extract8 | 0) & 255;
return tmp$ret$0;
}
function _RGBA___get_rf__impl__kvz75k($this) {
return _RGBA___get_r__impl__duz7mo($this) / 255.0;
}
function _RGBA___get_gf__impl__5gcu1f($this) {
return _RGBA___get_g__impl__o8pukr($this) / 255.0;
}
function _RGBA___get_bf__impl__1xz5yg($this) {
return _RGBA___get_b__impl__m6tl80($this) / 255.0;
}
function _RGBA___get_af__impl__vu36qv($this) {
return _RGBA___get_a__impl__6msvu7($this) / 255.0;
}
function _RGBA___get_rd__impl__y9ub0a($this) {
return _RGBA___get_r__impl__duz7mo($this) / 255.0;
}
function _RGBA___get_gd__impl__7xi9tb($this) {
return _RGBA___get_g__impl__o8pukr($this) / 255.0;
}
function _RGBA___get_bd__impl__fbu9t6($this) {
return _RGBA___get_b__impl__m6tl80($this) / 255.0;
}
function _RGBA___get_ad__impl__pt5rdj($this) {
return _RGBA___get_a__impl__6msvu7($this) / 255.0;
}
function _RGBA___get_rgb__impl__tijaqt($this) {
return _RGBA___get_value__impl__hhco8v($this) & 16777215;
}
function RGBA__withA_impl_vogscm($this, v) {
var tmp = _RGBA___get_value__impl__hhco8v($this) & 16777215;
var tmp_0 = clampUByte(v);
Companion_getInstance_21();
return _RGBA___init__impl__lqpay5(tmp | tmp_0 << 24);
}
function RGBA__concatAd_impl_gwhfm($this, v) {
return RGBA__withA_impl_vogscm($this, numberToInt(_RGBA___get_a__impl__6msvu7($this) * v));
}
function _RGBA___get_hexString__impl__kocngm($this) {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.color.RGBA.<get-hexString>.<anonymous>' call
tmp0_apply.g2(_Char___init__impl__6a9atx(35));
appendHexByte(tmp0_apply, _RGBA___get_r__impl__duz7mo($this));
appendHexByte(tmp0_apply, _RGBA___get_g__impl__o8pukr($this));
appendHexByte(tmp0_apply, _RGBA___get_b__impl__m6tl80($this));
appendHexByte(tmp0_apply, _RGBA___get_a__impl__6msvu7($this));
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
}
function _RGBA___get_hexStringNoAlpha__impl__j315et($this) {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.color.RGBA.<get-hexStringNoAlpha>.<anonymous>' call
tmp0_apply.g2(_Char___init__impl__6a9atx(35));
appendHexByte(tmp0_apply, _RGBA___get_r__impl__duz7mo($this));
appendHexByte(tmp0_apply, _RGBA___get_g__impl__o8pukr($this));
appendHexByte(tmp0_apply, _RGBA___get_b__impl__m6tl80($this));
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
}
function _RGBA___get_htmlColor__impl__bzw5k6($this) {
return 'rgba(' + _RGBA___get_r__impl__duz7mo($this) + ', ' + _RGBA___get_g__impl__o8pukr($this) + ', ' + _RGBA___get_b__impl__m6tl80($this) + ', ' + get_niceStr_0(_RGBA___get_af__impl__vu36qv($this)) + ')';
}
function _RGBA___get_htmlStringSimple__impl__l4nu0u($this) {
return _RGBA___get_hexStringNoAlpha__impl__j315et($this);
}
function RGBA__toString_impl_4lw6dp($this) {
return _RGBA___get_hexString__impl__kocngm($this);
}
function RGBA__compareTo_impl_lrfjc1($this, other) {
return compareTo(_RGBA___get_value__impl__hhco8v($this), _RGBA___get_value__impl__hhco8v(other));
}
function RGBA__compareTo_impl_lrfjc1_0($this, other) {
var tmp = $this.n8k_1;
return RGBA__compareTo_impl_lrfjc1(tmp, other instanceof RGBA ? other.n8k_1 : THROW_CCE());
}
function RGBA__interpolateWith_impl_mw7p5y($this, ratio, other) {
return Companion_getInstance_21().w8k($this, other, ratio);
}
function RGBA__interpolateWith_impl_mw7p5y_0($this, ratio, other) {
var tmp = $this.n8k_1;
return new RGBA(RGBA__interpolateWith_impl_mw7p5y(tmp, ratio, other instanceof RGBA ? other.n8k_1 : THROW_CCE()));
}
function _RGBA___get_premultiplied__impl__3bulqc($this) {
return _RGBA___get_premultipliedFast__impl__qiau4g($this);
}
function _RGBA___get_premultipliedFast__impl__qiau4g($this) {
var A = _RGBA___get_a__impl__6msvu7($this) + 1 | 0;
if (A >= 255)
return _RGBAPremultiplied___init__impl__uos02x(_RGBA___get_value__impl__hhco8v($this));
if (A <= 1)
return _RGBAPremultiplied___init__impl__uos02x(0);
var RB = (imul(_RGBA___get_value__impl__hhco8v($this) & 16711935, A) >>> 8 | 0) & 16711935;
var G = (imul(_RGBA___get_value__impl__hhco8v($this) & 65280, A) >>> 8 | 0) & 65280;
return _RGBAPremultiplied___init__impl__uos02x(_RGBA___get_value__impl__hhco8v($this) & -16777216 | RB | G);
}
function RGBA__times_impl_wehs9n($this, other) {
return Companion_getInstance_21().x8k($this, other);
}
function Companion_8() {
Companion_instance_8 = this;
ColorFormat32.call(this);
this.o85_1 = 0;
this.p85_1 = 8;
this.q85_1 = 16;
this.r85_1 = 24;
}
Companion_8.prototype.l8j = function (r, g, b, a) {
return this.y8k(f2i(r), f2i(g), f2i(b), f2i(a));
};
Companion_8.prototype.y8k = function (r, g, b, a) {
return _RGBA___init__impl__lqpay5(packIntUnchecked(r, g, b, a));
};
Companion_8.prototype.u8i = function (r, g, b, a) {
return _RGBA___init__impl__lqpay5(packIntClamped(r, g, b, a));
};
Companion_8.prototype.f8k = function (r, g, b) {
return _RGBA___init__impl__lqpay5(packIntClamped(r, g, b, 255));
};
Companion_8.prototype.z8k = function (rgb, a) {
return _RGBA___init__impl__lqpay5(rgb & 16777215 | a << 24);
};
Companion_8.prototype.a8l = function (rgba) {
return rgba;
};
Companion_8.prototype.q8i = function (v) {
return _RGBA___get_r__impl__duz7mo(_RGBA___init__impl__lqpay5(v));
};
Companion_8.prototype.r8i = function (v) {
return _RGBA___get_g__impl__o8pukr(_RGBA___init__impl__lqpay5(v));
};
Companion_8.prototype.s8i = function (v) {
return _RGBA___get_b__impl__m6tl80(_RGBA___init__impl__lqpay5(v));
};
Companion_8.prototype.t8i = function (v) {
return _RGBA___get_a__impl__6msvu7(_RGBA___init__impl__lqpay5(v));
};
Companion_8.prototype.b8l = function (c1, c2, factor256) {
return _RGBA___init__impl__lqpay5(this.c8l(_RGBA___get_value__impl__hhco8v(c1), _RGBA___get_value__impl__hhco8v(c2), factor256));
};
Companion_8.prototype.c8l = function (c1, c2, factor256) {
var ifactor256 = 256 - factor256 | 0;
return ((imul(c1 & 16711935, ifactor256) + imul(c2 & 16711935, factor256) | 0) & -16711936 | (imul(c1 & 65280, ifactor256) + imul(c2 & 65280, factor256) | 0) & 16711680) >>> 8 | 0;
};
Companion_8.prototype.d8l = function (c1, c2, factor) {
return this.b8l(c1, c2, numberToInt(factor * 256));
};
Companion_8.prototype.e8l = function (c1, c2, factor) {
return Companion_getInstance_21().z8k(_RGBA___get_rgb__impl__tijaqt(this.d8l(c1, c2, factor)), blendComponent(this, _RGBA___get_a__impl__6msvu7(c1), _RGBA___get_a__impl__6msvu7(c2), factor));
};
Companion_8.prototype.f8l = function (c1, c2, factor) {
return this.b8l(c1, c2, numberToInt(factor * 256));
};
Companion_8.prototype.g8l = function (c1, c2, factor) {
return Companion_getInstance_21().z8k(_RGBA___get_rgb__impl__tijaqt(this.f8l(c1, c2, factor)), blendComponent_0(this, _RGBA___get_a__impl__6msvu7(c1), _RGBA___get_a__impl__6msvu7(c2), factor));
};
Companion_8.prototype.s85 = function (c00, c10, c01, c11, factorX, factorY) {
var c1 = this.g8l(c00, c10, factorX);
var c2 = this.g8l(c01, c11, factorX);
return this.g8l(c1, c2, factorY);
};
Companion_8.prototype.x8k = function (c1, c2) {
return Companion_getInstance_21().u8i(imul(_RGBA___get_r__impl__duz7mo(c1), _RGBA___get_r__impl__duz7mo(c2)) / 255 | 0, imul(_RGBA___get_g__impl__o8pukr(c1), _RGBA___get_g__impl__o8pukr(c2)) / 255 | 0, imul(_RGBA___get_b__impl__m6tl80(c1), _RGBA___get_b__impl__m6tl80(c2)) / 255 | 0, imul(_RGBA___get_a__impl__6msvu7(c1), _RGBA___get_a__impl__6msvu7(c2)) / 255 | 0);
};
Companion_8.prototype.w8k = function (src, dst, ratio) {
return Companion_getInstance_21().u8i(interpolate_0(ratio, _RGBA___get_r__impl__duz7mo(src), _RGBA___get_r__impl__duz7mo(dst)), interpolate_0(ratio, _RGBA___get_g__impl__o8pukr(src), _RGBA___get_g__impl__o8pukr(dst)), interpolate_0(ratio, _RGBA___get_b__impl__m6tl80(src), _RGBA___get_b__impl__m6tl80(dst)), interpolate_0(ratio, _RGBA___get_a__impl__6msvu7(src), _RGBA___get_a__impl__6msvu7(dst)));
};
Companion_8.$metadata$ = objectMeta('Companion', undefined, undefined, undefined, undefined, ColorFormat32.prototype);
var Companion_instance_8;
function Companion_getInstance_21() {
if (Companion_instance_8 == null)
new Companion_8();
return Companion_instance_8;
}
function RGBA__hashCode_impl_h59qf6($this) {
return $this;
}
function RGBA__equals_impl_4vjmca($this, other) {
if (!(other instanceof RGBA))
return false;
var tmp0_other_with_cast = other instanceof RGBA ? other.n8k_1 : THROW_CCE();
if (!($this === tmp0_other_with_cast))
return false;
return true;
}
function RGBA(value) {
Companion_getInstance_21();
this.n8k_1 = value;
}
RGBA.prototype.z4n = function () {
return RGBA__clone_impl_w007z0(this.n8k_1);
};
RGBA.prototype.toString = function () {
return RGBA__toString_impl_4lw6dp(this.n8k_1);
};
RGBA.prototype.h8l = function (other) {
return RGBA__compareTo_impl_lrfjc1(this.n8k_1, other);
};
RGBA.prototype.kc = function (other) {
return RGBA__compareTo_impl_lrfjc1_0(this, other);
};
RGBA.prototype.i8l = function (ratio, other) {
return RGBA__interpolateWith_impl_mw7p5y(this.n8k_1, ratio, other);
};
RGBA.prototype.d70 = function (ratio, other) {
return RGBA__interpolateWith_impl_mw7p5y_0(this, ratio, other);
};
RGBA.prototype.hashCode = function () {
return RGBA__hashCode_impl_h59qf6(this.n8k_1);
};
RGBA.prototype.equals = function (other) {
return RGBA__equals_impl_4vjmca(this.n8k_1, other);
};
RGBA.$metadata$ = classMeta('RGBA', [Comparable, Interpolable, Paint]);
function _RgbaArray___init__impl__oib4y4(ints) {
return ints;
}
function _RgbaArray___get_ints__impl__u2kps1($this) {
return $this;
}
function Companion_9() {
Companion_instance_9 = this;
}
Companion_9.prototype.m89 = function (size) {
return _RgbaArray___init__impl__oib4y4(new Int32Array(size));
};
Companion_9.$metadata$ = objectMeta('Companion');
var Companion_instance_9;
function Companion_getInstance_22() {
if (Companion_instance_9 == null)
new Companion_9();
return Companion_instance_9;
}
function RgbaArray__subList_impl_rbyi98($this, fromIndex, toIndex) {
return new GenericSubList(new RgbaArray($this), fromIndex, toIndex);
}
function RgbaArray__contains_impl_ofn00n($this, element) {
return contains(_RgbaArray___get_ints__impl__u2kps1($this), _RGBA___get_value__impl__hhco8v(element));
}
function RgbaArray__contains_impl_ofn00n_0($this, element) {
if (!(element instanceof RGBA))
return false;
var tmp = $this.j8l_1;
return RgbaArray__contains_impl_ofn00n(tmp, element instanceof RGBA ? element.n8k_1 : THROW_CCE());
}
function RgbaArray__containsAll_impl_l6gz5c($this, elements) {
var tmp$ret$0;
$l$block_0: {
// Inline function 'kotlin.collections.all' call
var tmp;
if (isInterface(elements, Collection)) {
tmp = elements.p();
} else {
tmp = false;
}
if (tmp) {
tmp$ret$0 = true;
break $l$block_0;
}
var tmp0_iterator = elements.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l().n8k_1;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.color.RgbaArray.containsAll.<anonymous>' call
tmp$ret$1 = RgbaArray__contains_impl_ofn00n($this, element);
if (!tmp$ret$1) {
tmp$ret$0 = false;
break $l$block_0;
}
}
tmp$ret$0 = true;
}
return tmp$ret$0;
}
function RgbaArray__containsAll_impl_l6gz5c_0($this, elements) {
return RgbaArray__containsAll_impl_l6gz5c($this.j8l_1, elements);
}
function RgbaArray__indexOf_impl_d6b5pl($this, element) {
return indexOf(_RgbaArray___get_ints__impl__u2kps1($this), _RGBA___get_value__impl__hhco8v(element));
}
function RgbaArray__indexOf_impl_d6b5pl_0($this, element) {
if (!(element instanceof RGBA))
return -1;
var tmp = $this.j8l_1;
return RgbaArray__indexOf_impl_d6b5pl(tmp, element instanceof RGBA ? element.n8k_1 : THROW_CCE());
}
function RgbaArray__isEmpty_impl_nch3ip($this) {
var tmp$ret$0;
// Inline function 'kotlin.collections.isEmpty' call
var tmp0_isEmpty = _RgbaArray___get_ints__impl__u2kps1($this);
tmp$ret$0 = tmp0_isEmpty.length === 0;
return tmp$ret$0;
}
function RgbaArray__iterator_impl_5wfwsm($this) {
return RgbaArray__listIterator_impl_m4kjt0($this, 0);
}
function RgbaArray__listIterator_impl_m4kjt0($this, index) {
return new GenericListIterator(new RgbaArray($this), index);
}
function _RgbaArray___get_size__impl__imxef8($this) {
return _RgbaArray___get_ints__impl__u2kps1($this).length;
}
function RgbaArray__get_impl_nzyo1o($this, index) {
return _RGBA___init__impl__lqpay5(_RgbaArray___get_ints__impl__u2kps1($this)[index]);
}
function RgbaArray__get_impl_nzyo1o_0($this, index) {
return new RGBA(RgbaArray__get_impl_nzyo1o($this.j8l_1, index));
}
function RgbaArray__set_impl_epw2wg($this, index, color) {
_RgbaArray___get_ints__impl__u2kps1($this)[index] = _RGBA___get_value__impl__hhco8v(color);
}
function RgbaArray__toString_impl_vgvk04($this) {
return 'RgbaArray(' + _RgbaArray___get_size__impl__imxef8($this) + ')';
}
function RgbaArray__hashCode_impl_ht2l65($this) {
return hashCode($this);
}
function RgbaArray__equals_impl_6qvuf($this, other) {
if (!(other instanceof RgbaArray))
return false;
var tmp0_other_with_cast = other instanceof RgbaArray ? other.j8l_1 : THROW_CCE();
if (!equals($this, tmp0_other_with_cast))
return false;
return true;
}
function RgbaArray(ints) {
Companion_getInstance_22();
this.j8l_1 = ints;
}
RgbaArray.prototype.x = function (fromIndex, toIndex) {
return RgbaArray__subList_impl_rbyi98(this.j8l_1, fromIndex, toIndex);
};
RgbaArray.prototype.k8l = function (element) {
return RgbaArray__contains_impl_ofn00n(this.j8l_1, element);
};
RgbaArray.prototype.r = function (element) {
return RgbaArray__contains_impl_ofn00n_0(this, element);
};
RgbaArray.prototype.l8l = function (elements) {
return RgbaArray__containsAll_impl_l6gz5c(this.j8l_1, elements);
};
RgbaArray.prototype.l2 = function (elements) {
return RgbaArray__containsAll_impl_l6gz5c_0(this, elements);
};
RgbaArray.prototype.m8l = function (element) {
return RgbaArray__indexOf_impl_d6b5pl(this.j8l_1, element);
};
RgbaArray.prototype.y = function (element) {
return RgbaArray__indexOf_impl_d6b5pl_0(this, element);
};
RgbaArray.prototype.p = function () {
return RgbaArray__isEmpty_impl_nch3ip(this.j8l_1);
};
RgbaArray.prototype.j = function () {
return RgbaArray__iterator_impl_5wfwsm(this.j8l_1);
};
RgbaArray.prototype.n = function (index) {
return RgbaArray__listIterator_impl_m4kjt0(this.j8l_1, index);
};
RgbaArray.prototype.i = function () {
return _RgbaArray___get_size__impl__imxef8(this.j8l_1);
};
RgbaArray.prototype.n8l = function (index) {
return RgbaArray__get_impl_nzyo1o(this.j8l_1, index);
};
RgbaArray.prototype.m = function (index) {
return RgbaArray__get_impl_nzyo1o_0(this, index);
};
RgbaArray.prototype.toString = function () {
return RgbaArray__toString_impl_vgvk04(this.j8l_1);
};
RgbaArray.prototype.hashCode = function () {
return RgbaArray__hashCode_impl_ht2l65(this.j8l_1);
};
RgbaArray.prototype.equals = function (other) {
return RgbaArray__equals_impl_6qvuf(this.j8l_1, other);
};
RgbaArray.$metadata$ = classMeta('RgbaArray', [List]);
function _RgbaPremultipliedArray___init__impl__lx83hy(ints) {
return ints;
}
function _RgbaPremultipliedArray___get_ints__impl__i1gpd7($this) {
return $this;
}
function Companion_10() {
Companion_instance_10 = this;
}
Companion_10.prototype.o8l = function (size) {
return _RgbaPremultipliedArray___init__impl__lx83hy(new Int32Array(size));
};
Companion_10.$metadata$ = objectMeta('Companion');
var Companion_instance_10;
function Companion_getInstance_23() {
if (Companion_instance_10 == null)
new Companion_10();
return Companion_instance_10;
}
function _RgbaPremultipliedArray___get_size__impl__6lte0e($this) {
return _RgbaPremultipliedArray___get_ints__impl__i1gpd7($this).length;
}
function RgbaPremultipliedArray__get_impl_1u69ta($this, index) {
return _RGBAPremultiplied___init__impl__uos02x(_RgbaPremultipliedArray___get_ints__impl__i1gpd7($this)[index]);
}
function RgbaPremultipliedArray__set_impl_7fwbby($this, index, color) {
_RgbaPremultipliedArray___get_ints__impl__i1gpd7($this)[index] = _RGBAPremultiplied___get_value__impl__bqfhud(color);
}
function RgbaPremultipliedArray__fill_impl_sem38t($this, value, start, end) {
return fill(_RgbaPremultipliedArray___get_ints__impl__i1gpd7($this), _RGBAPremultiplied___get_value__impl__bqfhud(value), start, end);
}
function RgbaPremultipliedArray__toString_impl_seal6e($this) {
return 'RgbaPremultipliedArray(' + _RgbaPremultipliedArray___get_size__impl__6lte0e($this) + ')';
}
function RgbaPremultipliedArray__hashCode_impl_kvnjzv($this) {
return hashCode($this);
}
function RgbaPremultipliedArray__equals_impl_vav5d5($this, other) {
if (!(other instanceof RgbaPremultipliedArray))
return false;
var tmp0_other_with_cast = other instanceof RgbaPremultipliedArray ? other.p8l_1 : THROW_CCE();
if (!equals($this, tmp0_other_with_cast))
return false;
return true;
}
function RgbaPremultipliedArray(ints) {
Companion_getInstance_23();
this.p8l_1 = ints;
}
RgbaPremultipliedArray.prototype.toString = function () {
return RgbaPremultipliedArray__toString_impl_seal6e(this.p8l_1);
};
RgbaPremultipliedArray.prototype.hashCode = function () {
return RgbaPremultipliedArray__hashCode_impl_kvnjzv(this.p8l_1);
};
RgbaPremultipliedArray.prototype.equals = function (other) {
return RgbaPremultipliedArray__equals_impl_vav5d5(this.p8l_1, other);
};
RgbaPremultipliedArray.$metadata$ = classMeta('RgbaPremultipliedArray');
function premultiply(src, srcN, dst, dstN, count) {
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
RgbaPremultipliedArray__set_impl_7fwbby(dst, dstN + n | 0, _RGBA___get_premultiplied__impl__3bulqc(RgbaArray__get_impl_nzyo1o(src, srcN + n | 0)));
}
while (inductionVariable < count);
}
function depremultiply(src, srcN, dst, dstN, count) {
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
RgbaArray__set_impl_epw2wg(dst, dstN + n | 0, _RGBAPremultiplied___get_depremultiplied__impl__q1zu93(RgbaPremultipliedArray__get_impl_1u69ta(src, srcN + n | 0)));
}
while (inductionVariable < count);
}
function mix(_this__u8e3s4, src) {
var dst = _this__u8e3s4;
var srcAf = _RGBAPremultiplied___get_af__impl__euwcjn(src);
var oneMSrcAf = 1.0 - srcAf;
var outA = numberToInt(_RGBAPremultiplied___get_a__impl__f0hnd1(src) + _RGBAPremultiplied___get_a__impl__f0hnd1(dst) * oneMSrcAf);
var outR = numberToInt(_RGBAPremultiplied___get_r__impl__m8nz5i(src) + _RGBAPremultiplied___get_r__impl__m8nz5i(dst) * oneMSrcAf);
var outG = numberToInt(_RGBAPremultiplied___get_g__impl__fv131x(src) + _RGBAPremultiplied___get_g__impl__fv131x(dst) * oneMSrcAf);
var outB = numberToInt(_RGBAPremultiplied___get_b__impl__dt4tp6(src) + _RGBAPremultiplied___get_b__impl__dt4tp6(dst) * oneMSrcAf);
return _RGBAPremultiplied___init__impl__uos02x_0(outR, outG, outB, outA);
}
function mix_0(dst, dstX, src, srcX, count) {
return mix_1(dst, dstX, dst, dstX, src, srcX, count);
}
function mix_1(tgt, tgtX, dst, dstX, src, srcX, count) {
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var srcC = RgbaPremultipliedArray__get_impl_1u69ta(src, srcX + n | 0);
RgbaPremultipliedArray__set_impl_7fwbby(tgt, tgtX + n | 0, _RGBAPremultiplied___get_a__impl__f0hnd1(srcC) === 255 ? srcC : Companion_getInstance_20().v8k(RgbaPremultipliedArray__get_impl_1u69ta(dst, dstX + n | 0), srcC));
}
while (inductionVariable < count);
}
function scale(color, colorOffset, alpha, alphaOffset, count) {
var inductionVariable = 0;
if (inductionVariable < count)
$l$loop: do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var a = clamp01(alpha[alphaOffset + n | 0]);
if (a === 1.0)
continue $l$loop;
RgbaPremultipliedArray__set_impl_7fwbby(color, colorOffset + n | 0, RGBAPremultiplied__scaled_impl_qz7lg1(RgbaPremultipliedArray__get_impl_1u69ta(color, colorOffset + n | 0), a));
}
while (inductionVariable < count);
}
function mix_2(_this__u8e3s4, other, ratio) {
return Companion_getInstance_21().e8l(_this__u8e3s4, other, ratio);
}
function _RGBAf___get_data__impl__yt2t4($this) {
return $this;
}
function RGBAf() {
}
RGBAf.$metadata$ = classMeta('RGBAf');
function writeFloat(_this__u8e3s4, out, index) {
out[index + 0 | 0] = _RGBA___get_rf__impl__kvz75k(_this__u8e3s4);
out[index + 1 | 0] = _RGBA___get_gf__impl__5gcu1f(_this__u8e3s4);
out[index + 2 | 0] = _RGBA___get_bf__impl__1xz5yg(_this__u8e3s4);
out[index + 3 | 0] = _RGBA___get_af__impl__vu36qv(_this__u8e3s4);
}
function writeFloat$default(_this__u8e3s4, out, index, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
index = 0;
return writeFloat(_this__u8e3s4, out, index);
}
function toVector3D(_this__u8e3s4, out) {
return out.c7e(_RGBA___get_rf__impl__kvz75k(_this__u8e3s4), _RGBA___get_gf__impl__5gcu1f(_this__u8e3s4), _RGBA___get_bf__impl__1xz5yg(_this__u8e3s4), _RGBA___get_af__impl__vu36qv(_this__u8e3s4));
}
function toVector3D$default(_this__u8e3s4, out, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
out = new Vector3D();
return toVector3D(_this__u8e3s4, out);
}
function Companion_11() {
Companion_instance_11 = this;
}
Companion_11.prototype.q8l = function (f, s) {
return insert(insert(0, f, 0, 16), s, 16, 16);
};
Companion_11.$metadata$ = objectMeta('Companion');
var Companion_instance_11;
function Companion_getInstance_24() {
if (Companion_instance_11 == null)
new Companion_11();
return Companion_instance_11;
}
function BitmapFont$Glyph$bmp$delegate$lambda(this$0) {
return function () {
return this$0.t8l_1.l8b().d86();
};
}
function BitmapFont_init_$Init$(fontSize, lineHeight, base, glyphs, kernings, atlas, name, $mask0, $marker, $this) {
if (!(($mask0 & 32) === 0)) {
var tmp0_safe_receiver = glyphs.lh().j().l();
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t8l_1;
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y7x_1;
var tmp;
if (tmp2_elvis_lhs == null) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
tmp$ret$0_0 = Unit_getInstance();
tmp = tmp$ret$0.y7x_1;
} else {
tmp = tmp2_elvis_lhs;
}
atlas = tmp;
}
if (!(($mask0 & 64) === 0))
name = 'BitmapFont';
BitmapFont.call($this, fontSize, lineHeight, base, glyphs, kernings, atlas, name);
return $this;
}
function BitmapFont_init_$Create$(fontSize, lineHeight, base, glyphs, kernings, atlas, name, $mask0, $marker) {
return BitmapFont_init_$Init$(fontSize, lineHeight, base, glyphs, kernings, atlas, name, $mask0, $marker, Object.create(BitmapFont.prototype));
}
function _get_naturalFontMetrics__a6ykyo($this) {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = naturalFontMetrics$factory();
tmp$ret$0 = $this.h8m_1.l1();
return tmp$ret$0;
}
function getTextScale($this, size) {
return size / $this.z8l_1;
}
function Kerning(first, second, amount) {
Companion_getInstance_24();
this.m8m_1 = first;
this.n8m_1 = second;
this.o8m_1 = amount;
}
Kerning.$metadata$ = classMeta('Kerning');
function Glyph(fontSize, id, texture, xoffset, yoffset, xadvance) {
this.r8l_1 = fontSize;
this.s8l_1 = id;
this.t8l_1 = texture;
this.u8l_1 = xoffset;
this.v8l_1 = yoffset;
this.w8l_1 = xadvance;
var tmp = this;
tmp.x8l_1 = lazy(BitmapFont$Glyph$bmp$delegate$lambda(this));
this.y8l_1 = new GlyphMetrics(this.r8l_1, true, -1, Companion_getInstance_0().k7c(this.u8l_1, this.v8l_1, this.t8l_1.d72(), this.t8l_1.e72()), this.w8l_1);
}
Glyph.prototype.p8m = function () {
return this.t8l_1;
};
Glyph.prototype.k8b = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = bmp$factory();
tmp$ret$0 = this.x8l_1.l1();
return tmp$ret$0;
};
Glyph.prototype.toString = function () {
return 'Glyph(fontSize=' + this.r8l_1 + ', id=' + this.s8l_1 + ', texture=' + this.t8l_1 + ', xoffset=' + this.u8l_1 + ', yoffset=' + this.v8l_1 + ', xadvance=' + this.w8l_1 + ')';
};
Glyph.prototype.hashCode = function () {
var result = getNumberHashCode(this.r8l_1);
result = imul(result, 31) + this.s8l_1 | 0;
result = imul(result, 31) + hashCode(this.t8l_1) | 0;
result = imul(result, 31) + this.u8l_1 | 0;
result = imul(result, 31) + this.v8l_1 | 0;
result = imul(result, 31) + this.w8l_1 | 0;
return result;
};
Glyph.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof Glyph))
return false;
var tmp0_other_with_cast = other instanceof Glyph ? other : THROW_CCE();
if (!equals(this.r8l_1, tmp0_other_with_cast.r8l_1))
return false;
if (!(this.s8l_1 === tmp0_other_with_cast.s8l_1))
return false;
if (!equals(this.t8l_1, tmp0_other_with_cast.t8l_1))
return false;
if (!(this.u8l_1 === tmp0_other_with_cast.u8l_1))
return false;
if (!(this.v8l_1 === tmp0_other_with_cast.v8l_1))
return false;
if (!(this.w8l_1 === tmp0_other_with_cast.w8l_1))
return false;
return true;
};
Glyph.$metadata$ = classMeta('Glyph');
function Companion_12() {
Companion_instance_12 = this;
}
Companion_12.$metadata$ = objectMeta('Companion');
var Companion_instance_12;
function Companion_getInstance_25() {
if (Companion_instance_12 == null)
new Companion_12();
return Companion_instance_12;
}
function BitmapFont$naturalFontMetrics$delegate$lambda(this$0) {
return function () {
var ascent = this$0.b8m_1;
var baseline = 0.0;
var descent = this$0.a8m_1 - this$0.b8m_1;
var tmp = -descent;
var tmp_0 = -descent;
var tmp$ret$2;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BitmapFont.naturalFontMetrics$delegate.<anonymous>.<anonymous>' call
var width = 0.0;
var tmp0_iterator = this$0.c8m_1.lh().j();
while (tmp0_iterator.k()) {
var glyph = tmp0_iterator.l();
if (!(glyph == null)) {
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = width;
var tmp1_max = glyph.t8l_1.d72();
tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
width = tmp$ret$0;
}
}
tmp$ret$1 = width;
tmp$ret$2 = tmp$ret$1;
return new FontMetrics(this$0.z8l_1, ascent, ascent, baseline, tmp, tmp_0, 0.0, tmp$ret$2);
};
}
function BitmapFont$dummyGlyph$delegate$lambda(this$0) {
return function () {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
return new Glyph(this$0.z8l_1, -1, tmp$ret$0, 0, 0, 0);
};
}
function BitmapFont$anyGlyph$delegate$lambda(this$0) {
return function () {
var tmp0_elvis_lhs = this$0.c8m_1.m(this$0.c8m_1.v3().j().l());
return tmp0_elvis_lhs == null ? this$0.q8m() : tmp0_elvis_lhs;
};
}
function BitmapFont$baseBmp$delegate$lambda(this$0) {
return function () {
return this$0.r8m().t8l_1.y7x_1;
};
}
function BitmapFont(fontSize, lineHeight, base, glyphs, kernings, atlas, name) {
Companion_getInstance_25();
this.z8l_1 = fontSize;
this.a8m_1 = lineHeight;
this.b8m_1 = base;
this.c8m_1 = glyphs;
this.d8m_1 = kernings;
this.e8m_1 = atlas;
this.f8m_1 = name;
var tmp = this;
tmp.g8m_1 = Mixin_init_$Create$(null, 1, null);
var tmp_0 = this;
tmp_0.h8m_1 = lazy(BitmapFont$naturalFontMetrics$delegate$lambda(this));
this.i8m_1 = new GlyphMetrics(this.z8l_1, false, 0, Companion_getInstance_0().zp(), 0.0);
var tmp_1 = this;
tmp_1.j8m_1 = lazy(BitmapFont$dummyGlyph$delegate$lambda(this));
var tmp_2 = this;
tmp_2.k8m_1 = lazy(BitmapFont$anyGlyph$delegate$lambda(this));
var tmp_3 = this;
tmp_3.l8m_1 = lazy(BitmapFont$baseBmp$delegate$lambda(this));
}
BitmapFont.prototype.s8m = function () {
return this.c8m_1;
};
BitmapFont.prototype.t2 = function () {
return this.f8m_1;
};
BitmapFont.prototype.e4v = function (_set____db54di) {
this.g8m_1.e4v(_set____db54di);
};
BitmapFont.prototype.f4v = function () {
return this.g8m_1.f4v();
};
BitmapFont.prototype.b65 = function () {
return this;
};
BitmapFont.prototype.t8m = function (size, metrics) {
return metrics.c8n(_get_naturalFontMetrics__a6ykyo(this), size);
};
BitmapFont.prototype.e8n = function (size, codePoint, metrics, reader) {
var tmp0_safe_receiver = this.c8m_1.m(codePoint);
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y8l_1;
return metrics.k8n(tmp1_elvis_lhs == null ? this.i8m_1 : tmp1_elvis_lhs, size, codePoint);
};
BitmapFont.prototype.l8n = function (size, leftCodePoint, rightCodePoint) {
var tmp = getTextScale(this, size);
var tmp0_safe_receiver = this.m8n(leftCodePoint, rightCodePoint);
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o8m_1;
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
return tmp * (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
};
BitmapFont.prototype.n8n = function (ctx, size, codePoint, x, y, fill, metrics, reader, beforeDraw) {
var scale = getTextScale(this, size);
var tmp0_elvis_lhs = this.c8m_1.m(codePoint);
var tmp;
if (tmp0_elvis_lhs == null) {
return false;
} else {
tmp = tmp0_elvis_lhs;
}
var g = tmp;
var tmp$ret$1;
// Inline function 'kotlin.takeIf' call
var tmp0_takeIf = this.e8n(size, codePoint, metrics, reader);
// Inline function 'kotlin.contracts.contract' call
var tmp_0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BitmapFont.renderGlyph.<anonymous>' call
tmp$ret$0 = tmp0_takeIf.g8n_1;
if (tmp$ret$0) {
tmp_0 = tmp0_takeIf;
} else {
tmp_0 = null;
}
tmp$ret$1 = tmp_0;
var tmp1_elvis_lhs = tmp$ret$1;
if (tmp1_elvis_lhs == null)
return false;
else
tmp1_elvis_lhs;
if (metrics.d72() === 0.0 ? metrics.e72() === 0.0 : false)
return false;
var texX = x + metrics.b74();
var texY = y + metrics.y73();
var swidth = metrics.d72();
var sheight = metrics.e72();
var tmp_1;
if (equals(ctx.k8o(), new RGBA(get_DefaultPaint()))) {
tmp_1 = g.k8b();
} else {
var tmp$ret$4;
// Inline function 'com.soywiz.korim.bitmap.context2d' call
var tmp_2 = g.k8b().d72();
var tmp_3 = g.k8b().e72();
var tmp1_context2d = Bitmap32_init_$Create$(tmp_2, tmp_3, null, true, 4, null);
var tmp$ret$3;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
tmp1_context2d.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx_0 = tmp1_context2d.b86(true);
try {
// Inline function 'com.soywiz.korim.font.BitmapFont.renderGlyph.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Context2d.keepTransform' call
var t = ctx_0.a87_1.o8n_1;
var a = t.i74_1;
var b = t.j74_1;
var c = t.k74_1;
var d = t.l74_1;
var tx = t.m74_1;
var ty = t.n74_1;
try {
// Inline function 'com.soywiz.korim.font.BitmapFont.renderGlyph.<anonymous>.<anonymous>' call
var tmp_4 = 1.0 / scale;
ctx_0.j8o(tmp_4, 0.0, 2, null);
ctx_0.l8o(ctx.k8o());
var tmp$ret$2;
// Inline function 'com.soywiz.korim.vector.Context2d.fillRect' call
var tmp0_fillRect = ctx_0.d72() * scale;
var tmp1_fillRect = ctx_0.e72() * scale;
ctx_0.m8o(0.0, 0.0, numberToDouble(tmp0_fillRect), numberToDouble(tmp1_fillRect));
tmp$ret$2 = Unit_getInstance();
}finally {
t.e76(a, b, c, d, tx, ty);
}
}finally {
ctx_0.s1x();
}
}finally {
tmp$ret$3 = tmp1_context2d.k7z(null);
break $l$block;
}
}
tmp$ret$4 = tmp1_context2d;
var bmpFill = tmp$ret$4;
bmpFill.f89(BitmapChannel_ALPHA_getInstance(), g.k8b(), BitmapChannel_ALPHA_getInstance());
tmp_1 = bmpFill;
}
var bmp = tmp_1;
var tmp2_safe_receiver = beforeDraw;
if (tmp2_safe_receiver == null)
null;
else
tmp2_safe_receiver();
ctx.n8o(bmp, texX, texY - metrics.e72(), swidth, sheight);
return true;
};
BitmapFont.prototype.m8n = function (first, second) {
return this.d8m_1.m(Companion_getInstance_24().q8l(first, second));
};
BitmapFont.prototype.q8m = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = dummyGlyph$factory();
tmp$ret$0 = this.j8m_1.l1();
return tmp$ret$0;
};
BitmapFont.prototype.r8m = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = anyGlyph$factory();
tmp$ret$0 = this.k8m_1.l1();
return tmp$ret$0;
};
BitmapFont.prototype.o8o = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = baseBmp$factory();
tmp$ret$0 = this.l8m_1.l1();
return tmp$ret$0;
};
BitmapFont.prototype.m = function (charCode) {
var tmp0_elvis_lhs = this.c8m_1.m(charCode);
var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? this.c8m_1.m(32) : tmp0_elvis_lhs;
return tmp1_elvis_lhs == null ? this.q8m() : tmp1_elvis_lhs;
};
BitmapFont.$metadata$ = classMeta('BitmapFont', [Font, Extra]);
function readBitmapFont(_this__u8e3s4, props, mipmaps, atlas, $cont) {
var tmp = new $readBitmapFontCOROUTINE$1(_this__u8e3s4, props, mipmaps, atlas, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readBitmapFont$default(_this__u8e3s4, props, mipmaps, atlas, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
props = Companion_getInstance_35().g8i_1;
if (!(($mask0 & 2) === 0))
mipmaps = true;
if (!(($mask0 & 4) === 0))
atlas = null;
return readBitmapFont(_this__u8e3s4, props, mipmaps, atlas, $cont);
}
function readBitmapFontXml(content, fntFile, textures, props, mipmaps, atlas, $cont) {
var tmp = new $readBitmapFontXmlCOROUTINE$2(content, fntFile, textures, props, mipmaps, atlas, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readBitmapFontTxt(content, fntFile, textures, props, mipmaps, atlas, $cont) {
var tmp = new $readBitmapFontTxtCOROUTINE$3(content, fntFile, textures, props, mipmaps, atlas, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readBitmapFontTxt$lambda(_anonymous_parameter_0__qggqh8, it) {
return Companion_getInstance_24().q8l(it.m8m_1, it.n8m_1);
}
function $readBitmapFontCOROUTINE$1(_this__u8e3s4, props, mipmaps, atlas, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.x8o_1 = _this__u8e3s4;
this.y8o_1 = props;
this.z8o_1 = mipmaps;
this.a8p_1 = atlas;
}
$readBitmapFontCOROUTINE$1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 5;
this.b8p_1 = this.x8o_1;
this.o7_1 = 1;
suspendResult = this.b8p_1.k5n(null, this, 1, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.c8p_1 = suspendResult;
var tmp_0 = this;
var tmp_1 = this.c8p_1;
tmp_0.d8p_1 = toString(trim(isCharSequence(tmp_1) ? tmp_1 : THROW_CCE()));
var tmp_2 = this;
tmp_2.e8p_1 = HashMap_init_$Create$();
var tmp_3 = _Char___init__impl__6a9atx(60);
if (startsWith$default_0(this.d8p_1, tmp_3, false, 2, null)) {
this.o7_1 = 3;
suspendResult = readBitmapFontXml(this.d8p_1, this.b8p_1, this.e8p_1, this.y8o_1, this.z8o_1, this.a8p_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
if (startsWith$default(this.d8p_1, 'info', false, 2, null)) {
this.o7_1 = 2;
suspendResult = readBitmapFontTxt(this.d8p_1, this.b8p_1, this.e8p_1, this.y8o_1, this.z8o_1, this.a8p_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
var tmp_4 = this;
var tmp1_TODO = 'Unsupported font type starting with ' + substr_0(this.d8p_1, 0, 16);
throw new NotImplementedError('An operation is not implemented: ' + tmp1_TODO);
}
}
break;
case 2:
this.f8p_1 = suspendResult;
this.o7_1 = 4;
continue $sm;
case 3:
this.f8p_1 = suspendResult;
this.o7_1 = 4;
continue $sm;
case 4:
return this.f8p_1;
case 5:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 5) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$readBitmapFontCOROUTINE$1.$metadata$ = classMeta('$readBitmapFontCOROUTINE$1', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $readBitmapFontXmlCOROUTINE$2(content, fntFile, textures, props, mipmaps, atlas, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.o8p_1 = content;
this.p8p_1 = fntFile;
this.q8p_1 = textures;
this.r8p_1 = props;
this.s8p_1 = mipmaps;
this.t8p_1 = atlas;
}
$readBitmapFontXmlCOROUTINE$2.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.u8p_1 = Xml(this.o8p_1);
var tmp_0 = this;
var tmp0_safe_receiver = firstOrNull(this.u8p_1.c19('info'));
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l68('size', 16.0);
tmp_0.v8p_1 = tmp1_elvis_lhs == null ? 16.0 : tmp1_elvis_lhs;
var tmp_1 = this;
var tmp2_safe_receiver = firstOrNull(this.u8p_1.c19('common'));
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l68('lineHeight', 16.0);
tmp_1.w8p_1 = tmp3_elvis_lhs == null ? 16.0 : tmp3_elvis_lhs;
var tmp_2 = this;
var tmp4_safe_receiver = firstOrNull(this.u8p_1.c19('common'));
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.l68('base', 16.0);
tmp_2.x8p_1 = tmp5_elvis_lhs == null ? 16.0 : tmp5_elvis_lhs;
this.y8p_1 = get(this.u8p_1.c19('pages'), 'page').j();
this.o7_1 = 1;
continue $sm;
case 1:
if (!this.y8p_1.k()) {
this.o7_1 = 3;
continue $sm;
}
this.z8p_1 = this.y8p_1.l();
var tmp_3 = this;
tmp_3.a8q_1 = this.z8p_1.n68('id', 0, 2, null);
var tmp_4 = this;
tmp_4.b8q_1 = this.z8p_1.p68('file', null, 2, null);
this.c8q_1 = this.p8p_1.e5n().c19(this.b8q_1);
this.o7_1 = 2;
suspendResult = readBitmap_1(this.c8q_1, this.r8p_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
var ARGUMENT = suspendResult;
var ARGUMENT_0 = mipmaps(ARGUMENT, this.s8p_1);
var tex = slice$default(ARGUMENT_0, null, null, null, 7, null);
this.q8p_1.a(this.a8q_1, tex);
;
this.o7_1 = 1;
continue $sm;
case 3:
var tmp0_map = get(this.u8p_1.c19('chars'), 'char');
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator = tmp0_map.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var page = item.n68('page', 0, 2, null);
var tmp0_elvis_lhs = this.q8p_1.q(page);
var texture = tmp0_elvis_lhs == null ? first(this.q8p_1.lh()) : tmp0_elvis_lhs;
var tmp_5 = item.n68('id', 0, 2, null);
var tmp1_safe_receiver = this.t8p_1;
var tmp_6;
if (tmp1_safe_receiver == null) {
tmp_6 = null;
} else {
var tmp_7 = item.n68('x', 0, 2, null);
var tmp_8 = item.n68('y', 0, 2, null);
var tmp_9 = item.n68('width', 0, 2, null);
var tmp_10 = item.n68('height', 0, 2, null);
var tmp_11 = texture.r8b(tmp_7, tmp_8, tmp_9, tmp_10, null, null, 48, null);
var tmp_12 = tmp_11 instanceof BmpSlice ? tmp_11 : THROW_CCE();
tmp_6 = tmp1_safe_receiver.c8r(tmp_12, Unit_getInstance(), null, 4, null);
}
var tmp2_safe_receiver_0 = tmp_6;
var tmp3_elvis_lhs_0 = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.m7x_1;
var tmp_13;
if (tmp3_elvis_lhs_0 == null) {
var tmp_14 = item.n68('x', 0, 2, null);
var tmp_15 = item.n68('y', 0, 2, null);
var tmp_16 = item.n68('width', 0, 2, null);
var tmp_17 = item.n68('height', 0, 2, null);
tmp_13 = texture.r8b(tmp_14, tmp_15, tmp_16, tmp_17, null, null, 48, null);
} else {
tmp_13 = tmp3_elvis_lhs_0;
}
var tmp_18 = tmp_13;
var tmp_19 = item.n68('xoffset', 0, 2, null);
var tmp_20 = item.n68('yoffset', 0, 2, null);
tmp0_mapTo.c(new Glyph(this.v8p_1, tmp_5, tmp_18, tmp_19, tmp_20, item.n68('xadvance', 0, 2, null)));
}
var glyphs = tmp0_mapTo;
var tmp1_map = get(this.u8p_1.c19('kernings'), 'kerning');
var tmp0_mapTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp1_map, 10));
var tmp0_iterator_0 = tmp1_map.j();
while (tmp0_iterator_0.k()) {
var item_0 = tmp0_iterator_0.l();
var tmp_21 = item_0.n68('first', 0, 2, null);
var tmp_22 = item_0.n68('second', 0, 2, null);
tmp0_mapTo_0.c(new Kerning(tmp_21, tmp_22, item_0.n68('amount', 0, 2, null)));
}
var kernings = tmp0_mapTo_0;
var tmp7_safe_receiver = this.t8p_1;
var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.t7x_1;
var tmp9_atlas = tmp8_elvis_lhs == null ? first(this.q8p_1.lh()).y7x_1 : tmp8_elvis_lhs;
var tmp0_mapTo_1 = ArrayList_init_$Create$(collectionSizeOrDefault(glyphs, 10));
var tmp0_iterator_1 = glyphs.j();
while (tmp0_iterator_1.k()) {
var item_1 = tmp0_iterator_1.l();
tmp0_mapTo_1.c(to(item_1.s8l_1, item_1));
}
var tmp10_glyphs = toIntMap(toMap(tmp0_mapTo_1));
var tmp0_mapTo_2 = ArrayList_init_$Create$(collectionSizeOrDefault(kernings, 10));
var tmp0_iterator_2 = kernings.j();
while (tmp0_iterator_2.k()) {
var item_2 = tmp0_iterator_2.l();
tmp0_mapTo_2.c(to(Companion_getInstance_24().q8l(item_2.m8m_1, item_2.n8m_1), item_2));
}
var tmp11_kernings = toIntMap(toMap(tmp0_mapTo_2));
return BitmapFont_init_$Create$(this.v8p_1, this.w8p_1, this.x8p_1, tmp10_glyphs, tmp11_kernings, tmp9_atlas, null, 64, null);
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);
};
$readBitmapFontXmlCOROUTINE$2.$metadata$ = classMeta('$readBitmapFontXmlCOROUTINE$2', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $readBitmapFontTxtCOROUTINE$3(content, fntFile, textures, props, mipmaps, atlas, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.l8q_1 = content;
this.m8q_1 = fntFile;
this.n8q_1 = textures;
this.o8q_1 = props;
this.p8q_1 = mipmaps;
this.q8q_1 = atlas;
}
$readBitmapFontTxtCOROUTINE$3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 5;
var tmp_0 = this;
tmp_0.r8q_1 = ArrayList_init_$Create$_0();
var tmp_1 = this;
tmp_1.s8q_1 = ArrayList_init_$Create$_0();
this.t8q_1 = 16.0;
this.u8q_1 = 16.0;
this.v8q_1 = null;
this.w8q_1 = lines(this.l8q_1).j();
this.o7_1 = 1;
continue $sm;
case 1:
if (!this.w8q_1.k()) {
this.o7_1 = 4;
continue $sm;
}
this.x8q_1 = this.w8q_1.l();
var tmp_2 = this;
var tmp_3 = this.x8q_1;
tmp_2.y8q_1 = toString(trim(isCharSequence(tmp_3) ? tmp_3 : THROW_CCE()));
this.z8q_1 = LinkedHashMap_init_$Create$();
var tmp_4 = charArrayOf([_Char___init__impl__6a9atx(32)]);
var tmp1_iterator = split$default_0(this.y8q_1, tmp_4, false, 0, 6, null).j();
while (tmp1_iterator.k()) {
var part = tmp1_iterator.l();
var tmp_5 = charArrayOf([_Char___init__impl__6a9atx(61)]);
var tmp2_container = plus(split$default_0(part, tmp_5, false, 0, 6, null), listOf(['', '']));
var key = tmp2_container.m(0);
var value = tmp2_container.m(1);
this.z8q_1.a(key, value);
}
if (startsWith$default(this.y8q_1, 'info', false, 2, null)) {
var tmp_6 = this;
var tmp3_safe_receiver = this.z8q_1.q('size');
var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : toDouble(tmp3_safe_receiver);
tmp_6.u8q_1 = tmp4_elvis_lhs == null ? 16.0 : tmp4_elvis_lhs;
this.o7_1 = 3;
continue $sm;
} else {
if (startsWith$default(this.y8q_1, 'page', false, 2, null)) {
var tmp_7 = this;
var tmp5_safe_receiver = this.z8q_1.q('id');
var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : toInt_0(tmp5_safe_receiver);
tmp_7.a8r_1 = tmp6_elvis_lhs == null ? 0 : tmp6_elvis_lhs;
var tmp_8 = this;
var tmp7_safe_receiver = this.z8q_1.q('file');
var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : unquote(tmp7_safe_receiver);
var tmp_9;
if (tmp8_elvis_lhs == null) {
throw IllegalStateException_init_$Create$('page without file');
} else {
tmp_9 = tmp8_elvis_lhs;
}
tmp_8.b8r_1 = tmp_9;
this.o7_1 = 2;
suspendResult = readBitmap_1(this.m8q_1.e5n().c19(this.b8r_1), this.o8q_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
if (startsWith$default(this.y8q_1, 'common ', false, 2, null)) {
var tmp_10 = this;
var tmp9_safe_receiver = this.z8q_1.q('lineHeight');
var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : toDoubleOrNull(tmp9_safe_receiver);
tmp_10.t8q_1 = tmp10_elvis_lhs == null ? 16.0 : tmp10_elvis_lhs;
var tmp_11 = this;
var tmp11_safe_receiver = this.z8q_1.q('base');
tmp_11.v8q_1 = tmp11_safe_receiver == null ? null : toDoubleOrNull(tmp11_safe_receiver);
this.o7_1 = 3;
continue $sm;
} else {
if (startsWith$default(this.y8q_1, 'char ', false, 2, null)) {
var tmp12_safe_receiver = this.z8q_1.q('page');
var tmp13_elvis_lhs = tmp12_safe_receiver == null ? null : toIntOrNull(tmp12_safe_receiver);
var page = tmp13_elvis_lhs == null ? 0 : tmp13_elvis_lhs;
var tmp14_elvis_lhs = this.n8q_1.q(page);
var texture = tmp14_elvis_lhs == null ? first(this.n8q_1.lh()) : tmp14_elvis_lhs;
var dmap = get_dyn(this.z8q_1);
var id = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'id'));
var tmp18_fontSize = this.u8q_1;
var tmp19_xoffset = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'xoffset'));
var tmp20_yoffset = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'yoffset'));
var tmp21_xadvance = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'xadvance'));
var tmp15_safe_receiver = this.q8q_1;
var tmp_12;
if (tmp15_safe_receiver == null) {
tmp_12 = null;
} else {
var tmp_13 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'x'));
var tmp_14 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'y'));
var tmp_15 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'width'));
var tmp_16 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'height'));
var tmp_17 = 'glyph-' + new Char(numberToChar(id));
var tmp_18 = texture.r8b(tmp_13, tmp_14, tmp_15, tmp_16, tmp_17, null, 32, null);
var tmp_19 = tmp_18 instanceof BmpSlice ? tmp_18 : THROW_CCE();
tmp_12 = tmp15_safe_receiver.c8r(tmp_19, Unit_getInstance(), null, 4, null);
}
var tmp16_safe_receiver = tmp_12;
var tmp17_elvis_lhs = tmp16_safe_receiver == null ? null : tmp16_safe_receiver.m7x_1;
var tmp_20;
if (tmp17_elvis_lhs == null) {
var tmp_21 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'x'));
var tmp_22 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'y'));
var tmp_23 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'width'));
var tmp_24 = _Dyn___get_int__impl__sh8lhm(Dyn__get_impl_6l2p80(dmap, 'height'));
var tmp_25 = 'glyph-' + new Char(numberToChar(id));
tmp_20 = texture.r8b(tmp_21, tmp_22, tmp_23, tmp_24, tmp_25, null, 32, null);
} else {
tmp_20 = tmp17_elvis_lhs;
}
var tmp22_texture = tmp_20;
var tmp1_plusAssign = new Glyph(tmp18_fontSize, id, tmp22_texture, tmp19_xoffset, tmp20_yoffset, tmp21_xadvance);
this.s8q_1.c(tmp1_plusAssign);
this.o7_1 = 3;
continue $sm;
} else {
if (startsWith$default(this.y8q_1, 'kerning ', false, 2, null)) {
var tmp23_safe_receiver = this.z8q_1.q('first');
var tmp24_elvis_lhs = tmp23_safe_receiver == null ? null : toIntOrNull(tmp23_safe_receiver);
var tmp_26 = tmp24_elvis_lhs == null ? 0 : tmp24_elvis_lhs;
var tmp25_safe_receiver = this.z8q_1.q('second');
var tmp26_elvis_lhs = tmp25_safe_receiver == null ? null : toIntOrNull(tmp25_safe_receiver);
var tmp_27 = tmp26_elvis_lhs == null ? 0 : tmp26_elvis_lhs;
var tmp27_safe_receiver = this.z8q_1.q('amount');
var tmp28_elvis_lhs = tmp27_safe_receiver == null ? null : toIntOrNull(tmp27_safe_receiver);
var tmp2_plusAssign = new Kerning(tmp_26, tmp_27, tmp28_elvis_lhs == null ? 0 : tmp28_elvis_lhs);
this.r8q_1.c(tmp2_plusAssign);
this.o7_1 = 3;
continue $sm;
} else {
this.o7_1 = 3;
continue $sm;
}
}
}
}
}
break;
case 2:
var ARGUMENT = suspendResult;
var ARGUMENT_0 = mipmaps(ARGUMENT, this.p8q_1);
var tmp0_set = slice$default(ARGUMENT_0, null, null, null, 7, null);
this.n8q_1.a(this.a8r_1, tmp0_set);
;
this.o7_1 = 3;
continue $sm;
case 3:
this.o7_1 = 1;
continue $sm;
case 4:
var tmp30_safe_receiver = this.q8q_1;
var tmp31_elvis_lhs = tmp30_safe_receiver == null ? null : tmp30_safe_receiver.t7x_1;
var tmp32_atlas = tmp31_elvis_lhs == null ? first(this.n8q_1.lh()).y7x_1 : tmp31_elvis_lhs;
var tmp33_fontSize = this.u8q_1;
var tmp34_lineHeight = this.t8q_1;
var tmp29_elvis_lhs = this.v8q_1;
var tmp35_base = tmp29_elvis_lhs == null ? this.t8q_1 : tmp29_elvis_lhs;
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(this.s8q_1, 10));
var tmp0_iterator = this.s8q_1.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
tmp0_mapTo.c(to(item.s8l_1, item));
}
var tmp36_glyphs = toIntMap(toMap(tmp0_mapTo));
var tmp37_kernings = associateByInt(this.r8q_1, readBitmapFontTxt$lambda);
return BitmapFont_init_$Create$(tmp33_fontSize, tmp34_lineHeight, tmp35_base, tmp36_glyphs, tmp37_kernings, tmp32_atlas, null, 64, null);
case 5:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 5) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$readBitmapFontTxtCOROUTINE$3.$metadata$ = classMeta('$readBitmapFontTxtCOROUTINE$3', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function naturalFontMetrics$factory() {
return getPropertyCallableRef('naturalFontMetrics', 1, KProperty1, function (receiver) {
return _get_naturalFontMetrics__a6ykyo(receiver);
}, null);
}
function bmp$factory() {
return getPropertyCallableRef('bmp', 1, KProperty1, function (receiver) {
return receiver.k8b();
}, null);
}
function dummyGlyph$factory() {
return getPropertyCallableRef('dummyGlyph', 1, KProperty1, function (receiver) {
return receiver.q8m();
}, null);
}
function anyGlyph$factory() {
return getPropertyCallableRef('anyGlyph', 1, KProperty1, function (receiver) {
return receiver.r8m();
}, null);
}
function baseBmp$factory() {
return getPropertyCallableRef('baseBmp', 1, KProperty1, function (receiver) {
return receiver.o8o();
}, null);
}
var DefaultTtfFontOrNull;
function get_DefaultTtfFont() {
if (DefaultTtfFontOrNull == null) {
var tmp$ret$2;
// Inline function 'com.soywiz.klock.measureTimeWithResult' call
var start = PerformanceCounter_getInstance().u1h();
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.<get-DefaultTtfFont>.<anonymous>' call
var tmp = DefaultTtfFontBytes();
tmp$ret$0 = TtfFont_init_$Create$(tmp, true, 'Default Font', false, 8, null);
var result = tmp$ret$0;
var end = PerformanceCounter_getInstance().u1h();
var tmp$ret$1;
// Inline function 'com.soywiz.klock.microseconds' call
var tmp0__get_microseconds__mq1imi = end - start;
tmp$ret$1 = Companion_getInstance_5().v1h(tmp0__get_microseconds__mq1imi);
var elapsed = tmp$ret$1;
tmp$ret$2 = new TimedResult(result, elapsed);
var res = tmp$ret$2;
DefaultTtfFontOrNull = res.r1h_1;
}
return ensureNotNull(DefaultTtfFontOrNull);
}
function DefaultTtfFontBytes() {
var tmp = fromBase64$default('eNq0kwO8HFsSxv/Vmr4T20k/xZzYtu1J7maSp6vYtm3bTp5t25z71rbv3t4zp3t3nn98Z37f1OFXVV9XIUBRlmDSqUePYf1zK/5yNcSHAVUHDm0Um/qv7LYgvYCJk7Iz85o8PPgqOD8B89SdmdPzfB8T4v0A986suVOOvF/yV1CsPvT74K7JmYnI+XcmA68ALe5SG6XuiwqIBdx+V/aMOb0vDRkMcgbsdlm5kzJPDXrwPohuAONIduacPImzHaQ24OVkZk/etuvQSBhjgVUzL3f6DD+DBMTrAx4CyIE6I392V80JJdr9lSIuAK++/9gIgDdONirqLy/Mi26IZAEZGARDIJJVmEer6GP+cn+58i58ZchARP8PI0J7LL46TAxMq5hswca1m9p7QaoH1nyfKUZp1zawTfRYgtGoJEQJR89B/UbRCe8P2HNUDK9GsmTLErA18S/sOUFmdlkSAMY5kL8oxOlrjCKhzhPWImL2HIUexNR+Qp3HUjB6ETN/odZbSJheYNUbrH7UNmqSUDaFmHVF2crENPql57IlfPsLjRxtPyMWydJvUH4T1otq/oXm0VBxar5UHOZ9IZ+C00nZK+H5orRV0PdD4JzQ8QVQe0bNIGYdbxtiqbls0XmpGJWPl7XVa2Odnuv9lD4y2z9grghicYrrvILcQms8EsQYvkuou6i4MDdAap7K1/idfq9tykeKV/u8onR4Q+eGztULcjL36lj0XPGH+msd9Hut6V/Ce59pHr4NERe0tlq/NCTu35Q4ofWXW1/4B/6n69dh5qSs/6tQ2zT6hd+uchDTt8E5oezL39z/uv8v6/lV6Ptq3/+3Pk9D6/x/+6L2o2vIPkdap7iOVd93mymt3aBelKa6ZnRtBeehVQhrRn+3dbpWQqR1V0gYD+tvHtTrJ4HVWiveMLflil99X430nZBfgaB2v8oRaQPKxtI6axtL1354FvZNeAe9n7I9gnvONMXl6poNuMP7zgk9T9f+fVpD/Sa1p/RDrbXuGivC/bLBOv1Ngr4J76BrZQMEva+/g+7XsE8DPy9r/tQ89K97K+C5L+iLlG6pnlNvg5zDO2EvaT302gtili1pGI+kEcSv+17fcw1iRtsAKh6tafQxFdvT6uylwJfdI9S38ld6QJ8BZoiqCIAcwET02pIlwDg6YavVIk5xlgtc4ioP8DC+lJAq0kR6yVAZLZkyWXJljiySbcbzxqdWUWugNc6aYG31ynqVvererV5Nr7HXxjvhnfYueJe9q96jt1S45dbf//4P+D7gcZQznOcSV7jBwzwuRaWyYu8pQ2SUTJSE5Cj2hYr9OeMDS6zi1mArbm3xyngVvaqep9lbe8e/xv7bFLv/Y/9J/wn/cf8x/1H/Yf9B/z7/nH/EX+/P8rP9u/1JfqY/2h/s9/fbFEb+8/eCdwreLnir4M2Co/lefrX8qvlV8ivml8iPJA8nDyb3JncndyXXJ2PJ2qXipQYg/JDDMaIAwjf8CAbBMPj+Ebw0sbBxiOCSQZQiFKUYxSlBSUpRmjKUpRzlqUBFKlGZKlSlGtWpgcct3Mpt3M4d1KQWtalDXepRnwY0pBGNaUKMpjSjOS1oSSta04a2tKM9HehIJzrTha50ozs96EkvetOHvvSjPwMYyCAGM4ShDGM4IxjJKEYzhrGMYzxxJjCRTGAe81nIYlazgW3sZhd72Mde9nOQwxziCEc5zjFOcJLTnOUM57jAea5wmatck7ZkM4kESHumspMs7pY+5HIXsIBNQA4AU8jj6+MAl5jJj7gXeAWAe5ghHYBZzGU9j/OENJVm0kpaS3NpwUXgJi+CdJdO0hlA2jFNWkob6cgcljCbpSxiOStYyTLWsg5Ywxa2splHeJW3gdd5gzeZzju8xWsANAt/vRjGJn4iMZklq+SQ3Cfvye+k0ChqVDRqGiOMu4w9xgfGP8za5kRzlvmCherFilZ9q5M1wlpm/cZ27S72HPuI/YD9muM6ntPQ6eUknBnONueM85FTGGkRmRjZE7kQeSWSdHE9t5U7xE2409wV7j73jHuf+7uM2zP6ZazIeCDjg2jVaJfoiOi06KbofwmCB+AwggAAgLVeZz0vtW3btm3btm3bHdS2bdu2ld1ZyY4ke2UQo4IxwlhhXDG+mMLMZFYwO5iTzHXmNfOJBaxMVh6ri7XL+mbH2LnsEvY8e5W9zUngpHPKOXWcXs4UZ55zyDnn3HCeOB+cPyAJECAFqACWgU1gFzgGroFH4B34BZPBfLAUrAYbwXawFxwF18BvKB6ykULpUC7UAM1Cy9AmtAsdQ9fQI1wMj8Oz8DK8Ce/Dp/A1/Ah/IllIAVKG1CBNSAcygMwiF8gd8oJ8oQkooPloOVqLNqOdaD86ik6jS+gGuoP+YjVYE9aB9WEj2BS2gK1hW9gRdoHd4Um44hl4KV6F9+Jz+BZ+gJ/gP0QCUUiUEpVEI9FKzBHHxCvxTcaTSsbIcrKabCbHyClyj/yjkApUKlVElVFVVB3VQfVQA9QINU9dUXfUF5e4mdwKbg93iLvCved5XimvkjfNO+Pd8f75ifwsfjt/iD/BX+Mf8h/4P4I4AQm8IEWQJygSTAhmBBuCS8GrMEmYKcwXNgonhUfCD1GcKE9UIuoRDYhGRDOiBdGZ6JdOo3PoIrqObqcH6BF6ml6mN+gt+oA+p2/pWMasO7qNYuvvnVWxn5vWtiSHEluWC71IVhRawiGhOjSHIs4LfT/wJ/JCdTDfM/UIcEK1zDekHZOqF+flwyZHlGPyGlV0DoRQ4j8oIS/4genFG2vy/WZ3pUj0yDNbMuXOnXt/93dnv2r0NR7SOKNxQ+PfG99o/Co4O7ghaDTNaLquaXXTp83VzfHmTMtJLfOBMPru6Y5h17G4mwLsUJq94Yji8IbbmiJtTcFGt8vtnxadFg75vDVaQKNtGaoUMzg9JX4Y2b5qH3+nr74r1TO8e1c6k8mwxaM7+OiO1FiX19fpqzk52cliP/wgeZ/CgB0K1YDTq0AzpUYLa35vMKLzKRm6X905WYfuigLUl3GSvnF2explPuFRURtmf11GdfTfW6mXIwUj4ZqwGkAJe4NmCdYEUIIRwls685Q3Jy5dcinNQ/X8Z9aDWCsf6LVTaN4prIUO4nS/uEoWLrZweScLp4PEFjrIQt8QdDMHumkGboYxq8/vbmnVfH6HVgvFQP6W1pbWqM/v82strU1aW3RaNBLWoK9IW7Pqcru8tU62+IuH4tc9Ul5Bgzde9Zb+xUPH7NfTEJYvxLnyRddcXWyRNR3kXFi1Jt5dKeoZO018lF5w6R9eeLFqzcyO89oj3ZX0IWOn0r7mWyNWEjr6tvtOZP9jXk9QZG4VkmzL1G8VdNQq5Q1QmJjPW+sKNrZE2qaFvY2QyBcOQbwW5Rfe0wVs6kD2w8bh4Z4elFkXXjhr1kUXsW+Ln53dRq+zW76SZdFFs6z32f/+ySu5d1I2x4eQrQmxR2m2poWuoD05fQhaDZoi+AORsBd7qQW1gC1TVE1wI2N0HXh4w9766I4PhuKJ1esTt8RoE89kuJjRmVy92MCtwVNdB8Lx9BuXj6bjvYnzz79VRYPsQrY42RlbLY2LTA5mQA4nLBAzuYM6bznFMWzZnkJyv+kp7HcpdMk0T01YVnSQYXDDgJ3SN/jBSkQ5flcVt/dXax41LKvQLzSX7dUE82F+DQ+wHndrtDXqhyBRv9vvpnP0e0P34s+6OPZbu7bjnA782VeFJI9XE+CcZegf8AakmiIBLcxm0vHiSS6epOO52sCl/XKYMEnfxjUDBqGEg+aCh9ozup5fL3IKthncVZXyBCJsc3Y9+nPr/1DJvir6oqvdieCj01lM4gXWHKTwkiX0zyUZ28f3wz57nN2Qz4+mHiXYqGgeJRxSmhuhyepwCPphDo/48uPt4gvybP+YqkR56oknUn95/HG2WWwUS6iTzsKvUyx5Q3whxvBDO/Lh57FlegrjYz010TCWH9QznGecJ4SMXseH9prsM4a9pAROhxd6iniam2DaJpq1mmjmUHeKRWIRG5/soevp+uGeVFe9r9O/z6rtI1SC/9uy6ZGnOad9H9n0Rmfy5BqgmbdrzLYRmelh/APwAFSUQODzW85kg4HlSAdSq7yR02JS1rJjVN87EDqwyzDeHzIxILFq8+pk59//MHR+IrF+dSI+5OweXX6jDhs+sCvFjbTp+L2rY51JDmtO9MbTORx0zMH8DH4OK9Ci7qhmu0yEqI62/i8xy/CvAK+4/RXGJh820Y2rHZb8ln6mwhPz8mnSmqCXonWwljtSqTsyOjpmZ+uZZ4R4Jic6Ty5blrxWZ0u5OPTasXfeGbOlVVh+fK/SYGvIZZmB7efMPa0mN+9UYi1yWMsaJh6Mzx9JPVy64l9y3n+uqBhUE3LsnE1k4ivE7k/uzlbLye/aMlG83yXShhUt6KFABDuIGPVwtsXZzbPrJQawGFfUvGx7Y/eiwMdiHCraTfJWUh4UWyOqhU/hGYRHVvFBDpBeeSW3rWILoGjNGmxp+32JW8654ZxbE4WYVLi17B5iEpTk3jJiZ0uwcrtvxSb/RH+NlmSKJp0JuwIXirrUHDYeQvSNqT/yiC9+Rn/0jdSfWCI2St+C/og+uZuN2/qz4630c3WnB3sk462s1Qa8l9gh3wetNx7Ym6VvvJUYJH2QvBXkJWS/2fvY1ZPvqz6aNvDVVwM0DetYQE+p9wJvEe8tdJFFvRetGlB2ctgk58XjlVLkYEL8Tky+z67O3qc2sEvEi3JA8SKmtnWz0YxxUyRTQawv9mpvrcMbbGtiaoa2Ffu0yVkAYWrDHn9O7RjlO0bNccVV7iMxbqVyHMadFtVgEUFbyc2WEXiUQIOioQ5F/S77FnUtM93FDRtnkTYgnN8HQHc8UO/z1V/Wd+e6dXf20eH7eq9ZJU4WL+B3Mj1O0fEnrvhYbBF3Zb9kVdRFXaxqYnjukYeV1nSlns1mn011lZbwyfogzQ9OvfzlZPLlkHffV/ooSo/nBrnlir/mema/FHe9JrYddeixdUlqev11auovKxu08kvHsMQJyaOojNwq0JqCqjrz3/+ODAzQp+/QpwMDLMaS2QWIozKi01OKmscXD3Tc+BOMC2iAnIDFFOxrkK1ZbjvBaDq7nsXEDHpqYSKZ3UqDgLbzC2EtPerszlaL8sRCWD4aSmCzMfVBzLkvbEoCBXzS73LvwQ2Td7XgMUMlIyOJcEPPfscMTUyIVXThxIQNSSMj4ge2WQaM3kj7eR0z0znYsKFJfGHZkG7rpcSMwpZnBbT8DYtN0IVi1YQop2+eJLeYeFKsdnbnXMjZvWtqLh7tShfhTxlklyhqF12CJotBH4gxgCEYoCjndvvH0L60oH0w35pbTbMLrVhjyxoAVv1EF5qtKZMDQFts8U8VAnW91j/FK65iLS1t//iJRqwAu2qfqTSFi6aZ019RKL//WA+EQ1gJawEU9bHsbM7ZZs4WZxdiE7HPRq+9fpNTqVgPWhvc4oY5+dUO3FfgIayZoSVqehPGGU2beLXgbmf3ZF16FOB09wKleP6asEbhUgqSCg1xdmRatLHD0uKADEefr9TK7KLJ3ex2MS7uKdgHp9lP7gCXqpc7xu1xnbA+pdySM1BKcnEUNDgxGsGPcXHCO46xXT508TnGjF55ryiFMpVafcMEhaDjBraeb3D8edft6HG748/QRwHX/SkHsm9QowVM7Aexki76AeaWXW9tlWlvv82D8hwAnl2Tj7FyNf68S74lI45o5py25Xxw+ajcOG47nYWnu1+VOZXMGKSsIKGtrl+QN/GYnn7ozV8U+b2hR/X0bb8idRF3qVB8Obnd2N6fiD5yMe29Tnwi4kXyj9Rl57PFxYuwfGSO5SMkIdvpkIbWUMjFmps0BNEGOA5oQIYGadAwxLjtJm/yjDhXnGsYVI3cwvFh920bZsn0a9T2EjzPlomXzCoKbUFGNZuCO+aIc7k4F3Ltmur4kBfbjAabsUKIBhdggQaGG2MI//jXYrfY/TWnb5Y//fRyRL2ed8XHtPe78nCZ8viNuChxG8VRPSBq3xG1AzQifUyaqdXOtdaya7gK/EX+SaDvEFtfFmuX0AF0wMuyWiLWvuwY2nUm+p2JKwoMFv3z/ib7W71xw1rEoiF6TRw+JAnykAjRq0NsejbDNiNLyOBudnY2utr9Lf5lT60FaZtotvs1czbIXjN7HJ49t9i/o+QGdnkpauJlmTt7iPrY5DelqjpZN8ex3Mnn7NJdlu9aeZalc/gf9C6juVjtOpYbTdxdUpyXaFi+TEtcx/7wg/Lj/tgvOG+EnhKrMxnZgjtHuZmbdThKpL5tPQSJXU99aRlw09QHxHuP/irOZi3mmgGosd0uOZcTrEYCt8Htfcd3D7oAZ/cSD1vD/g+GMvhKYBh5/pJQd2LtTbZVyBMDpLrRgJ0nSBIK6VxuOzfPdM1d3rePT6ye25WhC/ovl3nCB+v+w52uVZv6XnmFDpoR6/LVLYqNX96PBOE/67LrN+K/ZAaO+fKYWC29Iyo1p5lEqdpr8ZZqBHYtn7EA0XhJaZ6D9F+2h8QMDkIBz5eVJ8Xo66+L0f4ylr6sPigesAlKDuuXYm1ePFjUyQzijUqkTQnLoMUq7vz73+98/Io4/+5ZMUa+Z7/j8SvUjidSqSfUjfF3GTIA8Fj2bnxjXleP5WRvKiJYmrmBORJs0TW1rrSAPSEHNrmXtYSBsn6LGiXLy9gRRu8gG5RSXz5VUqz6y5Q980H+GpyhKwFL7JDidTtN/WAp5HI3m5GXVZjybwSt3C87o2rOhXc+OT/+oGg4WWNnVJ4Y61lgrQQnZH+s6z553lB8G/vuxKu9F54Us/XEYlhXLR5k1oa8PNKGZXkPoWDjvhRmsYw8zgiFpoSm6Bm1Y/JhtYNzo+pupurc4qqmnJU4zVd+pATaE2KPgbjFpJS+KVAJHf7+sHmWck1vSaHi1I5CzUw+PPw+YK/3msGyAhUOKkoBj5H7jWXYRFzL25hPfYwnO+V0llWlxkw2hJQHlpM9x7ansZ87GwxqrThxMHA2KE8G1Z32eQXbvUJchXYS6xBP/LVYa2QqhUMAVLODrTQ+lLH15bgJXW1ZEzbmSC+waQXsna5Ji+doIC02f/stSMV1NCnOzD5Pf7NyI5vbIPc5KLdm5wboHrlzWMKQXKbf8llbA7krhm4fSt5d19eXfJlfd9ZQu1nJtOf2gzc9tUKmpBfEOTifvOzRJ8b+qT69v0ef6s5BW525HBJjWRwEVlyrBE2L9hec9MGMySfGnrWcUfomiroTieR7Yodlwlw6pywSS2B3GNPyR6UQRVpNIclO6m1IIVbkj3RQgfGpp5T1W0ACa8o+7+wezJ5rm514wHLIvJ1b85HEbK3Iolm0KE9TG34RvNSZg0YvOwLqySVI2TmXFaRX+XjN5HwaHn6sez/rO/zIPao/dZZ6lL9A61PQJY/t8gzdIh1FZ5s4iZK0BM5J3/TcJF4Tf9k68sGN8Y7VPTfR4XTe1hHxFugwnzvr7MiMTM8wj8dx2zYTt9viQ3nccAxL3KixT0lrsZFRL3QSAYrIQ1Ad5h8KGRnpMjj40FV2d5UBzlNkX9bpew41wvloo//IvOh+aWCmebENk3WWeZGi2Ot0ASWteC/zpQFqoqYBsQoO+y915mRd/humsxZty/Gg4pR+b5J/apAtfv7FiSXPPffyc88tmXhRrZ/8AP0+UveVpaCvejf6Sl7Cgjlqot4tHqD5aXD+8TTNFw+kqZqqYbQ4YqVu0SuPXFF3WzFaygmcVAB/oaglKwu0tO4/LXrP6eLenMi3iq9OOunTCnraUW/JDpDJ836s1ZbBZCkRk7EgWZt0sBBOKaaXCxdOUM/LHk38FLXcwe1+4CKLwTdgC05sVMMUagtGghGJVJ4AXjR68QHBh4rFQiGxhYdCcBBUK1fKG5r+GfFxctFBnAvj+1nHfScyPDeuYmDcfK4l+Yu75MdzOiL4FNGC6kD4DSavPQqsyYtJPQEIQQetXIkZ6SBUiJMh1DT9u+NmfU8ujmdhjHP6TGQglsVnWAx2kzB5rEc6HlYR9ki/xzJChr7gT2fq3PivPy04Q2cxOqi9HWOgMvGzXeI1zpDKFAdOrnf+M4dNS4HFdUog/0VFMgX7c0rE+ohifT3BxrFj37wjPq+/f178jjf11A133XVDStc7T73wwlM7Hf/neyreX5edU9cff8r30otV1/du3957fdWL4qHK9nmp1Lz2Sjs/uAnzhTGbPMqw6U7YOuiUpEue6bVCMUWfI6zZQU43ef7YM+/C2+Z28Vf6brvwwttuOF3XueeJZYyFxlITCKEjnckQY/QFWzz7iP5b6PBQsjM1Fgrp+hnbbjpitu5yL9JTY4iiyU59kdsl6a+Cyj3fPJtxgjc3mNkx7U3NqkwnavCzT3SDcBqLIzjnbcrut2lT9r1NnNh22rjdPOTduv2d7Vt5ho3TZHalcNCkTpPCIXMkWXTrYhW9kKvXWadnAftnuYY3YP7Y1eYHBFn2kHjrOQOE0fVHc3T+UTxY8SZvl7n4bVknh32a5311soY9gAmzzf9PzHWAt1Vk6zv3Xkl2LMtJ3O0Qxy3GxGmWnR7jNG9MHD5I8lixpEeL8wKpkPI2NlULKRTHy97tnQ4f0rf40XsVRXT4eInYkte0vQU+nmLfvHNmzp1bomRffwHJc+dOnzPnzPznH/lKEFPEliDayAaQJ8Sx2Sicm0u4zWoH6iWTRgv8U2jBwq34oJXLvbENhshdkHYjKiNChoRh40aubWdxdUS4piLVxTtGBduWdl9+effStqCvRKaHY20/2EOZbeTFWTXVEdxLR6prZoWCYcjQ2xaEfsDi0Xqh/XWsEzFT1glcIcXyz4A/xSdsOOCdMYBytAlmB6w2RZd9zIM+1itTIQ93FJSGWwP1pZCesLbyes3RY90eiFatpK0hHm+Yb/SzlpW751SM29bf7+gm+5rdGXW4oaEtvjOpRnavXDmnIvSJFnB27rjdadozANx6yMItzugdPOr2A+bwAdK5g/xURW5PFWLATm8VWwKSIT1WwxcYxmlnqJnhQGs0GaczFJP7kDG4S2/i+01oHBkydWK83zD64/zbGDkKu8zFRlz9yXBFPC78dbgPRJvg4+tqDPWxFibKMFrhRHWEnUj67s9eosVSR46kUGZRq2kTBDKuRkT7QK+9oETRxxQO2G6T9jLb43M+C2fD581tBdfu1atWXd08d27zsspFi1qjX65atqz78nA03FJT09K66KtRkqfNXJ4WcHlagJOC8dDXB7n+rNN+BvoT4zgu4P9obJ3SgGmVRWAwBnLEb2cncsanXOl/KuPfV7KO+DspHlYqnFbSvPdJX9p6H7hS5nuXrWUDiipxiCKOSYErns+7RDi1WlgG4xB31m+ygdE3/onF4STeIQFS/ThCnzTGHBOepSh47MoFfhJMXKTmnoKZ6qVHv5fwIqISQP7exyzHBKmjfzyUCyUlVPlHY1TvBIpzgpbhY3yumBMaS2/8dvZCzviUK/2dGE9jP5HG3sCxP/X3eB7h+VpEPcBOpHzsPkf8dmUZxmN6V3xKpD91I8Qf4/W0iHpO1VA9cV8az1mEPQXRzwK8DwscD5c2ygfccrK1FkQOWAw7YSHnQAQxgxbwZwajUXgmAB0MkWiv3sNlb7pT9gR2ytvbSrK9Nmf8dnVizviUK/1PZfz7rMURfyfFoxXKin6D5kujzLGLtHn6l2i/l8/K81kgnzWx5eY/bwH7XL0F8Tn4gkf1Q8cjvoUvtGOn4AjmO49jxcX8hI77DRiytqZ8RqJbwspwBPHkBEIqJXtmOev0+2MIqZ4/nFVTPn/sSRBY7eFexIoTfv9dX4j3Ivqa8Pvu+gKbFPAfwDF+rm/kgJqCBxTU59Qtd5vDONBD/gCkv5vpKMr8QY47jtcsp+7wxqPuyBmfcqW/E+NpHJM0jhHSEVa+ebbcO/DfPHEKIcS3sdZGsMNZAfiajeyYBWFrjwi410AMG70xLr/LuWLH4fXf4taXFy8DsEvIGr9+9tlfR6rOObdh96+f7e+/fnDw+v74FyOD118/KKCGu3/967v7IlVjKxvwCAQnIvC+7165eXBQ6GOOI3RBvxbTOo/njN/O9uaMT7nS11G8qrzfrzjiSzCexnUZ7ZKO6T3yfVqW967yS9o7Kf5dYBPz4bQ8n5BFxBVtzIpZ1lwCjShyeLh1YVwolAA5Jg0EHLVqiWiZnyeyaBxtCHJPXUVZ1WEPBpZ9+XADQpI/ORhhtwjIa+TGD3F7wOHJ3fVN51QdcOBiBxqkrufY4TSh6y3EsMmBI5YGzqDk2UvGzsOEJj5KCONt/5xDs/tKtx2wEEaNUMe3gsyrzq15eITP21Ka56SSK347G8gZn3KlL6F4nM8ozecJmE/S5zzfU1wOFt0IEZY+d8RvX4bxmN4dn+LpSZ9jPRBP+lzUo8C+SVHlGSikNJ+GGc5EAJJYV+1uzNCFGH4nibik4UQL3WBhNgrHg5NDLqiQbNojXNYvJl1vr4EM78sKGuNf5ozfzu7LGZ9ypa/DeCo/4YgvwXga+34xJmqh3sP93FnYoyb4maXAYijUtxfDBwkI7ARnCxgGugnU3yeTqNtPnjqu1+jIxy5S6kFWhRxOZXReDHDJbQVNHijjm3bQ72x+ZN/Nz4QX8u8r14CgPhIb7LpjjflrHvjZ0sfu/sqKC/j3lf1PgnheDW/7nwQIDgIkCyRbETlO3ngap5zxKVf6Eor3jAe853gJz7eaysMzDeF+XHZwLyBhP7nzpoWY7Y+jWIjtN4pNvF+bkBQoX3Lk3kDeyX9JorQkFVlXCdWFbWmldfECtkXwAbj9mMjb8pa064gdYBu7RLzdN9rjNlG83E/4ujiX9As8vkiv0hPe/ZdM713HGJ9UpI9by9i4izAWiuKykdOprdJGUlkXy7YS/hF4h5/BG0CCbJJDDWt3bJiZ0/naUxW3nMXxKievwOxweGHfGWdTHsa9I/fTXkesZS8+0jJ4BkULzs5oC5q4QvAixz6HJ+RwY3V1Yw470DSuqv6wG1tmD0t7omUONEya1OCyBY2Tmxtu9eDOq4URcY9zu3POMF4V4/w3XCe+tYFsqUw/wzkvDpt8iZxjd/kzT0v/CJehLwoZUg/pCSs9PwfNss9Bct7RRkcovpiXr8g90zySeYP2TLDHd9U/3ytH1N41LplsRR+k4MwwVN62N8TtUiplA9KdJAPgiBiu4D4SDBoiJP2X0KIu7ncur28K1M9k197TD//u8XVln3wy60mDPk44ov+DSKL38CTONJz7IcCEMBcgIELjtqq/u62t29cFW6vNbd3dZPfg3N8C+JAm8CGxXiDuBV/6r+ASy3cDygGf5jlzmpvnzfOl8RE/m+Y1izjCDvC2HJ5QyxFnDPsDZAtLOQIeq2/qb6qPzW2+bNWqy9bEkndsHldSMm7zHc1zl0eX77bH56CvjuOhbRYeWmLhoQ8snzVr8eJe+DNzyWK956NJky7BD2Ffh3xdIEfbW4V+bZF6OcN9TOcSvnGVbx/Na2275GWOKSGaW7vlaGIn0ENi7jiSGkrv3nRz4/ol3bE9bw7CkjeMkfjt6SFzx927NxV9TV/SvZkN7IndbvqkHeBy9i+W3WADDg5WneAloRY4Iw8r4E+pK0fuK9gXOzMbK3YFWM8/7T+Qm411YBu2hbgbY1VlhsPfhs84NvKcOjrnOZXW5gqefrLUrd/H8wXyWSQ/jdUCK7t+bCX8tU4aKFN7YrE9QA49+sJ3wcvKXhhKc/baISSn7YkhOc1sNR9iK9hbqG3TQ0Npwjpz1tHMLKZUjjqIOeWtg3hUVDrZGT73pZ65r88154Z3tmmSXbrkd9Y+lbAdK/4zHv826lDuO5hicTKamdWN0noV7ihgw+EbaVT68eyB9xSJQfFxb3DxeoK85dh5yM5HOwAN54RBvQe7rj0CO6sXeNsFS5ANDKU5+JMe2hODYSE9IOWi0faNErfL5ssZnHBD+DMfNx+u7MYxON+1iAfWorMXJ17vGTm6T2szQOsZiT5wqOs9ML9fN3+JuztQ3DXsCoT2HOtxrLUe4R9yQ7FkprF6TnBx8NK0FUnzvCF1mtk2pM5xcdTYVWzsyH4NaCTIVXPz1f6/eeRuTlutcIkjHS50v6Hee79hEdr0/R7b+BshN2Sb7HmaInSjg7vHuYNi5WVhwMU6m6BGkKlvrS0q25fmZUzzzP0kaceP4zOG3PyrWqqDcxO1jH785HgkRnllKIzPpN/weaLn/UyaZ1lumGhQcQcByuI90Xkb2kQc0ibUAjRDtcITge42bqPmwht4J/CIMUBtMzi28QH/YxgIcBj0R6IcEulAn4tAPKw1R+2dqyi0Zo971ixMod4DIg5r1uBLFofE/KaXjyb9v5hhDKr3KDi3QJkYR1LAJdYybABVzO3qOvCb33g7a6T8/pCoj2Fl9PGHspcAgw3+x6GnOuFj+SQJE1YYB+id+QxD5oRcsBCdmVWSC8KKmKVGGKlXfGr3dVlqZGSxpVy5GkRNoq8VelX/7S18/Ei3gi05xWW4Be6CKx4uJemucA7NZeRQW1gBaS2X/VSanKx0tJ20psmmogs5c4XTdiJw6rSd+wpG7lNXar/dZplPCz+1zOf+PxnYdsR9cE7Qh+g8MghrFB7rrF/TqxynhWEA1t4s/3oCyZwcX/xJ8PSzApgubqNYwbfsFtzDplo81yrJ5cR1yOrZFObYmdWO0asMc4v5q7tY9YYn0t9B2WbHUEy4S/KOiidAurlOYi848C8tAzK+WJH8NX8I6jiPUC3JMQEU4xzmILMpsC9S8D1uWLKJPgu5YC19CQuzEN3fPHikeM1uduJICs+jyG6YlTqyRHLbWOPbbOBt1hjpmLa2K8JpCJIHgJx4OPejfLg0ttwGFIPMlPJwlL26N9FdUdt6HngQARxf2xGJdMxqmW2+zabPjmiZ7/atWlxeVFzXvbkvAR6QDyIdHRG2rS47p6PD5qP8Hur0WTxT9fdwnsON+0MQy22e3gMhy+ZBe2ybB7tE9Lf8GJxXhgHKce0W9RBoheyf3xEG750/22cbPt5LhQ4kfhOW2OSxdeCfh6t05lND7PvmK0Nsl4M6NWh8mjQXqbNZHH3Q8CESVfJTiwMOZSJx0mXkZuY0cEh0miDG7aMnOEO875pIx1DJd2ZHtuw9uGJLf/KBN9V35NghO2bloo6IMadjdveWLcagk7eBti0sTVvUYKmnDTMMZ/fPtFHDFfD5zHm+YgW0J0q6yjg7Z0zL2N2l84Gdj2xgKbeBMAHmj5/6Mfhj2QBUviJrDpknWFDq5gTxZDgpHb+hOj1hmOmPzbTxb2wym8xBh87h5/AD4bu1L1FeZ33YVaw1C5rV4AJj7sAK0cumZSxcjM/5Clc/kRtLebWYyInNRGkT+tPcQflW4jPxPfG5y1OO5EVrMe7nFTK7wlAUif3wfKuFLTV3cDtWDRIyHdtgIZDtrUj0BG0iESfN9vQX29CTev6FGxCb3nChIQNLe/H017vUCsAY/HkjrGxY12wj+5NZtJGZx94GW7fRDOnXbkJXb5R9ahZEMcTbSfwjbOdlli3D/nvtLWxEx6IVi+J4PYTjhfb6rHyrMbn5VupTaPE534pdAxP2IfH56FzQJeoOY9X0AYkewP+pZvxUWG31pSF9kWyrbK+v6+R4ymZQRtls2x5qGbK7lmJz2F3kTgt1hmoNvf/g8bNUGNDGdyDeD9Nt4XJ4t4zV8LX1lPYI1iFlhdvcYrto6RLKWgUboiYtQ8VmRo6KihQn57gKGYK1eDTlRlcQHrnBxTGHjfhNpZ3riHqMPAlyFqy7qJC9YKzvWM35x0B8hHuI3Duw+sIb5J3zfVqG7KsDbyD7SphZibDv2vcI6Br+yDDerrwC4C9BsDy8PyR4zvgxd5i8Oz/42wOCanng756HuqSeDCE7p5i4SHwdafXQOUFICmdmTb74R7vUQsN8I3EXHCQPtnU3NLaxd0umXLRr14/EMoc9NmArjQ2K0wcxOqcPQmHAqb2Kn61wk2eTTm2nAPbRhT9oE0huuUNAyC7hD5KNqvegM8D8C4rw3SP3ShyC8Lrfc33rlzizZy6LwUZ42eNN2LDa0tcLL1rn5JDTRHaWspvYCzdcuNrDJNdWd6w3vHuLS/gzcY7hucfpQxmd04cC74l7DOmXW1iDPwTt9WINpV6sQYvRagkK/X/Ikm1p9gfIFrAeNiDkHGWPyj87zuAuP2igKvKWL+RNFo1zjjJB9+1ogglk8Ex/Vkyv4ZhxvUdOq2e6cZyd9rSQ5ncJj/f6F95WJKcR58WLPbD7zCexM/BNWqrCtssZfycxzfhtjizc9DLE6Q94CJRmgp7wpJloCHMGaaA9dPcdcLfR1l14vce+C4/nKPsuvJZhLXTvHNZE+8zwL/EevfjlACiL3iM6jBqP95fu3vN7s5QG8VrQhRy/Zu3w1hlfL/JiGazFLkONQBl1+A7fYB6bz3623wHQe4zhC4AyDjkoPWEYPCW5GSgnu49nwcyyAJ4VfxcjKNhZol7k12oxXq/EYVuB0WyhrepT4u9uxxmct3+MWFNsQNwx1iYgrEK+EOdvVpyvLPuv/W5Fw3/q9yx817qfR+L/1d+3OHhaDOeRtKj50HMfcZfVfPMTVv+wmWYNsHx24GJkA+50xZzh/M+swUw/zOrNT1zpouS/RW66nDqiiIIcWS4hXJ5sr8647+d3UfN3rBhyOjiws3H+/xoJFr/cPNjaAMDBtdpkoF7n4MKyVx8rKP72V8okG7ZM1SvN9uICdoc6sTDopcQGC6NT26MrFxEndtHKaPtU4sSOuoXO4ecqXbnvNfpyMd/ZWen23quQ6k8cRHm958xc/NPuTGbdpPrhh3KT9Wm/BlfG0FPFPEh6kzXA6HdH1etE1QMw0nzAtRfNUdVrnQhB/Oaa915j7LX3am6OO5GCtdXqgsqRtxhTK9WJ96638IKhQ5loJfyLZg4NWZjB+nujFVVVFYqOe+68b3L+cZ5SgSezRiA6cQowc93qaBurlUogEsZV+8Tcb+7/EXviY/bEySH/nfJ+x0ivddni5rsMfdXJB/Pw8ixc/3dc89BiwAkwg48AVQAP3m8qmsR4/HDCr+V6l1+Iw9HAY2wtjg1MNw5crZD1F2ASF04rLJy2EChChrrzO9tWF73xRtHqbTjDSe3t+MJp86Pzpy2MsyXbVu+P7l+9Dfi3b0ft3w/y2mtpRpH8LOtAQcHfNBCig2sLDN9xIQYjY7UYSoYRxfUZVRy83lGAhdRx1hdhftCJMxGZ1RnE/RU6M97P/pKbu7y9DTm/Wgb1ahLJqGckLJutYeT8Ep8XrSrHM/GmGemK2mp+FgZaOXzD3jdqqBFYwlH859snOmTexnaZQfjcxj8nvNxs942iMrtH9SqJihP9shFtuJ9ud7DN7t/LBwrDgo0dLhy1w8nT3nk2cvYjwbZeyBYOhpwsbQ5hyPYWwg6nUZnM9Z5rERY7GBu4BGfCM3SkBlNBV5qcPVT3B/KAKJ7PKeSdM74ayOu+nPWWJyD8QN9d0KANl8IfVrbBvMnRQTXE2oKF2LRy9iK7vDsv0Dujsy9R/uUN0Iu7+i7dwMrgD5vp7CBCvO6xxrM2s+nfSqNDgNhZmfCNZ32rH3fWO3KvQ9zM5y8Nlc8V9nxueejSvILxzUihah5fwBJnfKU+RaXhCBx3TdTnk8eVz4UcSFefHAqeA+nnji8I5Yx14L4h4LIpjG9VmsDY8f8QeMb92wevmu8no0l0JuDWVo28+iqAlAPIJWcD9OsDVaxD/v5iI6Fb+D0ankRYhbUxg8KaUiPjdaVChn1w8ltMYT+0KUrhPBD8EIXzIbSLwniz9zoKBx3hQqjpTgqHlPHKUaiR6fnwdIHyOYWZMoEtpLCqhFiUwprSIeN1ZZoM+5ROdh2F/co49hyF85QWVkLhfIhPU7hAWcqsuoKOcKFypdpJ4ZAyT33w39u4iuQ4giCYxnfUyewBsXQ0g5iuioHe2Y4Yiq5e+os/oN/47sesc1sMjVlZ0Fkbsdc5l6Uk2ZSPvNIV+e6ytuz62kxl33XlqPC2azU6ylorx85OrRFilUNTjerMbUkarUXpqXHKuAuDpb6YwjS5cbL8IZRdpF9kE2l44/Mw63QzSZKh9/1WHFcLsrgio9KMbdb6zPmo6JrjoVUZdK2XSaZS28K0akoZuK6Ro5/bstebVr4t/Ns2d5mbUUkaXVbWwtnea6S2jjpXxXvfts8mJsc5BEtIODeJPl5aKVaIvsMhQ4sSHXrUMJiS3SfbkRuhgIclbqGIcBRiLSOO4XhPuQ3kkleiQ9oV82oyDltkUuatcac4hSGnl/VueS5VfaG/4G6Qh0jBMj7cUnv5+u23Lzm91cdnDIk6cpvM46TtOXuqiTmr68jiQWRE1mAMGyJ86MGTLRjV4JjxNnQ5oE0/0QRZYGp6qD1oMShDjAtZQo0/sc17D32IEHy7zt9mXh4UOcwufxPue5oVRei5J6f0KnHNuyNb0b/Hits4oxqDPPzvw5i/pJLHx5P5HE/Bmxt//7z+d/f7689O/gNZQgPX', false, false, 3, null);
var tmp_0 = Companion_getInstance_6();
return uncompress$default(tmp, tmp_0, 0, 2, null);
}
function Font() {
}
Font.$metadata$ = interfaceMeta('Font', [Resourceable]);
function TextMetricsResult_init_$Init$(fmetrics, metrics, glyphs, glyphsPerLine, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0)) {
fmetrics = FontMetrics_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255, null);
}
if (!(($mask0 & 2) === 0)) {
metrics = TextMetrics_init_$Create$(null, null, null, 0, 15, null);
}
if (!(($mask0 & 4) === 0))
glyphs = emptyList();
if (!(($mask0 & 8) === 0))
glyphsPerLine = emptyList();
TextMetricsResult.call($this, fmetrics, metrics, glyphs, glyphsPerLine);
return $this;
}
function TextMetricsResult_init_$Create$(fmetrics, metrics, glyphs, glyphsPerLine, $mask0, $marker) {
return TextMetricsResult_init_$Init$(fmetrics, metrics, glyphs, glyphsPerLine, $mask0, $marker, Object.create(TextMetricsResult.prototype));
}
function TextMetricsResult(fmetrics, metrics, glyphs, glyphsPerLine) {
this.d8r_1 = fmetrics;
this.e8r_1 = metrics;
this.f8r_1 = glyphs;
this.g8r_1 = glyphsPerLine;
}
TextMetricsResult.prototype.toString = function () {
return 'TextMetricsResult(fmetrics=' + this.d8r_1 + ', metrics=' + this.e8r_1 + ', glyphs=' + this.f8r_1 + ', glyphsPerLine=' + this.g8r_1 + ')';
};
TextMetricsResult.prototype.hashCode = function () {
var result = this.d8r_1.hashCode();
result = imul(result, 31) + this.e8r_1.hashCode() | 0;
result = imul(result, 31) + hashCode(this.f8r_1) | 0;
result = imul(result, 31) + hashCode(this.g8r_1) | 0;
return result;
};
TextMetricsResult.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof TextMetricsResult))
return false;
var tmp0_other_with_cast = other instanceof TextMetricsResult ? other : THROW_CCE();
if (!this.d8r_1.equals(tmp0_other_with_cast.d8r_1))
return false;
if (!this.e8r_1.equals(tmp0_other_with_cast.e8r_1))
return false;
if (!equals(this.f8r_1, tmp0_other_with_cast.f8r_1))
return false;
if (!equals(this.g8r_1, tmp0_other_with_cast.g8r_1))
return false;
return true;
};
TextMetricsResult.$metadata$ = classMeta('TextMetricsResult', [BaseTextMetricsResult]);
function drawText(_this__u8e3s4, ctx, size, text, paint, x, y, fill, renderer, align, outMetrics, fillStyle, stroke, placed) {
var glyphs = !(outMetrics == null) ? new MultiplePlacedGlyphMetrics() : null;
var fnt = _this__u8e3s4;
var doRender = drawText$lambda(fillStyle, stroke, ctx, fill);
var actions = new drawText$actions$1(renderer, text, size, fnt, align, x, y, ctx, paint, doRender, glyphs, placed);
var tmp0_safe_receiver = ctx;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.h8r();
}
invoke(renderer, actions, text, size, _this__u8e3s4);
doRender();
if (!(outMetrics == null)) {
ensureNotNull(glyphs);
outMetrics.f8r_1 = glyphs.i8r_1;
outMetrics.g8r_1 = glyphs.j8r_1;
{
var fmetrics = _this__u8e3s4.d8n(size, null, 2, null);
outMetrics.d8r_1 = fmetrics;
var metrics = outMetrics.e8r_1;
metrics.m8r_1.o8r(fmetrics);
metrics.n8r_1 = glyphs.j8r_1.i();
var tmp = metrics;
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map = glyphs.j8r_1;
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator = tmp0_map.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.drawText.<anonymous>' call
var bb = new BoundsBuilder();
var tmp0_iterator_0 = item.j();
while (tmp0_iterator_0.k()) {
var g = tmp0_iterator_0.l();
var tmp_0 = g.b8s();
add$default(bb, tmp_0, null, 2, null);
}
tmp$ret$0 = bb.c72(null, 1, null);
tmp0_mapTo.c(tmp$ret$0);
}
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
tmp.l8r_1 = tmp$ret$2;
bounds(metrics.l8r_1, metrics.k8r_1);
}
}
return outMetrics;
}
function drawText$default(_this__u8e3s4, ctx, size, text, paint, x, y, fill, renderer, align, outMetrics, fillStyle, stroke, placed, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
x = 0.0;
if (!(($mask0 & 32) === 0))
y = 0.0;
if (!(($mask0 & 64) === 0))
fill = true;
if (!(($mask0 & 128) === 0)) {
var tmp = get_DefaultStringTextRenderer();
renderer = isInterface(tmp, TextRenderer) ? tmp : THROW_CCE();
}
if (!(($mask0 & 256) === 0))
align = Companion_getInstance_45().m8s_1;
if (!(($mask0 & 512) === 0))
outMetrics = null;
if (!(($mask0 & 1024) === 0))
fillStyle = null;
if (!(($mask0 & 2048) === 0))
stroke = null;
if (!(($mask0 & 4096) === 0))
placed = null;
return drawText(_this__u8e3s4, ctx, size, text, paint, x, y, fill, renderer, align, outMetrics, fillStyle, stroke, placed);
}
function getTextBounds(_this__u8e3s4, size, text, out, renderer, align) {
var actions = new BoundBuilderTextRendererActions();
invoke(renderer, actions, text, size, _this__u8e3s4);
_this__u8e3s4.t8m(size, out.m8r_1);
out.n8r_1 = actions.s8t();
var bb = new BoundsBuilder();
var dy = 0.0;
var lineBounds = FastArrayList_init_$Create$();
var offsetY = actions.w8t(align.u8t_1, out.m8r_1);
var tmp0_iterator = actions.q8t_1.j();
while (tmp0_iterator.k()) {
var line = tmp0_iterator.l();
var offsetX = line.a8u(align.t8t_1);
var rect = new Rectangle(-offsetX, +offsetY + dy - out.b8u(), line.y8t_1, line.x8t_1);
var tmp$ret$2;
// Inline function 'com.soywiz.korma.geom.BoundsBuilder.add' call
var tmp0_safe_receiver = rect;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.BoundsBuilder.add.<anonymous>' call
tmp$ret$0 = bb.s71(rect);
tmp$ret$1 = tmp$ret$0;
}
tmp$ret$2 = bb;
lineBounds.c(rect);
dy = dy + line.x8t_1;
}
out.l8r_1 = lineBounds;
bb.a72(out.k8r_1);
return out;
}
function getTextBounds$default(_this__u8e3s4, size, text, out, renderer, align, $mask0, $handler) {
if (!(($mask0 & 4) === 0)) {
out = TextMetrics_init_$Create$(null, null, null, 0, 15, null);
}
if (!(($mask0 & 8) === 0)) {
var tmp = get_DefaultStringTextRenderer();
renderer = isInterface(tmp, TextRenderer) ? tmp : THROW_CCE();
}
if (!(($mask0 & 16) === 0))
align = Companion_getInstance_45().i8s_1;
return getTextBounds(_this__u8e3s4, size, text, out, renderer, align);
}
function BaseTextMetricsResult() {
}
BaseTextMetricsResult.$metadata$ = interfaceMeta('BaseTextMetricsResult');
function PlacedGlyphMetrics$boundsPath$delegate$lambda(this$0) {
return function () {
var tmp$ret$1;
// Inline function 'com.soywiz.korma.geom.shape.buildVectorPath' call
var tmp0_buildVectorPath = VectorPath_init_$Create$(null, null, null, false, 15, null);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.PlacedGlyphMetrics.boundsPath$delegate.<anonymous>.<anonymous>' call
tmp0_buildVectorPath.i7j_1 = false;
var rect_0 = Companion_getInstance_0().zp().u7c(this$0.s8r_1.i8n_1);
rect_0.w71_1 = -this$0.t8r_1.w8m_1;
rect_0.y71_1 = this$0.t8r_1.w8m_1 - this$0.t8r_1.y8m_1;
rect(tmp0_buildVectorPath, rect_0);
tmp$ret$0 = tmp0_buildVectorPath;
tmp$ret$1 = tmp$ret$0;
var tmp = tmp$ret$1;
return applyTransform(tmp, Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null).m76(this$0.q8r_1, this$0.r8r_1).q76(this$0.u8r_1));
};
}
function PlacedGlyphMetrics$boundsPathCurves$delegate$lambda(this$0) {
return function () {
var curves = getCurves(this$0.b8s());
var tmp;
if (!(curves.p7i_1.i() === 4)) {
println('curves=' + curves.p7i_1.i());
tmp = Unit_getInstance();
}
return curves;
};
}
function PlacedGlyphMetrics$caretStart$delegate$lambda(this$0) {
return function () {
var tmp = this$0.c8u().p7i_1.m(3);
return toBezier(tmp.d7i(null, 1, null).e73());
};
}
function PlacedGlyphMetrics$caretEnd$delegate$lambda(this$0) {
return function () {
return this$0.c8u().p7i_1.m(1);
};
}
function PlacedGlyphMetrics(codePoint, x, y, metrics, fontMetrics, transform, index, nline) {
this.p8r_1 = codePoint;
this.q8r_1 = x;
this.r8r_1 = y;
this.s8r_1 = metrics;
this.t8r_1 = fontMetrics;
this.u8r_1 = transform;
this.v8r_1 = index;
this.w8r_1 = nline;
var tmp = this;
tmp.x8r_1 = lazy(PlacedGlyphMetrics$boundsPath$delegate$lambda(this));
var tmp_0 = this;
tmp_0.y8r_1 = lazy(PlacedGlyphMetrics$boundsPathCurves$delegate$lambda(this));
var tmp_1 = this;
tmp_1.z8r_1 = lazy(PlacedGlyphMetrics$caretStart$delegate$lambda(this));
var tmp_2 = this;
tmp_2.a8s_1 = lazy(PlacedGlyphMetrics$caretEnd$delegate$lambda(this));
}
PlacedGlyphMetrics.prototype.d8u = function () {
return this.s8r_1;
};
PlacedGlyphMetrics.prototype.e8u = function () {
return this.t8r_1;
};
PlacedGlyphMetrics.prototype.b8s = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = boundsPath$factory();
tmp$ret$0 = this.x8r_1.l1();
return tmp$ret$0;
};
PlacedGlyphMetrics.prototype.c8u = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = boundsPathCurves$factory();
tmp$ret$0 = this.y8r_1.l1();
return tmp$ret$0;
};
PlacedGlyphMetrics.prototype.f8u = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = caretStart$factory();
tmp$ret$0 = this.z8r_1.l1();
return tmp$ret$0;
};
PlacedGlyphMetrics.prototype.g8u = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = caretEnd$factory();
tmp$ret$0 = this.a8s_1.l1();
return tmp$ret$0;
};
PlacedGlyphMetrics.prototype.h8u = function (x, y, startEnd) {
if (this.b8s().k7t(x, y))
return 0.0;
var tmp0_subject = startEnd;
var tmp;
switch (tmp0_subject) {
case true:
var tmp_0 = this.f8u();
tmp = tmp_0.e7g(0.5, null, 2, null);
break;
case false:
var tmp_1 = this.g8u();
tmp = tmp_1.e7g(0.5, null, 2, null);
break;
case null:
var tmp_2 = Companion_getInstance_4();
var tmp_3 = this.f8u();
var tmp_4 = tmp_3.e7g(0.5, null, 2, null);
var tmp_5 = this.g8u();
var tmp_6 = tmp_5.e7g(0.5, null, 2, null);
tmp = tmp_2.e7a(tmp_4, tmp_6, null, 4, null);
break;
default:
noWhenBranchMatchedException();
break;
}
var middle = tmp;
return Companion_getInstance_4().i7a(middle.d1n(), middle.e1n(), x, y);
};
PlacedGlyphMetrics.prototype.i8u = function (p, startEnd) {
return this.h8u(p.d1n(), p.e1n(), startEnd);
};
PlacedGlyphMetrics.prototype.j8u = function (p, startEnd, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
startEnd = null;
return this.i8u(p, startEnd);
};
PlacedGlyphMetrics.prototype.toString = function () {
return 'PlacedGlyphMetrics(codePoint=' + this.p8r_1 + ', x=' + this.q8r_1 + ', y=' + this.r8r_1 + ', metrics=' + this.s8r_1 + ', fontMetrics=' + this.t8r_1 + ', transform=' + this.u8r_1 + ', index=' + this.v8r_1 + ', nline=' + this.w8r_1 + ')';
};
PlacedGlyphMetrics.prototype.hashCode = function () {
var result = this.p8r_1;
result = imul(result, 31) + getNumberHashCode(this.q8r_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.r8r_1) | 0;
result = imul(result, 31) + this.s8r_1.hashCode() | 0;
result = imul(result, 31) + this.t8r_1.hashCode() | 0;
result = imul(result, 31) + this.u8r_1.hashCode() | 0;
result = imul(result, 31) + this.v8r_1 | 0;
result = imul(result, 31) + this.w8r_1 | 0;
return result;
};
PlacedGlyphMetrics.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof PlacedGlyphMetrics))
return false;
var tmp0_other_with_cast = other instanceof PlacedGlyphMetrics ? other : THROW_CCE();
if (!(this.p8r_1 === tmp0_other_with_cast.p8r_1))
return false;
if (!equals(this.q8r_1, tmp0_other_with_cast.q8r_1))
return false;
if (!equals(this.r8r_1, tmp0_other_with_cast.r8r_1))
return false;
if (!this.s8r_1.equals(tmp0_other_with_cast.s8r_1))
return false;
if (!this.t8r_1.equals(tmp0_other_with_cast.t8r_1))
return false;
if (!this.u8r_1.equals(tmp0_other_with_cast.u8r_1))
return false;
if (!(this.v8r_1 === tmp0_other_with_cast.v8r_1))
return false;
if (!(this.w8r_1 === tmp0_other_with_cast.w8r_1))
return false;
return true;
};
PlacedGlyphMetrics.$metadata$ = classMeta('PlacedGlyphMetrics');
function MultiplePlacedGlyphMetrics() {
this.i8r_1 = FastArrayList_init_$Create$();
this.j8r_1 = FastArrayList_init_$Create$();
}
MultiplePlacedGlyphMetrics.prototype.i = function () {
return this.i8r_1.i();
};
MultiplePlacedGlyphMetrics.prototype.k8u = function (glyph) {
var tmp0_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.i8r_1;
tmp0_plusAssign.c(glyph);
while (this.j8r_1.i() <= glyph.w8r_1) {
this.j8r_1.c(FastArrayList_init_$Create$());
}
this.j8r_1.m(glyph.w8r_1).c(glyph);
};
MultiplePlacedGlyphMetrics.$metadata$ = classMeta('MultiplePlacedGlyphMetrics');
function getTextBoundsWithGlyphs(_this__u8e3s4, size, text, renderer, align) {
var font = _this__u8e3s4;
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = TextMetricsResult_init_$Create$(null, null, null, null, 15, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.getTextBoundsWithGlyphs.<anonymous>' call
drawText$default(font, null, size, text, null, 0.0, 0.0, false, renderer, align, tmp0_also, null, null, null, 7168, null);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function getTextBoundsWithGlyphs$default(_this__u8e3s4, size, text, renderer, align, $mask0, $handler) {
if (!(($mask0 & 4) === 0)) {
var tmp = get_DefaultStringTextRenderer();
renderer = isInterface(tmp, TextRenderer) ? tmp : THROW_CCE();
}
if (!(($mask0 & 8) === 0))
align = Companion_getInstance_45().m8s_1;
return getTextBoundsWithGlyphs(_this__u8e3s4, size, text, renderer, align);
}
function drawText$lambda($fillStyle, $stroke, $ctx, $fill) {
return function () {
var tmp;
if (!($fillStyle == null) ? true : !($stroke == null)) {
var tmp0_safe_receiver = $ctx;
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.vector.Context2d.fillStroke' call
// Inline function 'com.soywiz.korim.vector.Context2d.fillStroke' call
var tmp0_safe_receiver_0 = $stroke;
var tmp12_fillStroke = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.n8u_1;
var tmp1_safe_receiver = $stroke;
var tmp13_fillStroke = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o8u_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.vector.Context2d.fillStroke.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
if (!($fillStyle == null)) {
tmp0_safe_receiver.p8u($fillStyle, null, 2, null);
}
if (!(tmp12_fillStroke == null)) {
if (!(tmp13_fillStroke == null)) {
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
if (tmp12_fillStroke == null ? true : tmp13_fillStroke == null) {
tmp$ret$1 = Unit_getInstance();
break $l$block;
}
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke = tmp13_fillStroke.t7j_1;
var tmp1_stroke = tmp13_fillStroke.w7j_1;
var tmp2_stroke = tmp13_fillStroke.y7j_1;
var tmp3_stroke = tmp13_fillStroke.z7j_1;
var tmp4_stroke = tmp13_fillStroke.a7k_1;
var tmp5_stroke = tmp13_fillStroke.b7k_1;
if (false) {
tmp0_safe_receiver.h8r();
}
var tmp$ret$2;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$2 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
tmp0_safe_receiver.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp0_safe_receiver.x8u(tmp0_stroke);
tmp0_safe_receiver.y8u(tmp1_stroke);
tmp0_safe_receiver.z8u(tmp2_stroke);
tmp0_safe_receiver.a8v(tmp3_stroke);
tmp0_safe_receiver.b8v(tmp4_stroke);
tmp0_safe_receiver.c8v(tmp5_stroke);
tmp0_safe_receiver.d8v(tmp12_fillStroke);
}finally {
tmp0_safe_receiver.e8v();
}
}
} else {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp6_stroke = tmp0_safe_receiver.q8u();
var tmp7_stroke = tmp0_safe_receiver.r8u();
var tmp8_stroke = tmp0_safe_receiver.s8u();
var tmp9_stroke = tmp0_safe_receiver.t8u();
var tmp10_stroke = tmp0_safe_receiver.u8u();
var tmp11_stroke = tmp0_safe_receiver.v8u();
if (false) {
tmp0_safe_receiver.h8r();
}
var tmp$ret$3;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$3 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
tmp0_safe_receiver.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp0_safe_receiver.x8u(tmp6_stroke);
tmp0_safe_receiver.y8u(tmp7_stroke);
tmp0_safe_receiver.z8u(tmp8_stroke);
tmp0_safe_receiver.a8v(tmp9_stroke);
tmp0_safe_receiver.b8v(tmp10_stroke);
tmp0_safe_receiver.c8v(tmp11_stroke);
tmp0_safe_receiver.d8v(tmp12_fillStroke);
}finally {
tmp0_safe_receiver.e8v();
}
}
}
}
tmp = Unit_getInstance();
} else {
var tmp_0;
if ($fill) {
var tmp1_safe_receiver_0 = $ctx;
if (tmp1_safe_receiver_0 == null)
null;
else {
tmp1_safe_receiver_0.m8u(null, 1, null);
}
tmp_0 = Unit_getInstance();
} else {
var tmp2_safe_receiver = $ctx;
if (tmp2_safe_receiver == null)
null;
else {
tmp2_safe_receiver.l8u();
}
tmp_0 = Unit_getInstance();
}
tmp = tmp_0;
}
var tmp3_safe_receiver = $ctx;
if (tmp3_safe_receiver == null)
null;
else {
tmp3_safe_receiver.h8r();
}
return Unit_getInstance();
};
}
function drawText$actions$1($renderer, $text, $size, $fnt, $align, $x, $y, $ctx, $paint, $doRender, $glyphs, $placed) {
this.r8v_1 = $size;
this.s8v_1 = $align;
this.t8v_1 = $x;
this.u8v_1 = $y;
this.v8v_1 = $ctx;
this.w8v_1 = $paint;
this.x8v_1 = $doRender;
this.y8v_1 = $glyphs;
this.z8v_1 = $placed;
TextRendererActions.call(this);
this.q8v_1 = measure($renderer, $text, $size, $fnt);
}
drawText$actions$1.prototype.a8w = function (reader, codePoint) {
var nline = this.m8w();
var dx = this.q8v_1.n8w(this.s8v_1.t8t_1, nline);
var dy = this.q8v_1.w8t(this.s8v_1.u8t_1, this.d8w_1);
var px = this.d1n() + this.t8v_1 - dx;
var py = this.e1n() + this.u8v_1 + dy;
var tmp0_safe_receiver = this.v8v_1;
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.vector.Context2d.keepTransform' call
var t = tmp0_safe_receiver.a87_1.o8n_1;
var a = t.i74_1;
var b = t.j74_1;
var c = t.k74_1;
var d = t.l74_1;
var tx = t.m74_1;
var ty = t.n74_1;
try {
// Inline function 'com.soywiz.korim.font.<no name provided>.put.<anonymous>' call
this.v8v_1.o8w(px, py);
this.v8v_1.q8w(this.p8w());
var tmp0_elvis_lhs = this.k8w_1;
var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? this.w8v_1 : tmp0_elvis_lhs;
this.v8v_1.l8o(tmp1_elvis_lhs == null ? NonePaint_getInstance() : tmp1_elvis_lhs);
this.r8w().n8n(this.v8v_1, this.r8v_1, codePoint, 0.0, 0.0, null, this.c8w_1, reader, this.x8v_1);
}finally {
t.e76(a, b, c, d, tx, ty);
}
}
if (!(this.y8v_1 == null)) {
var glyph = new PlacedGlyphMetrics(codePoint, px, py, this.c8w_1.z4n(), this.d8w_1.z4n(), this.p8w().z4n(), this.y8v_1.i(), nline);
this.y8v_1.k8u(glyph);
}
var tmp1_safe_receiver = this.z8v_1;
if (tmp1_safe_receiver == null)
null;
else
tmp1_safe_receiver(this, codePoint, px, py, this.r8v_1, this.c8w_1, this.d8w_1, this.p8w());
return this.c8w_1;
};
drawText$actions$1.$metadata$ = classMeta(undefined, undefined, undefined, undefined, undefined, TextRendererActions.prototype);
function boundsPath$factory() {
return getPropertyCallableRef('boundsPath', 1, KProperty1, function (receiver) {
return receiver.b8s();
}, null);
}
function boundsPathCurves$factory() {
return getPropertyCallableRef('boundsPathCurves', 1, KProperty1, function (receiver) {
return receiver.c8u();
}, null);
}
function caretStart$factory() {
return getPropertyCallableRef('caretStart', 1, KProperty1, function (receiver) {
return receiver.f8u();
}, null);
}
function caretEnd$factory() {
return getPropertyCallableRef('caretEnd', 1, KProperty1, function (receiver) {
return receiver.g8u();
}, null);
}
function readFont(_this__u8e3s4, preload, props, mipmaps, $cont) {
var tmp = new $readFontCOROUTINE$4(_this__u8e3s4, preload, props, mipmaps, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readFont$default(_this__u8e3s4, preload, props, mipmaps, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
preload = false;
if (!(($mask0 & 2) === 0))
props = Companion_getInstance_35().g8i_1;
if (!(($mask0 & 4) === 0))
mipmaps = true;
return readFont(_this__u8e3s4, preload, props, mipmaps, $cont);
}
function $readFontCOROUTINE$4(_this__u8e3s4, preload, props, mipmaps, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.j8x_1 = _this__u8e3s4;
this.k8x_1 = preload;
this.l8x_1 = props;
this.m8x_1 = mipmaps;
}
$readFontCOROUTINE$4.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 5;
this.o7_1 = 1;
suspendResult = this.j8x_1.g5n(until(0, 16), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.n8x_1 = suspendResult;
this.o8x_1 = readS32BE(this.n8x_1, 0);
if ((this.o8x_1 === 1953784678 ? true : this.o8x_1 === 1330926671) ? true : this.o8x_1 === 65536) {
this.o7_1 = 3;
suspendResult = readTtfFont$default(this.j8x_1, this.k8x_1, false, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 2;
suspendResult = readBitmapFont$default(this.j8x_1, this.l8x_1, this.m8x_1, null, this, 4, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
}
break;
case 2:
this.p8x_1 = suspendResult;
this.o7_1 = 4;
continue $sm;
case 3:
this.p8x_1 = suspendResult;
this.o7_1 = 4;
continue $sm;
case 4:
return this.p8x_1;
case 5:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 5) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$readFontCOROUTINE$4.$metadata$ = classMeta('$readFontCOROUTINE$4', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
var SystemFontRegistryOrNull;
function GlyphPath_init_$Init$(path, colorShape, bitmap, bitmapOffset, bitmapScale, transform, scale, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0)) {
path = VectorPath_init_$Create$(null, null, null, false, 15, null);
}
if (!(($mask0 & 2) === 0))
colorShape = null;
if (!(($mask0 & 4) === 0))
bitmap = null;
if (!(($mask0 & 8) === 0))
bitmapOffset = Point_init_$Create$(0, 0);
if (!(($mask0 & 16) === 0))
bitmapScale = Point_init_$Create$(1, 1);
if (!(($mask0 & 32) === 0)) {
transform = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
if (!(($mask0 & 64) === 0))
scale = 1.0;
GlyphPath.call($this, path, colorShape, bitmap, bitmapOffset, bitmapScale, transform, scale);
return $this;
}
function GlyphPath_init_$Create$(path, colorShape, bitmap, bitmapOffset, bitmapScale, transform, scale, $mask0, $marker) {
return GlyphPath_init_$Init$(path, colorShape, bitmap, bitmapOffset, bitmapScale, transform, scale, $mask0, $marker, Object.create(GlyphPath.prototype));
}
function GlyphPath(path, colorShape, bitmap, bitmapOffset, bitmapScale, transform, scale) {
this.q8x_1 = path;
this.r8x_1 = colorShape;
this.s8x_1 = bitmap;
this.t8x_1 = bitmapOffset;
this.u8x_1 = bitmapScale;
this.v8x_1 = transform;
this.w8x_1 = scale;
}
GlyphPath.prototype.q5n = function () {
return this.q8x_1;
};
GlyphPath.prototype.x8x = function () {
return this.r8x_1;
};
GlyphPath.prototype.y8x = function () {
return this.s8x_1;
};
GlyphPath.prototype.z8x = function () {
return this.t8x_1;
};
GlyphPath.prototype.a8y = function () {
return this.u8x_1;
};
GlyphPath.prototype.p8w = function () {
return this.v8x_1;
};
GlyphPath.prototype.b8y = function () {
return this.s8x_1 == null ? this.r8x_1 == null : false;
};
GlyphPath.prototype.c8y = function (c) {
// Inline function 'com.soywiz.korim.vector.Context2d.keepTransform' call
var t = c.a87_1.o8n_1;
var a = t.i74_1;
var b = t.j74_1;
var c_0 = t.k74_1;
var d = t.l74_1;
var tx = t.m74_1;
var ty = t.n74_1;
try {
// Inline function 'com.soywiz.korim.font.GlyphPath.draw.<anonymous>' call
c.q8w(this.v8x_1);
if (!(this.s8x_1 == null)) {
c.n8o(ensureNotNull(this.s8x_1), this.t8x_1.y72_1, this.t8x_1.z72_1, ensureNotNull(this.s8x_1).d72() * this.u8x_1.y72_1, ensureNotNull(this.s8x_1).e72() * this.u8x_1.z72_1);
} else if (!(this.r8x_1 == null)) {
c.d8y(ensureNotNull(this.r8x_1));
c.h8r();
} else {
draw_1(c, this.q8x_1);
}
}finally {
t.e76(a, b, c_0, d, tx, ty);
}
};
GlyphPath.prototype.toString = function () {
return 'GlyphPath(path=' + this.q8x_1 + ', colorShape=' + this.r8x_1 + ', bitmap=' + this.s8x_1 + ', bitmapOffset=' + this.t8x_1 + ', bitmapScale=' + this.u8x_1 + ', transform=' + this.v8x_1 + ', scale=' + this.w8x_1 + ')';
};
GlyphPath.prototype.hashCode = function () {
var result = this.q8x_1.hashCode();
result = imul(result, 31) + (this.r8x_1 == null ? 0 : hashCode(this.r8x_1)) | 0;
result = imul(result, 31) + (this.s8x_1 == null ? 0 : hashCode(this.s8x_1)) | 0;
result = imul(result, 31) + this.t8x_1.hashCode() | 0;
result = imul(result, 31) + this.u8x_1.hashCode() | 0;
result = imul(result, 31) + this.v8x_1.hashCode() | 0;
result = imul(result, 31) + getNumberHashCode(this.w8x_1) | 0;
return result;
};
GlyphPath.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof GlyphPath))
return false;
var tmp0_other_with_cast = other instanceof GlyphPath ? other : THROW_CCE();
if (!this.q8x_1.equals(tmp0_other_with_cast.q8x_1))
return false;
if (!equals(this.r8x_1, tmp0_other_with_cast.r8x_1))
return false;
if (!equals(this.s8x_1, tmp0_other_with_cast.s8x_1))
return false;
if (!this.t8x_1.equals(tmp0_other_with_cast.t8x_1))
return false;
if (!this.u8x_1.equals(tmp0_other_with_cast.u8x_1))
return false;
if (!this.v8x_1.equals(tmp0_other_with_cast.v8x_1))
return false;
if (!equals(this.w8x_1, tmp0_other_with_cast.w8x_1))
return false;
return true;
};
GlyphPath.$metadata$ = classMeta('GlyphPath', [Drawable]);
function FontMetrics_init_$Init$(size, top, ascent, baseline, descent, bottom, leading, maxWidth, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
size = 0.0;
if (!(($mask0 & 2) === 0))
top = 0.0;
if (!(($mask0 & 4) === 0))
ascent = 0.0;
if (!(($mask0 & 8) === 0))
baseline = 0.0;
if (!(($mask0 & 16) === 0))
descent = 0.0;
if (!(($mask0 & 32) === 0))
bottom = 0.0;
if (!(($mask0 & 64) === 0))
leading = 0.0;
if (!(($mask0 & 128) === 0))
maxWidth = 0.0;
FontMetrics.call($this, size, top, ascent, baseline, descent, bottom, leading, maxWidth);
return $this;
}
function FontMetrics_init_$Create$(size, top, ascent, baseline, descent, bottom, leading, maxWidth, $mask0, $marker) {
return FontMetrics_init_$Init$(size, top, ascent, baseline, descent, bottom, leading, maxWidth, $mask0, $marker, Object.create(FontMetrics.prototype));
}
function FontMetrics(size, top, ascent, baseline, descent, bottom, leading, maxWidth) {
this.u8m_1 = size;
this.v8m_1 = top;
this.w8m_1 = ascent;
this.x8m_1 = baseline;
this.y8m_1 = descent;
this.z8m_1 = bottom;
this.a8n_1 = leading;
this.b8n_1 = maxWidth;
}
FontMetrics.prototype.e8y = function (_set____db54di) {
this.u8m_1 = _set____db54di;
};
FontMetrics.prototype.i = function () {
return this.u8m_1;
};
FontMetrics.prototype.r7c = function (_set____db54di) {
this.v8m_1 = _set____db54di;
};
FontMetrics.prototype.y73 = function () {
return this.v8m_1;
};
FontMetrics.prototype.f8y = function (_set____db54di) {
this.w8m_1 = _set____db54di;
};
FontMetrics.prototype.b8u = function () {
return this.w8m_1;
};
FontMetrics.prototype.g8y = function (_set____db54di) {
this.x8m_1 = _set____db54di;
};
FontMetrics.prototype.h8y = function () {
return this.x8m_1;
};
FontMetrics.prototype.i8y = function (_set____db54di) {
this.y8m_1 = _set____db54di;
};
FontMetrics.prototype.j8y = function () {
return this.y8m_1;
};
FontMetrics.prototype.k8y = function (_set____db54di) {
this.z8m_1 = _set____db54di;
};
FontMetrics.prototype.a74 = function () {
return this.z8m_1;
};
FontMetrics.prototype.l8y = function (_set____db54di) {
this.a8n_1 = _set____db54di;
};
FontMetrics.prototype.m8y = function () {
return this.a8n_1;
};
FontMetrics.prototype.n8y = function (_set____db54di) {
this.b8n_1 = _set____db54di;
};
FontMetrics.prototype.o8y = function () {
return this.b8n_1;
};
FontMetrics.prototype.p8y = function () {
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = this.w8m_1;
var tmp1_max = this.v8m_1;
tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
return tmp$ret$0;
};
FontMetrics.prototype.q8y = function () {
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = this.y8m_1;
var tmp1_min = this.z8m_1;
tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
return tmp$ret$0;
};
FontMetrics.prototype.r8y = function () {
return this.w8m_1 - this.y8m_1;
};
FontMetrics.prototype.t8w = function () {
return this.p8y() - this.q8y();
};
FontMetrics.prototype.o8r = function (other) {
return this.s8y(other, 1.0);
};
FontMetrics.prototype.c8n = function (other, size) {
return this.s8y(other, size / other.u8m_1);
};
FontMetrics.prototype.s8y = function (other, scale) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.FontMetrics.copyFromScaled.<anonymous>' call
this.u8m_1 = other.u8m_1 * scale;
this.v8m_1 = other.v8m_1 * scale;
this.w8m_1 = other.w8m_1 * scale;
this.x8m_1 = other.x8m_1 * scale;
this.y8m_1 = other.y8m_1 * scale;
this.z8m_1 = other.z8m_1 * scale;
this.a8n_1 = other.a8n_1 * scale;
this.b8n_1 = other.b8n_1 * scale;
tmp$ret$0 = this;
return tmp$ret$0;
};
FontMetrics.prototype.toString = function () {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.FontMetrics.toString.<anonymous>' call
tmp0_apply.gc('FontMetrics(');
tmp0_apply.gc('size=' + toIntRound(this.u8m_1) + ', ');
tmp0_apply.gc('top=' + toIntRound(this.v8m_1) + ', ');
tmp0_apply.gc('ascent=' + toIntRound(this.w8m_1) + ', ');
tmp0_apply.gc('baseline=' + toIntRound(this.x8m_1) + ', ');
tmp0_apply.gc('descent=' + toIntRound(this.y8m_1) + ', ');
tmp0_apply.gc('bottom=' + toIntRound(this.z8m_1) + ', ');
tmp0_apply.gc('leading=' + toIntRound(this.a8n_1) + ', ');
tmp0_apply.gc('emHeight=' + toIntRound(this.r8y()) + ', ');
tmp0_apply.gc('lineHeight=' + toIntRound(this.t8w()));
tmp0_apply.gc(')');
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
};
FontMetrics.prototype.z4n = function () {
return this.t8y(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255, null);
};
FontMetrics.prototype.u8y = function (size, top, ascent, baseline, descent, bottom, leading, maxWidth) {
return new FontMetrics(size, top, ascent, baseline, descent, bottom, leading, maxWidth);
};
FontMetrics.prototype.t8y = function (size, top, ascent, baseline, descent, bottom, leading, maxWidth, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
size = this.u8m_1;
if (!(($mask0 & 2) === 0))
top = this.v8m_1;
if (!(($mask0 & 4) === 0))
ascent = this.w8m_1;
if (!(($mask0 & 8) === 0))
baseline = this.x8m_1;
if (!(($mask0 & 16) === 0))
descent = this.y8m_1;
if (!(($mask0 & 32) === 0))
bottom = this.z8m_1;
if (!(($mask0 & 64) === 0))
leading = this.a8n_1;
if (!(($mask0 & 128) === 0))
maxWidth = this.b8n_1;
return this.u8y(size, top, ascent, baseline, descent, bottom, leading, maxWidth);
};
FontMetrics.prototype.hashCode = function () {
var result = getNumberHashCode(this.u8m_1);
result = imul(result, 31) + getNumberHashCode(this.v8m_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.w8m_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.x8m_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.y8m_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.z8m_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.a8n_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.b8n_1) | 0;
return result;
};
FontMetrics.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof FontMetrics))
return false;
var tmp0_other_with_cast = other instanceof FontMetrics ? other : THROW_CCE();
if (!equals(this.u8m_1, tmp0_other_with_cast.u8m_1))
return false;
if (!equals(this.v8m_1, tmp0_other_with_cast.v8m_1))
return false;
if (!equals(this.w8m_1, tmp0_other_with_cast.w8m_1))
return false;
if (!equals(this.x8m_1, tmp0_other_with_cast.x8m_1))
return false;
if (!equals(this.y8m_1, tmp0_other_with_cast.y8m_1))
return false;
if (!equals(this.z8m_1, tmp0_other_with_cast.z8m_1))
return false;
if (!equals(this.a8n_1, tmp0_other_with_cast.a8n_1))
return false;
if (!equals(this.b8n_1, tmp0_other_with_cast.b8n_1))
return false;
return true;
};
FontMetrics.$metadata$ = classMeta('FontMetrics');
function GlyphMetrics_init_$Init$(size, existing, codePoint, bounds, xadvance, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
size = 0.0;
if (!(($mask0 & 2) === 0))
existing = false;
if (!(($mask0 & 4) === 0))
codePoint = 0;
if (!(($mask0 & 8) === 0))
bounds = Companion_getInstance_0().zp();
if (!(($mask0 & 16) === 0))
xadvance = 0.0;
GlyphMetrics.call($this, size, existing, codePoint, bounds, xadvance);
return $this;
}
function GlyphMetrics_init_$Create$(size, existing, codePoint, bounds, xadvance, $mask0, $marker) {
return GlyphMetrics_init_$Init$(size, existing, codePoint, bounds, xadvance, $mask0, $marker, Object.create(GlyphMetrics.prototype));
}
function GlyphMetrics(size, existing, codePoint, bounds, xadvance) {
this.f8n_1 = size;
this.g8n_1 = existing;
this.h8n_1 = codePoint;
this.i8n_1 = bounds;
this.j8n_1 = xadvance;
}
GlyphMetrics.prototype.v8y = function () {
return this.g8n_1;
};
GlyphMetrics.prototype.w8y = function () {
return this.h8n_1;
};
GlyphMetrics.prototype.o7i = function () {
return this.i8n_1;
};
GlyphMetrics.prototype.x8y = function () {
return this.j8n_1;
};
GlyphMetrics.prototype.b74 = function () {
return this.i8n_1.b74();
};
GlyphMetrics.prototype.y73 = function () {
return this.i8n_1.y73();
};
GlyphMetrics.prototype.d72 = function () {
return this.i8n_1.x71_1;
};
GlyphMetrics.prototype.e72 = function () {
return this.i8n_1.y71_1;
};
GlyphMetrics.prototype.z4n = function () {
var tmp = this.i8n_1.z4n();
return this.y8y(0.0, false, 0, tmp, 0.0, 23, null);
};
GlyphMetrics.prototype.k8n = function (other, size, codePoint) {
return this.z8y(other, size / other.f8n_1, codePoint);
};
GlyphMetrics.prototype.z8y = function (other, scale, codePoint) {
this.f8n_1 = other.f8n_1;
this.g8n_1 = other.g8n_1;
this.h8n_1 = codePoint;
this.i8n_1.u72(other.i8n_1.v71_1 * scale, other.i8n_1.w71_1 * scale, other.i8n_1.x71_1 * scale, other.i8n_1.y71_1 * scale);
this.j8n_1 = other.j8n_1 * scale;
return this;
};
GlyphMetrics.prototype.toString = function () {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.GlyphMetrics.toString.<anonymous>' call
tmp0_apply.gc('GlyphMetrics(');
tmp0_apply.gc('codePoint=' + this.h8n_1 + " ('" + new Char(numberToChar(this.h8n_1)) + "'), ");
tmp0_apply.gc('existing=' + this.g8n_1 + ', ');
tmp0_apply.gc('xadvance=' + roundToInt(this.j8n_1) + ', ');
tmp0_apply.gc('bounds=' + new RectangleInt(this.i8n_1.f7d()));
tmp0_apply.gc(')');
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
};
GlyphMetrics.prototype.a8z = function (size, existing, codePoint, bounds, xadvance) {
return new GlyphMetrics(size, existing, codePoint, bounds, xadvance);
};
GlyphMetrics.prototype.y8y = function (size, existing, codePoint, bounds, xadvance, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
size = this.f8n_1;
if (!(($mask0 & 2) === 0))
existing = this.g8n_1;
if (!(($mask0 & 4) === 0))
codePoint = this.h8n_1;
if (!(($mask0 & 8) === 0))
bounds = this.i8n_1;
if (!(($mask0 & 16) === 0))
xadvance = this.j8n_1;
return this.a8z(size, existing, codePoint, bounds, xadvance);
};
GlyphMetrics.prototype.hashCode = function () {
var result = getNumberHashCode(this.f8n_1);
result = imul(result, 31) + (this.g8n_1 | 0) | 0;
result = imul(result, 31) + this.h8n_1 | 0;
result = imul(result, 31) + this.i8n_1.hashCode() | 0;
result = imul(result, 31) + getNumberHashCode(this.j8n_1) | 0;
return result;
};
GlyphMetrics.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof GlyphMetrics))
return false;
var tmp0_other_with_cast = other instanceof GlyphMetrics ? other : THROW_CCE();
if (!equals(this.f8n_1, tmp0_other_with_cast.f8n_1))
return false;
if (!(this.g8n_1 === tmp0_other_with_cast.g8n_1))
return false;
if (!(this.h8n_1 === tmp0_other_with_cast.h8n_1))
return false;
if (!this.i8n_1.equals(tmp0_other_with_cast.i8n_1))
return false;
if (!equals(this.j8n_1, tmp0_other_with_cast.j8n_1))
return false;
return true;
};
GlyphMetrics.$metadata$ = classMeta('GlyphMetrics');
function TextMetrics_init_$Init$(bounds, lineBounds, fontMetrics, nlines, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
bounds = Companion_getInstance_0().zp();
if (!(($mask0 & 2) === 0))
lineBounds = emptyList();
if (!(($mask0 & 4) === 0)) {
fontMetrics = FontMetrics_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255, null);
}
if (!(($mask0 & 8) === 0))
nlines = 0;
TextMetrics.call($this, bounds, lineBounds, fontMetrics, nlines);
return $this;
}
function TextMetrics_init_$Create$(bounds, lineBounds, fontMetrics, nlines, $mask0, $marker) {
return TextMetrics_init_$Init$(bounds, lineBounds, fontMetrics, nlines, $mask0, $marker, Object.create(TextMetrics.prototype));
}
function TextMetrics(bounds, lineBounds, fontMetrics, nlines) {
this.k8r_1 = bounds;
this.l8r_1 = lineBounds;
this.m8r_1 = fontMetrics;
this.n8r_1 = nlines;
}
TextMetrics.prototype.b8z = function () {
var tmp0_elvis_lhs = firstOrNull_0(this.l8r_1);
return tmp0_elvis_lhs == null ? Companion_getInstance_0().zp() : tmp0_elvis_lhs;
};
TextMetrics.prototype.b74 = function () {
return this.k8r_1.b74();
};
TextMetrics.prototype.y73 = function () {
return this.k8r_1.y73();
};
TextMetrics.prototype.d72 = function () {
return this.k8r_1.x71_1;
};
TextMetrics.prototype.e72 = function () {
return this.k8r_1.y71_1;
};
TextMetrics.prototype.c8z = function () {
return -this.b74();
};
TextMetrics.prototype.d8z = function () {
return this.b8z().y71_1 + this.b8z().y73();
};
TextMetrics.prototype.b8u = function () {
return this.m8r_1.w8m_1;
};
TextMetrics.prototype.toString = function () {
return 'TextMetrics[' + get_niceStr(this.b74()) + ', ' + get_niceStr(this.y73()) + ', ' + get_niceStr(this.d72()) + ', ' + get_niceStr(this.e72()) + '][' + get_niceStr(this.c8z()) + ', ' + get_niceStr(this.d8z()) + ']';
};
TextMetrics.prototype.hashCode = function () {
var result = this.k8r_1.hashCode();
result = imul(result, 31) + hashCode(this.l8r_1) | 0;
result = imul(result, 31) + this.m8r_1.hashCode() | 0;
result = imul(result, 31) + this.n8r_1 | 0;
return result;
};
TextMetrics.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof TextMetrics))
return false;
var tmp0_other_with_cast = other instanceof TextMetrics ? other : THROW_CCE();
if (!this.k8r_1.equals(tmp0_other_with_cast.k8r_1))
return false;
if (!equals(this.l8r_1, tmp0_other_with_cast.l8r_1))
return false;
if (!this.m8r_1.equals(tmp0_other_with_cast.m8r_1))
return false;
if (!(this.n8r_1 === tmp0_other_with_cast.n8r_1))
return false;
return true;
};
TextMetrics.$metadata$ = classMeta('TextMetrics');
var _nativeSystemFontProvider;
function DataIndex_init_$Init$($this) {
var tmp$ret$0;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$0 = new Int32Array([0]);
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.byteArrayOf' call
tmp$ret$1 = new Int8Array([]);
DataIndex.call($this, tmp, tmp$ret$1);
return $this;
}
function DataIndex_init_$Create$() {
return DataIndex_init_$Init$(Object.create(DataIndex.prototype));
}
var Op_version_instance;
var Op_Copyright_instance;
var Op_Notice_instance;
var Op_isFixedPitch_instance;
var Op_FullName_instance;
var Op_ItalicAngle_instance;
var Op_FamilyName_instance;
var Op_UnderlinePosition_instance;
var Op_Weight_instance;
var Op_UnderlineThickness_instance;
var Op_FontBBox_instance;
var Op_PaintType_instance;
var Op_BlueValues_instance;
var Op_CharstringType_instance;
var Op_OtherBlues_instance;
var Op_FontMatrix_instance;
var Op_FamilyBlues_instance;
var Op_StrokeWidth_instance;
var Op_FamilyOtherBlues_instance;
var Op_BlueScale_instance;
var Op_StdHW_instance;
var Op_BlueShift_instance;
var Op_StdVW_instance;
var Op_BlueFuzz_instance;
var Op_StemSnapH_instance;
var Op_UniqueID_instance;
var Op_StemSnapV_instance;
var Op_XUID_instance;
var Op_ForceBold_instance;
var Op_charset_instance;
var Op_Encoding_instance;
var Op_CharStrings_instance;
var Op_LanguageGroup_instance;
var Op_Private_instance;
var Op_ExpansionFactor_instance;
var Op_Subrs_instance;
var Op_initialRandomSeed_instance;
var Op_defaultWidthX_instance;
var Op_SyntheicBase_instance;
var Op_nominalWidthX_instance;
var Op_PostScript_instance;
var Op_vsindex_instance;
var Op_BaseFontName_instance;
var Op_blend_instance;
var Op_BaseFontBlend_instance;
var Op_vstore_instance;
var Op_maxstack_instance;
var Op_ROS_instance;
var Op_CIDFontVersion_instance;
var Op_CIDFontRevision_instance;
var Op_CIDFontType_instance;
var Op_CIDCount_instance;
var Op_UIDBase_instance;
var Op_FDArray_instance;
var Op_FDSelect_instance;
var Op_FontName_instance;
function Companion_13() {
Companion_instance_13 = this;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy = values_0();
var capacity = coerceAtLeast(mapCapacity(tmp0_associateBy.length), 16);
var tmp$ret$1;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo = LinkedHashMap_init_$Create$_0(capacity);
var indexedObject = tmp0_associateBy;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.Companion.VALUES_BY_ID.<anonymous>' call
tmp$ret$0 = element.g8z_1;
tmp0_associateByTo.a(tmp$ret$0, element);
}
tmp$ret$1 = tmp0_associateByTo;
tmp$ret$2 = tmp$ret$1;
tmp.h8z_1 = toIntMap(tmp$ret$2);
}
Companion_13.prototype.m = function (id) {
return this.h8z_1.m(id);
};
Companion_13.$metadata$ = objectMeta('Companion');
var Companion_instance_13;
function Companion_getInstance_26() {
Op_initEntries();
if (Companion_instance_13 == null)
new Companion_13();
return Companion_instance_13;
}
function values_0() {
return [Op_version_getInstance(), Op_Copyright_getInstance(), Op_Notice_getInstance(), Op_isFixedPitch_getInstance(), Op_FullName_getInstance(), Op_ItalicAngle_getInstance(), Op_FamilyName_getInstance(), Op_UnderlinePosition_getInstance(), Op_Weight_getInstance(), Op_UnderlineThickness_getInstance(), Op_FontBBox_getInstance(), Op_PaintType_getInstance(), Op_BlueValues_getInstance(), Op_CharstringType_getInstance(), Op_OtherBlues_getInstance(), Op_FontMatrix_getInstance(), Op_FamilyBlues_getInstance(), Op_StrokeWidth_getInstance(), Op_FamilyOtherBlues_getInstance(), Op_BlueScale_getInstance(), Op_StdHW_getInstance(), Op_BlueShift_getInstance(), Op_StdVW_getInstance(), Op_BlueFuzz_getInstance(), Op_StemSnapH_getInstance(), Op_UniqueID_getInstance(), Op_StemSnapV_getInstance(), Op_XUID_getInstance(), Op_ForceBold_getInstance(), Op_charset_getInstance(), Op_Encoding_getInstance(), Op_CharStrings_getInstance(), Op_LanguageGroup_getInstance(), Op_Private_getInstance(), Op_ExpansionFactor_getInstance(), Op_Subrs_getInstance(), Op_initialRandomSeed_getInstance(), Op_defaultWidthX_getInstance(), Op_SyntheicBase_getInstance(), Op_nominalWidthX_getInstance(), Op_PostScript_getInstance(), Op_vsindex_getInstance(), Op_BaseFontName_getInstance(), Op_blend_getInstance(), Op_BaseFontBlend_getInstance(), Op_vstore_getInstance(), Op_maxstack_getInstance(), Op_ROS_getInstance(), Op_CIDFontVersion_getInstance(), Op_CIDFontRevision_getInstance(), Op_CIDFontType_getInstance(), Op_CIDCount_getInstance(), Op_UIDBase_getInstance(), Op_FDArray_getInstance(), Op_FDSelect_getInstance(), Op_FontName_getInstance()];
}
var Op_entriesInitialized;
function Op_initEntries() {
if (Op_entriesInitialized)
return Unit_getInstance();
Op_entriesInitialized = true;
Op_version_instance = new Op('version', 0, 0);
Op_Copyright_instance = new Op('Copyright', 1, 3072);
Op_Notice_instance = new Op('Notice', 2, 1);
Op_isFixedPitch_instance = new Op('isFixedPitch', 3, 3073);
Op_FullName_instance = new Op('FullName', 4, 2);
Op_ItalicAngle_instance = new Op('ItalicAngle', 5, 3074);
Op_FamilyName_instance = new Op('FamilyName', 6, 3);
Op_UnderlinePosition_instance = new Op('UnderlinePosition', 7, 3075);
Op_Weight_instance = new Op('Weight', 8, 4);
Op_UnderlineThickness_instance = new Op('UnderlineThickness', 9, 3076);
Op_FontBBox_instance = new Op('FontBBox', 10, 5);
Op_PaintType_instance = new Op('PaintType', 11, 3077);
Op_BlueValues_instance = new Op('BlueValues', 12, 6);
Op_CharstringType_instance = new Op('CharstringType', 13, 3078);
Op_OtherBlues_instance = new Op('OtherBlues', 14, 7);
Op_FontMatrix_instance = new Op('FontMatrix', 15, 3079);
Op_FamilyBlues_instance = new Op('FamilyBlues', 16, 8);
Op_StrokeWidth_instance = new Op('StrokeWidth', 17, 3080);
Op_FamilyOtherBlues_instance = new Op('FamilyOtherBlues', 18, 9);
Op_BlueScale_instance = new Op('BlueScale', 19, 3081);
Op_StdHW_instance = new Op('StdHW', 20, 10);
Op_BlueShift_instance = new Op('BlueShift', 21, 3082);
Op_StdVW_instance = new Op('StdVW', 22, 11);
Op_BlueFuzz_instance = new Op('BlueFuzz', 23, 3083);
Op_StemSnapH_instance = new Op('StemSnapH', 24, 3084);
Op_UniqueID_instance = new Op('UniqueID', 25, 13);
Op_StemSnapV_instance = new Op('StemSnapV', 26, 3085);
Op_XUID_instance = new Op('XUID', 27, 14);
Op_ForceBold_instance = new Op('ForceBold', 28, 3086);
Op_charset_instance = new Op('charset', 29, 15);
Op_Encoding_instance = new Op('Encoding', 30, 16);
Op_CharStrings_instance = new Op('CharStrings', 31, 17);
Op_LanguageGroup_instance = new Op('LanguageGroup', 32, 3089);
Op_Private_instance = new Op('Private', 33, 18);
Op_ExpansionFactor_instance = new Op('ExpansionFactor', 34, 3090);
Op_Subrs_instance = new Op('Subrs', 35, 19);
Op_initialRandomSeed_instance = new Op('initialRandomSeed', 36, 3091);
Op_defaultWidthX_instance = new Op('defaultWidthX', 37, 20);
Op_SyntheicBase_instance = new Op('SyntheicBase', 38, 3092);
Op_nominalWidthX_instance = new Op('nominalWidthX', 39, 21);
Op_PostScript_instance = new Op('PostScript', 40, 3093);
Op_vsindex_instance = new Op('vsindex', 41, 22);
Op_BaseFontName_instance = new Op('BaseFontName', 42, 3094);
Op_blend_instance = new Op('blend', 43, 23);
Op_BaseFontBlend_instance = new Op('BaseFontBlend', 44, 3095);
Op_vstore_instance = new Op('vstore', 45, 24);
Op_maxstack_instance = new Op('maxstack', 46, 25);
Op_ROS_instance = new Op('ROS', 47, 3102);
Op_CIDFontVersion_instance = new Op('CIDFontVersion', 48, 3103);
Op_CIDFontRevision_instance = new Op('CIDFontRevision', 49, 3104);
Op_CIDFontType_instance = new Op('CIDFontType', 50, 3105);
Op_CIDCount_instance = new Op('CIDCount', 51, 3106);
Op_UIDBase_instance = new Op('UIDBase', 52, 3107);
Op_FDArray_instance = new Op('FDArray', 53, 3108);
Op_FDSelect_instance = new Op('FDSelect', 54, 3109);
Op_FontName_instance = new Op('FontName', 55, 3110);
Companion_getInstance_26();
}
function GlyphPath_0(path, advanceWidth) {
this.i8z_1 = path;
this.j8z_1 = advanceWidth;
}
GlyphPath_0.prototype.q5n = function () {
return this.i8z_1;
};
GlyphPath_0.prototype.k8z = function () {
return this.j8z_1;
};
GlyphPath_0.prototype.toString = function () {
return 'GlyphPath(path=' + this.i8z_1 + ', advanceWidth=' + this.j8z_1 + ')';
};
GlyphPath_0.prototype.hashCode = function () {
var result = this.i8z_1.hashCode();
result = imul(result, 31) + getNumberHashCode(this.j8z_1) | 0;
return result;
};
GlyphPath_0.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof GlyphPath_0))
return false;
var tmp0_other_with_cast = other instanceof GlyphPath_0 ? other : THROW_CCE();
if (!this.i8z_1.equals(tmp0_other_with_cast.i8z_1))
return false;
if (!equals(this.j8z_1, tmp0_other_with_cast.j8z_1))
return false;
return true;
};
GlyphPath_0.$metadata$ = classMeta('GlyphPath');
function CFFResult(charstringsIndex, globalSubrIndex, localSubrsIndex, privateDict) {
this.l8z_1 = charstringsIndex;
this.m8z_1 = globalSubrIndex;
this.n8z_1 = localSubrsIndex;
this.o8z_1 = privateDict;
var tmp = this;
var tmp0_safe_receiver = this.o8z_1.q(Op_defaultWidthX_getInstance());
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : firstOrNull_0(tmp0_safe_receiver);
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : numberToDouble(tmp1_safe_receiver);
tmp.p8z_1 = tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs;
var tmp_0 = this;
var tmp0_safe_receiver_0 = this.o8z_1.q(Op_nominalWidthX_getInstance());
var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : firstOrNull_0(tmp0_safe_receiver_0);
var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : numberToDouble(tmp1_safe_receiver_0);
tmp_0.q8z_1 = tmp2_elvis_lhs_0 == null ? 0.0 : tmp2_elvis_lhs_0;
}
CFFResult.prototype.r8z = function (index, flipY) {
var tmp = this.p8z_1;
var tmp_0 = this.q8z_1;
var evalCtx = EvalContext_init_$Create$(this.m8z_1, this.n8z_1, tmp, tmp_0, index, null, 32, null);
var vp = VectorPath_init_$Create$(null, null, null, false, 15, null);
var bytes = this.l8z_1.m(index);
var tmp_1 = CharStringType2_getInstance();
var tmp_2 = openFastStream$default(bytes, 0, 1, null);
tmp_1.u8z(vp, tmp_2, evalCtx, null, 0, 24, null);
if (flipY) {
vp.h76(1.0, -1.0);
}
return new GlyphPath_0(vp, evalCtx.e90_1);
};
CFFResult.prototype.g90 = function (index, flipY, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
flipY = true;
return this.r8z(index, flipY);
};
CFFResult.$metadata$ = classMeta('CFFResult');
function DataIndex(offsets, bytes) {
this.s8z_1 = offsets;
this.t8z_1 = bytes;
}
DataIndex.prototype.i = function () {
return this.s8z_1.length - 1 | 0;
};
DataIndex.prototype.h90 = function (index) {
return this.s8z_1[index + 1 | 0] - this.s8z_1[index] | 0;
};
DataIndex.prototype.m = function (index) {
return copyOfRange(this.t8z_1, this.s8z_1[index], this.s8z_1[index + 1 | 0]);
};
DataIndex.prototype.i90 = function () {
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map = until(0, this.i());
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var inductionVariable = tmp0_map.r1_1;
var last = tmp0_map.s1_1;
if (inductionVariable <= last)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.DataIndex.toList.<anonymous>' call
tmp$ret$0 = this.m(item);
tmp0_mapTo.c(tmp$ret$0);
}
while (!(item === last));
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
};
DataIndex.prototype.j = function () {
return this.i90().j();
};
DataIndex.prototype.toString = function () {
var tmp = this.i();
var tmp_0 = toList_0(this.s8z_1);
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map = until(0, this.i());
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var inductionVariable = tmp0_map.r1_1;
var last = tmp0_map.s1_1;
if (inductionVariable <= last)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.DataIndex.toString.<anonymous>' call
tmp$ret$0 = this.h90(item);
tmp0_mapTo.c(tmp$ret$0);
}
while (!(item === last));
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
return 'DataIndex[' + tmp + '](' + tmp_0 + ')(' + tmp$ret$2 + ')';
};
DataIndex.$metadata$ = classMeta('DataIndex', [Iterable]);
function Op(name, ordinal, id) {
Enum.call(this, name, ordinal);
this.g8z_1 = id;
}
Op.prototype.c1n = function () {
return this.g8z_1;
};
Op.$metadata$ = classMeta('Op', [Token], undefined, undefined, undefined, Enum.prototype);
function Op_version_getInstance() {
Op_initEntries();
return Op_version_instance;
}
function Op_Copyright_getInstance() {
Op_initEntries();
return Op_Copyright_instance;
}
function Op_Notice_getInstance() {
Op_initEntries();
return Op_Notice_instance;
}
function Op_isFixedPitch_getInstance() {
Op_initEntries();
return Op_isFixedPitch_instance;
}
function Op_FullName_getInstance() {
Op_initEntries();
return Op_FullName_instance;
}
function Op_ItalicAngle_getInstance() {
Op_initEntries();
return Op_ItalicAngle_instance;
}
function Op_FamilyName_getInstance() {
Op_initEntries();
return Op_FamilyName_instance;
}
function Op_UnderlinePosition_getInstance() {
Op_initEntries();
return Op_UnderlinePosition_instance;
}
function Op_Weight_getInstance() {
Op_initEntries();
return Op_Weight_instance;
}
function Op_UnderlineThickness_getInstance() {
Op_initEntries();
return Op_UnderlineThickness_instance;
}
function Op_FontBBox_getInstance() {
Op_initEntries();
return Op_FontBBox_instance;
}
function Op_PaintType_getInstance() {
Op_initEntries();
return Op_PaintType_instance;
}
function Op_BlueValues_getInstance() {
Op_initEntries();
return Op_BlueValues_instance;
}
function Op_CharstringType_getInstance() {
Op_initEntries();
return Op_CharstringType_instance;
}
function Op_OtherBlues_getInstance() {
Op_initEntries();
return Op_OtherBlues_instance;
}
function Op_FontMatrix_getInstance() {
Op_initEntries();
return Op_FontMatrix_instance;
}
function Op_FamilyBlues_getInstance() {
Op_initEntries();
return Op_FamilyBlues_instance;
}
function Op_StrokeWidth_getInstance() {
Op_initEntries();
return Op_StrokeWidth_instance;
}
function Op_FamilyOtherBlues_getInstance() {
Op_initEntries();
return Op_FamilyOtherBlues_instance;
}
function Op_BlueScale_getInstance() {
Op_initEntries();
return Op_BlueScale_instance;
}
function Op_StdHW_getInstance() {
Op_initEntries();
return Op_StdHW_instance;
}
function Op_BlueShift_getInstance() {
Op_initEntries();
return Op_BlueShift_instance;
}
function Op_StdVW_getInstance() {
Op_initEntries();
return Op_StdVW_instance;
}
function Op_BlueFuzz_getInstance() {
Op_initEntries();
return Op_BlueFuzz_instance;
}
function Op_StemSnapH_getInstance() {
Op_initEntries();
return Op_StemSnapH_instance;
}
function Op_UniqueID_getInstance() {
Op_initEntries();
return Op_UniqueID_instance;
}
function Op_StemSnapV_getInstance() {
Op_initEntries();
return Op_StemSnapV_instance;
}
function Op_XUID_getInstance() {
Op_initEntries();
return Op_XUID_instance;
}
function Op_ForceBold_getInstance() {
Op_initEntries();
return Op_ForceBold_instance;
}
function Op_charset_getInstance() {
Op_initEntries();
return Op_charset_instance;
}
function Op_Encoding_getInstance() {
Op_initEntries();
return Op_Encoding_instance;
}
function Op_CharStrings_getInstance() {
Op_initEntries();
return Op_CharStrings_instance;
}
function Op_LanguageGroup_getInstance() {
Op_initEntries();
return Op_LanguageGroup_instance;
}
function Op_Private_getInstance() {
Op_initEntries();
return Op_Private_instance;
}
function Op_ExpansionFactor_getInstance() {
Op_initEntries();
return Op_ExpansionFactor_instance;
}
function Op_Subrs_getInstance() {
Op_initEntries();
return Op_Subrs_instance;
}
function Op_initialRandomSeed_getInstance() {
Op_initEntries();
return Op_initialRandomSeed_instance;
}
function Op_defaultWidthX_getInstance() {
Op_initEntries();
return Op_defaultWidthX_instance;
}
function Op_SyntheicBase_getInstance() {
Op_initEntries();
return Op_SyntheicBase_instance;
}
function Op_nominalWidthX_getInstance() {
Op_initEntries();
return Op_nominalWidthX_instance;
}
function Op_PostScript_getInstance() {
Op_initEntries();
return Op_PostScript_instance;
}
function Op_vsindex_getInstance() {
Op_initEntries();
return Op_vsindex_instance;
}
function Op_BaseFontName_getInstance() {
Op_initEntries();
return Op_BaseFontName_instance;
}
function Op_blend_getInstance() {
Op_initEntries();
return Op_blend_instance;
}
function Op_BaseFontBlend_getInstance() {
Op_initEntries();
return Op_BaseFontBlend_instance;
}
function Op_vstore_getInstance() {
Op_initEntries();
return Op_vstore_instance;
}
function Op_maxstack_getInstance() {
Op_initEntries();
return Op_maxstack_instance;
}
function Op_ROS_getInstance() {
Op_initEntries();
return Op_ROS_instance;
}
function Op_CIDFontVersion_getInstance() {
Op_initEntries();
return Op_CIDFontVersion_instance;
}
function Op_CIDFontRevision_getInstance() {
Op_initEntries();
return Op_CIDFontRevision_instance;
}
function Op_CIDFontType_getInstance() {
Op_initEntries();
return Op_CIDFontType_instance;
}
function Op_CIDCount_getInstance() {
Op_initEntries();
return Op_CIDCount_instance;
}
function Op_UIDBase_getInstance() {
Op_initEntries();
return Op_UIDBase_instance;
}
function Op_FDArray_getInstance() {
Op_initEntries();
return Op_FDArray_instance;
}
function Op_FDSelect_getInstance() {
Op_initEntries();
return Op_FDSelect_instance;
}
function Op_FontName_getInstance() {
Op_initEntries();
return Op_FontName_instance;
}
function EvalContext_init_$Init$(globalSubrIndex, localSubrsIndex, defaultWidthX, nominalWidthX, index, heap, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
globalSubrIndex = DataIndex_init_$Create$();
if (!(($mask0 & 2) === 0))
localSubrsIndex = DataIndex_init_$Create$();
if (!(($mask0 & 4) === 0))
defaultWidthX = 0.0;
if (!(($mask0 & 8) === 0))
nominalWidthX = 0.0;
if (!(($mask0 & 16) === 0))
index = -1;
if (!(($mask0 & 32) === 0))
heap = new Float64Array(32);
EvalContext.call($this, globalSubrIndex, localSubrsIndex, defaultWidthX, nominalWidthX, index, heap);
return $this;
}
function EvalContext_init_$Create$(globalSubrIndex, localSubrsIndex, defaultWidthX, nominalWidthX, index, heap, $mask0, $marker) {
return EvalContext_init_$Init$(globalSubrIndex, localSubrsIndex, defaultWidthX, nominalWidthX, index, heap, $mask0, $marker, Object.create(EvalContext.prototype));
}
var Op_hstem_instance;
var Op_vstem_instance;
var Op_and_instance;
var Op_vmoveto_instance;
var Op_or_instance;
var Op_rlineto_instance;
var Op_not_instance;
var Op_hlineto_instance;
var Op_vlineto_instance;
var Op_rrcurveto_instance;
var Op_abs_instance;
var Op_callsubr_instance;
var Op_add_instance;
var Op_return_instance;
var Op_sub_instance;
var Op_div_instance;
var Op_endchar_instance;
var Op_neg_instance;
var Op_cff2vsidx_instance;
var Op_eq_instance;
var Op_cff2blend_instance;
var Op_hstemhm_instance;
var Op_drop_instance;
var Op_hintmask_instance;
var Op_cntrmask_instance;
var Op_put_instance;
var Op_rmoveto_instance;
var Op_get_instance;
var Op_hmoveto_instance;
var Op_ifelse_instance;
var Op_vstemhm_instance;
var Op_random_instance;
var Op_rcurveline_instance;
var Op_mul_instance;
var Op_rlinecurve_instance;
var Op_vvcurveto_instance;
var Op_sqrt_instance;
var Op_hhcurveto_instance;
var Op_dup_instance;
var Op_exch_instance;
var Op_callgsubr_instance;
var Op_index_instance;
var Op_vhcurveto_instance;
var Op_roll_instance;
var Op_hvcurveto_instance;
var Op_hflex_instance;
var Op_flex_instance;
var Op_hflex1_instance;
var Op_flex1_instance;
function Companion_14() {
Companion_instance_14 = this;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy = values_1();
var capacity = coerceAtLeast(mapCapacity(tmp0_associateBy.length), 16);
var tmp$ret$1;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo = LinkedHashMap_init_$Create$_0(capacity);
var indexedObject = tmp0_associateBy;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.Companion.MAP.<anonymous>' call
tmp$ret$0 = element.l90_1;
tmp0_associateByTo.a(tmp$ret$0, element);
}
tmp$ret$1 = tmp0_associateByTo;
tmp$ret$2 = tmp$ret$1;
tmp.m90_1 = toIntMap(tmp$ret$2);
}
Companion_14.prototype.m = function (id) {
var tmp0_elvis_lhs = this.m90_1.m(id);
var tmp;
if (tmp0_elvis_lhs == null) {
var tmp0_error = 'Unknown CFF CS2 operator ' + id;
throw IllegalStateException_init_$Create$(toString(tmp0_error));
} else {
tmp = tmp0_elvis_lhs;
}
return tmp;
};
Companion_14.$metadata$ = objectMeta('Companion');
var Companion_instance_14;
function Companion_getInstance_27() {
Op_initEntries_0();
if (Companion_instance_14 == null)
new Companion_14();
return Companion_instance_14;
}
function values_1() {
return [Op_hstem_getInstance(), Op_vstem_getInstance(), Op_and_getInstance(), Op_vmoveto_getInstance(), Op_or_getInstance(), Op_rlineto_getInstance(), Op_not_getInstance(), Op_hlineto_getInstance(), Op_vlineto_getInstance(), Op_rrcurveto_getInstance(), Op_abs_getInstance(), Op_callsubr_getInstance(), Op_add_getInstance(), Op_return_getInstance(), Op_sub_getInstance(), Op_div_getInstance(), Op_endchar_getInstance(), Op_neg_getInstance(), Op_cff2vsidx_getInstance(), Op_eq_getInstance(), Op_cff2blend_getInstance(), Op_hstemhm_getInstance(), Op_drop_getInstance(), Op_hintmask_getInstance(), Op_cntrmask_getInstance(), Op_put_getInstance(), Op_rmoveto_getInstance(), Op_get_getInstance(), Op_hmoveto_getInstance(), Op_ifelse_getInstance(), Op_vstemhm_getInstance(), Op_random_getInstance(), Op_rcurveline_getInstance(), Op_mul_getInstance(), Op_rlinecurve_getInstance(), Op_vvcurveto_getInstance(), Op_sqrt_getInstance(), Op_hhcurveto_getInstance(), Op_dup_getInstance(), Op_exch_getInstance(), Op_callgsubr_getInstance(), Op_index_getInstance(), Op_vhcurveto_getInstance(), Op_roll_getInstance(), Op_hvcurveto_getInstance(), Op_hflex_getInstance(), Op_flex_getInstance(), Op_hflex1_getInstance(), Op_flex1_getInstance()];
}
var Op_entriesInitialized_0;
function Op_initEntries_0() {
if (Op_entriesInitialized_0)
return Unit_getInstance();
Op_entriesInitialized_0 = true;
Op_hstem_instance = new Op_0('hstem', 0, 1);
Op_vstem_instance = new Op_0('vstem', 1, 3);
Op_and_instance = new Op_0('and', 2, 3075);
Op_vmoveto_instance = new Op_0('vmoveto', 3, 4);
Op_or_instance = new Op_0('or', 4, 3076);
Op_rlineto_instance = new Op_0('rlineto', 5, 5);
Op_not_instance = new Op_0('not', 6, 3077);
Op_hlineto_instance = new Op_0('hlineto', 7, 6);
Op_vlineto_instance = new Op_0('vlineto', 8, 7);
Op_rrcurveto_instance = new Op_0('rrcurveto', 9, 8);
Op_abs_instance = new Op_0('abs', 10, 3081);
Op_callsubr_instance = new Op_0('callsubr', 11, 10);
Op_add_instance = new Op_0('add', 12, 3082);
Op_return_instance = new Op_0('return', 13, 11);
Op_sub_instance = new Op_0('sub', 14, 3083);
Op_div_instance = new Op_0('div', 15, 3084);
Op_endchar_instance = new Op_0('endchar', 16, 14);
Op_neg_instance = new Op_0('neg', 17, 3086);
Op_cff2vsidx_instance = new Op_0('cff2vsidx', 18, 15);
Op_eq_instance = new Op_0('eq', 19, 3087);
Op_cff2blend_instance = new Op_0('cff2blend', 20, 16);
Op_hstemhm_instance = new Op_0('hstemhm', 21, 18);
Op_drop_instance = new Op_0('drop', 22, 3090);
Op_hintmask_instance = new Op_0('hintmask', 23, 19);
Op_cntrmask_instance = new Op_0('cntrmask', 24, 20);
Op_put_instance = new Op_0('put', 25, 3092);
Op_rmoveto_instance = new Op_0('rmoveto', 26, 21);
Op_get_instance = new Op_0('get', 27, 3093);
Op_hmoveto_instance = new Op_0('hmoveto', 28, 22);
Op_ifelse_instance = new Op_0('ifelse', 29, 3094);
Op_vstemhm_instance = new Op_0('vstemhm', 30, 23);
Op_random_instance = new Op_0('random', 31, 3095);
Op_rcurveline_instance = new Op_0('rcurveline', 32, 24);
Op_mul_instance = new Op_0('mul', 33, 3096);
Op_rlinecurve_instance = new Op_0('rlinecurve', 34, 25);
Op_vvcurveto_instance = new Op_0('vvcurveto', 35, 26);
Op_sqrt_instance = new Op_0('sqrt', 36, 3098);
Op_hhcurveto_instance = new Op_0('hhcurveto', 37, 27);
Op_dup_instance = new Op_0('dup', 38, 3099);
Op_exch_instance = new Op_0('exch', 39, 3100);
Op_callgsubr_instance = new Op_0('callgsubr', 40, 29);
Op_index_instance = new Op_0('index', 41, 3101);
Op_vhcurveto_instance = new Op_0('vhcurveto', 42, 30);
Op_roll_instance = new Op_0('roll', 43, 3102);
Op_hvcurveto_instance = new Op_0('hvcurveto', 44, 31);
Op_hflex_instance = new Op_0('hflex', 45, 3106);
Op_flex_instance = new Op_0('flex', 46, 3107);
Op_hflex1_instance = new Op_0('hflex1', 47, 3108);
Op_flex1_instance = new Op_0('flex1', 48, 3109);
Companion_getInstance_27();
}
function Token() {
}
Token.$metadata$ = interfaceMeta('Token');
function EvalContext(globalSubrIndex, localSubrsIndex, defaultWidthX, nominalWidthX, index, heap) {
this.v8z_1 = globalSubrIndex;
this.w8z_1 = localSubrsIndex;
this.x8z_1 = defaultWidthX;
this.y8z_1 = nominalWidthX;
this.z8z_1 = index;
this.a90_1 = heap;
this.b90_1 = computeSubrBias(CharStringType2_getInstance(), this.v8z_1.i());
this.c90_1 = computeSubrBias(CharStringType2_getInstance(), this.w8z_1.i());
this.d90_1 = 0;
this.e90_1 = this.x8z_1;
this.f90_1 = false;
}
EvalContext.prototype.n90 = function () {
return this.a90_1;
};
EvalContext.$metadata$ = classMeta('EvalContext');
function computeSubrBias($this, count) {
return count < 1240 ? 107 : count < 33900 ? 1131 : 32768;
}
function Op_0(name, ordinal, id) {
Enum.call(this, name, ordinal);
this.l90_1 = id;
}
Op_0.prototype.c1n = function () {
return this.l90_1;
};
Op_0.$metadata$ = classMeta('Op', [Token], undefined, undefined, undefined, Enum.prototype);
function Op_hstem_getInstance() {
Op_initEntries_0();
return Op_hstem_instance;
}
function Op_vstem_getInstance() {
Op_initEntries_0();
return Op_vstem_instance;
}
function Op_and_getInstance() {
Op_initEntries_0();
return Op_and_instance;
}
function Op_vmoveto_getInstance() {
Op_initEntries_0();
return Op_vmoveto_instance;
}
function Op_or_getInstance() {
Op_initEntries_0();
return Op_or_instance;
}
function Op_rlineto_getInstance() {
Op_initEntries_0();
return Op_rlineto_instance;
}
function Op_not_getInstance() {
Op_initEntries_0();
return Op_not_instance;
}
function Op_hlineto_getInstance() {
Op_initEntries_0();
return Op_hlineto_instance;
}
function Op_vlineto_getInstance() {
Op_initEntries_0();
return Op_vlineto_instance;
}
function Op_rrcurveto_getInstance() {
Op_initEntries_0();
return Op_rrcurveto_instance;
}
function Op_abs_getInstance() {
Op_initEntries_0();
return Op_abs_instance;
}
function Op_callsubr_getInstance() {
Op_initEntries_0();
return Op_callsubr_instance;
}
function Op_add_getInstance() {
Op_initEntries_0();
return Op_add_instance;
}
function Op_return_getInstance() {
Op_initEntries_0();
return Op_return_instance;
}
function Op_sub_getInstance() {
Op_initEntries_0();
return Op_sub_instance;
}
function Op_div_getInstance() {
Op_initEntries_0();
return Op_div_instance;
}
function Op_endchar_getInstance() {
Op_initEntries_0();
return Op_endchar_instance;
}
function Op_neg_getInstance() {
Op_initEntries_0();
return Op_neg_instance;
}
function Op_cff2vsidx_getInstance() {
Op_initEntries_0();
return Op_cff2vsidx_instance;
}
function Op_eq_getInstance() {
Op_initEntries_0();
return Op_eq_instance;
}
function Op_cff2blend_getInstance() {
Op_initEntries_0();
return Op_cff2blend_instance;
}
function Op_hstemhm_getInstance() {
Op_initEntries_0();
return Op_hstemhm_instance;
}
function Op_drop_getInstance() {
Op_initEntries_0();
return Op_drop_instance;
}
function Op_hintmask_getInstance() {
Op_initEntries_0();
return Op_hintmask_instance;
}
function Op_cntrmask_getInstance() {
Op_initEntries_0();
return Op_cntrmask_instance;
}
function Op_put_getInstance() {
Op_initEntries_0();
return Op_put_instance;
}
function Op_rmoveto_getInstance() {
Op_initEntries_0();
return Op_rmoveto_instance;
}
function Op_get_getInstance() {
Op_initEntries_0();
return Op_get_instance;
}
function Op_hmoveto_getInstance() {
Op_initEntries_0();
return Op_hmoveto_instance;
}
function Op_ifelse_getInstance() {
Op_initEntries_0();
return Op_ifelse_instance;
}
function Op_vstemhm_getInstance() {
Op_initEntries_0();
return Op_vstemhm_instance;
}
function Op_random_getInstance() {
Op_initEntries_0();
return Op_random_instance;
}
function Op_rcurveline_getInstance() {
Op_initEntries_0();
return Op_rcurveline_instance;
}
function Op_mul_getInstance() {
Op_initEntries_0();
return Op_mul_instance;
}
function Op_rlinecurve_getInstance() {
Op_initEntries_0();
return Op_rlinecurve_instance;
}
function Op_vvcurveto_getInstance() {
Op_initEntries_0();
return Op_vvcurveto_instance;
}
function Op_sqrt_getInstance() {
Op_initEntries_0();
return Op_sqrt_instance;
}
function Op_hhcurveto_getInstance() {
Op_initEntries_0();
return Op_hhcurveto_instance;
}
function Op_dup_getInstance() {
Op_initEntries_0();
return Op_dup_instance;
}
function Op_exch_getInstance() {
Op_initEntries_0();
return Op_exch_instance;
}
function Op_callgsubr_getInstance() {
Op_initEntries_0();
return Op_callgsubr_instance;
}
function Op_index_getInstance() {
Op_initEntries_0();
return Op_index_instance;
}
function Op_vhcurveto_getInstance() {
Op_initEntries_0();
return Op_vhcurveto_instance;
}
function Op_roll_getInstance() {
Op_initEntries_0();
return Op_roll_instance;
}
function Op_hvcurveto_getInstance() {
Op_initEntries_0();
return Op_hvcurveto_instance;
}
function Op_hflex_getInstance() {
Op_initEntries_0();
return Op_hflex_instance;
}
function Op_flex_getInstance() {
Op_initEntries_0();
return Op_flex_instance;
}
function Op_hflex1_getInstance() {
Op_initEntries_0();
return Op_hflex1_instance;
}
function Op_flex1_getInstance() {
Op_initEntries_0();
return Op_flex1_instance;
}
function CFF() {
CFF_instance = this;
}
CFF.prototype.o90 = function (_this__u8e3s4) {
this.p90(_this__u8e3s4);
var nameIndex = this.q90(_this__u8e3s4);
var topDictIndex = this.q90(_this__u8e3s4);
var topDictByte = topDictIndex.m(0)[1];
var tmp = topDictIndex.m(0);
var topDict = this.r90(openFastStream$default(tmp, 0, 1, null));
var stringIndex = this.q90(_this__u8e3s4);
var globalSubrIndex = this.q90(_this__u8e3s4);
var privateSizeOffset = topDict.q(Op_Private_getInstance());
var localSubrsIndex = DataIndex_init_$Create$();
var privateDict = emptyMap();
if (!(privateSizeOffset == null)) {
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(privateSizeOffset, 10));
var tmp0_iterator = privateSizeOffset.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.CFF.readCFF.<anonymous>' call
tmp$ret$0 = numberToInt(item);
tmp0_mapTo.c(tmp$ret$0);
}
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
var tmp0_container = tmp$ret$2;
var tmp$ret$3;
// Inline function 'kotlin.collections.component1' call
tmp$ret$3 = tmp0_container.m(0);
var privateSize = tmp$ret$3;
var tmp$ret$4;
// Inline function 'kotlin.collections.component2' call
tmp$ret$4 = tmp0_container.m(1);
var privateOffset = tmp$ret$4;
privateDict = this.r90(_this__u8e3s4.i6r(privateOffset, privateSize));
var localSubrs = privateDict.q(Op_Subrs_getInstance());
if (!(localSubrs == null)) {
var subrsOffset = privateOffset + numberToInt(last(localSubrs)) | 0;
localSubrsIndex = this.q90(_this__u8e3s4.j6r(subrsOffset));
}
}
var charstringsOffsets = topDict.q(Op_CharStrings_getInstance());
var charstringsOffset = numberToInt(first_0(ensureNotNull(charstringsOffsets)));
var charstringsIndex = this.q90(_this__u8e3s4.j6r(charstringsOffset));
return new CFFResult(charstringsIndex, globalSubrIndex, localSubrsIndex, privateDict);
};
CFF.prototype.p90 = function (_this__u8e3s4) {
var versionMajor = _this__u8e3s4.o6r();
var versionMinor = _this__u8e3s4.o6r();
var headerSize = _this__u8e3s4.o6r();
var offsetSize = _this__u8e3s4.o6r();
if (versionMajor > 1) {
// Inline function 'kotlin.error' call
throw IllegalStateException_init_$Create$('Only supported CFF version 1');
}
println('CFF.versionMajor/Minor: ' + versionMajor + '.' + versionMinor + ' : headerSize=' + headerSize + ', offsetSize=' + offsetSize);
};
CFF.prototype.s90 = function (_this__u8e3s4) {
return _this__u8e3s4.o6r();
};
CFF.prototype.t90 = function (_this__u8e3s4, offSize) {
var roffSize = offSize < 0 ? this.s90(_this__u8e3s4) : offSize;
var tmp0_subject = roffSize;
var tmp;
switch (tmp0_subject) {
case 1:
tmp = _this__u8e3s4.o6r();
break;
case 2:
tmp = _this__u8e3s4.q6r();
break;
case 3:
tmp = _this__u8e3s4.r6r();
break;
case 4:
tmp = _this__u8e3s4.s6r();
break;
default:
reserved('' + roffSize);
break;
}
return tmp;
};
CFF.prototype.q90 = function (_this__u8e3s4) {
var count = _this__u8e3s4.q6r();
if (count === 0)
return DataIndex_init_$Create$();
var offSize = this.s90(_this__u8e3s4);
var tmp$ret$2;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt = until(0, count + 1 | 0);
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp0_also = new IntArrayList((coerceAtLeast(tmp0_mapInt.w() - tmp0_mapInt.v() | 0, 0) / tmp0_mapInt.t1_1 | 0) + 1 | 0);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var nestedFirst = tmp0_mapInt.v();
var nestedLast = tmp0_mapInt.w();
var stepArg = tmp0_mapInt.t1_1;
if (stepArg <= 0)
THROW_IAE('Step must be positive, was: ' + stepArg + '.');
var inductionVariable = nestedFirst;
var last = getProgressionLastElement(nestedFirst, nestedLast, stepArg);
var step = stepArg;
if (inductionVariable <= last)
do {
var v = inductionVariable;
inductionVariable = inductionVariable + step | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.CFF.readIndex.<anonymous>' call
tmp$ret$0 = CFF_getInstance().t90(_this__u8e3s4, offSize) - 1 | 0;
tmp0_also.m4o(tmp$ret$0);
}
while (!(v === last));
tmp$ret$1 = tmp0_also;
tmp$ret$2 = tmp$ret$1;
var offsets = tmp$ret$2;
var bytes = _this__u8e3s4.m6r(offsets.v4o());
return new DataIndex(offsets.x4o(), bytes);
};
CFF.prototype.r90 = function (_this__u8e3s4) {
var map = LinkedHashMap_init_$Create$();
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
var values = tmp$ret$0;
while (_this__u8e3s4.f5z()) {
var item = this.u90(_this__u8e3s4);
var tmp0_subject = item;
if (tmp0_subject instanceof Op) {
// Inline function 'kotlin.collections.set' call
var tmp0_set = item;
var tmp1_set = toList(values);
map.a(tmp0_set, tmp1_set);
values.x7();
} else {
if (isNumber(tmp0_subject)) {
values.c(item);
}
}
}
return map;
};
CFF.prototype.u90 = function (_this__u8e3s4) {
var b0 = _this__u8e3s4.o6r();
var tmp0_subject = b0;
var tmp;
if (0 <= tmp0_subject ? tmp0_subject <= 21 : false) {
var tmp_0 = Companion_getInstance_26();
var tmp1_subject = b0;
tmp = tmp_0.m(tmp1_subject === 12 ? b0 << 8 | _this__u8e3s4.o6r() : b0);
} else if (22 <= tmp0_subject ? tmp0_subject <= 27 : false) {
get_reserved();
} else if (tmp0_subject === 28) {
tmp = toShort(_this__u8e3s4.o6r() << 8 | _this__u8e3s4.o6r());
} else if (tmp0_subject === 29) {
tmp = _this__u8e3s4.o6r() << 24 | _this__u8e3s4.o6r() << 16 | _this__u8e3s4.o6r() << 8 | _this__u8e3s4.o6r();
} else if (tmp0_subject === 30) {
tmp = this.v90(_this__u8e3s4, false);
} else if (tmp0_subject === 31) {
get_reserved();
} else if (32 <= tmp0_subject ? tmp0_subject <= 246 : false) {
tmp = b0 - 139 | 0;
} else if (247 <= tmp0_subject ? tmp0_subject <= 250 : false) {
tmp = (imul(b0 - 247 | 0, 256) + _this__u8e3s4.o6r() | 0) + 108 | 0;
} else if (251 <= tmp0_subject ? tmp0_subject <= 254 : false) {
tmp = ((-imul(b0 - 251 | 0, 256) | 0) - _this__u8e3s4.o6r() | 0) - 108 | 0;
} else if (tmp0_subject === 255) {
get_reserved();
} else {
get_unreachable();
}
return tmp;
};
CFF.prototype.w90 = function (_this__u8e3s4, readHeader) {
if (readHeader) {
// Inline function 'com.soywiz.korio.lang.assert' call
var tmp0_assert = _this__u8e3s4.o6r() === 30;
if (!tmp0_assert)
throw AssertionError_init_$Create$();
}
var str = StringBuilder_init_$Create$();
end: while (true) {
var byte = _this__u8e3s4.o6r();
var inductionVariable = 0;
if (inductionVariable <= 1)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var nibble = (byte >>> imul(1 - n | 0, 4) | 0) & 15;
if (nibble === 15)
break end;
var tmp1_subject = nibble;
switch (tmp1_subject) {
case 15:
break end;
case 12:
str.gc('E-');
;
break;
default:
var tmp2_subject = nibble;
str.g2((0 <= tmp2_subject ? tmp2_subject <= 9 : false) ? Char__plus_impl_qi7pgj(_Char___init__impl__6a9atx(48), nibble) : tmp2_subject === 10 ? _Char___init__impl__6a9atx(46) : tmp2_subject === 11 ? _Char___init__impl__6a9atx(69) : tmp2_subject === 14 ? _Char___init__impl__6a9atx(45) : _Char___init__impl__6a9atx(48));
;
break;
}
}
while (inductionVariable <= 1);
}
return str.toString();
};
CFF.prototype.v90 = function (_this__u8e3s4, readHeader) {
return toDouble(this.w90(_this__u8e3s4, readHeader));
};
CFF.$metadata$ = objectMeta('CFF');
var CFF_instance;
function CFF_getInstance() {
if (CFF_instance == null)
new CFF();
return CFF_instance;
}
function CharStringType2() {
CharStringType2_instance = this;
}
CharStringType2.prototype.x90 = function (_this__u8e3s4, value) {
_this__u8e3s4.u4n(_this__u8e3s4.i() - 1 | 0, value);
};
CharStringType2.prototype.y90 = function (_this__u8e3s4) {
return _this__u8e3s4.m(_this__u8e3s4.i() - 1 | 0);
};
CharStringType2.prototype.z90 = function (_this__u8e3s4) {
return _this__u8e3s4.z4(_this__u8e3s4.i() - 1 | 0);
};
CharStringType2.prototype.a91 = function (_this__u8e3s4, value) {
_this__u8e3s4.m4n(value);
};
CharStringType2.prototype.b91 = function (_this__u8e3s4, value) {
_this__u8e3s4.m4n(value);
};
CharStringType2.prototype.c91 = function (_this__u8e3s4, block) {
var r = this.z90(_this__u8e3s4);
var l = this.z90(_this__u8e3s4);
this.a91(_this__u8e3s4, block(l, r));
};
CharStringType2.prototype.d91 = function (_this__u8e3s4, block) {
this.x90(_this__u8e3s4, block(this.y90(_this__u8e3s4)));
};
CharStringType2.prototype.e91 = function (_this__u8e3s4) {
_this__u8e3s4.x2c();
};
CharStringType2.prototype.f91 = function (_this__u8e3s4, x, y) {
rMoveTo(_this__u8e3s4, x, y);
};
CharStringType2.prototype.g91 = function (_this__u8e3s4, x, y) {
rLineTo(_this__u8e3s4, x, y);
};
CharStringType2.prototype.h91 = function (_this__u8e3s4, fcx1, fcy1, fcx2, fcy2, fax, fay) {
_this__u8e3s4.x7e(fcx1, fcy1, fcx2, fcy2, fax, fay);
};
CharStringType2.prototype.i91 = function (_this__u8e3s4, cx1, cy1, cx2, cy2, ax, ay) {
var fcx1 = _this__u8e3s4.s7e() + cx1;
var fcy1 = _this__u8e3s4.t7e() + cy1;
var fcx2 = fcx1 + cx2;
var fcy2 = fcy1 + cy2;
var fax = fcx2 + ax;
var fay = fcy2 + ay;
this.h91(_this__u8e3s4, fcx1, fcy1, fcx2, fcy2, fax, fay);
};
CharStringType2.prototype.j91 = function (_this__u8e3s4, v, horizontal) {
return this.f91(_this__u8e3s4, horizontal ? v : 0.0, !horizontal ? v : 0.0);
};
CharStringType2.prototype.k91 = function (_this__u8e3s4, v, horizontal) {
return this.g91(_this__u8e3s4, horizontal ? v : 0.0, !horizontal ? v : 0.0);
};
CharStringType2.prototype.l91 = function (_this__u8e3s4) {
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp0_also = _this__u8e3s4.o6r();
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.CharStringType2.u8.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp0_also;
return tmp$ret$1;
};
CharStringType2.prototype.m91 = function (ctx, s, evalCtx, stack, stackLevel) {
while (s.f5z()) {
var v0 = this.l91(s);
var tmp0_subject = v0;
if ((0 <= tmp0_subject ? tmp0_subject <= 27 : false) ? true : 29 <= tmp0_subject ? tmp0_subject <= 31 : false) {
var tmp = Companion_getInstance_27();
var tmp1_subject = v0;
var op = tmp.m(tmp1_subject === 12 ? v0 << 8 | this.l91(s) : v0);
var tmp2_subject = op;
var tmp0 = tmp2_subject.q2_1;
switch (tmp0) {
case 13:
return Unit_getInstance();
case 16:
var tmp_0;
var tmp$ret$0;
// Inline function 'kotlin.collections.isNotEmpty' call
tmp$ret$0 = !stack.p();
if (tmp$ret$0) {
tmp_0 = !evalCtx.f90_1;
} else {
tmp_0 = false;
}
if (tmp_0) {
evalCtx.e90_1 = stack.m(0) + evalCtx.y8z_1;
evalCtx.f90_1 = true;
}
if (!(ctx.i7s() === 0)) {
this.e91(ctx);
}
return Unit_getInstance();
case 11:
case 40:
var global = op.equals(Op_callgsubr_getInstance());
var funcOffset = numberToInt(this.z90(stack));
var bytes = global ? evalCtx.v8z_1.m(evalCtx.b90_1 + funcOffset | 0) : evalCtx.w8z_1.m(evalCtx.c90_1 + funcOffset | 0);
this.m91(ctx, openFastStream$default(bytes, 0, 1, null), evalCtx, stack, stackLevel + 1 | 0);
;
break;
case 22:
this.z90(stack);
;
break;
case 38:
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp0_also = this.z90(stack);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
stack.n4n(tmp0_also, tmp0_also);
tmp$ret$1 = tmp0_also;
;
break;
case 39:
stack.w4n(stack.i() - 2 | 0, stack.i() - 1 | 0);
;
break;
case 43:
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
case 41:
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
case 25:
var index = this.z90(stack);
var value = this.z90(stack);
evalCtx.a90_1[numberToInt(index)] = value;
;
break;
case 27:
// Inline function 'com.soywiz.korim.font.CharStringType2.unop' call
var tmp$ret$2;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp2__anonymous__z9zvc9 = this.y90(stack);
tmp$ret$2 = evalCtx.a90_1[numberToInt(tmp2__anonymous__z9zvc9)];
this.x90(stack, tmp$ret$2);
;
break;
case 2:
// Inline function 'com.soywiz.korim.font.CharStringType2.binop' call
var r = this.z90(stack);
var l = this.z90(stack);
var tmp$ret$4;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.toInt' call
var tmp0_toInt = !(l === 0.0) ? !(r === 0.0) : false;
tmp$ret$3 = tmp0_toInt ? 1 : 0;
tmp$ret$4 = tmp$ret$3;
this.a91(stack, tmp$ret$4);
;
break;
case 4:
// Inline function 'com.soywiz.korim.font.CharStringType2.binop' call
var r_0 = this.z90(stack);
var l_0 = this.z90(stack);
var tmp$ret$6;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp$ret$5;
// Inline function 'com.soywiz.kmem.toInt' call
var tmp0_toInt_0 = !(l_0 === 0.0) ? true : !(r_0 === 0.0);
tmp$ret$5 = tmp0_toInt_0 ? 1 : 0;
tmp$ret$6 = tmp$ret$5;
this.a91(stack, tmp$ret$6);
;
break;
case 6:
// Inline function 'com.soywiz.korim.font.CharStringType2.unop' call
var tmp$ret$8;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp3__anonymous__ufb84q = this.y90(stack);
var tmp$ret$7;
// Inline function 'com.soywiz.kmem.toInt' call
var tmp0_toInt_1 = tmp3__anonymous__ufb84q === 0.0;
tmp$ret$7 = tmp0_toInt_1 ? 1 : 0;
tmp$ret$8 = tmp$ret$7;
this.x90(stack, tmp$ret$8);
;
break;
case 19:
// Inline function 'com.soywiz.korim.font.CharStringType2.binop' call
var r_1 = this.z90(stack);
var l_1 = this.z90(stack);
var tmp$ret$10;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp$ret$9;
// Inline function 'com.soywiz.kmem.toInt' call
var tmp0_toInt_2 = l_1 === r_1;
tmp$ret$9 = tmp0_toInt_2 ? 1 : 0;
tmp$ret$10 = tmp$ret$9;
this.a91(stack, tmp$ret$10);
;
break;
case 29:
var v2 = this.z90(stack);
var v1 = this.z90(stack);
var s2 = this.z90(stack);
var s1 = this.z90(stack);
this.a91(stack, v1 <= v2 ? s1 : s2);
;
break;
case 31:
stack.m4n(Default_getInstance().k9());
;
break;
case 36:
// Inline function 'com.soywiz.korim.font.CharStringType2.unop' call
var tmp$ret$12;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp4__anonymous__pkmkx7 = this.y90(stack);
var tmp$ret$11;
// Inline function 'kotlin.math.sqrt' call
tmp$ret$11 = Math.sqrt(tmp4__anonymous__pkmkx7);
tmp$ret$12 = tmp$ret$11;
this.x90(stack, tmp$ret$12);
;
break;
case 10:
// Inline function 'com.soywiz.korim.font.CharStringType2.unop' call
var tmp$ret$14;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp5__anonymous__kpxxpo = this.y90(stack);
var tmp$ret$13;
// Inline function 'kotlin.math.abs' call
tmp$ret$13 = Math.abs(tmp5__anonymous__kpxxpo);
tmp$ret$14 = tmp$ret$13;
this.x90(stack, tmp$ret$14);
;
break;
case 17:
// Inline function 'com.soywiz.korim.font.CharStringType2.unop' call
var tmp$ret$15;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
var tmp6__anonymous__fv9ai5 = this.y90(stack);
tmp$ret$15 = -tmp6__anonymous__fv9ai5;
this.x90(stack, tmp$ret$15);
;
break;
case 12:
// Inline function 'com.soywiz.korim.font.CharStringType2.binop' call
var r_2 = this.z90(stack);
var l_2 = this.z90(stack);
var tmp$ret$16;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
tmp$ret$16 = l_2 + r_2;
this.a91(stack, tmp$ret$16);
;
break;
case 14:
// Inline function 'com.soywiz.korim.font.CharStringType2.binop' call
var r_3 = this.z90(stack);
var l_3 = this.z90(stack);
var tmp$ret$17;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
tmp$ret$17 = l_3 - r_3;
this.a91(stack, tmp$ret$17);
;
break;
case 15:
// Inline function 'com.soywiz.korim.font.CharStringType2.binop' call
var r_4 = this.z90(stack);
var l_4 = this.z90(stack);
var tmp$ret$18;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
tmp$ret$18 = l_4 / r_4;
this.a91(stack, tmp$ret$18);
;
break;
case 33:
// Inline function 'com.soywiz.korim.font.CharStringType2.binop' call
var r_5 = this.z90(stack);
var l_5 = this.z90(stack);
var tmp$ret$19;
// Inline function 'com.soywiz.korim.font.CharStringType2.eval.<anonymous>' call
tmp$ret$19 = l_5 * r_5;
this.a91(stack, tmp$ret$19);
;
break;
case 26:
if (stack.i() > 2) {
evalCtx.e90_1 = stack.m(0) + evalCtx.y8z_1;
evalCtx.f90_1 = true;
}
if (!(ctx.i7s() === 0)) {
this.e91(ctx);
}
this.f91(ctx, stack.m(stack.i() - 2 | 0), stack.m(stack.i() - 1 | 0));
stack.x7();
;
break;
case 3:
case 28:
if (stack.i() > 1) {
evalCtx.e90_1 = stack.m(0) + evalCtx.y8z_1;
evalCtx.f90_1 = true;
}
this.j91(ctx, this.z90(stack), op.equals(Op_hmoveto_getInstance()));
stack.x7();
;
break;
case 5:
var progression = step(until(0, stack.i()), 2);
var inductionVariable = progression.r1_1;
var last = progression.s1_1;
var step_0 = progression.t1_1;
if ((step_0 > 0 ? inductionVariable <= last : false) ? true : step_0 < 0 ? last <= inductionVariable : false)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + step_0 | 0;
this.g91(ctx, stack.m(n), stack.m(n + 1 | 0));
}
while (!(n === last));
stack.x7();
;
break;
case 7:
case 8:
var toggle = op.equals(Op_hlineto_getInstance());
var inductionVariable_0 = 0;
var last_0 = stack.i();
if (inductionVariable_0 < last_0)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
this.k91(ctx, stack.m(n_0), toggle);
toggle = !toggle;
}
while (inductionVariable_0 < last_0);
stack.x7();
;
break;
case 9:
case 32:
case 34:
var n_1 = 0;
if (op.equals(Op_rlinecurve_getInstance())) {
while ((stack.i() - n_1 | 0) < 6) {
var tmp5 = n_1;
n_1 = tmp5 + 1 | 0;
var tmp_1 = stack.m(tmp5);
var tmp6 = n_1;
n_1 = tmp6 + 1 | 0;
this.g91(ctx, tmp_1, stack.m(tmp6));
}
}
while ((stack.i() - n_1 | 0) >= 6) {
var tmp7 = n_1;
n_1 = tmp7 + 1 | 0;
var tmp_2 = stack.m(tmp7);
var tmp8 = n_1;
n_1 = tmp8 + 1 | 0;
var tmp_3 = stack.m(tmp8);
var tmp9 = n_1;
n_1 = tmp9 + 1 | 0;
var tmp_4 = stack.m(tmp9);
var tmp10 = n_1;
n_1 = tmp10 + 1 | 0;
var tmp_5 = stack.m(tmp10);
var tmp11 = n_1;
n_1 = tmp11 + 1 | 0;
var tmp_6 = stack.m(tmp11);
var tmp12 = n_1;
n_1 = tmp12 + 1 | 0;
this.i91(ctx, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, stack.m(tmp12));
}
if (op.equals(Op_rcurveline_getInstance())) {
while (n_1 < stack.i()) {
var tmp13 = n_1;
n_1 = tmp13 + 1 | 0;
var tmp_7 = stack.m(tmp13);
var tmp14 = n_1;
n_1 = tmp14 + 1 | 0;
this.g91(ctx, tmp_7, stack.m(tmp14));
}
}
stack.x7();
;
break;
case 35:
case 37:
var horizontal = op.equals(Op_hhcurveto_getInstance());
var n_2 = 0;
var tmp_8;
if ((stack.i() % 2 | 0) === 1) {
var tmp15 = n_2;
n_2 = tmp15 + 1 | 0;
tmp_8 = stack.m(tmp15);
} else {
tmp_8 = 0.0;
}
var v = tmp_8;
var initialY = horizontal ? v : 0.0;
var initialX = horizontal ? 0.0 : v;
if (!(((stack.i() - n_2 | 0) % 4 | 0) === 0)) {
// Inline function 'kotlin.error' call
throw IllegalStateException_init_$Create$('Invalid number of operands');
}
while (n_2 < stack.i()) {
var tmp16 = n_2;
n_2 = tmp16 + 1 | 0;
var vv = stack.m(tmp16);
var x1 = initialX + (horizontal ? vv : 0.0);
var y1 = initialY + (horizontal ? 0.0 : vv);
var tmp17 = n_2;
n_2 = tmp17 + 1 | 0;
var x2 = stack.m(tmp17);
var tmp18 = n_2;
n_2 = tmp18 + 1 | 0;
var y2 = stack.m(tmp18);
var tmp19 = n_2;
n_2 = tmp19 + 1 | 0;
var v1_0 = stack.m(tmp19);
var lastX = horizontal ? v1_0 : 0.0;
var lastY = horizontal ? 0.0 : v1_0;
this.i91(ctx, x1, y1, x2, y2, lastX, lastY);
initialX = 0.0;
initialY = 0.0;
}
stack.x7();
;
break;
case 42:
case 44:
reverse$default(stack, 0, 0, 3, null);
var toggle_0 = op.equals(Op_hvcurveto_getInstance());
$l$loop: while (true) {
var tmp$ret$20;
// Inline function 'kotlin.collections.isNotEmpty' call
tmp$ret$20 = !stack.p();
if (!tmp$ret$20) {
break $l$loop;
}
var vv_0 = this.z90(stack);
var x1_0 = toggle_0 ? vv_0 : 0.0;
var y1_0 = toggle_0 ? 0.0 : vv_0;
var x2_0 = this.z90(stack);
var y2_0 = this.z90(stack);
var v1_1 = this.z90(stack);
var v2_0 = stack.i() === 1 ? this.z90(stack) : 0.0;
var ax = toggle_0 ? v2_0 : v1_1;
var ay = toggle_0 ? v1_1 : v2_0;
this.i91(ctx, x1_0, y1_0, x2_0, y2_0, ax, ay);
toggle_0 = !toggle_0;
}
stack.x7();
;
break;
case 45:
case 46:
case 47:
case 48:
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
case 0:
case 1:
case 21:
case 30:
case 23:
case 24:
if (!((stack.i() % 2 | 0) === 0) ? !evalCtx.f90_1 : false) {
var value_0 = stack.m(0);
evalCtx.e90_1 = value_0 + evalCtx.y8z_1;
}
var tmp20_this = evalCtx;
tmp20_this.d90_1 = tmp20_this.d90_1 + (stack.i() >>> 1 | 0) | 0;
evalCtx.f90_1 = true;
stack.x7();
if (op.equals(Op_hintmask_getInstance()) ? true : op.equals(Op_cntrmask_getInstance())) {
var skipCount = (evalCtx.d90_1 + 7 | 0) >>> 3 | 0;
s.j5z(skipCount);
}
break;
case 18:
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
case 20:
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
}
} else if (tmp0_subject === 255) {
var integerPart = this.l91(s) << 8 | this.l91(s);
var fractionPart = this.l91(s) << 8 | this.l91(s);
var value_1 = integerPart + fractionPart / 65536.0;
this.a91(stack, value_1);
} else {
var tmp21_subject = v0;
var tmp_9;
if (tmp21_subject === 28) {
tmp_9 = toShort(this.l91(s) << 8 | this.l91(s));
} else if (32 <= tmp21_subject ? tmp21_subject <= 246 : false) {
tmp_9 = v0 - 139 | 0;
} else if (247 <= tmp21_subject ? tmp21_subject <= 250 : false) {
tmp_9 = (imul(v0 - 247 | 0, 256) + this.l91(s) | 0) + 108 | 0;
} else if (251 <= tmp21_subject ? tmp21_subject <= 254 : false) {
tmp_9 = ((-imul(v0 - 251 | 0, 256) | 0) - this.l91(s) | 0) - 108 | 0;
} else {
get_unreachable();
}
var value_2 = tmp_9;
this.b91(stack, value_2);
}
}
};
CharStringType2.prototype.u8z = function (ctx, s, evalCtx, stack, stackLevel, $mask0, $handler) {
if (!(($mask0 & 8) === 0))
stack = new DoubleArrayList(32);
if (!(($mask0 & 16) === 0))
stackLevel = 0;
return this.m91(ctx, s, evalCtx, stack, stackLevel);
};
CharStringType2.$metadata$ = objectMeta('CharStringType2');
var CharStringType2_instance;
function CharStringType2_getInstance() {
if (CharStringType2_instance == null)
new CharStringType2();
return CharStringType2_instance;
}
function TtfFont_init_$Init$(d, freeze, extName, onlyReadMetadata, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
freeze = false;
if (!(($mask0 & 4) === 0))
extName = null;
if (!(($mask0 & 8) === 0))
onlyReadMetadata = false;
TtfFont.call($this, d, freeze, extName, onlyReadMetadata);
return $this;
}
function TtfFont_init_$Create$(d, freeze, extName, onlyReadMetadata, $mask0, $marker) {
return TtfFont_init_$Init$(d, freeze, extName, onlyReadMetadata, $mask0, $marker, Object.create(TtfFont.prototype));
}
function Companion_15() {
Companion_instance_15 = this;
}
Companion_15.$metadata$ = objectMeta('Companion');
var Companion_instance_15;
function Companion_getInstance_28() {
if (Companion_instance_15 == null)
new Companion_15();
return Companion_instance_15;
}
function TtfFont(d, freeze, extName, onlyReadMetadata) {
Companion_getInstance_28();
BaseTtfFont_init_$Init$(d, freeze, extName, onlyReadMetadata, this);
this.x93_1 = LinkedHashMap_init_$Create$();
this.i96();
}
TtfFont.prototype.j96 = function () {
var tmp = Companion_getInstance_31();
this.x93_1.u4(tmp.k96(this.y93_1.k6r(0, 1, null)));
};
TtfFont.prototype.l96 = function (name) {
return this.x93_1.q(name);
};
TtfFont.$metadata$ = classMeta('TtfFont', undefined, undefined, undefined, undefined, BaseTtfFont.prototype);
function _get_ss__ndcawb($this) {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = ss$factory();
tmp$ret$0 = $this.e9b_1.l1();
return tmp$ret$0;
}
function BaseTtfFont$Table$ss$delegate$lambda(this$0) {
return function () {
return ensureNotNull(this$0.d9b_1)();
};
}
function BaseTtfFont$Companion$readHeaderTables$lambda($s, $table) {
return function () {
return $s.i6r($table.b9b_1, $table.c9b_1);
};
}
var NameId_COPYRIGHT_instance;
var NameId_NAME_instance;
var NameId_STYLE_instance;
var NameId_UNAME_instance;
var NameId_COMPLETE_NAME_instance;
var NameId_RELEASE_VERSION_instance;
var NameId_POSTSCRIPT_NAME_instance;
var NameId_TRADEMARK_instance;
var NameId_MANUFACTURER_instance;
var NameId_DESIGNER_instance;
var NameId_DESCRIPTION_instance;
var NameId_URL_VENDOR_instance;
var NameId_URL_DESIGNER_instance;
var NameId_LICENSE_DESCRIPTION_instance;
var NameId_LICENSE_URL_instance;
var NameId_RESERVED_15_instance;
var NameId_PREFERRED_FAMILY_instance;
var NameId_PREFERRED_SUBFAMILY_instance;
var NameId_COMPATIBLE_FULL_instance;
var NameId_SAMPLE_TEXT_instance;
var NameId_POSTSCRIPT_CID_instance;
var NameId_WWS_FAMILY_NAME_instance;
var NameId_WWS_SUBFAMILY_NAME_instance;
var NameId_LIGHT_BACKGROUND_instance;
var NameId_DARK_BACKGROUND_instance;
var NameId_VARIATION_POSTSCRIPT_PREFIX_instance;
function Companion_16() {
Companion_instance_16 = this;
this.f9b_1 = 26;
}
Companion_16.$metadata$ = objectMeta('Companion');
var Companion_instance_16;
function Companion_getInstance_29() {
NameId_initEntries();
if (Companion_instance_16 == null)
new Companion_16();
return Companion_instance_16;
}
function values_2() {
return [NameId_COPYRIGHT_getInstance(), NameId_NAME_getInstance(), NameId_STYLE_getInstance(), NameId_UNAME_getInstance(), NameId_COMPLETE_NAME_getInstance(), NameId_RELEASE_VERSION_getInstance(), NameId_POSTSCRIPT_NAME_getInstance(), NameId_TRADEMARK_getInstance(), NameId_MANUFACTURER_getInstance(), NameId_DESIGNER_getInstance(), NameId_DESCRIPTION_getInstance(), NameId_URL_VENDOR_getInstance(), NameId_URL_DESIGNER_getInstance(), NameId_LICENSE_DESCRIPTION_getInstance(), NameId_LICENSE_URL_getInstance(), NameId_RESERVED_15_getInstance(), NameId_PREFERRED_FAMILY_getInstance(), NameId_PREFERRED_SUBFAMILY_getInstance(), NameId_COMPATIBLE_FULL_getInstance(), NameId_SAMPLE_TEXT_getInstance(), NameId_POSTSCRIPT_CID_getInstance(), NameId_WWS_FAMILY_NAME_getInstance(), NameId_WWS_SUBFAMILY_NAME_getInstance(), NameId_LIGHT_BACKGROUND_getInstance(), NameId_DARK_BACKGROUND_getInstance(), NameId_VARIATION_POSTSCRIPT_PREFIX_getInstance()];
}
var NameId_entriesInitialized;
function NameId_initEntries() {
if (NameId_entriesInitialized)
return Unit_getInstance();
NameId_entriesInitialized = true;
NameId_COPYRIGHT_instance = new NameId('COPYRIGHT', 0, 0);
NameId_NAME_instance = new NameId('NAME', 1, 1);
NameId_STYLE_instance = new NameId('STYLE', 2, 2);
NameId_UNAME_instance = new NameId('UNAME', 3, 3);
NameId_COMPLETE_NAME_instance = new NameId('COMPLETE_NAME', 4, 4);
NameId_RELEASE_VERSION_instance = new NameId('RELEASE_VERSION', 5, 5);
NameId_POSTSCRIPT_NAME_instance = new NameId('POSTSCRIPT_NAME', 6, 6);
NameId_TRADEMARK_instance = new NameId('TRADEMARK', 7, 7);
NameId_MANUFACTURER_instance = new NameId('MANUFACTURER', 8, 8);
NameId_DESIGNER_instance = new NameId('DESIGNER', 9, 9);
NameId_DESCRIPTION_instance = new NameId('DESCRIPTION', 10, 10);
NameId_URL_VENDOR_instance = new NameId('URL_VENDOR', 11, 11);
NameId_URL_DESIGNER_instance = new NameId('URL_DESIGNER', 12, 12);
NameId_LICENSE_DESCRIPTION_instance = new NameId('LICENSE_DESCRIPTION', 13, 13);
NameId_LICENSE_URL_instance = new NameId('LICENSE_URL', 14, 14);
NameId_RESERVED_15_instance = new NameId('RESERVED_15', 15, 15);
NameId_PREFERRED_FAMILY_instance = new NameId('PREFERRED_FAMILY', 16, 16);
NameId_PREFERRED_SUBFAMILY_instance = new NameId('PREFERRED_SUBFAMILY', 17, 17);
NameId_COMPATIBLE_FULL_instance = new NameId('COMPATIBLE_FULL', 18, 18);
NameId_SAMPLE_TEXT_instance = new NameId('SAMPLE_TEXT', 19, 19);
NameId_POSTSCRIPT_CID_instance = new NameId('POSTSCRIPT_CID', 20, 20);
NameId_WWS_FAMILY_NAME_instance = new NameId('WWS_FAMILY_NAME', 21, 21);
NameId_WWS_SUBFAMILY_NAME_instance = new NameId('WWS_SUBFAMILY_NAME', 22, 22);
NameId_LIGHT_BACKGROUND_instance = new NameId('LIGHT_BACKGROUND', 23, 23);
NameId_DARK_BACKGROUND_instance = new NameId('DARK_BACKGROUND', 24, 23);
NameId_VARIATION_POSTSCRIPT_PREFIX_instance = new NameId('VARIATION_POSTSCRIPT_PREFIX', 25, 25);
Companion_getInstance_29();
}
function ColorBitmapInfo_init_$Init$(indexSubTableArrayOffset, indexTablesSize, numberofIndexSubTables, colorRef, hori, vert, startGlyphIndex, endGlyphIndex, ppemX, ppemY, bitDepth, flags, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
indexSubTableArrayOffset = 0;
if (!(($mask0 & 2) === 0))
indexTablesSize = 0;
if (!(($mask0 & 4) === 0))
numberofIndexSubTables = 0;
if (!(($mask0 & 8) === 0))
colorRef = 0;
if (!(($mask0 & 16) === 0)) {
hori = SbitLineMetrics_init_$Create$(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4095, null);
}
if (!(($mask0 & 32) === 0)) {
vert = SbitLineMetrics_init_$Create$(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4095, null);
}
if (!(($mask0 & 64) === 0))
startGlyphIndex = 0;
if (!(($mask0 & 128) === 0))
endGlyphIndex = 0;
if (!(($mask0 & 256) === 0))
ppemX = 0;
if (!(($mask0 & 512) === 0))
ppemY = 0;
if (!(($mask0 & 1024) === 0))
bitDepth = 0;
if (!(($mask0 & 2048) === 0))
flags = 0;
ColorBitmapInfo.call($this, indexSubTableArrayOffset, indexTablesSize, numberofIndexSubTables, colorRef, hori, vert, startGlyphIndex, endGlyphIndex, ppemX, ppemY, bitDepth, flags);
return $this;
}
function ColorBitmapInfo_init_$Create$(indexSubTableArrayOffset, indexTablesSize, numberofIndexSubTables, colorRef, hori, vert, startGlyphIndex, endGlyphIndex, ppemX, ppemY, bitDepth, flags, $mask0, $marker) {
return ColorBitmapInfo_init_$Init$(indexSubTableArrayOffset, indexTablesSize, numberofIndexSubTables, colorRef, hori, vert, startGlyphIndex, endGlyphIndex, ppemX, ppemY, bitDepth, flags, $mask0, $marker, Object.create(ColorBitmapInfo.prototype));
}
function SbitLineMetrics_init_$Init$(ascender, descender, widthMax, caretSlopeNumerator, caretSlopeDenominator, caretOffset, minOriginSB, minAdvanceSB, maxBeforeBL, minAfterBL, pad1, pad2, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
ascender = 0;
if (!(($mask0 & 2) === 0))
descender = 0;
if (!(($mask0 & 4) === 0))
widthMax = 0;
if (!(($mask0 & 8) === 0))
caretSlopeNumerator = 0;
if (!(($mask0 & 16) === 0))
caretSlopeDenominator = 0;
if (!(($mask0 & 32) === 0))
caretOffset = 0;
if (!(($mask0 & 64) === 0))
minOriginSB = 0;
if (!(($mask0 & 128) === 0))
minAdvanceSB = 0;
if (!(($mask0 & 256) === 0))
maxBeforeBL = 0;
if (!(($mask0 & 512) === 0))
minAfterBL = 0;
if (!(($mask0 & 1024) === 0))
pad1 = 0;
if (!(($mask0 & 2048) === 0))
pad2 = 0;
SbitLineMetrics.call($this, ascender, descender, widthMax, caretSlopeNumerator, caretSlopeDenominator, caretOffset, minOriginSB, minAdvanceSB, maxBeforeBL, minAfterBL, pad1, pad2);
return $this;
}
function SbitLineMetrics_init_$Create$(ascender, descender, widthMax, caretSlopeNumerator, caretSlopeDenominator, caretOffset, minOriginSB, minAdvanceSB, maxBeforeBL, minAfterBL, pad1, pad2, $mask0, $marker) {
return SbitLineMetrics_init_$Init$(ascender, descender, widthMax, caretSlopeNumerator, caretSlopeDenominator, caretOffset, minOriginSB, minAdvanceSB, maxBeforeBL, minAfterBL, pad1, pad2, $mask0, $marker, Object.create(SbitLineMetrics.prototype));
}
function BitmapGlyphInfo_init_$Init$(glyphID, imageFormat, offset, size, info, height, width, horiBearingX, horiBearingY, horiAdvance, vertBearingX, vertBearingY, vertAdvance, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
imageFormat = 0;
if (!(($mask0 & 4) === 0))
offset = 0;
if (!(($mask0 & 8) === 0))
size = 0;
if (!(($mask0 & 32) === 0))
height = 0;
if (!(($mask0 & 64) === 0))
width = 0;
if (!(($mask0 & 128) === 0))
horiBearingX = 0;
if (!(($mask0 & 256) === 0))
horiBearingY = 0;
if (!(($mask0 & 512) === 0))
horiAdvance = 0;
if (!(($mask0 & 1024) === 0))
vertBearingX = 0;
if (!(($mask0 & 2048) === 0))
vertBearingY = 0;
if (!(($mask0 & 4096) === 0))
vertAdvance = 0;
BitmapGlyphInfo.call($this, glyphID, imageFormat, offset, size, info, height, width, horiBearingX, horiBearingY, horiAdvance, vertBearingX, vertBearingY, vertAdvance);
return $this;
}
function BitmapGlyphInfo_init_$Create$(glyphID, imageFormat, offset, size, info, height, width, horiBearingX, horiBearingY, horiAdvance, vertBearingX, vertBearingY, vertAdvance, $mask0, $marker) {
return BitmapGlyphInfo_init_$Init$(glyphID, imageFormat, offset, size, info, height, width, horiBearingX, horiBearingY, horiAdvance, vertBearingX, vertBearingY, vertAdvance, $mask0, $marker, Object.create(BitmapGlyphInfo.prototype));
}
var Colrv1Paint_PaintColrLayers_instance;
var Colrv1Paint_PaintSolid_instance;
var Colrv1Paint_PaintVarSolid_instance;
var Colrv1Paint_PaintLinearGradient_instance;
var Colrv1Paint_PaintVarLinearGradient_instance;
var Colrv1Paint_PaintRadialGradient_instance;
var Colrv1Paint_PaintVarRadialGradient_instance;
var Colrv1Paint_PaintSweepGradient_instance;
var Colrv1Paint_PaintVarSweepGradient_instance;
var Colrv1Paint_PaintGlyph_instance;
var Colrv1Paint_PaintColrGlyph_instance;
var Colrv1Paint_PaintTransform_instance;
var Colrv1Paint_PaintVarTransform_instance;
var Colrv1Paint_PaintTranslate_instance;
var Colrv1Paint_PaintVarTranslate_instance;
var Colrv1Paint_PaintScale_instance;
var Colrv1Paint_PaintVarScale_instance;
var Colrv1Paint_PaintScaleAroundCenter_instance;
var Colrv1Paint_PaintVarScaleAroundCenter_instance;
var Colrv1Paint_PaintScaleUniform_instance;
var Colrv1Paint_PaintVarScaleUniform_instance;
var Colrv1Paint_PaintScaleUniformAroundCenter_instance;
var Colrv1Paint_PaintVarScaleUniformAroundCenter_instance;
var Colrv1Paint_PaintRotate_instance;
var Colrv1Paint_PaintVarRotate_instance;
var Colrv1Paint_PaintRotateAroundCenter_instance;
var Colrv1Paint_PaintVarRotateAroundCenter_instance;
var Colrv1Paint_PaintSkew_instance;
var Colrv1Paint_PaintVarSkew_instance;
var Colrv1Paint_PaintSkewAroundCenter_instance;
var Colrv1Paint_PaintVarSkewAroundCenter_instance;
var Colrv1Paint_PaintComposite_instance;
function Companion_17() {
Companion_instance_17 = this;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.plus' call
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$0 = fillArrayVal(Array(1), null);
var tmp0_plus = tmp$ret$0;
var tmp1_plus = values_3();
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_plus;
tmp$ret$2 = tmp$ret$1.concat(tmp1_plus);
tmp.g9b_1 = tmp$ret$2;
}
Companion_17.$metadata$ = objectMeta('Companion');
var Companion_instance_17;
function Companion_getInstance_30() {
Colrv1Paint_initEntries();
if (Companion_instance_17 == null)
new Companion_17();
return Companion_instance_17;
}
function values_3() {
return [Colrv1Paint_PaintColrLayers_getInstance(), Colrv1Paint_PaintSolid_getInstance(), Colrv1Paint_PaintVarSolid_getInstance(), Colrv1Paint_PaintLinearGradient_getInstance(), Colrv1Paint_PaintVarLinearGradient_getInstance(), Colrv1Paint_PaintRadialGradient_getInstance(), Colrv1Paint_PaintVarRadialGradient_getInstance(), Colrv1Paint_PaintSweepGradient_getInstance(), Colrv1Paint_PaintVarSweepGradient_getInstance(), Colrv1Paint_PaintGlyph_getInstance(), Colrv1Paint_PaintColrGlyph_getInstance(), Colrv1Paint_PaintTransform_getInstance(), Colrv1Paint_PaintVarTransform_getInstance(), Colrv1Paint_PaintTranslate_getInstance(), Colrv1Paint_PaintVarTranslate_getInstance(), Colrv1Paint_PaintScale_getInstance(), Colrv1Paint_PaintVarScale_getInstance(), Colrv1Paint_PaintScaleAroundCenter_getInstance(), Colrv1Paint_PaintVarScaleAroundCenter_getInstance(), Colrv1Paint_PaintScaleUniform_getInstance(), Colrv1Paint_PaintVarScaleUniform_getInstance(), Colrv1Paint_PaintScaleUniformAroundCenter_getInstance(), Colrv1Paint_PaintVarScaleUniformAroundCenter_getInstance(), Colrv1Paint_PaintRotate_getInstance(), Colrv1Paint_PaintVarRotate_getInstance(), Colrv1Paint_PaintRotateAroundCenter_getInstance(), Colrv1Paint_PaintVarRotateAroundCenter_getInstance(), Colrv1Paint_PaintSkew_getInstance(), Colrv1Paint_PaintVarSkew_getInstance(), Colrv1Paint_PaintSkewAroundCenter_getInstance(), Colrv1Paint_PaintVarSkewAroundCenter_getInstance(), Colrv1Paint_PaintComposite_getInstance()];
}
var Colrv1Paint_entriesInitialized;
function Colrv1Paint_initEntries() {
if (Colrv1Paint_entriesInitialized)
return Unit_getInstance();
Colrv1Paint_entriesInitialized = true;
Colrv1Paint_PaintColrLayers_instance = new Colrv1Paint('PaintColrLayers', 0);
Colrv1Paint_PaintSolid_instance = new Colrv1Paint('PaintSolid', 1);
Colrv1Paint_PaintVarSolid_instance = new Colrv1Paint('PaintVarSolid', 2);
Colrv1Paint_PaintLinearGradient_instance = new Colrv1Paint('PaintLinearGradient', 3);
Colrv1Paint_PaintVarLinearGradient_instance = new Colrv1Paint('PaintVarLinearGradient', 4);
Colrv1Paint_PaintRadialGradient_instance = new Colrv1Paint('PaintRadialGradient', 5);
Colrv1Paint_PaintVarRadialGradient_instance = new Colrv1Paint('PaintVarRadialGradient', 6);
Colrv1Paint_PaintSweepGradient_instance = new Colrv1Paint('PaintSweepGradient', 7);
Colrv1Paint_PaintVarSweepGradient_instance = new Colrv1Paint('PaintVarSweepGradient', 8);
Colrv1Paint_PaintGlyph_instance = new Colrv1Paint('PaintGlyph', 9);
Colrv1Paint_PaintColrGlyph_instance = new Colrv1Paint('PaintColrGlyph', 10);
Colrv1Paint_PaintTransform_instance = new Colrv1Paint('PaintTransform', 11);
Colrv1Paint_PaintVarTransform_instance = new Colrv1Paint('PaintVarTransform', 12);
Colrv1Paint_PaintTranslate_instance = new Colrv1Paint('PaintTranslate', 13);
Colrv1Paint_PaintVarTranslate_instance = new Colrv1Paint('PaintVarTranslate', 14);
Colrv1Paint_PaintScale_instance = new Colrv1Paint('PaintScale', 15);
Colrv1Paint_PaintVarScale_instance = new Colrv1Paint('PaintVarScale', 16);
Colrv1Paint_PaintScaleAroundCenter_instance = new Colrv1Paint('PaintScaleAroundCenter', 17);
Colrv1Paint_PaintVarScaleAroundCenter_instance = new Colrv1Paint('PaintVarScaleAroundCenter', 18);
Colrv1Paint_PaintScaleUniform_instance = new Colrv1Paint('PaintScaleUniform', 19);
Colrv1Paint_PaintVarScaleUniform_instance = new Colrv1Paint('PaintVarScaleUniform', 20);
Colrv1Paint_PaintScaleUniformAroundCenter_instance = new Colrv1Paint('PaintScaleUniformAroundCenter', 21);
Colrv1Paint_PaintVarScaleUniformAroundCenter_instance = new Colrv1Paint('PaintVarScaleUniformAroundCenter', 22);
Colrv1Paint_PaintRotate_instance = new Colrv1Paint('PaintRotate', 23);
Colrv1Paint_PaintVarRotate_instance = new Colrv1Paint('PaintVarRotate', 24);
Colrv1Paint_PaintRotateAroundCenter_instance = new Colrv1Paint('PaintRotateAroundCenter', 25);
Colrv1Paint_PaintVarRotateAroundCenter_instance = new Colrv1Paint('PaintVarRotateAroundCenter', 26);
Colrv1Paint_PaintSkew_instance = new Colrv1Paint('PaintSkew', 27);
Colrv1Paint_PaintVarSkew_instance = new Colrv1Paint('PaintVarSkew', 28);
Colrv1Paint_PaintSkewAroundCenter_instance = new Colrv1Paint('PaintSkewAroundCenter', 29);
Colrv1Paint_PaintVarSkewAroundCenter_instance = new Colrv1Paint('PaintVarSkewAroundCenter', 30);
Colrv1Paint_PaintComposite_instance = new Colrv1Paint('PaintComposite', 31);
Companion_getInstance_30();
}
function COLRv1_init_$Init$(layerList, s, sBaseOffset, sLayerOffset, sClipOffset, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$0 = new Int32Array([]);
tmp$ret$0_0 = Unit_getInstance();
layerList = tmp$ret$0;
}
if (!(($mask0 & 2) === 0)) {
var tmp$ret$0_1;
var tmp$ret$1;
// Inline function 'kotlin.byteArrayOf' call
tmp$ret$0_1 = new Int8Array([]);
tmp$ret$1 = Unit_getInstance();
var tmp = tmp$ret$0_1;
s = FastByteArrayInputStream_init_$Create$(tmp, 0, 0, 0, 14, null);
}
if (!(($mask0 & 4) === 0)) {
var tmp$ret$0_2;
var tmp$ret$2;
// Inline function 'kotlin.byteArrayOf' call
tmp$ret$0_2 = new Int8Array([]);
tmp$ret$2 = Unit_getInstance();
var tmp_0 = tmp$ret$0_2;
sBaseOffset = FastByteArrayInputStream_init_$Create$(tmp_0, 0, 0, 0, 14, null);
}
if (!(($mask0 & 8) === 0)) {
var tmp$ret$0_3;
var tmp$ret$3;
// Inline function 'kotlin.byteArrayOf' call
tmp$ret$0_3 = new Int8Array([]);
tmp$ret$3 = Unit_getInstance();
var tmp_1 = tmp$ret$0_3;
sLayerOffset = FastByteArrayInputStream_init_$Create$(tmp_1, 0, 0, 0, 14, null);
}
if (!(($mask0 & 16) === 0))
sClipOffset = null;
COLRv1.call($this, layerList, s, sBaseOffset, sLayerOffset, sClipOffset);
return $this;
}
function COLRv1_init_$Create$(layerList, s, sBaseOffset, sLayerOffset, sClipOffset, $mask0, $marker) {
return COLRv1_init_$Init$(layerList, s, sBaseOffset, sLayerOffset, sClipOffset, $mask0, $marker, Object.create(COLRv1.prototype));
}
function Contour_init_$Init$(x, y, onCurve, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
x = 0;
if (!(($mask0 & 2) === 0))
y = 0;
if (!(($mask0 & 4) === 0))
onCurve = false;
Contour.call($this, x, y, onCurve);
return $this;
}
function Contour_init_$Create$(x, y, onCurve, $mask0, $marker) {
return Contour_init_$Init$(x, y, onCurve, $mask0, $marker, Object.create(Contour.prototype));
}
function SimpleGlyph_init_$Init$($outer, index, xMin, yMin, xMax, yMax, contoursIndices, flags, xPos, yPos, advanceWidth, dummy, $mask0, $marker, $this) {
if (!(($mask0 & 2048) === 0))
dummy = false;
SimpleGlyph.call($this, $outer, index, xMin, yMin, xMax, yMax, contoursIndices, flags, xPos, yPos, advanceWidth, dummy);
return $this;
}
function SimpleGlyph_init_$Create$($outer, index, xMin, yMin, xMax, yMax, contoursIndices, flags, xPos, yPos, advanceWidth, dummy, $mask0, $marker) {
return SimpleGlyph_init_$Init$($outer, index, xMin, yMin, xMax, yMax, contoursIndices, flags, xPos, yPos, advanceWidth, dummy, $mask0, $marker, Object.create(SimpleGlyph.prototype));
}
function BaseTtfFont_init_$Init$(d, freeze, extName, onlyReadMetadata, $this) {
BaseTtfFont.call($this, openFastStream$default(d, 0, 1, null), freeze, extName, onlyReadMetadata);
return $this;
}
function NamesInfo() {
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
Companion_getInstance_29();
var tmp0_arrayOfNulls = 26;
tmp$ret$0 = fillArrayVal(Array(tmp0_arrayOfNulls), null);
tmp.h9b_1 = tmp$ret$0;
var tmp_0 = this;
Companion_getInstance_29();
tmp_0.i9b_1 = new Int32Array(26);
var tmp_1 = this;
var tmp_2 = 0;
Companion_getInstance_29();
var tmp_3 = 26;
var tmp_4 = new Int32Array(tmp_3);
while (tmp_2 < tmp_3) {
var tmp_5 = tmp_2;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.NamesInfo.namesLengths.<anonymous>' call
tmp$ret$1 = -1;
tmp_4[tmp_5] = tmp$ret$1;
tmp_2 = tmp_2 + 1 | 0;
}
tmp_1.j9b_1 = tmp_4;
var tmp_6 = this;
var tmp_7 = 0;
Companion_getInstance_29();
var tmp_8 = 26;
var tmp$ret$2;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$2 = fillArrayVal(Array(tmp_8), null);
var tmp_9 = tmp$ret$2;
while (tmp_7 < tmp_8) {
var tmp_10 = tmp_7;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.font.NamesInfo.namesCharsets.<anonymous>' call
tmp$ret$3 = get_UTF8();
tmp_9[tmp_10] = tmp$ret$3;
tmp_7 = tmp_7 + 1 | 0;
}
tmp_6.k9b_1 = tmp_9;
this.l9b_1 = null;
}
NamesInfo.prototype.b99 = function () {
var tmp0_elvis_lhs = this.m9b(NameId_NAME_getInstance());
var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? this.m9b(NameId_COMPLETE_NAME_getInstance()) : tmp0_elvis_lhs;
return tmp1_elvis_lhs == null ? 'TtfFont' : tmp1_elvis_lhs;
};
NamesInfo.prototype.n9b = function (nameId) {
if (this.h9b_1[nameId] == null) {
var nameLength = this.j9b_1[nameId];
if (nameLength < 0)
return null;
var string = ensureNotNull(this.l9b_1).g6r(this.i9b_1[nameId], nameLength, this.k9b_1[nameId]);
var tmp;
var tmp$ret$0;
// Inline function 'kotlin.text.isEmpty' call
tmp$ret$0 = charSequenceLength(string) === 0;
if (tmp$ret$0) {
tmp = string;
} else {
if (equals(new Char(charSequenceGet(string, 0)), new Char(_Char___init__impl__6a9atx(0)))) {
var tmp$ret$3;
// Inline function 'kotlin.text.filter' call
var tmp$ret$2;
// Inline function 'kotlin.text.filterTo' call
var tmp0_filterTo = StringBuilder_init_$Create$();
var inductionVariable = 0;
var last = charSequenceLength(string);
if (inductionVariable < last)
do {
var index = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var element = charSequenceGet(string, index);
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.NamesInfo.getName.<anonymous>' call
tmp$ret$1 = !equals(new Char(element), new Char(_Char___init__impl__6a9atx(0)));
if (tmp$ret$1) {
tmp0_filterTo.g2(element);
}
}
while (inductionVariable < last);
tmp$ret$2 = tmp0_filterTo;
tmp$ret$3 = tmp$ret$2.toString();
tmp = tmp$ret$3;
} else {
tmp = string;
}
}
this.h9b_1[nameId] = tmp;
}
return this.h9b_1[nameId];
};
NamesInfo.prototype.m9b = function (nameId) {
return this.n9b(nameId.q9b_1);
};
NamesInfo.prototype.r9b = function () {
var tmp$ret$2;
// Inline function 'kotlin.collections.associateWith' call
var tmp0_associateWith = values_2();
var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(tmp0_associateWith.length), 16));
var tmp$ret$1;
// Inline function 'kotlin.collections.associateWithTo' call
var indexedObject = tmp0_associateWith;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.NamesInfo.toMap.<anonymous>' call
tmp$ret$0 = this.m9b(element);
result.a(element, tmp$ret$0);
}
tmp$ret$1 = result;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
};
NamesInfo.prototype.toString = function () {
return 'NamesInfo(' + this.r9b() + ')';
};
NamesInfo.$metadata$ = classMeta('NamesInfo');
function SubstitutionInfo(maxSequence, map) {
this.s9b_1 = maxSequence;
this.t9b_1 = map;
}
SubstitutionInfo.$metadata$ = classMeta('SubstitutionInfo');
function Table(id, checksum, offset, length) {
this.z9a_1 = id;
this.a9b_1 = checksum;
this.b9b_1 = offset;
this.c9b_1 = length;
this.d9b_1 = null;
var tmp = this;
tmp.e9b_1 = lazy(BaseTtfFont$Table$ss$delegate$lambda(this));
}
Table.prototype.u9b = function () {
return _get_ss__ndcawb(this).z4n();
};
Table.prototype.toString = function () {
return 'Table(id=' + this.z9a_1 + ', checksum=' + this.a9b_1 + ', offset=' + this.b9b_1 + ', length=' + this.c9b_1 + ')';
};
Table.prototype.hashCode = function () {
var result = getStringHashCode(this.z9a_1);
result = imul(result, 31) + this.a9b_1 | 0;
result = imul(result, 31) + this.b9b_1 | 0;
result = imul(result, 31) + this.c9b_1 | 0;
return result;
};
Table.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof Table))
return false;
var tmp0_other_with_cast = other instanceof Table ? other : THROW_CCE();
if (!(this.z9a_1 === tmp0_other_with_cast.z9a_1))
return false;
if (!(this.a9b_1 === tmp0_other_with_cast.a9b_1))
return false;
if (!(this.b9b_1 === tmp0_other_with_cast.b9b_1))
return false;
if (!(this.c9b_1 === tmp0_other_with_cast.c9b_1))
return false;
return true;
};
Table.$metadata$ = classMeta('Table');
function HorMetric(advanceWidth, lsb) {
this.v9b_1 = advanceWidth;
this.w9b_1 = lsb;
}
HorMetric.prototype.k8z = function () {
return this.v9b_1;
};
HorMetric.prototype.toString = function () {
return 'HorMetric(advanceWidth=' + this.v9b_1 + ', lsb=' + this.w9b_1 + ')';
};
HorMetric.prototype.hashCode = function () {
var result = this.v9b_1;
result = imul(result, 31) + this.w9b_1 | 0;
return result;
};
HorMetric.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof HorMetric))
return false;
var tmp0_other_with_cast = other instanceof HorMetric ? other : THROW_CCE();
if (!(this.v9b_1 === tmp0_other_with_cast.v9b_1))
return false;
if (!(this.w9b_1 === tmp0_other_with_cast.w9b_1))
return false;
return true;
};
HorMetric.$metadata$ = classMeta('HorMetric');
function Companion_18() {
Companion_instance_18 = this;
}
Companion_18.prototype.x9b = function (s, info) {
var tmp$ret$0;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var format = s.q6r();
var count = s.q6r();
var stringOffset = s.q6r();
var inductionVariable = 0;
var tmp;
if (inductionVariable < count) {
$l$loop: do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var platformId = s.q6r();
var encodingId = s.q6r();
var languageId = s.q6r();
var nameId = s.q6r();
var length = s.q6r();
var offset = s.q6r();
var tmp_0;
if (nameId < 0) {
tmp_0 = true;
} else {
Companion_getInstance_29();
tmp_0 = nameId >= 26;
}
if (tmp_0)
continue $l$loop;
var tmp1_subject = encodingId;
{
var charset;
switch (tmp1_subject) {
case 0:
charset = get_UTF8();
break;
case 1:
charset = get_UTF16_BE();
break;
default:
charset = get_UTF16_BE();
break;
}
}
if ((platformId === 0 ? languageId === 0 : false) ? true : info.j9b_1[nameId] === -1) {
info.i9b_1[nameId] = stringOffset + offset | 0;
info.j9b_1[nameId] = length;
info.k9b_1[nameId] = charset;
info.l9b_1 = s;
}
}
while (inductionVariable < count);
tmp = Unit_getInstance();
}
tmp$ret$0 = tmp;
return tmp$ret$0;
};
Companion_18.prototype.k96 = function (s) {
var tmp$ret$5;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
if (s.s6r() === 1953784678) {
var majorVersion = s.q6r();
var minorVersion = s.q6r();
var numFonts = s.s6r();
var tableDirectoryOffsets = s.y6r(numFonts);
if (majorVersion >= 2) {
var dsigTag = s.s6r();
var dsigLength = s.s6r();
var dsigOffset = s.s6r();
}
s.e6r(tableDirectoryOffsets[0]);
} else {
s.l6r(4);
}
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = s.q6r();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.Companion.readHeaderTables.<anonymous>.<anonymous>' call
if (!(tmp0_apply === 1) ? !(tmp0_apply === 20308) : false) {
invalidOp('Not a TTF/OTF file');
}
tmp$ret$0 = tmp0_apply;
var majorVersion_0 = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp1_apply = s.q6r();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.Companion.readHeaderTables.<anonymous>.<anonymous>' call
if (!(tmp1_apply === 0) ? !(tmp1_apply === 21583) : false) {
invalidOp('Not a TTF/OTF file');
}
tmp$ret$1 = tmp1_apply;
var minorVersion_0 = tmp$ret$1;
var numTables = s.q6r();
var searchRange = s.q6r();
var entrySelector = s.q6r();
var rangeShift = s.q6r();
var tmp$ret$4;
// Inline function 'kotlin.collections.map' call
var tmp2_map = until(0, numTables);
var tmp$ret$3;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp2_map, 10));
var inductionVariable = tmp2_map.r1_1;
var last = tmp2_map.s1_1;
if (inductionVariable <= last)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$2;
// Inline function 'com.soywiz.korim.font.Companion.readHeaderTables.<anonymous>.<anonymous>' call
tmp$ret$2 = new Table(s.a6s(4, null, 2, null), s.s6r(), s.s6r(), s.s6r());
tmp0_mapTo.c(tmp$ret$2);
}
while (!(item === last));
tmp$ret$3 = tmp0_mapTo;
tmp$ret$4 = tmp$ret$3;
var tables = tmp$ret$4;
var tablesByName = LinkedHashMap_init_$Create$();
var tmp0_iterator = tables.j();
while (tmp0_iterator.k()) {
var table = tmp0_iterator.l();
var tmp = table;
tmp.d9b_1 = BaseTtfFont$Companion$readHeaderTables$lambda(s, table);
// Inline function 'kotlin.collections.set' call
var tmp3_set = table.z9a_1;
tablesByName.a(tmp3_set, table);
}
return tablesByName;
return tmp$ret$5;
};
Companion_18.$metadata$ = objectMeta('Companion');
var Companion_instance_18;
function Companion_getInstance_31() {
if (Companion_instance_18 == null)
new Companion_18();
return Companion_instance_18;
}
function NameId(name, ordinal, id) {
Enum.call(this, name, ordinal);
this.q9b_1 = id;
}
NameId.$metadata$ = classMeta('NameId', undefined, undefined, undefined, undefined, Enum.prototype);
function ColorBitmapInfo(indexSubTableArrayOffset, indexTablesSize, numberofIndexSubTables, colorRef, hori, vert, startGlyphIndex, endGlyphIndex, ppemX, ppemY, bitDepth, flags) {
this.y9b_1 = indexSubTableArrayOffset;
this.z9b_1 = indexTablesSize;
this.a9c_1 = numberofIndexSubTables;
this.b9c_1 = colorRef;
this.c9c_1 = hori;
this.d9c_1 = vert;
this.e9c_1 = startGlyphIndex;
this.f9c_1 = endGlyphIndex;
this.g9c_1 = ppemX;
this.h9c_1 = ppemY;
this.i9c_1 = bitDepth;
this.j9c_1 = flags;
}
ColorBitmapInfo.prototype.k9c = function () {
return this.y9b_1;
};
ColorBitmapInfo.prototype.l9c = function () {
return this.a9c_1;
};
ColorBitmapInfo.prototype.m9c = function () {
return this.e9c_1;
};
ColorBitmapInfo.prototype.n9c = function () {
return this.f9c_1;
};
ColorBitmapInfo.prototype.toString = function () {
return 'ColorBitmapInfo(indexSubTableArrayOffset=' + this.y9b_1 + ', indexTablesSize=' + this.z9b_1 + ', numberofIndexSubTables=' + this.a9c_1 + ', colorRef=' + this.b9c_1 + ', hori=' + this.c9c_1 + ', vert=' + this.d9c_1 + ', startGlyphIndex=' + this.e9c_1 + ', endGlyphIndex=' + this.f9c_1 + ', ppemX=' + this.g9c_1 + ', ppemY=' + this.h9c_1 + ', bitDepth=' + this.i9c_1 + ', flags=' + this.j9c_1 + ')';
};
ColorBitmapInfo.prototype.hashCode = function () {
var result = this.y9b_1;
result = imul(result, 31) + this.z9b_1 | 0;
result = imul(result, 31) + this.a9c_1 | 0;
result = imul(result, 31) + this.b9c_1 | 0;
result = imul(result, 31) + this.c9c_1.hashCode() | 0;
result = imul(result, 31) + this.d9c_1.hashCode() | 0;
result = imul(result, 31) + this.e9c_1 | 0;
result = imul(result, 31) + this.f9c_1 | 0;
result = imul(result, 31) + this.g9c_1 | 0;
result = imul(result, 31) + this.h9c_1 | 0;
result = imul(result, 31) + this.i9c_1 | 0;
result = imul(result, 31) + this.j9c_1 | 0;
return result;
};
ColorBitmapInfo.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ColorBitmapInfo))
return false;
var tmp0_other_with_cast = other instanceof ColorBitmapInfo ? other : THROW_CCE();
if (!(this.y9b_1 === tmp0_other_with_cast.y9b_1))
return false;
if (!(this.z9b_1 === tmp0_other_with_cast.z9b_1))
return false;
if (!(this.a9c_1 === tmp0_other_with_cast.a9c_1))
return false;
if (!(this.b9c_1 === tmp0_other_with_cast.b9c_1))
return false;
if (!this.c9c_1.equals(tmp0_other_with_cast.c9c_1))
return false;
if (!this.d9c_1.equals(tmp0_other_with_cast.d9c_1))
return false;
if (!(this.e9c_1 === tmp0_other_with_cast.e9c_1))
return false;
if (!(this.f9c_1 === tmp0_other_with_cast.f9c_1))
return false;
if (!(this.g9c_1 === tmp0_other_with_cast.g9c_1))
return false;
if (!(this.h9c_1 === tmp0_other_with_cast.h9c_1))
return false;
if (!(this.i9c_1 === tmp0_other_with_cast.i9c_1))
return false;
if (!(this.j9c_1 === tmp0_other_with_cast.j9c_1))
return false;
return true;
};
ColorBitmapInfo.$metadata$ = classMeta('ColorBitmapInfo');
function SbitLineMetrics(ascender, descender, widthMax, caretSlopeNumerator, caretSlopeDenominator, caretOffset, minOriginSB, minAdvanceSB, maxBeforeBL, minAfterBL, pad1, pad2) {
this.o9c_1 = ascender;
this.p9c_1 = descender;
this.q9c_1 = widthMax;
this.r9c_1 = caretSlopeNumerator;
this.s9c_1 = caretSlopeDenominator;
this.t9c_1 = caretOffset;
this.u9c_1 = minOriginSB;
this.v9c_1 = minAdvanceSB;
this.w9c_1 = maxBeforeBL;
this.x9c_1 = minAfterBL;
this.y9c_1 = pad1;
this.z9c_1 = pad2;
}
SbitLineMetrics.prototype.toString = function () {
return 'SbitLineMetrics(ascender=' + this.o9c_1 + ', descender=' + this.p9c_1 + ', widthMax=' + this.q9c_1 + ', caretSlopeNumerator=' + this.r9c_1 + ', caretSlopeDenominator=' + this.s9c_1 + ', caretOffset=' + this.t9c_1 + ', minOriginSB=' + this.u9c_1 + ', minAdvanceSB=' + this.v9c_1 + ', maxBeforeBL=' + this.w9c_1 + ', minAfterBL=' + this.x9c_1 + ', pad1=' + this.y9c_1 + ', pad2=' + this.z9c_1 + ')';
};
SbitLineMetrics.prototype.hashCode = function () {
var result = this.o9c_1;
result = imul(result, 31) + this.p9c_1 | 0;
result = imul(result, 31) + this.q9c_1 | 0;
result = imul(result, 31) + this.r9c_1 | 0;
result = imul(result, 31) + this.s9c_1 | 0;
result = imul(result, 31) + this.t9c_1 | 0;
result = imul(result, 31) + this.u9c_1 | 0;
result = imul(result, 31) + this.v9c_1 | 0;
result = imul(result, 31) + this.w9c_1 | 0;
result = imul(result, 31) + this.x9c_1 | 0;
result = imul(result, 31) + this.y9c_1 | 0;
result = imul(result, 31) + this.z9c_1 | 0;
return result;
};
SbitLineMetrics.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof SbitLineMetrics))
return false;
var tmp0_other_with_cast = other instanceof SbitLineMetrics ? other : THROW_CCE();
if (!(this.o9c_1 === tmp0_other_with_cast.o9c_1))
return false;
if (!(this.p9c_1 === tmp0_other_with_cast.p9c_1))
return false;
if (!(this.q9c_1 === tmp0_other_with_cast.q9c_1))
return false;
if (!(this.r9c_1 === tmp0_other_with_cast.r9c_1))
return false;
if (!(this.s9c_1 === tmp0_other_with_cast.s9c_1))
return false;
if (!(this.t9c_1 === tmp0_other_with_cast.t9c_1))
return false;
if (!(this.u9c_1 === tmp0_other_with_cast.u9c_1))
return false;
if (!(this.v9c_1 === tmp0_other_with_cast.v9c_1))
return false;
if (!(this.w9c_1 === tmp0_other_with_cast.w9c_1))
return false;
if (!(this.x9c_1 === tmp0_other_with_cast.x9c_1))
return false;
if (!(this.y9c_1 === tmp0_other_with_cast.y9c_1))
return false;
if (!(this.z9c_1 === tmp0_other_with_cast.z9c_1))
return false;
return true;
};
SbitLineMetrics.$metadata$ = classMeta('SbitLineMetrics');
function BitmapGlyphInfo(glyphID, imageFormat, offset, size, info, height, width, horiBearingX, horiBearingY, horiAdvance, vertBearingX, vertBearingY, vertAdvance) {
this.a9d_1 = glyphID;
this.b9d_1 = imageFormat;
this.c9d_1 = offset;
this.d9d_1 = size;
this.e9d_1 = info;
this.f9d_1 = height;
this.g9d_1 = width;
this.h9d_1 = horiBearingX;
this.i9d_1 = horiBearingY;
this.j9d_1 = horiAdvance;
this.k9d_1 = vertBearingX;
this.l9d_1 = vertBearingY;
this.m9d_1 = vertAdvance;
this.n9d_1 = null;
this.o9d_1 = null;
}
BitmapGlyphInfo.prototype.p9d = function () {
return this.b9d_1;
};
BitmapGlyphInfo.prototype.q9d = function (_set____db54di) {
this.f9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.r9d = function (_set____db54di) {
this.g9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.s9d = function (_set____db54di) {
this.h9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.t9d = function () {
return this.h9d_1;
};
BitmapGlyphInfo.prototype.u9d = function (_set____db54di) {
this.i9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.v9d = function () {
return this.i9d_1;
};
BitmapGlyphInfo.prototype.w9d = function (_set____db54di) {
this.j9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.x9d = function () {
return this.j9d_1;
};
BitmapGlyphInfo.prototype.y9d = function (_set____db54di) {
this.k9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.z9d = function (_set____db54di) {
this.l9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.a9e = function (_set____db54di) {
this.m9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.b9e = function (_set____db54di) {
this.n9d_1 = _set____db54di;
};
BitmapGlyphInfo.prototype.k97 = function () {
return this.e9d_1.c9c_1.p9c_1;
};
BitmapGlyphInfo.prototype.c9e = function (cache) {
var tmp0_elvis_lhs = this.o9d_1;
var tmp;
if (tmp0_elvis_lhs == null) {
var tmp_0;
try {
var tmp_1 = PNG_getInstance();
var tmp_2 = toSyncStream(ensureNotNull(this.n9d_1));
tmp_0 = tmp_1.e9e(tmp_2, null, 2, null);
} catch ($p) {
var tmp_3;
if ($p instanceof Error) {
println('Error in TtfFont.BitmapGlyphInfo: ' + $p.message);
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
tmp_3 = tmp$ret$0.c89_1;
} else {
throw $p;
}
tmp_0 = tmp_3;
}
tmp = tmp_0;
} else {
tmp = tmp0_elvis_lhs;
}
var bmp = tmp;
if (cache)
this.o9d_1 = bmp;
return bmp;
};
BitmapGlyphInfo.prototype.f9e = function (cache, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
cache = false;
return this.c9e(cache);
};
BitmapGlyphInfo.prototype.toString = function () {
return 'BitmapGlyphInfo(glyphID=' + this.a9d_1 + ', imageFormat=' + this.b9d_1 + ', offset=' + this.c9d_1 + ', size=' + this.d9d_1 + ', info=' + this.e9d_1 + ', height=' + this.f9d_1 + ', width=' + this.g9d_1 + ', horiBearingX=' + this.h9d_1 + ', horiBearingY=' + this.i9d_1 + ', horiAdvance=' + this.j9d_1 + ', vertBearingX=' + this.k9d_1 + ', vertBearingY=' + this.l9d_1 + ', vertAdvance=' + this.m9d_1 + ')';
};
BitmapGlyphInfo.prototype.hashCode = function () {
var result = this.a9d_1;
result = imul(result, 31) + this.b9d_1 | 0;
result = imul(result, 31) + this.c9d_1 | 0;
result = imul(result, 31) + this.d9d_1 | 0;
result = imul(result, 31) + this.e9d_1.hashCode() | 0;
result = imul(result, 31) + this.f9d_1 | 0;
result = imul(result, 31) + this.g9d_1 | 0;
result = imul(result, 31) + this.h9d_1 | 0;
result = imul(result, 31) + this.i9d_1 | 0;
result = imul(result, 31) + this.j9d_1 | 0;
result = imul(result, 31) + this.k9d_1 | 0;
result = imul(result, 31) + this.l9d_1 | 0;
result = imul(result, 31) + this.m9d_1 | 0;
return result;
};
BitmapGlyphInfo.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof BitmapGlyphInfo))
return false;
var tmp0_other_with_cast = other instanceof BitmapGlyphInfo ? other : THROW_CCE();
if (!(this.a9d_1 === tmp0_other_with_cast.a9d_1))
return false;
if (!(this.b9d_1 === tmp0_other_with_cast.b9d_1))
return false;
if (!(this.c9d_1 === tmp0_other_with_cast.c9d_1))
return false;
if (!(this.d9d_1 === tmp0_other_with_cast.d9d_1))
return false;
if (!this.e9d_1.equals(tmp0_other_with_cast.e9d_1))
return false;
if (!(this.f9d_1 === tmp0_other_with_cast.f9d_1))
return false;
if (!(this.g9d_1 === tmp0_other_with_cast.g9d_1))
return false;
if (!(this.h9d_1 === tmp0_other_with_cast.h9d_1))
return false;
if (!(this.i9d_1 === tmp0_other_with_cast.i9d_1))
return false;
if (!(this.j9d_1 === tmp0_other_with_cast.j9d_1))
return false;
if (!(this.k9d_1 === tmp0_other_with_cast.k9d_1))
return false;
if (!(this.l9d_1 === tmp0_other_with_cast.l9d_1))
return false;
if (!(this.m9d_1 === tmp0_other_with_cast.m9d_1))
return false;
return true;
};
BitmapGlyphInfo.$metadata$ = classMeta('BitmapGlyphInfo');
function ColorLine(cycle, stops) {
this.g9e_1 = cycle;
this.h9e_1 = stops;
}
ColorLine.prototype.i9e = function (paint, palette) {
var tmp0_iterator = this.h9e_1.j();
while (tmp0_iterator.k()) {
var stop = tmp0_iterator.l();
paint.k9f(stop.j9e_1, RGBA__concatAd_impl_gwhfm(RgbaArray__get_impl_nzyo1o(palette.j8i_1, stop.k9e_1), stop.l9e_1));
}
};
ColorLine.prototype.toString = function () {
return 'ColorLine(cycle=' + this.g9e_1 + ', stops=' + this.h9e_1 + ')';
};
ColorLine.prototype.hashCode = function () {
var result = this.g9e_1.hashCode();
result = imul(result, 31) + hashCode(this.h9e_1) | 0;
return result;
};
ColorLine.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ColorLine))
return false;
var tmp0_other_with_cast = other instanceof ColorLine ? other : THROW_CCE();
if (!this.g9e_1.equals(tmp0_other_with_cast.g9e_1))
return false;
if (!equals(this.h9e_1, tmp0_other_with_cast.h9e_1))
return false;
return true;
};
ColorLine.$metadata$ = classMeta('ColorLine');
function ColorStop(stopOffset, paletteIndex, alpha) {
this.j9e_1 = stopOffset;
this.k9e_1 = paletteIndex;
this.l9e_1 = alpha;
}
ColorStop.$metadata$ = classMeta('ColorStop');
function Colrv1Paint(name, ordinal) {
Enum.call(this, name, ordinal);
this.n9f_1 = this.q2_1 + 1 | 0;
}
Colrv1Paint.$metadata$ = classMeta('Colrv1Paint', undefined, undefined, undefined, undefined, Enum.prototype);
function COLRv1(layerList, s, sBaseOffset, sLayerOffset, sClipOffset) {
this.o9f_1 = layerList;
this.p9f_1 = s;
this.q9f_1 = sBaseOffset;
this.r9f_1 = sLayerOffset;
this.s9f_1 = sClipOffset;
var tmp = this;
tmp.t9f_1 = IntIntMap_init_$Create$(0, 0.0, 3, null);
}
COLRv1.prototype.u9f = function () {
return this.q9f_1;
};
COLRv1.prototype.v9f = function () {
return this.s9f_1;
};
COLRv1.prototype.w9f = function () {
return this.t9f_1;
};
COLRv1.$metadata$ = classMeta('COLRv1');
function Contour(x, y, onCurve) {
this.x9f_1 = x;
this.y9f_1 = y;
this.z9f_1 = onCurve;
}
Contour.prototype.a9g = function (_set____db54di) {
this.x9f_1 = _set____db54di;
};
Contour.prototype.d1n = function () {
return this.x9f_1;
};
Contour.prototype.b9g = function (_set____db54di) {
this.y9f_1 = _set____db54di;
};
Contour.prototype.e1n = function () {
return this.y9f_1;
};
Contour.prototype.c9g = function (_set____db54di) {
this.z9f_1 = _set____db54di;
};
Contour.prototype.d9g = function () {
return this.z9f_1;
};
Contour.prototype.toString = function () {
return 'Contour(x=' + this.x9f_1 + ', y=' + this.y9f_1 + ', onCurve=' + this.z9f_1 + ')';
};
Contour.prototype.hashCode = function () {
var result = this.x9f_1;
result = imul(result, 31) + this.y9f_1 | 0;
result = imul(result, 31) + (this.z9f_1 | 0) | 0;
return result;
};
Contour.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof Contour))
return false;
var tmp0_other_with_cast = other instanceof Contour ? other : THROW_CCE();
if (!(this.x9f_1 === tmp0_other_with_cast.x9f_1))
return false;
if (!(this.y9f_1 === tmp0_other_with_cast.y9f_1))
return false;
if (!(this.z9f_1 === tmp0_other_with_cast.z9f_1))
return false;
return true;
};
Contour.$metadata$ = classMeta('Contour');
function GlyphReference(glyph, x, y, scaleX, scale01, scale10, scaleY) {
this.e9g_1 = glyph;
this.f9g_1 = x;
this.g9g_1 = y;
this.h9g_1 = scaleX;
this.i9g_1 = scale01;
this.j9g_1 = scale10;
this.k9g_1 = scaleY;
}
GlyphReference.prototype.l9g = function () {
return this.e9g_1;
};
GlyphReference.prototype.d1n = function () {
return this.f9g_1;
};
GlyphReference.prototype.e1n = function () {
return this.g9g_1;
};
GlyphReference.prototype.m9g = function () {
return this.h9g_1;
};
GlyphReference.prototype.n9g = function () {
return this.k9g_1;
};
GlyphReference.prototype.toString = function () {
return 'GlyphReference(glyph=' + this.e9g_1 + ', x=' + this.f9g_1 + ', y=' + this.g9g_1 + ', scaleX=' + this.h9g_1 + ', scale01=' + this.i9g_1 + ', scale10=' + this.j9g_1 + ', scaleY=' + this.k9g_1 + ')';
};
GlyphReference.prototype.hashCode = function () {
var result = hashCode(this.e9g_1);
result = imul(result, 31) + this.f9g_1 | 0;
result = imul(result, 31) + this.g9g_1 | 0;
result = imul(result, 31) + getNumberHashCode(this.h9g_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.i9g_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.j9g_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.k9g_1) | 0;
return result;
};
GlyphReference.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof GlyphReference))
return false;
var tmp0_other_with_cast = other instanceof GlyphReference ? other : THROW_CCE();
if (!equals(this.e9g_1, tmp0_other_with_cast.e9g_1))
return false;
if (!(this.f9g_1 === tmp0_other_with_cast.f9g_1))
return false;
if (!(this.g9g_1 === tmp0_other_with_cast.g9g_1))
return false;
if (!equals(this.h9g_1, tmp0_other_with_cast.h9g_1))
return false;
if (!equals(this.i9g_1, tmp0_other_with_cast.i9g_1))
return false;
if (!equals(this.j9g_1, tmp0_other_with_cast.j9g_1))
return false;
if (!equals(this.k9g_1, tmp0_other_with_cast.k9g_1))
return false;
return true;
};
GlyphReference.$metadata$ = classMeta('GlyphReference');
function ColrLayerInfo($outer, glyphID, paletteIndex) {
this.q9g_1 = $outer;
this.o9g_1 = glyphID;
this.p9g_1 = paletteIndex;
}
ColrLayerInfo.prototype.r9g = function (pal) {
var tmp$ret$1;
// Inline function 'kotlin.collections.getOrElse' call
var tmp0_getOrElse = getCyclic(this.q9g_1.z95_1, pal).j8i_1;
var tmp1_getOrElse = this.p9g_1;
var tmp;
if (tmp1_getOrElse >= 0 ? tmp1_getOrElse <= get_lastIndex(new RgbaArray(tmp0_getOrElse)) : false) {
tmp = (new RgbaArray(tmp0_getOrElse)).m(tmp1_getOrElse).n8k_1;
} else {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.ColrLayerInfo.color.<anonymous>' call
tmp$ret$0 = Colors_getInstance().u81_1;
tmp = tmp$ret$0;
}
tmp$ret$1 = tmp;
return tmp$ret$1;
};
ColrLayerInfo.prototype.s9g = function () {
return this.r9g(0);
};
ColrLayerInfo.prototype.t9g = function (pal) {
var tmp0_safe_receiver = this.q9g_1.t9a(this.o9g_1, false, 0, 6, null);
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q5n();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.ColrLayerInfo.getShape.<anonymous>' call
var tmp_0 = new RGBA(this.r9g(pal));
tmp$ret$0 = FillShape_init_$Create$(tmp1_safe_receiver.d9h_1, null, tmp_0, null, 0.0, 24, null);
tmp$ret$1 = tmp$ret$0;
tmp = tmp$ret$1;
}
return tmp;
};
ColrLayerInfo.prototype.toString = function () {
return 'ColrLayerInfo(' + this.o9g_1 + ', ' + this.p9g_1 + ', ' + new RGBA(this.s9g()) + ')';
};
ColrLayerInfo.$metadata$ = classMeta('ColrLayerInfo');
function ColrGlyphInfo() {
}
ColrGlyphInfo.$metadata$ = interfaceMeta('ColrGlyphInfo');
function ColrGlyphInfoV1($outer, glyphID, paint) {
this.i9h_1 = $outer;
this.g9h_1 = glyphID;
this.h9h_1 = paint;
}
ColrGlyphInfoV1.prototype.j9h = function () {
return this.g9h_1;
};
ColrGlyphInfoV1.prototype.y8w = function () {
return this.h9h_1;
};
ColrGlyphInfoV1.prototype.e9h = function (pal) {
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.ColrGlyphInfoV1.getColorShape.<anonymous>' call
var paintS = this.i9h_1.a96_1.q9f_1.j6r(this.h9h_1);
try {
this.i9h_1.g9a(this.g9h_1, paintS, tmp0_apply, pal, 0);
} catch ($p) {
if ($p instanceof Error) {
printStackTrace($p);
} else {
throw $p;
}
}
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
var tmp1_also = tmp$ret$1;
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$2;
// Inline function 'com.soywiz.korim.font.ColrGlyphInfoV1.getColorShape.<anonymous>' call
tmp$ret$2 = Unit_getInstance();
tmp$ret$3 = tmp1_also;
return tmp$ret$3;
};
ColrGlyphInfoV1.prototype.toString = function () {
return 'ColrGlyphInfoV1[' + this.g9h_1 + '][' + this.h9h_1 + ']';
};
ColrGlyphInfoV1.$metadata$ = classMeta('ColrGlyphInfoV1', [ColrGlyphInfo]);
function ColrGlyphInfoV0($outer, glyphID, firstLayerIndex, numLayers) {
this.a9i_1 = $outer;
this.x9h_1 = glyphID;
this.y9h_1 = firstLayerIndex;
this.z9h_1 = numLayers;
}
ColrGlyphInfoV0.prototype.j9h = function () {
return this.x9h_1;
};
ColrGlyphInfoV0.prototype.m = function (index) {
return this.a9i_1.x95_1[this.y9h_1 + index | 0];
};
ColrGlyphInfoV0.prototype.i90 = function () {
var tmp = 0;
var tmp_0 = this.z9h_1;
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$0 = fillArrayVal(Array(tmp_0), null);
var tmp_1 = tmp$ret$0;
while (tmp < tmp_0) {
var tmp_2 = tmp;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.ColrGlyphInfoV0.toList.<anonymous>' call
tmp$ret$1 = this.m(tmp_2);
tmp_1[tmp_2] = tmp$ret$1;
tmp = tmp + 1 | 0;
}
return toList_1(tmp_1);
};
ColrGlyphInfoV0.prototype.e9h = function (pal) {
var tmp$ret$3;
// Inline function 'kotlin.collections.mapNotNull' call
var tmp0_mapNotNull = this.i90();
var tmp$ret$2;
// Inline function 'kotlin.collections.mapNotNullTo' call
var tmp0_mapNotNullTo = ArrayList_init_$Create$_0();
// Inline function 'kotlin.collections.forEach' call
var tmp0_iterator = tmp0_mapNotNull.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.ColrGlyphInfoV0.getColorShape.<anonymous>' call
tmp$ret$0 = element.t9g(pal);
var tmp0_safe_receiver = tmp$ret$0;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
tmp0_mapNotNullTo.c(tmp0_safe_receiver);
tmp$ret$1 = Unit_getInstance();
}
}
tmp$ret$2 = tmp0_mapNotNullTo;
tmp$ret$3 = tmp$ret$2;
return new CompoundShape(tmp$ret$3);
};
ColrGlyphInfoV0.prototype.toString = function () {
return 'ColrGlyphInfoV0[' + this.x9h_1 + '][' + this.z9h_1 + '](' + this.i90() + ')';
};
ColrGlyphInfoV0.$metadata$ = classMeta('ColrGlyphInfoV0', [ColrGlyphInfo]);
function GlyphGraphicsPath(glpyhIndex, path) {
this.c9h_1 = glpyhIndex;
this.d9h_1 = path;
}
GlyphGraphicsPath.prototype.q5n = function () {
return this.d9h_1;
};
GlyphGraphicsPath.prototype.s7e = function () {
return this.d9h_1.m7j_1;
};
GlyphGraphicsPath.prototype.t7e = function () {
return this.d9h_1.n7j_1;
};
GlyphGraphicsPath.prototype.i7s = function () {
return this.d9h_1.i7s();
};
GlyphGraphicsPath.prototype.x2c = function () {
this.d9h_1.x2c();
};
GlyphGraphicsPath.prototype.x7e = function (cx1, cy1, cx2, cy2, ax, ay) {
this.d9h_1.x7e(cx1, cy1, cx2, cy2, ax, ay);
};
GlyphGraphicsPath.prototype.u7e = function (x, y) {
this.d9h_1.u7e(x, y);
};
GlyphGraphicsPath.prototype.r7e = function (x, y) {
this.d9h_1.r7e(x, y);
};
GlyphGraphicsPath.prototype.v7e = function (cx, cy, ax, ay) {
this.d9h_1.v7e(cx, cy, ax, ay);
};
GlyphGraphicsPath.prototype.toString = function () {
return 'GlyphGraphicsPath(glpyhIndex=' + this.c9h_1 + ', "' + toSvgPathString$default(this.d9h_1, null, 0, 3, null) + '")';
};
GlyphGraphicsPath.prototype.hashCode = function () {
var result = this.c9h_1;
result = imul(result, 31) + this.d9h_1.hashCode() | 0;
return result;
};
GlyphGraphicsPath.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof GlyphGraphicsPath))
return false;
var tmp0_other_with_cast = other instanceof GlyphGraphicsPath ? other : THROW_CCE();
if (!(this.c9h_1 === tmp0_other_with_cast.c9h_1))
return false;
if (!this.d9h_1.equals(tmp0_other_with_cast.d9h_1))
return false;
return true;
};
GlyphGraphicsPath.$metadata$ = classMeta('GlyphGraphicsPath', [IVectorPath]);
function Glyph_0($outer, index, xMin, yMin, xMax, yMax, advanceWidth) {
this.b9h_1 = $outer;
this.u9g_1 = index;
this.v9g_1 = xMin;
this.w9g_1 = yMin;
this.x9g_1 = xMax;
this.y9g_1 = yMax;
this.z9g_1 = advanceWidth;
var tmp = this;
var tmp$ret$1;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.Glyph.metrics1px.<anonymous>' call
var xMin_0 = this.v9g_1;
var yMin_0 = this.w9g_1;
var xMax_0 = this.x9g_1;
var yMax_0 = this.y9g_1;
if (((xMin_0 === 0 ? yMin_0 === 0 : false) ? xMax_0 === 0 : false) ? yMax_0 === 0 : false) {
var sClipOffset = this.b9h_1.a96_1.s9f_1;
var glyphIDToClipOffset = this.b9h_1.a96_1.t9f_1;
var tmp_0;
if (!(sClipOffset == null) ? glyphIDToClipOffset.v9(this.u9g_1) : false) {
var clipOffset = glyphIDToClipOffset.m(this.u9g_1);
var tmp_1 = sClipOffset.j6r(clipOffset);
tmp_0 = this.b9h_1.e9a(tmp_1, false, 1, null);
} else {
var tmp0_safe_receiver = this.b9i();
var tmp_2;
if (tmp0_safe_receiver == null) {
tmp_2 = null;
} else {
tmp_2 = tmp0_safe_receiver.f9h(0, 1, null);
}
var tmp1_safe_receiver = tmp_2;
tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o7i();
}
var bounds = tmp_0;
if (!(bounds == null)) {
xMin_0 = numberToInt(bounds.b74());
xMax_0 = numberToInt(bounds.z73());
yMin_0 = numberToInt(bounds.y73());
yMax_0 = numberToInt(bounds.a74());
}
}
var size = this.b9h_1.i95_1;
var scale = this.b9h_1.o96(size);
tmp$ret$0 = new GlyphMetrics(size, true, -1, Companion_getInstance_0().l7c(xMin_0 * scale, yMin_0 * scale, xMax_0 * scale, yMax_0 * scale), this.z9g_1 * scale);
tmp$ret$1 = tmp$ret$0;
tmp.a9h_1 = tmp$ret$1;
}
Glyph_0.prototype.m4 = function () {
return this.u9g_1;
};
Glyph_0.prototype.c9i = function () {
return this.v9g_1;
};
Glyph_0.prototype.e98 = function () {
return this.w9g_1;
};
Glyph_0.prototype.d9i = function () {
return this.x9g_1;
};
Glyph_0.prototype.h98 = function () {
return this.y9g_1;
};
Glyph_0.prototype.k8z = function () {
return this.z9g_1;
};
Glyph_0.prototype.b9i = function () {
return this.b9h_1.y95_1.m(this.u9g_1);
};
Glyph_0.prototype.e9i = function () {
return this.b9h_1.w95_1.q(this.u9g_1);
};
Glyph_0.prototype.f9i = function () {
return this.a9h_1;
};
Glyph_0.$metadata$ = classMeta('Glyph');
function CompositeGlyph($outer, index, xMin, yMin, xMax, yMax, refs, advanceWidth) {
this.r9i_1 = $outer;
Glyph_0.call(this, $outer, index, xMin, yMin, xMax, yMax, advanceWidth);
this.o9i_1 = refs;
var tmp = this;
var tmp$ret$3;
// Inline function 'kotlin.collections.map' call
var tmp0_map = this.o9i_1;
var tmp$ret$2;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator = tmp0_map.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.CompositeGlyph.paths.<anonymous>' call
var gpath = item.e9g_1.q5n().d9h_1;
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp_0 = new IntArrayList(gpath.f7j_1.i());
var tmp_1 = new DoubleArrayList(gpath.g7j_1.i());
var tmp0_also = new GlyphGraphicsPath(item.e9g_1.u9g_1, VectorPath_init_$Create$(tmp_0, tmp_1, null, false, 12, null));
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.CompositeGlyph.paths.<anonymous>.<anonymous>' call
var m = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
m.j76(item.h9g_1, item.k9g_1);
m.n76(item.f9g_1, -item.g9g_1 | 0);
tmp0_also.d9h_1.t7t(item.e9g_1.q5n().d9h_1, m);
tmp$ret$0 = tmp0_also;
tmp$ret$1 = tmp$ret$0;
tmp0_mapTo.c(tmp$ret$1);
}
tmp$ret$2 = tmp0_mapTo;
tmp$ret$3 = tmp$ret$2;
tmp.p9i_1 = tmp$ret$3;
var tmp_2 = this;
var tmp$ret$6;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$5;
// Inline function 'com.soywiz.korim.font.CompositeGlyph.path.<anonymous>' call
var commandsSize = 0;
var dataSize = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.p9i_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korim.font.CompositeGlyph.path.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
commandsSize = commandsSize + tmp1__anonymous__uwfjfc.d9h_1.f7j_1.i() | 0;
dataSize = dataSize + tmp1__anonymous__uwfjfc.d9h_1.g7j_1.i() | 0;
}
var tmp$ret$4;
// Inline function 'kotlin.also' call
var tmp_3 = new IntArrayList(commandsSize);
var tmp_4 = new DoubleArrayList(dataSize);
var tmp2_also = new GlyphGraphicsPath(index, VectorPath_init_$Create$(tmp_3, tmp_4, null, false, 12, null));
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.CompositeGlyph.path.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach_0 = this.p9i_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach_0.i()) {
// Inline function 'com.soywiz.korim.font.CompositeGlyph.path.<anonymous>.<anonymous>.<anonymous>' call
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
var tmp1__anonymous__uwfjfc_0 = tmp0_fastForEach_0.m(tmp0_0);
tmp2_also.d9h_1.u7t(tmp1__anonymous__uwfjfc_0.d9h_1, null, 2, null);
}
tmp$ret$4 = tmp2_also;
tmp$ret$5 = tmp$ret$4;
tmp$ret$6 = tmp$ret$5;
tmp_2.q9i_1 = tmp$ret$6;
}
CompositeGlyph.prototype.toString = function () {
return 'CompositeGlyph[' + this.z9g_1 + '](' + this.o9i_1 + ')';
};
CompositeGlyph.prototype.s9i = function () {
return this.p9i_1;
};
CompositeGlyph.prototype.q5n = function () {
return this.q9i_1;
};
CompositeGlyph.$metadata$ = classMeta('CompositeGlyph', undefined, undefined, undefined, undefined, Glyph_0.prototype);
function CFFGlyph($outer, index, xMin, yMin, xMax, yMax, advanceWidth, path) {
this.d9j_1 = $outer;
Glyph_0.call(this, $outer, index, xMin, yMin, xMax, yMax, advanceWidth);
this.b9j_1 = path;
this.c9j_1 = listOf_0(this.b9j_1);
}
CFFGlyph.prototype.q5n = function () {
return this.b9j_1;
};
CFFGlyph.$metadata$ = classMeta('CFFGlyph', undefined, undefined, undefined, undefined, Glyph_0.prototype);
function SimpleGlyph($outer, index, xMin, yMin, xMax, yMax, contoursIndices, flags, xPos, yPos, advanceWidth, dummy) {
this.t9j_1 = $outer;
Glyph_0.call(this, $outer, index, xMin, yMin, xMax, yMax, advanceWidth);
this.m9j_1 = contoursIndices;
this.n9j_1 = flags;
this.o9j_1 = xPos;
this.p9j_1 = yPos;
this.q9j_1 = dummy;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.SimpleGlyph.path.<anonymous>' call
var commandSize = 0;
var dataSize = 0;
// Inline function 'com.soywiz.korim.font.SimpleGlyph.forEachContour' call
var inductionVariable = 0;
var last = this.m9j_1.length - 1 | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var cstart = this.m9j_1[n] + 1 | 0;
var cend = this.m9j_1[n + 1 | 0];
var csize = (cend - cstart | 0) + 1 | 0;
// Inline function 'com.soywiz.korim.font.SimpleGlyph.path.<anonymous>.<anonymous>' call
commandSize = commandSize + (1 + imul(csize, 2) | 0) | 0;
dataSize = dataSize + (2 + imul(csize, 8) | 0) | 0;
}
while (inductionVariable < last);
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp_0 = new IntArrayList(commandSize);
var tmp_1 = new DoubleArrayList(dataSize);
var tmp0_also = new GlyphGraphicsPath(index, VectorPath_init_$Create$(tmp_0, tmp_1, null, false, 12, null));
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.SimpleGlyph.path.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korim.font.SimpleGlyph.forEachContour' call
var inductionVariable_0 = 0;
var last_0 = this.m9j_1.length - 1 | 0;
if (inductionVariable_0 < last_0)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var cstart_0 = this.m9j_1[n_0] + 1 | 0;
var cend_0 = this.m9j_1[n_0 + 1 | 0];
var csize_0 = (cend_0 - cstart_0 | 0) + 1 | 0;
// Inline function 'com.soywiz.korim.font.SimpleGlyph.path.<anonymous>.<anonymous>.<anonymous>' call
var curr = this.u9j(cend_0, this.t9j_1.e94_1[0]);
var next = this.u9j(cstart_0, this.t9j_1.e94_1[1]);
if (curr.z9f_1) {
moveTo(tmp0_also, curr.x9f_1, -curr.y9f_1 | 0);
} else if (next.z9f_1) {
moveTo(tmp0_also, next.x9f_1, -next.y9f_1 | 0);
} else {
moveTo(tmp0_also, imul(curr.x9f_1 + next.x9f_1 | 0, 0), -numberToInt((curr.y9f_1 + next.y9f_1 | 0) * 0.5) | 0);
}
var inductionVariable_1 = 0;
if (inductionVariable_1 < csize_0)
do {
var cpos = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var prev = curr;
curr = next;
next = this.u9j(cstart_0 + ((cpos + 1 | 0) % csize_0 | 0) | 0, this.t9j_1.e94_1[(cpos + 2 | 0) % 3 | 0]);
if (curr.z9f_1) {
lineTo(tmp0_also, curr.x9f_1, -curr.y9f_1 | 0);
} else {
var prev2X = prev.x9f_1;
var prev2Y = prev.y9f_1;
var next2X = next.x9f_1;
var next2Y = next.y9f_1;
if (!prev.z9f_1) {
prev2X = numberToInt((curr.x9f_1 + prev.x9f_1 | 0) * 0.5);
prev2Y = numberToInt((curr.y9f_1 + prev.y9f_1 | 0) * 0.5);
lineTo(tmp0_also, prev2X, -prev2Y | 0);
}
if (!next.z9f_1) {
next2X = numberToInt((curr.x9f_1 + next.x9f_1 | 0) * 0.5);
next2Y = numberToInt((curr.y9f_1 + next.y9f_1 | 0) * 0.5);
}
lineTo(tmp0_also, prev2X, -prev2Y | 0);
quadTo(tmp0_also, curr.x9f_1, -curr.y9f_1 | 0, next2X, -next2Y | 0);
}
}
while (inductionVariable_1 < csize_0);
tmp0_also.x2c();
}
while (inductionVariable_0 < last_0);
tmp$ret$0 = tmp0_also;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
tmp.r9j_1 = tmp$ret$2;
this.s9j_1 = listOf_0(this.r9j_1);
}
SimpleGlyph.prototype.v9j = function () {
return this.m9j_1;
};
SimpleGlyph.prototype.w9j = function () {
return this.o9j_1;
};
SimpleGlyph.prototype.x9j = function () {
return this.p9j_1;
};
SimpleGlyph.prototype.toString = function () {
return 'SimpleGlyph' + (this.q9j_1 ? 'Dummy' : '') + '[' + this.u9g_1 + '](advance=' + this.z9g_1 + ') : ' + this.r9j_1;
};
SimpleGlyph.prototype.y9j = function (n) {
return !((this.n9j_1[n] & 1) === 0);
};
SimpleGlyph.prototype.u9j = function (n, out) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.SimpleGlyph.contour.<anonymous>' call
out.x9f_1 = this.o9j_1[n];
out.y9f_1 = this.p9j_1[n];
out.z9f_1 = this.y9j(n);
tmp$ret$0 = out;
return tmp$ret$0;
};
SimpleGlyph.prototype.q5n = function () {
return this.r9j_1;
};
SimpleGlyph.prototype.z9j = function (block) {
var inductionVariable = 0;
var last = this.m9j_1.length - 1 | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var cstart = this.m9j_1[n] + 1 | 0;
var cend = this.m9j_1[n + 1 | 0];
var csize = (cend - cstart | 0) + 1 | 0;
block(cstart, cend, csize);
}
while (inductionVariable < last);
};
SimpleGlyph.$metadata$ = classMeta('SimpleGlyph', undefined, undefined, undefined, undefined, Glyph_0.prototype);
function BaseTtfFont$readCblc$1$Subtable(firstGlyphIndex, lastGlyphIndex, additionalOffsetToIndexSubtable) {
this.a9k_1 = firstGlyphIndex;
this.b9k_1 = lastGlyphIndex;
this.c9k_1 = additionalOffsetToIndexSubtable;
}
BaseTtfFont$readCblc$1$Subtable.prototype.d9k = function () {
return this.a9k_1;
};
BaseTtfFont$readCblc$1$Subtable.prototype.e9k = function () {
return this.c9k_1;
};
BaseTtfFont$readCblc$1$Subtable.prototype.s96 = function () {
return this.b9k_1 - this.a9k_1 | 0;
};
BaseTtfFont$readCblc$1$Subtable.prototype.toString = function () {
return 'Subtable(firstGlyphIndex=' + this.a9k_1 + ', lastGlyphIndex=' + this.b9k_1 + ', additionalOffsetToIndexSubtable=' + this.c9k_1 + ')';
};
BaseTtfFont$readCblc$1$Subtable.prototype.hashCode = function () {
var result = this.a9k_1;
result = imul(result, 31) + this.b9k_1 | 0;
result = imul(result, 31) + this.c9k_1 | 0;
return result;
};
BaseTtfFont$readCblc$1$Subtable.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof BaseTtfFont$readCblc$1$Subtable))
return false;
var tmp0_other_with_cast = other instanceof BaseTtfFont$readCblc$1$Subtable ? other : THROW_CCE();
if (!(this.a9k_1 === tmp0_other_with_cast.a9k_1))
return false;
if (!(this.b9k_1 === tmp0_other_with_cast.b9k_1))
return false;
if (!(this.c9k_1 === tmp0_other_with_cast.c9k_1))
return false;
return true;
};
BaseTtfFont$readCblc$1$Subtable.$metadata$ = classMeta('Subtable');
function BaseTtfFont$readSbix$1$StrikeInfo(ppem, ppi, strikeOffset, offsets) {
this.f9k_1 = ppem;
this.g9k_1 = ppi;
this.h9k_1 = strikeOffset;
this.i9k_1 = offsets;
}
BaseTtfFont$readSbix$1$StrikeInfo.prototype.j9k = function () {
return this.f9k_1;
};
BaseTtfFont$readSbix$1$StrikeInfo.prototype.k9k = function () {
return this.h9k_1;
};
BaseTtfFont$readSbix$1$StrikeInfo.prototype.l9k = function () {
return this.i9k_1;
};
BaseTtfFont$readSbix$1$StrikeInfo.prototype.toString = function () {
return 'StrikeInfo(ppem=' + this.f9k_1 + ', ppi=' + this.g9k_1 + ', strikeOffset=' + this.h9k_1 + ', offsets=' + this.i9k_1 + ')';
};
BaseTtfFont$readSbix$1$StrikeInfo.prototype.hashCode = function () {
var result = this.f9k_1;
result = imul(result, 31) + this.g9k_1 | 0;
result = imul(result, 31) + this.h9k_1 | 0;
result = imul(result, 31) + this.i9k_1.hashCode() | 0;
return result;
};
BaseTtfFont$readSbix$1$StrikeInfo.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof BaseTtfFont$readSbix$1$StrikeInfo))
return false;
var tmp0_other_with_cast = other instanceof BaseTtfFont$readSbix$1$StrikeInfo ? other : THROW_CCE();
if (!(this.f9k_1 === tmp0_other_with_cast.f9k_1))
return false;
if (!(this.g9k_1 === tmp0_other_with_cast.g9k_1))
return false;
if (!(this.h9k_1 === tmp0_other_with_cast.h9k_1))
return false;
if (!this.i9k_1.equals(tmp0_other_with_cast.i9k_1))
return false;
return true;
};
BaseTtfFont$readSbix$1$StrikeInfo.$metadata$ = classMeta('StrikeInfo');
function BaseTtfFont$readCoverage$RangeInfo(start, endInclusive, index) {
this.m9k_1 = start;
this.n9k_1 = endInclusive;
this.o9k_1 = index;
this.p9k_1 = (this.n9k_1 - this.m9k_1 | 0) + 1 | 0;
}
BaseTtfFont$readCoverage$RangeInfo.prototype.m4 = function () {
return this.o9k_1;
};
BaseTtfFont$readCoverage$RangeInfo.prototype.q9k = function () {
return this.p9k_1;
};
BaseTtfFont$readCoverage$RangeInfo.prototype.toString = function () {
return 'RangeInfo(start=' + this.m9k_1 + ', endInclusive=' + this.n9k_1 + ', index=' + this.o9k_1 + ')';
};
BaseTtfFont$readCoverage$RangeInfo.prototype.hashCode = function () {
var result = this.m9k_1;
result = imul(result, 31) + this.n9k_1 | 0;
result = imul(result, 31) + this.o9k_1 | 0;
return result;
};
BaseTtfFont$readCoverage$RangeInfo.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof BaseTtfFont$readCoverage$RangeInfo))
return false;
var tmp0_other_with_cast = other instanceof BaseTtfFont$readCoverage$RangeInfo ? other : THROW_CCE();
if (!(this.m9k_1 === tmp0_other_with_cast.m9k_1))
return false;
if (!(this.n9k_1 === tmp0_other_with_cast.n9k_1))
return false;
if (!(this.o9k_1 === tmp0_other_with_cast.o9k_1))
return false;
return true;
};
BaseTtfFont$readCoverage$RangeInfo.$metadata$ = classMeta('RangeInfo');
function BaseTtfFont$readCmap$1$EncodingRecord(platformId, encodingId, offset) {
this.r9k_1 = platformId;
this.s9k_1 = encodingId;
this.t9k_1 = offset;
}
BaseTtfFont$readCmap$1$EncodingRecord.prototype.u9k = function () {
return this.t9k_1;
};
BaseTtfFont$readCmap$1$EncodingRecord.prototype.toString = function () {
return 'EncodingRecord(platformId=' + this.r9k_1 + ', encodingId=' + this.s9k_1 + ', offset=' + this.t9k_1 + ')';
};
BaseTtfFont$readCmap$1$EncodingRecord.prototype.hashCode = function () {
var result = this.r9k_1;
result = imul(result, 31) + this.s9k_1 | 0;
result = imul(result, 31) + this.t9k_1 | 0;
return result;
};
BaseTtfFont$readCmap$1$EncodingRecord.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof BaseTtfFont$readCmap$1$EncodingRecord))
return false;
var tmp0_other_with_cast = other instanceof BaseTtfFont$readCmap$1$EncodingRecord ? other : THROW_CCE();
if (!(this.r9k_1 === tmp0_other_with_cast.r9k_1))
return false;
if (!(this.s9k_1 === tmp0_other_with_cast.s9k_1))
return false;
if (!(this.t9k_1 === tmp0_other_with_cast.t9k_1))
return false;
return true;
};
BaseTtfFont$readCmap$1$EncodingRecord.$metadata$ = classMeta('EncodingRecord');
function NameId_COPYRIGHT_getInstance() {
NameId_initEntries();
return NameId_COPYRIGHT_instance;
}
function NameId_NAME_getInstance() {
NameId_initEntries();
return NameId_NAME_instance;
}
function NameId_STYLE_getInstance() {
NameId_initEntries();
return NameId_STYLE_instance;
}
function NameId_UNAME_getInstance() {
NameId_initEntries();
return NameId_UNAME_instance;
}
function NameId_COMPLETE_NAME_getInstance() {
NameId_initEntries();
return NameId_COMPLETE_NAME_instance;
}
function NameId_RELEASE_VERSION_getInstance() {
NameId_initEntries();
return NameId_RELEASE_VERSION_instance;
}
function NameId_POSTSCRIPT_NAME_getInstance() {
NameId_initEntries();
return NameId_POSTSCRIPT_NAME_instance;
}
function NameId_TRADEMARK_getInstance() {
NameId_initEntries();
return NameId_TRADEMARK_instance;
}
function NameId_MANUFACTURER_getInstance() {
NameId_initEntries();
return NameId_MANUFACTURER_instance;
}
function NameId_DESIGNER_getInstance() {
NameId_initEntries();
return NameId_DESIGNER_instance;
}
function NameId_DESCRIPTION_getInstance() {
NameId_initEntries();
return NameId_DESCRIPTION_instance;
}
function NameId_URL_VENDOR_getInstance() {
NameId_initEntries();
return NameId_URL_VENDOR_instance;
}
function NameId_URL_DESIGNER_getInstance() {
NameId_initEntries();
return NameId_URL_DESIGNER_instance;
}
function NameId_LICENSE_DESCRIPTION_getInstance() {
NameId_initEntries();
return NameId_LICENSE_DESCRIPTION_instance;
}
function NameId_LICENSE_URL_getInstance() {
NameId_initEntries();
return NameId_LICENSE_URL_instance;
}
function NameId_RESERVED_15_getInstance() {
NameId_initEntries();
return NameId_RESERVED_15_instance;
}
function NameId_PREFERRED_FAMILY_getInstance() {
NameId_initEntries();
return NameId_PREFERRED_FAMILY_instance;
}
function NameId_PREFERRED_SUBFAMILY_getInstance() {
NameId_initEntries();
return NameId_PREFERRED_SUBFAMILY_instance;
}
function NameId_COMPATIBLE_FULL_getInstance() {
NameId_initEntries();
return NameId_COMPATIBLE_FULL_instance;
}
function NameId_SAMPLE_TEXT_getInstance() {
NameId_initEntries();
return NameId_SAMPLE_TEXT_instance;
}
function NameId_POSTSCRIPT_CID_getInstance() {
NameId_initEntries();
return NameId_POSTSCRIPT_CID_instance;
}
function NameId_WWS_FAMILY_NAME_getInstance() {
NameId_initEntries();
return NameId_WWS_FAMILY_NAME_instance;
}
function NameId_WWS_SUBFAMILY_NAME_getInstance() {
NameId_initEntries();
return NameId_WWS_SUBFAMILY_NAME_instance;
}
function NameId_LIGHT_BACKGROUND_getInstance() {
NameId_initEntries();
return NameId_LIGHT_BACKGROUND_instance;
}
function NameId_DARK_BACKGROUND_getInstance() {
NameId_initEntries();
return NameId_DARK_BACKGROUND_instance;
}
function NameId_VARIATION_POSTSCRIPT_PREFIX_getInstance() {
NameId_initEntries();
return NameId_VARIATION_POSTSCRIPT_PREFIX_instance;
}
function Colrv1Paint_PaintColrLayers_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintColrLayers_instance;
}
function Colrv1Paint_PaintSolid_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintSolid_instance;
}
function Colrv1Paint_PaintVarSolid_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarSolid_instance;
}
function Colrv1Paint_PaintLinearGradient_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintLinearGradient_instance;
}
function Colrv1Paint_PaintVarLinearGradient_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarLinearGradient_instance;
}
function Colrv1Paint_PaintRadialGradient_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintRadialGradient_instance;
}
function Colrv1Paint_PaintVarRadialGradient_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarRadialGradient_instance;
}
function Colrv1Paint_PaintSweepGradient_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintSweepGradient_instance;
}
function Colrv1Paint_PaintVarSweepGradient_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarSweepGradient_instance;
}
function Colrv1Paint_PaintGlyph_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintGlyph_instance;
}
function Colrv1Paint_PaintColrGlyph_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintColrGlyph_instance;
}
function Colrv1Paint_PaintTransform_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintTransform_instance;
}
function Colrv1Paint_PaintVarTransform_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarTransform_instance;
}
function Colrv1Paint_PaintTranslate_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintTranslate_instance;
}
function Colrv1Paint_PaintVarTranslate_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarTranslate_instance;
}
function Colrv1Paint_PaintScale_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintScale_instance;
}
function Colrv1Paint_PaintVarScale_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarScale_instance;
}
function Colrv1Paint_PaintScaleAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintScaleAroundCenter_instance;
}
function Colrv1Paint_PaintVarScaleAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarScaleAroundCenter_instance;
}
function Colrv1Paint_PaintScaleUniform_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintScaleUniform_instance;
}
function Colrv1Paint_PaintVarScaleUniform_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarScaleUniform_instance;
}
function Colrv1Paint_PaintScaleUniformAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintScaleUniformAroundCenter_instance;
}
function Colrv1Paint_PaintVarScaleUniformAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarScaleUniformAroundCenter_instance;
}
function Colrv1Paint_PaintRotate_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintRotate_instance;
}
function Colrv1Paint_PaintVarRotate_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarRotate_instance;
}
function Colrv1Paint_PaintRotateAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintRotateAroundCenter_instance;
}
function Colrv1Paint_PaintVarRotateAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarRotateAroundCenter_instance;
}
function Colrv1Paint_PaintSkew_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintSkew_instance;
}
function Colrv1Paint_PaintVarSkew_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarSkew_instance;
}
function Colrv1Paint_PaintSkewAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintSkewAroundCenter_instance;
}
function Colrv1Paint_PaintVarSkewAroundCenter_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintVarSkewAroundCenter_instance;
}
function Colrv1Paint_PaintComposite_getInstance() {
Colrv1Paint_initEntries();
return Colrv1Paint_PaintComposite_instance;
}
function BaseTtfFont(s, freeze, extName, onlyReadMetadata) {
Companion_getInstance_31();
this.y93_1 = s;
this.z93_1 = freeze;
this.a94_1 = extName;
this.b94_1 = onlyReadMetadata;
var tmp = this;
tmp.c94_1 = Mixin_init_$Create$(null, 1, null);
this.d94_1 = new NamesInfo();
var tmp_0 = this;
var tmp_1 = 0;
var tmp_2 = 3;
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$0 = fillArrayVal(Array(tmp_2), null);
var tmp_3 = tmp$ret$0;
while (tmp_1 < tmp_2) {
var tmp_4 = tmp_1;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.tempContours.<anonymous>' call
tmp$ret$1 = Contour_init_$Create$(0, 0, false, 7, null);
tmp_3[tmp_4] = tmp$ret$1;
tmp_1 = tmp_1 + 1 | 0;
}
tmp_0.e94_1 = tmp_3;
this.f94_1 = 0;
this.g94_1 = 0;
this.h94_1 = 0;
this.i94_1 = 0;
this.j94_1 = 0;
this.k94_1 = 0;
this.l94_1 = 0;
this.m94_1 = 0;
this.n94_1 = 0;
this.o94_1 = 0;
this.p94_1 = 0;
this.q94_1 = 0;
this.r94_1 = 0;
this.s94_1 = 0;
this.t94_1 = Companion_getInstance_32().v9k(0, 0);
this.u94_1 = 0;
this.v94_1 = 0;
this.w94_1 = 0;
this.x94_1 = 0;
this.y94_1 = 0;
this.z94_1 = 0;
this.a95_1 = 0;
this.b95_1 = 0;
this.c95_1 = 0;
this.d95_1 = 0;
this.e95_1 = 0;
this.f95_1 = 0;
this.g95_1 = new Int32Array(0);
this.h95_1 = Companion_getInstance_32().v9k(0, 0);
this.i95_1 = 128;
this.j95_1 = 0;
this.k95_1 = 0;
this.l95_1 = 0;
this.m95_1 = 0;
this.n95_1 = 0;
this.o95_1 = 0;
this.p95_1 = 0;
this.q95_1 = 0;
this.r95_1 = 0;
var tmp_5 = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.listOf' call
tmp$ret$2 = emptyList();
tmp_5.s95_1 = tmp$ret$2;
this.t95_1 = LinkedHashMap_init_$Create$();
this.u95_1 = LinkedHashMap_init_$Create$();
var tmp_6 = this;
tmp_6.v95_1 = IntMap_init_$Create$(512, 0.0, 2, null);
this.w95_1 = LinkedHashMap_init_$Create$();
var tmp_7 = this;
var tmp$ret$5;
// Inline function 'kotlin.arrayOf' call
var tmp$ret$4;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = [];
tmp$ret$4 = tmp$ret$3;
tmp$ret$5 = tmp$ret$4;
tmp_7.x95_1 = tmp$ret$5;
var tmp_8 = this;
tmp_8.y95_1 = IntMap_init_$Create$(0, 0.0, 3, null);
var tmp_9 = this;
var tmp$ret$6;
// Inline function 'kotlin.collections.listOf' call
tmp$ret$6 = emptyList();
tmp_9.z95_1 = tmp$ret$6;
var tmp_10 = this;
tmp_10.a96_1 = COLRv1_init_$Create$(null, null, null, null, null, 31, null);
this.b96_1 = false;
var tmp_11 = this;
tmp_11.c96_1 = IntIntMap_init_$Create$(0, 0.0, 3, null);
var tmp_12 = this;
tmp_12.d96_1 = IntMap_init_$Create$(0, 0.0, 3, null);
this.f96_1 = new GlyphMetrics(1.0, false, 0, Companion_getInstance_0().zp(), 0.0);
this.g96_1 = false;
this.h96_1 = null;
}
BaseTtfFont.prototype.e4v = function (_set____db54di) {
this.c94_1.e4v(_set____db54di);
};
BaseTtfFont.prototype.f4v = function () {
return this.c94_1.f4v();
};
BaseTtfFont.prototype.t8m = function (size, metrics) {
return metrics.c8n(this.a99(), size);
};
BaseTtfFont.prototype.e8n = function (size, codePoint, metrics, reader) {
var tmp0_safe_receiver = this.p9a(reader, codePoint, false, 4, null);
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a9h_1;
return metrics.k8n(tmp1_elvis_lhs == null ? this.f96_1 : tmp1_elvis_lhs, size, codePoint);
};
BaseTtfFont.prototype.l8n = function (size, leftCodePoint, rightCodePoint) {
return 0.0;
};
BaseTtfFont.prototype.m96 = function (size, codePoint, path, reader) {
var tmp0_safe_receiver = reader;
var spos = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y5y_1;
var tmp1_safe_receiver = reader;
var codePointPeek = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g5z(0);
var tmp2_elvis_lhs = this.o9a(reader, codePoint, true);
var tmp;
if (tmp2_elvis_lhs == null) {
return null;
} else {
tmp = tmp2_elvis_lhs;
}
var g = tmp;
var scale = this.o96(size);
path.q8x_1 = g.q5n().d9h_1;
var tmp_0 = path;
var tmp3_safe_receiver = g.b9i();
var tmp_1;
if (tmp3_safe_receiver == null) {
tmp_1 = null;
} else {
tmp_1 = tmp3_safe_receiver.f9h(0, 1, null);
}
tmp_0.r8x_1 = tmp_1;
var bitmapEntry = g.e9i();
var tmp4_safe_receiver = bitmapEntry;
var tmp_2;
if (tmp4_safe_receiver == null) {
tmp_2 = null;
} else {
tmp_2 = tmp4_safe_receiver.f9e(false, 1, null);
}
var bitmap = tmp_2;
path.s8x_1 = bitmap;
if (!(bitmapEntry == null)) {
var scaleX = this.i95_1 / bitmapEntry.e9d_1.g9c_1;
var scaleY = this.i95_1 / bitmapEntry.e9d_1.h9c_1;
path.t8x_1.a73(0.0, ((-bitmapEntry.f9d_1 | 0) - bitmapEntry.k97() | 0) * scaleY);
path.u8x_1.a73(scaleX, scaleY);
} else {
}
path.v8x_1.o74();
path.v8x_1.h76(scale, scale);
path.w8x_1 = scale;
return path;
};
BaseTtfFont.prototype.o96 = function (size) {
return size / this.i95_1;
};
BaseTtfFont.prototype.p96 = function () {
return this.d94_1;
};
BaseTtfFont.prototype.q96 = function () {
return this.e94_1;
};
BaseTtfFont.prototype.r96 = function (_set____db54di) {
this.f94_1 = _set____db54di;
};
BaseTtfFont.prototype.s96 = function () {
return this.f94_1;
};
BaseTtfFont.prototype.t96 = function (_set____db54di) {
this.g94_1 = _set____db54di;
};
BaseTtfFont.prototype.u96 = function (_set____db54di) {
this.h94_1 = _set____db54di;
};
BaseTtfFont.prototype.v96 = function (_set____db54di) {
this.i94_1 = _set____db54di;
};
BaseTtfFont.prototype.w96 = function (_set____db54di) {
this.j94_1 = _set____db54di;
};
BaseTtfFont.prototype.x96 = function (_set____db54di) {
this.k94_1 = _set____db54di;
};
BaseTtfFont.prototype.y96 = function (_set____db54di) {
this.l94_1 = _set____db54di;
};
BaseTtfFont.prototype.z96 = function (_set____db54di) {
this.m94_1 = _set____db54di;
};
BaseTtfFont.prototype.a97 = function (_set____db54di) {
this.n94_1 = _set____db54di;
};
BaseTtfFont.prototype.b97 = function (_set____db54di) {
this.o94_1 = _set____db54di;
};
BaseTtfFont.prototype.c97 = function (_set____db54di) {
this.p94_1 = _set____db54di;
};
BaseTtfFont.prototype.d97 = function (_set____db54di) {
this.q94_1 = _set____db54di;
};
BaseTtfFont.prototype.e97 = function (_set____db54di) {
this.r94_1 = _set____db54di;
};
BaseTtfFont.prototype.f97 = function (_set____db54di) {
this.s94_1 = _set____db54di;
};
BaseTtfFont.prototype.g97 = function (_set____db54di) {
this.t94_1 = _set____db54di;
};
BaseTtfFont.prototype.h97 = function (_set____db54di) {
this.u94_1 = _set____db54di;
};
BaseTtfFont.prototype.i97 = function () {
return this.u94_1;
};
BaseTtfFont.prototype.j97 = function (_set____db54di) {
this.v94_1 = _set____db54di;
};
BaseTtfFont.prototype.k97 = function () {
return this.v94_1;
};
BaseTtfFont.prototype.l97 = function (_set____db54di) {
this.w94_1 = _set____db54di;
};
BaseTtfFont.prototype.m97 = function () {
return this.w94_1;
};
BaseTtfFont.prototype.n97 = function (_set____db54di) {
this.x94_1 = _set____db54di;
};
BaseTtfFont.prototype.o97 = function () {
return this.x94_1;
};
BaseTtfFont.prototype.p97 = function (_set____db54di) {
this.y94_1 = _set____db54di;
};
BaseTtfFont.prototype.q97 = function (_set____db54di) {
this.z94_1 = _set____db54di;
};
BaseTtfFont.prototype.r97 = function (_set____db54di) {
this.a95_1 = _set____db54di;
};
BaseTtfFont.prototype.s97 = function (_set____db54di) {
this.b95_1 = _set____db54di;
};
BaseTtfFont.prototype.t97 = function (_set____db54di) {
this.c95_1 = _set____db54di;
};
BaseTtfFont.prototype.u97 = function (_set____db54di) {
this.d95_1 = _set____db54di;
};
BaseTtfFont.prototype.v97 = function (_set____db54di) {
this.e95_1 = _set____db54di;
};
BaseTtfFont.prototype.w97 = function (_set____db54di) {
this.f95_1 = _set____db54di;
};
BaseTtfFont.prototype.x97 = function () {
return this.f95_1;
};
BaseTtfFont.prototype.y97 = function (_set____db54di) {
this.g95_1 = _set____db54di;
};
BaseTtfFont.prototype.z97 = function (_set____db54di) {
this.h95_1 = _set____db54di;
};
BaseTtfFont.prototype.a98 = function (_set____db54di) {
this.i95_1 = _set____db54di;
};
BaseTtfFont.prototype.b98 = function () {
return this.i95_1;
};
BaseTtfFont.prototype.c98 = function (_set____db54di) {
this.j95_1 = _set____db54di;
};
BaseTtfFont.prototype.d98 = function (_set____db54di) {
this.k95_1 = _set____db54di;
};
BaseTtfFont.prototype.e98 = function () {
return this.k95_1;
};
BaseTtfFont.prototype.f98 = function (_set____db54di) {
this.l95_1 = _set____db54di;
};
BaseTtfFont.prototype.g98 = function (_set____db54di) {
this.m95_1 = _set____db54di;
};
BaseTtfFont.prototype.h98 = function () {
return this.m95_1;
};
BaseTtfFont.prototype.i98 = function (_set____db54di) {
this.n95_1 = _set____db54di;
};
BaseTtfFont.prototype.j98 = function (_set____db54di) {
this.o95_1 = _set____db54di;
};
BaseTtfFont.prototype.k98 = function (_set____db54di) {
this.p95_1 = _set____db54di;
};
BaseTtfFont.prototype.l98 = function (_set____db54di) {
this.q95_1 = _set____db54di;
};
BaseTtfFont.prototype.m98 = function () {
return this.q95_1;
};
BaseTtfFont.prototype.n98 = function (_set____db54di) {
this.r95_1 = _set____db54di;
};
BaseTtfFont.prototype.o98 = function (_set____db54di) {
this.s95_1 = _set____db54di;
};
BaseTtfFont.prototype.p98 = function (key) {
return this.t95_1.q(key);
};
BaseTtfFont.prototype.q98 = function (codePoint, glyphID) {
// Inline function 'kotlin.collections.set' call
var tmp0_set = this.t95_1;
tmp0_set.a(codePoint, glyphID);
// Inline function 'kotlin.collections.set' call
var tmp1_set = this.u95_1;
tmp1_set.a(glyphID, codePoint);
};
BaseTtfFont.prototype.r98 = function (codePoint, glyphID) {
};
BaseTtfFont.prototype.s98 = function () {
return this.w95_1;
};
BaseTtfFont.prototype.t98 = function (_set____db54di) {
this.x95_1 = _set____db54di;
};
BaseTtfFont.prototype.u98 = function () {
return this.y95_1;
};
BaseTtfFont.prototype.v98 = function (_set____db54di) {
this.z95_1 = _set____db54di;
};
BaseTtfFont.prototype.w98 = function (_set____db54di) {
this.a96_1 = _set____db54di;
};
BaseTtfFont.prototype.x98 = function () {
return this.a96_1;
};
BaseTtfFont.prototype.y98 = function () {
return this.c96_1;
};
BaseTtfFont.prototype.z98 = function () {
return this.d96_1;
};
BaseTtfFont.prototype.a99 = function () {
var tmp = this.e96_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('fontMetrics1px');
}
};
BaseTtfFont.prototype.b99 = function () {
return this.d94_1.b99();
};
BaseTtfFont.prototype.t2 = function () {
var tmp0_elvis_lhs = this.a94_1;
return tmp0_elvis_lhs == null ? this.b99() : tmp0_elvis_lhs;
};
BaseTtfFont.prototype.c99 = function (_set____db54di) {
this.h96_1 = _set____db54di;
};
BaseTtfFont.prototype.i96 = function () {
this.j96();
this.k99();
this.l99();
this.m99();
this.i99();
if (!this.b94_1) {
if (!(this.l96('CFF ') == null) ? this.l96('glyf') == null : false) {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.runTableUnit' call
var tmp0_safe_receiver = this.f99('CFF ');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.doInit.<anonymous>' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = CFF_getInstance();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.doInit.<anonymous>.<anonymous>' call
this.h96_1 = tmp0_apply.o90(tmp0_safe_receiver);
tmp$ret$0 = tmp0_apply;
}
}
this.j99();
this.l9a();
this.n99();
this.o99();
this.k9a();
this.j9a();
this.q99();
this.r99();
this.s99();
}
if (this.z93_1) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.u9a(true);
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.doInit.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
tmp1__anonymous__uwfjfc.q5n();
}
}
this.b96_1 = true;
var tmp = this;
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp2_also = FontMetrics_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.doInit.<anonymous>' call
var scale = this.o96(1.0);
tmp2_also.u8m_1 = 1.0;
tmp2_also.v8m_1 = this.m95_1 * scale;
tmp2_also.w8m_1 = this.u94_1 * scale;
tmp2_also.x8m_1 = 0.0 * scale;
tmp2_also.y8m_1 = this.v94_1 * scale;
tmp2_also.z8m_1 = this.k95_1 * scale;
tmp2_also.a8n_1 = this.w94_1 * scale;
tmp2_also.b8n_1 = this.x94_1 * scale;
tmp$ret$1 = tmp2_also;
tmp.e96_1 = tmp$ret$1;
};
BaseTtfFont.prototype.toString = function () {
return 'TtfFont(name=' + this.t2() + ')';
};
BaseTtfFont.prototype.d99 = function (_this__u8e3s4) {
return _FWord___init__impl__2rjyqf(_this__u8e3s4.q6r());
};
BaseTtfFont.prototype.e99 = function (_this__u8e3s4) {
return Companion_getInstance_32().v9k(_this__u8e3s4.p6r(), _this__u8e3s4.p6r());
};
BaseTtfFont.prototype.f99 = function (name) {
var tmp0_safe_receiver = this.l96(name);
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u9b();
};
BaseTtfFont.prototype.g99 = function (name, callback) {
var tmp0_safe_receiver = this.f99(name);
if (tmp0_safe_receiver == null)
null;
else
callback(tmp0_safe_receiver);
};
BaseTtfFont.prototype.h99 = function (name, callback) {
var tmp0_elvis_lhs = this.l96(name);
var tmp;
if (tmp0_elvis_lhs == null) {
return null;
} else {
tmp = tmp0_elvis_lhs;
}
var table = tmp;
return callback(table.u9b(), table);
};
BaseTtfFont.prototype.i99 = function () {
var tmp0_safe_receiver = this.f99('name');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readNames.<anonymous>' call
Companion_getInstance_31().x9b(tmp0_safe_receiver, this.d94_1);
}
return Unit_getInstance();
};
BaseTtfFont.prototype.j99 = function () {
var tmp0_safe_receiver = this.f99('loca');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readLoca.<anonymous>' call
var tmp0_subject = this.q95_1;
var tmp;
switch (tmp0_subject) {
case 0:
tmp = 2;
break;
case 1:
tmp = 4;
break;
default:
get_invalidOp();
break;
}
var bytesPerEntry = tmp;
var data = tmp0_safe_receiver.m6r(imul(bytesPerEntry, this.f94_1 + 1 | 0));
var tmp_0 = this;
var tmp$ret$5;
// Inline function 'kotlin.run' call
var tmp0_run = FastByteArrayInputStream_init_$Create$(data, 0, 0, 0, 14, null);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$4;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readLoca.<anonymous>.<anonymous>' call
var tmp0_subject_0 = this.q95_1;
var tmp_1;
switch (tmp0_subject_0) {
case 0:
var tmp$ret$3;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt = tmp0_run.w6r(this.f94_1 + 1 | 0);
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp0_also = new Int32Array(tmp0_mapInt.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable = 0;
var last = tmp0_mapInt.length;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readLoca.<anonymous>.<anonymous>.<anonymous>' call
var tmp1__anonymous__uwfjfc = tmp0_mapInt[n];
var tmp$ret$0;
// Inline function 'kotlin.code' call
tmp$ret$0 = Char__toInt_impl_vasixd(tmp1__anonymous__uwfjfc);
tmp$ret$1 = imul(tmp$ret$0, 2);
tmp0_also[n] = tmp$ret$1;
}
while (inductionVariable < last);
tmp$ret$2 = tmp0_also;
tmp$ret$3 = tmp$ret$2;
tmp_1 = tmp$ret$3;
break;
case 1:
tmp_1 = tmp0_run.y6r(this.f94_1 + 1 | 0);
break;
default:
get_invalidOp();
break;
}
tmp$ret$4 = tmp_1;
tmp$ret$5 = tmp$ret$4;
tmp_0.g95_1 = tmp$ret$5;
}
return Unit_getInstance();
};
BaseTtfFont.prototype.k99 = function () {
var tmp0_safe_receiver = this.f99('head');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHead.<anonymous>' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = tmp0_safe_receiver.q6r();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHead.<anonymous>.<anonymous>' call
if (!(tmp0_apply === 1)) {
invalidOp('Invalid TTF');
}
tmp$ret$0 = tmp0_apply;
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp1_apply = tmp0_safe_receiver.q6r();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHead.<anonymous>.<anonymous>' call
if (!(tmp1_apply === 0)) {
invalidOp('Invalid TTF');
}
tmp$ret$1 = tmp1_apply;
this.h95_1 = this.e99(tmp0_safe_receiver);
var checkSumAdjustment = tmp0_safe_receiver.s6r();
var tmp$ret$2;
// Inline function 'kotlin.apply' call
var tmp2_apply = tmp0_safe_receiver.s6r();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHead.<anonymous>.<anonymous>' call
if (!(tmp2_apply === 1594834165)) {
invalidOp('Invalid magic ' + get_hex(tmp2_apply));
}
tmp$ret$2 = tmp2_apply;
var flags = tmp0_safe_receiver.q6r();
this.i95_1 = tmp0_safe_receiver.q6r();
var created = tmp0_safe_receiver.t6r().sa(new Long(1000, 0));
var modified = tmp0_safe_receiver.t6r().sa(new Long(1000, 0));
this.j95_1 = tmp0_safe_receiver.p6r();
this.k95_1 = tmp0_safe_receiver.p6r();
this.l95_1 = tmp0_safe_receiver.p6r();
this.m95_1 = tmp0_safe_receiver.p6r();
this.n95_1 = tmp0_safe_receiver.q6r();
this.o95_1 = tmp0_safe_receiver.q6r();
this.p95_1 = tmp0_safe_receiver.p6r();
this.q95_1 = tmp0_safe_receiver.p6r();
this.r95_1 = tmp0_safe_receiver.p6r();
}
return Unit_getInstance();
};
BaseTtfFont.prototype.l99 = function () {
var tmp0_safe_receiver = this.f99('maxp');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readMaxp.<anonymous>' call
var version = this.e99(tmp0_safe_receiver);
this.f94_1 = tmp0_safe_receiver.q6r();
this.g94_1 = tmp0_safe_receiver.q6r();
this.h94_1 = tmp0_safe_receiver.q6r();
this.i94_1 = tmp0_safe_receiver.q6r();
this.j94_1 = tmp0_safe_receiver.q6r();
this.k94_1 = tmp0_safe_receiver.q6r();
this.l94_1 = tmp0_safe_receiver.q6r();
this.m94_1 = tmp0_safe_receiver.q6r();
this.n94_1 = tmp0_safe_receiver.q6r();
this.o94_1 = tmp0_safe_receiver.q6r();
this.p94_1 = tmp0_safe_receiver.q6r();
this.q94_1 = tmp0_safe_receiver.q6r();
this.r94_1 = tmp0_safe_receiver.q6r();
this.s94_1 = tmp0_safe_receiver.q6r();
}
return Unit_getInstance();
};
BaseTtfFont.prototype.m99 = function () {
var tmp0_safe_receiver = this.f99('hhea');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHhea.<anonymous>' call
this.t94_1 = this.e99(tmp0_safe_receiver);
this.u94_1 = tmp0_safe_receiver.p6r();
this.v94_1 = tmp0_safe_receiver.p6r();
this.w94_1 = tmp0_safe_receiver.p6r();
this.x94_1 = tmp0_safe_receiver.q6r();
this.y94_1 = tmp0_safe_receiver.p6r();
this.z94_1 = tmp0_safe_receiver.p6r();
this.a95_1 = tmp0_safe_receiver.p6r();
this.b95_1 = tmp0_safe_receiver.p6r();
this.c95_1 = tmp0_safe_receiver.p6r();
this.d95_1 = tmp0_safe_receiver.p6r();
tmp0_safe_receiver.p6r();
tmp0_safe_receiver.p6r();
tmp0_safe_receiver.p6r();
tmp0_safe_receiver.p6r();
this.e95_1 = tmp0_safe_receiver.p6r();
this.f95_1 = tmp0_safe_receiver.q6r();
}
return Unit_getInstance();
};
BaseTtfFont.prototype.n99 = function () {
var tmp0_safe_receiver = this.f99('hmtx');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHmtx.<anonymous>' call
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map = until(0, this.f95_1);
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var inductionVariable = tmp0_map.r1_1;
var last_0 = tmp0_map.s1_1;
if (inductionVariable <= last_0)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHmtx.<anonymous>.<anonymous>' call
tmp$ret$0 = new HorMetric(tmp0_safe_receiver.q6r(), tmp0_safe_receiver.p6r());
tmp0_mapTo.c(tmp$ret$0);
}
while (!(item === last_0));
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
var firstMetrics = tmp$ret$2;
var lastAdvanceWidth = last(firstMetrics).v9b_1;
var tmp$ret$5;
// Inline function 'kotlin.collections.map' call
var tmp1_map = until(0, this.f94_1 - this.f95_1 | 0);
var tmp$ret$4;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp1_map, 10));
var inductionVariable_0 = tmp1_map.r1_1;
var last_1 = tmp1_map.s1_1;
if (inductionVariable_0 <= last_1)
do {
var item_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readHmtx.<anonymous>.<anonymous>' call
tmp$ret$3 = new HorMetric(lastAdvanceWidth, tmp0_safe_receiver.p6r());
tmp0_mapTo_0.c(tmp$ret$3);
}
while (!(item_0 === last_1));
tmp$ret$4 = tmp0_mapTo_0;
tmp$ret$5 = tmp$ret$4;
var compressedMetrics = tmp$ret$5;
this.s95_1 = plus(firstMetrics, compressedMetrics);
}
return Unit_getInstance();
};
BaseTtfFont.prototype.o99 = function () {
var tmp0_safe_receiver = this.f99('CPAL');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCpal.<anonymous>' call
var version = tmp0_safe_receiver.q6r();
var tmp0_subject = version;
switch (tmp0_subject) {
case 0:
case 1:
var numPaletteEntries = tmp0_safe_receiver.q6r();
var numPalettes = tmp0_safe_receiver.q6r();
var numColorRecords = tmp0_safe_receiver.q6r();
var colorRecordsArrayOffset = tmp0_safe_receiver.s6r();
var colorRecordIndices = tmp0_safe_receiver.v6r(numPalettes);
var paletteTypesArrayOffset = version === 1 ? tmp0_safe_receiver.s6r() : -1;
var paletteLabelsArrayOffset = version === 1 ? tmp0_safe_receiver.s6r() : -1;
var paletteEntryLabelsArrayOffset = version === 1 ? tmp0_safe_receiver.s6r() : -1;
tmp0_safe_receiver.e6r(colorRecordsArrayOffset);
var colorInts = tmp0_safe_receiver.x6r(numColorRecords);
var inductionVariable = 0;
var last = colorInts.length;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c = _RGBA___init__impl__lqpay5(colorInts[n]);
colorInts[n] = _RGBA___get_value__impl__hhco8v(Companion_getInstance_21().u8i(_RGBA___get_b__impl__m6tl80(c), _RGBA___get_g__impl__o8pukr(c), _RGBA___get_r__impl__duz7mo(c), _RGBA___get_a__impl__6msvu7(c)));
}
while (inductionVariable < last);
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(colorRecordIndices.length);
var indexedObject = colorRecordIndices;
var inductionVariable_0 = 0;
var last_0 = indexedObject.length;
while (inductionVariable_0 < last_0) {
var item = indexedObject[inductionVariable_0];
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCpal.<anonymous>.<anonymous>' call
var tmp_0 = _RgbaArray___init__impl__oib4y4(copyOfRange_0(colorInts, item, item + numPaletteEntries | 0));
tmp$ret$0 = Palette_init_$Create$(tmp_0, null, 0, 0, 14, null);
tmp0_mapTo.c(tmp$ret$0);
}
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
tmp.z95_1 = tmp$ret$2;
break;
default:
println('TTF WARNING CPAL version != 0,1');
;
break;
}
}
return Unit_getInstance();
};
BaseTtfFont.prototype.p99 = function (_this__u8e3s4) {
return new SbitLineMetrics(_this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.o6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r(), _this__u8e3s4.n6r());
};
BaseTtfFont.prototype.q99 = function () {
var tmp0_safe_receiver = this.f99('CBLC');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCblc.<anonymous>' call
var majorVersion = tmp0_safe_receiver.q6r();
var minorVersion = tmp0_safe_receiver.q6r();
var tmp0_subject = majorVersion;
if (tmp0_subject === 3) {
var numSizes = tmp0_safe_receiver.s6r();
var tmp = 0;
var tmp_0 = numSizes;
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$0 = fillArrayVal(Array(tmp_0), null);
var tmp_1 = tmp$ret$0;
while (tmp < tmp_0) {
var tmp_2 = tmp;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCblc.<anonymous>.<anonymous>' call
tmp$ret$1 = new ColorBitmapInfo(tmp0_safe_receiver.s6r(), tmp0_safe_receiver.s6r(), tmp0_safe_receiver.s6r(), tmp0_safe_receiver.s6r(), this.p99(tmp0_safe_receiver), this.p99(tmp0_safe_receiver), tmp0_safe_receiver.q6r(), tmp0_safe_receiver.q6r(), tmp0_safe_receiver.o6r(), tmp0_safe_receiver.o6r(), tmp0_safe_receiver.o6r(), tmp0_safe_receiver.n6r());
tmp_1[tmp_2] = tmp$ret$1;
tmp = tmp + 1 | 0;
}
var colorBitmapInfos = toList_1(tmp_1);
var tmp1_iterator = colorBitmapInfos.j();
while (tmp1_iterator.k()) {
var cbi = tmp1_iterator.l();
var glyphCount = cbi.f9c_1 - cbi.e9c_1 | 0;
tmp0_safe_receiver.e6r(cbi.y9b_1);
var tmp_3 = 0;
var tmp_4 = cbi.a9c_1;
var tmp$ret$2;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$2 = fillArrayVal(Array(tmp_4), null);
var tmp_5 = tmp$ret$2;
while (tmp_3 < tmp_4) {
var tmp_6 = tmp_3;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCblc.<anonymous>.<anonymous>' call
tmp$ret$3 = new BaseTtfFont$readCblc$1$Subtable(tmp0_safe_receiver.q6r(), tmp0_safe_receiver.q6r(), tmp0_safe_receiver.s6r());
tmp_5[tmp_6] = tmp$ret$3;
tmp_3 = tmp_3 + 1 | 0;
}
var subtables = tmp_5;
var indexedObject = subtables;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var subtable = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
tmp0_safe_receiver.e6r(cbi.y9b_1 + subtable.c9k_1 | 0);
var indexFormat = tmp0_safe_receiver.q6r();
var imageFormat = tmp0_safe_receiver.q6r();
var imageDataOffset = tmp0_safe_receiver.s6r();
var tmp3_subject = indexFormat;
var tmp_7;
if (tmp3_subject === 1) {
var tmp_8 = 0;
var tmp_9 = subtable.s96() + 1 | 0;
var tmp$ret$4;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$4 = fillArrayVal(Array(tmp_9), null);
var tmp_10 = tmp$ret$4;
while (tmp_8 < tmp_9) {
var tmp_11 = tmp_8;
var tmp$ret$5;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCblc.<anonymous>.<anonymous>' call
tmp$ret$5 = imageDataOffset + tmp0_safe_receiver.s6r() | 0;
tmp_10[tmp_11] = tmp$ret$5;
tmp_8 = tmp_8 + 1 | 0;
}
tmp_7 = tmp_10;
} else {
var tmp$ret$6;
// Inline function 'kotlin.emptyArray' call
tmp$ret$6 = [];
tmp_7 = tmp$ret$6;
}
var offsets = tmp_7;
var inductionVariable_0 = 0;
var last_0 = offsets.length - 1 | 0;
if (inductionVariable_0 < last_0)
do {
var n = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var offset = offsets[n];
var size = offsets[n + 1 | 0] - offset | 0;
var glyphID = (subtable.a9k_1 + n | 0) - 1 | 0;
// Inline function 'kotlin.collections.set' call
var tmp0_set = this.w95_1;
var tmp1_set = BitmapGlyphInfo_init_$Create$(glyphID, imageFormat, offset, size, cbi, 0, 0, 0, 0, 0, 0, 0, 0, 8160, null);
tmp0_set.a(glyphID, tmp1_set);
}
while (inductionVariable_0 < last_0);
}
}
} else {
println('Unsupported CBLC ' + majorVersion + '.' + minorVersion);
}
}
return Unit_getInstance();
};
BaseTtfFont.prototype.r99 = function () {
var tmp0_safe_receiver = this.f99('CBDT');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCbdt.<anonymous>' call
var majorVersion = tmp0_safe_receiver.q6r();
var minorVersion = tmp0_safe_receiver.q6r();
var tmp0_subject = majorVersion;
if (tmp0_subject === 3) {
var tmp1_iterator = this.w95_1.lh().j();
while (tmp1_iterator.k()) {
var i = tmp1_iterator.l();
var format = i.b9d_1;
var tmp2_subject = format;
if (tmp2_subject === 17 ? true : tmp2_subject === 18) {
i.f9d_1 = tmp0_safe_receiver.o6r();
i.g9d_1 = tmp0_safe_receiver.o6r();
i.h9d_1 = tmp0_safe_receiver.n6r();
i.i9d_1 = tmp0_safe_receiver.n6r();
i.j9d_1 = tmp0_safe_receiver.o6r();
i.k9d_1 = format === 18 ? tmp0_safe_receiver.n6r() : i.h9d_1;
i.l9d_1 = format === 18 ? tmp0_safe_receiver.n6r() : i.i9d_1;
i.m9d_1 = format === 18 ? tmp0_safe_receiver.n6r() : i.j9d_1;
}
var dataLen = tmp0_safe_receiver.s6r();
i.n9d_1 = tmp0_safe_receiver.h6r(dataLen);
}
} else {
println('Unsupported CBDT ' + majorVersion + '.' + minorVersion);
}
}
return Unit_getInstance();
};
BaseTtfFont.prototype.s99 = function () {
var tmp0_safe_receiver = this.f99('sbix');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readSbix.<anonymous>' call
var version = tmp0_safe_receiver.q6r();
var flags = tmp0_safe_receiver.q6r();
var numStrikes = tmp0_safe_receiver.s6r();
var strikeOffsets = tmp0_safe_receiver.y6r(numStrikes);
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(strikeOffsets.length);
var indexedObject = strikeOffsets;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var item = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readSbix.<anonymous>.<anonymous>' call
tmp0_safe_receiver.e6r(item);
tmp$ret$0 = new BaseTtfFont$readSbix$1$StrikeInfo(tmp0_safe_receiver.q6r(), tmp0_safe_receiver.q6r(), item, toIntArrayList(tmp0_safe_receiver.y6r(this.f94_1 + 1 | 0)));
tmp0_mapTo.c(tmp$ret$0);
}
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
var strikes = tmp$ret$2;
var tmp$ret$3;
$l$block_0: {
// Inline function 'kotlin.collections.maxByOrNull' call
var iterator = strikes.j();
if (!iterator.k()) {
tmp$ret$3 = null;
break $l$block_0;
}
var maxElem = iterator.l();
if (!iterator.k()) {
tmp$ret$3 = maxElem;
break $l$block_0;
}
var tmp$ret$4;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readSbix.<anonymous>.<anonymous>' call
var tmp0__anonymous__q1qw7t = maxElem;
tmp$ret$4 = tmp0__anonymous__q1qw7t.f9k_1;
var maxValue = tmp$ret$4;
do {
var e = iterator.l();
var tmp$ret$5;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readSbix.<anonymous>.<anonymous>' call
tmp$ret$5 = e.f9k_1;
var v = tmp$ret$5;
if (compareTo(maxValue, v) < 0) {
maxElem = e;
maxValue = v;
}
}
while (iterator.k());
tmp$ret$3 = maxElem;
}
var strike = ensureNotNull(tmp$ret$3);
var inductionVariable_0 = 0;
var last_0 = this.f94_1;
if (inductionVariable_0 < last_0)
do {
var n = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var glyphID = n;
var offset = strike.i9k_1.m(n);
var len = strike.i9k_1.m(n + 1 | 0) - offset | 0;
var start = strike.h9k_1 + offset | 0;
var end = start + len | 0;
tmp0_safe_receiver.e6r(start);
var originOffsetX = tmp0_safe_receiver.p6r();
var originOffsetY = tmp0_safe_receiver.p6r();
var graphicType = tmp0_safe_receiver.a6s(4, null, 2, null);
var bytes = tmp0_safe_receiver.h6r(len - 8 | 0);
// Inline function 'kotlin.collections.set' call
var tmp2_set = this.w95_1;
var tmp$ret$6;
// Inline function 'kotlin.also' call
var tmp = ColorBitmapInfo_init_$Create$(0, 0, 0, 0, null, null, 0, 0, strike.f9k_1, strike.f9k_1, 0, 0, 3327, null);
var tmp1_also = BitmapGlyphInfo_init_$Create$(glyphID, 0, 0, 0, tmp, 0, 0, 0, 0, 0, 0, 0, 0, 8174, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readSbix.<anonymous>.<anonymous>' call
tmp1_also.n9d_1 = bytes;
tmp$ret$6 = tmp1_also;
var tmp3_set = tmp$ret$6;
tmp2_set.a(glyphID, tmp3_set);
}
while (inductionVariable_0 < last_0);
}
return Unit_getInstance();
};
BaseTtfFont.prototype.t99 = function (_this__u8e3s4) {
return _this__u8e3s4.s6r();
};
BaseTtfFont.prototype.u99 = function (_this__u8e3s4) {
return _this__u8e3s4.q6r();
};
BaseTtfFont.prototype.v99 = function (_this__u8e3s4) {
return _this__u8e3s4.p6r();
};
BaseTtfFont.prototype.w99 = function (_this__u8e3s4) {
return _this__u8e3s4.q6r();
};
BaseTtfFont.prototype.x99 = function (_this__u8e3s4) {
return _this__u8e3s4.r6r();
};
BaseTtfFont.prototype.y99 = function (_this__u8e3s4) {
return _this__u8e3s4.s6r();
};
BaseTtfFont.prototype.z99 = function (_this__u8e3s4, isVar, out) {
var xx = this.w9a(_this__u8e3s4);
var yx = this.w9a(_this__u8e3s4);
var xy = this.w9a(_this__u8e3s4);
var yy = this.w9a(_this__u8e3s4);
var dx = this.w9a(_this__u8e3s4);
var dy = this.w9a(_this__u8e3s4);
out.e76(xx, yx, xy, yy, dx, -dy);
return out;
};
BaseTtfFont.prototype.a9a = function (_this__u8e3s4, isVar, out, $mask0, $handler) {
if (!(($mask0 & 2) === 0)) {
out = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
return this.z99(_this__u8e3s4, isVar, out);
};
BaseTtfFont.prototype.b9a = function (_this__u8e3s4, out) {
out.j9e_1 = this.v9a(_this__u8e3s4);
out.k9e_1 = _this__u8e3s4.q6r();
out.l9e_1 = this.v9a(_this__u8e3s4);
return out;
};
BaseTtfFont.prototype.c9a = function (_this__u8e3s4, out, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
out = new ColorStop(0.0, 0, 0.0);
return this.b9a(_this__u8e3s4, out);
};
BaseTtfFont.prototype.d9a = function (_this__u8e3s4, doVar) {
var format = _this__u8e3s4.o6r();
var xMin = this.v99(_this__u8e3s4);
var yMin = this.v99(_this__u8e3s4);
var xMax = this.v99(_this__u8e3s4);
var yMax = this.v99(_this__u8e3s4);
if (format === 2) {
var varIndexBase = this.t99(_this__u8e3s4);
}
return Companion_getInstance_0().m7c(xMin, yMin, xMax, yMax);
};
BaseTtfFont.prototype.e9a = function (_this__u8e3s4, doVar, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
doVar = false;
return this.d9a(_this__u8e3s4, doVar);
};
BaseTtfFont.prototype.f9a = function (_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4.o6r();
{
var cycle;
switch (tmp0_subject) {
case 0:
cycle = CycleMethod_NO_CYCLE_getInstance();
break;
case 1:
cycle = CycleMethod_REPEAT_getInstance();
break;
case 2:
cycle = CycleMethod_REFLECT_getInstance();
break;
default:
cycle = CycleMethod_NO_CYCLE_getInstance();
break;
}
}
var tmp$ret$3;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf16' call
var tmp = 0;
var tmp_0 = _this__u8e3s4.q6r();
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$0 = fillArrayVal(Array(tmp_0), null);
var tmp_1 = tmp$ret$0;
while (tmp < tmp_0) {
var tmp_2 = tmp;
var tmp$ret$2;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf16.<anonymous>' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColorLine.<anonymous>' call
tmp$ret$1 = this.c9a(_this__u8e3s4, null, 1, null);
tmp$ret$2 = tmp$ret$1;
tmp_1[tmp_2] = tmp$ret$2;
tmp = tmp + 1 | 0;
}
tmp$ret$3 = tmp_1;
return new ColorLine(cycle, toList_1(tmp$ret$3));
};
BaseTtfFont.prototype.g9a = function (glyphID, s, c, pal, level) {
var nodeFormat = s.o6r();
var isVar = (nodeFormat % 2 | 0) === 1;
var indent = repeat(' ', level);
var debug = false;
var debugShape = false;
if (debug) {
println(indent + 'interpretColrv1[glyphID=' + glyphID + ']: ' + nodeFormat + ' - ' + getOrNull(Companion_getInstance_30().g9b_1, nodeFormat));
}
var tmp0_subject = nodeFormat;
switch (tmp0_subject) {
case 1:
var numLayers = s.o6r();
var firstLayerIndex = s.s6r();
var inductionVariable = 0;
if (inductionVariable < numLayers)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var paint = this.a96_1.o9f_1[firstLayerIndex + n | 0];
this.g9a(glyphID, this.a96_1.r9f_1.j6r(paint), c, pal, level + 1 | 0);
}
while (inductionVariable < numLayers);
break;
case 2:
case 3:
var paletteIndex = s.q6r();
var alpha = this.v9a(s);
if (isVar) {
var varIndexBase = this.t99(s);
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
}
var color = RGBA__concatAd_impl_gwhfm(RgbaArray__get_impl_nzyo1o(this.z95_1.m(pal).j8i_1, paletteIndex), alpha);
if (debugShape) {
println("ctx.fillStyle = '" + _RGBA___get_htmlStringSimple__impl__l4nu0u(color) + "';");
println('ctx.fill();');
}
if (debug) {
println(indent + new RGBA(color));
}
var tmp = new RGBA(color);
c.p8u(tmp, null, 2, null);
;
break;
case 4:
case 5:
var colorLineOffset = this.x99(s);
var x0 = this.v99(s);
var y0 = this.v99(s);
var x1 = this.v99(s);
var y1 = this.v99(s);
var x2 = this.v99(s);
var y2 = this.v99(s);
var colorLine = this.f9a(s.j6r(colorLineOffset));
if (isVar) {
var varIndexBase_0 = this.t99(s);
}
var tmp$ret$2;
// Inline function 'com.soywiz.korim.paint.LinearGradientPaint' call
var tmp1_LinearGradientPaint = -y0;
var tmp2_LinearGradientPaint = -y1;
var tmp3_LinearGradientPaint = colorLine.g9e_1;
var tmp4_LinearGradientPaint = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp_0 = GradientKind_LINEAR_getInstance();
var tmp_1 = numberToDouble(x0);
var tmp_2 = numberToDouble(tmp1_LinearGradientPaint);
var tmp_3 = numberToDouble(x1);
var tmp_4 = numberToDouble(tmp2_LinearGradientPaint);
var tmp0_also = GradientPaint_init_$Create$(tmp_0, tmp_1, tmp_2, 0.0, tmp_3, tmp_4, 0.0, null, null, tmp3_LinearGradientPaint, tmp4_LinearGradientPaint, null, null, null, 14720, null);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.paint.LinearGradientPaint.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp0_also;
tmp$ret$2 = tmp$ret$1;
var paint_0 = tmp$ret$2;
colorLine.i9e(paint_0, this.z95_1.m(pal));
if (debug) {
println(indent + paint_0);
}
c.p8u(paint_0, null, 2, null);
;
break;
case 6:
case 7:
var colorLineOffset_0 = this.x99(s);
var x0_0 = this.v99(s);
var y0_0 = this.v99(s);
var radius0 = this.u99(s);
var x1_0 = this.v99(s);
var y1_0 = this.v99(s);
var radius1 = this.u99(s);
var colorLine_0 = this.f9a(s.j6r(colorLineOffset_0));
if (isVar) {
var varIndexBase_1 = this.t99(s);
}
if (debugShape) {
println('ctx.fillStyle = ctx.createRadialGradient(' + x0_0 + ', -' + y0_0 + ', ' + radius0 + ', ' + x1_0 + ', -' + y1_0 + ', ' + radius1 + ');');
println('ctx.fill();');
}
var tmp$ret$5;
// Inline function 'com.soywiz.korim.paint.RadialGradientPaint' call
var tmp6_RadialGradientPaint = -y0_0;
var tmp7_RadialGradientPaint = -y1_0;
var tmp8_RadialGradientPaint = colorLine_0.g9e_1;
var tmp9_RadialGradientPaint = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp$ret$4;
// Inline function 'kotlin.also' call
var tmp_5 = GradientKind_RADIAL_getInstance();
var tmp_6 = numberToDouble(x0_0);
var tmp_7 = numberToDouble(tmp6_RadialGradientPaint);
var tmp_8 = numberToDouble(radius0);
var tmp_9 = numberToDouble(x1_0);
var tmp_10 = numberToDouble(tmp7_RadialGradientPaint);
var tmp_11 = numberToDouble(radius1);
var tmp5_also = GradientPaint_init_$Create$(tmp_5, tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, tmp_11, null, null, tmp8_RadialGradientPaint, tmp9_RadialGradientPaint, null, null, null, 14720, null);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$3;
// Inline function 'com.soywiz.korim.paint.RadialGradientPaint.<anonymous>' call
tmp$ret$3 = Unit_getInstance();
tmp$ret$4 = tmp5_also;
tmp$ret$5 = tmp$ret$4;
var paint_1 = tmp$ret$5;
colorLine_0.i9e(paint_1, this.z95_1.m(pal));
if (debug) {
println(indent + paint_1);
}
c.p8u(paint_1, null, 2, null);
;
break;
case 8:
case 9:
var colorLine_1 = this.x99(s);
var centerX = this.v99(s);
var centerY = this.v99(s);
var startAngle = this.v9a(s);
var endAngle = this.v9a(s);
if (isVar) {
var varIndexBase_2 = this.t99(s);
}
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
case 10:
var paint_2 = this.x99(s);
var glyphID_0 = s.q6r();
var colr = this.y95_1.m(glyphID_0);
var glyph = this.t9a(glyphID_0, false, 0, 6, null);
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
c.w8u();
try {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.interpretColrv1.<anonymous>' call
if (!(glyph == null)) {
if (debugShape) {
var tmp_12 = glyph.q5n().d9h_1;
var tmp_13 = toContext2dCommands$default(tmp_12, null, null, 0, 7, null);
println(joinToString$default(tmp_13, '\n', null, null, 0, null, null, 62, null));
}
c.w9k(glyph.q5n().d9h_1);
this.g9a(glyphID_0, s.j6r(paint_2), c, pal, level + 1 | 0);
}
}finally {
c.e8v();
}
break;
case 11:
var glyphID_1 = s.q6r();
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
case 12:
case 13:
var paint_3 = this.x99(s);
var transform = this.x99(s);
var tmp_14 = s.j6r(transform);
var affine = this.a9a(tmp_14, isVar, null, 2, null);
if (debug) {
println(indent + 'affine=' + affine);
}
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
c.w8u();
try {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.interpretColrv1.<anonymous>' call
c.q8w(affine);
this.g9a(glyphID, s.j6r(paint_3), c, pal, level + 1 | 0);
}finally {
c.e8v();
}
break;
case 14:
case 15:
var paint_4 = this.x99(s);
var dx = FWord__toDouble_impl_53j5qp(this.d99(s));
var dy = FWord__toDouble_impl_53j5qp(this.d99(s));
if (isVar) {
var varIndexBase_3 = this.t99(s);
}
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
c.w8u();
try {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.interpretColrv1.<anonymous>' call
if (debug) {
println('translate: ' + dx + ', ' + dy);
}
c.o8w(dx, -dy);
this.g9a(glyphID, s.j6r(paint_4), c, pal, level + 1 | 0);
}finally {
c.e8v();
}
break;
case 16:
case 17:
case 18:
case 19:
var paint_5 = this.x99(s);
var scaleX = this.v9a(s);
var scaleY = this.v9a(s);
var aroundCenter = nodeFormat >= 18;
if (aroundCenter) {
var centerX_0 = this.v99(s);
var centerY_0 = this.v99(s);
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
}
if (isVar) {
var varIndexBase_4 = this.t99(s);
}
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
c.w8u();
try {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.interpretColrv1.<anonymous>' call
var tmp$ret$6;
// Inline function 'com.soywiz.korim.vector.Context2d.scale' call
c.x9k(numberToDouble(scaleX), numberToDouble(scaleY));
tmp$ret$6 = Unit_getInstance();
this.g9a(glyphID, s.j6r(paint_5), c, pal, level + 1 | 0);
}finally {
c.e8v();
}
break;
case 20:
case 21:
case 22:
case 23:
var paint_6 = this.x99(s);
var scale = this.v9a(s);
if (nodeFormat >= 22) {
var centerX_1 = this.v99(s);
var centerY_1 = this.v99(s);
}
if ((nodeFormat % 2 | 0) === 1) {
var varIndexBase_5 = this.t99(s);
}
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
case 24:
case 25:
case 26:
case 27:
var paint_7 = this.x99(s);
var angle = this.v9a(s);
if (nodeFormat >= 26) {
var centerX_2 = this.v99(s);
var centerY_2 = this.v99(s);
}
if ((nodeFormat % 2 | 0) === 1) {
var varIndexBase_6 = this.t99(s);
}
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
case 28:
case 29:
case 30:
case 31:
var paint_8 = this.x99(s);
var xSkewAngle = this.v9a(s);
var ySkewAngle = this.v9a(s);
if (nodeFormat >= 30) {
var centerX_3 = this.v99(s);
var centerY_3 = this.v99(s);
}
if ((nodeFormat % 2 | 0) === 1) {
var varIndexBase_7 = this.t99(s);
}
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
case 32:
var sourcePaint = this.x99(s);
var compositeMode = s.o6r();
var backdropPaint = this.x99(s);
// Inline function 'kotlin.TODO' call
throw NotImplementedError_init_$Create$(null, 1, null);
break;
default:
// Inline function 'kotlin.TODO' call
var tmp10_TODO = 'Unknown colorv1 format=' + nodeFormat;
throw new NotImplementedError('An operation is not implemented: ' + tmp10_TODO);
break;
}
};
BaseTtfFont.prototype.h9a = function (_this__u8e3s4, hintedCount) {
var coverageFormat = _this__u8e3s4.q6r();
var tmp0_subject = coverageFormat;
switch (tmp0_subject) {
case 1:
var glyphCount = _this__u8e3s4.q6r();
var tmp$ret$3;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt = _this__u8e3s4.w6r(glyphCount);
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp0_also = new Int32Array(tmp0_mapInt.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable = 0;
var last = tmp0_mapInt.length;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCoverage.<anonymous>' call
var tmp1__anonymous__uwfjfc = tmp0_mapInt[n];
var tmp$ret$0;
// Inline function 'kotlin.code' call
tmp$ret$0 = Char__toInt_impl_vasixd(tmp1__anonymous__uwfjfc);
tmp$ret$1 = tmp$ret$0;
tmp0_also[n] = tmp$ret$1;
}
while (inductionVariable < last);
tmp$ret$2 = tmp0_also;
tmp$ret$3 = tmp$ret$2;
return tmp$ret$3;
case 2:
var rangeCount = _this__u8e3s4.q6r();
var tmp$ret$6;
// Inline function 'kotlin.collections.map' call
var tmp2_map = until(0, rangeCount);
var tmp$ret$5;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp2_map, 10));
var inductionVariable_0 = tmp2_map.r1_1;
var last_0 = tmp2_map.s1_1;
if (inductionVariable_0 <= last_0)
do {
var item = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$4;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCoverage.<anonymous>' call
tmp$ret$4 = new BaseTtfFont$readCoverage$RangeInfo(_this__u8e3s4.q6r(), _this__u8e3s4.q6r(), _this__u8e3s4.q6r());
tmp0_mapTo.c(tmp$ret$4);
}
while (!(item === last_0));
tmp$ret$5 = tmp0_mapTo;
tmp$ret$6 = tmp$ret$5;
var ranges = tmp$ret$6;
var tmp$ret$9;
// Inline function 'kotlin.collections.maxOf' call
var iterator = ranges.j();
if (!iterator.k())
throw NoSuchElementException_init_$Create$();
var tmp$ret$7;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCoverage.<anonymous>' call
var tmp3__anonymous__ufb84q = iterator.l();
tmp$ret$7 = tmp3__anonymous__ufb84q.o9k_1 + tmp3__anonymous__ufb84q.p9k_1 | 0;
var maxValue = tmp$ret$7;
while (iterator.k()) {
var tmp$ret$8;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCoverage.<anonymous>' call
var tmp4__anonymous__pkmkx7 = iterator.l();
tmp$ret$8 = tmp4__anonymous__pkmkx7.o9k_1 + tmp4__anonymous__pkmkx7.p9k_1 | 0;
var v = tmp$ret$8;
if (compareTo(maxValue, v) < 0) {
maxValue = v;
}
}
tmp$ret$9 = maxValue;
var glyphCount_0 = tmp$ret$9;
var glyphArray = new Int32Array(glyphCount_0);
var tmp1_iterator = ranges.j();
while (tmp1_iterator.k()) {
var range = tmp1_iterator.l();
var inductionVariable_1 = range.m9k_1;
var last_1 = range.n9k_1;
if (inductionVariable_1 <= last_1)
do {
var glyphID = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var offset = glyphID - range.m9k_1 | 0;
glyphArray[range.o9k_1 + offset | 0] = glyphID;
}
while (!(glyphID === last_1));
}
return glyphArray;
default:
// Inline function 'kotlin.TODO' call
var tmp5_TODO = 'coverageFormat=' + coverageFormat;
throw new NotImplementedError('An operation is not implemented: ' + tmp5_TODO);
}
};
BaseTtfFont.prototype.i9a = function (_this__u8e3s4, hintedCount, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
hintedCount = -1;
return this.h9a(_this__u8e3s4, hintedCount);
};
BaseTtfFont.prototype.j9a = function () {
var tmp0_safe_receiver = this.f99('GSUB');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>' call
var totalLength = tmp0_safe_receiver.ze();
var majorVersion = tmp0_safe_receiver.q6r();
var minorVersion = tmp0_safe_receiver.q6r();
if (!(majorVersion === 1)) {
// Inline function 'kotlin.error' call
var tmp0_error = 'Unknown GSUB majorVerrsion=' + majorVersion;
throw IllegalStateException_init_$Create$(toString(tmp0_error));
}
var scriptListOffset = this.w99(tmp0_safe_receiver);
var featureListOffset = this.w99(tmp0_safe_receiver);
var lookupListOffset = this.w99(tmp0_safe_receiver);
if (minorVersion >= 1) {
var featureVariationsOffset = this.y99(tmp0_safe_receiver);
}
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp1_apply = tmp0_safe_receiver.j6r(scriptListOffset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>' call
var scriptCount = tmp1_apply.q6r();
var inductionVariable = 0;
if (inductionVariable < scriptCount)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var scriptTag = tmp1_apply.a6s(4, null, 2, null);
var scriptOffset = this.w99(tmp1_apply);
}
while (inductionVariable < scriptCount);
tmp$ret$0 = tmp1_apply;
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp2_apply = tmp0_safe_receiver.j6r(featureListOffset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>' call
var featureCount = tmp2_apply.q6r();
var inductionVariable_0 = 0;
if (inductionVariable_0 < featureCount)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var featureTag = tmp2_apply.a6s(4, null, 2, null);
var featureOffset = this.w99(tmp2_apply);
}
while (inductionVariable_0 < featureCount);
tmp$ret$1 = tmp2_apply;
var tmp$ret$32;
// Inline function 'kotlin.apply' call
var tmp3_apply = tmp0_safe_receiver.j6r(lookupListOffset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>' call
var lookupCount = tmp3_apply.q6r();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt = until(0, lookupCount);
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp0_also = new IntArrayList((coerceAtLeast(tmp0_mapInt.w() - tmp0_mapInt.v() | 0, 0) / tmp0_mapInt.t1_1 | 0) + 1 | 0);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var nestedFirst = tmp0_mapInt.v();
var nestedLast = tmp0_mapInt.w();
var stepArg = tmp0_mapInt.t1_1;
if (stepArg <= 0)
THROW_IAE('Step must be positive, was: ' + stepArg + '.');
var inductionVariable_1 = nestedFirst;
var last = getProgressionLastElement(nestedFirst, nestedLast, stepArg);
var step = stepArg;
if (inductionVariable_1 <= last)
do {
var v = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + step | 0;
var tmp$ret$2;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>' call
tmp$ret$2 = this.w99(tmp3_apply);
tmp0_also.m4o(tmp$ret$2);
}
while (!(v === last));
tmp$ret$3 = tmp0_also;
tmp$ret$4 = tmp$ret$3;
var lookups = tmp$ret$4;
var tmp0_iterator = lookups.j();
while (tmp0_iterator.k()) {
var lookupOffset = tmp0_iterator.l();
var tmp$ret$31;
// Inline function 'kotlin.apply' call
var tmp1_apply_0 = tmp3_apply.j6r(lookupOffset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>' call
var lookupType = tmp1_apply_0.q6r();
var lookupFlag = tmp1_apply_0.q6r();
var subTableCount = tmp1_apply_0.q6r();
var tmp$ret$7;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt_0 = tmp1_apply_0.v6r(subTableCount);
var tmp$ret$6;
// Inline function 'kotlin.also' call
var tmp0_also_0 = new Int32Array(tmp0_mapInt_0.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable_2 = 0;
var last_0 = tmp0_mapInt_0.length;
if (inductionVariable_2 < last_0)
do {
var n_1 = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
var tmp$ret$5;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var tmp1__anonymous__uwfjfc = tmp0_mapInt_0[n_1];
tmp$ret$5 = tmp1__anonymous__uwfjfc & 65535;
tmp0_also_0[n_1] = tmp$ret$5;
}
while (inductionVariable_2 < last_0);
tmp$ret$6 = tmp0_also_0;
tmp$ret$7 = tmp$ret$6;
var subtableOffsets = tmp$ret$7;
var markFilteringSet = tmp1_apply_0.q6r();
var indexedObject = subtableOffsets;
var inductionVariable_3 = 0;
var last_1 = indexedObject.length;
while (inductionVariable_3 < last_1) {
var offset = indexedObject[inductionVariable_3];
inductionVariable_3 = inductionVariable_3 + 1 | 0;
var tmp$ret$30;
// Inline function 'kotlin.apply' call
var tmp2_apply_0 = tmp1_apply_0.j6r(offset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var subsTable = tmp2_apply_0;
var tmp0_subject = lookupType;
switch (tmp0_subject) {
case 1:
var substFormat = tmp2_apply_0.q6r();
var coverageOffset = this.w99(tmp2_apply_0);
var tmp1_subject = substFormat;
switch (tmp1_subject) {
case 1:
var deltaGlyphID = tmp2_apply_0.p6r();
var tmp = tmp2_apply_0.j6r(coverageOffset);
var coverageTable = this.i9a(tmp, 0, 1, null);
var indexedObject_0 = coverageTable;
var inductionVariable_4 = 0;
var last_2 = indexedObject_0.length;
while (inductionVariable_4 < last_2) {
var glyphID = indexedObject_0[inductionVariable_4];
inductionVariable_4 = inductionVariable_4 + 1 | 0;
this.c96_1.e4s(glyphID, glyphID + deltaGlyphID | 0);
}
break;
case 2:
var glyphCount = tmp2_apply_0.q6r();
var tmp_0 = tmp2_apply_0.j6r(coverageOffset);
var coverageTable_0 = this.i9a(tmp_0, 0, 1, null);
var tmp$ret$11;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt_1 = tmp2_apply_0.w6r(glyphCount);
var tmp$ret$10;
// Inline function 'kotlin.also' call
var tmp0_also_1 = new Int32Array(tmp0_mapInt_1.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable_5 = 0;
var last_3 = tmp0_mapInt_1.length;
if (inductionVariable_5 < last_3)
do {
var n_2 = inductionVariable_5;
inductionVariable_5 = inductionVariable_5 + 1 | 0;
var tmp$ret$9;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var tmp1__anonymous__uwfjfc_0 = tmp0_mapInt_1[n_2];
var tmp$ret$8;
// Inline function 'kotlin.code' call
tmp$ret$8 = Char__toInt_impl_vasixd(tmp1__anonymous__uwfjfc_0);
tmp$ret$9 = tmp$ret$8;
tmp0_also_1[n_2] = tmp$ret$9;
}
while (inductionVariable_5 < last_3);
tmp$ret$10 = tmp0_also_1;
tmp$ret$11 = tmp$ret$10;
var substituteGlyphIDs = tmp$ret$11;
// Inline function 'kotlin.repeat' call
// Inline function 'kotlin.contracts.contract' call
var inductionVariable_6 = 0;
if (inductionVariable_6 < glyphCount)
do {
var index = inductionVariable_6;
inductionVariable_6 = inductionVariable_6 + 1 | 0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
this.c96_1.e4s(coverageTable_0[index], substituteGlyphIDs[index]);
}
while (inductionVariable_6 < glyphCount);
break;
default:
// Inline function 'kotlin.error' call
var tmp2_error = 'Unsupported lookupType=1, substFormat=' + substFormat;
throw IllegalStateException_init_$Create$(toString(tmp2_error));
break;
}
break;
case 4:
var substFormat_0 = tmp2_apply_0.q6r();
if (!(substFormat_0 === 1)) {
// Inline function 'kotlin.error' call
throw IllegalStateException_init_$Create$('For lookType=4 only substFormat=1 is supported');
}
var coverageOffset_0 = this.w99(tmp2_apply_0);
var ligatureSetCount = tmp2_apply_0.q6r();
var tmp$ret$15;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp3_mapInt = tmp2_apply_0.w6r(ligatureSetCount);
var tmp$ret$14;
// Inline function 'kotlin.also' call
var tmp0_also_2 = new Int32Array(tmp3_mapInt.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable_7 = 0;
var last_4 = tmp3_mapInt.length;
if (inductionVariable_7 < last_4)
do {
var n_3 = inductionVariable_7;
inductionVariable_7 = inductionVariable_7 + 1 | 0;
var tmp$ret$13;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var tmp4__anonymous__pkmkx7 = tmp3_mapInt[n_3];
var tmp$ret$12;
// Inline function 'kotlin.code' call
tmp$ret$12 = Char__toInt_impl_vasixd(tmp4__anonymous__pkmkx7);
tmp$ret$13 = tmp$ret$12;
tmp0_also_2[n_3] = tmp$ret$13;
}
while (inductionVariable_7 < last_4);
tmp$ret$14 = tmp0_also_2;
tmp$ret$15 = tmp$ret$14;
var ligatureSetOffsets = tmp$ret$15;
var glyphArray = this.h9a(tmp2_apply_0.j6r(coverageOffset_0), ligatureSetCount);
var inductionVariable_8 = 0;
var last_5 = ligatureSetOffsets.length - 1 | 0;
if (inductionVariable_8 <= last_5)
do {
var n_4 = inductionVariable_8;
inductionVariable_8 = inductionVariable_8 + 1 | 0;
var glyphID_0 = glyphArray[n_4];
var asetoffset = ligatureSetOffsets[n_4];
var map = LinkedHashMap_init_$Create$();
var codePoint = this.n9a(glyphID_0, 0, 2, null);
var tmp$ret$16;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$16 = new Int32Array([codePoint]);
var codePointIntArray = tmp$ret$16;
var maxComponentCount = 1;
var tmp$ret$29;
// Inline function 'kotlin.apply' call
var tmp5_apply = subsTable.j6r(asetoffset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var ligatureCount = tmp5_apply.q6r();
var tmp$ret$20;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt_2 = tmp5_apply.w6r(ligatureCount);
var tmp$ret$19;
// Inline function 'kotlin.also' call
var tmp0_also_3 = new Int32Array(tmp0_mapInt_2.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable_9 = 0;
var last_6 = tmp0_mapInt_2.length;
if (inductionVariable_9 < last_6)
do {
var n_5 = inductionVariable_9;
inductionVariable_9 = inductionVariable_9 + 1 | 0;
var tmp$ret$18;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var tmp1__anonymous__uwfjfc_1 = tmp0_mapInt_2[n_5];
var tmp$ret$17;
// Inline function 'kotlin.code' call
tmp$ret$17 = Char__toInt_impl_vasixd(tmp1__anonymous__uwfjfc_1);
tmp$ret$18 = tmp$ret$17;
tmp0_also_3[n_5] = tmp$ret$18;
}
while (inductionVariable_9 < last_6);
tmp$ret$19 = tmp0_also_3;
tmp$ret$20 = tmp$ret$19;
var ligatureOffsets = tmp$ret$20;
var indexedObject_1 = ligatureOffsets;
var inductionVariable_10 = 0;
var last_7 = indexedObject_1.length;
while (inductionVariable_10 < last_7) {
var offset_0 = indexedObject_1[inductionVariable_10];
inductionVariable_10 = inductionVariable_10 + 1 | 0;
var tmp$ret$28;
// Inline function 'kotlin.apply' call
var tmp2_apply_1 = tmp5_apply.j6r(offset_0);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var ligatureGlyph = tmp2_apply_1.q6r();
var componentCount = tmp2_apply_1.q6r();
var tmp$ret$21;
// Inline function 'kotlin.math.max' call
var tmp0_max = maxComponentCount;
var tmp1_max = componentCount + 1 | 0;
tmp$ret$21 = Math.max(tmp0_max, tmp1_max);
maxComponentCount = tmp$ret$21;
var tmp$ret$25;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp2_mapInt = tmp2_apply_1.w6r(componentCount - 1 | 0);
var tmp$ret$24;
// Inline function 'kotlin.also' call
var tmp0_also_4 = new Int32Array(tmp2_mapInt.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable_11 = 0;
var last_8 = tmp2_mapInt.length;
if (inductionVariable_11 < last_8)
do {
var n_6 = inductionVariable_11;
inductionVariable_11 = inductionVariable_11 + 1 | 0;
var tmp$ret$23;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGsub.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var tmp3__anonymous__ufb84q = tmp2_mapInt[n_6];
var tmp$ret$22;
// Inline function 'kotlin.code' call
tmp$ret$22 = Char__toInt_impl_vasixd(tmp3__anonymous__ufb84q);
var tmp_1 = tmp$ret$22;
tmp$ret$23 = this.n9a(tmp_1, 0, 2, null);
tmp0_also_4[n_6] = tmp$ret$23;
}
while (inductionVariable_11 < last_8);
tmp$ret$24 = tmp0_also_4;
tmp$ret$25 = tmp$ret$24;
var componentCodePoints = tmp$ret$25;
var tmp_2 = Companion_getInstance_7();
var tmp$ret$26;
// Inline function 'kotlin.collections.plus' call
tmp$ret$26 = primitiveArrayConcat([codePointIntArray, componentCodePoints]);
var ligature = tmp_2.n5z(tmp$ret$26);
// Inline function 'kotlin.collections.set' call
var tmp$ret$27;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$27 = new Int32Array([ligatureGlyph]);
var tmp4_set = tmp$ret$27;
map.a(ligature, tmp4_set);
tmp$ret$28 = tmp2_apply_1;
}
tmp$ret$29 = tmp5_apply;
this.d96_1.e4t(codePoint, new SubstitutionInfo(maxComponentCount, map));
}
while (inductionVariable_8 <= last_5);
break;
default:
println('TTF.GSUB: Unsupported lookupType=' + lookupType);
;
break;
}
tmp$ret$30 = tmp2_apply_0;
}
tmp$ret$31 = tmp1_apply_0;
}
tmp$ret$32 = tmp3_apply;
}
return Unit_getInstance();
};
BaseTtfFont.prototype.k9a = function () {
var tmp0_safe_receiver = this.f99('COLR');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>' call
var version = tmp0_safe_receiver.q6r();
var tmp0_subject = version;
switch (tmp0_subject) {
case 0:
case 1:
var numBaseGlyphRecords = tmp0_safe_receiver.q6r();
var baseGlyphRecordsOffset = tmp0_safe_receiver.s6r();
var layerRecordsOffset = tmp0_safe_receiver.s6r();
var numLayerRecords = tmp0_safe_receiver.q6r();
var tmp$ret$2;
// Inline function 'kotlin.apply' call
var tmp0_apply = tmp0_safe_receiver.j6r(layerRecordsOffset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>' call
var tmp = this;
var tmp_0 = 0;
var tmp_1 = numLayerRecords;
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$0 = fillArrayVal(Array(tmp_1), null);
var tmp_2 = tmp$ret$0;
while (tmp_0 < tmp_1) {
var tmp_3 = tmp_0;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>.<anonymous>' call
tmp$ret$1 = new ColrLayerInfo(this, tmp0_apply.q6r(), tmp0_apply.q6r());
tmp_2[tmp_3] = tmp$ret$1;
tmp_0 = tmp_0 + 1 | 0;
}
tmp.x95_1 = tmp_2;
tmp$ret$2 = tmp0_apply;
;
var tmp$ret$3;
// Inline function 'kotlin.apply' call
var tmp1_apply = tmp0_safe_receiver.j6r(baseGlyphRecordsOffset);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>' call
var inductionVariable = 0;
if (inductionVariable < numBaseGlyphRecords)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var info = new ColrGlyphInfoV0(this, tmp1_apply.q6r(), tmp1_apply.q6r(), tmp1_apply.q6r());
this.y95_1.e4t(info.x9h_1, info);
}
while (inductionVariable < numBaseGlyphRecords);
tmp$ret$3 = tmp1_apply;
;
if (version === 1) {
var baseGlyphListOffset = this.y99(tmp0_safe_receiver);
var layerListOffset = this.y99(tmp0_safe_receiver);
var clipListOffset = this.y99(tmp0_safe_receiver);
var varIdxMapOffset = this.y99(tmp0_safe_receiver);
var varStoreOffset = this.y99(tmp0_safe_receiver);
this.a96_1.t9f_1.x7();
var tmp_4 = this;
var tmp2_s = tmp0_safe_receiver.j6r(0);
var tmp$ret$7;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf32' call
var tmp2_readArrayOf32 = tmp0_safe_receiver.j6r(layerListOffset);
var tmp_5 = 0;
var tmp_6 = tmp2_readArrayOf32.s6r();
var tmp$ret$4;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$4 = fillArrayVal(Array(tmp_6), null);
var tmp_7 = tmp$ret$4;
while (tmp_5 < tmp_6) {
var tmp_8 = tmp_5;
var tmp$ret$6;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf32.<anonymous>' call
var tmp$ret$5;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>' call
tmp$ret$5 = this.y99(tmp2_readArrayOf32);
tmp$ret$6 = tmp$ret$5;
tmp_7[tmp_8] = tmp$ret$6;
tmp_5 = tmp_5 + 1 | 0;
}
tmp$ret$7 = tmp_7;
var tmp3_layerList = toIntArray(tmp$ret$7);
var tmp4_sBaseOffset = tmp0_safe_receiver.j6r(baseGlyphListOffset);
var tmp5_sLayerOffset = tmp0_safe_receiver.j6r(layerListOffset);
var tmp$ret$9;
// Inline function 'kotlin.takeIf' call
// Inline function 'kotlin.contracts.contract' call
var tmp_9;
var tmp$ret$8;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>' call
tmp$ret$8 = !(clipListOffset === 0);
if (tmp$ret$8) {
tmp_9 = clipListOffset;
} else {
tmp_9 = null;
}
tmp$ret$9 = tmp_9;
var tmp1_safe_receiver = tmp$ret$9;
var tmp_10;
if (tmp1_safe_receiver == null) {
tmp_10 = null;
} else {
var tmp$ret$11;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$10;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>' call
tmp$ret$10 = tmp0_safe_receiver.j6r(tmp1_safe_receiver);
tmp$ret$11 = tmp$ret$10;
tmp_10 = tmp$ret$11;
}
var tmp6_sClipOffset = tmp_10;
tmp_4.a96_1 = new COLRv1(tmp3_layerList, tmp2_s, tmp4_sBaseOffset, tmp5_sLayerOffset, tmp6_sClipOffset);
var tmp$ret$13;
// Inline function 'kotlin.takeIf' call
// Inline function 'kotlin.contracts.contract' call
var tmp_11;
var tmp$ret$12;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>' call
tmp$ret$12 = !(clipListOffset === 0);
if (tmp$ret$12) {
tmp_11 = clipListOffset;
} else {
tmp_11 = null;
}
tmp$ret$13 = tmp_11;
var tmp7_safe_receiver = tmp$ret$13;
if (tmp7_safe_receiver == null)
null;
else {
var tmp$ret$18;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$17;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readColr.<anonymous>.<anonymous>' call
var s = tmp0_safe_receiver.j6r(clipListOffset);
var format = s.o6r();
var tmp$ret$16;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf32' call
var tmp_12 = 0;
var tmp_13 = s.s6r();
var tmp$ret$14;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$14 = fillArrayVal(Array(tmp_13), null);
var tmp_14 = tmp$ret$14;
while (tmp_12 < tmp_13) {
var tmp_15 = tmp_12;
var tmp$ret$15;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf32.<anonymous>' call
var startGlyphID = s.q6r();
var endGlyphID = s.q6r();
var clipBoxOffset = this.x99(s);
var inductionVariable_0 = startGlyphID;
if (inductionVariable_0 <= endGlyphID)
do {
var glyphID = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
this.a96_1.t9f_1.e4s(glyphID, clipBoxOffset);
}
while (!(glyphID === endGlyphID));
tmp$ret$15 = Unit_getInstance();
tmp_14[tmp_15] = Unit_getInstance();
tmp_12 = tmp_12 + 1 | 0;
}
tmp$ret$16 = tmp_14;
tmp$ret$17 = tmp$ret$16;
tmp$ret$18 = tmp$ret$17;
}
var tmp$ret$21;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf32' call
var tmp3_readArrayOf32 = tmp0_safe_receiver.j6r(baseGlyphListOffset);
var tmp_16 = 0;
var tmp_17 = tmp3_readArrayOf32.s6r();
var tmp$ret$19;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$19 = fillArrayVal(Array(tmp_17), null);
var tmp_18 = tmp$ret$19;
while (tmp_16 < tmp_17) {
var tmp_19 = tmp_16;
var tmp$ret$20;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readArrayOf32.<anonymous>' call
var glyphID_0 = tmp3_readArrayOf32.q6r();
var paint = this.y99(tmp3_readArrayOf32);
this.y95_1.e4t(glyphID_0, new ColrGlyphInfoV1(this, glyphID_0, paint));
tmp$ret$20 = Unit_getInstance();
tmp_18[tmp_19] = Unit_getInstance();
tmp_16 = tmp_16 + 1 | 0;
}
tmp$ret$21 = tmp_18;
}
break;
default:
println('TTF WARNING CCOLv' + version + ' not supported');
;
break;
}
}
return Unit_getInstance();
};
BaseTtfFont.prototype.l9a = function () {
var tmp0_safe_receiver = this.f99('cmap');
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCmap.<anonymous>' call
var version = tmp0_safe_receiver.q6r();
var numTables = tmp0_safe_receiver.q6r();
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map = until(0, numTables);
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var inductionVariable = tmp0_map.r1_1;
var last = tmp0_map.s1_1;
if (inductionVariable <= last)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCmap.<anonymous>.<anonymous>' call
tmp$ret$0 = new BaseTtfFont$readCmap$1$EncodingRecord(tmp0_safe_receiver.q6r(), tmp0_safe_receiver.q6r(), tmp0_safe_receiver.s6r());
tmp0_mapTo.c(tmp$ret$0);
}
while (!(item === last));
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
var tables = tmp$ret$2;
var index = 0;
var tmp0_iterator = tables.j();
while (tmp0_iterator.k()) {
var table = tmp0_iterator.l();
var tmp$ret$6;
// Inline function 'kotlin.run' call
var tmp1_run = tmp0_safe_receiver.j6r(table.t9k_1);
// Inline function 'kotlin.contracts.contract' call
var format = tmp1_run.q6r();
var tmp;
try {
var tmp0_subject = format;
var tmp_0;
switch (tmp0_subject) {
case 0:
var length = tmp1_run.q6r();
var language = tmp1_run.q6r();
var tmp$ret$5;
// Inline function 'com.soywiz.kds.mapInt' call
var tmp0_mapInt = tmp1_run.m6r(256);
var tmp$ret$4;
// Inline function 'kotlin.also' call
var tmp0_also = new Int32Array(tmp0_mapInt.length);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
var inductionVariable_0 = 0;
var last_0 = tmp0_mapInt.length;
if (inductionVariable_0 < last_0)
do {
var n = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readCmap.<anonymous>.<anonymous>.<anonymous>' call
var tmp1__anonymous__uwfjfc = tmp0_mapInt[n];
tmp$ret$3 = tmp1__anonymous__uwfjfc & 255;
tmp0_also[n] = tmp$ret$3;
}
while (inductionVariable_0 < last_0);
tmp$ret$4 = tmp0_also;
tmp$ret$5 = tmp$ret$4;
var glyphIdArray = tmp$ret$5;
var inductionVariable_1 = 0;
var tmp_1;
if (inductionVariable_1 < 256) {
do {
var n_0 = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
this.r98(n_0, glyphIdArray[n_0]);
}
while (inductionVariable_1 < 256);
tmp_1 = Unit_getInstance();
}
tmp_0 = tmp_1;
break;
case 2:
println('UNSUPPORTED CMAP format = ' + format);
tmp_0 = Unit_getInstance();
break;
case 4:
var length_0 = tmp1_run.q6r();
var language_0 = tmp1_run.q6r();
var segCount = tmp1_run.q6r() / 2 | 0;
var searchRangeS = tmp1_run.q6r();
var entrySelector = tmp1_run.q6r();
var rangeShift = tmp1_run.q6r();
var endCount = tmp1_run.w6r(segCount);
tmp1_run.q6r();
;
var startCount = tmp1_run.w6r(segCount);
var idDelta = tmp1_run.v6r(segCount);
var rangeOffsetPos = tmp1_run.fw();
var idRangeOffset = tmp1_run.w6r(segCount);
var inductionVariable_2 = 0;
var tmp_2;
if (inductionVariable_2 < segCount) {
do {
var n_1 = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
var ec = Char__toInt_impl_vasixd(endCount[n_1]);
var sc = Char__toInt_impl_vasixd(startCount[n_1]);
var delta = idDelta[n_1];
var iro = Char__toInt_impl_vasixd(idRangeOffset[n_1]);
var inductionVariable_3 = sc;
if (inductionVariable_3 <= ec)
do {
var c = inductionVariable_3;
inductionVariable_3 = inductionVariable_3 + 1 | 0;
if (!(iro === 0)) {
var glyphIndexOffset = rangeOffsetPos + imul(n_1, 2) | 0;
glyphIndexOffset = glyphIndexOffset + iro | 0;
glyphIndexOffset = glyphIndexOffset + imul(c - sc | 0, 2) | 0;
index = tmp1_run.j6r(glyphIndexOffset).q6r();
if (!(index === 0)) {
index = index + delta | 0;
}
} else {
index = c + delta | 0;
}
this.q98(c, index & 65535);
}
while (!(c === ec));
}
while (inductionVariable_2 < segCount);
tmp_2 = Unit_getInstance();
}
tmp_0 = tmp_2;
break;
case 6:
var length_1 = tmp1_run.q6r();
var language_1 = tmp1_run.q6r();
var firstCode = tmp1_run.q6r();
var entryCount = tmp1_run.q6r();
var inductionVariable_4 = 0;
var tmp_3;
if (inductionVariable_4 < entryCount) {
do {
var n_2 = inductionVariable_4;
inductionVariable_4 = inductionVariable_4 + 1 | 0;
var codePoint = firstCode + n_2 | 0;
this.q98(codePoint, tmp1_run.q6r());
}
while (inductionVariable_4 < entryCount);
tmp_3 = Unit_getInstance();
}
tmp_0 = tmp_3;
break;
case 8:
println('UNSUPPORTED CMAP format = ' + format);
tmp_0 = Unit_getInstance();
break;
case 10:
println('UNSUPPORTED CMAP format = ' + format);
tmp_0 = Unit_getInstance();
break;
case 12:
tmp1_run.q6r();
;
var length_2 = tmp1_run.s6r();
var language_2 = tmp1_run.s6r();
var numGroups = tmp1_run.s6r();
var inductionVariable_5 = 0;
var tmp_4;
if (inductionVariable_5 < numGroups) {
do {
var n_3 = inductionVariable_5;
inductionVariable_5 = inductionVariable_5 + 1 | 0;
var startCharCode = tmp1_run.s6r();
var endCharCode = tmp1_run.s6r();
var startGlyphId = tmp1_run.s6r();
var inductionVariable_6 = startCharCode;
if (inductionVariable_6 <= endCharCode)
do {
var c_0 = inductionVariable_6;
inductionVariable_6 = inductionVariable_6 + 1 | 0;
var m = c_0 - startCharCode | 0;
this.q98(c_0, startGlyphId + m | 0);
}
while (!(c_0 === endCharCode));
}
while (inductionVariable_5 < numGroups);
tmp_4 = Unit_getInstance();
}
tmp_0 = tmp_4;
break;
case 13:
println('UNSUPPORTED CMAP format = ' + format);
tmp_0 = Unit_getInstance();
break;
default:
println('UNSUPPORTED CMAP format = ' + format);
tmp_0 = Unit_getInstance();
break;
}
tmp = tmp_0;
} catch ($p) {
var tmp_5;
if ($p instanceof Error) {
printStackTrace($p);
tmp_5 = Unit_getInstance();
} else {
throw $p;
}
tmp = tmp_5;
}
tmp$ret$6 = tmp;
}
}
return Unit_getInstance();
};
BaseTtfFont.prototype.m9a = function (charIndex, default_0) {
var tmp$ret$1;
// Inline function 'kotlin.collections.getOrElse' call
var tmp0_getOrElse = this.u95_1;
var tmp0_elvis_lhs = tmp0_getOrElse.q(charIndex);
var tmp;
if (tmp0_elvis_lhs == null) {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.getCodePointFromCharIndexOrElse.<anonymous>' call
tmp$ret$0 = default_0;
tmp = tmp$ret$0;
} else {
tmp = tmp0_elvis_lhs;
}
tmp$ret$1 = tmp;
return tmp$ret$1;
};
BaseTtfFont.prototype.n9a = function (charIndex, default_0, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
default_0 = -1;
return this.m9a(charIndex, default_0);
};
BaseTtfFont.prototype.o9a = function (reader, codePoint, cache) {
var g = this.r9a(codePoint, false, 2, null);
var skipCount = 1;
if (!(g == null)) {
var subs = this.d96_1.m(codePoint);
if (!(reader == null) ? !(subs == null) : false) {
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = reader.z5y();
var tmp1_min = subs.s9b_1;
tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
var inductionVariable = tmp$ret$0;
if (2 <= inductionVariable)
$l$loop_0: do {
var count = inductionVariable;
inductionVariable = inductionVariable + -1 | 0;
var sub = reader.k5z(0, count);
var replacement = subs.t9b_1.q(sub);
if (!(replacement == null)) {
skipCount = sub.ze();
var tmp = first_1(replacement);
var tmp1_elvis_lhs = this.t9a(tmp, false, 0, 6, null);
var tmp_0;
if (tmp1_elvis_lhs == null) {
break $l$loop_0;
} else {
tmp_0 = tmp1_elvis_lhs;
}
g = tmp_0;
break $l$loop_0;
}
}
while (2 <= inductionVariable);
}
}
var tmp2_safe_receiver = reader;
if (tmp2_safe_receiver == null)
null;
else {
tmp2_safe_receiver.j5z(skipCount);
}
return g;
};
BaseTtfFont.prototype.p9a = function (reader, codePoint, cache, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
cache = true;
return this.o9a(reader, codePoint, cache);
};
BaseTtfFont.prototype.q9a = function (codePoint, cache) {
var tmp0_safe_receiver = this.p98(codePoint);
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.getGlyphByCodePoint.<anonymous>' call
tmp$ret$0 = this.s9a(tmp0_safe_receiver, cache, codePoint);
tmp$ret$1 = tmp$ret$0;
tmp = tmp$ret$1;
}
return tmp;
};
BaseTtfFont.prototype.r9a = function (codePoint, cache, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
cache = true;
return this.q9a(codePoint, cache);
};
BaseTtfFont.prototype.s9a = function (index, cache, codePoint) {
var cff = this.h96_1;
if (!(cff == null)) {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.IntMap.getOrPut' call
var tmp0_getOrPut = this.v95_1;
var res = tmp0_getOrPut.m(index);
if (res == null) {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.getGlyphByIndex.<anonymous>' call
var gvector = cff.g90(index, false, 2, null);
tmp$ret$0 = new CFFGlyph(this, index, 0, 0, 0, 0, numberToInt(gvector.j8z_1), new GlyphGraphicsPath(index, gvector.i8z_1));
tmp0_getOrPut.e4t(index, tmp$ret$0);
}
tmp$ret$1 = ensureNotNull(tmp0_getOrPut.m(index));
return tmp$ret$1;
}
var tmp0_elvis_lhs = getOrNull_0(this.g95_1, index);
var start = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
var tmp1_elvis_lhs = getOrNull_0(this.g95_1, index + 1 | 0);
var end = tmp1_elvis_lhs == null ? start : tmp1_elvis_lhs;
var size = end - start | 0;
var tmp;
if (!(size === 0)) {
var tmp2_elvis_lhs = this.v95_1.m(index);
var tmp_0;
if (tmp2_elvis_lhs == null) {
var tmp$ret$2;
$l$block: {
// Inline function 'com.soywiz.korim.font.BaseTtfFont.runTable' call
var tmp0_elvis_lhs_0 = this.l96('glyf');
var tmp_1;
if (tmp0_elvis_lhs_0 == null) {
tmp$ret$2 = null;
break $l$block;
} else {
tmp_1 = tmp0_elvis_lhs_0;
}
var table = tmp_1;
var tmp$ret$5;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.getGlyphByIndex.<anonymous>' call
var tmp1__anonymous__uwfjfc = table.u9b();
var tmp$ret$4;
// Inline function 'kotlin.also' call
var tmp0_also = this.y9a(tmp1__anonymous__uwfjfc.j6r(start), index);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$3;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.getGlyphByIndex.<anonymous>.<anonymous>' call
tmp$ret$3 = Unit_getInstance();
tmp$ret$4 = tmp0_also;
tmp$ret$5 = tmp$ret$4;
tmp$ret$2 = tmp$ret$5;
}
tmp_0 = tmp$ret$2;
} else {
tmp_0 = tmp2_elvis_lhs;
}
tmp = tmp_0;
} else {
var tmp$ret$11;
// Inline function 'kotlin.also' call
var tmp$ret$6;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$6 = new Int32Array([]);
var tmp_2 = tmp$ret$6;
var tmp$ret$7;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$7 = new Int32Array([]);
var tmp_3 = tmp$ret$7;
var tmp$ret$8;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$8 = new Int32Array([]);
var tmp_4 = tmp$ret$8;
var tmp$ret$9;
// Inline function 'kotlin.intArrayOf' call
tmp$ret$9 = new Int32Array([]);
var tmp2_also = new SimpleGlyph(this, index, 0, 0, 0, 0, tmp_2, tmp_3, tmp_4, tmp$ret$9, this.s95_1.m(index).v9b_1, true);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$10;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.getGlyphByIndex.<anonymous>' call
tmp$ret$10 = Unit_getInstance();
tmp$ret$11 = tmp2_also;
tmp = tmp$ret$11;
}
var glyph = tmp;
if (cache ? !this.b96_1 : false) {
this.v95_1.e4t(index, glyph);
}
return glyph;
};
BaseTtfFont.prototype.t9a = function (index, cache, codePoint, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
cache = true;
if (!(($mask0 & 4) === 0))
codePoint = -1;
return this.s9a(index, cache, codePoint);
};
BaseTtfFont.prototype.u9a = function (cache) {
var tmp$ret$3;
// Inline function 'kotlin.collections.mapNotNull' call
var tmp0_mapNotNull = until(0, this.f94_1);
var tmp$ret$2;
// Inline function 'kotlin.collections.mapNotNullTo' call
var tmp0_mapNotNullTo = ArrayList_init_$Create$_0();
// Inline function 'kotlin.collections.forEach' call
var inductionVariable = tmp0_mapNotNull.r1_1;
var last = tmp0_mapNotNull.s1_1;
if (inductionVariable <= last)
do {
var element = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.getAllGlyphs.<anonymous>' call
tmp$ret$0 = this.t9a(element, cache, 0, 4, null);
var tmp0_safe_receiver = tmp$ret$0;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
tmp0_mapNotNullTo.c(tmp0_safe_receiver);
tmp$ret$1 = Unit_getInstance();
}
}
while (!(element === last));
tmp$ret$2 = tmp0_mapNotNullTo;
tmp$ret$3 = tmp$ret$2;
return tmp$ret$3;
};
BaseTtfFont.prototype.v9a = function (_this__u8e3s4) {
var v = _this__u8e3s4.p6r();
var i = extractSigned(v, 14, 2);
var f = extract(v, 0, 14);
return i + f / 16384.0;
};
BaseTtfFont.prototype.w9a = function (_this__u8e3s4) {
var v = _this__u8e3s4.s6r();
var i = extractSigned(v, 16, 16);
var f = extract(v, 0, 16);
return i + f / 65536.0;
};
BaseTtfFont.prototype.x9a = function (_this__u8e3s4, signed, word) {
var tmp;
if (!word ? signed : false) {
tmp = _this__u8e3s4.n6r();
} else if (!word ? !signed : false) {
tmp = _this__u8e3s4.o6r();
} else if (word ? signed : false) {
tmp = _this__u8e3s4.p6r();
} else if (word ? !signed : false) {
tmp = _this__u8e3s4.q6r();
} else {
get_invalidOp();
}
return tmp;
};
BaseTtfFont.prototype.y9a = function (_this__u8e3s4, index) {
var ncontours = _this__u8e3s4.p6r();
var xMin = _this__u8e3s4.p6r();
var yMin = _this__u8e3s4.p6r();
var xMax = _this__u8e3s4.p6r();
var yMax = _this__u8e3s4.p6r();
var advanceWidth = this.s95_1.m(index).v9b_1;
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp;
if (ncontours < 0) {
var ARG_1_AND_2_ARE_WORDS = 1;
var ARGS_ARE_XY_VALUES = 2;
var ROUND_XY_TO_GRID = 4;
var WE_HAVE_A_SCALE = 8;
var MORE_COMPONENTS = 32;
var WE_HAVE_AN_X_AND_Y_SCALE = 64;
var WE_HAVE_A_TWO_BY_TWO = 128;
var WE_HAVE_INSTRUCTIONS = 256;
var USE_MY_METRICS = 512;
var OVERLAP_COMPOUND = 1024;
var SCALED_COMPONENT_OFFSET = 2048;
var UNSCALED_COMPONENT_OFFSET = 4096;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
var references = tmp$ret$0;
do {
var flags = _this__u8e3s4.q6r();
var glyphIndex = _this__u8e3s4.q6r();
var signed = !((flags & ARGS_ARE_XY_VALUES) === 0);
var words = !((flags & ARG_1_AND_2_ARE_WORDS) === 0);
var x = this.x9a(_this__u8e3s4, signed, words);
var y = this.x9a(_this__u8e3s4, signed, words);
var scaleX = 1.0;
var scaleY = 1.0;
var scale01 = 0.0;
var scale10 = 0.0;
if (!((flags & WE_HAVE_A_SCALE) === 0)) {
scaleX = this.v9a(_this__u8e3s4);
scaleY = scaleX;
} else if (!((flags & WE_HAVE_AN_X_AND_Y_SCALE) === 0)) {
scaleX = this.v9a(_this__u8e3s4);
scaleY = this.v9a(_this__u8e3s4);
} else if (!((flags & WE_HAVE_A_TWO_BY_TWO) === 0)) {
scaleX = this.v9a(_this__u8e3s4);
scale01 = this.v9a(_this__u8e3s4);
scale10 = this.v9a(_this__u8e3s4);
scaleY = this.v9a(_this__u8e3s4);
}
var ref = new GlyphReference(ensureNotNull(this.t9a(glyphIndex, false, 0, 6, null)), x, y, scaleX, scale01, scale10, scaleY);
// Inline function 'kotlin.collections.plusAssign' call
references.c(ref);
}
while (!((flags & MORE_COMPONENTS) === 0));
tmp = new CompositeGlyph(this, index, xMin, yMin, xMax, yMax, references, advanceWidth);
} else {
var contoursIndices = new Int32Array(ncontours + 1 | 0);
contoursIndices[0] = -1;
var inductionVariable = 1;
if (inductionVariable <= ncontours)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
contoursIndices[n] = _this__u8e3s4.q6r();
}
while (!(n === ncontours));
var instructionLength = _this__u8e3s4.q6r();
var instructions = _this__u8e3s4.m6r(instructionLength);
var tmp1_safe_receiver = lastOrNull(contoursIndices);
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver + 1 | 0;
var numPoints = tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
var flags_0 = IntArrayList_init_$Create$(0, 1, null);
var npos = 0;
while (npos < numPoints) {
var cf = _this__u8e3s4.o6r();
flags_0.m4o(cf);
if (!((cf & 8) === 0)) {
var count = _this__u8e3s4.o6r();
var inductionVariable_0 = 0;
if (inductionVariable_0 < count)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
flags_0.m4o(cf);
}
while (inductionVariable_0 < count);
npos = npos + (count + 1 | 0) | 0;
} else {
var tmp4 = npos;
npos = tmp4 + 1 | 0;
}
}
var xPos = new Int32Array(numPoints);
var yPos = new Int32Array(numPoints);
var inductionVariable_1 = 0;
if (inductionVariable_1 <= 1)
do {
var xy = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var pos = xy === 0 ? xPos : yPos;
var p = 0;
var inductionVariable_2 = 0;
if (inductionVariable_2 < numPoints)
do {
var n_1 = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
var flag = flags_0.t4n(n_1);
var b1 = !(((flag >>> (1 + xy | 0) | 0) & 1) === 0);
var b2 = !(((flag >>> (4 + xy | 0) | 0) & 1) === 0);
if (b1) {
var magnitude = _this__u8e3s4.o6r();
if (b2)
p = p + magnitude | 0;
else
p = p - magnitude | 0;
} else if (!b2) {
p = p + _this__u8e3s4.p6r() | 0;
}
pos[n_1] = p;
}
while (inductionVariable_2 < numPoints);
}
while (inductionVariable_1 <= 1);
var tmp_0 = flags_0.x4o();
tmp = SimpleGlyph_init_$Create$(this, index, xMin, yMin, xMax, yMax, contoursIndices, tmp_0, xPos, yPos, advanceWidth, false, 2048, null);
}
var tmp0_also = tmp;
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.font.BaseTtfFont.readGlyph.<anonymous>' call
tmp$ret$1 = Unit_getInstance();
tmp$ret$2 = tmp0_also;
return tmp$ret$2;
};
BaseTtfFont.$metadata$ = classMeta('BaseTtfFont', [VectorFont, Extra]);
function Companion_19() {
Companion_instance_19 = this;
}
Companion_19.prototype.v9k = function (num, den) {
return insert16(insert16(0, num, 0), den, 16);
};
Companion_19.$metadata$ = objectMeta('Companion');
var Companion_instance_19;
function Companion_getInstance_32() {
if (Companion_instance_19 == null)
new Companion_19();
return Companion_instance_19;
}
function _FWord___init__impl__2rjyqf(data) {
return data;
}
function _FWord___get_data__impl__9ys4ze($this) {
return $this;
}
function FWord__toDouble_impl_53j5qp($this) {
return _FWord___get_data__impl__9ys4ze($this);
}
function readTtfFont(_this__u8e3s4, preload, onlyReadMetadata, $cont) {
var tmp = new $readTtfFontCOROUTINE$11(_this__u8e3s4, preload, onlyReadMetadata, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readTtfFont$default(_this__u8e3s4, preload, onlyReadMetadata, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
preload = false;
if (!(($mask0 & 2) === 0))
onlyReadMetadata = false;
return readTtfFont(_this__u8e3s4, preload, onlyReadMetadata, $cont);
}
function $readTtfFontCOROUTINE$11(_this__u8e3s4, preload, onlyReadMetadata, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.g9l_1 = _this__u8e3s4;
this.h9l_1 = preload;
this.i9l_1 = onlyReadMetadata;
}
$readTtfFontCOROUTINE$11.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.g9l_1.h5n(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
return new TtfFont(ARGUMENT, this.h9l_1, get_baseName(this.g9l_1), this.i9l_1);
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$readTtfFontCOROUTINE$11.$metadata$ = classMeta('$readTtfFontCOROUTINE$11', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function ss$factory() {
return getPropertyCallableRef('ss', 1, KProperty1, function (receiver) {
return _get_ss__ndcawb(receiver);
}, null);
}
function VectorFont() {
}
VectorFont.$metadata$ = interfaceMeta('VectorFont', [Font]);
var DataFormat_UBYTE_instance;
var DataFormat_STRING_instance;
var DataFormat_USHORT_instance;
var DataFormat_ULONG_instance;
var DataFormat_URATIO_instance;
var DataFormat_SBYTE_instance;
var DataFormat_UNDEFINED_instance;
var DataFormat_SSHORT_instance;
var DataFormat_SLONG_instance;
var DataFormat_SRATIO_instance;
var DataFormat_SFLOAT_instance;
var DataFormat_DFLOAT_instance;
var DataFormat_UNKNOWN_instance;
function Companion_20() {
Companion_instance_20 = this;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy = values_4();
var capacity = coerceAtLeast(mapCapacity(tmp0_associateBy.length), 16);
var tmp$ret$1;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo = LinkedHashMap_init_$Create$_0(capacity);
var indexedObject = tmp0_associateBy;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.Companion.BY_ID.<anonymous>' call
tmp$ret$0 = element.l9l_1;
tmp0_associateByTo.a(tmp$ret$0, element);
}
tmp$ret$1 = tmp0_associateByTo;
tmp$ret$2 = tmp$ret$1;
tmp.n9l_1 = tmp$ret$2;
}
Companion_20.prototype.m = function (index) {
var tmp0_elvis_lhs = this.n9l_1.q(index);
return tmp0_elvis_lhs == null ? DataFormat_UNKNOWN_getInstance() : tmp0_elvis_lhs;
};
Companion_20.$metadata$ = objectMeta('Companion');
var Companion_instance_20;
function Companion_getInstance_33() {
DataFormat_initEntries();
if (Companion_instance_20 == null)
new Companion_20();
return Companion_instance_20;
}
function values_4() {
return [DataFormat_UBYTE_getInstance(), DataFormat_STRING_getInstance(), DataFormat_USHORT_getInstance(), DataFormat_ULONG_getInstance(), DataFormat_URATIO_getInstance(), DataFormat_SBYTE_getInstance(), DataFormat_UNDEFINED_getInstance(), DataFormat_SSHORT_getInstance(), DataFormat_SLONG_getInstance(), DataFormat_SRATIO_getInstance(), DataFormat_SFLOAT_getInstance(), DataFormat_DFLOAT_getInstance(), DataFormat_UNKNOWN_getInstance()];
}
function EXIF$DataFormat$lambda(it) {
return it;
}
function EXIF$DataFormat$lambda_0(it) {
return 4;
}
function EXIF$DataFormat$lambda_1(it) {
return imul(it, 2);
}
function EXIF$DataFormat$lambda_2(it) {
return imul(it, 4);
}
function EXIF$DataFormat$lambda_3(it) {
return imul(it, 4);
}
function EXIF$DataFormat$lambda_4(it) {
return it;
}
function EXIF$DataFormat$lambda_5(it) {
return it;
}
function EXIF$DataFormat$lambda_6(it) {
return imul(it, 2);
}
function EXIF$DataFormat$lambda_7(it) {
return imul(it, 4);
}
function EXIF$DataFormat$lambda_8(it) {
return imul(it, 4);
}
function EXIF$DataFormat$lambda_9(it) {
return imul(it, 4);
}
function EXIF$DataFormat$lambda_10(it) {
return imul(it, 8);
}
function EXIF$DataFormat$lambda_11(it) {
return 0;
}
var DataFormat_entriesInitialized;
function DataFormat_initEntries() {
if (DataFormat_entriesInitialized)
return Unit_getInstance();
DataFormat_entriesInitialized = true;
DataFormat_UBYTE_instance = new DataFormat('UBYTE', 0, 1, EXIF$DataFormat$lambda);
DataFormat_STRING_instance = new DataFormat('STRING', 1, 2, EXIF$DataFormat$lambda_0);
DataFormat_USHORT_instance = new DataFormat('USHORT', 2, 3, EXIF$DataFormat$lambda_1);
DataFormat_ULONG_instance = new DataFormat('ULONG', 3, 4, EXIF$DataFormat$lambda_2);
DataFormat_URATIO_instance = new DataFormat('URATIO', 4, 5, EXIF$DataFormat$lambda_3);
DataFormat_SBYTE_instance = new DataFormat('SBYTE', 5, 6, EXIF$DataFormat$lambda_4);
DataFormat_UNDEFINED_instance = new DataFormat('UNDEFINED', 6, 7, EXIF$DataFormat$lambda_5);
DataFormat_SSHORT_instance = new DataFormat('SSHORT', 7, 8, EXIF$DataFormat$lambda_6);
DataFormat_SLONG_instance = new DataFormat('SLONG', 8, 9, EXIF$DataFormat$lambda_7);
DataFormat_SRATIO_instance = new DataFormat('SRATIO', 9, 10, EXIF$DataFormat$lambda_8);
DataFormat_SFLOAT_instance = new DataFormat('SFLOAT', 10, 11, EXIF$DataFormat$lambda_9);
DataFormat_DFLOAT_instance = new DataFormat('DFLOAT', 11, 12, EXIF$DataFormat$lambda_10);
DataFormat_UNKNOWN_instance = new DataFormat('UNKNOWN', 12, -1, EXIF$DataFormat$lambda_11);
Companion_getInstance_33();
}
function DataFormat(name, ordinal, id, indexBytes) {
Enum.call(this, name, ordinal);
this.l9l_1 = id;
this.m9l_1 = indexBytes;
}
DataFormat.prototype.c1n = function () {
return this.l9l_1;
};
DataFormat.$metadata$ = classMeta('DataFormat', undefined, undefined, undefined, undefined, Enum.prototype);
function readExifBase$readUShort(data, endian, index) {
return readU16(data, imul(index, 2), endian.k4w());
}
function readExifBase$readInt(data, endian, index) {
return readS32(data, imul(index, 4), endian.k4w());
}
function DataFormat_UBYTE_getInstance() {
DataFormat_initEntries();
return DataFormat_UBYTE_instance;
}
function DataFormat_STRING_getInstance() {
DataFormat_initEntries();
return DataFormat_STRING_instance;
}
function DataFormat_USHORT_getInstance() {
DataFormat_initEntries();
return DataFormat_USHORT_instance;
}
function DataFormat_ULONG_getInstance() {
DataFormat_initEntries();
return DataFormat_ULONG_instance;
}
function DataFormat_URATIO_getInstance() {
DataFormat_initEntries();
return DataFormat_URATIO_instance;
}
function DataFormat_SBYTE_getInstance() {
DataFormat_initEntries();
return DataFormat_SBYTE_instance;
}
function DataFormat_UNDEFINED_getInstance() {
DataFormat_initEntries();
return DataFormat_UNDEFINED_instance;
}
function DataFormat_SSHORT_getInstance() {
DataFormat_initEntries();
return DataFormat_SSHORT_instance;
}
function DataFormat_SLONG_getInstance() {
DataFormat_initEntries();
return DataFormat_SLONG_instance;
}
function DataFormat_SRATIO_getInstance() {
DataFormat_initEntries();
return DataFormat_SRATIO_instance;
}
function DataFormat_SFLOAT_getInstance() {
DataFormat_initEntries();
return DataFormat_SFLOAT_instance;
}
function DataFormat_DFLOAT_getInstance() {
DataFormat_initEntries();
return DataFormat_DFLOAT_instance;
}
function DataFormat_UNKNOWN_getInstance() {
DataFormat_initEntries();
return DataFormat_UNKNOWN_instance;
}
function $readExifBaseCOROUTINE$15(_this__u8e3s4, ss, info, debug, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.w9l_1 = _this__u8e3s4;
this.x9l_1 = ss;
this.y9l_1 = info;
this.z9l_1 = debug;
}
$readExifBaseCOROUTINE$15.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;
suspendResult = sliceHere$default(this.x9l_1, false, this, 1, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.a9m_1 = suspendResult;
this.o7_1 = 2;
suspendResult = readString(this.a9m_1, 2, Charsets_getInstance().n5y(), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
this.b9m_1 = suspendResult;
var tmp_0 = this;
var tmp_1;
if (this.b9m_1 === 'MM') {
tmp_1 = Endian_BIG_ENDIAN_getInstance();
} else if (this.b9m_1 === 'II') {
tmp_1 = Endian_LITTLE_ENDIAN_getInstance();
} else {
var tmp_2 = this;
tmp_2.c9m_1 = "Not Exif data (not starting with MM or II but '" + this.b9m_1 + "')";
throw IllegalStateException_init_$Create$(toString(this.c9m_1));
}
tmp_0.d9m_1 = tmp_1;
this.o7_1 = 3;
suspendResult = readU16_0(this.a9m_1, this.d9m_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 3:
this.e9m_1 = suspendResult;
this.o7_1 = 4;
suspendResult = readS32_0(this.a9m_1, this.d9m_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 4:
this.f9m_1 = suspendResult;
this.o7_1 = 5;
suspendResult = readU16_0(this.a9m_1, this.d9m_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 5:
this.g9m_1 = suspendResult;
if (this.z9l_1) {
Console_getInstance().r50(['nDirEntry=' + this.g9m_1 + ', tagMark=' + this.e9m_1 + ', offsetFirstFID=' + this.f9m_1]);
}
this.h9m_1 = until(0, this.g9m_1).j();
this.o7_1 = 6;
continue $sm;
case 6:
if (!this.h9m_1.k()) {
this.o7_1 = 15;
continue $sm;
}
this.i9m_1 = this.h9m_1.l();
this.j9m_1 = this.a9m_1.y5k_1.d2();
this.o7_1 = 7;
suspendResult = readU16_0(this.a9m_1, this.d9m_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 7:
this.k9m_1 = suspendResult;
this.l9m_1 = Companion_getInstance_33();
this.o7_1 = 8;
suspendResult = readU16_0(this.a9m_1, this.d9m_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 8:
this.m9m_1 = suspendResult;
this.n9m_1 = this.l9m_1.m(this.m9m_1);
this.o7_1 = 9;
suspendResult = readS32_0(this.a9m_1, this.d9m_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 9:
this.o9m_1 = suspendResult;
if (this.z9l_1) {
Console_getInstance().r50(['tagPos=' + get_hex(this.j9m_1) + ', tagNumber=' + get_hex(this.k9m_1) + ', dataFormat=' + this.n9m_1 + ', nComponent=' + this.o9m_1 + ', size=' + this.n9m_1.m9l_1(this.o9m_1)]);
}
this.o7_1 = 10;
suspendResult = readBytesExact(this.a9m_1, this.n9m_1.m9l_1(this.o9m_1), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 10:
this.p9m_1 = suspendResult;
if (this.z9l_1) {
if (this.n9m_1.equals(DataFormat_STRING_getInstance())) {
this.q9m_1 = Console_getInstance();
this.o7_1 = 11;
var tmp_3 = toLong(readExifBase$readInt(this.p9m_1, this.d9m_1, 0));
suspendResult = sliceStart$default(this.a9m_1, tmp_3, false, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 13;
continue $sm;
}
} else {
this.o7_1 = 14;
continue $sm;
}
break;
case 11:
this.r9m_1 = suspendResult;
this.o7_1 = 12;
suspendResult = readStringz$default(this.r9m_1, this.o9m_1, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 12:
var ARGUMENT = suspendResult;
var ARGUMENT_0 = " - '" + ARGUMENT + "'";
var ARGUMENT_1 = [ARGUMENT_0];
this.q9m_1.r50(ARGUMENT_1);
this.o7_1 = 13;
continue $sm;
case 13:
this.o7_1 = 14;
continue $sm;
case 14:
var tmp1_subject = this.k9m_1;
if (tmp1_subject === 274) {
var tmp2_subject = readExifBase$readUShort(this.p9m_1, this.d9m_1, 0);
set_orientation(this.y9l_1, tmp2_subject === 1 ? Companion_getInstance_38().s8c_1 : tmp2_subject === 2 ? Companion_getInstance_38().t8c_1 : tmp2_subject === 3 ? Companion_getInstance_38().u8c_1 : tmp2_subject === 4 ? Companion_getInstance_38().v8c_1 : tmp2_subject === 5 ? Companion_getInstance_38().w8c_1 : tmp2_subject === 6 ? Companion_getInstance_38().x8c_1 : tmp2_subject === 7 ? Companion_getInstance_38().y8c_1 : tmp2_subject === 8 ? Companion_getInstance_38().z8c_1 : Companion_getInstance_38().s8c_1);
}
skipToAlign(this.a9m_1, 4, 2);
this.o7_1 = 6;
continue $sm;
case 15:
return this.y9l_1;
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);
};
$readExifBaseCOROUTINE$15.$metadata$ = classMeta('$readExifBaseCOROUTINE$15', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function EXIF() {
EXIF_instance = this;
}
EXIF.prototype.s9m = function (ss, info, debug, $cont) {
var tmp = new $readExifBaseCOROUTINE$15(this, ss, info, debug, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
EXIF.prototype.t9m = function (ss, info, debug, $cont, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
info = new ImageInfo();
if (!(($mask0 & 4) === 0))
debug = false;
return this.s9m(ss, info, debug, $cont);
};
EXIF.$metadata$ = objectMeta('EXIF');
var EXIF_instance;
function EXIF_getInstance() {
if (EXIF_instance == null)
new EXIF();
return EXIF_instance;
}
var Direction_ONCE_FORWARD_instance;
var Direction_ONCE_REVERSE_instance;
var Direction_FORWARD_instance;
var Direction_REVERSE_instance;
var Direction_PING_PONG_instance;
var Direction_entriesInitialized;
function Direction_initEntries() {
if (Direction_entriesInitialized)
return Unit_getInstance();
Direction_entriesInitialized = true;
Direction_ONCE_FORWARD_instance = new Direction('ONCE_FORWARD', 0);
Direction_ONCE_REVERSE_instance = new Direction('ONCE_REVERSE', 1);
Direction_FORWARD_instance = new Direction('FORWARD', 2);
Direction_REVERSE_instance = new Direction('REVERSE', 3);
Direction_PING_PONG_instance = new Direction('PING_PONG', 4);
}
function ImageAnimation_init_$Init$(frames, direction, name, layers, $mask0, $marker, $this) {
if (!(($mask0 & 8) === 0)) {
var tmp$ret$7;
var tmp$ret$7_0;
// Inline function 'kotlin.collections.sortedBy' call
var tmp$ret$5;
var tmp$ret$5_0;
// Inline function 'kotlin.collections.map' call
var tmp$ret$2;
var tmp$ret$2_0;
// Inline function 'kotlin.collections.flatMap' call
var tmp$ret$1;
var tmp$ret$1_0;
// Inline function 'kotlin.collections.flatMapTo' call
var tmp0_flatMapTo = ArrayList_init_$Create$_0();
var tmp0_iterator = frames.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.korim.format.ImageAnimation.<init>.<anonymous>' call
tmp$ret$0 = element.w9m_1;
tmp$ret$0_0 = Unit_getInstance();
var list = tmp$ret$0;
addAll(tmp0_flatMapTo, list);
}
tmp$ret$1 = tmp0_flatMapTo;
tmp$ret$1_0 = Unit_getInstance();
tmp$ret$2 = tmp$ret$1;
tmp$ret$2_0 = Unit_getInstance();
var tmp0_map = tmp$ret$2;
var tmp$ret$4;
var tmp$ret$4_0;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator_0 = tmp0_map.j();
while (tmp0_iterator_0.k()) {
var item = tmp0_iterator_0.l();
var tmp$ret$3;
var tmp$ret$3_0;
// Inline function 'com.soywiz.korim.format.ImageAnimation.<init>.<anonymous>' call
tmp$ret$3 = item.z9m_1;
tmp$ret$3_0 = Unit_getInstance();
tmp0_mapTo.c(tmp$ret$3);
}
tmp$ret$4 = tmp0_mapTo;
tmp$ret$4_0 = Unit_getInstance();
tmp$ret$5 = tmp$ret$4;
tmp$ret$5_0 = Unit_getInstance();
var tmp1_sortedBy = distinct(tmp$ret$5);
var tmp$ret$6;
var tmp$ret$6_0;
// Inline function 'kotlin.comparisons.compareBy' call
var tmp = ImageAnimation$_init_$lambda_bxp50i;
tmp$ret$6 = new sam$kotlin_Comparator$0(tmp);
tmp$ret$6_0 = Unit_getInstance();
tmp$ret$7 = sortedWith(tmp1_sortedBy, tmp$ret$6);
tmp$ret$7_0 = Unit_getInstance();
layers = tmp$ret$7;
}
ImageAnimation.call($this, frames, direction, name, layers);
return $this;
}
function ImageAnimation_init_$Create$(frames, direction, name, layers, $mask0, $marker) {
return ImageAnimation_init_$Init$(frames, direction, name, layers, $mask0, $marker, Object.create(ImageAnimation.prototype));
}
function Direction(name, ordinal) {
Enum.call(this, name, ordinal);
}
Direction.$metadata$ = classMeta('Direction', undefined, undefined, undefined, undefined, Enum.prototype);
function sam$kotlin_Comparator$0(function_0) {
this.i9n_1 = function_0;
}
sam$kotlin_Comparator$0.prototype.b1 = function (a, b) {
return this.i9n_1(a, b);
};
sam$kotlin_Comparator$0.prototype.compare = function (a, b) {
return this.b1(a, b);
};
sam$kotlin_Comparator$0.$metadata$ = classMeta('sam$kotlin_Comparator$0', [Comparator]);
function ImageAnimation$_init_$lambda_bxp50i(a, b) {
var tmp$ret$2;
// Inline function 'kotlin.comparisons.compareValuesBy' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.ImageAnimation.<init>.<anonymous>' call
tmp$ret$0 = a.j9n_1;
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.format.ImageAnimation.<init>.<anonymous>' call
tmp$ret$1 = b.j9n_1;
tmp$ret$2 = compareValues(tmp, tmp$ret$1);
return tmp$ret$2;
}
function Direction_FORWARD_getInstance() {
Direction_initEntries();
return Direction_FORWARD_instance;
}
function ImageAnimation(frames, direction, name, layers) {
this.m9n_1 = frames;
this.n9n_1 = direction;
this.o9n_1 = name;
this.p9n_1 = layers;
}
ImageAnimation.prototype.t2 = function () {
return this.o9n_1;
};
ImageAnimation.$metadata$ = classMeta('ImageAnimation');
function ImageData_init_$Init$(frames, loopCount, width, height, layers, animations, name, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
loopCount = 0;
if (!(($mask0 & 4) === 0)) {
var tmp0_safe_receiver = firstOrNull_0(frames);
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d72();
width = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
}
if (!(($mask0 & 8) === 0)) {
var tmp2_safe_receiver = firstOrNull_0(frames);
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.e72();
height = tmp3_elvis_lhs == null ? 1 : tmp3_elvis_lhs;
}
if (!(($mask0 & 16) === 0))
layers = fastArrayListOf([]);
if (!(($mask0 & 32) === 0))
animations = fastArrayListOf([]);
if (!(($mask0 & 64) === 0))
name = null;
ImageData.call($this, frames, loopCount, width, height, layers, animations, name);
return $this;
}
function ImageData_init_$Create$(frames, loopCount, width, height, layers, animations, name, $mask0, $marker) {
return ImageData_init_$Init$(frames, loopCount, width, height, layers, animations, name, $mask0, $marker, Object.create(ImageData.prototype));
}
function Companion_21() {
Companion_instance_21 = this;
}
Companion_21.prototype.z8f = function (simple) {
var tmp = Companion_getInstance_36();
var tmp_0 = listOf_0(tmp.q9n(simple, null, 0, 0, false, false, null, 0, 254, null));
return ImageData_init_$Create$(tmp_0, 0, 0, 0, null, null, null, 126, null);
};
Companion_21.$metadata$ = objectMeta('Companion');
var Companion_instance_21;
function Companion_getInstance_34() {
if (Companion_instance_21 == null)
new Companion_21();
return Companion_instance_21;
}
function sam$kotlin_Comparator$0_0(function_0) {
this.r9n_1 = function_0;
}
sam$kotlin_Comparator$0_0.prototype.b1 = function (a, b) {
return this.r9n_1(a, b);
};
sam$kotlin_Comparator$0_0.prototype.compare = function (a, b) {
return this.b1(a, b);
};
sam$kotlin_Comparator$0_0.$metadata$ = classMeta('sam$kotlin_Comparator$0', [Comparator]);
function ImageData$framesSortedByPriority$lambda(a, b) {
var tmp$ret$2;
// Inline function 'kotlin.comparisons.compareValuesBy' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.ImageData.framesSortedByPriority.<anonymous>' call
var tmp;
if (b.s9n()) {
tmp = IntCompanionObject_getInstance().o1_1;
} else {
tmp = imul(imul(b.y8x().d72(), b.y8x().e72()), imul(b.y8x().p7y_1, b.y8x().p7y_1));
}
tmp$ret$0 = tmp;
var tmp_0 = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.format.ImageData.framesSortedByPriority.<anonymous>' call
var tmp_1;
if (a.s9n()) {
tmp_1 = IntCompanionObject_getInstance().o1_1;
} else {
tmp_1 = imul(imul(a.y8x().d72(), a.y8x().e72()), imul(a.y8x().p7y_1, a.y8x().p7y_1));
}
tmp$ret$1 = tmp_1;
tmp$ret$2 = compareValues(tmp_0, tmp$ret$1);
return tmp$ret$2;
}
function ImageData(frames, loopCount, width, height, layers, animations, name) {
Companion_getInstance_34();
this.t9n_1 = frames;
this.u9n_1 = loopCount;
this.v9n_1 = width;
this.w9n_1 = height;
this.x9n_1 = layers;
this.y9n_1 = animations;
this.z9n_1 = name;
var tmp = this;
tmp.a9o_1 = Mixin_init_$Create$(null, 1, null);
var tmp_0 = this;
var tmp_1 = Direction_FORWARD_getInstance();
tmp_0.b9o_1 = ImageAnimation_init_$Create$(this.t9n_1, tmp_1, 'default', null, 8, null);
var tmp_2 = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy = this.y9n_1;
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(tmp0_associateBy, 10)), 16);
var tmp$ret$1;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo = LinkedHashMap_init_$Create$_0(capacity);
var tmp0_iterator = tmp0_associateBy.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.ImageData.animationsByName.<anonymous>' call
tmp$ret$0 = element.o9n_1;
tmp0_associateByTo.a(tmp$ret$0, element);
}
tmp$ret$1 = tmp0_associateByTo;
tmp$ret$2 = tmp$ret$1;
tmp_2.c9o_1 = tmp$ret$2;
var tmp_3 = this;
var tmp$ret$5;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy_0 = this.t9n_1;
var capacity_0 = coerceAtLeast(mapCapacity(collectionSizeOrDefault(tmp0_associateBy_0, 10)), 16);
var tmp$ret$4;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo_0 = LinkedHashMap_init_$Create$_0(capacity_0);
var tmp0_iterator_0 = tmp0_associateBy_0.j();
while (tmp0_iterator_0.k()) {
var element_0 = tmp0_iterator_0.l();
var tmp$ret$3;
// Inline function 'com.soywiz.korim.format.ImageData.framesByName.<anonymous>' call
tmp$ret$3 = element_0.t2();
tmp0_associateByTo_0.a(tmp$ret$3, element_0);
}
tmp$ret$4 = tmp0_associateByTo_0;
tmp$ret$5 = tmp$ret$4;
tmp_3.d9o_1 = tmp$ret$5;
var tmp_4 = this;
var tmp$ret$7;
// Inline function 'kotlin.collections.sortedByDescending' call
var tmp0_sortedByDescending = this.t9n_1;
var tmp$ret$6;
// Inline function 'kotlin.comparisons.compareByDescending' call
var tmp_5 = ImageData$framesSortedByPriority$lambda;
tmp$ret$6 = new sam$kotlin_Comparator$0_0(tmp_5);
tmp$ret$7 = sortedWith(tmp0_sortedByDescending, tmp$ret$6);
tmp_4.e9o_1 = tmp$ret$7;
}
ImageData.prototype.e4v = function (_set____db54di) {
this.a9o_1.e4v(_set____db54di);
};
ImageData.prototype.f4v = function () {
return this.a9o_1.f4v();
};
ImageData.prototype.f9o = function () {
var tmp0_safe_receiver = firstOrNull_0(this.e9o_1);
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y8x();
var tmp;
if (tmp1_elvis_lhs == null) {
throw IllegalArgumentException_init_$Create$('No bitmap found');
} else {
tmp = tmp1_elvis_lhs;
}
return tmp;
};
ImageData.prototype.toString = function () {
return 'ImageData(' + this.t9n_1 + ')';
};
ImageData.$metadata$ = classMeta('ImageData', [Extra]);
function ImageDecodingProps_init_$Init$(filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
filename = 'unknown';
if (!(($mask0 & 2) === 0))
width = null;
if (!(($mask0 & 4) === 0))
height = null;
if (!(($mask0 & 8) === 0))
premultiplied = null;
if (!(($mask0 & 16) === 0))
asumePremultiplied = false;
if (!(($mask0 & 32) === 0))
requestedMaxSize = null;
if (!(($mask0 & 64) === 0))
debug = false;
if (!(($mask0 & 128) === 0))
preferKotlinDecoder = false;
if (!(($mask0 & 256) === 0))
tryNativeDecode = true;
if (!(($mask0 & 512) === 0))
format = get_RegisteredImageFormats();
if (!(($mask0 & 1024) === 0))
out = null;
if (!(($mask0 & 2048) === 0))
extra = null;
ImageDecodingProps.call($this, filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra);
return $this;
}
function ImageDecodingProps_init_$Create$(filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra, $mask0, $marker) {
return ImageDecodingProps_init_$Init$(filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra, $mask0, $marker, Object.create(ImageDecodingProps.prototype));
}
function Companion_22() {
Companion_instance_22 = this;
var tmp = this;
tmp.g8i_1 = ImageDecodingProps_init_$Create$(null, null, null, true, false, null, false, false, false, null, null, null, 4087, null);
var tmp_0 = this;
tmp_0.h8i_1 = ImageDecodingProps_init_$Create$(null, null, null, true, false, null, false, false, false, null, null, null, 4087, null);
var tmp_1 = this;
tmp_1.i8i_1 = ImageDecodingProps_init_$Create$(null, null, null, false, false, null, false, false, false, null, null, null, 4087, null);
}
Companion_22.$metadata$ = objectMeta('Companion');
var Companion_instance_22;
function Companion_getInstance_35() {
if (Companion_instance_22 == null)
new Companion_22();
return Companion_instance_22;
}
function ImageDecodingProps(filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra) {
Companion_getInstance_35();
this.g9o_1 = filename;
this.h9o_1 = width;
this.i9o_1 = height;
this.j9o_1 = premultiplied;
this.k9o_1 = asumePremultiplied;
this.l9o_1 = requestedMaxSize;
this.m9o_1 = debug;
this.n9o_1 = preferKotlinDecoder;
this.o9o_1 = tryNativeDecode;
this.p9o_1 = format;
this.q9o_1 = out;
this.r9o_1 = extra;
}
ImageDecodingProps.prototype.e4v = function (_set____db54di) {
this.r9o_1 = _set____db54di;
};
ImageDecodingProps.prototype.f4v = function () {
return this.r9o_1;
};
ImageDecodingProps.prototype.s9o = function () {
var tmp0_elvis_lhs = this.j9o_1;
return tmp0_elvis_lhs == null ? true : tmp0_elvis_lhs;
};
ImageDecodingProps.prototype.t9o = function (filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra) {
return new ImageDecodingProps(filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra);
};
ImageDecodingProps.prototype.u9o = function (filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
filename = this.g9o_1;
if (!(($mask0 & 2) === 0))
width = this.h9o_1;
if (!(($mask0 & 4) === 0))
height = this.i9o_1;
if (!(($mask0 & 8) === 0))
premultiplied = this.j9o_1;
if (!(($mask0 & 16) === 0))
asumePremultiplied = this.k9o_1;
if (!(($mask0 & 32) === 0))
requestedMaxSize = this.l9o_1;
if (!(($mask0 & 64) === 0))
debug = this.m9o_1;
if (!(($mask0 & 128) === 0))
preferKotlinDecoder = this.n9o_1;
if (!(($mask0 & 256) === 0))
tryNativeDecode = this.o9o_1;
if (!(($mask0 & 512) === 0))
format = this.p9o_1;
if (!(($mask0 & 1024) === 0))
out = this.q9o_1;
if (!(($mask0 & 2048) === 0))
extra = this.r9o_1;
return this.t9o(filename, width, height, premultiplied, asumePremultiplied, requestedMaxSize, debug, preferKotlinDecoder, tryNativeDecode, format, out, extra);
};
ImageDecodingProps.prototype.toString = function () {
return 'ImageDecodingProps(filename=' + this.g9o_1 + ', width=' + this.h9o_1 + ', height=' + this.i9o_1 + ', premultiplied=' + this.j9o_1 + ', asumePremultiplied=' + this.k9o_1 + ', requestedMaxSize=' + this.l9o_1 + ', debug=' + this.m9o_1 + ', preferKotlinDecoder=' + this.n9o_1 + ', tryNativeDecode=' + this.o9o_1 + ', format=' + this.p9o_1 + ', out=' + this.q9o_1 + ', extra=' + this.r9o_1 + ')';
};
ImageDecodingProps.prototype.hashCode = function () {
var result = getStringHashCode(this.g9o_1);
result = imul(result, 31) + (this.h9o_1 == null ? 0 : this.h9o_1) | 0;
result = imul(result, 31) + (this.i9o_1 == null ? 0 : this.i9o_1) | 0;
result = imul(result, 31) + (this.j9o_1 == null ? 0 : this.j9o_1 | 0) | 0;
result = imul(result, 31) + (this.k9o_1 | 0) | 0;
result = imul(result, 31) + (this.l9o_1 == null ? 0 : this.l9o_1) | 0;
result = imul(result, 31) + (this.m9o_1 | 0) | 0;
result = imul(result, 31) + (this.n9o_1 | 0) | 0;
result = imul(result, 31) + (this.o9o_1 | 0) | 0;
result = imul(result, 31) + (this.p9o_1 == null ? 0 : hashCode(this.p9o_1)) | 0;
result = imul(result, 31) + (this.q9o_1 == null ? 0 : hashCode(this.q9o_1)) | 0;
result = imul(result, 31) + (this.r9o_1 == null ? 0 : hashCode(this.r9o_1)) | 0;
return result;
};
ImageDecodingProps.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ImageDecodingProps))
return false;
var tmp0_other_with_cast = other instanceof ImageDecodingProps ? other : THROW_CCE();
if (!(this.g9o_1 === tmp0_other_with_cast.g9o_1))
return false;
if (!(this.h9o_1 == tmp0_other_with_cast.h9o_1))
return false;
if (!(this.i9o_1 == tmp0_other_with_cast.i9o_1))
return false;
if (!(this.j9o_1 == tmp0_other_with_cast.j9o_1))
return false;
if (!(this.k9o_1 === tmp0_other_with_cast.k9o_1))
return false;
if (!(this.l9o_1 == tmp0_other_with_cast.l9o_1))
return false;
if (!(this.m9o_1 === tmp0_other_with_cast.m9o_1))
return false;
if (!(this.n9o_1 === tmp0_other_with_cast.n9o_1))
return false;
if (!(this.o9o_1 === tmp0_other_with_cast.o9o_1))
return false;
if (!equals(this.p9o_1, tmp0_other_with_cast.p9o_1))
return false;
if (!equals(this.q9o_1, tmp0_other_with_cast.q9o_1))
return false;
if (!equals(this.r9o_1, tmp0_other_with_cast.r9o_1))
return false;
return true;
};
ImageDecodingProps.$metadata$ = classMeta('ImageDecodingProps', [Extra]);
function $decodeCOROUTINE$19(_this__u8e3s4, s, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.d9p_1 = _this__u8e3s4;
this.e9p_1 = s;
this.f9p_1 = props;
}
$decodeCOROUTINE$19.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.e9p_1.l5n(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
var tmp_0 = get_baseName(this.e9p_1);
return this.d9p_1.g9p(ARGUMENT, this.f9p_1.u9o(tmp_0, null, null, null, false, null, false, false, false, null, null, null, 4094, null));
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);
};
$decodeCOROUTINE$19.$metadata$ = classMeta('$decodeCOROUTINE$19', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function ImageFormat(exts) {
var tmp = this;
var tmp$ret$5;
// Inline function 'kotlin.collections.map' call
var tmp$ret$4;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(exts.length);
var indexedObject = exts;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var item = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.format.ImageFormat.extensions.<anonymous>' call
var tmp$ret$2;
// Inline function 'kotlin.text.trim' call
var tmp$ret$1;
// Inline function 'kotlin.text.toLowerCase' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = item;
tmp$ret$1 = tmp$ret$0.toLowerCase();
var tmp0_trim = tmp$ret$1;
tmp$ret$2 = toString(trim(isCharSequence(tmp0_trim) ? tmp0_trim : THROW_CCE()));
tmp$ret$3 = tmp$ret$2;
tmp0_mapTo.c(tmp$ret$3);
}
tmp$ret$4 = tmp0_mapTo;
tmp$ret$5 = tmp$ret$4;
tmp.d9e_1 = toSet(tmp$ret$5);
}
ImageFormat.prototype.h9p = function (s, props) {
throw NotImplementedError_init_$Create$(null, 1, null);
};
ImageFormat.prototype.i9p = function (s, props) {
var tmp$ret$2;
// Inline function 'com.soywiz.korio.lang.runIgnoringExceptions' call
var tmp;
try {
var tmp$ret$1;
// Inline function 'com.soywiz.korim.format.ImageFormat.decodeHeader.<anonymous>' call
var bmp = this.g9p(s, props);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ImageInfo();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.format.ImageFormat.decodeHeader.<anonymous>.<anonymous>' call
tmp0_apply.k9p_1 = bmp.d72();
tmp0_apply.l9p_1 = bmp.e72();
tmp0_apply.m9p_1 = bmp.p7y_1;
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
tmp = tmp$ret$1;
} catch ($p) {
var tmp_0;
if ($p instanceof Error) {
{
printStackTrace($p);
}
tmp_0 = null;
} else {
throw $p;
}
tmp = tmp_0;
}
tmp$ret$2 = tmp;
return tmp$ret$2;
};
ImageFormat.prototype.g9p = function (s, props) {
return this.h9p(s, props).f9o();
};
ImageFormat.prototype.n9p = function (s, props) {
var tmp$ret$1;
// Inline function 'com.soywiz.korio.lang.runIgnoringExceptions' call
var tmp;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.ImageFormat.check.<anonymous>' call
tmp$ret$0 = !(this.i9p(s, props) == null);
tmp = tmp$ret$0;
} catch ($p) {
var tmp_0;
if ($p instanceof Error) {
{
printStackTrace($p);
}
tmp_0 = null;
} else {
throw $p;
}
tmp = tmp_0;
}
tmp$ret$1 = tmp;
var tmp0_elvis_lhs = tmp$ret$1;
return tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;
};
ImageFormat.prototype.o9p = function (s, props) {
return this.g9p(s, props);
};
ImageFormat.prototype.e9e = function (s, props, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
props = Companion_getInstance_35().g8i_1;
return this.o9p(s, props);
};
ImageFormat.prototype.p9p = function (data, props) {
return this.g9p(openSync$default(data, null, 1, null), props);
};
ImageFormat.prototype.q9p = function (data, props, $cont) {
return this.p9p(data, props);
};
ImageFormat.prototype.r9p = function (s, props, $cont) {
var tmp = new $decodeCOROUTINE$19(this, s, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
ImageFormat.prototype.toString = function () {
return 'ImageFormat(' + this.d9e_1 + ')';
};
ImageFormat.$metadata$ = classMeta('ImageFormat', [ImageFormatDecoder]);
function ImageFormatDecoder() {
}
ImageFormatDecoder.$metadata$ = interfaceMeta('ImageFormatDecoder');
function toProps(_this__u8e3s4, props) {
return props.u9o(null, null, null, null, false, null, false, false, false, _this__u8e3s4, null, null, 3583, null);
}
function toProps$default(_this__u8e3s4, props, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
props = Companion_getInstance_35().g8i_1;
return toProps(_this__u8e3s4, props);
}
function ImageDecoderNotFoundException() {
}
ImageDecoderNotFoundException.$metadata$ = classMeta('ImageDecoderNotFoundException', undefined, undefined, undefined, undefined, Exception.prototype);
function ImageFormats_init_$Init$(formats, $this) {
ImageFormats.call($this, toList_1(formats));
return $this;
}
function ImageFormats_init_$Create$(formats) {
return ImageFormats_init_$Init$(formats, Object.create(ImageFormats.prototype));
}
function ImageFormats(formats) {
ImageFormat.call(this, ['']);
this.t9p_1 = kdsFreeze(KorAtomicRef(kdsFreeze(listFormats(formats))));
}
ImageFormats.prototype.u9p = function (_set____db54di) {
var tmp0_setValue = _formats$factory();
return this.t9p_1.r5f(_set____db54di);
};
ImageFormats.prototype.v9p = function () {
var tmp$ret$0;
// Inline function 'com.soywiz.korio.concurrent.atomic.getValue' call
var tmp0_getValue = _formats$factory_0();
tmp$ret$0 = this.t9p_1.l1();
return tmp$ret$0;
};
ImageFormats.prototype.w9p = function () {
return this.v9p();
};
ImageFormats.prototype.i9p = function (s, props) {
var tmp0_iterator = this.w9p().j();
$l$loop_0: while (tmp0_iterator.k()) {
var format = tmp0_iterator.l();
var tmp;
try {
var tmp1_elvis_lhs = format.i9p(sliceStart$default_0(s, new Long(0, 0), 1, null), props);
var tmp_0;
if (tmp1_elvis_lhs == null) {
continue $l$loop_0;
} else {
tmp_0 = tmp1_elvis_lhs;
}
tmp = tmp_0;
} catch ($p) {
var tmp_1;
if ($p instanceof Error) {
if ($p instanceof CancellationException)
throw $p;
continue $l$loop_0;
} else {
throw $p;
}
tmp = tmp_1;
}
return tmp;
}
return null;
};
ImageFormats.prototype.h9p = function (s, props) {
var tmp0_iterator = this.w9p().j();
while (tmp0_iterator.k()) {
var format = tmp0_iterator.l();
if (format.n9p(sliceStart$default_0(s, new Long(0, 0), 1, null), props)) {
return format.h9p(sliceStart$default_0(s, new Long(0, 0), 1, null), props);
}
}
var tmp = 'No suitable image format : MAGIC:' + readString_0(sliceStart$default_0(s, new Long(0, 0), 1, null), 4, ASCII_getInstance()) + '(';
var tmp_0 = tmp + get_hex_0(readBytes(sliceStart$default_0(s, new Long(0, 0), 1, null), 4)) + ') (';
var tmp_1 = readBytes(sliceStart$default_0(s, new Long(0, 0), 1, null), 4);
var tmp_2 = ASCII_getInstance();
throw UnsupportedOperationException_init_$Create$(tmp_0 + toString$default(tmp_1, tmp_2, 0, 0, 6, null) + ')');
};
ImageFormats.$metadata$ = classMeta('ImageFormats', undefined, undefined, undefined, undefined, ImageFormat.prototype);
function listFormats(_this__u8e3s4) {
var tmp$ret$2;
// Inline function 'kotlin.collections.flatMap' call
var tmp$ret$1;
// Inline function 'kotlin.collections.flatMapTo' call
var tmp0_flatMapTo = ArrayList_init_$Create$_0();
var tmp0_iterator = _this__u8e3s4.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.listFormats.<anonymous>' call
tmp$ret$0 = listFormats_0(element);
var list = tmp$ret$0;
addAll(tmp0_flatMapTo, list);
}
tmp$ret$1 = tmp0_flatMapTo;
tmp$ret$2 = tmp$ret$1;
return toMutableSet(tmp$ret$2);
}
function listFormats_0(_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp;
if (tmp0_subject instanceof ImageFormats) {
tmp = _this__u8e3s4.w9p();
} else {
tmp = setOf_0(_this__u8e3s4);
}
return tmp;
}
function _formats$factory() {
return getPropertyCallableRef('_formats', 1, KMutableProperty1, function (receiver) {
return receiver.v9p();
}, function (receiver, value) {
return receiver.u9p(value);
});
}
function _formats$factory_0() {
return getPropertyCallableRef('_formats', 1, KMutableProperty1, function (receiver) {
return receiver.v9p();
}, function (receiver, value) {
return receiver.u9p(value);
});
}
function ImageFormatsMutable() {
ImageFormats_init_$Init$([], this);
this.z9p_1 = new NonRecursiveLock();
}
ImageFormatsMutable.$metadata$ = classMeta('ImageFormatsMutable', undefined, undefined, undefined, undefined, ImageFormats.prototype);
function Companion_23() {
Companion_instance_23 = this;
}
Companion_23.prototype.a9q = function (bitmap, time, targetX, targetY, main, includeInAtlas, name, index) {
var tmp = new ImageLayer(0, null, Type_NORMAL_getInstance());
var tmp_0 = slice$default(bitmap, null, name, null, 5, null);
return new ImageFrame(index, time, fastArrayListOf([ImageFrameLayer_init_$Create$(tmp, tmp_0, targetX, targetY, main, includeInAtlas, null, 64, null)]));
};
Companion_23.prototype.q9n = function (bitmap, time, targetX, targetY, main, includeInAtlas, name, index, $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_5().c1i(0.0);
tmp$ret$0_0 = Unit_getInstance();
time = tmp$ret$0;
}
if (!(($mask0 & 4) === 0))
targetX = 0;
if (!(($mask0 & 8) === 0))
targetY = 0;
if (!(($mask0 & 16) === 0))
main = true;
if (!(($mask0 & 32) === 0))
includeInAtlas = true;
if (!(($mask0 & 64) === 0))
name = null;
if (!(($mask0 & 128) === 0))
index = 0;
return this.a9q(bitmap, time, targetX, targetY, main, includeInAtlas, name, index);
};
Companion_23.$metadata$ = objectMeta('Companion');
var Companion_instance_23;
function Companion_getInstance_36() {
if (Companion_instance_23 == null)
new Companion_23();
return Companion_instance_23;
}
function ImageFrame(index, time, layerData) {
Companion_getInstance_36();
this.u9m_1 = index;
this.v9m_1 = time;
this.w9m_1 = layerData;
var tmp = this;
tmp.x9m_1 = Mixin_init_$Create$(null, 1, null);
this.y9m_1 = firstOrNull_0(this.w9m_1);
}
ImageFrame.prototype.b9q = function () {
return this.w9m_1;
};
ImageFrame.prototype.e4v = function (_set____db54di) {
this.x9m_1.e4v(_set____db54di);
};
ImageFrame.prototype.f4v = function () {
return this.x9m_1.f4v();
};
ImageFrame.prototype.c9q = function () {
var tmp0_safe_receiver = this.y9m_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h9n_1;
var tmp;
if (tmp1_elvis_lhs == null) {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
tmp = tmp$ret$0;
} else {
tmp = tmp1_elvis_lhs;
}
return tmp;
};
ImageFrame.prototype.d9q = function () {
var tmp0_safe_receiver = this.y9m_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a9n_1;
return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
};
ImageFrame.prototype.e9q = function () {
var tmp0_safe_receiver = this.y9m_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b9n_1;
return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
};
ImageFrame.prototype.s9n = function () {
var tmp0_safe_receiver = this.y9m_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c9n_1;
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
};
ImageFrame.prototype.d72 = function () {
return this.c9q().d72();
};
ImageFrame.prototype.e72 = function () {
return this.c9q().e72();
};
ImageFrame.prototype.y8x = function () {
var tmp0_safe_receiver = this.y9m_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y8x();
var tmp;
if (tmp1_elvis_lhs == null) {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
tmp = tmp$ret$0.c89_1;
} else {
tmp = tmp1_elvis_lhs;
}
return tmp;
};
ImageFrame.prototype.t2 = function () {
return this.c9q().t2();
};
ImageFrame.prototype.toString = function () {
return 'ImageFrame(' + this.c9q() + ', time=' + new TimeSpan(this.v9m_1) + ', targetX=' + this.d9q() + ', targetY=' + this.e9q() + ', main=' + this.s9n() + ')';
};
ImageFrame.$metadata$ = classMeta('ImageFrame', [Extra]);
function ImageFrameLayer_init_$Init$(layer, slice, targetX, targetY, main, includeInAtlas, tilemap, $mask0, $marker, $this) {
if (!(($mask0 & 4) === 0))
targetX = 0;
if (!(($mask0 & 8) === 0))
targetY = 0;
if (!(($mask0 & 16) === 0))
main = true;
if (!(($mask0 & 32) === 0))
includeInAtlas = true;
if (!(($mask0 & 64) === 0))
tilemap = null;
ImageFrameLayer.call($this, layer, slice, targetX, targetY, main, includeInAtlas, tilemap);
return $this;
}
function ImageFrameLayer_init_$Create$(layer, slice, targetX, targetY, main, includeInAtlas, tilemap, $mask0, $marker) {
return ImageFrameLayer_init_$Init$(layer, slice, targetX, targetY, main, includeInAtlas, tilemap, $mask0, $marker, Object.create(ImageFrameLayer.prototype));
}
function ImageFrameLayer(layer, slice, targetX, targetY, main, includeInAtlas, tilemap) {
this.z9m_1 = layer;
this.a9n_1 = targetX;
this.b9n_1 = targetY;
this.c9n_1 = main;
this.d9n_1 = includeInAtlas;
this.e9n_1 = tilemap;
this.f9n_1 = null;
this.g9n_1 = null;
this.h9n_1 = slice;
}
ImageFrameLayer.prototype.f9q = function () {
return this.z9m_1;
};
ImageFrameLayer.prototype.d72 = function () {
return this.h9n_1.d72();
};
ImageFrameLayer.prototype.e72 = function () {
return this.h9n_1.e72();
};
ImageFrameLayer.prototype.y8x = function () {
if (this.h9n_1.k8b().d72() === this.d72() ? this.h9n_1.k8b().e72() === this.e72() : false)
return this.h9n_1.k8b();
if (this.f9n_1 == null)
this.f9n_1 = extract_1(this.h9n_1);
return ensureNotNull(this.f9n_1);
};
ImageFrameLayer.$metadata$ = classMeta('ImageFrameLayer');
function ImageInfo() {
var tmp = this;
tmp.j9p_1 = Mixin_init_$Create$(null, 1, null);
this.k9p_1 = 0;
this.l9p_1 = 0;
this.m9p_1 = 8;
}
ImageInfo.prototype.e4v = function (_set____db54di) {
this.j9p_1.e4v(_set____db54di);
};
ImageInfo.prototype.f4v = function () {
return this.j9p_1.f4v();
};
ImageInfo.prototype.r9d = function (_set____db54di) {
this.k9p_1 = _set____db54di;
};
ImageInfo.prototype.q9d = function (_set____db54di) {
this.l9p_1 = _set____db54di;
};
ImageInfo.prototype.g9q = function (_set____db54di) {
this.m9p_1 = _set____db54di;
};
ImageInfo.prototype.toString = function () {
var tmp = this.k9p_1;
var tmp_0 = this.l9p_1;
var tmp_1 = this.m9p_1;
var tmp0_safe_receiver = this.f4v();
return 'ImageInfo(width=' + tmp + ', height=' + tmp_0 + ', bpp=' + tmp_1 + ', extra=' + (tmp0_safe_receiver == null ? null : toMap_0(tmp0_safe_receiver)) + ')';
};
ImageInfo.$metadata$ = classMeta('ImageInfo', [Extra]);
var Type_NORMAL_instance;
var Type_GROUP_instance;
var Type_TILEMAP_instance;
function Companion_24() {
Companion_instance_24 = this;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.arrayOf' call
var tmp0_arrayOf = [Type_NORMAL_getInstance(), Type_GROUP_getInstance(), Type_TILEMAP_getInstance()];
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_arrayOf;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
tmp.h9q_1 = tmp$ret$2;
}
Companion_24.$metadata$ = objectMeta('Companion');
var Companion_instance_24;
function Companion_getInstance_37() {
Type_initEntries();
if (Companion_instance_24 == null)
new Companion_24();
return Companion_instance_24;
}
var Type_entriesInitialized;
function Type_initEntries() {
if (Type_entriesInitialized)
return Unit_getInstance();
Type_entriesInitialized = true;
Type_NORMAL_instance = new Type('NORMAL', 0);
Type_GROUP_instance = new Type('GROUP', 1);
Type_TILEMAP_instance = new Type('TILEMAP', 2);
Companion_getInstance_37();
}
function Type(name, ordinal) {
Enum.call(this, name, ordinal);
}
Type.$metadata$ = classMeta('Type', undefined, undefined, undefined, undefined, Enum.prototype);
function Type_NORMAL_getInstance() {
Type_initEntries();
return Type_NORMAL_instance;
}
function Type_GROUP_getInstance() {
Type_initEntries();
return Type_GROUP_instance;
}
function Type_TILEMAP_getInstance() {
Type_initEntries();
return Type_TILEMAP_instance;
}
function ImageLayer(index, name, type) {
this.j9n_1 = index;
this.k9n_1 = name;
this.l9n_1 = type;
}
ImageLayer.prototype.m4 = function () {
return this.j9n_1;
};
ImageLayer.$metadata$ = classMeta('ImageLayer');
function set_orientation(_this__u8e3s4, _set____db54di) {
init_properties_ImageOrientation_kt_rzrcvv();
var tmp0_setValue = orientation$factory();
var tmp0_elvis_lhs = orientation$delegate.g4v_1;
var tmp = tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _set____db54di;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return setExtra(_this__u8e3s4, tmp, tmp$ret$2);
}
function get_orientation(_this__u8e3s4) {
init_properties_ImageOrientation_kt_rzrcvv();
var tmp$ret$8;
$l$block: {
// Inline function 'com.soywiz.kds.Property.getValue' call
var tmp0_getValue = orientation$factory_0();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp1_safe_receiver = _this__u8e3s4.f4v();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_elvis_lhs = orientation$delegate.g4v_1;
var tmp0_get = tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp1_safe_receiver;
tmp$ret$1 = tmp$ret$0.get(tmp0_get);
tmp = tmp$ret$1;
}
var tmp1_fastCastTo = tmp;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_fastCastTo;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
var res = tmp$ret$4;
if (res == null) {
var r = orientation$delegate.h4v_1();
var tmp_0;
if (!(r == null)) {
tmp_0 = true;
} else {
var tmp2_elvis_lhs = orientation$delegate.g4v_1;
tmp_0 = hasExtra(_this__u8e3s4, tmp2_elvis_lhs == null ? tmp0_getValue.callableName : tmp2_elvis_lhs);
}
if (tmp_0) {
// Inline function 'com.soywiz.kds.Property.setValue' call
var tmp0_elvis_lhs_0 = orientation$delegate.g4v_1;
var tmp_1 = tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0;
var tmp$ret$7;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$6;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = r;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
setExtra(_this__u8e3s4, tmp_1, tmp$ret$7);
}
tmp$ret$8 = r;
break $l$block;
}
tmp$ret$8 = res;
}
return tmp$ret$8;
}
var orientation$delegate;
var Rotation_R0_instance;
var Rotation_R90_instance;
var Rotation_R180_instance;
var Rotation_R270_instance;
var Rotation_entriesInitialized;
function Rotation_initEntries() {
if (Rotation_entriesInitialized)
return Unit_getInstance();
Rotation_entriesInitialized = true;
Rotation_R0_instance = new Rotation('R0', 0);
Rotation_R90_instance = new Rotation('R90', 1);
Rotation_R180_instance = new Rotation('R180', 2);
Rotation_R270_instance = new Rotation('R270', 3);
}
function ImageOrientation_init_$Init$(rotation, flipX, flipY, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
rotation = Rotation_R0_getInstance();
if (!(($mask0 & 2) === 0))
flipX = false;
if (!(($mask0 & 4) === 0))
flipY = false;
ImageOrientation.call($this, rotation, flipX, flipY);
return $this;
}
function ImageOrientation_init_$Create$(rotation, flipX, flipY, $mask0, $marker) {
return ImageOrientation_init_$Init$(rotation, flipX, flipY, $mask0, $marker, Object.create(ImageOrientation.prototype));
}
function Rotation(name, ordinal) {
Enum.call(this, name, ordinal);
}
Rotation.$metadata$ = classMeta('Rotation', undefined, undefined, undefined, undefined, Enum.prototype);
function Companion_25() {
Companion_instance_25 = this;
var tmp = this;
tmp.s8c_1 = ImageOrientation_init_$Create$(null, false, false, 7, null);
var tmp_0 = this;
tmp_0.t8c_1 = ImageOrientation_init_$Create$(null, true, false, 5, null);
var tmp_1 = this;
var tmp_2 = Rotation_R180_getInstance();
tmp_1.u8c_1 = ImageOrientation_init_$Create$(tmp_2, false, false, 6, null);
var tmp_3 = this;
tmp_3.v8c_1 = ImageOrientation_init_$Create$(null, false, true, 3, null);
var tmp_4 = this;
var tmp0_rotation = Rotation_R270_getInstance();
tmp_4.w8c_1 = ImageOrientation_init_$Create$(tmp0_rotation, true, false, 4, null);
var tmp_5 = this;
var tmp_6 = Rotation_R90_getInstance();
tmp_5.x8c_1 = ImageOrientation_init_$Create$(tmp_6, false, false, 6, null);
var tmp_7 = this;
var tmp0_rotation_0 = Rotation_R90_getInstance();
tmp_7.y8c_1 = ImageOrientation_init_$Create$(tmp0_rotation_0, true, false, 4, null);
var tmp_8 = this;
var tmp_9 = Rotation_R270_getInstance();
tmp_8.z8c_1 = ImageOrientation_init_$Create$(tmp_9, false, false, 6, null);
}
Companion_25.prototype.i9q = function () {
return this.s8c_1;
};
Companion_25.$metadata$ = objectMeta('Companion');
var Companion_instance_25;
function Companion_getInstance_38() {
if (Companion_instance_25 == null)
new Companion_25();
return Companion_instance_25;
}
function Rotation_R0_getInstance() {
Rotation_initEntries();
return Rotation_R0_instance;
}
function Rotation_R90_getInstance() {
Rotation_initEntries();
return Rotation_R90_instance;
}
function Rotation_R180_getInstance() {
Rotation_initEntries();
return Rotation_R180_instance;
}
function Rotation_R270_getInstance() {
Rotation_initEntries();
return Rotation_R270_instance;
}
function ImageOrientation(rotation, flipX, flipY) {
Companion_getInstance_38();
this.a8d_1 = rotation;
this.b8d_1 = flipX;
this.c8d_1 = flipY;
this.d8d_1 = this.a8d_1.equals(Rotation_R90_getInstance()) ? true : this.a8d_1.equals(Rotation_R270_getInstance());
}
ImageOrientation.prototype.toString = function () {
return 'ImageOrientation(rotation=' + this.a8d_1 + ', flipX=' + this.b8d_1 + ', flipY=' + this.c8d_1 + ')';
};
ImageOrientation.prototype.hashCode = function () {
var result = this.a8d_1.hashCode();
result = imul(result, 31) + (this.b8d_1 | 0) | 0;
result = imul(result, 31) + (this.c8d_1 | 0) | 0;
return result;
};
ImageOrientation.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ImageOrientation))
return false;
var tmp0_other_with_cast = other instanceof ImageOrientation ? other : THROW_CCE();
if (!this.a8d_1.equals(tmp0_other_with_cast.a8d_1))
return false;
if (!(this.b8d_1 === tmp0_other_with_cast.b8d_1))
return false;
if (!(this.c8d_1 === tmp0_other_with_cast.c8d_1))
return false;
return true;
};
ImageOrientation.$metadata$ = classMeta('ImageOrientation');
function withImageOrientation(_this__u8e3s4, orientation) {
init_properties_ImageOrientation_kt_rzrcvv();
var result = _this__u8e3s4;
if (orientation.b8d_1)
result = flippedX(result);
if (orientation.c8d_1)
result = flippedY(result);
var tmp0_subject = orientation.a8d_1;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 0:
tmp = result;
break;
case 1:
tmp = rotatedRight(result);
break;
case 2:
tmp = rotatedRight(rotatedRight(result));
break;
case 3:
tmp = rotatedRight(rotatedRight(rotatedRight(result)));
break;
default:
noWhenBranchMatchedException();
break;
}
return tmp;
}
function orientation$delegate$lambda() {
init_properties_ImageOrientation_kt_rzrcvv();
return null;
}
function orientation$factory() {
return getPropertyCallableRef('orientation', 1, KMutableProperty1, function (receiver) {
return get_orientation(receiver);
}, function (receiver, value) {
return set_orientation(receiver, value);
});
}
function orientation$factory_0() {
return getPropertyCallableRef('orientation', 1, KMutableProperty1, function (receiver) {
return get_orientation(receiver);
}, function (receiver, value) {
return set_orientation(receiver, value);
});
}
var properties_initialized_ImageOrientation_kt_37wzbr;
function init_properties_ImageOrientation_kt_rzrcvv() {
if (properties_initialized_ImageOrientation_kt_37wzbr) {
} else {
properties_initialized_ImageOrientation_kt_37wzbr = true;
orientation$delegate = Property_init_$Create$(null, orientation$delegate$lambda, 1, null);
}
}
function readBitmapSlice(_this__u8e3s4, name, atlas, props, $cont) {
var tmp = new $readBitmapSliceCOROUTINE$24(_this__u8e3s4, name, atlas, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readBitmapSlice$default(_this__u8e3s4, name, atlas, props, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
name = null;
if (!(($mask0 & 2) === 0))
atlas = null;
if (!(($mask0 & 4) === 0))
props = Companion_getInstance_35().g8i_1;
return readBitmapSlice(_this__u8e3s4, name, atlas, props, $cont);
}
function readBitmap(_this__u8e3s4, props, $cont) {
var tmp = new $readBitmapCOROUTINE$25(_this__u8e3s4, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function readBitmap$default(_this__u8e3s4, props, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0)) {
props = ImageDecodingProps_init_$Create$('file.bin', null, null, null, false, null, false, false, false, null, null, null, 4094, null);
}
return readBitmap(_this__u8e3s4, props, $cont);
}
function readBitmap_0(_this__u8e3s4, format, $cont) {
return readBitmap_1(_this__u8e3s4, toProps$default(format, null, 1, null), $cont);
}
function readBitmap_1(_this__u8e3s4, props, $cont) {
return _readBitmap$default(_this__u8e3s4, null, props, $cont, 2, null);
}
function readBitmap$default_0(_this__u8e3s4, props, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
props = Companion_getInstance_35().g8i_1;
return readBitmap_1(_this__u8e3s4, props, $cont);
}
function _readBitmap(file, bytes, props, $cont) {
var tmp = new $_readBitmapCOROUTINE$26(file, bytes, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function _readBitmap$default(file, bytes, props, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
file = null;
if (!(($mask0 & 2) === 0))
bytes = null;
if (!(($mask0 & 4) === 0))
props = Companion_getInstance_35().g8i_1;
return _readBitmap(file, bytes, props, $cont);
}
function $readBitmapSliceCOROUTINE$24(_this__u8e3s4, name, atlas, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.r9q_1 = _this__u8e3s4;
this.s9q_1 = name;
this.t9q_1 = atlas;
this.u9q_1 = props;
}
$readBitmapSliceCOROUTINE$24.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 = readBitmap_1(this.r9q_1, this.u9q_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var result = suspendResult;
var tmp_0;
if (!(this.t9q_1 == null)) {
tmp_0 = this.t9q_1.y9r(result.w86(), Unit_getInstance(), this.s9q_1).m7x_1;
} else {
tmp_0 = slice$default(result, null, null, null, 7, null);
}
return tmp_0;
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$readBitmapSliceCOROUTINE$24.$metadata$ = classMeta('$readBitmapSliceCOROUTINE$24', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $readBitmapCOROUTINE$25(_this__u8e3s4, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.d9r_1 = _this__u8e3s4;
this.e9r_1 = props;
}
$readBitmapCOROUTINE$25.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 = readAll(this.d9r_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.f9r_1 = suspendResult;
this.o7_1 = 2;
suspendResult = _readBitmap$default(null, this.f9r_1, this.e9r_1, this, 1, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
return suspendResult;
case 3:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$readBitmapCOROUTINE$25.$metadata$ = classMeta('$readBitmapCOROUTINE$25', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $_readBitmapCOROUTINE$26(file, bytes, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.o9r_1 = file;
this.p9r_1 = bytes;
this.q9r_1 = props;
}
$_readBitmapCOROUTINE$26.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 8;
var tmp_0 = this;
var tmp_1;
if (!(this.o9r_1 == null)) {
var tmp_2 = get_baseName(this.o9r_1);
tmp_1 = this.q9r_1.u9o(tmp_2, null, null, null, false, null, false, false, false, null, null, null, 4094, null);
} else {
tmp_1 = this.q9r_1;
}
tmp_0.r9r_1 = tmp_1;
this.s9r_1 = !this.r9r_1.o9o_1 ? listOf_0(this.r9r_1.p9o_1) : this.r9r_1.p9o_1 == null ? listOf_0(null) : this.r9r_1.n9o_1 ? listOf([this.r9r_1.p9o_1, null]) : listOf([null, this.r9r_1.p9o_1]);
this.t9r_1 = null;
this.u9r_1 = this.s9r_1.j();
this.o7_1 = 1;
continue $sm;
case 1:
if (!this.u9r_1.k()) {
this.o7_1 = 7;
continue $sm;
}
this.v9r_1 = this.u9r_1.l();
this.p7_1 = 5;
var tmp_3 = this;
var tmp1_elvis_lhs = this.v9r_1;
tmp_3.w9r_1 = tmp1_elvis_lhs == null ? get_nativeImageFormatProvider() : tmp1_elvis_lhs;
if (!(this.p9r_1 == null)) {
this.o7_1 = 3;
suspendResult = this.w9r_1.q9p(this.p9r_1, this.r9r_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
if (!(this.o9r_1 == null)) {
this.o7_1 = 2;
suspendResult = this.w9r_1.r9p(this.o9r_1, this.r9r_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
var tmp_4 = this;
throw NotImplementedError_init_$Create$(null, 1, null);
}
}
break;
case 2:
this.x9r_1 = suspendResult;
this.o7_1 = 4;
continue $sm;
case 3:
this.x9r_1 = suspendResult;
this.o7_1 = 4;
continue $sm;
case 4:
var bmp = this.x9r_1;
if (this.r9r_1.k9o_1) {
asumePremultiplied(bmp);
}
return bmp;
case 5:
this.p7_1 = 8;
var tmp_5 = this.r7_1;
if (tmp_5 instanceof Error) {
var e = this.r7_1;
this.t9r_1 = e;
var tmp2_subject = e;
if (tmp2_subject instanceof CancellationException)
throw e;
else {
var tmp_6;
if (tmp2_subject instanceof FileNotFoundException) {
tmp_6 = true;
} else {
tmp_6 = tmp2_subject instanceof ImageDecoderNotFoundException;
}
if (tmp_6)
;
else {
printStackTrace(e);
}
}
this.o7_1 = 6;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 6:
this.p7_1 = 8;
this.o7_1 = 1;
continue $sm;
case 7:
throw ensureNotNull(this.t9r_1);
case 8:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 8) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$_readBitmapCOROUTINE$26.$metadata$ = classMeta('$_readBitmapCOROUTINE$26', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $decodeInternalCOROUTINE$28(_this__u8e3s4, vfs, path, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.h9s_1 = _this__u8e3s4;
this.i9s_1 = vfs;
this.j9s_1 = path;
this.k9s_1 = props;
}
$decodeInternalCOROUTINE$28.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 3;
this.o7_1 = 1;
suspendResult = this.i9s_1.d5j(this.j9s_1).i5n(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.l9s_1 = suspendResult;
this.o7_1 = 2;
suspendResult = this.h9s_1.m9s(this.l9s_1, this.k9s_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
return suspendResult;
case 3:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$decodeInternalCOROUTINE$28.$metadata$ = classMeta('$decodeInternalCOROUTINE$28', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $decodeSuspendCOROUTINE$32(_this__u8e3s4, data, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.v9s_1 = _this__u8e3s4;
this.w9s_1 = data;
this.x9s_1 = props;
}
$decodeSuspendCOROUTINE$32.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.v9s_1.m9s(this.w9s_1, this.x9s_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
return ARGUMENT.y9s_1;
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$decodeSuspendCOROUTINE$32.$metadata$ = classMeta('$decodeSuspendCOROUTINE$32', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $decodeCOROUTINE$33(_this__u8e3s4, file, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.j9t_1 = _this__u8e3s4;
this.k9t_1 = file;
this.l9t_1 = props;
}
$decodeCOROUTINE$33.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.j9t_1.m9t(this.k9t_1.p5n(), this.k9t_1.q5n(), this.l9t_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
return ARGUMENT.y9s_1;
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$decodeCOROUTINE$33.$metadata$ = classMeta('$decodeCOROUTINE$33', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $decodeCOROUTINE$34(_this__u8e3s4, file, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.v9t_1 = _this__u8e3s4;
this.w9t_1 = file;
this.x9t_1 = props;
}
$decodeCOROUTINE$34.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 3;
this.o7_1 = 1;
suspendResult = this.w9t_1.e5h(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.y9t_1 = suspendResult;
this.o7_1 = 2;
suspendResult = this.v9t_1.z9t(this.y9t_1, this.x9t_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
return suspendResult;
case 3:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$decodeCOROUTINE$34.$metadata$ = classMeta('$decodeCOROUTINE$34', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function NativeImageFormatProvider() {
}
NativeImageFormatProvider.prototype.m9t = function (vfs, path, props, $cont) {
var tmp = new $decodeInternalCOROUTINE$28(this, vfs, path, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
NativeImageFormatProvider.prototype.a9u = function (data, props, $cont) {
var tmp = new $decodeSuspendCOROUTINE$32(this, data, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
NativeImageFormatProvider.prototype.q9p = function (data, props, $cont) {
return this.a9u(data, props, $cont);
};
NativeImageFormatProvider.prototype.z9t = function (file, props, $cont) {
var tmp = new $decodeCOROUTINE$33(this, file, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
NativeImageFormatProvider.prototype.r9p = function (file, props, $cont) {
var tmp = new $decodeCOROUTINE$34(this, file, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
NativeImageFormatProvider.prototype.s8f = function (bmp) {
var tmp$ret$3;
// Inline function 'kotlin.apply' call
var tmp0_apply = this.t8f(bmp.d72(), bmp.e72(), bmp.s7y_1);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.format.NativeImageFormatProvider.copy.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korim.bitmap.context2d' call
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
tmp0_apply.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx = tmp0_apply.b86(true);
try {
// Inline function 'com.soywiz.korim.format.NativeImageFormatProvider.copy.<anonymous>.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.vector.Context2d.drawImage' call
var tmp0_drawImage = bmp.d72();
var tmp1_drawImage = bmp.e72();
ctx.n8o(bmp, 0.0, 0.0, numberToDouble(tmp0_drawImage), numberToDouble(tmp1_drawImage));
tmp$ret$0 = Unit_getInstance();
}finally {
ctx.s1x();
}
}finally {
tmp$ret$1 = tmp0_apply.k7z(null);
break $l$block;
}
}
tmp$ret$2 = tmp0_apply;
tmp$ret$3 = tmp0_apply;
return tmp$ret$3;
};
NativeImageFormatProvider.$metadata$ = classMeta('NativeImageFormatProvider', [ImageFormatDecoder]);
function BaseNativeImageFormatProvider() {
NativeImageFormatProvider.call(this);
}
BaseNativeImageFormatProvider.prototype.w9p = function () {
return get_RegisteredImageFormats();
};
BaseNativeImageFormatProvider.prototype.m9s = function (data, props, $cont) {
return this.b9u(this.w9p().p9p(data, props), props);
};
BaseNativeImageFormatProvider.prototype.c9u = function (bmp) {
return BitmapNativeImage_init_$Create$(bmp);
};
BaseNativeImageFormatProvider.prototype.b9u = function (bmp, props) {
var bmp32 = bmp.w86();
var tmp = this.c9u(props.k9o_1 ? asumePremultiplied(bmp32) : props.s9o() ? bmp32.g89() : bmp32.h89());
return NativeImageResult_init_$Create$(tmp, 0, 0, 6, null);
};
BaseNativeImageFormatProvider.prototype.t8f = function (width, height, premultiplied) {
var tmp0_elvis_lhs = premultiplied;
return this.c9u(Bitmap32_init_$Create$(width, height, null, tmp0_elvis_lhs == null ? true : tmp0_elvis_lhs, 4, null));
};
BaseNativeImageFormatProvider.prototype.s8f = function (bmp) {
return this.c9u(bmp);
};
BaseNativeImageFormatProvider.$metadata$ = classMeta('BaseNativeImageFormatProvider', undefined, undefined, undefined, undefined, NativeImageFormatProvider.prototype);
function NativeImageResult_init_$Init$(image, originalWidth, originalHeight, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
originalWidth = image.d72();
if (!(($mask0 & 4) === 0))
originalHeight = image.e72();
NativeImageResult.call($this, image, originalWidth, originalHeight);
return $this;
}
function NativeImageResult_init_$Create$(image, originalWidth, originalHeight, $mask0, $marker) {
return NativeImageResult_init_$Init$(image, originalWidth, originalHeight, $mask0, $marker, Object.create(NativeImageResult.prototype));
}
function NativeImageResult(image, originalWidth, originalHeight) {
this.y9s_1 = image;
this.z9s_1 = originalWidth;
this.a9t_1 = originalHeight;
}
NativeImageResult.prototype.toString = function () {
return 'NativeImageResult(image=' + this.y9s_1 + ', originalWidth=' + this.z9s_1 + ', originalHeight=' + this.a9t_1 + ')';
};
NativeImageResult.prototype.hashCode = function () {
var result = hashCode(this.y9s_1);
result = imul(result, 31) + this.z9s_1 | 0;
result = imul(result, 31) + this.a9t_1 | 0;
return result;
};
NativeImageResult.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof NativeImageResult))
return false;
var tmp0_other_with_cast = other instanceof NativeImageResult ? other : THROW_CCE();
if (!equals(this.y9s_1, tmp0_other_with_cast.y9s_1))
return false;
if (!(this.z9s_1 === tmp0_other_with_cast.z9s_1))
return false;
if (!(this.a9t_1 === tmp0_other_with_cast.a9t_1))
return false;
return true;
};
NativeImageResult.$metadata$ = classMeta('NativeImageResult');
function BitmapNativeImage_init_$Init$(bitmap, $this) {
BitmapNativeImage.call($this, bitmap.w86());
return $this;
}
function BitmapNativeImage_init_$Create$(bitmap) {
return BitmapNativeImage_init_$Init$(bitmap, Object.create(BitmapNativeImage.prototype));
}
function BitmapNativeImage(bitmap) {
NativeImage.call(this, bitmap.d72(), bitmap.e72(), bitmap, bitmap.s7y_1);
this.r9u_1 = bitmap;
this.s9u_1 = this.r9u_1.r86_1;
}
BitmapNativeImage.prototype.t2 = function () {
return 'BitmapNativeImage';
};
BitmapNativeImage.prototype.b86 = function (antialiasing) {
return this.r9u_1.b86(antialiasing);
};
BitmapNativeImage.prototype.d86 = function () {
return this.r9u_1;
};
BitmapNativeImage.prototype.m7z = function (x, y, width, height, out, offset) {
return this.r9u_1.m7z(x, y, width, height, out, offset);
};
BitmapNativeImage.prototype.p7z = function (x, y, width, height, out, offset) {
return this.r9u_1.p7z(x, y, width, height, out, offset);
};
BitmapNativeImage.prototype.q7z = function (x, y, v) {
return this.r9u_1.q7z(x, y, v);
};
BitmapNativeImage.prototype.n7z = function (x, y) {
return this.r9u_1.n7z(x, y);
};
BitmapNativeImage.$metadata$ = classMeta('BitmapNativeImage', undefined, undefined, undefined, undefined, NativeImage.prototype);
var Colorspace_GRAYSCALE_instance;
var Colorspace_RGB_instance;
var Colorspace_INDEXED_instance;
var Colorspace_GRAYSCALE_ALPHA_instance;
var Colorspace_RGBA_instance;
function Companion_26() {
Companion_instance_26 = this;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy = values_5();
var capacity = coerceAtLeast(mapCapacity(tmp0_associateBy.length), 16);
var tmp$ret$1;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo = LinkedHashMap_init_$Create$_0(capacity);
var indexedObject = tmp0_associateBy;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.Companion.BY_ID.<anonymous>' call
tmp$ret$0 = element.v9u_1;
tmp0_associateByTo.a(tmp$ret$0, element);
}
tmp$ret$1 = tmp0_associateByTo;
tmp$ret$2 = tmp$ret$1;
tmp.x9u_1 = tmp$ret$2;
}
Companion_26.prototype.y9u = function () {
return this.x9u_1;
};
Companion_26.$metadata$ = objectMeta('Companion');
var Companion_instance_26;
function Companion_getInstance_39() {
Colorspace_initEntries();
if (Companion_instance_26 == null)
new Companion_26();
return Companion_instance_26;
}
function values_5() {
return [Colorspace_GRAYSCALE_getInstance(), Colorspace_RGB_getInstance(), Colorspace_INDEXED_getInstance(), Colorspace_GRAYSCALE_ALPHA_getInstance(), Colorspace_RGBA_getInstance()];
}
var Colorspace_entriesInitialized;
function Colorspace_initEntries() {
if (Colorspace_entriesInitialized)
return Unit_getInstance();
Colorspace_entriesInitialized = true;
Colorspace_GRAYSCALE_instance = new Colorspace('GRAYSCALE', 0, 0, 1);
Colorspace_RGB_instance = new Colorspace('RGB', 1, 2, 3);
Colorspace_INDEXED_instance = new Colorspace('INDEXED', 2, 3, 1);
Colorspace_GRAYSCALE_ALPHA_instance = new Colorspace('GRAYSCALE_ALPHA', 3, 4, 2);
Colorspace_RGBA_instance = new Colorspace('RGBA', 4, 6, 4);
Companion_getInstance_39();
}
function InterlacedPass(startingRow, startingCol, rowIncrement, colIncrement, blockHeight, blockWidth) {
this.z9u_1 = startingRow;
this.a9v_1 = startingCol;
this.b9v_1 = rowIncrement;
this.c9v_1 = colIncrement;
this.d9v_1 = blockHeight;
this.e9v_1 = blockWidth;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.math.log2' call
var tmp0_log2 = this.c9v_1;
tmp$ret$0 = log2(tmp0_log2);
tmp.f9v_1 = numberToInt(tmp$ret$0);
}
InterlacedPass.prototype.toString = function () {
return 'InterlacedPass(startingRow=' + this.z9u_1 + ', startingCol=' + this.a9v_1 + ', rowIncrement=' + this.b9v_1 + ', colIncrement=' + this.c9v_1 + ', blockHeight=' + this.d9v_1 + ', blockWidth=' + this.e9v_1 + ')';
};
InterlacedPass.prototype.hashCode = function () {
var result = this.z9u_1;
result = imul(result, 31) + this.a9v_1 | 0;
result = imul(result, 31) + this.b9v_1 | 0;
result = imul(result, 31) + this.c9v_1 | 0;
result = imul(result, 31) + this.d9v_1 | 0;
result = imul(result, 31) + this.e9v_1 | 0;
return result;
};
InterlacedPass.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof InterlacedPass))
return false;
var tmp0_other_with_cast = other instanceof InterlacedPass ? other : THROW_CCE();
if (!(this.z9u_1 === tmp0_other_with_cast.z9u_1))
return false;
if (!(this.a9v_1 === tmp0_other_with_cast.a9v_1))
return false;
if (!(this.b9v_1 === tmp0_other_with_cast.b9v_1))
return false;
if (!(this.c9v_1 === tmp0_other_with_cast.c9v_1))
return false;
if (!(this.d9v_1 === tmp0_other_with_cast.d9v_1))
return false;
if (!(this.e9v_1 === tmp0_other_with_cast.e9v_1))
return false;
return true;
};
InterlacedPass.$metadata$ = classMeta('InterlacedPass');
function Colorspace(name, ordinal, id, nchannels) {
Enum.call(this, name, ordinal);
this.v9u_1 = id;
this.w9u_1 = nchannels;
}
Colorspace.prototype.c1n = function () {
return this.v9u_1;
};
Colorspace.prototype.g9v = function () {
return this.w9u_1;
};
Colorspace.$metadata$ = classMeta('Colorspace', undefined, undefined, undefined, undefined, Enum.prototype);
function Header(width, height, bitsPerChannel, colorspace, compressionmethod, filtermethod, interlacemethod) {
this.h9v_1 = width;
this.i9v_1 = height;
this.j9v_1 = bitsPerChannel;
this.k9v_1 = colorspace;
this.l9v_1 = compressionmethod;
this.m9v_1 = filtermethod;
this.n9v_1 = interlacemethod;
var tmp = this;
var tmp0_subject = this.k9v_1;
var tmp0 = tmp0_subject.q2_1;
var tmp_0;
switch (tmp0) {
case 0:
tmp_0 = 1;
break;
case 2:
tmp_0 = 1;
break;
case 3:
tmp_0 = 2;
break;
case 1:
tmp_0 = 3;
break;
case 4:
tmp_0 = 4;
break;
default:
noWhenBranchMatchedException();
break;
}
tmp.o9v_1 = tmp_0;
this.p9v_1 = imul(imul(this.h9v_1, this.o9v_1), this.j9v_1) / 8 | 0;
}
Header.prototype.d72 = function () {
return this.h9v_1;
};
Header.prototype.e72 = function () {
return this.i9v_1;
};
Header.prototype.q9v = function () {
return this.j9v_1;
};
Header.prototype.r9v = function () {
return this.k9v_1;
};
Header.$metadata$ = classMeta('Header');
function readCommon($this, s, readHeader, info) {
var magic = readS32BE_0(s);
if (!(magic === -1991225785))
throw IllegalArgumentException_init_$Create$('Invalid PNG file magic: ' + get_hex(magic) + '!=' + get_hex(-1991225785));
readS32BE_0(s);
var pheader = {_v: null};
var pngdata = ByteArrayBuilder_init_$Create$(0, 1, null);
var rgbPalette = UByteArrayInt(768);
var tmp = 0;
var tmp_0 = 256;
var tmp_1 = new Int8Array(tmp_0);
while (tmp < tmp_0) {
var tmp_2 = tmp;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.format.PNG.readCommon.<anonymous>' call
tmp$ret$0 = -1;
tmp_1[tmp_2] = tmp$ret$0;
tmp = tmp + 1 | 0;
}
var aPalette = _UByteArrayInt___init__impl__xif7bu(tmp_1);
var paletteCount = {_v: 0};
while (!get_eof(s) ? readCommon$readChunk(s, pheader, info, paletteCount, rgbPalette, aPalette, readHeader, pngdata) : false)
;
if (readHeader)
return pheader._v;
var tmp0_elvis_lhs = pheader._v;
var tmp_3;
if (tmp0_elvis_lhs == null) {
throw IllegalArgumentException_init_$Create$('PNG without header!');
} else {
tmp_3 = tmp0_elvis_lhs;
}
var header = tmp_3;
var width = header.h9v_1;
var height = header.i9v_1;
var outputSizeHint = imul(imul(1 + width | 0, height), header.o9v_1);
var tmp_4 = pngdata.g4w();
var tmp_5 = Companion_getInstance_6();
var databb = uncompress$default(tmp_4, tmp_5, 0, 2, null);
var databbp = 0;
var context = new DecodingContext(header);
var bpp = context.s9v_1.o9v_1;
var row32 = context.v9v_1;
var tmp_6;
if (header.o9v_1 === 1) {
var tmp$ret$3;
// Inline function 'kotlin.collections.map' call
var tmp0_map = until(0, paletteCount._v);
var tmp$ret$2;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var inductionVariable = tmp0_map.r1_1;
var last = tmp0_map.s1_1;
if (inductionVariable <= last)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.format.PNG.readCommon.<anonymous>' call
tmp$ret$1 = _RGBA___get_value__impl__hhco8v(Companion_getInstance_21().u8i(UByteArrayInt__get_impl_px6q8a(rgbPalette, imul(item, 3) + 0 | 0), UByteArrayInt__get_impl_px6q8a(rgbPalette, imul(item, 3) + 1 | 0), UByteArrayInt__get_impl_px6q8a(rgbPalette, imul(item, 3) + 2 | 0), UByteArrayInt__get_impl_px6q8a(aPalette, item)));
tmp0_mapTo.c(tmp$ret$1);
}
while (!(item === last));
tmp$ret$2 = tmp0_mapTo;
tmp$ret$3 = tmp$ret$2;
tmp_6 = Bitmap8_init_$Create$(width, height, null, _RgbaArray___init__impl__oib4y4(toIntArray_0(tmp$ret$3)), 4, null);
} else {
tmp_6 = Bitmap32_init_$Create$(width, height, null, false, 4, null);
}
var bmp = tmp_6;
var bmp8 = bmp instanceof Bitmap8 ? bmp : null;
var bmp32 = bmp instanceof Bitmap32 ? bmp : null;
var tmp1_subject = header.n9v_1;
var passes = tmp1_subject === 1 ? $this.z9v_1 : $this.a9w_1;
var tmp2_iterator = passes.j();
while (tmp2_iterator.k()) {
var pass = tmp2_iterator.l();
var progression = step(until(pass.z9u_1, height), pass.b9v_1);
var inductionVariable_0 = progression.r1_1;
var last_0 = progression.s1_1;
var step_0 = progression.t1_1;
if ((step_0 > 0 ? inductionVariable_0 <= last_0 : false) ? true : step_0 < 0 ? last_0 <= inductionVariable_0 : false)
do {
var row = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + step_0 | 0;
var col = pass.a9v_1;
var colIncrement = pass.c9v_1;
var pixelsInThisRow = width >>> pass.f9v_1 | 0;
var bytesInThisRow = imul(imul(pixelsInThisRow, header.o9v_1), header.j9v_1) / 8 | 0;
var tmp4 = databbp;
databbp = tmp4 + 1 | 0;
var filter = databb[tmp4] & 255;
var currentRow = context.u9v_1;
var lastRow = context.t9v_1;
arraycopy_0(databb, databbp, asByteArray(currentRow), 0, bytesInThisRow);
databbp = databbp + bytesInThisRow | 0;
if (!(bmp8 == null)) {
$this.c9w(filter, lastRow, currentRow, header.o9v_1, 0, 16, null);
var tmp5_subject = header.j9v_1;
switch (tmp5_subject) {
case 1:
var inductionVariable_1 = 0;
if (inductionVariable_1 < width)
do {
var n = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var tmp$ret$4;
// Inline function 'com.soywiz.korim.bitmap.BitmapIndexed.set' call
var tmp1_set = bmp;
var tmp2_set = col + n | 0;
var tmp3_set = extract(UByteArrayInt__get_impl_px6q8a(currentRow, n / 8 | 0), 7 - imul(n % 8 | 0, 1) | 0, 1);
tmp1_set.k85(tmp2_set, row, tmp3_set);
tmp$ret$4 = Unit_getInstance();
}
while (inductionVariable_1 < width);
break;
case 2:
var inductionVariable_2 = 0;
if (inductionVariable_2 < width)
do {
var n_0 = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
var tmp$ret$5;
// Inline function 'com.soywiz.korim.bitmap.BitmapIndexed.set' call
var tmp4_set = bmp;
var tmp5_set = col + n_0 | 0;
var tmp6_set = extract(UByteArrayInt__get_impl_px6q8a(currentRow, n_0 / 4 | 0), 6 - imul(n_0 % 4 | 0, 2) | 0, 2);
tmp4_set.k85(tmp5_set, row, tmp6_set);
tmp$ret$5 = Unit_getInstance();
}
while (inductionVariable_2 < width);
break;
case 4:
var inductionVariable_3 = 0;
if (inductionVariable_3 < width)
do {
var n_1 = inductionVariable_3;
inductionVariable_3 = inductionVariable_3 + 1 | 0;
var tmp$ret$6;
// Inline function 'com.soywiz.korim.bitmap.BitmapIndexed.set' call
var tmp7_set = bmp;
var tmp8_set = col + n_1 | 0;
var tmp9_set = extract(UByteArrayInt__get_impl_px6q8a(currentRow, n_1 / 2 | 0), 4 - imul(n_1 % 2 | 0, 4) | 0, 4);
tmp7_set.k85(tmp8_set, row, tmp9_set);
tmp$ret$6 = Unit_getInstance();
}
while (inductionVariable_3 < width);
break;
case 8:
bmp8.i8b(col, row, asByteArray(currentRow), width, colIncrement);
;
break;
default:
// Inline function 'kotlin.error' call
var tmp10_error = 'Unsupported header.bitsPerChannel=' + header.j9v_1;
throw IllegalStateException_init_$Create$(toString(tmp10_error));
}
} else if (!(bmp32 == null)) {
var tmp9_subject = header.j9v_1;
if (tmp9_subject === 8) {
$this.b9w(filter, lastRow, currentRow, bpp, bytesInThisRow);
var tmp10_subject = bpp;
switch (tmp10_subject) {
case 3:
var tmp_7 = Companion_getInstance_19();
var tmp_8 = asByteArray(currentRow);
decode$default(tmp_7, tmp_8, 0, row32, 0, pixelsInThisRow, false, 32, null);
;
break;
case 4:
var tmp_9 = Companion_getInstance_21();
var tmp_10 = asByteArray(currentRow);
decode$default(tmp_9, tmp_10, 0, row32, 0, pixelsInThisRow, false, 32, null);
;
break;
default:
// Inline function 'kotlin.TODO' call
var tmp11_TODO = 'Bytes: ' + bpp;
throw new NotImplementedError('An operation is not implemented: ' + tmp11_TODO);
}
bmp32.l89(col, row, row32, width, colIncrement);
} else {
// Inline function 'kotlin.error' call
var tmp12_error = 'Unsupported header.bitsPerChannel=' + header.j9v_1;
throw IllegalStateException_init_$Create$(toString(tmp12_error));
}
}
context.d9w();
}
while (!(row === last_0));
}
return bmp;
}
function readCommon$default($this, s, readHeader, info, $mask0, $handler) {
if (!(($mask0 & 8) === 0))
info = new ImageInfo();
return readCommon($this, s, readHeader, info);
}
function DecodingContext(header) {
this.s9v_1 = header;
this.t9v_1 = UByteArrayInt(this.s9v_1.p9v_1);
this.u9v_1 = UByteArrayInt(this.s9v_1.p9v_1);
this.v9v_1 = Companion_getInstance_22().m89(this.s9v_1.h9v_1);
}
DecodingContext.prototype.d9w = function () {
var temp = this.u9v_1;
this.u9v_1 = this.t9v_1;
this.t9v_1 = temp;
};
DecodingContext.$metadata$ = classMeta('DecodingContext');
function readCommon$readChunk(_this__u8e3s4, pheader, $info, paletteCount, rgbPalette, aPalette, $readHeader, pngdata) {
if (get_eof(_this__u8e3s4))
return false;
var length = readS32BE_0(_this__u8e3s4);
var type = readStringz$default_0(_this__u8e3s4, 4, null, 2, null);
var data = readStream(_this__u8e3s4, toLong(length));
var crc = readS32BE_0(_this__u8e3s4);
var tmp0_subject = type;
switch (tmp0_subject) {
case 'IHDR':
var tmp$ret$2;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.format.PNG.readCommon.readChunk.<anonymous>' call
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp = readS32BE_0(data);
var tmp_0 = readS32BE_0(data);
var tmp_1 = readU8(data);
var tmp0_elvis_lhs = Companion_getInstance_39().x9u_1.q(readU8(data));
var tmp0_also = new Header(tmp, tmp_0, tmp_1, tmp0_elvis_lhs == null ? Colorspace_RGBA_getInstance() : tmp0_elvis_lhs, readU8(data), readU8(data), readU8(data));
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.format.PNG.readCommon.readChunk.<anonymous>.<anonymous>' call
$info.k9p_1 = tmp0_also.h9v_1;
$info.l9p_1 = tmp0_also.i9v_1;
$info.m9p_1 = imul(tmp0_also.j9v_1, tmp0_also.k9v_1.w9u_1);
tmp$ret$0 = tmp0_also;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
pheader._v = tmp$ret$2;
;
break;
case 'PLTE':
var tmp$ret$3;
// Inline function 'kotlin.math.max' call
var tmp0_max = paletteCount._v;
var tmp1_max = data.ze().d2() / 3 | 0;
tmp$ret$3 = Math.max(tmp0_max, tmp1_max);
paletteCount._v = tmp$ret$3;
data.a4v(asByteArray(rgbPalette), 0, data.ze().d2());
;
break;
case 'tRNS':
var tmp$ret$4;
// Inline function 'kotlin.math.max' call
var tmp2_max = paletteCount._v;
var tmp3_max = data.ze().d2();
tmp$ret$4 = Math.max(tmp2_max, tmp3_max);
paletteCount._v = tmp$ret$4;
data.a4v(asByteArray(aPalette), 0, data.ze().d2());
;
break;
case 'IDAT':
if ($readHeader) {
return false;
}
var tmp_2 = readAll_0(data);
pngdata.d4w(tmp_2, 0, 0, 6, null);
;
break;
case 'eXIf':
runBlockingNoSuspensions(PNG$readCommon$readChunk$slambda_0(data, $info, null));
;
break;
case 'IEND':
return false;
}
return true;
}
function PNG$readCommon$readChunk$slambda($data, $info, resultContinuation) {
this.m9w_1 = $data;
this.n9w_1 = $info;
CoroutineImpl.call(this, resultContinuation);
}
PNG$readCommon$readChunk$slambda.prototype.o9w = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
PNG$readCommon$readChunk$slambda.prototype.to = function ($cont) {
return this.o9w($cont);
};
PNG$readCommon$readChunk$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 = EXIF_getInstance();
var tmp_1 = readAll_0(this.m9w_1);
var tmp_2 = openAsync$default(tmp_1, null, 1, null);
suspendResult = tmp_0.t9m(tmp_2, this.n9w_1, false, this, 4, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return suspendResult;
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);
};
PNG$readCommon$readChunk$slambda.prototype.k53 = function (completion) {
var i = new PNG$readCommon$readChunk$slambda(this.m9w_1, this.n9w_1, completion);
return i;
};
PNG$readCommon$readChunk$slambda.$metadata$ = classMeta('PNG$readCommon$readChunk$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function PNG$readCommon$readChunk$slambda_0($data, $info, resultContinuation) {
var i = new PNG$readCommon$readChunk$slambda($data, $info, resultContinuation);
var l = function ($cont) {
return i.o9w($cont);
};
l.$arity = 0;
return l;
}
function Colorspace_GRAYSCALE_getInstance() {
Colorspace_initEntries();
return Colorspace_GRAYSCALE_instance;
}
function Colorspace_RGB_getInstance() {
Colorspace_initEntries();
return Colorspace_RGB_instance;
}
function Colorspace_INDEXED_getInstance() {
Colorspace_initEntries();
return Colorspace_INDEXED_instance;
}
function Colorspace_GRAYSCALE_ALPHA_getInstance() {
Colorspace_initEntries();
return Colorspace_GRAYSCALE_ALPHA_instance;
}
function Colorspace_RGBA_getInstance() {
Colorspace_initEntries();
return Colorspace_RGBA_instance;
}
function PNG() {
PNG_instance = this;
ImageFormat.call(this, ['png']);
this.x9v_1 = -1991225785;
this.y9v_1 = 218765834;
this.z9v_1 = listOf([new InterlacedPass(0, 0, 8, 8, 8, 8), new InterlacedPass(0, 4, 8, 8, 8, 4), new InterlacedPass(4, 0, 8, 4, 4, 4), new InterlacedPass(0, 2, 4, 4, 4, 2), new InterlacedPass(2, 0, 4, 2, 2, 2), new InterlacedPass(0, 1, 2, 2, 2, 1), new InterlacedPass(1, 0, 2, 1, 1, 1)]);
this.a9w_1 = listOf_0(new InterlacedPass(0, 0, 1, 1, 1, 1));
}
PNG.prototype.i9p = function (s, props) {
var tmp;
try {
var info = new ImageInfo();
var tmp_0 = readCommon(this, s, true, info);
var header = tmp_0 instanceof Header ? tmp_0 : THROW_CCE();
tmp = info;
} catch ($p) {
var tmp_1;
if ($p instanceof Error) {
tmp_1 = null;
} else {
throw $p;
}
tmp = tmp_1;
}
return tmp;
};
PNG.prototype.h9p = function (s, props) {
var tmp = Companion_getInstance_34();
var tmp_0 = readCommon$default(this, s, false, null, 8, null);
return tmp.z8f(tmp_0 instanceof Bitmap ? tmp_0 : THROW_CCE());
};
PNG.prototype.p9w = function (a, b, c) {
var p = (a + b | 0) - c | 0;
var pa = abs(p - a | 0);
var pb = abs(p - b | 0);
var pc = abs(p - c | 0);
return (pa <= pb ? pa <= pc : false) ? a : pb <= pc ? b : c;
};
PNG.prototype.b9w = function (filter, p, c, bpp, size) {
var tmp0_subject = filter;
switch (tmp0_subject) {
case 0:
;
break;
case 1:
var inductionVariable = bpp;
if (inductionVariable < size)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp2_array = c;
var tmp3_index0 = n;
UByteArrayInt__set_impl_gn4532(tmp2_array, tmp3_index0, UByteArrayInt__get_impl_px6q8a(tmp2_array, tmp3_index0) + UByteArrayInt__get_impl_px6q8a(c, n - bpp | 0) | 0);
}
while (inductionVariable < size);
break;
case 2:
var inductionVariable_0 = 0;
if (inductionVariable_0 < size)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp5_array = c;
var tmp6_index0 = n_0;
UByteArrayInt__set_impl_gn4532(tmp5_array, tmp6_index0, UByteArrayInt__get_impl_px6q8a(tmp5_array, tmp6_index0) + UByteArrayInt__get_impl_px6q8a(p, n_0) | 0);
}
while (inductionVariable_0 < size);
break;
case 3:
var inductionVariable_1 = 0;
if (inductionVariable_1 < bpp)
do {
var n_1 = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var tmp8_array = c;
var tmp9_index0 = n_1;
UByteArrayInt__set_impl_gn4532(tmp8_array, tmp9_index0, UByteArrayInt__get_impl_px6q8a(tmp8_array, tmp9_index0) + (UByteArrayInt__get_impl_px6q8a(p, n_1) / 2 | 0) | 0);
}
while (inductionVariable_1 < bpp);
var inductionVariable_2 = bpp;
if (inductionVariable_2 < size)
do {
var n_2 = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
var tmp11_array = c;
var tmp12_index0 = n_2;
UByteArrayInt__set_impl_gn4532(tmp11_array, tmp12_index0, UByteArrayInt__get_impl_px6q8a(tmp11_array, tmp12_index0) + ((UByteArrayInt__get_impl_px6q8a(c, n_2 - bpp | 0) + UByteArrayInt__get_impl_px6q8a(p, n_2) | 0) / 2 | 0) | 0);
}
while (inductionVariable_2 < size);
break;
case 4:
var inductionVariable_3 = 0;
if (inductionVariable_3 < bpp)
do {
var n_3 = inductionVariable_3;
inductionVariable_3 = inductionVariable_3 + 1 | 0;
var tmp14_array = c;
var tmp15_index0 = n_3;
UByteArrayInt__set_impl_gn4532(tmp14_array, tmp15_index0, UByteArrayInt__get_impl_px6q8a(tmp14_array, tmp15_index0) + UByteArrayInt__get_impl_px6q8a(p, n_3) | 0);
}
while (inductionVariable_3 < bpp);
var inductionVariable_4 = bpp;
if (inductionVariable_4 < size)
do {
var n_4 = inductionVariable_4;
inductionVariable_4 = inductionVariable_4 + 1 | 0;
var tmp17_array = c;
var tmp18_index0 = n_4;
UByteArrayInt__set_impl_gn4532(tmp17_array, tmp18_index0, UByteArrayInt__get_impl_px6q8a(tmp17_array, tmp18_index0) + this.p9w(UByteArrayInt__get_impl_px6q8a(c, n_4 - bpp | 0), UByteArrayInt__get_impl_px6q8a(p, n_4), UByteArrayInt__get_impl_px6q8a(p, n_4 - bpp | 0)) | 0);
}
while (inductionVariable_4 < size);
break;
default:
// Inline function 'kotlin.TODO' call
var tmp0_TODO = 'Filter: ' + filter;
throw new NotImplementedError('An operation is not implemented: ' + tmp0_TODO);
}
};
PNG.prototype.c9w = function (filter, p, c, bpp, size, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
size = _UByteArrayInt___get_size__impl__bcjnte(c);
return this.b9w(filter, p, c, bpp, size);
};
PNG.$metadata$ = objectMeta('PNG', undefined, undefined, undefined, undefined, ImageFormat.prototype);
var PNG_instance;
function PNG_getInstance() {
if (PNG_instance == null)
new PNG();
return PNG_instance;
}
function get_RegisteredImageFormats() {
init_properties_RegisteredImageFormats_kt_cii0rb();
return RegisteredImageFormats;
}
var RegisteredImageFormats;
var properties_initialized_RegisteredImageFormats_kt_ribwxx;
function init_properties_RegisteredImageFormats_kt_cii0rb() {
if (properties_initialized_RegisteredImageFormats_kt_ribwxx) {
} else {
properties_initialized_RegisteredImageFormats_kt_ribwxx = true;
RegisteredImageFormats = new ImageFormatsMutable();
}
}
function sumPacked4MulR(a, b, mul) {
var dstRB = imul(b & 16711935, mul) >>> 8 | 0;
var dstGA = imul((b >>> 8 | 0) & 16711935, mul) >>> 8 | 0;
var r = ((a >>> 0 | 0) & 255) + ((dstRB >>> 0 | 0) & 255) | 0;
var g = ((a >>> 8 | 0) & 255) + ((dstGA >>> 0 | 0) & 255) | 0;
var b_0 = ((a >>> 16 | 0) & 255) + ((dstRB >>> 16 | 0) & 255) | 0;
var a_0 = ((a >>> 24 | 0) & 255) + ((dstGA >>> 16 | 0) & 255) | 0;
return packIntClamped(r, g, b_0, a_0);
}
function packIntClamped(r, g, b, a) {
return clampUByte(r) | clampUByte(g) << 8 | clampUByte(b) << 16 | clampUByte(a) << 24;
}
function f2i(v) {
return numberToInt(clamp01(v) * 255);
}
function packIntUnchecked(r, g, b, a) {
return (r & 255) << 0 | (g & 255) << 8 | (b & 255) << 16 | (a & 255) << 24;
}
function ColorFiller() {
BaseFiller.call(this);
this.q9w_1 = _RGBA___get_premultiplied__impl__3bulqc(Colors_getInstance().u7z_1);
}
ColorFiller.prototype.r9w = function (fill, state) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.ColorFiller.set.<anonymous>' call
this.q9w_1 = _RGBA___get_premultiplied__impl__3bulqc(_RGBA___get_color__impl__8x3sb3(fill));
tmp$ret$0 = this;
return tmp$ret$0;
};
ColorFiller.prototype.s9w = function (data, offset, x0, x1, y) {
RgbaPremultipliedArray__fill_impl_sem38t(data, this.q9w_1, offset + x0 | 0, (offset + x1 | 0) + 1 | 0);
};
ColorFiller.$metadata$ = classMeta('ColorFiller', undefined, undefined, undefined, undefined, BaseFiller.prototype);
function Companion_27() {
Companion_instance_27 = this;
this.t9w_1 = 256;
}
Companion_27.$metadata$ = objectMeta('Companion');
var Companion_instance_27;
function Companion_getInstance_40() {
if (Companion_instance_27 == null)
new Companion_27();
return Companion_instance_27;
}
function _get_fill__d6ivc8($this) {
var tmp = $this.v9w_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('fill');
}
}
function color($this, ratio) {
var tmp = clamp01_0(ratio);
Companion_getInstance_40();
return RgbaPremultipliedArray__get_impl_1u69ta($this.u9w_1, numberToInt(tmp * (256 - 1 | 0)));
}
function GradientFiller() {
Companion_getInstance_40();
BaseFiller.call(this);
var tmp = this;
var tmp_0 = Companion_getInstance_23();
Companion_getInstance_40();
tmp.u9w_1 = tmp_0.o8l(256);
}
GradientFiller.prototype.w9w = function (fill, state) {
fill.x9w(this.u9w_1);
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.GradientFiller.set.<anonymous>' call
tmp0_apply.o74();
tmp0_apply.x76(fill.w9e_1);
tmp0_apply.x76(state.o8n_1);
tmp$ret$0 = tmp0_apply;
var tmp_0 = tmp$ret$0;
tmp.v9w_1 = fill.y9w(null, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, null, null, null, tmp_0, null, null, null, 15359, null);
return this;
};
GradientFiller.prototype.z9w = function (x, y) {
return _get_fill__d6ivc8(this).a9x(x, y);
};
GradientFiller.prototype.b9x = function (x, y) {
return color(this, this.z9w(x, y));
};
GradientFiller.prototype.s9w = function (data, offset, x0, x1, y) {
var inductionVariable = x0;
if (inductionVariable <= x1)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
RgbaPremultipliedArray__set_impl_7fwbby(data, offset + n | 0, this.b9x(n, y));
}
while (!(n === x1));
};
GradientFiller.$metadata$ = classMeta('GradientFiller', undefined, undefined, undefined, undefined, BaseFiller.prototype);
function BitmapFiller() {
BaseFiller.call(this);
this.c9x_1 = CycleMethod_NO_CYCLE_getInstance();
this.d9x_1 = CycleMethod_NO_CYCLE_getInstance();
var tmp = this;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
tmp.e9x_1 = tmp$ret$0.c89_1;
var tmp_0 = this;
tmp_0.f9x_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.g9x_1 = true;
var tmp_1 = this;
tmp_1.h9x_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
BitmapFiller.prototype.i9x = function (fill, state) {
var tmp$ret$1;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.BitmapFiller.set.<anonymous>' call
this.c9x_1 = fill.l9x_1;
this.d9x_1 = fill.m9x_1;
this.e9x_1 = fill.p9x_1;
this.f9x_1 = fill.k9x_1;
this.g9x_1 = fill.n9x_1;
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = this.h9x_1;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.BitmapFiller.set.<anonymous>.<anonymous>' call
tmp0_apply.o74();
tmp0_apply.q76(state.o8n_1);
tmp0_apply.q76(fill.k9x_1);
tmp0_apply.w76(null, 1, null);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = this;
return tmp$ret$1;
};
BitmapFiller.prototype.q9x = function (x, y) {
return this.e9x_1.m85(x, y);
};
BitmapFiller.prototype.r9x = function (x, y) {
return this.e9x_1.g88(numberToInt(x), numberToInt(y));
};
BitmapFiller.prototype.s9w = function (data, offset, x0, x1, y) {
var mat = this.h9x_1;
var texWidth = this.e9x_1.d72();
var texHeight = this.e9x_1.e72();
var iTexWidth = 1.0 / texWidth;
var iTexHeight = 1.0 / texHeight;
var yFloat = y;
var cycleX = this.c9x_1;
var cycleY = this.d9x_1;
var inductionVariable = x0;
if (inductionVariable <= x1)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tx = cycleX.u9x(mat.m77(n, yFloat) * iTexWidth) * texWidth;
var ty = cycleY.u9x(mat.n77(n, yFloat) * iTexHeight) * texHeight;
var color = this.g9x_1 ? this.q9x(tx, ty) : this.r9x(tx, ty);
RgbaPremultipliedArray__set_impl_7fwbby(data, offset + n | 0, _RGBA___get_premultiplied__impl__3bulqc(color));
}
while (!(n === x1));
};
BitmapFiller.$metadata$ = classMeta('BitmapFiller', undefined, undefined, undefined, undefined, BaseFiller.prototype);
function BaseFiller() {
}
BaseFiller.$metadata$ = classMeta('BaseFiller');
function NoneFiller() {
NoneFiller_instance = this;
BaseFiller.call(this);
}
NoneFiller.prototype.s9w = function (data, offset, x0, x1, y) {
return Unit_getInstance();
};
NoneFiller.$metadata$ = objectMeta('NoneFiller', undefined, undefined, undefined, undefined, BaseFiller.prototype);
var NoneFiller_instance;
function NoneFiller_getInstance() {
if (NoneFiller_instance == null)
new NoneFiller();
return NoneFiller_instance;
}
function Paint() {
}
Paint.$metadata$ = interfaceMeta('Paint');
function colorInt(_this__u8e3s4, $this, premultiplied) {
return premultiplied ? _RGBAPremultiplied___get_value__impl__bqfhud(_RGBA___get_premultiplied__impl__3bulqc(_this__u8e3s4)) : _RGBA___get_value__impl__hhco8v(_this__u8e3s4);
}
function _fillColors($this, out, stops, colors, premultiplied) {
var numberOfStops = stops.i();
var NCOLORS = out.length;
var tmp0_subject = numberOfStops;
switch (tmp0_subject) {
case 0:
case 1:
var color = numberOfStops === 0 ? Colors_getInstance().u81_1 : _RGBA___init__impl__lqpay5(colors.u4o());
var pcolor = colorInt(color, $this, premultiplied);
var inductionVariable = 0;
if (inductionVariable < NCOLORS)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
out[n] = pcolor;
}
while (inductionVariable < NCOLORS);
break;
default:
var inductionVariable_0 = 0;
var last = _fillColors$stopN(stops, NCOLORS, 0);
if (inductionVariable_0 < last)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
out[n_0] = colorInt(_RGBA___init__impl__lqpay5(colors.u4o()), $this, premultiplied);
}
while (inductionVariable_0 < last);
var inductionVariable_1 = 0;
var last_0 = numberOfStops - 1 | 0;
if (inductionVariable_1 < last_0)
do {
var n_1 = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var stop0 = _fillColors$stopN(stops, NCOLORS, n_1 + 0 | 0);
var stop1 = _fillColors$stopN(stops, NCOLORS, n_1 + 1 | 0);
var color0 = _RGBA___init__impl__lqpay5(colors.t4n(n_1 + 0 | 0));
var color1 = _RGBA___init__impl__lqpay5(colors.t4n(n_1 + 1 | 0));
var inductionVariable_2 = stop0;
if (inductionVariable_2 < stop1)
do {
var s = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
var ratio = (s - stop0 | 0) / (stop1 - stop0 | 0);
out[s] = colorInt(Companion_getInstance_21().w8k(color0, color1, ratio), $this, premultiplied);
}
while (inductionVariable_2 < stop1);
}
while (inductionVariable_1 < last_0);
var inductionVariable_3 = _fillColors$stopN(stops, NCOLORS, numberOfStops - 1 | 0);
if (inductionVariable_3 < NCOLORS)
do {
var n_2 = inductionVariable_3;
inductionVariable_3 = inductionVariable_3 + 1 | 0;
out[n_2] = colorInt(_RGBA___init__impl__lqpay5(colors.v4o()), $this, premultiplied);
}
while (inductionVariable_3 < NCOLORS);
break;
}
}
function _fillColors$stopN($stops, NCOLORS, n) {
return numberToInt($stops.m(n) * NCOLORS);
}
function GradientPaint_init_$Init$(kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle, $mask0, $marker, $this) {
if (!(($mask0 & 128) === 0)) {
stops = DoubleArrayList_init_$Create$(0, 1, null);
}
if (!(($mask0 & 256) === 0)) {
colors = IntArrayList_init_$Create$(0, 1, null);
}
if (!(($mask0 & 512) === 0))
cycle = CycleMethod_NO_CYCLE_getInstance();
if (!(($mask0 & 1024) === 0)) {
transform = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
if (!(($mask0 & 2048) === 0))
interpolationMethod = GradientInterpolationMethod_NORMAL_getInstance();
if (!(($mask0 & 4096) === 0))
units = GradientUnits_OBJECT_BOUNDING_BOX_getInstance();
if (!(($mask0 & 8192) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.korma.geom.Companion.ZERO' call
var tmp0__get_ZERO__8316ll = Companion_getInstance_8();
tmp$ret$0 = tmp0__get_ZERO__8316ll.f70(0.0);
tmp$ret$0_0 = Unit_getInstance();
startAngle = tmp$ret$0;
}
GradientPaint.call($this, kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle);
return $this;
}
function GradientPaint_init_$Create$(kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle, $mask0, $marker) {
return GradientPaint_init_$Init$(kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle, $mask0, $marker, Object.create(GradientPaint.prototype));
}
function Companion_28() {
Companion_instance_28 = this;
}
Companion_28.$metadata$ = objectMeta('Companion');
var Companion_instance_28;
function Companion_getInstance_41() {
if (Companion_instance_28 == null)
new Companion_28();
return Companion_instance_28;
}
function colorsToString($this, colors) {
var tmp = new RgbaArray(colors);
return '[' + joinToString$default(tmp, ', ', null, null, 0, null, GradientPaint$colorsToString$lambda, 30, null) + ']';
}
function colorsToString_0($this, colors) {
return colorsToString($this, _RgbaArray___init__impl__oib4y4(colors.x4o()));
}
function GradientPaint$colorsToString$lambda(it) {
return _RGBA___get_hexString__impl__kocngm(it.n8k_1);
}
function GradientPaint(kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle) {
Companion_getInstance_41();
this.m9e_1 = kind;
this.n9e_1 = x0;
this.o9e_1 = y0;
this.p9e_1 = r0;
this.q9e_1 = x1;
this.r9e_1 = y1;
this.s9e_1 = r1;
this.t9e_1 = stops;
this.u9e_1 = colors;
this.v9e_1 = cycle;
this.w9e_1 = transform;
this.x9e_1 = interpolationMethod;
this.y9e_1 = units;
this.z9e_1 = startAngle;
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.apply' call
var tmp0_apply = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.GradientPaint.untransformedGradientMatrix.<anonymous>' call
tmp0_apply.m76(-this.n9e_1, -this.o9e_1);
var scale = 1.0 / clamp_0(Companion_getInstance_4().i7a(this.n9e_1, this.o9e_1, this.q9e_1, this.r9e_1), 1.0, 16000.0);
tmp0_apply.h76(scale, scale);
var tmp$ret$1;
// Inline function 'com.soywiz.korma.geom.Companion.between' call
var tmp0_between = Companion_getInstance_8();
var tmp1_between = this.n9e_1;
var tmp2_between = this.o9e_1;
var tmp3_between = this.q9e_1;
var tmp4_between = this.r9e_1;
tmp$ret$1 = Angle_between(tmp1_between, tmp2_between, tmp3_between, tmp4_between);
tmp0_apply.g76(unaryMinus(tmp$ret$1));
tmp$ret$2 = tmp0_apply;
tmp.a9f_1 = tmp$ret$2;
var tmp_0 = this;
tmp_0.b9f_1 = this.w9e_1.z76(null, 1, null);
var tmp_1 = this;
var tmp$ret$3;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.GradientPaint.gradientMatrix.<anonymous>' call
tmp0_apply_0.o74();
tmp0_apply_0.q76(this.a9f_1);
tmp0_apply_0.q76(this.b9f_1);
tmp$ret$3 = tmp0_apply_0;
tmp_1.c9f_1 = tmp$ret$3;
this.d9f_1 = 2 * this.p9e_1 * this.s9e_1;
this.e9f_1 = this.v9x(this.p9e_1);
this.f9f_1 = this.v9x(this.s9e_1);
this.g9f_1 = this.o9e_1 - this.r9e_1;
this.h9f_1 = this.p9e_1 - this.s9e_1;
this.i9f_1 = this.n9e_1 - this.q9e_1;
this.j9f_1 = 1.0 / (this.v9x(this.p9e_1 - this.s9e_1) - this.v9x(this.n9e_1 - this.q9e_1) - this.v9x(this.o9e_1 - this.r9e_1));
}
GradientPaint.prototype.pr = function () {
return this.m9e_1;
};
GradientPaint.prototype.i73 = function () {
return this.n9e_1;
};
GradientPaint.prototype.k73 = function () {
return this.o9e_1;
};
GradientPaint.prototype.w9x = function () {
return this.p9e_1;
};
GradientPaint.prototype.m73 = function () {
return this.q9e_1;
};
GradientPaint.prototype.o73 = function () {
return this.r9e_1;
};
GradientPaint.prototype.x9x = function () {
return this.s9e_1;
};
GradientPaint.prototype.y9x = function () {
return this.t9e_1;
};
GradientPaint.prototype.z9x = function () {
return this.u9e_1;
};
GradientPaint.prototype.a9y = function () {
return this.v9e_1;
};
GradientPaint.prototype.p8w = function () {
return this.w9e_1;
};
GradientPaint.prototype.b9y = function () {
return this.x9e_1;
};
GradientPaint.prototype.c9y = function () {
return this.y9e_1;
};
GradientPaint.prototype.x9w = function (out) {
return _fillColors(Companion_getInstance_41(), _RgbaPremultipliedArray___get_ints__impl__i1gpd7(out), this.t9e_1, this.u9e_1, true);
};
GradientPaint.prototype.k9f = function (stop, color) {
return this.d9y(stop, color);
};
GradientPaint.prototype.d9y = function (stop, color) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.GradientPaint.add.<anonymous>' call
var tmp0_this = this;
tmp0_this.t9e_1.q4n(stop);
var tmp1_this = this;
tmp1_this.u9e_1.r1t(_RGBA___get_value__impl__hhco8v(color));
return this;
tmp$ret$0 = this;
return tmp$ret$0;
};
GradientPaint.prototype.e9y = function () {
return this.a9f_1;
};
GradientPaint.prototype.f9y = function () {
return this.b9f_1;
};
GradientPaint.prototype.a9x = function (px, py) {
var tmp0_subject = this.m9e_1;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 2:
var x = this.b9f_1.h77(px, py);
var y = this.b9f_1.i77(px, py);
tmp = div(Companion_getInstance_4().g7a(this.n9e_1, this.o9e_1, x, y), get_degrees(360));
break;
case 1:
var x_0 = this.b9f_1.h77(px, py);
var y_0 = this.b9f_1.i77(px, py);
var tmp_0 = -this.s9e_1 * this.h9f_1 + this.i9f_1 * (this.q9e_1 - x_0) + this.g9f_1 * (this.r9e_1 - y_0);
var tmp$ret$0;
// Inline function 'kotlin.math.sqrt' call
var tmp0_sqrt = this.f9f_1 * (this.v9x(this.n9e_1 - x_0) + this.v9x(this.o9e_1 - y_0)) - this.d9f_1 * ((this.n9e_1 - x_0) * (this.q9e_1 - x_0) + (this.o9e_1 - y_0) * (this.r9e_1 - y_0)) + this.e9f_1 * (this.v9x(this.q9e_1 - x_0) + this.v9x(this.r9e_1 - y_0)) - this.v9x(this.q9e_1 * this.o9e_1 - x_0 * this.o9e_1 - this.n9e_1 * this.r9e_1 + x_0 * this.r9e_1 + this.n9e_1 * y_0 - this.q9e_1 * y_0);
tmp$ret$0 = Math.sqrt(tmp0_sqrt);
tmp = 1.0 - (tmp_0 - tmp$ret$0) * this.j9f_1;
break;
default:
tmp = this.c9f_1.h77(px, py);
break;
}
return this.v9e_1.g9y(tmp);
};
GradientPaint.prototype.v9x = function (_this__u8e3s4) {
return _this__u8e3s4 * _this__u8e3s4;
};
GradientPaint.prototype.z4n = function () {
var tmp = this.w9e_1.z4n();
return this.y9w(null, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, null, null, null, tmp, null, null, null, 15359, null);
};
GradientPaint.prototype.toString = function () {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.paint.GradientPaint.toString.<anonymous>' call
var tmp0_subject = this.m9e_1;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 0:
tmp = 'LinearGradient([' + this.n9e_1 + ', ' + this.o9e_1 + '], [' + this.q9e_1 + ', ' + this.r9e_1 + ']';
break;
case 1:
tmp = 'RadialGradient([' + this.n9e_1 + ', ' + this.o9e_1 + ', ' + this.p9e_1 + '], [' + this.q9e_1 + ', ' + this.r9e_1 + ', ' + this.s9e_1 + ']';
break;
case 2:
tmp = 'ConicGradient([' + this.n9e_1 + ', ' + this.o9e_1 + ']';
break;
default:
noWhenBranchMatchedException();
break;
}
tmp0_apply.gc(tmp);
tmp0_apply.gc(', stops=' + this.t9e_1 + ', colors=' + colorsToString_0(this, this.u9e_1) + ', cycle=' + this.v9e_1 + ', transform=' + this.w9e_1 + ', interpolationMethod=' + this.x9e_1 + ', units=' + this.y9e_1 + ')');
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
};
GradientPaint.prototype.h9y = function (kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle) {
return new GradientPaint(kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle);
};
GradientPaint.prototype.y9w = function (kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
kind = this.m9e_1;
if (!(($mask0 & 2) === 0))
x0 = this.n9e_1;
if (!(($mask0 & 4) === 0))
y0 = this.o9e_1;
if (!(($mask0 & 8) === 0))
r0 = this.p9e_1;
if (!(($mask0 & 16) === 0))
x1 = this.q9e_1;
if (!(($mask0 & 32) === 0))
y1 = this.r9e_1;
if (!(($mask0 & 64) === 0))
r1 = this.s9e_1;
if (!(($mask0 & 128) === 0))
stops = this.t9e_1;
if (!(($mask0 & 256) === 0))
colors = this.u9e_1;
if (!(($mask0 & 512) === 0))
cycle = this.v9e_1;
if (!(($mask0 & 1024) === 0))
transform = this.w9e_1;
if (!(($mask0 & 2048) === 0))
interpolationMethod = this.x9e_1;
if (!(($mask0 & 4096) === 0))
units = this.y9e_1;
if (!(($mask0 & 8192) === 0))
startAngle = this.z9e_1;
return this.h9y(kind, x0, y0, r0, x1, y1, r1, stops, colors, cycle, transform, interpolationMethod, units, startAngle);
};
GradientPaint.prototype.hashCode = function () {
var result = this.m9e_1.hashCode();
result = imul(result, 31) + getNumberHashCode(this.n9e_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.o9e_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.p9e_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.q9e_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.r9e_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.s9e_1) | 0;
result = imul(result, 31) + this.t9e_1.hashCode() | 0;
result = imul(result, 31) + this.u9e_1.hashCode() | 0;
result = imul(result, 31) + this.v9e_1.hashCode() | 0;
result = imul(result, 31) + this.w9e_1.hashCode() | 0;
result = imul(result, 31) + this.x9e_1.hashCode() | 0;
result = imul(result, 31) + this.y9e_1.hashCode() | 0;
result = imul(result, 31) + Angle__hashCode_impl_szcndt(this.z9e_1) | 0;
return result;
};
GradientPaint.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof GradientPaint))
return false;
var tmp0_other_with_cast = other instanceof GradientPaint ? other : THROW_CCE();
if (!this.m9e_1.equals(tmp0_other_with_cast.m9e_1))
return false;
if (!equals(this.n9e_1, tmp0_other_with_cast.n9e_1))
return false;
if (!equals(this.o9e_1, tmp0_other_with_cast.o9e_1))
return false;
if (!equals(this.p9e_1, tmp0_other_with_cast.p9e_1))
return false;
if (!equals(this.q9e_1, tmp0_other_with_cast.q9e_1))
return false;
if (!equals(this.r9e_1, tmp0_other_with_cast.r9e_1))
return false;
if (!equals(this.s9e_1, tmp0_other_with_cast.s9e_1))
return false;
if (!this.t9e_1.equals(tmp0_other_with_cast.t9e_1))
return false;
if (!this.u9e_1.equals(tmp0_other_with_cast.u9e_1))
return false;
if (!this.v9e_1.equals(tmp0_other_with_cast.v9e_1))
return false;
if (!this.w9e_1.equals(tmp0_other_with_cast.w9e_1))
return false;
if (!this.x9e_1.equals(tmp0_other_with_cast.x9e_1))
return false;
if (!this.y9e_1.equals(tmp0_other_with_cast.y9e_1))
return false;
if (!equals(this.z9e_1, tmp0_other_with_cast.z9e_1))
return false;
return true;
};
GradientPaint.$metadata$ = classMeta('GradientPaint', [TransformedPaint]);
function LinearGradientPaint(x0, y0, x1, y1, cycle, transform, block) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp = GradientKind_LINEAR_getInstance();
var tmp_0 = numberToDouble(x0);
var tmp_1 = numberToDouble(y0);
var tmp_2 = numberToDouble(x1);
var tmp_3 = numberToDouble(y1);
var tmp0_also = GradientPaint_init_$Create$(tmp, tmp_0, tmp_1, 0.0, tmp_2, tmp_3, 0.0, null, null, cycle, transform, null, null, null, 14720, null);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_also);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function RadialGradientPaint(x0, y0, r0, x1, y1, r1, cycle, transform, block) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp = GradientKind_RADIAL_getInstance();
var tmp_0 = numberToDouble(x0);
var tmp_1 = numberToDouble(y0);
var tmp_2 = numberToDouble(r0);
var tmp_3 = numberToDouble(x1);
var tmp_4 = numberToDouble(y1);
var tmp_5 = numberToDouble(r1);
var tmp0_also = GradientPaint_init_$Create$(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, null, null, cycle, transform, null, null, null, 14720, null);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_also);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function TransformedPaint() {
}
TransformedPaint.$metadata$ = interfaceMeta('TransformedPaint', [Paint]);
var GradientKind_LINEAR_instance;
var GradientKind_RADIAL_instance;
var GradientKind_SWEEP_instance;
function Companion_29() {
Companion_instance_29 = this;
}
Companion_29.$metadata$ = objectMeta('Companion');
var Companion_instance_29;
function Companion_getInstance_42() {
GradientKind_initEntries();
if (Companion_instance_29 == null)
new Companion_29();
return Companion_instance_29;
}
var GradientKind_entriesInitialized;
function GradientKind_initEntries() {
if (GradientKind_entriesInitialized)
return Unit_getInstance();
GradientKind_entriesInitialized = true;
GradientKind_LINEAR_instance = new GradientKind('LINEAR', 0);
GradientKind_RADIAL_instance = new GradientKind('RADIAL', 1);
GradientKind_SWEEP_instance = new GradientKind('SWEEP', 2);
Companion_getInstance_42();
}
function GradientKind(name, ordinal) {
Enum.call(this, name, ordinal);
}
GradientKind.$metadata$ = classMeta('GradientKind', undefined, undefined, undefined, undefined, Enum.prototype);
var GradientInterpolationMethod_LINEAR_instance;
var GradientInterpolationMethod_NORMAL_instance;
var GradientInterpolationMethod_entriesInitialized;
function GradientInterpolationMethod_initEntries() {
if (GradientInterpolationMethod_entriesInitialized)
return Unit_getInstance();
GradientInterpolationMethod_entriesInitialized = true;
GradientInterpolationMethod_LINEAR_instance = new GradientInterpolationMethod('LINEAR', 0);
GradientInterpolationMethod_NORMAL_instance = new GradientInterpolationMethod('NORMAL', 1);
}
function GradientInterpolationMethod(name, ordinal) {
Enum.call(this, name, ordinal);
}
GradientInterpolationMethod.$metadata$ = classMeta('GradientInterpolationMethod', undefined, undefined, undefined, undefined, Enum.prototype);
var GradientUnits_USER_SPACE_ON_USE_instance;
var GradientUnits_OBJECT_BOUNDING_BOX_instance;
var GradientUnits_entriesInitialized;
function GradientUnits_initEntries() {
if (GradientUnits_entriesInitialized)
return Unit_getInstance();
GradientUnits_entriesInitialized = true;
GradientUnits_USER_SPACE_ON_USE_instance = new GradientUnits('USER_SPACE_ON_USE', 0);
GradientUnits_OBJECT_BOUNDING_BOX_instance = new GradientUnits('OBJECT_BOUNDING_BOX', 1);
}
function GradientUnits(name, ordinal) {
Enum.call(this, name, ordinal);
}
GradientUnits.$metadata$ = classMeta('GradientUnits', undefined, undefined, undefined, undefined, Enum.prototype);
function get_DefaultPaint() {
return Colors_getInstance().t7z_1;
}
function NonePaint() {
NonePaint_instance = this;
}
NonePaint.prototype.z4n = function () {
return this;
};
NonePaint.$metadata$ = objectMeta('NonePaint', [Paint]);
var NonePaint_instance;
function NonePaint_getInstance() {
if (NonePaint_instance == null)
new NonePaint();
return NonePaint_instance;
}
function BitmapPaint_init_$Init$(bitmap, transform, cycleX, cycleY, smooth, units, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0)) {
transform = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
if (!(($mask0 & 4) === 0))
cycleX = CycleMethod_NO_CYCLE_getInstance();
if (!(($mask0 & 8) === 0))
cycleY = CycleMethod_NO_CYCLE_getInstance();
if (!(($mask0 & 16) === 0))
smooth = true;
if (!(($mask0 & 32) === 0))
units = GradientUnits_OBJECT_BOUNDING_BOX_getInstance();
BitmapPaint.call($this, bitmap, transform, cycleX, cycleY, smooth, units);
return $this;
}
function BitmapPaint_init_$Create$(bitmap, transform, cycleX, cycleY, smooth, units, $mask0, $marker) {
return BitmapPaint_init_$Init$(bitmap, transform, cycleX, cycleY, smooth, units, $mask0, $marker, Object.create(BitmapPaint.prototype));
}
function BitmapPaint(bitmap, transform, cycleX, cycleY, smooth, units) {
this.j9x_1 = bitmap;
this.k9x_1 = transform;
this.l9x_1 = cycleX;
this.m9x_1 = cycleY;
this.n9x_1 = smooth;
this.o9x_1 = units;
this.p9x_1 = this.j9x_1.d86();
}
BitmapPaint.prototype.y8x = function () {
return this.j9x_1;
};
BitmapPaint.prototype.p8w = function () {
return this.k9x_1;
};
BitmapPaint.prototype.i9y = function () {
return this.l9x_1;
};
BitmapPaint.prototype.j9y = function () {
return this.m9x_1;
};
BitmapPaint.prototype.k9y = function () {
return this.n9x_1;
};
BitmapPaint.prototype.l9y = function () {
return this.l9x_1.m9y();
};
BitmapPaint.prototype.n9y = function () {
return this.m9x_1.m9y();
};
BitmapPaint.prototype.o9y = function () {
return this.p9x_1;
};
BitmapPaint.prototype.z4n = function () {
var tmp = this.k9x_1.z4n();
return this.p9y(null, tmp, null, null, false, null, 61, null);
};
BitmapPaint.prototype.toString = function () {
return 'BitmapPaint(' + this.j9x_1 + ', cycle=(' + this.l9x_1 + ', ' + this.m9x_1 + '), smooth=' + this.n9x_1 + ', transform=' + this.k9x_1 + ')';
};
BitmapPaint.prototype.q9y = function (bitmap, transform, cycleX, cycleY, smooth, units) {
return new BitmapPaint(bitmap, transform, cycleX, cycleY, smooth, units);
};
BitmapPaint.prototype.p9y = function (bitmap, transform, cycleX, cycleY, smooth, units, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
bitmap = this.j9x_1;
if (!(($mask0 & 2) === 0))
transform = this.k9x_1;
if (!(($mask0 & 4) === 0))
cycleX = this.l9x_1;
if (!(($mask0 & 8) === 0))
cycleY = this.m9x_1;
if (!(($mask0 & 16) === 0))
smooth = this.n9x_1;
if (!(($mask0 & 32) === 0))
units = this.o9x_1;
return this.q9y(bitmap, transform, cycleX, cycleY, smooth, units);
};
BitmapPaint.prototype.hashCode = function () {
var result = hashCode(this.j9x_1);
result = imul(result, 31) + this.k9x_1.hashCode() | 0;
result = imul(result, 31) + this.l9x_1.hashCode() | 0;
result = imul(result, 31) + this.m9x_1.hashCode() | 0;
result = imul(result, 31) + (this.n9x_1 | 0) | 0;
result = imul(result, 31) + this.o9x_1.hashCode() | 0;
return result;
};
BitmapPaint.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof BitmapPaint))
return false;
var tmp0_other_with_cast = other instanceof BitmapPaint ? other : THROW_CCE();
if (!equals(this.j9x_1, tmp0_other_with_cast.j9x_1))
return false;
if (!this.k9x_1.equals(tmp0_other_with_cast.k9x_1))
return false;
if (!this.l9x_1.equals(tmp0_other_with_cast.l9x_1))
return false;
if (!this.m9x_1.equals(tmp0_other_with_cast.m9x_1))
return false;
if (!(this.n9x_1 === tmp0_other_with_cast.n9x_1))
return false;
if (!this.o9x_1.equals(tmp0_other_with_cast.o9x_1))
return false;
return true;
};
BitmapPaint.$metadata$ = classMeta('BitmapPaint', [TransformedPaint]);
function GradientKind_LINEAR_getInstance() {
GradientKind_initEntries();
return GradientKind_LINEAR_instance;
}
function GradientKind_RADIAL_getInstance() {
GradientKind_initEntries();
return GradientKind_RADIAL_instance;
}
function GradientInterpolationMethod_NORMAL_getInstance() {
GradientInterpolationMethod_initEntries();
return GradientInterpolationMethod_NORMAL_instance;
}
function GradientUnits_OBJECT_BOUNDING_BOX_getInstance() {
GradientUnits_initEntries();
return GradientUnits_OBJECT_BOUNDING_BOX_instance;
}
function _VerticalAlign___init__impl__f42kfq(ratio) {
return ratio;
}
function _VerticalAlign___get_ratio__impl__b3ilr8($this) {
return $this;
}
function _VerticalAlign___get_ratioFake__impl__1h2fwv($this) {
return equals($this, Companion_getInstance_43().u9y_1) ? 1.0 : _VerticalAlign___get_ratio__impl__b3ilr8($this);
}
function Companion_30() {
Companion_instance_30 = this;
this.r9y_1 = _VerticalAlign___init__impl__f42kfq(0.0);
this.s9y_1 = _VerticalAlign___init__impl__f42kfq(0.5);
this.t9y_1 = _VerticalAlign___init__impl__f42kfq(1.0);
var tmp = this;
DoubleCompanionObject_getInstance();
tmp.u9y_1 = _VerticalAlign___init__impl__f42kfq(Infinity);
var tmp_0 = this;
var tmp$ret$2;
// Inline function 'kotlin.arrayOf' call
var tmp0_arrayOf = [new VerticalAlign(this.r9y_1), new VerticalAlign(this.u9y_1), new VerticalAlign(this.s9y_1), new VerticalAlign(this.t9y_1)];
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_arrayOf;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
tmp_0.v9y_1 = tmp$ret$2;
this.w9y_1 = toList_1(this.v9y_1);
}
Companion_30.prototype.x9y = function () {
return this.r9y_1;
};
Companion_30.prototype.y9y = function () {
return this.s9y_1;
};
Companion_30.prototype.z9y = function () {
return this.t9y_1;
};
Companion_30.prototype.a9z = function () {
return this.u9y_1;
};
Companion_30.$metadata$ = objectMeta('Companion');
var Companion_instance_30;
function Companion_getInstance_43() {
if (Companion_instance_30 == null)
new Companion_30();
return Companion_instance_30;
}
function VerticalAlign__getOffsetY_impl_iso0y6($this, height, baseline) {
var tmp0_subject = $this;
return equals(tmp0_subject, Companion_getInstance_43().u9y_1) ? baseline : -height * _VerticalAlign___get_ratio__impl__b3ilr8($this);
}
function VerticalAlign__getOffsetYRespectBaseline_impl_62po5b($this, font, totalHeight) {
var tmp0_subject = $this;
return equals(tmp0_subject, Companion_getInstance_43().u9y_1) ? 0.0 : interpolate(_VerticalAlign___get_ratio__impl__b3ilr8($this), font.v8m_1, font.v8m_1 - totalHeight);
}
function VerticalAlign__toString_impl_hcpnn2($this) {
var tmp0_subject = $this;
return equals(tmp0_subject, Companion_getInstance_43().r9y_1) ? 'TOP' : equals(tmp0_subject, Companion_getInstance_43().s9y_1) ? 'MIDDLE' : equals(tmp0_subject, Companion_getInstance_43().t9y_1) ? 'BOTTOM' : equals(tmp0_subject, Companion_getInstance_43().u9y_1) ? 'BASELINE' : 'VerticalAlign(' + _VerticalAlign___get_ratio__impl__b3ilr8($this) + ')';
}
function VerticalAlign__hashCode_impl_vx8hj7($this) {
return getNumberHashCode($this);
}
function VerticalAlign__equals_impl_xp13z($this, other) {
if (!(other instanceof VerticalAlign))
return false;
var tmp0_other_with_cast = other instanceof VerticalAlign ? other.b9z_1 : THROW_CCE();
if (!equals($this, tmp0_other_with_cast))
return false;
return true;
}
function VerticalAlign(ratio) {
Companion_getInstance_43();
this.b9z_1 = ratio;
}
VerticalAlign.prototype.toString = function () {
return VerticalAlign__toString_impl_hcpnn2(this.b9z_1);
};
VerticalAlign.prototype.hashCode = function () {
return VerticalAlign__hashCode_impl_vx8hj7(this.b9z_1);
};
VerticalAlign.prototype.equals = function (other) {
return VerticalAlign__equals_impl_xp13z(this.b9z_1, other);
};
VerticalAlign.$metadata$ = classMeta('VerticalAlign', [EnumLike]);
function _HorizontalAlign___init__impl__ad654o(ratio) {
return ratio;
}
function _HorizontalAlign___get_ratio__impl__x9wlea($this) {
return $this;
}
function _HorizontalAlign___get_ratioFake__impl__h46z0d($this) {
return equals($this, Companion_getInstance_44().c9z_1) ? 0.0 : _HorizontalAlign___get_ratio__impl__x9wlea($this);
}
function Companion_31() {
Companion_instance_31 = this;
this.c9z_1 = _HorizontalAlign___init__impl__ad654o(-1.0E-5);
this.d9z_1 = _HorizontalAlign___init__impl__ad654o(0.0);
this.e9z_1 = _HorizontalAlign___init__impl__ad654o(0.5);
this.f9z_1 = _HorizontalAlign___init__impl__ad654o(1.0);
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.arrayOf' call
var tmp0_arrayOf = [new HorizontalAlign(this.d9z_1), new HorizontalAlign(this.e9z_1), new HorizontalAlign(this.f9z_1), new HorizontalAlign(this.c9z_1)];
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_arrayOf;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
tmp.g9z_1 = tmp$ret$2;
this.h9z_1 = toList_1(this.g9z_1);
}
Companion_31.$metadata$ = objectMeta('Companion');
var Companion_instance_31;
function Companion_getInstance_44() {
if (Companion_instance_31 == null)
new Companion_31();
return Companion_instance_31;
}
function HorizontalAlign__getOffsetX_impl_urzzxf($this, width) {
var tmp0_subject = $this;
return equals(tmp0_subject, Companion_getInstance_44().c9z_1) ? 0.0 : width * _HorizontalAlign___get_ratio__impl__x9wlea($this);
}
function HorizontalAlign__toString_impl_toflc0($this) {
var tmp0_subject = $this;
return equals(tmp0_subject, Companion_getInstance_44().d9z_1) ? 'LEFT' : equals(tmp0_subject, Companion_getInstance_44().e9z_1) ? 'CENTER' : equals(tmp0_subject, Companion_getInstance_44().f9z_1) ? 'RIGHT' : equals(tmp0_subject, Companion_getInstance_44().c9z_1) ? 'JUSTIFY' : 'HorizontalAlign(' + _HorizontalAlign___get_ratio__impl__x9wlea($this) + ')';
}
function HorizontalAlign__hashCode_impl_7x9oj5($this) {
return getNumberHashCode($this);
}
function HorizontalAlign__equals_impl_hkfbhv($this, other) {
if (!(other instanceof HorizontalAlign))
return false;
var tmp0_other_with_cast = other instanceof HorizontalAlign ? other.i9z_1 : THROW_CCE();
if (!equals($this, tmp0_other_with_cast))
return false;
return true;
}
function HorizontalAlign(ratio) {
Companion_getInstance_44();
this.i9z_1 = ratio;
}
HorizontalAlign.prototype.toString = function () {
return HorizontalAlign__toString_impl_toflc0(this.i9z_1);
};
HorizontalAlign.prototype.hashCode = function () {
return HorizontalAlign__hashCode_impl_7x9oj5(this.i9z_1);
};
HorizontalAlign.prototype.equals = function (other) {
return HorizontalAlign__equals_impl_hkfbhv(this.i9z_1, other);
};
HorizontalAlign.$metadata$ = classMeta('HorizontalAlign', [EnumLike]);
function Companion_32() {
Companion_instance_32 = this;
this.c8s_1 = listOf([new HorizontalAlign(Companion_getInstance_44().d9z_1), new HorizontalAlign(Companion_getInstance_44().e9z_1), new HorizontalAlign(Companion_getInstance_44().f9z_1), new HorizontalAlign(Companion_getInstance_44().c9z_1)]);
var tmp = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map = this.c8s_1;
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator = tmp0_map.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l().i9z_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.text.Companion.TOP.<anonymous>' call
tmp$ret$0 = new TextAlignment(item, Companion_getInstance_43().r9y_1);
tmp0_mapTo.c(tmp$ret$0);
}
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
tmp.d8s_1 = tmp$ret$2;
var tmp_0 = this;
var tmp$ret$5;
// Inline function 'kotlin.collections.map' call
var tmp0_map_0 = this.c8s_1;
var tmp$ret$4;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map_0, 10));
var tmp0_iterator_0 = tmp0_map_0.j();
while (tmp0_iterator_0.k()) {
var item_0 = tmp0_iterator_0.l().i9z_1;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.text.Companion.BASELINE.<anonymous>' call
tmp$ret$3 = new TextAlignment(item_0, Companion_getInstance_43().u9y_1);
tmp0_mapTo_0.c(tmp$ret$3);
}
tmp$ret$4 = tmp0_mapTo_0;
tmp$ret$5 = tmp$ret$4;
tmp_0.e8s_1 = tmp$ret$5;
var tmp_1 = this;
var tmp$ret$8;
// Inline function 'kotlin.collections.map' call
var tmp0_map_1 = this.c8s_1;
var tmp$ret$7;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo_1 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map_1, 10));
var tmp0_iterator_1 = tmp0_map_1.j();
while (tmp0_iterator_1.k()) {
var item_1 = tmp0_iterator_1.l().i9z_1;
var tmp$ret$6;
// Inline function 'com.soywiz.korim.text.Companion.MIDDLE.<anonymous>' call
tmp$ret$6 = new TextAlignment(item_1, Companion_getInstance_43().s9y_1);
tmp0_mapTo_1.c(tmp$ret$6);
}
tmp$ret$7 = tmp0_mapTo_1;
tmp$ret$8 = tmp$ret$7;
tmp_1.f8s_1 = tmp$ret$8;
var tmp_2 = this;
var tmp$ret$11;
// Inline function 'kotlin.collections.map' call
var tmp0_map_2 = this.c8s_1;
var tmp$ret$10;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo_2 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map_2, 10));
var tmp0_iterator_2 = tmp0_map_2.j();
while (tmp0_iterator_2.k()) {
var item_2 = tmp0_iterator_2.l().i9z_1;
var tmp$ret$9;
// Inline function 'com.soywiz.korim.text.Companion.BOTTOM.<anonymous>' call
tmp$ret$9 = new TextAlignment(item_2, Companion_getInstance_43().t9y_1);
tmp0_mapTo_2.c(tmp$ret$9);
}
tmp$ret$10 = tmp0_mapTo_2;
tmp$ret$11 = tmp$ret$10;
tmp_2.g8s_1 = tmp$ret$11;
this.h8s_1 = plus(plus(plus(this.d8s_1, this.e8s_1), this.f8s_1), this.g8s_1);
this.i8s_1 = this.d8s_1.m(0);
this.j8s_1 = this.d8s_1.m(1);
this.k8s_1 = this.d8s_1.m(2);
this.l8s_1 = this.d8s_1.m(3);
this.m8s_1 = this.e8s_1.m(0);
this.n8s_1 = this.e8s_1.m(1);
this.o8s_1 = this.e8s_1.m(2);
this.p8s_1 = this.e8s_1.m(3);
this.q8s_1 = this.d8s_1.m(0);
this.r8s_1 = this.d8s_1.m(1);
this.s8s_1 = this.d8s_1.m(2);
this.t8s_1 = this.d8s_1.m(3);
this.u8s_1 = this.f8s_1.m(0);
this.v8s_1 = this.f8s_1.m(1);
this.w8s_1 = this.f8s_1.m(2);
this.x8s_1 = this.f8s_1.m(3);
this.y8s_1 = this.g8s_1.m(0);
this.z8s_1 = this.g8s_1.m(1);
this.a8t_1 = this.g8s_1.m(2);
this.b8t_1 = this.g8s_1.m(3);
}
Companion_32.$metadata$ = objectMeta('Companion');
var Companion_instance_32;
function Companion_getInstance_45() {
if (Companion_instance_32 == null)
new Companion_32();
return Companion_instance_32;
}
function TextAlignment(horizontal, vertical) {
Companion_getInstance_45();
this.t8t_1 = horizontal;
this.u8t_1 = vertical;
this.v8t_1 = new Anchor(_HorizontalAlign___get_ratioFake__impl__h46z0d(this.t8t_1), _VerticalAlign___get_ratioFake__impl__1h2fwv(this.u8t_1));
}
TextAlignment.prototype.toString = function () {
return '' + new VerticalAlign(this.u8t_1) + '_' + new HorizontalAlign(this.t8t_1);
};
TextAlignment.prototype.hashCode = function () {
var result = HorizontalAlign__hashCode_impl_7x9oj5(this.t8t_1);
result = imul(result, 31) + VerticalAlign__hashCode_impl_vx8hj7(this.u8t_1) | 0;
return result;
};
TextAlignment.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof TextAlignment))
return false;
var tmp0_other_with_cast = other instanceof TextAlignment ? other : THROW_CCE();
if (!equals(this.t8t_1, tmp0_other_with_cast.t8t_1))
return false;
if (!equals(this.u8t_1, tmp0_other_with_cast.u8t_1))
return false;
return true;
};
TextAlignment.$metadata$ = classMeta('TextAlignment', [EnumLike]);
var DefaultWStringTextRenderer;
function get_DefaultStringTextRenderer() {
init_properties_TextRenderer_kt_qiowzu();
return DefaultStringTextRenderer;
}
var DefaultStringTextRenderer;
function TextRenderer() {
}
TextRenderer.$metadata$ = interfaceMeta('TextRenderer');
function CreateWStringTextRenderer(getVersion, handler) {
init_properties_TextRenderer_kt_qiowzu();
return new CreateWStringTextRenderer$2(getVersion, handler);
}
function CreateWStringTextRenderer$default(getVersion, handler, $mask0, $handler) {
if (!(($mask0 & 1) === 0)) {
getVersion = CreateWStringTextRenderer$lambda;
}
return CreateWStringTextRenderer(getVersion, handler);
}
function ITextRendererActions() {
}
ITextRendererActions.$metadata$ = interfaceMeta('ITextRendererActions');
function CreateStringTextRenderer(getVersion, handler) {
init_properties_TextRenderer_kt_qiowzu();
return new CreateStringTextRenderer$2(getVersion, handler);
}
function CreateStringTextRenderer$default(getVersion, handler, $mask0, $handler) {
if (!(($mask0 & 1) === 0)) {
getVersion = CreateStringTextRenderer$lambda;
}
return CreateStringTextRenderer(getVersion, handler);
}
function TextRendererActions() {
var tmp = this;
tmp.b8w_1 = GlyphPath_init_$Create$(null, null, null, null, null, null, 0.0, 127, null);
var tmp_0 = this;
tmp_0.c8w_1 = GlyphMetrics_init_$Create$(0.0, false, 0, null, 0.0, 31, null);
var tmp_1 = this;
tmp_1.d8w_1 = FontMetrics_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255, null);
this.e8w_1 = 0;
this.g8w_1 = 0.0;
this.h8w_1 = 0.0;
this.i8w_1 = 0.0;
var tmp_2 = this;
tmp_2.j8w_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.k8w_1 = null;
this.l8w_1 = Colors_getInstance().s7z_1;
}
TextRendererActions.prototype.s8w = function () {
return this.c8w_1;
};
TextRendererActions.prototype.t8w = function () {
return this.d8w_1.t8w();
};
TextRendererActions.prototype.u8w = function (_set____db54di) {
this.e8w_1 = _set____db54di;
};
TextRendererActions.prototype.m8w = function () {
return this.e8w_1;
};
TextRendererActions.prototype.r8w = function () {
var tmp = this.f8w_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('font');
}
};
TextRendererActions.prototype.v8w = function (font, size) {
this.f8w_1 = font;
this.g8w_1 = size;
font.t8m(size, this.d8w_1);
};
TextRendererActions.prototype.w8w = function (_set____db54di) {
this.h8w_1 = _set____db54di;
};
TextRendererActions.prototype.d1n = function () {
return this.h8w_1;
};
TextRendererActions.prototype.o7c = function (_set____db54di) {
this.i8w_1 = _set____db54di;
};
TextRendererActions.prototype.e1n = function () {
return this.i8w_1;
};
TextRendererActions.prototype.x8w = function (reader, codePoint) {
return this.r8w().e8n(this.g8w_1, codePoint, this.c8w_1, reader);
};
TextRendererActions.prototype.p8w = function () {
return this.j8w_1;
};
TextRendererActions.prototype.y8w = function () {
return this.k8w_1;
};
TextRendererActions.prototype.m8n = function (leftCodePoint, rightCodePoint) {
return this.r8w().l8n(this.g8w_1, leftCodePoint, rightCodePoint);
};
TextRendererActions.$metadata$ = classMeta('TextRendererActions', [ITextRendererActions]);
function LineStats_init_$Init$(maxLineHeight, maxX, bounds, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
maxLineHeight = 0.0;
if (!(($mask0 & 2) === 0))
maxX = 0.0;
if (!(($mask0 & 4) === 0))
bounds = new BoundsBuilder();
LineStats.call($this, maxLineHeight, maxX, bounds);
return $this;
}
function LineStats_init_$Create$(maxLineHeight, maxX, bounds, $mask0, $marker) {
return LineStats_init_$Init$(maxLineHeight, maxX, bounds, $mask0, $marker, Object.create(LineStats.prototype));
}
function LineStats(maxLineHeight, maxX, bounds) {
this.x8t_1 = maxLineHeight;
this.y8t_1 = maxX;
this.z8t_1 = bounds;
}
LineStats.prototype.k9z = function () {
return this.x8t_1;
};
LineStats.prototype.a8u = function (align) {
return HorizontalAlign__getOffsetX_impl_urzzxf(align, this.y8t_1) + this.z8t_1.l71(0.0);
};
LineStats.prototype.z8w = function (dx) {
var tmp0_this = this;
tmp0_this.y8t_1 = tmp0_this.y8t_1 + dx;
};
LineStats.prototype.l9z = function (fontMetrics) {
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = this.x8t_1;
var tmp1_max = fontMetrics.t8w();
tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
tmp.x8t_1 = tmp$ret$0;
};
LineStats.prototype.m9z = function () {
};
LineStats.prototype.d2p = function () {
this.y8t_1 = 0.0;
this.z8t_1.d2p();
this.x8t_1 = 0.0;
};
LineStats.prototype.toString = function () {
return 'LineStats(maxLineHeight=' + this.x8t_1 + ', maxX=' + this.y8t_1 + ', bounds=' + this.z8t_1 + ')';
};
LineStats.prototype.hashCode = function () {
var result = getNumberHashCode(this.x8t_1);
result = imul(result, 31) + getNumberHashCode(this.y8t_1) | 0;
result = imul(result, 31) + hashCode(this.z8t_1) | 0;
return result;
};
LineStats.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof LineStats))
return false;
var tmp0_other_with_cast = other instanceof LineStats ? other : THROW_CCE();
if (!equals(this.x8t_1, tmp0_other_with_cast.x8t_1))
return false;
if (!equals(this.y8t_1, tmp0_other_with_cast.y8t_1))
return false;
if (!equals(this.z8t_1, tmp0_other_with_cast.z8t_1))
return false;
return true;
};
LineStats.$metadata$ = classMeta('LineStats');
function add($this, x, y) {
var rx = $this.d1n() + $this.p8w().h77(x, y);
var ry = $this.e1n() + $this.p8w().i77(x, y);
$this.o8t_1.m71(rx, ry);
if ($this.p8t_1 === 0) {
$this.n8t_1.m71(rx, ry);
}
$this.r8t_1.z8t_1.m71(rx, ry);
}
function add_0($this, rect) {
var fx = rect.b74();
var fy = rect.y73();
var w = rect.x71_1;
var h = rect.y71_1;
add($this, fx, fy);
add($this, fx + w, fy);
add($this, fx + w, fy + h);
add($this, fx, fy + h);
}
function BoundBuilderTextRendererActions() {
TextRendererActions.call(this);
this.n8t_1 = new BoundsBuilder();
this.o8t_1 = new BoundsBuilder();
this.p8t_1 = 0;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp.q8t_1 = tmp$ret$0;
var tmp_0 = this;
tmp_0.r8t_1 = LineStats_init_$Create$(0.0, 0.0, null, 7, null);
}
BoundBuilderTextRendererActions.prototype.s8t = function () {
return this.p8t_1;
};
BoundBuilderTextRendererActions.prototype.n9z = function () {
var tmp$ret$1;
// Inline function 'kotlin.collections.sumOf' call
var tmp0_sumOf = this.q8t_1;
var sum = 0.0;
var tmp0_iterator = tmp0_sumOf.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp = sum;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.text.BoundBuilderTextRendererActions.<get-totalMaxLineHeight>.<anonymous>' call
tmp$ret$0 = element.x8t_1;
sum = tmp + tmp$ret$0;
}
tmp$ret$1 = sum;
return tmp$ret$1;
};
BoundBuilderTextRendererActions.prototype.n8w = function (align, line) {
var tmp0_elvis_lhs = getOrNull_1(this.q8t_1, line);
var tmp;
if (tmp0_elvis_lhs == null) {
return HorizontalAlign__getOffsetX_impl_urzzxf(align, 0.0);
} else {
tmp = tmp0_elvis_lhs;
}
var line_0 = tmp;
return HorizontalAlign__getOffsetX_impl_urzzxf(align, line_0.y8t_1);
};
BoundBuilderTextRendererActions.prototype.w8t = function (align, fontMetrics) {
return VerticalAlign__getOffsetYRespectBaseline_impl_62po5b(align, fontMetrics, this.n9z());
};
BoundBuilderTextRendererActions.prototype.d2p = function () {
TextRendererActions.prototype.d2p.call(this);
this.p8t_1 = 0;
this.o8t_1.d2p();
this.n8t_1.d2p();
this.r8t_1.d2p();
this.q8t_1.x7();
};
BoundBuilderTextRendererActions.prototype.a8w = function (reader, codePoint) {
var g = this.x8w(reader, codePoint);
add_0(this, g.i8n_1);
this.r8t_1.l9z(this.d8w_1);
return g;
};
BoundBuilderTextRendererActions.prototype.z8w = function (x) {
TextRendererActions.prototype.z8w.call(this, x);
this.r8t_1.z8w(x);
};
BoundBuilderTextRendererActions.prototype.a8x = function (y, end) {
TextRendererActions.prototype.a8x.call(this, y, end);
var tmp0_this = this;
var tmp1 = tmp0_this.p8t_1;
tmp0_this.p8t_1 = tmp1 + 1 | 0;
this.r8t_1.l9z(this.d8w_1);
this.r8t_1.m9z();
this.q8t_1.c(this.r8t_1);
var tmp = this;
tmp.r8t_1 = LineStats_init_$Create$(0.0, 0.0, null, 7, null);
};
BoundBuilderTextRendererActions.$metadata$ = classMeta('BoundBuilderTextRendererActions', undefined, undefined, undefined, undefined, TextRendererActions.prototype);
function measure(_this__u8e3s4, text, size, defaultFont) {
init_properties_TextRenderer_kt_qiowzu();
var actions = new BoundBuilderTextRendererActions();
invoke(_this__u8e3s4, actions, text, size, defaultFont);
return actions;
}
function invoke(_this__u8e3s4, actions, text, size, defaultFont) {
init_properties_TextRenderer_kt_qiowzu();
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.text.invoke.<anonymous>' call
_this__u8e3s4.j9z(actions, text, size, defaultFont);
tmp$ret$0 = actions;
}
function Entry_init_$Init$(tex, x, y, sx, sy, rot, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
tmp$ret$0_0 = Unit_getInstance();
tex = tmp$ret$0;
}
if (!(($mask0 & 2) === 0))
x = 0.0;
if (!(($mask0 & 4) === 0))
y = 0.0;
if (!(($mask0 & 8) === 0))
sx = 1.0;
if (!(($mask0 & 16) === 0))
sy = 1.0;
if (!(($mask0 & 32) === 0))
rot = get_radians(0);
Entry_0.call($this, tex, x, y, sx, sy, rot);
return $this;
}
function Entry_init_$Create$(tex, x, y, sx, sy, rot, $mask0, $marker) {
return Entry_init_$Init$(tex, x, y, sx, sy, rot, $mask0, $marker, Object.create(Entry_0.prototype));
}
function Entry_0(tex, x, y, sx, sy, rot) {
this.o9z_1 = tex;
this.p9z_1 = x;
this.q9z_1 = y;
this.r9z_1 = sx;
this.s9z_1 = sy;
this.t9z_1 = rot;
}
Entry_0.prototype.u9z = function () {
return this.o9z_1;
};
Entry_0.prototype.d1n = function () {
return this.p9z_1;
};
Entry_0.prototype.e1n = function () {
return this.q9z_1;
};
Entry_0.prototype.v9z = function () {
return this.r9z_1;
};
Entry_0.prototype.w9z = function () {
return this.s9z_1;
};
Entry_0.prototype.x9z = function () {
return this.t9z_1;
};
Entry_0.prototype.toString = function () {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.text.Entry.toString.<anonymous>' call
tmp0_apply.gc('Entry(');
tmp0_apply.gc("'" + this.o9z_1.t2() + "', " + numberToInt(this.p9z_1) + ', ' + numberToInt(this.q9z_1) + ', ' + this.o9z_1.d72() + ', ' + this.o9z_1.e72());
if (!(this.r9z_1 === 1.0)) {
tmp0_apply.gc(', sx=' + get_niceStr(this.r9z_1));
}
if (!(this.s9z_1 === 1.0)) {
tmp0_apply.gc(', sy=' + get_niceStr(this.s9z_1));
}
if (!equals(this.t9z_1, get_radians(0))) {
tmp0_apply.gc(', rot=' + get_niceStr(_Angle___get_degrees__impl__qg56vw(this.t9z_1)));
}
tmp0_apply.gc(')');
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
};
Entry_0.prototype.hashCode = function () {
var result = hashCode(this.o9z_1);
result = imul(result, 31) + getNumberHashCode(this.p9z_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.q9z_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.r9z_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.s9z_1) | 0;
result = imul(result, 31) + Angle__hashCode_impl_szcndt(this.t9z_1) | 0;
return result;
};
Entry_0.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof Entry_0))
return false;
var tmp0_other_with_cast = other instanceof Entry_0 ? other : THROW_CCE();
if (!equals(this.o9z_1, tmp0_other_with_cast.o9z_1))
return false;
if (!equals(this.p9z_1, tmp0_other_with_cast.p9z_1))
return false;
if (!equals(this.q9z_1, tmp0_other_with_cast.q9z_1))
return false;
if (!equals(this.r9z_1, tmp0_other_with_cast.r9z_1))
return false;
if (!equals(this.s9z_1, tmp0_other_with_cast.s9z_1))
return false;
if (!equals(this.t9z_1, tmp0_other_with_cast.t9z_1))
return false;
return true;
};
Entry_0.$metadata$ = classMeta('Entry');
function Text2TextRendererActions() {
TextRendererActions.call(this);
this.ja0_1 = Companion_getInstance_43().r9y_1;
this.ka0_1 = Companion_getInstance_44().d9z_1;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp.la0_1 = tmp$ret$0;
this.ma0_1 = doubleArrayListOf(new Float64Array([]));
this.na0_1 = doubleArrayListOf(new Float64Array([]));
this.oa0_1 = doubleArrayListOf(new Float64Array([]));
this.pa0_1 = doubleArrayListOf(new Float64Array([]));
this.qa0_1 = doubleArrayListOf(new Float64Array([]));
var tmp_0 = this;
tmp_0.ra0_1 = Transform_init_$Create$(0.0, 0.0, 0.0, 0.0, null, null, null, 127, null);
}
Text2TextRendererActions.prototype.i = function () {
return this.ma0_1.i();
};
Text2TextRendererActions.prototype.sa0 = function (n, out) {
out.o9z_1 = this.la0_1.m(n);
out.p9z_1 = this.ma0_1.m(n);
out.q9z_1 = this.na0_1.m(n);
out.r9z_1 = this.oa0_1.m(n);
out.s9z_1 = this.pa0_1.m(n);
out.t9z_1 = get_radians_0(this.qa0_1.m(n));
return out;
};
Text2TextRendererActions.prototype.ta0 = function () {
this.la0_1.x7();
this.ma0_1.x7();
this.na0_1.x7();
this.oa0_1.x7();
this.pa0_1.x7();
this.qa0_1.x7();
};
Text2TextRendererActions.prototype.a8w = function (reader, codePoint) {
var tmp = this.r8w();
var bf = tmp instanceof BitmapFont ? tmp : THROW_CCE();
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korio.lang.keep' call
var tmp0_safe_receiver = reader;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y5y_1;
var old = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.text.Text2TextRendererActions.put.<anonymous>' call
tmp$ret$0 = this.x8w(reader, codePoint);
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
var tmp2_safe_receiver = reader;
if (tmp2_safe_receiver == null) {
} else
tmp2_safe_receiver.y5y_1 = old;
}
}
var m = tmp$ret$1;
var g = bf.m(codePoint);
var x = g.u8l_1;
var tmp_0 = g.v8l_1;
var tmp0_subject = this.ja0_1;
var y = tmp_0 - (equals(tmp0_subject, Companion_getInstance_43().u9y_1) ? bf.b8m_1 : bf.a8m_1 * _VerticalAlign___get_ratio__impl__b3ilr8(this.ja0_1));
var fontScale = this.g8w_1 / bf.z8l_1;
var tmp_1 = this.p8w();
this.ra0_1.k75(tmp_1, 0.0, 0.0, 6, null);
this.la0_1.c(g.t8l_1);
this.ma0_1.m4n(this.d1n() + this.p8w().h77(x, y) * fontScale);
this.na0_1.m4n(this.e1n() + this.p8w().i77(x, y) * fontScale);
this.oa0_1.m4n(this.ra0_1.a75_1 * fontScale);
this.pa0_1.m4n(this.ra0_1.b75_1 * fontScale);
this.qa0_1.m4n(_Angle___get_radians__impl__n00yt5(this.ra0_1.e75_1));
return m;
};
Text2TextRendererActions.$metadata$ = classMeta('Text2TextRendererActions', undefined, undefined, undefined, undefined, TextRendererActions.prototype);
function DefaultWStringTextRenderer$lambda($this$CreateWStringTextRenderer, text, c, g, advance) {
init_properties_TextRenderer_kt_qiowzu();
$this$CreateWStringTextRenderer.a8w(text, c);
$this$CreateWStringTextRenderer.z8w(advance);
return Unit_getInstance();
}
function DefaultStringTextRenderer$lambda($this$CreateStringTextRenderer, text, c, g, advance) {
init_properties_TextRenderer_kt_qiowzu();
$this$CreateStringTextRenderer.a8w(text, c);
$this$CreateStringTextRenderer.z8w(advance);
return Unit_getInstance();
}
function CreateWStringTextRenderer$lambda() {
init_properties_TextRenderer_kt_qiowzu();
return 0;
}
function CreateWStringTextRenderer$2($getVersion, $handler) {
this.ua0_1 = $getVersion;
this.va0_1 = $handler;
}
CreateWStringTextRenderer$2.prototype.s3r = function () {
return this.ua0_1();
};
CreateWStringTextRenderer$2.prototype.wa0 = function (_this__u8e3s4, text, size, defaultFont) {
_this__u8e3s4.d2p();
_this__u8e3s4.v8w(defaultFont, size);
var reader = WStringReader_init_$Create$(text, 0, 2, null);
while (reader.f5z()) {
var c = _WChar___get_codePoint__impl__c8brwu(reader.i5z(0, 1, null));
var c1 = _WChar___get_codePoint__impl__c8brwu(reader.g5z(1));
var startPos = reader.y5y_1;
var tmp$ret$0;
// Inline function 'kotlin.code' call
tmp$ret$0 = 10;
if (c === tmp$ret$0) {
_this__u8e3s4.a8x(_this__u8e3s4.t8w(), false);
} else {
var tmp$ret$2;
$l$block: {
// Inline function 'com.soywiz.korio.lang.keep' call
var tmp0_safe_receiver = reader;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y5y_1;
var old = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
try {
var tmp$ret$1;
// Inline function 'com.soywiz.korim.text.<no name provided>.run.<anonymous>' call
tmp$ret$1 = _this__u8e3s4.x8w(reader, c);
tmp$ret$2 = tmp$ret$1;
break $l$block;
}finally {
var tmp2_safe_receiver = reader;
if (tmp2_safe_receiver == null) {
} else
tmp2_safe_receiver.y5y_1 = old;
}
}
var g = tmp$ret$2;
_this__u8e3s4.p8w().o74();
this.va0_1(_this__u8e3s4, reader, c, g, g.j8n_1 + _this__u8e3s4.m8n(c, c1));
}
if (reader.y5y_1 <= startPos) {
reader.j5z(1);
}
}
_this__u8e3s4.a8x(_this__u8e3s4.t8w(), true);
};
CreateWStringTextRenderer$2.prototype.j9z = function (_this__u8e3s4, text, size, defaultFont) {
return this.wa0(_this__u8e3s4, text instanceof WString ? text : THROW_CCE(), size, defaultFont);
};
CreateWStringTextRenderer$2.$metadata$ = classMeta(undefined, [TextRenderer]);
function CreateStringTextRenderer$lambda() {
init_properties_TextRenderer_kt_qiowzu();
return 0;
}
function CreateStringTextRenderer$o$wstring$lambda($handler) {
return function ($this$CreateWStringTextRenderer, text, c, g, advance) {
$handler($this$CreateWStringTextRenderer, text, c, g, advance);
return Unit_getInstance();
};
}
function CreateStringTextRenderer$2($getVersion, $handler) {
var tmp = this;
tmp.xa0_1 = CreateWStringTextRenderer($getVersion, CreateStringTextRenderer$o$wstring$lambda($handler));
}
CreateStringTextRenderer$2.prototype.s3r = function () {
return this.xa0_1.s3r();
};
CreateStringTextRenderer$2.prototype.ya0 = function (_this__u8e3s4, text, size, defaultFont) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = this.xa0_1;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.text.<no name provided>.run.<anonymous>' call
tmp0_apply.j9z(_this__u8e3s4, Companion_getInstance_7().h51(text), size, defaultFont);
tmp$ret$0 = tmp0_apply;
};
CreateStringTextRenderer$2.prototype.j9z = function (_this__u8e3s4, text, size, defaultFont) {
return this.ya0(_this__u8e3s4, (!(text == null) ? typeof text === 'string' : false) ? text : THROW_CCE(), size, defaultFont);
};
CreateStringTextRenderer$2.$metadata$ = classMeta(undefined, [TextRenderer]);
var properties_initialized_TextRenderer_kt_lfmsb6;
function init_properties_TextRenderer_kt_qiowzu() {
if (properties_initialized_TextRenderer_kt_lfmsb6) {
} else {
properties_initialized_TextRenderer_kt_lfmsb6 = true;
DefaultWStringTextRenderer = CreateWStringTextRenderer$default(null, DefaultWStringTextRenderer$lambda, 1, null);
DefaultStringTextRenderer = CreateStringTextRenderer$default(null, DefaultStringTextRenderer$lambda, 1, null);
}
}
function overlaps($this, a0, a1, b0, b1) {
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
tmp$ret$0 = Math.min(a0, a0);
var min = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.max' call
tmp$ret$1 = Math.max(a1, a1);
var max = tmp$ret$1;
var tmp$ret$2;
// Inline function 'kotlin.math.max' call
tmp$ret$2 = Math.max(a0, b0);
var maxMinor = tmp$ret$2;
var tmp$ret$3;
// Inline function 'kotlin.math.min' call
tmp$ret$3 = Math.min(a1, b1);
var minMajor = tmp$ret$3;
return (min <= maxMinor ? maxMinor <= max : false) ? true : min <= minMajor ? minMajor <= max : false;
}
function SegmentHandler() {
this.za0_1 = intArrayListOf(new Int32Array([]));
this.aa1_1 = intArrayListOf(new Int32Array([]));
this.d2p();
}
SegmentHandler.prototype.i = function () {
return this.za0_1.i();
};
SegmentHandler.prototype.d2p = function () {
this.za0_1.x7();
this.aa1_1.x7();
};
SegmentHandler.prototype.g7q = function (x0, x1) {
var inductionVariable = 0;
var last = this.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var xmin = this.za0_1.t4n(n);
var xmax = this.aa1_1.t4n(n);
if (overlaps(this, xmin, xmax, x0, x1)) {
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
tmp$ret$0 = Math.min(x0, xmin);
this.za0_1.r4o(n, tmp$ret$0);
var tmp$ret$1;
// Inline function 'kotlin.math.max' call
tmp$ret$1 = Math.max(x1, xmax);
this.aa1_1.r4o(n, tmp$ret$1);
return Unit_getInstance();
}
}
while (inductionVariable < last);
this.za0_1.m4o(x0);
this.aa1_1.m4o(x1);
};
SegmentHandler.prototype.ba1 = function (block) {
var inductionVariable = 0;
var last = this.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
block(this.za0_1.t4n(n), this.aa1_1.t4n(n));
}
while (inductionVariable < last);
};
SegmentHandler.$metadata$ = classMeta('SegmentHandler');
function ScanlineWriter($outer) {
this.na1_1 = $outer;
this.ca1_1 = get_DEFAULT(Companion_getInstance_46());
this.da1_1 = NoneFiller_getInstance();
this.ea1_1 = -1;
this.fa1_1 = -1;
this.ga1_1 = new Float32Array(this.i());
this.ha1_1 = new Int32Array(this.i());
this.ia1_1 = Companion_getInstance_23().o8l(this.i());
this.ja1_1 = Companion_getInstance_23().o8l(this.i());
this.ka1_1 = new SegmentHandler();
this.la1_1 = 0;
this.ma1_1 = 1.0;
}
ScanlineWriter.prototype.oa1 = function () {
return this.ca1_1;
};
ScanlineWriter.prototype.pa1 = function () {
return this.da1_1;
};
ScanlineWriter.prototype.qa1 = function () {
return this.fa1_1;
};
ScanlineWriter.prototype.i = function () {
return this.na1_1.ta1_1.d72();
};
ScanlineWriter.prototype.da2 = function () {
return this.na1_1.ta1_1.d72() - 1 | 0;
};
ScanlineWriter.prototype.ea2 = function () {
return this.ga1_1;
};
ScanlineWriter.prototype.fa2 = function () {
return this.ha1_1;
};
ScanlineWriter.prototype.ga2 = function () {
return this.ia1_1;
};
ScanlineWriter.prototype.ha2 = function () {
return this.ja1_1;
};
ScanlineWriter.prototype.d2p = function () {
// Inline function 'com.soywiz.korim.vector.SegmentHandler.forEachFast' call
var tmp0_forEachFast = this.ka1_1;
var inductionVariable = 0;
var last = tmp0_forEachFast.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.korim.vector.ScanlineWriter.reset.<anonymous>' call
var tmp1__anonymous__uwfjfc = tmp0_forEachFast.za0_1.t4n(n);
var tmp2__anonymous__z9zvc9 = tmp0_forEachFast.aa1_1.t4n(n);
fill_0(this.ga1_1, 0.0, tmp1__anonymous__uwfjfc, tmp2__anonymous__z9zvc9 + 1 | 0);
fill(this.ha1_1, 0, tmp1__anonymous__uwfjfc, tmp2__anonymous__z9zvc9 + 1 | 0);
}
while (inductionVariable < last);
this.la1_1 = 0;
this.ka1_1.d2p();
};
ScanlineWriter.prototype.ia2 = function (x0, x1, y0) {
if (this.da2() < 1)
return Unit_getInstance();
var tmp = this.da2();
Companion_getInstance_9();
var x0_0 = coerceIn(x0, 0, imul(tmp, 20));
var tmp_0 = this.da2();
Companion_getInstance_9();
var x1_0 = coerceIn(x1, 0, imul(tmp_0, 20));
Companion_getInstance_9();
var a = x0_0 / 20 | 0;
Companion_getInstance_9();
var b = x1_0 / 20 | 0;
Companion_getInstance_9();
var y = y0 / 20 | 0;
var i0 = coerceIn(a, 0, this.da2());
var i1 = coerceIn(b, 0, this.da2());
Companion_getInstance_9();
var i0m = x0_0 % 20 | 0;
Companion_getInstance_9();
var i1m = x1_0 % 20 | 0;
if (!(this.fa1_1 === y)) {
if (y >= 0) {
this.mj();
}
this.fa1_1 = y;
this.d2p();
}
if (!(this.ea1_1 === y0)) {
this.ea1_1 = y0;
var tmp0_this = this;
var tmp1 = tmp0_this.la1_1;
tmp0_this.la1_1 = tmp1 + 1 | 0;
}
if (i1 > i0) {
this.ka1_1.g7q(i0, i1);
var tmp_1 = i0m;
Companion_getInstance_9();
this.ja2(i0, 1.0 - tmp_1 / 20);
var inductionVariable = i0 + 1 | 0;
if (inductionVariable < i1)
do {
var x = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.ja2(x, 1.0);
}
while (inductionVariable < i1);
if (!(i1m === 0)) {
var tmp_2 = i1m;
Companion_getInstance_9();
this.ja2(i1, tmp_2 / 20);
}
}
};
ScanlineWriter.prototype.ja2 = function (x, ratio) {
var mask = 1 << this.la1_1;
if ((this.ha1_1[x] & mask) === 0) {
this.ha1_1[x] = this.ha1_1[x] | mask;
var tmp0_array = this.ga1_1;
var tmp1_index0 = x;
tmp0_array[tmp1_index0] = tmp0_array[tmp1_index0] + ratio;
}
};
ScanlineWriter.prototype.mj = function () {
var containsUpper = this.na1_1.ta1_1.e72();
var containsArg = this.fa1_1;
if (!(0 <= containsArg ? containsArg < containsUpper : false))
return Unit_getInstance();
var galpha = clamp01_0(this.ma1_1);
var scale_0 = 1.0 / this.la1_1 * galpha;
// Inline function 'com.soywiz.korim.vector.SegmentHandler.forEachFast' call
var tmp0_forEachFast = this.ka1_1;
var inductionVariable = 0;
var last = tmp0_forEachFast.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.korim.vector.ScanlineWriter.flush.<anonymous>' call
var tmp1__anonymous__uwfjfc = tmp0_forEachFast.za0_1.t4n(n);
var tmp2__anonymous__z9zvc9 = tmp0_forEachFast.aa1_1.t4n(n);
var x = tmp1__anonymous__uwfjfc;
var count = (tmp2__anonymous__z9zvc9 - tmp1__anonymous__uwfjfc | 0) + 1 | 0;
this.da1_1.s9w(this.ja1_1, 0, tmp1__anonymous__uwfjfc, tmp2__anonymous__z9zvc9, this.fa1_1);
var inductionVariable_0 = tmp1__anonymous__uwfjfc;
if (inductionVariable_0 <= tmp2__anonymous__z9zvc9)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp1_array = this.ga1_1;
var tmp2_index0 = n_0;
tmp1_array[tmp2_index0] = tmp1_array[tmp2_index0] * scale_0;
}
while (!(n_0 === tmp2__anonymous__z9zvc9));
scale(this.ja1_1, tmp1__anonymous__uwfjfc, this.ga1_1, tmp1__anonymous__uwfjfc, count);
var index = this.na1_1.ta1_1.h7z(0, this.fa1_1) + x | 0;
if (this.na1_1.ta1_1.s7y_1) {
arraycopy(this.na1_1.ta1_1.r86_1, index, _RgbaPremultipliedArray___get_ints__impl__i1gpd7(this.ia1_1), x, count);
} else {
premultiply(_RgbaArray___init__impl__oib4y4(this.na1_1.ta1_1.r86_1), index, this.ia1_1, x, count);
}
this.ca1_1.ka2(this.ia1_1, x, this.ja1_1, x, count);
if (this.na1_1.ta1_1.s7y_1) {
arraycopy(_RgbaPremultipliedArray___get_ints__impl__i1gpd7(this.ia1_1), x, this.na1_1.ta1_1.r86_1, index, count);
} else {
depremultiply(this.ia1_1, x, _RgbaArray___init__impl__oib4y4(this.na1_1.ta1_1.r86_1), index, count);
}
}
while (inductionVariable < last);
};
ScanlineWriter.$metadata$ = classMeta('ScanlineWriter');
function render$flush(this$0, filler, $state, $winding, fillPath) {
if (this$0.wa1_1.pa2_1.t4o()) {
this$0.wa1_1.na2_1 = this$0.ua1_1 ? 4 : 1;
this$0.aa2_1.da1_1 = filler;
this$0.aa2_1.ma1_1 = $state.e8o_1;
this$0.aa2_1.d2p();
var tmp0_elvis_lhs = $winding;
var tmp = tmp0_elvis_lhs == null ? fillPath.h7j_1 : tmp0_elvis_lhs;
this$0.wa1_1.va2(this$0.va1_1, 0, null, tmp, Bitmap32Context2d$render$flush$lambda(this$0), 6, null);
this$0.aa2_1.mj();
this$0.wa1_1.pa2_1.d2p();
}
}
function Bitmap32Context2d$render$flush$lambda(this$0) {
return function (x0, x1, y) {
this$0.aa2_1.ia2(x0, x1, y);
return Unit_getInstance();
};
}
function Bitmap32Context2d(bmp, antialiasing) {
Renderer.call(this);
this.ta1_1 = bmp;
this.ua1_1 = antialiasing;
this.va1_1 = get_float(this.ta1_1.v86_1);
this.wa1_1 = new Rasterizer();
this.xa1_1 = new ColorFiller();
this.ya1_1 = new GradientFiller();
this.za1_1 = new BitmapFiller();
this.aa2_1 = new ScanlineWriter(this);
var tmp = this;
var tmp_0 = Winding_EVEN_ODD_getInstance();
tmp.ba2_1 = VectorPath_init_$Create$(null, null, tmp_0, false, 11, null);
this.ca2_1 = new StrokeToFill();
}
Bitmap32Context2d.prototype.k8b = function () {
return this.ta1_1;
};
Bitmap32Context2d.prototype.d72 = function () {
return this.ta1_1.d72();
};
Bitmap32Context2d.prototype.e72 = function () {
return this.ta1_1.e72();
};
Bitmap32Context2d.prototype.wa2 = function () {
return this.wa1_1;
};
Bitmap32Context2d.prototype.xa2 = function (state, fill, winding) {
var style = fill ? state.y8n_1 : state.x8n_1;
var tmp0_subject = style;
var tmp;
if (tmp0_subject instanceof NonePaint) {
tmp = NoneFiller_getInstance();
} else {
if (tmp0_subject instanceof RGBA) {
tmp = this.xa1_1.r9w(style.n8k_1, state);
} else {
if (tmp0_subject instanceof GradientPaint) {
tmp = this.ya1_1.w9w(style, state);
} else {
if (tmp0_subject instanceof BitmapPaint) {
tmp = this.za1_1.i9x(style, state);
} else {
throw NotImplementedError_init_$Create$(null, 1, null);
}
}
}
}
var filler = tmp;
this.aa2_1.ca1_1 = state.f8o_1;
this.wa1_1.d2p();
this.wa1_1.la2_1 = this.ya2_1;
var doingStroke = !fill;
var tmp_0;
if (fill) {
tmp_0 = state.q8n_1;
} else {
this.ba2_1.x7();
var tmp1_$receiver = state.q8n_1;
var tmp2_lineWidth = state.aa3();
var tmp3_joins = state.v8n_1;
var tmp4_startCap = state.t8n_1;
var tmp5_endCap = state.u8n_1;
var tmp6_miterLimit = state.w8n_1;
var tmp7_temp = this.ca2_1;
var tmp8_outFill = this.ba2_1;
var tmp9_lineDash = state.g8o_1;
var tmp10_lineDashOffset = state.h8o_1;
tmp_0 = strokeToFill(tmp1_$receiver, tmp2_lineWidth, tmp3_joins, tmp4_startCap, tmp5_endCap, tmp6_miterLimit, tmp9_lineDash, tmp10_lineDashOffset, tmp7_temp, tmp8_outFill);
}
var fillPath = tmp_0;
if (!(state.p8n_1 == null)) {
this.wa1_1.qa2_1.m7p_1 = ensureNotNull(state.p8n_1).h7j_1;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2' call
var tmp0_emitPoints2 = ensureNotNull(state.p8n_1);
var ix = 0.0;
var iy = 0.0;
var lx = {_v: 0.0};
var ly = {_v: 0.0};
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (false) {
this.wa1_1.qa2_1.x2c();
}
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds' call
var n = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = tmp0_emitPoints2.f7j_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.t4n(tmp0);
var tmp0_subject_0 = tmp1__anonymous__uwfjfc;
Command_getInstance();
if (tmp0_subject_0 === 0) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp1 = n;
n = tmp1 + 1 | 0;
var tmp2__anonymous__z9zvc9 = tmp0_emitPoints2.g7j_1.m(tmp1);
var tmp2 = n;
n = tmp2 + 1 | 0;
var tmp3__anonymous__ufb84q = tmp0_emitPoints2.g7j_1.m(tmp2);
ix = tmp2__anonymous__z9zvc9;
iy = tmp3__anonymous__ufb84q;
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
this.wa1_1.qa2_1.m7q(tmp2__anonymous__z9zvc9, tmp3__anonymous__ufb84q, true);
lx._v = tmp2__anonymous__z9zvc9;
ly._v = tmp3__anonymous__ufb84q;
} else {
Command_getInstance();
if (tmp0_subject_0 === 1) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp3 = n;
n = tmp3 + 1 | 0;
var tmp4__anonymous__pkmkx7 = tmp0_emitPoints2.g7j_1.m(tmp3);
var tmp4 = n;
n = tmp4 + 1 | 0;
var tmp5__anonymous__kpxxpo = tmp0_emitPoints2.g7j_1.m(tmp4);
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
this.wa1_1.qa2_1.m7q(tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, false);
lx._v = tmp4__anonymous__pkmkx7;
ly._v = tmp5__anonymous__kpxxpo;
var tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject_0 === 2) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp5 = n;
n = tmp5 + 1 | 0;
var tmp6__anonymous__fv9ai5 = tmp0_emitPoints2.g7j_1.m(tmp5);
var tmp6 = n;
n = tmp6 + 1 | 0;
var tmp7__anonymous__b0knam = tmp0_emitPoints2.g7j_1.m(tmp6);
var tmp7 = n;
n = tmp7 + 1 | 0;
var tmp8__anonymous__65w033 = tmp0_emitPoints2.g7j_1.m(tmp7);
var tmp8 = n;
n = tmp8 + 1 | 0;
var tmp9__anonymous__1b7cvk = tmp0_emitPoints2.g7j_1.m(tmp8);
var sum = Companion_getInstance_4().i7a(lx._v, ly._v, tmp6__anonymous__fv9ai5, tmp7__anonymous__b0knam) + Companion_getInstance_4().i7a(tmp6__anonymous__fv9ai5, tmp7__anonymous__b0knam, tmp8__anonymous__65w033, tmp9__anonymous__1b7cvk);
// Inline function 'com.soywiz.korma.geom.shape.approximateCurve' call
var tmp0_approximateCurve = numberToInt(sum);
var tmp$ret$1;
// Inline function 'kotlin.math.max' call
tmp$ret$1 = Math.max(tmp0_approximateCurve, 20);
var rcurveSteps = tmp$ret$1;
var dt = 1.0 / rcurveSteps;
var lastX = {_v: 0.0};
var lastY = {_v: 0.0};
var prevX = {_v: 0.0};
var prevY = {_v: 0.0};
var emittedCount = {_v: 0};
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.quadCalc' call
var tmp0_quadCalc = Companion_getInstance_10();
var tmp1_quadCalc = lx._v;
var tmp2_quadCalc = ly._v;
// Inline function 'kotlin.contracts.contract' call
var t1 = 1.0;
var a = t1 * t1;
var c = 0.0;
var b = 2 * t1 * 0.0;
var tmp3__anonymous__ufb84q_0 = a * tmp1_quadCalc + b * tmp6__anonymous__fv9ai5 + c * tmp8__anonymous__65w033;
var tmp4__anonymous__pkmkx7_0 = a * tmp2_quadCalc + b * tmp7__anonymous__b0knam + c * tmp9__anonymous__1b7cvk;
lastX._v = tmp3__anonymous__ufb84q_0;
lastY._v = tmp4__anonymous__pkmkx7_0;
tmp$ret$2 = Unit_getInstance();
var nStart = false ? 0 : 1;
var nEnd = rcurveSteps;
var inductionVariable = nStart;
if (inductionVariable <= nEnd)
do {
var n_1 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var ratio = n_1 * dt;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$4;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.quadCalc' call
var tmp0_quadCalc_0 = Companion_getInstance_10();
var tmp1_quadCalc_0 = lx._v;
var tmp2_quadCalc_0 = ly._v;
// Inline function 'kotlin.contracts.contract' call
var t1_0 = 1 - ratio;
var a_0 = t1_0 * t1_0;
var c_0 = ratio * ratio;
var b_0 = 2 * t1_0 * ratio;
var tmp3__anonymous__ufb84q_1 = a_0 * tmp1_quadCalc_0 + b_0 * tmp6__anonymous__fv9ai5 + c_0 * tmp8__anonymous__65w033;
var tmp4__anonymous__pkmkx7_1 = a_0 * tmp2_quadCalc_0 + b_0 * tmp7__anonymous__b0knam + c_0 * tmp9__anonymous__1b7cvk;
var tmp$ret$3;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
this.wa1_1.qa2_1.m7q(tmp3__anonymous__ufb84q_1, tmp4__anonymous__pkmkx7_1, false);
var tmp0_0 = emittedCount._v;
emittedCount._v = tmp0_0 + 1 | 0;
lastX._v = prevX._v;
lastY._v = prevY._v;
tmp$ret$3 = Unit_getInstance();
prevX._v = tmp3__anonymous__ufb84q_1;
prevY._v = tmp4__anonymous__pkmkx7_1;
tmp$ret$4 = Unit_getInstance();
}
while (!(n_1 === nEnd));
lx._v = tmp8__anonymous__65w033;
ly._v = tmp9__anonymous__1b7cvk;
var tmp$ret$5;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$5 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject_0 === 3) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp9 = n;
n = tmp9 + 1 | 0;
var tmp10__anonymous__yfiz50 = tmp0_emitPoints2.g7j_1.m(tmp9);
var tmp10 = n;
n = tmp10 + 1 | 0;
var tmp11__anonymous__tkubxh = tmp0_emitPoints2.g7j_1.m(tmp10);
var tmp11 = n;
n = tmp11 + 1 | 0;
var tmp12__anonymous__oq5opy = tmp0_emitPoints2.g7j_1.m(tmp11);
var tmp12 = n;
n = tmp12 + 1 | 0;
var tmp13__anonymous__jvh1if = tmp0_emitPoints2.g7j_1.m(tmp12);
var tmp13 = n;
n = tmp13 + 1 | 0;
var tmp14__anonymous__f0seaw = tmp0_emitPoints2.g7j_1.m(tmp13);
var tmp14 = n;
n = tmp14 + 1 | 0;
var tmp15__anonymous__a63r3d = tmp0_emitPoints2.g7j_1.m(tmp14);
var sum_0 = Companion_getInstance_4().i7a(lx._v, ly._v, tmp10__anonymous__yfiz50, tmp11__anonymous__tkubxh) + Companion_getInstance_4().i7a(tmp10__anonymous__yfiz50, tmp11__anonymous__tkubxh, tmp12__anonymous__oq5opy, tmp13__anonymous__jvh1if) + Companion_getInstance_4().i7a(tmp12__anonymous__oq5opy, tmp13__anonymous__jvh1if, tmp14__anonymous__f0seaw, tmp15__anonymous__a63r3d);
// Inline function 'com.soywiz.korma.geom.shape.approximateCurve' call
var tmp0_approximateCurve_0 = numberToInt(sum_0);
var tmp$ret$6;
// Inline function 'kotlin.math.max' call
tmp$ret$6 = Math.max(tmp0_approximateCurve_0, 20);
var rcurveSteps_0 = tmp$ret$6;
var dt_0 = 1.0 / rcurveSteps_0;
var lastX_0 = {_v: 0.0};
var lastY_0 = {_v: 0.0};
var prevX_0 = {_v: 0.0};
var prevY_0 = {_v: 0.0};
var emittedCount_0 = {_v: 0};
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$7;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.cubicCalc' call
var tmp0_cubicCalc = Companion_getInstance_10();
var tmp1_cubicCalc = lx._v;
var tmp2_cubicCalc = ly._v;
// Inline function 'kotlin.contracts.contract' call
var cx = 3.0 * (tmp10__anonymous__yfiz50 - tmp1_cubicCalc);
var bx = 3.0 * (tmp12__anonymous__oq5opy - tmp10__anonymous__yfiz50) - cx;
var ax = tmp14__anonymous__f0seaw - tmp1_cubicCalc - cx - bx;
var cy = 3.0 * (tmp11__anonymous__tkubxh - tmp2_cubicCalc);
var by = 3.0 * (tmp13__anonymous__jvh1if - tmp11__anonymous__tkubxh) - cy;
var ay = tmp15__anonymous__a63r3d - tmp2_cubicCalc - cy - by;
var tSquared = 0.0;
var tCubed = tSquared * 0.0;
var tmp3__anonymous__ufb84q_2 = ax * tCubed + bx * tSquared + cx * 0.0 + tmp1_cubicCalc;
var tmp4__anonymous__pkmkx7_2 = ay * tCubed + by * tSquared + cy * 0.0 + tmp2_cubicCalc;
lastX_0._v = tmp3__anonymous__ufb84q_2;
lastY_0._v = tmp4__anonymous__pkmkx7_2;
tmp$ret$7 = Unit_getInstance();
var nStart_0 = false ? 0 : 1;
var nEnd_0 = rcurveSteps_0;
var inductionVariable_0 = nStart_0;
if (inductionVariable_0 <= nEnd_0)
do {
var n_2 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var ratio_0 = n_2 * dt_0;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$9;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.cubicCalc' call
var tmp0_cubicCalc_0 = Companion_getInstance_10();
var tmp1_cubicCalc_0 = lx._v;
var tmp2_cubicCalc_0 = ly._v;
// Inline function 'kotlin.contracts.contract' call
var cx_0 = 3.0 * (tmp10__anonymous__yfiz50 - tmp1_cubicCalc_0);
var bx_0 = 3.0 * (tmp12__anonymous__oq5opy - tmp10__anonymous__yfiz50) - cx_0;
var ax_0 = tmp14__anonymous__f0seaw - tmp1_cubicCalc_0 - cx_0 - bx_0;
var cy_0 = 3.0 * (tmp11__anonymous__tkubxh - tmp2_cubicCalc_0);
var by_0 = 3.0 * (tmp13__anonymous__jvh1if - tmp11__anonymous__tkubxh) - cy_0;
var ay_0 = tmp15__anonymous__a63r3d - tmp2_cubicCalc_0 - cy_0 - by_0;
var tSquared_0 = ratio_0 * ratio_0;
var tCubed_0 = tSquared_0 * ratio_0;
var tmp3__anonymous__ufb84q_3 = ax_0 * tCubed_0 + bx_0 * tSquared_0 + cx_0 * ratio_0 + tmp1_cubicCalc_0;
var tmp4__anonymous__pkmkx7_3 = ay_0 * tCubed_0 + by_0 * tSquared_0 + cy_0 * ratio_0 + tmp2_cubicCalc_0;
var tmp$ret$8;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
this.wa1_1.qa2_1.m7q(tmp3__anonymous__ufb84q_3, tmp4__anonymous__pkmkx7_3, false);
var tmp0_1 = emittedCount_0._v;
emittedCount_0._v = tmp0_1 + 1 | 0;
lastX_0._v = prevX_0._v;
lastY_0._v = prevY_0._v;
tmp$ret$8 = Unit_getInstance();
prevX_0._v = tmp3__anonymous__ufb84q_3;
prevY_0._v = tmp4__anonymous__pkmkx7_3;
tmp$ret$9 = Unit_getInstance();
}
while (!(n_2 === nEnd_0));
lx._v = tmp14__anonymous__f0seaw;
ly._v = tmp15__anonymous__a63r3d;
var tmp$ret$10;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$10 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject_0 === 4) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
var tmp1__anonymous__uwfjfc_0 = ix;
var tmp2__anonymous__z9zvc9_0 = iy;
this.wa1_1.qa2_1.m7q(tmp1__anonymous__uwfjfc_0, tmp2__anonymous__z9zvc9_0, false);
var tmp$ret$11;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$11 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
{
this.wa1_1.qa2_1.x2c();
}
}
}
}
}
}
}
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (false) {
this.wa1_1.qa2_1.x2c();
}
}
var tmp_1 = this.wa1_1.pa2_1;
var tmp11_elvis_lhs = winding;
tmp_1.m7p_1 = tmp11_elvis_lhs == null ? ensureNotNull(state.q8n_1).h7j_1 : tmp11_elvis_lhs;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2' call
var ix_0 = 0.0;
var iy_0 = 0.0;
var lx_0 = {_v: 0.0};
var ly_0 = {_v: 0.0};
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (false) {
this.wa1_1.pa2_1.x2c();
}
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds' call
var n_3 = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach_0 = fillPath.f7j_1;
var n_4 = 0;
while (n_4 < tmp0_fastForEach_0.i()) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds.<anonymous>' call
var tmp0_2 = n_4;
n_4 = tmp0_2 + 1 | 0;
var tmp1__anonymous__uwfjfc_1 = tmp0_fastForEach_0.t4n(tmp0_2);
var tmp0_subject_1 = tmp1__anonymous__uwfjfc_1;
Command_getInstance();
if (tmp0_subject_1 === 0) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp1_0 = n_3;
n_3 = tmp1_0 + 1 | 0;
var tmp2__anonymous__z9zvc9_1 = fillPath.g7j_1.m(tmp1_0);
var tmp2_0 = n_3;
n_3 = tmp2_0 + 1 | 0;
var tmp3__anonymous__ufb84q_4 = fillPath.g7j_1.m(tmp2_0);
ix_0 = tmp2__anonymous__z9zvc9_1;
iy_0 = tmp3__anonymous__ufb84q_4;
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (doingStroke) {
{
render$flush(this, filler, state, winding, fillPath);
}
}
this.wa1_1.pa2_1.m7q(tmp2__anonymous__z9zvc9_1, tmp3__anonymous__ufb84q_4, true);
lx_0._v = tmp2__anonymous__z9zvc9_1;
ly_0._v = tmp3__anonymous__ufb84q_4;
} else {
Command_getInstance();
if (tmp0_subject_1 === 1) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp3_0 = n_3;
n_3 = tmp3_0 + 1 | 0;
var tmp4__anonymous__pkmkx7_4 = fillPath.g7j_1.m(tmp3_0);
var tmp4_0 = n_3;
n_3 = tmp4_0 + 1 | 0;
var tmp5__anonymous__kpxxpo_0 = fillPath.g7j_1.m(tmp4_0);
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (doingStroke) {
if (false) {
render$flush(this, filler, state, winding, fillPath);
}
}
this.wa1_1.pa2_1.m7q(tmp4__anonymous__pkmkx7_4, tmp5__anonymous__kpxxpo_0, false);
lx_0._v = tmp4__anonymous__pkmkx7_4;
ly_0._v = tmp5__anonymous__kpxxpo_0;
var tmp$ret$12;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$12 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject_1 === 2) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp5_0 = n_3;
n_3 = tmp5_0 + 1 | 0;
var tmp6__anonymous__fv9ai5_0 = fillPath.g7j_1.m(tmp5_0);
var tmp6_0 = n_3;
n_3 = tmp6_0 + 1 | 0;
var tmp7__anonymous__b0knam_0 = fillPath.g7j_1.m(tmp6_0);
var tmp7_0 = n_3;
n_3 = tmp7_0 + 1 | 0;
var tmp8__anonymous__65w033_0 = fillPath.g7j_1.m(tmp7_0);
var tmp8_0 = n_3;
n_3 = tmp8_0 + 1 | 0;
var tmp9__anonymous__1b7cvk_0 = fillPath.g7j_1.m(tmp8_0);
var sum_1 = Companion_getInstance_4().i7a(lx_0._v, ly_0._v, tmp6__anonymous__fv9ai5_0, tmp7__anonymous__b0knam_0) + Companion_getInstance_4().i7a(tmp6__anonymous__fv9ai5_0, tmp7__anonymous__b0knam_0, tmp8__anonymous__65w033_0, tmp9__anonymous__1b7cvk_0);
// Inline function 'com.soywiz.korma.geom.shape.approximateCurve' call
var tmp0_approximateCurve_1 = numberToInt(sum_1);
var tmp$ret$13;
// Inline function 'kotlin.math.max' call
tmp$ret$13 = Math.max(tmp0_approximateCurve_1, 20);
var rcurveSteps_1 = tmp$ret$13;
var dt_1 = 1.0 / rcurveSteps_1;
var lastX_1 = {_v: 0.0};
var lastY_1 = {_v: 0.0};
var prevX_1 = {_v: 0.0};
var prevY_1 = {_v: 0.0};
var emittedCount_1 = {_v: 0};
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$14;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.quadCalc' call
var tmp0_quadCalc_1 = Companion_getInstance_10();
var tmp1_quadCalc_1 = lx_0._v;
var tmp2_quadCalc_1 = ly_0._v;
// Inline function 'kotlin.contracts.contract' call
var t1_1 = 1.0;
var a_1 = t1_1 * t1_1;
var c_1 = 0.0;
var b_1 = 2 * t1_1 * 0.0;
var tmp3__anonymous__ufb84q_5 = a_1 * tmp1_quadCalc_1 + b_1 * tmp6__anonymous__fv9ai5_0 + c_1 * tmp8__anonymous__65w033_0;
var tmp4__anonymous__pkmkx7_5 = a_1 * tmp2_quadCalc_1 + b_1 * tmp7__anonymous__b0knam_0 + c_1 * tmp9__anonymous__1b7cvk_0;
lastX_1._v = tmp3__anonymous__ufb84q_5;
lastY_1._v = tmp4__anonymous__pkmkx7_5;
tmp$ret$14 = Unit_getInstance();
var nStart_1 = false ? 0 : 1;
var nEnd_1 = rcurveSteps_1;
var inductionVariable_1 = nStart_1;
if (inductionVariable_1 <= nEnd_1)
do {
var n_5 = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
var ratio_1 = n_5 * dt_1;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$16;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.quadCalc' call
var tmp0_quadCalc_2 = Companion_getInstance_10();
var tmp1_quadCalc_2 = lx_0._v;
var tmp2_quadCalc_2 = ly_0._v;
// Inline function 'kotlin.contracts.contract' call
var t1_2 = 1 - ratio_1;
var a_2 = t1_2 * t1_2;
var c_2 = ratio_1 * ratio_1;
var b_2 = 2 * t1_2 * ratio_1;
var tmp3__anonymous__ufb84q_6 = a_2 * tmp1_quadCalc_2 + b_2 * tmp6__anonymous__fv9ai5_0 + c_2 * tmp8__anonymous__65w033_0;
var tmp4__anonymous__pkmkx7_6 = a_2 * tmp2_quadCalc_2 + b_2 * tmp7__anonymous__b0knam_0 + c_2 * tmp9__anonymous__1b7cvk_0;
var tmp$ret$15;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (doingStroke) {
if (false) {
render$flush(this, filler, state, winding, fillPath);
}
}
this.wa1_1.pa2_1.m7q(tmp3__anonymous__ufb84q_6, tmp4__anonymous__pkmkx7_6, false);
var tmp0_3 = emittedCount_1._v;
emittedCount_1._v = tmp0_3 + 1 | 0;
lastX_1._v = prevX_1._v;
lastY_1._v = prevY_1._v;
tmp$ret$15 = Unit_getInstance();
prevX_1._v = tmp3__anonymous__ufb84q_6;
prevY_1._v = tmp4__anonymous__pkmkx7_6;
tmp$ret$16 = Unit_getInstance();
}
while (!(n_5 === nEnd_1));
lx_0._v = tmp8__anonymous__65w033_0;
ly_0._v = tmp9__anonymous__1b7cvk_0;
var tmp$ret$17;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$17 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject_1 === 3) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp9_0 = n_3;
n_3 = tmp9_0 + 1 | 0;
var tmp10__anonymous__yfiz50_0 = fillPath.g7j_1.m(tmp9_0);
var tmp10_0 = n_3;
n_3 = tmp10_0 + 1 | 0;
var tmp11__anonymous__tkubxh_0 = fillPath.g7j_1.m(tmp10_0);
var tmp11_0 = n_3;
n_3 = tmp11_0 + 1 | 0;
var tmp12__anonymous__oq5opy_0 = fillPath.g7j_1.m(tmp11_0);
var tmp12_0 = n_3;
n_3 = tmp12_0 + 1 | 0;
var tmp13__anonymous__jvh1if_0 = fillPath.g7j_1.m(tmp12_0);
var tmp13_0 = n_3;
n_3 = tmp13_0 + 1 | 0;
var tmp14__anonymous__f0seaw_0 = fillPath.g7j_1.m(tmp13_0);
var tmp14_0 = n_3;
n_3 = tmp14_0 + 1 | 0;
var tmp15__anonymous__a63r3d_0 = fillPath.g7j_1.m(tmp14_0);
var sum_2 = Companion_getInstance_4().i7a(lx_0._v, ly_0._v, tmp10__anonymous__yfiz50_0, tmp11__anonymous__tkubxh_0) + Companion_getInstance_4().i7a(tmp10__anonymous__yfiz50_0, tmp11__anonymous__tkubxh_0, tmp12__anonymous__oq5opy_0, tmp13__anonymous__jvh1if_0) + Companion_getInstance_4().i7a(tmp12__anonymous__oq5opy_0, tmp13__anonymous__jvh1if_0, tmp14__anonymous__f0seaw_0, tmp15__anonymous__a63r3d_0);
// Inline function 'com.soywiz.korma.geom.shape.approximateCurve' call
var tmp0_approximateCurve_2 = numberToInt(sum_2);
var tmp$ret$18;
// Inline function 'kotlin.math.max' call
tmp$ret$18 = Math.max(tmp0_approximateCurve_2, 20);
var rcurveSteps_2 = tmp$ret$18;
var dt_2 = 1.0 / rcurveSteps_2;
var lastX_2 = {_v: 0.0};
var lastY_2 = {_v: 0.0};
var prevX_2 = {_v: 0.0};
var prevY_2 = {_v: 0.0};
var emittedCount_2 = {_v: 0};
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$19;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.cubicCalc' call
var tmp0_cubicCalc_1 = Companion_getInstance_10();
var tmp1_cubicCalc_1 = lx_0._v;
var tmp2_cubicCalc_1 = ly_0._v;
// Inline function 'kotlin.contracts.contract' call
var cx_1 = 3.0 * (tmp10__anonymous__yfiz50_0 - tmp1_cubicCalc_1);
var bx_1 = 3.0 * (tmp12__anonymous__oq5opy_0 - tmp10__anonymous__yfiz50_0) - cx_1;
var ax_1 = tmp14__anonymous__f0seaw_0 - tmp1_cubicCalc_1 - cx_1 - bx_1;
var cy_1 = 3.0 * (tmp11__anonymous__tkubxh_0 - tmp2_cubicCalc_1);
var by_1 = 3.0 * (tmp13__anonymous__jvh1if_0 - tmp11__anonymous__tkubxh_0) - cy_1;
var ay_1 = tmp15__anonymous__a63r3d_0 - tmp2_cubicCalc_1 - cy_1 - by_1;
var tSquared_1 = 0.0;
var tCubed_1 = tSquared_1 * 0.0;
var tmp3__anonymous__ufb84q_7 = ax_1 * tCubed_1 + bx_1 * tSquared_1 + cx_1 * 0.0 + tmp1_cubicCalc_1;
var tmp4__anonymous__pkmkx7_7 = ay_1 * tCubed_1 + by_1 * tSquared_1 + cy_1 * 0.0 + tmp2_cubicCalc_1;
lastX_2._v = tmp3__anonymous__ufb84q_7;
lastY_2._v = tmp4__anonymous__pkmkx7_7;
tmp$ret$19 = Unit_getInstance();
var nStart_2 = false ? 0 : 1;
var nEnd_2 = rcurveSteps_2;
var inductionVariable_2 = nStart_2;
if (inductionVariable_2 <= nEnd_2)
do {
var n_6 = inductionVariable_2;
inductionVariable_2 = inductionVariable_2 + 1 | 0;
var ratio_2 = n_6 * dt_2;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$21;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.cubicCalc' call
var tmp0_cubicCalc_2 = Companion_getInstance_10();
var tmp1_cubicCalc_2 = lx_0._v;
var tmp2_cubicCalc_2 = ly_0._v;
// Inline function 'kotlin.contracts.contract' call
var cx_2 = 3.0 * (tmp10__anonymous__yfiz50_0 - tmp1_cubicCalc_2);
var bx_2 = 3.0 * (tmp12__anonymous__oq5opy_0 - tmp10__anonymous__yfiz50_0) - cx_2;
var ax_2 = tmp14__anonymous__f0seaw_0 - tmp1_cubicCalc_2 - cx_2 - bx_2;
var cy_2 = 3.0 * (tmp11__anonymous__tkubxh_0 - tmp2_cubicCalc_2);
var by_2 = 3.0 * (tmp13__anonymous__jvh1if_0 - tmp11__anonymous__tkubxh_0) - cy_2;
var ay_2 = tmp15__anonymous__a63r3d_0 - tmp2_cubicCalc_2 - cy_2 - by_2;
var tSquared_2 = ratio_2 * ratio_2;
var tCubed_2 = tSquared_2 * ratio_2;
var tmp3__anonymous__ufb84q_8 = ax_2 * tCubed_2 + bx_2 * tSquared_2 + cx_2 * ratio_2 + tmp1_cubicCalc_2;
var tmp4__anonymous__pkmkx7_8 = ay_2 * tCubed_2 + by_2 * tSquared_2 + cy_2 * ratio_2 + tmp2_cubicCalc_2;
var tmp$ret$20;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (doingStroke) {
if (false) {
render$flush(this, filler, state, winding, fillPath);
}
}
this.wa1_1.pa2_1.m7q(tmp3__anonymous__ufb84q_8, tmp4__anonymous__pkmkx7_8, false);
var tmp0_4 = emittedCount_2._v;
emittedCount_2._v = tmp0_4 + 1 | 0;
lastX_2._v = prevX_2._v;
lastY_2._v = prevY_2._v;
tmp$ret$20 = Unit_getInstance();
prevX_2._v = tmp3__anonymous__ufb84q_8;
prevY_2._v = tmp4__anonymous__pkmkx7_8;
tmp$ret$21 = Unit_getInstance();
}
while (!(n_6 === nEnd_2));
lx_0._v = tmp14__anonymous__f0seaw_0;
ly_0._v = tmp15__anonymous__a63r3d_0;
var tmp$ret$22;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$22 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject_1 === 4) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
var tmp3__anonymous__ufb84q_9 = ix_0;
var tmp4__anonymous__pkmkx7_9 = iy_0;
if (doingStroke) {
if (false) {
render$flush(this, filler, state, winding, fillPath);
}
}
this.wa1_1.pa2_1.m7q(tmp3__anonymous__ufb84q_9, tmp4__anonymous__pkmkx7_9, false);
var tmp$ret$23;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$23 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
{
this.wa1_1.pa2_1.x2c();
}
}
}
}
}
}
}
// Inline function 'com.soywiz.korim.vector.Bitmap32Context2d.render.<anonymous>' call
if (false) {
this.wa1_1.pa2_1.x2c();
}
render$flush(this, filler, state, winding, fillPath);
};
Bitmap32Context2d.$metadata$ = classMeta('Bitmap32Context2d', undefined, undefined, undefined, undefined, Renderer.prototype);
function CompositeOperation$Companion$UNIMPLEMENTED$lambda(dst, dstN, src, srcN, count) {
mix_0(dst.p8l_1, dstN, src.p8l_1, srcN, count);
return Unit_getInstance();
}
function CompositeOperation$Companion$invoke$1($func) {
this.fa3_1 = $func;
}
CompositeOperation$Companion$invoke$1.prototype.ka2 = function (dst, dstN, src, srcN, count) {
return this.fa3_1(new RgbaPremultipliedArray(dst), dstN, new RgbaPremultipliedArray(src), srcN, count);
};
CompositeOperation$Companion$invoke$1.$metadata$ = classMeta(undefined, [CompositeOperation]);
function Companion_33() {
Companion_instance_33 = this;
var tmp = this;
var tmp_0 = Companion_getInstance_46();
tmp.ga3_1 = tmp_0.ha3(CompositeOperation$Companion$UNIMPLEMENTED$lambda);
}
Companion_33.prototype.ha3 = function (func) {
return new CompositeOperation$Companion$invoke$1(func);
};
Companion_33.$metadata$ = objectMeta('Companion');
var Companion_instance_33;
function Companion_getInstance_46() {
if (Companion_instance_33 == null)
new Companion_33();
return Companion_instance_33;
}
function CompositeOperation() {
}
CompositeOperation.$metadata$ = interfaceMeta('CompositeOperation');
var CompositeMode_CLEAR_instance;
var CompositeMode_COPY_instance;
var CompositeMode_SOURCE_OVER_instance;
var CompositeMode_DESTINATION_OVER_instance;
var CompositeMode_SOURCE_IN_instance;
var CompositeMode_DESTINATION_IN_instance;
var CompositeMode_SOURCE_OUT_instance;
var CompositeMode_DESTINATION_OUT_instance;
var CompositeMode_SOURCE_ATOP_instance;
var CompositeMode_DESTINATION_ATOP_instance;
var CompositeMode_XOR_instance;
var CompositeMode_LIGHTER_instance;
function Companion_34() {
Companion_instance_34 = this;
}
Companion_34.prototype.p7s = function () {
return CompositeMode_SOURCE_OVER_getInstance();
};
Companion_34.$metadata$ = objectMeta('Companion');
var Companion_instance_34;
function Companion_getInstance_47() {
CompositeMode_initEntries();
if (Companion_instance_34 == null)
new Companion_34();
return Companion_instance_34;
}
function CompositeMode$lambda(dst, dstN, src, srcN, count) {
var inductionVariable = 0;
var last = count;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var d = RgbaPremultipliedArray__get_impl_1u69ta(dst.p8l_1, dstN + n | 0);
var s = RgbaPremultipliedArray__get_impl_1u69ta(src.p8l_1, srcN + n | 0);
RgbaPremultipliedArray__set_impl_7fwbby(dst.p8l_1, dstN + n | 0, _RGBA___get_premultiplied__impl__3bulqc(RGBA__withA_impl_vogscm(_RGBAPremultiplied___get_depremultiplied__impl__q1zu93(d), clampUByte(_RGBAPremultiplied___get_a__impl__f0hnd1(d) - _RGBAPremultiplied___get_a__impl__f0hnd1(s) | 0))));
}
while (inductionVariable < last);
return Unit_getInstance();
}
function CompositeMode$lambda_0(dst, dstN, src, srcN, count) {
mix_1(dst.p8l_1, dstN, dst.p8l_1, dstN, src.p8l_1, srcN, count);
return Unit_getInstance();
}
function CompositeMode$lambda_1(dst, dstN, src, srcN, count) {
mix_1(dst.p8l_1, dstN, src.p8l_1, srcN, dst.p8l_1, dstN, count);
return Unit_getInstance();
}
var CompositeMode_entriesInitialized;
function CompositeMode_initEntries() {
if (CompositeMode_entriesInitialized)
return Unit_getInstance();
CompositeMode_entriesInitialized = true;
var tmp = Companion_getInstance_46();
CompositeMode_CLEAR_instance = new CompositeMode('CLEAR', 0, tmp.ha3(CompositeMode$lambda));
CompositeMode_COPY_instance = new CompositeMode('COPY', 1, Companion_getInstance_46().ga3_1);
var tmp_0 = Companion_getInstance_46();
CompositeMode_SOURCE_OVER_instance = new CompositeMode('SOURCE_OVER', 2, tmp_0.ha3(CompositeMode$lambda_0));
var tmp_1 = Companion_getInstance_46();
CompositeMode_DESTINATION_OVER_instance = new CompositeMode('DESTINATION_OVER', 3, tmp_1.ha3(CompositeMode$lambda_1));
CompositeMode_SOURCE_IN_instance = new CompositeMode('SOURCE_IN', 4, Companion_getInstance_46().ga3_1);
CompositeMode_DESTINATION_IN_instance = new CompositeMode('DESTINATION_IN', 5, Companion_getInstance_46().ga3_1);
CompositeMode_SOURCE_OUT_instance = new CompositeMode('SOURCE_OUT', 6, Companion_getInstance_46().ga3_1);
CompositeMode_DESTINATION_OUT_instance = new CompositeMode('DESTINATION_OUT', 7, Companion_getInstance_46().ga3_1);
CompositeMode_SOURCE_ATOP_instance = new CompositeMode('SOURCE_ATOP', 8, Companion_getInstance_46().ga3_1);
CompositeMode_DESTINATION_ATOP_instance = new CompositeMode('DESTINATION_ATOP', 9, Companion_getInstance_46().ga3_1);
CompositeMode_XOR_instance = new CompositeMode('XOR', 10, Companion_getInstance_46().ga3_1);
CompositeMode_LIGHTER_instance = new CompositeMode('LIGHTER', 11, Companion_getInstance_46().ga3_1);
Companion_getInstance_47();
}
function CompositeMode(name, ordinal, op) {
Enum.call(this, name, ordinal);
this.ka3_1 = op;
}
CompositeMode.prototype.ka2 = function (dst, dstN, src, srcN, count) {
this.ka3_1.ka2(dst, dstN, src, srcN, count);
};
CompositeMode.$metadata$ = classMeta('CompositeMode', [CompositeOperation], undefined, undefined, undefined, Enum.prototype);
function BlendMode() {
}
BlendMode.$metadata$ = classMeta('BlendMode', [CompositeOperation], undefined, undefined, undefined, Enum.prototype);
function get_DEFAULT(_this__u8e3s4) {
return Companion_getInstance_47().p7s();
}
function CompositeMode_SOURCE_OVER_getInstance() {
CompositeMode_initEntries();
return CompositeMode_SOURCE_OVER_instance;
}
function State_init_$Init$(transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0)) {
transform = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
if (!(($mask0 & 2) === 0))
clip = null;
if (!(($mask0 & 4) === 0)) {
path = VectorPath_init_$Create$(null, null, null, false, 15, null);
}
if (!(($mask0 & 8) === 0))
lineScaleMode = LineScaleMode_NORMAL_getInstance();
if (!(($mask0 & 16) === 0))
lineWidth = 1.0;
if (!(($mask0 & 32) === 0))
startLineCap = LineCap_BUTT_getInstance();
if (!(($mask0 & 64) === 0))
endLineCap = LineCap_BUTT_getInstance();
if (!(($mask0 & 128) === 0))
lineJoin = LineJoin_MITER_getInstance();
if (!(($mask0 & 256) === 0))
miterLimit = 10.0;
if (!(($mask0 & 512) === 0))
strokeStyle = new RGBA(get_DefaultPaint());
if (!(($mask0 & 1024) === 0))
fillStyle = new RGBA(get_DefaultPaint());
if (!(($mask0 & 2048) === 0))
fontRegistry = null;
if (!(($mask0 & 4096) === 0))
font = null;
if (!(($mask0 & 8192) === 0))
fontSize = 24.0;
if (!(($mask0 & 16384) === 0))
verticalAlign = Companion_getInstance_43().u9y_1;
if (!(($mask0 & 32768) === 0))
horizontalAlign = Companion_getInstance_44().d9z_1;
if (!(($mask0 & 65536) === 0))
globalAlpha = 1.0;
if (!(($mask0 & 131072) === 0))
globalCompositeOperation = CompositeMode_SOURCE_OVER_getInstance();
if (!(($mask0 & 262144) === 0))
lineDash = null;
if (!(($mask0 & 524288) === 0))
lineDashOffset = 0.0;
State.call($this, transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset);
return $this;
}
function State_init_$Create$(transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset, $mask0, $marker) {
return State_init_$Init$(transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset, $mask0, $marker, Object.create(State.prototype));
}
function Context2d$State$transformTransform$delegate$lambda(this$0) {
return function () {
var tmp = this$0.o8n_1;
return tmp.e77(null, 1, null);
};
}
function Context2d_init_$Init$(renderer, defaultFontRegistry, defaultFont, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
defaultFontRegistry = null;
if (!(($mask0 & 4) === 0))
defaultFont = null;
Context2d.call($this, renderer, defaultFontRegistry, defaultFont);
return $this;
}
function Context2d_init_$Create$(renderer, defaultFontRegistry, defaultFont, $mask0, $marker) {
return Context2d_init_$Init$(renderer, defaultFontRegistry, defaultFont, $mask0, $marker, Object.create(Context2d.prototype));
}
function State(transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset) {
this.o8n_1 = transform;
this.p8n_1 = clip;
this.q8n_1 = path;
this.r8n_1 = lineScaleMode;
this.s8n_1 = lineWidth;
this.t8n_1 = startLineCap;
this.u8n_1 = endLineCap;
this.v8n_1 = lineJoin;
this.w8n_1 = miterLimit;
this.x8n_1 = strokeStyle;
this.y8n_1 = fillStyle;
this.z8n_1 = fontRegistry;
this.a8o_1 = font;
this.b8o_1 = fontSize;
this.c8o_1 = verticalAlign;
this.d8o_1 = horizontalAlign;
this.e8o_1 = globalAlpha;
this.f8o_1 = globalCompositeOperation;
this.g8o_1 = lineDash;
this.h8o_1 = lineDashOffset;
var tmp = this;
tmp.i8o_1 = lazy(Context2d$State$transformTransform$delegate$lambda(this));
}
State.prototype.p8w = function () {
return this.o8n_1;
};
State.prototype.la3 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = transformTransform$factory();
tmp$ret$0 = this.i8o_1.l1();
return tmp$ret$0;
};
State.prototype.aa3 = function () {
var tmp = this.s8n_1;
var tmp$ret$0;
// Inline function 'kotlin.math.absoluteValue' call
var tmp0__get_absoluteValue__nukmtt = this.la3().f75();
tmp$ret$0 = Math.abs(tmp0__get_absoluteValue__nukmtt);
return tmp * tmp$ret$0;
};
State.prototype.y8u = function (value) {
this.t8n_1 = value;
this.u8n_1 = value;
};
State.prototype.r8u = function () {
return this.t8n_1;
};
State.prototype.z4n = function () {
var tmp = this.o8n_1.z4n();
var tmp0_safe_receiver = this.p8n_1;
var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z4n();
var tmp_1 = this.q8n_1.z4n();
var tmp1_safe_receiver = this.g8o_1;
var tmp_2 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z4n();
return this.ma3(tmp, tmp_0, tmp_1, null, 0.0, null, null, null, 0.0, null, null, null, null, 0.0, null, null, 0.0, null, tmp_2, 0.0, 786424, null);
};
State.prototype.na3 = function (transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset) {
return new State(transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset);
};
State.prototype.ma3 = function (transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
transform = this.o8n_1;
if (!(($mask0 & 2) === 0))
clip = this.p8n_1;
if (!(($mask0 & 4) === 0))
path = this.q8n_1;
if (!(($mask0 & 8) === 0))
lineScaleMode = this.r8n_1;
if (!(($mask0 & 16) === 0))
lineWidth = this.s8n_1;
if (!(($mask0 & 32) === 0))
startLineCap = this.t8n_1;
if (!(($mask0 & 64) === 0))
endLineCap = this.u8n_1;
if (!(($mask0 & 128) === 0))
lineJoin = this.v8n_1;
if (!(($mask0 & 256) === 0))
miterLimit = this.w8n_1;
if (!(($mask0 & 512) === 0))
strokeStyle = this.x8n_1;
if (!(($mask0 & 1024) === 0))
fillStyle = this.y8n_1;
if (!(($mask0 & 2048) === 0))
fontRegistry = this.z8n_1;
if (!(($mask0 & 4096) === 0))
font = this.a8o_1;
if (!(($mask0 & 8192) === 0))
fontSize = this.b8o_1;
if (!(($mask0 & 16384) === 0))
verticalAlign = this.c8o_1;
if (!(($mask0 & 32768) === 0))
horizontalAlign = this.d8o_1;
if (!(($mask0 & 65536) === 0))
globalAlpha = this.e8o_1;
if (!(($mask0 & 131072) === 0))
globalCompositeOperation = this.f8o_1;
if (!(($mask0 & 262144) === 0))
lineDash = this.g8o_1;
if (!(($mask0 & 524288) === 0))
lineDashOffset = this.h8o_1;
return this.na3(transform, clip, path, lineScaleMode, lineWidth, startLineCap, endLineCap, lineJoin, miterLimit, strokeStyle, fillStyle, fontRegistry, font, fontSize, verticalAlign, horizontalAlign, globalAlpha, globalCompositeOperation, lineDash, lineDashOffset);
};
State.prototype.toString = function () {
return 'State(transform=' + this.o8n_1 + ', clip=' + this.p8n_1 + ', path=' + this.q8n_1 + ', lineScaleMode=' + this.r8n_1 + ', lineWidth=' + this.s8n_1 + ', startLineCap=' + this.t8n_1 + ', endLineCap=' + this.u8n_1 + ', lineJoin=' + this.v8n_1 + ', miterLimit=' + this.w8n_1 + ', strokeStyle=' + this.x8n_1 + ', fillStyle=' + this.y8n_1 + ', fontRegistry=' + this.z8n_1 + ', font=' + this.a8o_1 + ', fontSize=' + this.b8o_1 + ', verticalAlign=' + new VerticalAlign(this.c8o_1) + ', horizontalAlign=' + new HorizontalAlign(this.d8o_1) + ', globalAlpha=' + this.e8o_1 + ', globalCompositeOperation=' + this.f8o_1 + ', lineDash=' + this.g8o_1 + ', lineDashOffset=' + this.h8o_1 + ')';
};
State.prototype.hashCode = function () {
var result = this.o8n_1.hashCode();
result = imul(result, 31) + (this.p8n_1 == null ? 0 : this.p8n_1.hashCode()) | 0;
result = imul(result, 31) + this.q8n_1.hashCode() | 0;
result = imul(result, 31) + this.r8n_1.hashCode() | 0;
result = imul(result, 31) + getNumberHashCode(this.s8n_1) | 0;
result = imul(result, 31) + this.t8n_1.hashCode() | 0;
result = imul(result, 31) + this.u8n_1.hashCode() | 0;
result = imul(result, 31) + this.v8n_1.hashCode() | 0;
result = imul(result, 31) + getNumberHashCode(this.w8n_1) | 0;
result = imul(result, 31) + hashCode(this.x8n_1) | 0;
result = imul(result, 31) + hashCode(this.y8n_1) | 0;
result = imul(result, 31) + (this.z8n_1 == null ? 0 : hashCode(this.z8n_1)) | 0;
result = imul(result, 31) + (this.a8o_1 == null ? 0 : hashCode(this.a8o_1)) | 0;
result = imul(result, 31) + getNumberHashCode(this.b8o_1) | 0;
result = imul(result, 31) + VerticalAlign__hashCode_impl_vx8hj7(this.c8o_1) | 0;
result = imul(result, 31) + HorizontalAlign__hashCode_impl_7x9oj5(this.d8o_1) | 0;
result = imul(result, 31) + getNumberHashCode(this.e8o_1) | 0;
result = imul(result, 31) + hashCode(this.f8o_1) | 0;
result = imul(result, 31) + (this.g8o_1 == null ? 0 : hashCode(this.g8o_1)) | 0;
result = imul(result, 31) + getNumberHashCode(this.h8o_1) | 0;
return result;
};
State.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof State))
return false;
var tmp0_other_with_cast = other instanceof State ? other : THROW_CCE();
if (!this.o8n_1.equals(tmp0_other_with_cast.o8n_1))
return false;
if (!equals(this.p8n_1, tmp0_other_with_cast.p8n_1))
return false;
if (!this.q8n_1.equals(tmp0_other_with_cast.q8n_1))
return false;
if (!this.r8n_1.equals(tmp0_other_with_cast.r8n_1))
return false;
if (!equals(this.s8n_1, tmp0_other_with_cast.s8n_1))
return false;
if (!this.t8n_1.equals(tmp0_other_with_cast.t8n_1))
return false;
if (!this.u8n_1.equals(tmp0_other_with_cast.u8n_1))
return false;
if (!this.v8n_1.equals(tmp0_other_with_cast.v8n_1))
return false;
if (!equals(this.w8n_1, tmp0_other_with_cast.w8n_1))
return false;
if (!equals(this.x8n_1, tmp0_other_with_cast.x8n_1))
return false;
if (!equals(this.y8n_1, tmp0_other_with_cast.y8n_1))
return false;
if (!equals(this.z8n_1, tmp0_other_with_cast.z8n_1))
return false;
if (!equals(this.a8o_1, tmp0_other_with_cast.a8o_1))
return false;
if (!equals(this.b8o_1, tmp0_other_with_cast.b8o_1))
return false;
if (!equals(this.c8o_1, tmp0_other_with_cast.c8o_1))
return false;
if (!equals(this.d8o_1, tmp0_other_with_cast.d8o_1))
return false;
if (!equals(this.e8o_1, tmp0_other_with_cast.e8o_1))
return false;
if (!equals(this.f8o_1, tmp0_other_with_cast.f8o_1))
return false;
if (!equals(this.g8o_1, tmp0_other_with_cast.g8o_1))
return false;
if (!equals(this.h8o_1, tmp0_other_with_cast.h8o_1))
return false;
return true;
};
State.$metadata$ = classMeta('State');
function transX($this, x, y) {
return $this.a87_1.o8n_1.h77(x, y);
}
function transY($this, x, y) {
return $this.a87_1.o8n_1.i77(x, y);
}
function Context2d(renderer, defaultFontRegistry, defaultFont) {
this.x86_1 = renderer;
this.y86_1 = defaultFontRegistry;
this.z86_1 = defaultFont;
var tmp = this;
tmp.a87_1 = State_init_$Create$(null, null, null, null, 0.0, null, null, null, 0.0, null, null, this.y86_1, this.z86_1, 0.0, null, null, 0.0, null, null, 0.0, 1042431, null);
var tmp_0 = this;
tmp_0.b87_1 = _TGenStack___init__impl__yynjgt(null, 1, null);
this.c87_1 = 0.0;
this.d87_1 = 0.0;
this.e87_1 = 0.0;
this.f87_1 = 0.0;
}
Context2d.prototype.oa3 = function () {
return this.x86_1.d72();
};
Context2d.prototype.pa3 = function () {
return this.x86_1.e72();
};
Context2d.prototype.qa3 = function (state, fill, winding) {
return this.x86_1.xa2(state, fill, winding);
};
Context2d.prototype.ra3 = function (state, fill, winding, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
winding = null;
var tmp;
if ($handler == null) {
this.qa3(state, fill, winding);
tmp = Unit_getInstance();
} else {
tmp = $handler(state, fill, winding);
}
return tmp;
};
Context2d.prototype.sa3 = function (image, x, y, width, height, transform) {
return this.x86_1.ea3(image, x, y, width, height, transform);
};
Context2d.prototype.ta3 = function () {
return this.x86_1.s1x();
};
Context2d.prototype.ua3 = function () {
return this.x86_1.ca3();
};
Context2d.prototype.va3 = function () {
return this.x86_1.da3();
};
Context2d.prototype.d72 = function () {
return this.oa3();
};
Context2d.prototype.e72 = function () {
return this.pa3();
};
Context2d.prototype.s1x = function () {
this.ta3();
};
Context2d.prototype.wa3 = function () {
return this.ua3();
};
Context2d.prototype.xa3 = function () {
return this.va3();
};
Context2d.prototype.ya3 = function (callback) {
this.wa3();
try {
return callback();
}finally {
this.xa3();
}
};
Context2d.prototype.v1u = function () {
return this.a87_1;
};
Context2d.prototype.za3 = function (value) {
this.a87_1.r8n_1 = value;
};
Context2d.prototype.x8u = function (value) {
this.a87_1.s8n_1 = value;
};
Context2d.prototype.q8u = function () {
return this.a87_1.s8n_1;
};
Context2d.prototype.y8u = function (value) {
this.a87_1.y8u(value);
};
Context2d.prototype.r8u = function () {
return this.a87_1.r8u();
};
Context2d.prototype.a8v = function (value) {
this.a87_1.w8n_1 = value;
};
Context2d.prototype.t8u = function () {
return this.a87_1.w8n_1;
};
Context2d.prototype.z8u = function (value) {
this.a87_1.v8n_1 = value;
};
Context2d.prototype.s8u = function () {
return this.a87_1.v8n_1;
};
Context2d.prototype.aa4 = function (value) {
this.a87_1.x8n_1 = value;
};
Context2d.prototype.ba4 = function () {
return this.a87_1.x8n_1;
};
Context2d.prototype.l8o = function (value) {
this.a87_1.y8n_1 = value;
};
Context2d.prototype.k8o = function () {
return this.a87_1.y8n_1;
};
Context2d.prototype.r8w = function () {
return this.a87_1.a8o_1;
};
Context2d.prototype.ca4 = function () {
return this.a87_1.b8o_1;
};
Context2d.prototype.b8v = function (value) {
this.a87_1.g8o_1 = value;
};
Context2d.prototype.u8u = function () {
return this.a87_1.g8o_1;
};
Context2d.prototype.c8v = function (value) {
this.a87_1.h8o_1 = value;
};
Context2d.prototype.v8u = function () {
return this.a87_1.h8o_1;
};
Context2d.prototype.da4 = function (paint, callback) {
var oldStyle = this.k8o();
this.l8o(paint);
try {
callback();
}finally {
this.l8o(oldStyle);
}
};
Context2d.prototype.ea4 = function (paint, callback) {
var oldStyle = this.ba4();
this.aa4(paint);
try {
callback();
}finally {
this.aa4(oldStyle);
}
};
Context2d.prototype.fa4 = function (callback) {
this.w8u();
try {
callback();
}finally {
this.e8v();
}
};
Context2d.prototype.ga4 = function (callback) {
var t = this.a87_1.o8n_1;
var a = t.i74_1;
var b = t.j74_1;
var c = t.k74_1;
var d = t.l74_1;
var tx = t.m74_1;
var ty = t.n74_1;
try {
callback();
}finally {
t.e76(a, b, c, d, tx, ty);
}
};
Context2d.prototype.w8u = function () {
TGenStack__push_impl_9yh33t(this.b87_1, this.a87_1.z4n());
};
Context2d.prototype.e8v = function () {
this.a87_1 = TGenStack__pop_impl_qisxa0(this.b87_1);
};
Context2d.prototype.ha4 = function (sx, sy) {
return this.x9k(numberToDouble(sx), numberToDouble(sy));
};
Context2d.prototype.ia4 = function (tx, ty) {
return this.o8w(tx, ty);
};
Context2d.prototype.x9k = function (sx, sy) {
this.a87_1.o8n_1.k76(sx, sy);
};
Context2d.prototype.j8o = function (sx, sy, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
sy = sx;
return this.x9k(sx, sy);
};
Context2d.prototype.ja4 = function (angle) {
this.a87_1.o8n_1.p76(angle);
};
Context2d.prototype.o8w = function (tx, ty) {
this.a87_1.o8n_1.o76(tx, ty);
};
Context2d.prototype.q8w = function (m) {
this.a87_1.o8n_1.q76(m);
};
Context2d.prototype.ka4 = function (_set____db54di) {
this.e87_1 = _set____db54di;
};
Context2d.prototype.s7e = function () {
return this.e87_1;
};
Context2d.prototype.la4 = function (_set____db54di) {
this.f87_1 = _set____db54di;
};
Context2d.prototype.t7e = function () {
return this.f87_1;
};
Context2d.prototype.i7s = function () {
return this.a87_1.q8n_1.i7s();
};
Context2d.prototype.x2c = function () {
this.a87_1.q8n_1.x2c();
this.ka4(this.c87_1);
this.la4(this.d87_1);
};
Context2d.prototype.r7e = function (x, y) {
this.a87_1.q8n_1.r7e(transX(this, x, y), transY(this, x, y));
this.ka4(x);
this.la4(y);
this.c87_1 = x;
this.d87_1 = y;
};
Context2d.prototype.u7e = function (x, y) {
this.a87_1.q8n_1.u7e(transX(this, x, y), transY(this, x, y));
this.ka4(x);
this.la4(y);
};
Context2d.prototype.v7e = function (cx, cy, ax, ay) {
this.a87_1.q8n_1.v7e(transX(this, cx, cy), transY(this, cx, cy), transX(this, ax, ay), transY(this, ax, ay));
this.ka4(ax);
this.la4(ay);
};
Context2d.prototype.x7e = function (cx1, cy1, cx2, cy2, ax, ay) {
this.a87_1.q8n_1.x7e(transX(this, cx1, cy1), transY(this, cx1, cy1), transX(this, cx2, cy2), transY(this, cx2, cy2), transX(this, ax, ay), transY(this, ax, ay));
this.ka4(ax);
this.la4(ay);
};
Context2d.prototype.ma4 = function (x, y, width, height) {
return this.m8o(numberToDouble(x), numberToDouble(y), numberToDouble(width), numberToDouble(height));
};
Context2d.prototype.w9k = function (path) {
if (isEmpty(this))
this.a87_1.q8n_1.h7j_1 = path.h7j_1;
write(this, path);
};
Context2d.prototype.d8y = function (d) {
d.c8y(this);
};
Context2d.prototype.m8o = function (x, y, width, height) {
this.h8r();
rect_0(this, x, y, width, height);
this.m8u(null, 1, null);
};
Context2d.prototype.h8r = function () {
var tmp = this.a87_1;
tmp.q8n_1 = VectorPath_init_$Create$(null, null, null, false, 15, null);
};
Context2d.prototype.l8u = function () {
if (!equals(this.a87_1.x8n_1, NonePaint_getInstance())) {
var tmp = this.a87_1;
this.ra3(tmp, false, null, 4, null);
}
};
Context2d.prototype.na4 = function (winding) {
if (!equals(this.a87_1.y8n_1, NonePaint_getInstance())) {
this.qa3(this.a87_1, true, winding);
}
};
Context2d.prototype.m8u = function (winding, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
winding = null;
return this.na4(winding);
};
Context2d.prototype.oa4 = function (paint, winding) {
if (paint == null)
return Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.fillStyle' call
var oldStyle = this.k8o();
this.l8o(paint);
try {
// Inline function 'com.soywiz.korim.vector.Context2d.fill.<anonymous>' call
this.na4(winding);
}finally {
this.l8o(oldStyle);
}
};
Context2d.prototype.p8u = function (paint, winding, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
winding = null;
return this.oa4(paint, winding);
};
Context2d.prototype.d8v = function (paint) {
// Inline function 'com.soywiz.korim.vector.Context2d.strokeStyle' call
var oldStyle = this.ba4();
this.aa4(paint);
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
this.l8u();
}finally {
this.aa4(oldStyle);
}
};
Context2d.prototype.pa4 = function (paint, begin, winding, block) {
if (begin) {
this.h8r();
}
block();
this.oa4(paint, winding);
};
Context2d.prototype.qa4 = function (paint, lineWidth, lineCap, lineJoin, miterLimit, lineDash, lineDashOffset, begin, callback) {
if (begin) {
this.h8r();
}
callback();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
this.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
this.x8u(lineWidth);
this.y8u(lineCap);
this.z8u(lineJoin);
this.a8v(miterLimit);
this.b8v(lineDash);
this.c8v(lineDashOffset);
this.d8v(paint);
}finally {
this.e8v();
}
};
Context2d.prototype.ra4 = function (paint, info, begin, callback) {
if (paint == null ? true : info == null)
return Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke = info.t7j_1;
var tmp1_stroke = info.w7j_1;
var tmp2_stroke = info.y7j_1;
var tmp3_stroke = info.z7j_1;
var tmp4_stroke = info.a7k_1;
var tmp5_stroke = info.b7k_1;
if (begin) {
this.h8r();
}
callback();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
this.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
this.x8u(tmp0_stroke);
this.y8u(tmp1_stroke);
this.z8u(tmp2_stroke);
this.a8v(tmp3_stroke);
this.b8v(tmp4_stroke);
this.c8v(tmp5_stroke);
this.d8v(paint);
}finally {
this.e8v();
}
};
Context2d.prototype.sa4 = function (fill, stroke, strokeInfo, callback) {
callback();
if (!(fill == null)) {
this.p8u(fill, null, 2, null);
}
if (!(stroke == null)) {
if (!(strokeInfo == null)) {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
if (stroke == null ? true : strokeInfo == null) {
tmp$ret$0 = Unit_getInstance();
break $l$block;
}
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke = strokeInfo.t7j_1;
var tmp1_stroke = strokeInfo.w7j_1;
var tmp2_stroke = strokeInfo.y7j_1;
var tmp3_stroke = strokeInfo.z7j_1;
var tmp4_stroke = strokeInfo.a7k_1;
var tmp5_stroke = strokeInfo.b7k_1;
if (false) {
this.h8r();
}
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$1 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
this.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
this.x8u(tmp0_stroke);
this.y8u(tmp1_stroke);
this.z8u(tmp2_stroke);
this.a8v(tmp3_stroke);
this.b8v(tmp4_stroke);
this.c8v(tmp5_stroke);
this.d8v(stroke);
}finally {
this.e8v();
}
}
} else {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke_0 = this.q8u();
var tmp1_stroke_0 = this.r8u();
var tmp2_stroke_0 = this.s8u();
var tmp3_stroke_0 = this.t8u();
var tmp4_stroke_0 = this.u8u();
var tmp5_stroke_0 = this.v8u();
if (false) {
this.h8r();
}
var tmp$ret$2;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$2 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
this.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
this.x8u(tmp0_stroke_0);
this.y8u(tmp1_stroke_0);
this.z8u(tmp2_stroke_0);
this.a8v(tmp3_stroke_0);
this.b8v(tmp4_stroke_0);
this.c8v(tmp5_stroke_0);
this.d8v(stroke);
}finally {
this.e8v();
}
}
}
};
Context2d.prototype.ta4 = function (fill, stroke, callback) {
// Inline function 'com.soywiz.korim.vector.Context2d.fillStroke' call
var tmp0_safe_receiver = stroke;
var tmp0_fillStroke = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n8u_1;
var tmp1_safe_receiver = stroke;
var tmp1_fillStroke = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o8u_1;
callback();
if (!(fill == null)) {
this.p8u(fill, null, 2, null);
}
if (!(tmp0_fillStroke == null)) {
if (!(tmp1_fillStroke == null)) {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
if (tmp0_fillStroke == null ? true : tmp1_fillStroke == null) {
tmp$ret$0 = Unit_getInstance();
break $l$block;
}
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke = tmp1_fillStroke.t7j_1;
var tmp1_stroke = tmp1_fillStroke.w7j_1;
var tmp2_stroke = tmp1_fillStroke.y7j_1;
var tmp3_stroke = tmp1_fillStroke.z7j_1;
var tmp4_stroke = tmp1_fillStroke.a7k_1;
var tmp5_stroke = tmp1_fillStroke.b7k_1;
if (false) {
this.h8r();
}
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$1 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
this.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
this.x8u(tmp0_stroke);
this.y8u(tmp1_stroke);
this.z8u(tmp2_stroke);
this.a8v(tmp3_stroke);
this.b8v(tmp4_stroke);
this.c8v(tmp5_stroke);
this.d8v(tmp0_fillStroke);
}finally {
this.e8v();
}
}
} else {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke_0 = this.q8u();
var tmp1_stroke_0 = this.r8u();
var tmp2_stroke_0 = this.s8u();
var tmp3_stroke_0 = this.t8u();
var tmp4_stroke_0 = this.u8u();
var tmp5_stroke_0 = this.v8u();
if (false) {
this.h8r();
}
var tmp$ret$2;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$2 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
this.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
this.x8u(tmp0_stroke_0);
this.y8u(tmp1_stroke_0);
this.z8u(tmp2_stroke_0);
this.a8v(tmp3_stroke_0);
this.b8v(tmp4_stroke_0);
this.c8v(tmp5_stroke_0);
this.d8v(tmp0_fillStroke);
}finally {
this.e8v();
}
}
}
};
Context2d.prototype.ua4 = function (path, winding) {
if (!(path == null)) {
if (this.a87_1.p8n_1 == null) {
var tmp = this.a87_1;
tmp.p8n_1 = VectorPath_init_$Create$(null, null, null, false, 15, null);
}
ensureNotNull(this.a87_1.p8n_1).x7();
ensureNotNull(this.a87_1.p8n_1).h7j_1 = winding;
var tmp_0 = ensureNotNull(this.a87_1.p8n_1);
tmp_0.u7t(path, null, 2, null);
if (path === this.a87_1.q8n_1) {
path.x7();
}
} else {
this.a87_1.p8n_1 = null;
}
};
Context2d.prototype.va4 = function (path, winding, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
path = this.a87_1.q8n_1;
if (!(($mask0 & 2) === 0))
winding = Winding_NON_ZERO_getInstance();
return this.ua4(path, winding);
};
Context2d.prototype.wa4 = function (text, x, y, fill, paint, font, size, renderer, align, outMetrics, fillStyle, stroke) {
var tmp0_elvis_lhs = paint;
var paint_0 = tmp0_elvis_lhs == null ? fill ? this.k8o() : this.ba4() : tmp0_elvis_lhs;
var tmp1_safe_receiver = font;
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
tmp = drawText$default(tmp1_safe_receiver, this, size, text, paint_0, x, y, fill, renderer, align, outMetrics, fillStyle, stroke, null, 4096, null);
}
return tmp;
};
Context2d.prototype.xa4 = function (text, x, y, fill, paint, font, size, renderer, align, outMetrics, fillStyle, stroke, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
x = 0.0;
if (!(($mask0 & 4) === 0))
y = 0.0;
if (!(($mask0 & 8) === 0))
fill = true;
if (!(($mask0 & 16) === 0))
paint = null;
if (!(($mask0 & 32) === 0))
font = this.r8w();
if (!(($mask0 & 64) === 0))
size = this.ca4();
if (!(($mask0 & 128) === 0)) {
var tmp = get_DefaultStringTextRenderer();
renderer = isInterface(tmp, TextRenderer) ? tmp : THROW_CCE();
}
if (!(($mask0 & 256) === 0))
align = Companion_getInstance_45().m8s_1;
if (!(($mask0 & 512) === 0))
outMetrics = null;
if (!(($mask0 & 1024) === 0))
fillStyle = null;
if (!(($mask0 & 2048) === 0))
stroke = null;
return this.wa4(text, x, y, fill, paint, font, size, renderer, align, outMetrics, fillStyle, stroke);
};
Context2d.prototype.n8o = function (image, x, y, width, height) {
return this.sa3(image, x, y, width, height, this.a87_1.o8n_1);
};
Context2d.prototype.ya4 = function (image, x, y, width, height, $mask0, $handler) {
if (!(($mask0 & 8) === 0))
width = image.d72();
if (!(($mask0 & 16) === 0))
height = image.e72();
var tmp;
if ($handler == null) {
this.n8o(image, x, y, width, height);
tmp = Unit_getInstance();
} else {
tmp = $handler(image, x, y, width, height);
}
return tmp;
};
Context2d.prototype.za4 = function (image, x, y, width, height) {
return this.n8o(image, numberToDouble(x), numberToDouble(y), numberToDouble(width), numberToDouble(height));
};
Context2d.$metadata$ = classMeta('Context2d', [VectorBuilder, Disposable]);
function write(_this__u8e3s4, path) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds' call
var n = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = path.f7j_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.t4n(tmp0);
var tmp0_subject = tmp1__anonymous__uwfjfc;
Command_getInstance();
if (tmp0_subject === 0) {
// Inline function 'com.soywiz.korim.vector.write.<anonymous>' call
var tmp1 = n;
n = tmp1 + 1 | 0;
var tmp0__anonymous__q1qw7t = path.g7j_1.m(tmp1);
var tmp2 = n;
n = tmp2 + 1 | 0;
var tmp1__anonymous__uwfjfc_0 = path.g7j_1.m(tmp2);
_this__u8e3s4.r7e(tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc_0);
} else {
Command_getInstance();
if (tmp0_subject === 1) {
// Inline function 'com.soywiz.korim.vector.write.<anonymous>' call
var tmp3 = n;
n = tmp3 + 1 | 0;
var tmp2__anonymous__z9zvc9 = path.g7j_1.m(tmp3);
var tmp4 = n;
n = tmp4 + 1 | 0;
var tmp3__anonymous__ufb84q = path.g7j_1.m(tmp4);
_this__u8e3s4.u7e(tmp2__anonymous__z9zvc9, tmp3__anonymous__ufb84q);
} else {
Command_getInstance();
if (tmp0_subject === 2) {
// Inline function 'com.soywiz.korim.vector.write.<anonymous>' call
var tmp5 = n;
n = tmp5 + 1 | 0;
var tmp4__anonymous__pkmkx7 = path.g7j_1.m(tmp5);
var tmp6 = n;
n = tmp6 + 1 | 0;
var tmp5__anonymous__kpxxpo = path.g7j_1.m(tmp6);
var tmp7 = n;
n = tmp7 + 1 | 0;
var tmp6__anonymous__fv9ai5 = path.g7j_1.m(tmp7);
var tmp8 = n;
n = tmp8 + 1 | 0;
var tmp7__anonymous__b0knam = path.g7j_1.m(tmp8);
_this__u8e3s4.v7e(tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, tmp6__anonymous__fv9ai5, tmp7__anonymous__b0knam);
} else {
Command_getInstance();
if (tmp0_subject === 3) {
// Inline function 'com.soywiz.korim.vector.write.<anonymous>' call
var tmp9 = n;
n = tmp9 + 1 | 0;
var tmp8__anonymous__65w033 = path.g7j_1.m(tmp9);
var tmp10 = n;
n = tmp10 + 1 | 0;
var tmp9__anonymous__1b7cvk = path.g7j_1.m(tmp10);
var tmp11 = n;
n = tmp11 + 1 | 0;
var tmp10__anonymous__yfiz50 = path.g7j_1.m(tmp11);
var tmp12 = n;
n = tmp12 + 1 | 0;
var tmp11__anonymous__tkubxh = path.g7j_1.m(tmp12);
var tmp13 = n;
n = tmp13 + 1 | 0;
var tmp12__anonymous__oq5opy = path.g7j_1.m(tmp13);
var tmp14 = n;
n = tmp14 + 1 | 0;
var tmp13__anonymous__jvh1if = path.g7j_1.m(tmp14);
_this__u8e3s4.x7e(tmp8__anonymous__65w033, tmp9__anonymous__1b7cvk, tmp10__anonymous__yfiz50, tmp11__anonymous__tkubxh, tmp12__anonymous__oq5opy, tmp13__anonymous__jvh1if);
} else {
Command_getInstance();
if (tmp0_subject === 4) {
// Inline function 'com.soywiz.korim.vector.write.<anonymous>' call
_this__u8e3s4.x2c();
}
}
}
}
}
}
}
function transformTransform$factory() {
return getPropertyCallableRef('transformTransform', 1, KProperty1, function (receiver) {
return receiver.la3();
}, null);
}
var CycleMethod_NO_CYCLE_instance;
var CycleMethod_NO_CYCLE_CLAMP_instance;
var CycleMethod_REPEAT_instance;
var CycleMethod_REFLECT_instance;
function Companion_35() {
Companion_instance_35 = this;
}
Companion_35.$metadata$ = objectMeta('Companion');
var Companion_instance_35;
function Companion_getInstance_48() {
CycleMethod_initEntries();
if (Companion_instance_35 == null)
new Companion_35();
return Companion_instance_35;
}
var CycleMethod_entriesInitialized;
function CycleMethod_initEntries() {
if (CycleMethod_entriesInitialized)
return Unit_getInstance();
CycleMethod_entriesInitialized = true;
CycleMethod_NO_CYCLE_instance = new CycleMethod('NO_CYCLE', 0);
CycleMethod_NO_CYCLE_CLAMP_instance = new CycleMethod('NO_CYCLE_CLAMP', 1);
CycleMethod_REPEAT_instance = new CycleMethod('REPEAT', 2);
CycleMethod_REFLECT_instance = new CycleMethod('REFLECT', 3);
Companion_getInstance_48();
}
function CycleMethod(name, ordinal) {
Enum.call(this, name, ordinal);
}
CycleMethod.prototype.m9y = function () {
return !this.equals(CycleMethod_NO_CYCLE_getInstance()) ? !this.equals(CycleMethod_NO_CYCLE_CLAMP_getInstance()) : false;
};
CycleMethod.prototype.u9x = function (ratio) {
var tmp0_subject = this;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 0:
tmp = ratio;
break;
case 1:
tmp = clamp01(ratio);
break;
case 2:
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.fract' call
tmp$ret$0 = ratio - toIntFloor(ratio);
tmp = tmp$ret$0;
break;
case 3:
var part = umod(ratio, 2.0);
tmp = part > 1.0 ? 2.0 - part : part;
break;
default:
noWhenBranchMatchedException();
break;
}
return tmp;
};
CycleMethod.prototype.g9y = function (ratio) {
return this.u9x(ratio);
};
CycleMethod.$metadata$ = classMeta('CycleMethod', undefined, undefined, undefined, undefined, Enum.prototype);
function CycleMethod_NO_CYCLE_getInstance() {
CycleMethod_initEntries();
return CycleMethod_NO_CYCLE_instance;
}
function CycleMethod_NO_CYCLE_CLAMP_getInstance() {
CycleMethod_initEntries();
return CycleMethod_NO_CYCLE_CLAMP_instance;
}
function CycleMethod_REPEAT_getInstance() {
CycleMethod_initEntries();
return CycleMethod_REPEAT_instance;
}
function CycleMethod_REFLECT_getInstance() {
CycleMethod_initEntries();
return CycleMethod_REFLECT_instance;
}
function Drawable() {
}
Drawable.$metadata$ = interfaceMeta('Drawable');
function BoundsDrawable() {
}
BoundsDrawable.$metadata$ = interfaceMeta('BoundsDrawable', [SizedDrawable]);
function SizedDrawable() {
}
SizedDrawable.$metadata$ = interfaceMeta('SizedDrawable', [Drawable]);
function draw_0(_this__u8e3s4, c) {
c.w9k(_this__u8e3s4);
}
function draw_1(_this__u8e3s4, path) {
_this__u8e3s4.w9k(path);
}
function Shape() {
}
Shape.$metadata$ = interfaceMeta('Shape', [BoundsDrawable]);
function toContext2dCommands(_this__u8e3s4, prefix, suffix, decimalPlaces) {
var tmp$ret$5;
// Inline function 'kotlin.collections.map' call
var tmp$ret$2;
// Inline function 'kotlin.collections.buildList' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'kotlin.collections.buildListInternal' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = ArrayList_init_$Create$_0();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.toContext2dCommands.<anonymous>' call
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds' call
var n = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = _this__u8e3s4.f7j_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.t4n(tmp0);
var tmp0_subject = tmp1__anonymous__uwfjfc;
Command_getInstance();
if (tmp0_subject === 0) {
// Inline function 'com.soywiz.korim.vector.toContext2dCommands.<anonymous>.<anonymous>' call
var tmp1 = n;
n = tmp1 + 1 | 0;
var tmp0__anonymous__q1qw7t = _this__u8e3s4.g7j_1.m(tmp1);
var tmp2 = n;
n = tmp2 + 1 | 0;
var tmp1__anonymous__uwfjfc_0 = _this__u8e3s4.g7j_1.m(tmp2);
tmp0_apply.c('moveTo(' + toContext2dCommands$round(tmp0__anonymous__q1qw7t, decimalPlaces) + ', ' + toContext2dCommands$round(tmp1__anonymous__uwfjfc_0, decimalPlaces) + ')');
} else {
Command_getInstance();
if (tmp0_subject === 1) {
// Inline function 'com.soywiz.korim.vector.toContext2dCommands.<anonymous>.<anonymous>' call
var tmp3 = n;
n = tmp3 + 1 | 0;
var tmp2__anonymous__z9zvc9 = _this__u8e3s4.g7j_1.m(tmp3);
var tmp4 = n;
n = tmp4 + 1 | 0;
var tmp3__anonymous__ufb84q = _this__u8e3s4.g7j_1.m(tmp4);
tmp0_apply.c('lineTo(' + toContext2dCommands$round(tmp2__anonymous__z9zvc9, decimalPlaces) + ', ' + toContext2dCommands$round(tmp3__anonymous__ufb84q, decimalPlaces) + ')');
} else {
Command_getInstance();
if (tmp0_subject === 2) {
// Inline function 'com.soywiz.korim.vector.toContext2dCommands.<anonymous>.<anonymous>' call
var tmp5 = n;
n = tmp5 + 1 | 0;
var tmp4__anonymous__pkmkx7 = _this__u8e3s4.g7j_1.m(tmp5);
var tmp6 = n;
n = tmp6 + 1 | 0;
var tmp5__anonymous__kpxxpo = _this__u8e3s4.g7j_1.m(tmp6);
var tmp7 = n;
n = tmp7 + 1 | 0;
var tmp6__anonymous__fv9ai5 = _this__u8e3s4.g7j_1.m(tmp7);
var tmp8 = n;
n = tmp8 + 1 | 0;
var tmp7__anonymous__b0knam = _this__u8e3s4.g7j_1.m(tmp8);
tmp0_apply.c('quadTo(' + toContext2dCommands$round(tmp4__anonymous__pkmkx7, decimalPlaces) + ', ' + toContext2dCommands$round(tmp5__anonymous__kpxxpo, decimalPlaces) + ', ' + toContext2dCommands$round(tmp6__anonymous__fv9ai5, decimalPlaces) + ', ' + toContext2dCommands$round(tmp7__anonymous__b0knam, decimalPlaces) + ')');
} else {
Command_getInstance();
if (tmp0_subject === 3) {
// Inline function 'com.soywiz.korim.vector.toContext2dCommands.<anonymous>.<anonymous>' call
var tmp9 = n;
n = tmp9 + 1 | 0;
var tmp8__anonymous__65w033 = _this__u8e3s4.g7j_1.m(tmp9);
var tmp10 = n;
n = tmp10 + 1 | 0;
var tmp9__anonymous__1b7cvk = _this__u8e3s4.g7j_1.m(tmp10);
var tmp11 = n;
n = tmp11 + 1 | 0;
var tmp10__anonymous__yfiz50 = _this__u8e3s4.g7j_1.m(tmp11);
var tmp12 = n;
n = tmp12 + 1 | 0;
var tmp11__anonymous__tkubxh = _this__u8e3s4.g7j_1.m(tmp12);
var tmp13 = n;
n = tmp13 + 1 | 0;
var tmp12__anonymous__oq5opy = _this__u8e3s4.g7j_1.m(tmp13);
var tmp14 = n;
n = tmp14 + 1 | 0;
var tmp13__anonymous__jvh1if = _this__u8e3s4.g7j_1.m(tmp14);
tmp0_apply.c('cubicTo(' + toContext2dCommands$round(tmp8__anonymous__65w033, decimalPlaces) + ', ' + toContext2dCommands$round(tmp9__anonymous__1b7cvk, decimalPlaces) + ', ' + toContext2dCommands$round(tmp10__anonymous__yfiz50, decimalPlaces) + ', ' + toContext2dCommands$round(tmp11__anonymous__tkubxh, decimalPlaces) + ', ' + toContext2dCommands$round(tmp12__anonymous__oq5opy, decimalPlaces) + ', ' + toContext2dCommands$round(tmp13__anonymous__jvh1if, decimalPlaces) + ')');
} else {
Command_getInstance();
if (tmp0_subject === 4) {
// Inline function 'com.soywiz.korim.vector.toContext2dCommands.<anonymous>.<anonymous>' call
tmp0_apply.c('close()');
}
}
}
}
}
}
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.c4();
tmp$ret$2 = tmp$ret$1;
var tmp0_map = tmp$ret$2;
var tmp$ret$4;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator = tmp0_map.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$3;
// Inline function 'com.soywiz.korim.vector.toContext2dCommands.<anonymous>' call
tmp$ret$3 = prefix + item + suffix;
tmp0_mapTo.c(tmp$ret$3);
}
tmp$ret$4 = tmp0_mapTo;
tmp$ret$5 = tmp$ret$4;
return tmp$ret$5;
}
function toContext2dCommands$default(_this__u8e3s4, prefix, suffix, decimalPlaces, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
prefix = 'ctx.';
if (!(($mask0 & 2) === 0))
suffix = ';';
if (!(($mask0 & 4) === 0))
decimalPlaces = 1;
return toContext2dCommands(_this__u8e3s4, prefix, suffix, decimalPlaces);
}
function FillShape_init_$Init$(path, clip, paint, transform, globalAlpha, $mask0, $marker, $this) {
if (!(($mask0 & 8) === 0)) {
transform = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
if (!(($mask0 & 16) === 0))
globalAlpha = 1.0;
FillShape.call($this, path, clip, paint, transform, globalAlpha);
return $this;
}
function FillShape_init_$Create$(path, clip, paint, transform, globalAlpha, $mask0, $marker) {
return FillShape_init_$Init$(path, clip, paint, transform, globalAlpha, $mask0, $marker, Object.create(FillShape.prototype));
}
function FillShape$pathCurvesList$delegate$lambda(this$0) {
return function () {
return toCurvesList(this$0.ea5_1);
};
}
function FillShape$clipCurvesList$delegate$lambda(this$0) {
return function () {
var tmp0_safe_receiver = this$0.fa5_1;
return tmp0_safe_receiver == null ? null : toCurvesList(tmp0_safe_receiver);
};
}
function FillShape(path, clip, paint, transform, globalAlpha) {
this.ea5_1 = path;
this.fa5_1 = clip;
this.ga5_1 = paint;
this.ha5_1 = transform;
this.ia5_1 = globalAlpha;
var tmp = this;
tmp.ja5_1 = lazy(FillShape$pathCurvesList$delegate$lambda(this));
var tmp_0 = this;
tmp_0.ka5_1 = lazy(FillShape$clipCurvesList$delegate$lambda(this));
}
FillShape.prototype.q5n = function () {
return this.ea5_1;
};
FillShape.prototype.la5 = function () {
return this.fa5_1;
};
FillShape.prototype.p8w = function () {
return this.ha5_1;
};
FillShape.prototype.ma5 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = pathCurvesList$factory();
tmp$ret$0 = this.ja5_1.l1();
return tmp$ret$0;
};
FillShape.prototype.na5 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = clipCurvesList$factory();
tmp$ret$0 = this.ka5_1.l1();
return tmp$ret$0;
};
FillShape.prototype.oa5 = function () {
return (this.ma5().i() === 1 ? get_isConvex(first_0(this.ma5())) : false) ? this.na5() == null : false;
};
FillShape.prototype.pa5 = function (c) {
c.oa4(this.ga5_1, this.ea5_1.h7j_1);
};
FillShape.prototype.toString = function () {
return 'FillShape(path=' + this.ea5_1 + ', clip=' + this.fa5_1 + ', paint=' + this.ga5_1 + ', transform=' + this.ha5_1 + ', globalAlpha=' + this.ia5_1 + ')';
};
FillShape.prototype.hashCode = function () {
var result = this.ea5_1.hashCode();
result = imul(result, 31) + (this.fa5_1 == null ? 0 : this.fa5_1.hashCode()) | 0;
result = imul(result, 31) + hashCode(this.ga5_1) | 0;
result = imul(result, 31) + this.ha5_1.hashCode() | 0;
result = imul(result, 31) + getNumberHashCode(this.ia5_1) | 0;
return result;
};
FillShape.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof FillShape))
return false;
var tmp0_other_with_cast = other instanceof FillShape ? other : THROW_CCE();
if (!this.ea5_1.equals(tmp0_other_with_cast.ea5_1))
return false;
if (!equals(this.fa5_1, tmp0_other_with_cast.fa5_1))
return false;
if (!equals(this.ga5_1, tmp0_other_with_cast.ga5_1))
return false;
if (!this.ha5_1.equals(tmp0_other_with_cast.ha5_1))
return false;
if (!equals(this.ia5_1, tmp0_other_with_cast.ia5_1))
return false;
return true;
};
FillShape.$metadata$ = classMeta('FillShape', [StyledShape]);
function CompoundShape(components) {
this.qa5_1 = components;
}
CompoundShape.prototype.ra5 = function () {
return this.qa5_1;
};
CompoundShape.prototype.aa5 = function (bb, includeStrokes) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.qa5_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korim.vector.CompoundShape.addBounds.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
tmp1__anonymous__uwfjfc.aa5(bb, includeStrokes);
}
};
CompoundShape.prototype.c8y = function (c) {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.vector.Context2d.buffering' call
c.wa3();
try {
var tmp0_fastForEach = this.qa5_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korim.vector.CompoundShape.draw.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
tmp1__anonymous__uwfjfc.c8y(c);
}
tmp$ret$0 = Unit_getInstance();
break $l$block;
}finally {
c.xa3();
}
}
return tmp$ret$0;
};
CompoundShape.prototype.ba5 = function (path) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.CompoundShape.getPath.<anonymous>' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.qa5_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korim.vector.CompoundShape.getPath.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
tmp1__anonymous__uwfjfc.ba5(path);
}
tmp$ret$0 = path;
return tmp$ret$0;
};
CompoundShape.prototype.toString = function () {
return 'CompoundShape(\n ' + joinToString$default(this.qa5_1, ',\n ', null, null, 0, null, null, 62, null) + '\n)';
};
CompoundShape.$metadata$ = classMeta('CompoundShape', [Shape]);
function toSvgPathString(_this__u8e3s4, separator, decimalPlaces) {
return SvgPath_getInstance().sa5(_this__u8e3s4, separator, decimalPlaces);
}
function toSvgPathString$default(_this__u8e3s4, separator, decimalPlaces, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
separator = ' ';
if (!(($mask0 & 2) === 0))
decimalPlaces = 1;
return toSvgPathString(_this__u8e3s4, separator, decimalPlaces);
}
function EmptyShape() {
EmptyShape_instance = this;
}
EmptyShape.prototype.aa5 = function (bb, includeStrokes) {
return Unit_getInstance();
};
EmptyShape.prototype.c8y = function (c) {
return Unit_getInstance();
};
EmptyShape.$metadata$ = objectMeta('EmptyShape', [Shape]);
var EmptyShape_instance;
function EmptyShape_getInstance() {
if (EmptyShape_instance == null)
new EmptyShape();
return EmptyShape_instance;
}
function StyledShape() {
}
StyledShape.$metadata$ = interfaceMeta('StyledShape', [Shape]);
function PolylineShape$fillShape$delegate$lambda(this$0) {
return function () {
return new FillShape(strokeToFill$default(this$0.ta5_1, this$0.xa5_1, null, null, 6, null), this$0.ua5_1, this$0.va5_1, this$0.wa5_1, this$0.ya5_1);
};
}
function PolylineShape(path, clip, paint, transform, strokeInfo, globalAlpha) {
this.ta5_1 = path;
this.ua5_1 = clip;
this.va5_1 = paint;
this.wa5_1 = transform;
this.xa5_1 = strokeInfo;
this.ya5_1 = globalAlpha;
this.za5_1 = new BoundsBuilder();
this.aa6_1 = Companion_getInstance_0().zp();
this.ba6_1 = thickness$factory(this.xa5_1);
this.ca6_1 = scaleMode$factory(this.xa5_1);
this.da6_1 = startCap$factory(this.xa5_1);
this.ea6_1 = endCap$factory(this.xa5_1);
this.fa6_1 = join$factory(this.xa5_1);
this.ga6_1 = miterLimit$factory(this.xa5_1);
this.ha6_1 = dash$factory(this.xa5_1);
this.ia6_1 = dashOffset$factory(this.xa5_1);
var tmp = this;
tmp.ja6_1 = lazy(PolylineShape$fillShape$delegate$lambda(this));
}
PolylineShape.prototype.q5n = function () {
return this.ta5_1;
};
PolylineShape.prototype.la5 = function () {
return this.ua5_1;
};
PolylineShape.prototype.p8w = function () {
return this.wa5_1;
};
PolylineShape.prototype.aa5 = function (bb, includeStrokes) {
this.za5_1.d2p();
add$default(this.za5_1, this.ta5_1, null, 2, null);
var bounds = this.za5_1.u71(this.aa6_1);
if (includeStrokes) {
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = this.xa5_1.t7j_1 / 2.0;
tmp$ret$0 = Math.max(tmp0_max, 0.0);
var halfThickness = tmp$ret$0;
var tmp0_safe_receiver = bounds;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.c7d(halfThickness, halfThickness, 0.0, 0.0, 12, null);
}
}
bb.t71(bounds);
};
PolylineShape.prototype.pa5 = function (c) {
c.za3(this.xa5_1.v7j_1);
c.x8u(this.xa5_1.t7j_1);
c.y8u(this.xa5_1.x7j_1);
c.z8u(this.xa5_1.y7j_1);
c.d8v(this.va5_1);
};
PolylineShape.prototype.toString = function () {
return 'PolylineShape(path=' + this.ta5_1 + ', clip=' + this.ua5_1 + ', paint=' + this.va5_1 + ', transform=' + this.wa5_1 + ', strokeInfo=' + this.xa5_1 + ', globalAlpha=' + this.ya5_1 + ')';
};
PolylineShape.prototype.hashCode = function () {
var result = this.ta5_1.hashCode();
result = imul(result, 31) + (this.ua5_1 == null ? 0 : this.ua5_1.hashCode()) | 0;
result = imul(result, 31) + hashCode(this.va5_1) | 0;
result = imul(result, 31) + this.wa5_1.hashCode() | 0;
result = imul(result, 31) + this.xa5_1.hashCode() | 0;
result = imul(result, 31) + getNumberHashCode(this.ya5_1) | 0;
return result;
};
PolylineShape.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof PolylineShape))
return false;
var tmp0_other_with_cast = other instanceof PolylineShape ? other : THROW_CCE();
if (!this.ta5_1.equals(tmp0_other_with_cast.ta5_1))
return false;
if (!equals(this.ua5_1, tmp0_other_with_cast.ua5_1))
return false;
if (!equals(this.va5_1, tmp0_other_with_cast.va5_1))
return false;
if (!this.wa5_1.equals(tmp0_other_with_cast.wa5_1))
return false;
if (!this.xa5_1.equals(tmp0_other_with_cast.xa5_1))
return false;
if (!equals(this.ya5_1, tmp0_other_with_cast.ya5_1))
return false;
return true;
};
PolylineShape.$metadata$ = classMeta('PolylineShape', [StyledShape]);
function TextShape() {
}
TextShape.prototype.la6 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = primitiveShapes$factory();
tmp$ret$0 = this.ka6_1.l1();
return tmp$ret$0;
};
TextShape.$metadata$ = classMeta('TextShape', [StyledShape]);
function getBounds_0(_this__u8e3s4, out, bb, includeStrokes) {
bb.d2p();
_this__u8e3s4.aa5(bb, includeStrokes);
bb.a72(out);
return out;
}
function toContext2dCommands$round(_this__u8e3s4, $decimalPlaces) {
return niceStr(_this__u8e3s4, $decimalPlaces);
}
function pathCurvesList$factory() {
return getPropertyCallableRef('pathCurvesList', 1, KProperty1, function (receiver) {
return receiver.ma5();
}, null);
}
function clipCurvesList$factory() {
return getPropertyCallableRef('clipCurvesList', 1, KProperty1, function (receiver) {
return receiver.na5();
}, null);
}
function thickness$factory($b0) {
return getPropertyCallableRef('thickness', 0, KProperty0, function () {
return $b0.t7j_1;
}, null);
}
function scaleMode$factory($b0) {
return getPropertyCallableRef('scaleMode', 0, KProperty0, function () {
return $b0.v7j_1;
}, null);
}
function startCap$factory($b0) {
return getPropertyCallableRef('startCap', 0, KProperty0, function () {
return $b0.w7j_1;
}, null);
}
function endCap$factory($b0) {
return getPropertyCallableRef('endCap', 0, KProperty0, function () {
return $b0.x7j_1;
}, null);
}
function join$factory($b0) {
return getPropertyCallableRef('join', 0, KProperty0, function () {
return $b0.y7j_1;
}, null);
}
function miterLimit$factory($b0) {
return getPropertyCallableRef('miterLimit', 0, KProperty0, function () {
return $b0.z7j_1;
}, null);
}
function dash$factory($b0) {
return getPropertyCallableRef('dash', 0, KProperty0, function () {
return $b0.a7k_1;
}, null);
}
function dashOffset$factory($b0) {
return getPropertyCallableRef('dashOffset', 0, KProperty0, function () {
return $b0.b7k_1;
}, null);
}
function primitiveShapes$factory() {
return getPropertyCallableRef('primitiveShapes', 1, KProperty1, function (receiver) {
return receiver.la6();
}, null);
}
function buildShape(width, height, builder) {
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(width, height);
// Inline function 'kotlin.contracts.contract' call
builder(tmp0_apply);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0.w9h();
}
function ShapeBuilder(width, height) {
var tmp = Companion_getInstance_49();
Context2d_init_$Init$(tmp, null, null, 6, null, this);
var tmp_0 = this;
var tmp0_elvis_lhs = width;
tmp_0.t9h_1 = tmp0_elvis_lhs == null ? 256 : tmp0_elvis_lhs;
var tmp_1 = this;
var tmp0_elvis_lhs_0 = height;
tmp_1.u9h_1 = tmp0_elvis_lhs_0 == null ? 256 : tmp0_elvis_lhs_0;
var tmp_2 = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp_2.v9h_1 = tmp$ret$0;
}
ShapeBuilder.prototype.oa3 = function () {
return this.t9h_1;
};
ShapeBuilder.prototype.pa3 = function () {
return this.u9h_1;
};
ShapeBuilder.prototype.qa3 = function (state, fill, winding) {
if (isEmpty(state.q8n_1))
return Unit_getInstance();
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = state.q8n_1.z4n();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.ShapeBuilder.rendererRender.<anonymous>' call
var tmp = tmp0_also;
var tmp0_elvis_lhs = winding;
tmp.h7j_1 = tmp0_elvis_lhs == null ? tmp0_also.h7j_1 : tmp0_elvis_lhs;
tmp$ret$0 = tmp0_also;
var path = tmp$ret$0;
var tmp0_safe_receiver = state.p8n_1;
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z4n();
var tmp_0;
if (tmp1_safe_receiver == null) {
tmp_0 = null;
} else {
var tmp$ret$1;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.ShapeBuilder.rendererRender.<anonymous>' call
var tmp_1 = tmp1_safe_receiver;
var tmp0_elvis_lhs_0 = winding;
tmp_1.h7j_1 = tmp0_elvis_lhs_0 == null ? tmp1_safe_receiver.h7j_1 : tmp0_elvis_lhs_0;
tmp$ret$1 = tmp1_safe_receiver;
tmp_0 = tmp$ret$1;
}
var clip = tmp_0;
var transform = state.o8n_1.z4n();
if (fill) {
var tmp2_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp1_plusAssign = tmp2_this.v9h_1;
var tmp2_plusAssign = new FillShape(path, clip, state.y8n_1.z4n(), transform, state.e8o_1);
tmp1_plusAssign.c(tmp2_plusAssign);
} else {
var tmp3_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp3_plusAssign = tmp3_this.v9h_1;
var tmp_2 = state.x8n_1.z4n();
var tmp4_thickness = state.s8n_1;
var tmp5_scaleMode = state.r8n_1;
var tmp6_startCap = state.t8n_1;
var tmp7_endCap = state.u8n_1;
var tmp8_join = state.v8n_1;
var tmp9_dash = state.g8o_1;
var tmp10_dashOffset = state.h8o_1;
var tmp11_miterLimit = state.w8n_1;
var tmp4_plusAssign = new PolylineShape(path, clip, tmp_2, transform, new StrokeInfo(tmp4_thickness, true, tmp5_scaleMode, tmp6_startCap, tmp7_endCap, tmp8_join, tmp11_miterLimit, tmp9_dash, tmp10_dashOffset), state.e8o_1);
tmp3_plusAssign.c(tmp4_plusAssign);
}
};
ShapeBuilder.prototype.sa3 = function (image, x, y, width, height, transform) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.ShapeBuilder.rendererDrawImage.<anonymous>' call
rect_0(tmp0_apply, x, y, width, height);
tmp$ret$0 = tmp0_apply;
var tmp = tmp$ret$0;
var tmp_0 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null).h76(width / image.d72(), height / image.e72()).m76(x, y);
var tmp_1 = BitmapPaint_init_$Create$(image, tmp_0, null, null, false, null, 60, null);
var tmp_2 = State_init_$Create$(transform, null, tmp, null, 0.0, null, null, null, 0.0, null, tmp_1, null, null, 0.0, null, null, 0.0, null, null, 0.0, 1047546, null);
this.ra3(tmp_2, true, null, 4, null);
};
ShapeBuilder.prototype.ta3 = function () {
};
ShapeBuilder.prototype.ua3 = function () {
return 0;
};
ShapeBuilder.prototype.va3 = function () {
};
ShapeBuilder.prototype.w9h = function () {
var tmp0_subject = this.v9h_1.i();
return tmp0_subject === 1 ? first_0(this.v9h_1) : new CompoundShape(toList(this.v9h_1));
};
ShapeBuilder.prototype.c8y = function (c) {
c.d8y(this.w9h());
};
ShapeBuilder.$metadata$ = classMeta('ShapeBuilder', [Drawable], undefined, undefined, undefined, Context2d.prototype);
function toSvgPathString$fixX(_this__u8e3s4, $decimalPlaces) {
return toStringDecimal(_this__u8e3s4, $decimalPlaces, true);
}
function toSvgPathString$fixY(_this__u8e3s4, $decimalPlaces) {
return toStringDecimal(_this__u8e3s4, $decimalPlaces, true);
}
function SvgPath() {
SvgPath_instance = this;
}
SvgPath.prototype.sa5 = function (path, separator, decimalPlaces) {
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
var parts = tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds' call
var n = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = path.f7j_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.t4n(tmp0);
var tmp0_subject = tmp1__anonymous__uwfjfc;
Command_getInstance();
if (tmp0_subject === 0) {
// Inline function 'com.soywiz.korim.vector.format.SvgPath.toSvgPathString.<anonymous>' call
var tmp1 = n;
n = tmp1 + 1 | 0;
var tmp0__anonymous__q1qw7t = path.g7j_1.m(tmp1);
var tmp2 = n;
n = tmp2 + 1 | 0;
var tmp1__anonymous__uwfjfc_0 = path.g7j_1.m(tmp2);
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = 'M' + toSvgPathString$fixX(tmp0__anonymous__q1qw7t, decimalPlaces) + ' ' + toSvgPathString$fixY(tmp1__anonymous__uwfjfc_0, decimalPlaces);
parts.c(tmp0_plusAssign);
} else {
Command_getInstance();
if (tmp0_subject === 1) {
// Inline function 'com.soywiz.korim.vector.format.SvgPath.toSvgPathString.<anonymous>' call
var tmp3 = n;
n = tmp3 + 1 | 0;
var tmp2__anonymous__z9zvc9 = path.g7j_1.m(tmp3);
var tmp4 = n;
n = tmp4 + 1 | 0;
var tmp3__anonymous__ufb84q = path.g7j_1.m(tmp4);
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign_0 = 'L' + toSvgPathString$fixX(tmp2__anonymous__z9zvc9, decimalPlaces) + ' ' + toSvgPathString$fixY(tmp3__anonymous__ufb84q, decimalPlaces);
parts.c(tmp0_plusAssign_0);
} else {
Command_getInstance();
if (tmp0_subject === 2) {
// Inline function 'com.soywiz.korim.vector.format.SvgPath.toSvgPathString.<anonymous>' call
var tmp5 = n;
n = tmp5 + 1 | 0;
var tmp4__anonymous__pkmkx7 = path.g7j_1.m(tmp5);
var tmp6 = n;
n = tmp6 + 1 | 0;
var tmp5__anonymous__kpxxpo = path.g7j_1.m(tmp6);
var tmp7 = n;
n = tmp7 + 1 | 0;
var tmp6__anonymous__fv9ai5 = path.g7j_1.m(tmp7);
var tmp8 = n;
n = tmp8 + 1 | 0;
var tmp7__anonymous__b0knam = path.g7j_1.m(tmp8);
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign_1 = 'Q' + toSvgPathString$fixX(tmp4__anonymous__pkmkx7, decimalPlaces) + ' ' + toSvgPathString$fixY(tmp5__anonymous__kpxxpo, decimalPlaces) + ', ' + toSvgPathString$fixX(tmp6__anonymous__fv9ai5, decimalPlaces) + ' ' + toSvgPathString$fixY(tmp7__anonymous__b0knam, decimalPlaces);
parts.c(tmp0_plusAssign_1);
} else {
Command_getInstance();
if (tmp0_subject === 3) {
// Inline function 'com.soywiz.korim.vector.format.SvgPath.toSvgPathString.<anonymous>' call
var tmp9 = n;
n = tmp9 + 1 | 0;
var tmp8__anonymous__65w033 = path.g7j_1.m(tmp9);
var tmp10 = n;
n = tmp10 + 1 | 0;
var tmp9__anonymous__1b7cvk = path.g7j_1.m(tmp10);
var tmp11 = n;
n = tmp11 + 1 | 0;
var tmp10__anonymous__yfiz50 = path.g7j_1.m(tmp11);
var tmp12 = n;
n = tmp12 + 1 | 0;
var tmp11__anonymous__tkubxh = path.g7j_1.m(tmp12);
var tmp13 = n;
n = tmp13 + 1 | 0;
var tmp12__anonymous__oq5opy = path.g7j_1.m(tmp13);
var tmp14 = n;
n = tmp14 + 1 | 0;
var tmp13__anonymous__jvh1if = path.g7j_1.m(tmp14);
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign_2 = 'C' + toSvgPathString$fixX(tmp8__anonymous__65w033, decimalPlaces) + ' ' + toSvgPathString$fixY(tmp9__anonymous__1b7cvk, decimalPlaces) + ', ' + toSvgPathString$fixX(tmp10__anonymous__yfiz50, decimalPlaces) + ' ' + toSvgPathString$fixY(tmp11__anonymous__tkubxh, decimalPlaces) + ', ' + toSvgPathString$fixX(tmp12__anonymous__oq5opy, decimalPlaces) + ' ' + toSvgPathString$fixY(tmp13__anonymous__jvh1if, decimalPlaces);
parts.c(tmp0_plusAssign_2);
} else {
Command_getInstance();
if (tmp0_subject === 4) {
// Inline function 'com.soywiz.korim.vector.format.SvgPath.toSvgPathString.<anonymous>' call
// Inline function 'kotlin.collections.plusAssign' call
parts.c('Z');
}
}
}
}
}
}
return joinToString$default(parts, '', null, null, 0, null, null, 62, null);
};
SvgPath.$metadata$ = objectMeta('SvgPath');
var SvgPath_instance;
function SvgPath_getInstance() {
if (SvgPath_instance == null)
new SvgPath();
return SvgPath_instance;
}
function Rasterizer$rasterizeFill$lambda($xmax, $xmin, this$0, $callback) {
return function (a, b, y) {
var tmp;
if (a <= $xmax ? b >= $xmin : false) {
var a0 = coerceIn(a, $xmin, $xmax);
var b0 = coerceIn(b, $xmin, $xmax);
if (this$0.la2_1) {
println('RASTER(' + a0 + ', ' + b0 + ', ' + y + ')');
}
tmp = $callback(a0, b0, y);
} else {
tmp = Unit_getInstance();
}
return Unit_getInstance();
};
}
function Rasterizer() {
RastScale.call(this);
this.la2_1 = false;
this.ma2_1 = Companion_getInstance_0().zp();
this.na2_1 = 2;
this.oa2_1 = 1;
this.pa2_1 = new PolygonScanline();
this.qa2_1 = new PolygonScanline();
this.ra2_1 = new IntSegmentSet();
this.sa2_1 = new IntSegmentSet();
this.ta2_1 = new IntSegmentSet();
this.ua2_1 = new IntArrayList(1024);
}
Rasterizer.prototype.q5n = function () {
return this.pa2_1;
};
Rasterizer.prototype.la5 = function () {
return this.qa2_1;
};
Rasterizer.prototype.d2p = function () {
this.pa2_1.d2p();
this.qa2_1.d2p();
};
Rasterizer.prototype.ma6 = function (bounds, quality, stats, winding, callback) {
var tmp0_safe_receiver = stats;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.d2p();
}
var xmin = this.d7q(bounds.b74());
var xmax = this.d7q(bounds.z73());
this.pa2_1.a72(this.ma2_1);
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = bounds.y73();
var tmp1_max = this.ma2_1.y73();
tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
var startY = this.d7q(tmp$ret$0);
var tmp$ret$1;
// Inline function 'kotlin.math.min' call
var tmp2_min = bounds.a74();
var tmp3_min = this.ma2_1.a74();
tmp$ret$1 = Math.min(tmp2_min, tmp3_min);
var endY = this.d7q(tmp$ret$1);
var func = Rasterizer$rasterizeFill$lambda(xmax, xmin, this, callback);
this.ua2_1.x7();
var q = quality;
var yCount = imul(((endY - startY | 0) / this.s7q() | 0) + 1 | 0, q);
var inductionVariable = 0;
var last = (yCount + q | 0) - 1 | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var y = startY + ((imul(n, this.s7q()) / this.oa2_1 | 0) / q | 0) | 0;
this.ua2_1.m4o(y);
}
while (inductionVariable < last);
var tmp$ret$3;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$2;
// Inline function 'com.soywiz.korim.vector.rasterizer.Rasterizer.rasterizeFill.<anonymous>' call
var edgesEmitted = 0;
var edgesChecked = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.ua2_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korim.vector.rasterizer.Rasterizer.rasterizeFill.<anonymous>.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.t4n(tmp0);
this.pa2_1.p7q(tmp1__anonymous__uwfjfc, winding, this.ra2_1);
edgesChecked = edgesChecked + this.pa2_1.b7q_1 | 0;
if (this.qa2_1.t4o()) {
this.qa2_1.p7q(tmp1__anonymous__uwfjfc, this.qa2_1.m7p_1, this.sa2_1);
edgesChecked = edgesChecked + this.qa2_1.b7q_1 | 0;
this.ta2_1.l7x(this.ra2_1, this.sa2_1);
}
// Inline function 'com.soywiz.korma.segment.IntSegmentSet.fastForEach' call
var tmp0_fastForEach_0 = this.qa2_1.t4o() ? this.ta2_1 : this.ra2_1;
var inductionVariable_0 = 0;
var last_0 = tmp0_fastForEach_0.i();
if (inductionVariable_0 < last_0)
do {
var n_1 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
// Inline function 'com.soywiz.korim.vector.rasterizer.Rasterizer.rasterizeFill.<anonymous>.<anonymous>.<anonymous>' call
var tmp1__anonymous__uwfjfc_0 = tmp0_fastForEach_0.q7q_1.t4n(n_1);
var tmp2__anonymous__z9zvc9 = tmp0_fastForEach_0.r7q_1.t4n(n_1);
func(tmp1__anonymous__uwfjfc_0, tmp2__anonymous__z9zvc9, tmp1__anonymous__uwfjfc);
var tmp0_0 = edgesEmitted;
edgesEmitted = tmp0_0 + 1 | 0;
}
while (inductionVariable_0 < last_0);
}
var tmp0_safe_receiver_0 = stats;
var tmp;
if (tmp0_safe_receiver_0 == null) {
tmp = null;
} else {
tmp0_safe_receiver_0.qa6(edgesChecked, edgesEmitted, yCount);
tmp = Unit_getInstance();
}
tmp$ret$2 = tmp;
tmp$ret$3 = tmp$ret$2;
};
Rasterizer.prototype.va2 = function (bounds, quality, stats, winding, callback, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
quality = this.na2_1;
if (!(($mask0 & 4) === 0))
stats = null;
if (!(($mask0 & 8) === 0))
winding = Winding_NON_ZERO_getInstance();
return this.ma6(bounds, quality, stats, winding, callback);
};
Rasterizer.$metadata$ = classMeta('Rasterizer', undefined, undefined, undefined, undefined, RastScale.prototype);
function Renderer$drawImage$lambda($x, $y, $width, $height) {
return function ($this$transformed) {
rect_0($this$transformed, $x, $y, $width, $height);
return Unit_getInstance();
};
}
function Renderer() {
this.ya2_1 = false;
this.za2_1 = 0;
}
Renderer.prototype.mj = function () {
return Unit_getInstance();
};
Renderer.prototype.ca3 = function () {
var tmp0_this = this;
var tmp1 = tmp0_this.za2_1;
tmp0_this.za2_1 = tmp1 + 1 | 0;
return tmp1;
};
Renderer.prototype.da3 = function () {
var tmp0_this = this;
var tmp1 = tmp0_this.za2_1;
tmp0_this.za2_1 = tmp1 - 1 | 0;
if (this.za2_1 === 0) {
this.mj();
}
};
Renderer.prototype.xa2 = function (state, fill, winding) {
return Unit_getInstance();
};
Renderer.prototype.ba3 = function (state, fill, winding, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
winding = null;
var tmp;
if ($handler == null) {
this.xa2(state, fill, winding);
tmp = Unit_getInstance();
} else {
tmp = $handler(state, fill, winding);
}
return tmp;
};
Renderer.prototype.ea3 = function (image, x, y, width, height, transform) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.vector.renderer.Renderer.drawImage.<anonymous>' call
if (transform.d76().equals(Type_IDENTITY_getInstance())) {
rect_0(tmp0_apply, x, y, width, height);
} else {
transformed(tmp0_apply, transform, Renderer$drawImage$lambda(x, y, width, height));
}
tmp$ret$0 = tmp0_apply;
var tmp = tmp$ret$0;
var tmp_0 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null).h76(width / image.d72(), height / image.e72()).m76(x, y);
var tmp_1 = BitmapPaint_init_$Create$(image, tmp_0, null, null, false, null, 60, null);
var tmp_2 = State_init_$Create$(transform, null, tmp, null, 0.0, null, null, null, 0.0, null, tmp_1, null, null, 0.0, null, null, 0.0, null, null, 0.0, 1047546, null);
this.ba3(tmp_2, true, null, 4, null);
};
Renderer.prototype.s1x = function () {
this.mj();
};
Renderer.$metadata$ = classMeta('Renderer');
function Companion_36() {
Companion_instance_36 = this;
DummyRenderer.call(this, 128, 128);
}
Companion_36.$metadata$ = objectMeta('Companion', undefined, undefined, undefined, undefined, DummyRenderer.prototype);
var Companion_instance_36;
function Companion_getInstance_49() {
if (Companion_instance_36 == null)
new Companion_36();
return Companion_instance_36;
}
function DummyRenderer(width, height) {
Companion_getInstance_49();
Renderer.call(this);
this.ta6_1 = width;
this.ua6_1 = height;
}
DummyRenderer.prototype.d72 = function () {
return this.ta6_1;
};
DummyRenderer.prototype.e72 = function () {
return this.ua6_1;
};
DummyRenderer.$metadata$ = classMeta('DummyRenderer', undefined, undefined, undefined, undefined, Renderer.prototype);
function HtmlCanvas() {
HtmlCanvas_instance = this;
}
HtmlCanvas.prototype.va6 = function (width, height) {
if (OS_getInstance().o6u()) {
// Inline function 'kotlin.error' call
throw IllegalStateException_init_$Create$('Canvas not available on Node.JS');
}
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = document.createElement('canvas');
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var out = tmp$ret$1;
out.width = width;
out.height = height;
return toLike(out);
};
HtmlCanvas.$metadata$ = objectMeta('HtmlCanvas');
var HtmlCanvas_instance;
function HtmlCanvas_getInstance() {
if (HtmlCanvas_instance == null)
new HtmlCanvas();
return HtmlCanvas_instance;
}
function toLike(_this__u8e3s4) {
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function HtmlImage() {
HtmlImage_instance = this;
}
HtmlImage.prototype.wa6 = function (width, height) {
return HtmlCanvas_getInstance().va6(width, height);
};
HtmlImage.prototype.xa6 = function (bmpData, bmpWidth, bmpHeight, canvas) {
var pixelCount = _RgbaArray___get_size__impl__imxef8(bmpData);
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = canvas.getContext('2d');
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var ctx = tmp$ret$1;
var idata = ctx.createImageData(bmpWidth, bmpHeight);
var idataData = idata.data;
var m = 0;
var inductionVariable = 0;
if (inductionVariable < pixelCount)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c = RgbaArray__get_impl_nzyo1o(bmpData, n);
// Inline function 'org.khronos.webgl.set' call
var tmp1 = m;
m = tmp1 + 1 | 0;
var tmp2_set = tmp1;
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
var tmp1_asDynamic = _RGBA___get_r__impl__duz7mo(c);
tmp$ret$2 = tmp1_asDynamic;
var tmp3_set = tmp$ret$2;
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = idataData;
tmp$ret$3[tmp2_set] = tmp3_set;
// Inline function 'org.khronos.webgl.set' call
var tmp2 = m;
m = tmp2 + 1 | 0;
var tmp5_set = tmp2;
var tmp$ret$4;
// Inline function 'kotlin.js.asDynamic' call
var tmp4_asDynamic = _RGBA___get_g__impl__o8pukr(c);
tmp$ret$4 = tmp4_asDynamic;
var tmp6_set = tmp$ret$4;
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = idataData;
tmp$ret$5[tmp5_set] = tmp6_set;
// Inline function 'org.khronos.webgl.set' call
var tmp3 = m;
m = tmp3 + 1 | 0;
var tmp8_set = tmp3;
var tmp$ret$6;
// Inline function 'kotlin.js.asDynamic' call
var tmp7_asDynamic = _RGBA___get_b__impl__m6tl80(c);
tmp$ret$6 = tmp7_asDynamic;
var tmp9_set = tmp$ret$6;
var tmp$ret$7;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$7 = idataData;
tmp$ret$7[tmp8_set] = tmp9_set;
// Inline function 'org.khronos.webgl.set' call
var tmp4 = m;
m = tmp4 + 1 | 0;
var tmp11_set = tmp4;
var tmp$ret$8;
// Inline function 'kotlin.js.asDynamic' call
var tmp10_asDynamic = _RGBA___get_a__impl__6msvu7(c);
tmp$ret$8 = tmp10_asDynamic;
var tmp12_set = tmp$ret$8;
var tmp$ret$9;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$9 = idataData;
tmp$ret$9[tmp11_set] = tmp12_set;
}
while (inductionVariable < pixelCount);
ctx.putImageData(idata, 0.0, 0.0);
return canvas;
};
HtmlImage.prototype.ya6 = function (bmp, canvas) {
return this.xa6(_RgbaArray___init__impl__oib4y4(bmp.h89().r86_1), bmp.d72(), bmp.e72(), canvas);
};
HtmlImage.prototype.za6 = function (bmp) {
return this.ya6(bmp, this.wa6(bmp.d72(), bmp.e72()));
};
HtmlImage.$metadata$ = objectMeta('HtmlImage');
var HtmlImage_instance;
function HtmlImage_getInstance() {
if (HtmlImage_instance == null)
new HtmlImage();
return HtmlImage_instance;
}
function toHtmlNative(_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp;
if (tmp0_subject instanceof HtmlNativeImage) {
tmp = _this__u8e3s4;
} else {
tmp = HtmlNativeImage_init_$Create$_0(HtmlImage_getInstance().za6(_this__u8e3s4.d86()));
}
return tmp;
}
function get_nativeImageFormatProvider() {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
return nativeImageFormatProvider;
}
var nativeImageFormatProvider;
function get_tempB() {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
return tempB;
}
var tempB;
function get_tempI() {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
return tempI;
}
var tempI;
function get_temp8() {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
return temp8;
}
var temp8;
function get_isLittleEndian() {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = isLittleEndian$factory();
tmp$ret$0 = isLittleEndian$delegate.l1();
return tmp$ret$0;
}
var isLittleEndian$delegate;
function NodeJsNativeImageFormatProvider() {
NodeJsNativeImageFormatProvider_instance = this;
BaseNativeImageFormatProvider.call(this);
}
NodeJsNativeImageFormatProvider.prototype.w9p = function () {
return get_RegisteredImageFormats();
};
NodeJsNativeImageFormatProvider.$metadata$ = objectMeta('NodeJsNativeImageFormatProvider', undefined, undefined, undefined, undefined, BaseNativeImageFormatProvider.prototype);
var NodeJsNativeImageFormatProvider_instance;
function NodeJsNativeImageFormatProvider_getInstance() {
if (NodeJsNativeImageFormatProvider_instance == null)
new NodeJsNativeImageFormatProvider();
return NodeJsNativeImageFormatProvider_instance;
}
function $decodeInternalCOROUTINE$35(_this__u8e3s4, data, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.ia7_1 = _this__u8e3s4;
this.ja7_1 = data;
this.ka7_1 = props;
}
$decodeInternalCOROUTINE$35.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 = BrowserImage_getInstance().la7(this.ja7_1, this.ka7_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
var ARGUMENT_0 = HtmlNativeImage_init_$Create$_0(ARGUMENT);
return NativeImageResult_init_$Create$(ARGUMENT_0, 0, 0, 6, null);
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);
};
$decodeInternalCOROUTINE$35.$metadata$ = classMeta('$decodeInternalCOROUTINE$35', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $decodeInternalCOROUTINE$36(_this__u8e3s4, vfs, path, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.ua7_1 = _this__u8e3s4;
this.va7_1 = vfs;
this.wa7_1 = path;
this.xa7_1 = props;
}
$decodeInternalCOROUTINE$36.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 6;
this.ya7_1 = this.va7_1;
var tmp_0 = this.ya7_1;
if (tmp_0 instanceof LocalVfs) {
this.o7_1 = 4;
suspendResult = BrowserImage_getInstance().da8(this.wa7_1, this.xa7_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
var tmp_1 = this.ya7_1;
if (tmp_1 instanceof UrlVfs) {
this.aa8_1 = this.va7_1.f5w(this.wa7_1);
this.o7_1 = 3;
suspendResult = BrowserImage_getInstance().da8(this.aa8_1, this.xa7_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.ba8_1 = BrowserImage_getInstance();
this.o7_1 = 1;
suspendResult = this.va7_1.c19(this.wa7_1).h5n(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
}
}
break;
case 1:
this.ca8_1 = suspendResult;
this.o7_1 = 2;
suspendResult = this.ba8_1.la7(this.ca8_1, this.xa7_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
var ARGUMENT = suspendResult;
this.za7_1 = HtmlNativeImage_init_$Create$_0(ARGUMENT);
this.o7_1 = 5;
continue $sm;
case 3:
var ARGUMENT_0 = suspendResult;
this.za7_1 = HtmlNativeImage_init_$Create$(ARGUMENT_0);
this.o7_1 = 5;
continue $sm;
case 4:
var ARGUMENT_1 = suspendResult;
this.za7_1 = HtmlNativeImage_init_$Create$(ARGUMENT_1);
this.o7_1 = 5;
continue $sm;
case 5:
var ARGUMENT_2 = this.za7_1;
return NativeImageResult_init_$Create$(ARGUMENT_2, 0, 0, 6, null);
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);
};
$decodeInternalCOROUTINE$36.$metadata$ = classMeta('$decodeInternalCOROUTINE$36', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function HtmlNativeImageFormatProvider() {
HtmlNativeImageFormatProvider_instance = this;
NativeImageFormatProvider.call(this);
}
HtmlNativeImageFormatProvider.prototype.m9s = function (data, props, $cont) {
var tmp = new $decodeInternalCOROUTINE$35(this, data, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
HtmlNativeImageFormatProvider.prototype.m9t = function (vfs, path, props, $cont) {
var tmp = new $decodeInternalCOROUTINE$36(this, vfs, path, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
HtmlNativeImageFormatProvider.prototype.t8f = function (width, height, premultiplied) {
return HtmlNativeImage_init_$Create$_0(HtmlCanvas_getInstance().va6(width, height));
};
HtmlNativeImageFormatProvider.prototype.s8f = function (bmp) {
return HtmlNativeImage_init_$Create$_0(HtmlImage_getInstance().za6(bmp.d86()));
};
HtmlNativeImageFormatProvider.$metadata$ = objectMeta('HtmlNativeImageFormatProvider', undefined, undefined, undefined, undefined, NativeImageFormatProvider.prototype);
var HtmlNativeImageFormatProvider_instance;
function HtmlNativeImageFormatProvider_getInstance() {
if (HtmlNativeImageFormatProvider_instance == null)
new HtmlNativeImageFormatProvider();
return HtmlNativeImageFormatProvider_instance;
}
function HtmlNativeImage_init_$Init$(img, $this) {
HtmlNativeImage.call($this, img, img.width, img.height);
return $this;
}
function HtmlNativeImage_init_$Create$(img) {
return HtmlNativeImage_init_$Init$(img, Object.create(HtmlNativeImage.prototype));
}
function HtmlNativeImage_init_$Init$_0(canvas, $this) {
HtmlNativeImage.call($this, canvas, canvas.width, canvas.height);
return $this;
}
function HtmlNativeImage_init_$Create$_0(canvas) {
return HtmlNativeImage_init_$Init$_0(canvas, Object.create(HtmlNativeImage.prototype));
}
function HtmlNativeImage$lazyCanvasElement$delegate$lambda(this$0, $width, $height) {
return function () {
var tmp$ret$5;
// Inline function 'kotlin.also' call
var tmp;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
var tmp0_asDynamic = this$0.ta8_1;
tmp$ret$0 = tmp0_asDynamic;
if (tmp$ret$0.src !== undefined) {
var tmp_0 = BrowserImage_getInstance();
var tmp$ret$2;
// Inline function 'kotlin.js.unsafeCast' call
var tmp1_unsafeCast = this$0.ta8_1;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp1_unsafeCast;
tmp$ret$2 = tmp$ret$1;
tmp = tmp_0.xa8(tmp$ret$2, $width, $height);
} else {
var tmp$ret$4;
// Inline function 'kotlin.js.unsafeCast' call
var tmp2_unsafeCast = this$0.ta8_1;
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = tmp2_unsafeCast;
tmp$ret$4 = tmp$ret$3;
tmp = tmp$ret$4;
}
var tmp3_also = tmp;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korim.format.HtmlNativeImage.lazyCanvasElement$delegate.<anonymous>.<anonymous>' call
this$0.ta8_1 = tmp3_also;
tmp$ret$5 = tmp3_also;
return tmp$ret$5;
};
}
function HtmlNativeImage$ctx$delegate$lambda(this$0) {
return function () {
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = this$0.ya8().getContext('2d');
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
};
}
function HtmlNativeImage(texSourceBase, width, height) {
NativeImage.call(this, width, height, texSourceBase, true);
this.sa8_1 = texSourceBase;
this.ta8_1 = this.sa8_1;
var tmp = this;
tmp.ua8_1 = lazy(HtmlNativeImage$lazyCanvasElement$delegate$lambda(this, width, height));
var tmp_0 = this;
tmp_0.va8_1 = lazy(HtmlNativeImage$ctx$delegate$lambda(this));
var tmp_1 = this;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_5().o1h(0.0);
tmp_1.wa8_1 = tmp$ret$0;
}
HtmlNativeImage.prototype.t2 = function () {
return 'HtmlNativeImage';
};
HtmlNativeImage.prototype.ya8 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = lazyCanvasElement$factory();
tmp$ret$0 = this.ua8_1.l1();
return tmp$ret$0;
};
HtmlNativeImage.prototype.za8 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = ctx$factory();
tmp$ret$0 = this.va8_1.l1();
return tmp$ret$0;
};
HtmlNativeImage.prototype.m7z = function (x, y, width, height, out, offset) {
if (width <= 0 ? true : height <= 0)
return Unit_getInstance();
var size = imul(width, height);
var tmp = this.sa8_1;
if (tmp instanceof HTMLVideoElement) {
var now = PerformanceCounter_getInstance().x1h();
var elapsedTime = TimeSpan__minus_impl_5w5v8s(now, this.wa8_1);
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_5().o1h(16.0);
if (TimeSpan__compareTo_impl_zidry4(elapsedTime, tmp$ret$0) >= 0) {
this.wa8_1 = now;
this.za8().clearRect(0.0, 0.0, width, height);
this.za8().drawImage(this.sa8_1, 0.0, 0.0);
}
}
var idata = this.za8().getImageData(x, y, width, height);
var tmp$ret$2;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = asInt32Buffer(idata.data.buffer);
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_unsafeCast;
tmp$ret$2 = tmp$ret$1;
var data = tmp$ret$2;
arraycopy(data, 0, out, offset, size);
if (get_isBigEndian()) {
bswap32(out, offset, size);
}
if (!this.t7y_1) {
premultiply(_RgbaArray___init__impl__oib4y4(out), offset, _RgbaPremultipliedArray___init__impl__lx83hy(out), offset, imul(width, height));
}
};
HtmlNativeImage.prototype.p7z = function (x, y, width, height, out, offset) {
if (width <= 0 ? true : height <= 0)
return Unit_getInstance();
var size = imul(width, height);
var idata = this.za8().createImageData(width, height);
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = asInt32Buffer(idata.data.buffer);
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var data = tmp$ret$1;
arraycopy(out, offset, data, 0, size);
if (!this.t7y_1) {
depremultiply(_RgbaPremultipliedArray___init__impl__lx83hy(data), 0, _RgbaArray___init__impl__oib4y4(data), 0, imul(width, height));
}
if (get_isBigEndian()) {
bswap32(data, 0, size);
}
this.za8().putImageData(idata, x, y);
};
HtmlNativeImage.prototype.b86 = function (antialiasing) {
var tmp = new CanvasContext2dRenderer(this.ya8());
return Context2d_init_$Create$(tmp, null, null, 6, null);
};
HtmlNativeImage.prototype.aa9 = function (type) {
return this.ya8().toDataURL(type);
};
HtmlNativeImage.prototype.ba9 = function (type, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
type = 'image/png';
return this.aa9(type);
};
HtmlNativeImage.$metadata$ = classMeta('HtmlNativeImage', undefined, undefined, undefined, undefined, NativeImage.prototype);
function BrowserImage$loadImage$lambda($img, $cancellable) {
return function (it) {
var tmp$ret$3;
// Inline function 'kotlin.coroutines.resume' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = $img;
tmp$ret$1 = tmp$ret$0;
var tmp0_resume = tmp$ret$1;
var tmp$ret$2;
// Inline function 'kotlin.Companion.success' call
var tmp0_success = Companion_getInstance_11();
tmp$ret$2 = _Result___init__impl__xyqfz8(tmp0_resume);
$cancellable.n5(tmp$ret$2);
tmp$ret$3 = Unit_getInstance();
return Unit_getInstance();
};
}
function BrowserImage$loadImage$lambda_0($jsUrl, $cancellable) {
return function (_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd, _anonymous_parameter_2__qggqfi, _anonymous_parameter_3__qggqen, _anonymous_parameter_4__qggqds) {
var tmp$ret$1;
// Inline function 'kotlin.coroutines.resumeWithException' call
var tmp0_resumeWithException = RuntimeException_init_$Create$('error loading image ' + $jsUrl);
var tmp$ret$0;
// Inline function 'kotlin.Companion.failure' call
var tmp0_failure = Companion_getInstance_11();
tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(tmp0_resumeWithException));
$cancellable.n5(tmp$ret$0);
tmp$ret$1 = Unit_getInstance();
return Unit_getInstance();
};
}
function $decodeToCanvasCOROUTINE$37(_this__u8e3s4, bytes, props, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.ka9_1 = _this__u8e3s4;
this.la9_1 = bytes;
this.ma9_1 = props;
}
$decodeToCanvasCOROUTINE$37.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 7;
if (OS_getInstance().o6u()) {
throw IllegalStateException_init_$Create$('Canvas not available on NodeJS');
}
var tmp_0 = this;
this.na9_1 = {};
this.na9_1['type'] = 'image/png';
tmp_0.oa9_1 = new Blob([this.la9_1], this.na9_1);
this.pa9_1 = URL.createObjectURL(this.oa9_1);
this.o7_1 = 1;
continue $sm;
case 1:
this.o7_1 = 2;
continue $sm;
case 2:
this.p7_1 = 6;
this.o7_1 = 3;
suspendResult = this.ka9_1.ra9(this.pa9_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 3:
this.qa9_1 = suspendResult;
this.p7_1 = 7;
this.o7_1 = 4;
var tmp_1 = this;
continue $sm;
case 4:
var tmp_2 = this.qa9_1;
URL.revokeObjectURL(this.pa9_1);
;
return tmp_2;
case 5:
URL.revokeObjectURL(this.pa9_1);
;
return Unit_getInstance();
case 6:
this.p7_1 = 7;
var t = this.r7_1;
URL.revokeObjectURL(this.pa9_1);
;
throw t;
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);
};
$decodeToCanvasCOROUTINE$37.$metadata$ = classMeta('$decodeToCanvasCOROUTINE$37', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $loadCanvasCOROUTINE$38(_this__u8e3s4, jsUrl, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.aaa_1 = _this__u8e3s4;
this.baa_1 = jsUrl;
}
$loadCanvasCOROUTINE$38.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.aaa_1.caa(this.baa_1, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
return this.aaa_1.daa(ARGUMENT);
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);
};
$loadCanvasCOROUTINE$38.$metadata$ = classMeta('$loadCanvasCOROUTINE$38', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function BrowserImage() {
BrowserImage_instance = this;
}
BrowserImage.prototype.la7 = function (bytes, props, $cont) {
var tmp = new $decodeToCanvasCOROUTINE$37(this, bytes, props, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
BrowserImage.prototype.daa = function (img) {
return this.xa8(img, img.width, img.height);
};
BrowserImage.prototype.xa8 = function (img, width, height) {
var canvas = HtmlCanvas_getInstance().va6(width, height);
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = canvas.getContext('2d');
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var ctx = tmp$ret$1;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = img;
tmp$ret$3 = tmp$ret$2;
ctx.drawImage(tmp$ret$3, 0.0, 0.0);
return canvas;
};
BrowserImage.prototype.da8 = function (jsUrl, props, $cont) {
var tmp$ret$2;
// Inline function 'kotlinx.coroutines.suspendCancellableCoroutine.<anonymous>' call
var tmp0__anonymous__q1qw7t = $cont;
var cancellable = new CancellableContinuationImpl(intercepted(tmp0__anonymous__q1qw7t), get_MODE_CANCELLABLE());
cancellable.d1z();
// Inline function 'com.soywiz.korim.format.BrowserImage.loadImage.<anonymous>' call
if (OS_getInstance().o6u()) {
// Inline function 'kotlin.error' call
throw IllegalStateException_init_$Create$('Canvas not available on NodeJS');
}
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = document.createElement('img');
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var img = tmp$ret$1;
img.onload = BrowserImage$loadImage$lambda(img, cancellable);
img.onerror = BrowserImage$loadImage$lambda_0(jsUrl, cancellable);
img.src = jsUrl;
tmp$ret$2 = cancellable.d1w();
return tmp$ret$2;
};
BrowserImage.prototype.caa = function (jsUrl, props, $cont, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
props = Companion_getInstance_35().g8i_1;
return this.da8(jsUrl, props, $cont);
};
BrowserImage.prototype.ra9 = function (jsUrl, $cont) {
var tmp = new $loadCanvasCOROUTINE$38(this, jsUrl, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
BrowserImage.$metadata$ = objectMeta('BrowserImage');
var BrowserImage_instance;
function BrowserImage_getInstance() {
if (BrowserImage_instance == null)
new BrowserImage();
return BrowserImage_instance;
}
function get_isBigEndian() {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
return !get_isLittleEndian();
}
function bswap32(v, offset, size) {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
var inductionVariable = offset;
var last = offset + size | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
v[n] = bswap32_0(v[n]);
}
while (inductionVariable < last);
}
function setFont($this, font, fontSize) {
var tmp;
var tmp0_safe_receiver = font;
if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t2()) == $this.jaa_1) {
tmp = fontSize === $this.iaa_1;
} else {
tmp = false;
}
if (tmp)
return Unit_getInstance();
var tmp_0 = $this;
var tmp1_safe_receiver = font;
tmp_0.jaa_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t2();
$this.iaa_1 = fontSize;
var tmp2_safe_receiver = font;
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.t2();
$this.haa_1.font = '' + fontSize + "px '" + (tmp3_elvis_lhs == null ? 'default' : tmp3_elvis_lhs) + "'";
}
function setState($this, state, fill, doSetFont) {
$this.haa_1.globalAlpha = state.e8o_1;
$this.haa_1.globalCompositeOperation = $this.kaa(state.f8o_1);
if (doSetFont) {
setFont($this, state.a8o_1, state.b8o_1);
}
if (fill) {
$this.haa_1.fillStyle = $this.laa(state.y8n_1);
} else {
$this.haa_1.lineWidth = state.s8n_1;
var tmp0_subject = state.v8n_1;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 0:
var tmp$ret$2;
// Inline function 'org.w3c.dom.BEVEL' call
var tmp0__get_BEVEL__q5ny41 = null;
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = 'bevel';
var tmp0_unsafeCast = tmp$ret$0;
tmp$ret$1 = tmp0_unsafeCast;
tmp$ret$2 = tmp$ret$1;
tmp = tmp$ret$2;
break;
case 2:
var tmp$ret$5;
// Inline function 'org.w3c.dom.MITER' call
var tmp1__get_MITER__qkn1s7 = null;
var tmp$ret$4;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = 'miter';
var tmp0_unsafeCast_0 = tmp$ret$3;
tmp$ret$4 = tmp0_unsafeCast_0;
tmp$ret$5 = tmp$ret$4;
tmp = tmp$ret$5;
break;
case 1:
var tmp$ret$8;
// Inline function 'org.w3c.dom.ROUND' call
var tmp2__get_ROUND__o6i3fj = null;
var tmp$ret$7;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$6;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$6 = 'round';
var tmp0_unsafeCast_1 = tmp$ret$6;
tmp$ret$7 = tmp0_unsafeCast_1;
tmp$ret$8 = tmp$ret$7;
tmp = tmp$ret$8;
break;
default:
noWhenBranchMatchedException();
break;
}
$this.haa_1.lineJoin = tmp;
var tmp1_subject = state.r8u();
var tmp0_0 = tmp1_subject.q2_1;
var tmp_0;
switch (tmp0_0) {
case 0:
var tmp$ret$11;
// Inline function 'org.w3c.dom.BUTT' call
var tmp3__get_BUTT__e4ogcb = null;
var tmp$ret$10;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$9;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$9 = 'butt';
var tmp0_unsafeCast_2 = tmp$ret$9;
tmp$ret$10 = tmp0_unsafeCast_2;
tmp$ret$11 = tmp$ret$10;
tmp_0 = tmp$ret$11;
break;
case 2:
var tmp$ret$14;
// Inline function 'org.w3c.dom.ROUND' call
var tmp4__get_ROUND__eh4t0h = null;
var tmp$ret$13;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$12;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$12 = 'round';
var tmp0_unsafeCast_3 = tmp$ret$12;
tmp$ret$13 = tmp0_unsafeCast_3;
tmp$ret$14 = tmp$ret$13;
tmp_0 = tmp$ret$14;
break;
case 1:
var tmp$ret$17;
// Inline function 'org.w3c.dom.SQUARE' call
var tmp5__get_SQUARE__ttqasv = null;
var tmp$ret$16;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$15;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$15 = 'square';
var tmp0_unsafeCast_4 = tmp$ret$15;
tmp$ret$16 = tmp0_unsafeCast_4;
tmp$ret$17 = tmp$ret$16;
tmp_0 = tmp$ret$17;
break;
default:
noWhenBranchMatchedException();
break;
}
$this.haa_1.lineCap = tmp_0;
$this.haa_1.strokeStyle = $this.laa(state.x8n_1);
}
}
function transformPaint($this, paint) {
if (isInterface(paint, TransformedPaint)) {
$this.maa($this.haa_1, paint.p8w());
}
}
function CanvasContext2dRenderer(canvas) {
Renderer.call(this);
this.gaa_1 = canvas;
var tmp = this;
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = this.gaa_1.getContext('2d');
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
tmp.haa_1 = tmp$ret$1;
var tmp_0 = this;
DoubleCompanionObject_getInstance();
tmp_0.iaa_1 = NaN;
this.jaa_1 = null;
}
CanvasContext2dRenderer.prototype.d72 = function () {
return this.gaa_1.width;
};
CanvasContext2dRenderer.prototype.e72 = function () {
return this.gaa_1.height;
};
CanvasContext2dRenderer.prototype.za8 = function () {
return this.haa_1;
};
CanvasContext2dRenderer.prototype.naa = function (_this__u8e3s4, paint) {
var grad = _this__u8e3s4;
var inductionVariable = 0;
var last = paint.t9e_1.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var stop = paint.t9e_1.t4n(n);
var color = paint.u9e_1.t4n(n);
grad.addColorStop(stop, _RGBA___get_htmlStringSimple__impl__l4nu0u(_RGBA___init__impl__lqpay5(color)));
}
while (inductionVariable < last);
return _this__u8e3s4;
};
CanvasContext2dRenderer.prototype.laa = function (_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp;
if (tmp0_subject instanceof NonePaint) {
tmp = 'none';
} else {
if (tmp0_subject instanceof RGBA) {
tmp = _RGBA___get_htmlColor__impl__bzw5k6(_RGBA___get_color__impl__8x3sb3(_this__u8e3s4.n8k_1));
} else {
if (tmp0_subject instanceof GradientPaint) {
var tmp1_subject = _this__u8e3s4.m9e_1;
var tmp0 = tmp1_subject.q2_1;
var tmp_0;
switch (tmp0) {
case 0:
tmp_0 = this.naa(this.haa_1.createLinearGradient(_this__u8e3s4.n9e_1, _this__u8e3s4.o9e_1, _this__u8e3s4.q9e_1, _this__u8e3s4.r9e_1), _this__u8e3s4);
break;
case 1:
tmp_0 = this.naa(this.haa_1.createRadialGradient(_this__u8e3s4.n9e_1, _this__u8e3s4.o9e_1, _this__u8e3s4.p9e_1, _this__u8e3s4.q9e_1, _this__u8e3s4.r9e_1, _this__u8e3s4.s9e_1), _this__u8e3s4);
break;
case 2:
var tmp_1;
if (!equals(this.haa_1.createConicGradient, undefined)) {
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = this.haa_1.createConicGradient(_Angle___get_radians__impl__n00yt5(_this__u8e3s4.z9e_1), _this__u8e3s4.n9e_1, _this__u8e3s4.o9e_1);
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
tmp_1 = this.naa(tmp$ret$1, _this__u8e3s4);
} else {
tmp_1 = 'fuchsia';
}
tmp_0 = tmp_1;
break;
default:
noWhenBranchMatchedException();
break;
}
tmp = tmp_0;
} else {
if (tmp0_subject instanceof BitmapPaint) {
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp1_unsafeCast = toHtmlNative(_this__u8e3s4.j9x_1).ta8_1;
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_unsafeCast;
tmp$ret$3 = tmp$ret$2;
tmp = this.haa_1.createPattern(tmp$ret$3, (_this__u8e3s4.l9y() ? _this__u8e3s4.n9y() : false) ? 'repeat' : _this__u8e3s4.l9y() ? 'repeat-x' : _this__u8e3s4.n9y() ? 'repeat-y' : 'no-repeat');
} else {
tmp = 'black';
}
}
}
}
return tmp;
};
CanvasContext2dRenderer.prototype.oaa = function (_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 0:
tmp = 'clear';
break;
case 1:
tmp = 'copy';
break;
case 2:
tmp = 'source-over';
break;
case 3:
tmp = 'destination-over';
break;
case 4:
tmp = 'source-in';
break;
case 5:
tmp = 'destination-in';
break;
case 6:
tmp = 'source-out';
break;
case 7:
tmp = 'destination-out';
break;
case 8:
tmp = 'source-atop';
break;
case 9:
tmp = 'destination-atop';
break;
case 10:
tmp = 'xor';
break;
case 11:
tmp = 'lighter';
break;
default:
noWhenBranchMatchedException();
break;
}
return tmp;
};
CanvasContext2dRenderer.prototype.paa = function (_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 0:
tmp = 'normal';
break;
case 1:
tmp = 'multiply';
break;
case 2:
tmp = 'screen';
break;
case 3:
tmp = 'overlay';
break;
case 4:
tmp = 'darken';
break;
case 5:
tmp = 'lighten';
break;
case 6:
tmp = 'color-dodge';
break;
case 7:
tmp = 'color-burn';
break;
case 8:
tmp = 'hard-light';
break;
case 9:
tmp = 'soft-light';
break;
case 10:
tmp = 'difference';
break;
case 11:
tmp = 'exclusion';
break;
case 12:
tmp = 'hue';
break;
case 13:
tmp = 'saturation';
break;
case 14:
tmp = 'color';
break;
case 15:
tmp = 'luminosity';
break;
default:
var tmp$ret$1;
// Inline function 'kotlin.text.lowercase' call
var tmp0_lowercase = _this__u8e3s4.p2_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_lowercase;
tmp$ret$1 = tmp$ret$0.toLowerCase();
tmp = tmp$ret$1;
break;
}
return tmp;
};
CanvasContext2dRenderer.prototype.kaa = function (_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp;
if (tmp0_subject instanceof CompositeMode) {
tmp = this.oaa(_this__u8e3s4);
} else {
if (tmp0_subject instanceof BlendMode) {
tmp = this.paa(_this__u8e3s4);
} else {
tmp = 'source-over';
}
}
return tmp;
};
CanvasContext2dRenderer.prototype.maa = function (_this__u8e3s4, m) {
_this__u8e3s4.transform(m.i74_1, m.j74_1, m.k74_1, m.l74_1, m.m74_1, m.n74_1);
};
CanvasContext2dRenderer.prototype.ea3 = function (image, x, y, width, height, transform) {
this.haa_1.save();
try {
var tmp$ret$0;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
this.haa_1.setTransform(transform.i74_1, transform.j74_1, transform.k74_1, transform.l74_1, transform.m74_1, transform.n74_1);
tmp$ret$0 = Unit_getInstance();
var tmp$ret$2;
// Inline function 'kotlin.js.unsafeCast' call
var tmp = ensureNative(image);
var tmp0_unsafeCast = (tmp instanceof HtmlNativeImage ? tmp : THROW_CCE()).ta8_1;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_unsafeCast;
tmp$ret$2 = tmp$ret$1;
this.haa_1.drawImage(tmp$ret$2, x, y, width, height);
}finally {
this.haa_1.restore();
}
};
CanvasContext2dRenderer.prototype.qaa = function (path) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds' call
var n = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = path.f7j_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.t4n(tmp0);
var tmp0_subject = tmp1__anonymous__uwfjfc;
Command_getInstance();
if (tmp0_subject === 0) {
// Inline function 'com.soywiz.korim.format.CanvasContext2dRenderer.doVisit.<anonymous>' call
var tmp1 = n;
n = tmp1 + 1 | 0;
var tmp0__anonymous__q1qw7t = path.g7j_1.m(tmp1);
var tmp2 = n;
n = tmp2 + 1 | 0;
var tmp1__anonymous__uwfjfc_0 = path.g7j_1.m(tmp2);
this.haa_1.moveTo(tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc_0);
} else {
Command_getInstance();
if (tmp0_subject === 1) {
// Inline function 'com.soywiz.korim.format.CanvasContext2dRenderer.doVisit.<anonymous>' call
var tmp3 = n;
n = tmp3 + 1 | 0;
var tmp2__anonymous__z9zvc9 = path.g7j_1.m(tmp3);
var tmp4 = n;
n = tmp4 + 1 | 0;
var tmp3__anonymous__ufb84q = path.g7j_1.m(tmp4);
this.haa_1.lineTo(tmp2__anonymous__z9zvc9, tmp3__anonymous__ufb84q);
} else {
Command_getInstance();
if (tmp0_subject === 2) {
// Inline function 'com.soywiz.korim.format.CanvasContext2dRenderer.doVisit.<anonymous>' call
var tmp5 = n;
n = tmp5 + 1 | 0;
var tmp4__anonymous__pkmkx7 = path.g7j_1.m(tmp5);
var tmp6 = n;
n = tmp6 + 1 | 0;
var tmp5__anonymous__kpxxpo = path.g7j_1.m(tmp6);
var tmp7 = n;
n = tmp7 + 1 | 0;
var tmp6__anonymous__fv9ai5 = path.g7j_1.m(tmp7);
var tmp8 = n;
n = tmp8 + 1 | 0;
var tmp7__anonymous__b0knam = path.g7j_1.m(tmp8);
this.haa_1.quadraticCurveTo(tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, tmp6__anonymous__fv9ai5, tmp7__anonymous__b0knam);
} else {
Command_getInstance();
if (tmp0_subject === 3) {
// Inline function 'com.soywiz.korim.format.CanvasContext2dRenderer.doVisit.<anonymous>' call
var tmp9 = n;
n = tmp9 + 1 | 0;
var tmp8__anonymous__65w033 = path.g7j_1.m(tmp9);
var tmp10 = n;
n = tmp10 + 1 | 0;
var tmp9__anonymous__1b7cvk = path.g7j_1.m(tmp10);
var tmp11 = n;
n = tmp11 + 1 | 0;
var tmp10__anonymous__yfiz50 = path.g7j_1.m(tmp11);
var tmp12 = n;
n = tmp12 + 1 | 0;
var tmp11__anonymous__tkubxh = path.g7j_1.m(tmp12);
var tmp13 = n;
n = tmp13 + 1 | 0;
var tmp12__anonymous__oq5opy = path.g7j_1.m(tmp13);
var tmp14 = n;
n = tmp14 + 1 | 0;
var tmp13__anonymous__jvh1if = path.g7j_1.m(tmp14);
this.haa_1.bezierCurveTo(tmp8__anonymous__65w033, tmp9__anonymous__1b7cvk, tmp10__anonymous__yfiz50, tmp11__anonymous__tkubxh, tmp12__anonymous__oq5opy, tmp13__anonymous__jvh1if);
} else {
Command_getInstance();
if (tmp0_subject === 4) {
// Inline function 'com.soywiz.korim.format.CanvasContext2dRenderer.doVisit.<anonymous>' call
this.haa_1.closePath();
}
}
}
}
}
}
};
CanvasContext2dRenderer.prototype.xa2 = function (state, fill, winding) {
if (isEmpty(state.q8n_1))
return Unit_getInstance();
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.format.CanvasContext2dRenderer.keep' call
this.haa_1.save();
try {
setState(this, state, fill, false);
var clip = state.p8n_1;
if (!(clip == null)) {
this.haa_1.beginPath();
this.qaa(clip);
var tmp0_elvis_lhs = winding;
this.haa_1.clip(this.raa(tmp0_elvis_lhs == null ? clip.h7j_1 : tmp0_elvis_lhs));
}
this.haa_1.beginPath();
this.qaa(state.q8n_1);
this.maa(this.haa_1, state.o8n_1);
var tmp;
if (fill) {
transformPaint(this, state.y8n_1);
var tmp1_elvis_lhs = winding;
this.haa_1.fill(this.raa(tmp1_elvis_lhs == null ? state.q8n_1.h7j_1 : tmp1_elvis_lhs));
tmp = Unit_getInstance();
} else {
transformPaint(this, state.x8n_1);
var lineDash = state.g8o_1;
if (!(lineDash == null)) {
this.haa_1.lineDashOffset = state.h8o_1;
this.haa_1.setLineDash(toTypedArray(lineDash.y4n()));
}
this.haa_1.stroke();
tmp = Unit_getInstance();
}
tmp$ret$0 = tmp;
break $l$block;
}finally {
this.haa_1.restore();
}
}
};
CanvasContext2dRenderer.prototype.raa = function (_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 1:
var tmp$ret$2;
// Inline function 'org.w3c.dom.NONZERO' call
var tmp0__get_NONZERO__fquzfu = null;
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = 'nonzero';
var tmp0_unsafeCast = tmp$ret$0;
tmp$ret$1 = tmp0_unsafeCast;
tmp$ret$2 = tmp$ret$1;
tmp = tmp$ret$2;
break;
case 0:
var tmp$ret$5;
// Inline function 'org.w3c.dom.EVENODD' call
var tmp1__get_EVENODD__9ur4i1 = null;
var tmp$ret$4;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = 'evenodd';
var tmp0_unsafeCast_0 = tmp$ret$3;
tmp$ret$4 = tmp0_unsafeCast_0;
tmp$ret$5 = tmp$ret$4;
tmp = tmp$ret$5;
break;
default:
noWhenBranchMatchedException();
break;
}
return tmp;
};
CanvasContext2dRenderer.$metadata$ = classMeta('CanvasContext2dRenderer', undefined, undefined, undefined, undefined, Renderer.prototype);
function bswap32_0(v) {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
return (v >>> 24 | 0 | v << 24 | (v & 65280) << 8 | (v >>> 8 | 0)) & 65280;
}
function isLittleEndian$delegate$lambda() {
init_properties_NativeImageFormatProviderJs_kt_ls9jzz();
// Inline function 'org.khronos.webgl.set' call
var tmp0_set = get_tempI();
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[0] = 1;
var tmp$ret$2;
// Inline function 'org.khronos.webgl.get' call
var tmp1_get = get_temp8();
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp1_get;
tmp$ret$2 = tmp$ret$1[0];
return tmp$ret$2 === 1;
}
function isLittleEndian$factory() {
return getPropertyCallableRef('isLittleEndian', 0, KProperty0, function () {
return get_isLittleEndian();
}, null);
}
function lazyCanvasElement$factory() {
return getPropertyCallableRef('lazyCanvasElement', 1, KProperty1, function (receiver) {
return receiver.ya8();
}, null);
}
function ctx$factory() {
return getPropertyCallableRef('ctx', 1, KProperty1, function (receiver) {
return receiver.za8();
}, null);
}
var properties_initialized_NativeImageFormatProviderJs_kt_7b9n17;
function init_properties_NativeImageFormatProviderJs_kt_ls9jzz() {
if (properties_initialized_NativeImageFormatProviderJs_kt_7b9n17) {
} else {
properties_initialized_NativeImageFormatProviderJs_kt_7b9n17 = true;
nativeImageFormatProvider = OS_getInstance().o6u() ? NodeJsNativeImageFormatProvider_getInstance() : HtmlNativeImageFormatProvider_getInstance();
tempB = new ArrayBuffer(4);
tempI = new Int32Array(get_tempB());
temp8 = new Uint8Array(get_tempB());
isLittleEndian$delegate = lazy(isLittleEndian$delegate$lambda);
}
}
//region block: post-declaration
BmpSlice.prototype.b65 = getOrNull_2;
BmpSlice.prototype.n8c = get_baseWidth;
BmpSlice.prototype.o8c = get_baseHeight;
BmpSlice.prototype.p8c = get_frameOffsetX;
BmpSlice.prototype.q8c = get_frameOffsetY;
BmpSlice.prototype.r8c = get_isRotatedInBaseDeg90;
BmpSlice.prototype.x2c = close;
BmpSlice.prototype.s8b = subCoords;
BitmapSlice.prototype.b65 = getOrNull_2;
BitmapSlice.prototype.n8c = get_baseWidth;
BitmapSlice.prototype.o8c = get_baseHeight;
BitmapSlice.prototype.p8c = get_frameOffsetX;
BitmapSlice.prototype.q8c = get_frameOffsetY;
BitmapSlice.prototype.g7z = get_area;
BitmapSlice.prototype.r8c = get_isRotatedInBaseDeg90;
BitmapSlice.prototype.x2c = close;
BitmapSlice.prototype.s8b = subCoords;
BmpCoordsWithInstanceBase.prototype.b65 = getOrNull_2;
BmpCoordsWithInstanceBase.prototype.n8c = get_baseWidth;
BmpCoordsWithInstanceBase.prototype.o8c = get_baseHeight;
BmpCoordsWithInstanceBase.prototype.b74 = get_left_0;
BmpCoordsWithInstanceBase.prototype.y73 = get_top_0;
BmpCoordsWithInstanceBase.prototype.d72 = get_width;
BmpCoordsWithInstanceBase.prototype.e72 = get_height;
BmpCoordsWithInstanceBase.prototype.p8c = get_frameOffsetX;
BmpCoordsWithInstanceBase.prototype.q8c = get_frameOffsetY;
BmpCoordsWithInstanceBase.prototype.y8b = get_frameWidth;
BmpCoordsWithInstanceBase.prototype.z8b = get_frameHeight;
BmpCoordsWithInstanceBase.prototype.r8c = get_isRotatedInBaseDeg90;
BmpCoordsWithInstance.prototype.b65 = getOrNull_2;
BmpCoordsWithInstance.prototype.n8c = get_baseWidth;
BmpCoordsWithInstance.prototype.o8c = get_baseHeight;
BmpCoordsWithInstance.prototype.b74 = get_left_0;
BmpCoordsWithInstance.prototype.y73 = get_top_0;
BmpCoordsWithInstance.prototype.d72 = get_width;
BmpCoordsWithInstance.prototype.e72 = get_height;
BmpCoordsWithInstance.prototype.p8c = get_frameOffsetX;
BmpCoordsWithInstance.prototype.q8c = get_frameOffsetY;
BmpCoordsWithInstance.prototype.y8b = get_frameWidth;
BmpCoordsWithInstance.prototype.z8b = get_frameHeight;
BmpCoordsWithInstance.prototype.r8c = get_isRotatedInBaseDeg90;
BitmapFont.prototype.d8n = getFontMetrics$default;
TextRendererActions.prototype.d2p = reset;
TextRendererActions.prototype.z8w = advance;
TextRendererActions.prototype.a8x = newLine;
drawText$actions$1.prototype.d2p = reset;
drawText$actions$1.prototype.z8w = advance;
drawText$actions$1.prototype.a8x = newLine;
BaseTtfFont.prototype.d8n = getFontMetrics$default;
BaseTtfFont.prototype.n96 = getGlyphPath$default;
BaseTtfFont.prototype.n8n = renderGlyph;
BaseTtfFont.prototype.b65 = getOrNull_3;
TtfFont.prototype.d8n = getFontMetrics$default;
TtfFont.prototype.n96 = getGlyphPath$default;
TtfFont.prototype.n8n = renderGlyph;
TtfFont.prototype.b65 = getOrNull_3;
ColrGlyphInfoV1.prototype.f9h = getColorShape$default;
ColrGlyphInfoV0.prototype.f9h = getColorShape$default;
Text2TextRendererActions.prototype.d2p = reset;
Text2TextRendererActions.prototype.z8w = advance;
Text2TextRendererActions.prototype.a8x = newLine;
FillShape.prototype.aa5 = addBounds;
FillShape.prototype.ba5 = getPath_0;
FillShape.prototype.ca5 = getPath$default;
FillShape.prototype.c8y = draw;
FillShape.prototype.da5 = getBounds;
FillShape.prototype.o7i = get_bounds;
CompoundShape.prototype.ca5 = getPath$default;
CompoundShape.prototype.da5 = getBounds;
CompoundShape.prototype.o7i = get_bounds;
EmptyShape.prototype.ba5 = getPath;
EmptyShape.prototype.ca5 = getPath$default;
EmptyShape.prototype.da5 = getBounds;
EmptyShape.prototype.o7i = get_bounds;
PolylineShape.prototype.ba5 = getPath_0;
PolylineShape.prototype.ca5 = getPath$default;
PolylineShape.prototype.c8y = draw;
PolylineShape.prototype.da5 = getBounds;
PolylineShape.prototype.o7i = get_bounds;
//endregion
//region block: init
DefaultTtfFontOrNull = null;
SystemFontRegistryOrNull = null;
_nativeSystemFontProvider = null;
//endregion
//region block: exports
_.$_$ = _.$_$ || {};
_.$_$.a = Bitmap8;
_.$_$.b = get_Bitmaps_transparent;
_.$_$.c = get_Bitmaps_white;
_.$_$.d = Bitmap;
_.$_$.e = get_baseHeight;
_.$_$.f = get_baseWidth;
_.$_$.g = get_frameHeight;
_.$_$.h = get_frameOffsetX;
_.$_$.i = get_frameOffsetY;
_.$_$.j = get_frameWidth;
_.$_$.k = getOrNull_2;
_.$_$.l = get_isRotatedInBaseDeg90;
_.$_$.m = get_name;
_.$_$.n = get_virtFrame;
_.$_$.o = BmpCoordsWithT;
_.$_$.p = BmpSlice;
_.$_$.q = FloatBitmap32;
_.$_$.r = ForcedTexId;
_.$_$.s = MultiBitmap;
_.$_$.t = NativeImageOrBitmap32;
_.$_$.u = NativeImage;
_.$_$.v = asNinePatchSimple;
_.$_$.w = mipmaps;
_.$_$.x = get_ColorAdd_NEUTRAL;
_.$_$.y = ColorAdd_pack;
_.$_$.z = ColorAdd;
_.$_$.a1 = ColorTransform;
_.$_$.b1 = RGBAf;
_.$_$.c1 = RGBA;
_.$_$.d1 = mix_2;
_.$_$.e1 = Glyph;
_.$_$.f1 = BitmapFont;
_.$_$.g1 = get_DefaultTtfFont;
_.$_$.h1 = Font;
_.$_$.i1 = getTextBounds;
_.$_$.j1 = HtmlNativeImage;
_.$_$.k1 = get_RegisteredImageFormats;
_.$_$.l1 = toHtmlNative;
_.$_$.m1 = BitmapPaint;
_.$_$.n1 = GradientPaint;
_.$_$.o1 = NonePaint;
_.$_$.p1 = get_DefaultStringTextRenderer;
_.$_$.q1 = Text2TextRendererActions;
_.$_$.r1 = invoke;
_.$_$.s1 = CompoundShape;
_.$_$.t1 = FillShape;
_.$_$.u1 = PolylineShape;
_.$_$.v1 = ShapeBuilder;
_.$_$.w1 = TextShape;
_.$_$.x1 = getBounds_0;
_.$_$.y1 = readBitmap_0;
_.$_$.z1 = NativeImage$default;
_.$_$.a2 = sliceWithSize$default;
_.$_$.b2 = slice$default;
_.$_$.c2 = toVector3D$default;
_.$_$.d2 = writeFloat$default;
_.$_$.e2 = getTextBoundsWithGlyphs$default;
_.$_$.f2 = readNinePatch$default;
_.$_$.g2 = readFont$default;
_.$_$.h2 = readBitmapSlice$default;
_.$_$.i2 = readBitmap$default;
_.$_$.j2 = readBitmap$default_0;
_.$_$.k2 = Bitmap32_init_$Create$_0;
_.$_$.l2 = ImageFormats_init_$Create$;
_.$_$.m2 = Bitmap32_init_$Create$;
_.$_$.n2 = BitmapSlice_init_$Create$;
_.$_$.o2 = BmpCoordsWithInstance_init_$Create$_0;
_.$_$.p2 = BitmapFont_init_$Create$;
_.$_$.q2 = FontMetrics_init_$Create$;
_.$_$.r2 = TextMetrics_init_$Create$;
_.$_$.s2 = TextMetricsResult_init_$Create$;
_.$_$.t2 = Entry_init_$Create$;
_.$_$.u2 = _ColorAdd___init__impl__q78um5;
_.$_$.v2 = _ColorAdd___get_a__impl__c1r8ux;
_.$_$.w2 = _ColorAdd___get_b__impl__grv87a;
_.$_$.x2 = _ColorAdd___get_g__impl__itrhk1;
_.$_$.y2 = _ColorAdd___get_r__impl__j9xkne;
_.$_$.z2 = _ColorAdd___get_shex__impl__x5alyq;
_.$_$.a3 = _ColorAdd___get_value__impl__up0ct3;
_.$_$.b3 = _RGBA___get_a__impl__6msvu7;
_.$_$.c3 = _RGBA___get_ad__impl__pt5rdj;
_.$_$.d3 = _RGBA___get_af__impl__vu36qv;
_.$_$.e3 = _RGBA___get_bf__impl__1xz5yg;
_.$_$.f3 = _RGBA___get_gf__impl__5gcu1f;
_.$_$.g3 = _RGBA___get_hexString__impl__kocngm;
_.$_$.h3 = _RGBA___get_rf__impl__kvz75k;
_.$_$.i3 = _RGBA___get_rgb__impl__tijaqt;
_.$_$.j3 = RGBA__times_impl_wehs9n;
_.$_$.k3 = _RGBA___get_value__impl__hhco8v;
_.$_$.l3 = _RGBAf___get_data__impl__yt2t4;
_.$_$.m3 = _RgbaPremultipliedArray___init__impl__lx83hy;
_.$_$.n3 = HorizontalAlign__getOffsetX_impl_urzzxf;
_.$_$.o3 = _HorizontalAlign___get_ratio__impl__x9wlea;
_.$_$.p3 = VerticalAlign__getOffsetY_impl_iso0y6;
_.$_$.q3 = Bitmaps_getInstance;
_.$_$.r3 = Companion_getInstance_16;
_.$_$.s3 = Companion_getInstance_17;
_.$_$.t3 = Colors_getInstance;
_.$_$.u3 = Companion_getInstance_21;
_.$_$.v3 = Companion_getInstance_24;
_.$_$.w3 = Companion_getInstance_45;
_.$_$.x3 = EmptyShape_getInstance;
//endregion
return _;
}));
//# sourceMappingURL=korlibs-korim.js.map