UNPKG

@vonage/client-sdk

Version:

The Client SDK is intended to provide a ready solution for developers to build Programmable Conversation applications across multiple Channels including: Messages, Voice, SIP, websockets, and App.

1,244 lines (1,232 loc) 3.64 MB
function _mergeNamespaces(n, m) { m.forEach(function (e) { e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) { if (k !== 'default' && !(k in n)) { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); }); return Object.freeze(n); } /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function getAugmentedNamespace(n) { if (n.__esModule) return n; var f = n.default; if (typeof f == "function") { var a = function a () { if (this instanceof a) { var args = [null]; args.push.apply(args, arguments); var Ctor = Function.bind.apply(f, args); return new Ctor(); } return f.apply(this, arguments); }; a.prototype = f.prototype; } else a = {}; Object.defineProperty(a, '__esModule', {value: true}); Object.keys(n).forEach(function (k) { var d = Object.getOwnPropertyDescriptor(n, k); Object.defineProperty(a, k, d.get ? d : { enumerable: true, get: function () { return n[k]; } }); }); return a; } var clientsdkClientcore_jsExports = {}; var clientsdkClientcore_js = { get exports(){ return clientsdkClientcore_jsExports; }, set exports(v){ clientsdkClientcore_jsExports = v; }, }; var kotlinKotlinStdlibExports = {}; var kotlinKotlinStdlib = { get exports(){ return kotlinKotlinStdlibExports; }, set exports(v){ kotlinKotlinStdlibExports = v; }, }; var hasRequiredKotlinKotlinStdlib; function requireKotlinKotlinStdlib () { if (hasRequiredKotlinKotlinStdlib) return kotlinKotlinStdlibExports; hasRequiredKotlinKotlinStdlib = 1; (function (module, exports) { //region block: polyfills (function () { if (typeof globalThis === 'object') return; Object.defineProperty(Object.prototype, '__magic__', {get: function () { return this; }, configurable: true}); __magic__.globalThis = __magic__; delete Object.prototype.__magic__; }()); if (typeof Math.imul === 'undefined') { Math.imul = function imul(a, b) { return (a & 4.29490176E9) * (b & 65535) + (a & 65535) * (b | 0) | 0; }; } if (typeof ArrayBuffer.isView === 'undefined') { ArrayBuffer.isView = function (a) { return a != null && a.__proto__ != null && a.__proto__.__proto__ === Int8Array.prototype.__proto__; }; } if (typeof Array.prototype.fill === 'undefined') { // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill Object.defineProperty(Array.prototype, 'fill', {value: function (value) { // Steps 1-2. if (this == null) { throw new TypeError('this is null or not defined'); } var O = Object(this); // Steps 3-5. var len = O.length >>> 0; // Steps 6-7. var start = arguments[1]; var relativeStart = start >> 0; // Step 8. var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); // Steps 9-10. var end = arguments[2]; var relativeEnd = end === undefined ? len : end >> 0; // Step 11. var finalValue = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); // Step 12. while (k < finalValue) { O[k] = value; k++; } return O; }}); } [Int8Array, Int16Array, Uint16Array, Int32Array, Float32Array, Float64Array].forEach(function (TypedArray) { if (typeof TypedArray.prototype.fill === 'undefined') { Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill}); } }); if (typeof Math.clz32 === 'undefined') { Math.clz32 = function (log, LN2) { return function (x) { var asUint = x >>> 0; if (asUint === 0) { return 32; } return 31 - (log(asUint) / LN2 | 0) | 0; // the "| 0" acts like math.floor }; }(Math.log, Math.LN2); } if (typeof String.prototype.startsWith === 'undefined') { Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) { position = position || 0; return this.lastIndexOf(searchString, position) === position; }}); } //endregion (function (root, factory) { factory(module.exports); }(globalThis, function (_) { //region block: imports var imul = Math.imul; var isView = ArrayBuffer.isView; var clz32 = Math.clz32; //endregion //region block: pre-declaration initMetadataForInterface(CharSequence, 'CharSequence'); initMetadataForClass(Number_0, 'Number'); initMetadataForObject(Unit, 'Unit'); initMetadataForClass(_no_name_provided__qut3iv); initMetadataForCompanion(Companion); initMetadataForClass(Char, 'Char'); initMetadataForInterface(Collection, 'Collection'); initMetadataForInterface(KtList, 'List', VOID, VOID, [Collection]); initMetadataForInterface(KtSet, 'Set', VOID, VOID, [Collection]); initMetadataForInterface(Entry, 'Entry'); initMetadataForInterface(KtMap, 'Map'); initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, Collection]); initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, Collection]); initMetadataForInterface(KtMutableMap, 'MutableMap', VOID, VOID, [KtMap]); initMetadataForCompanion(Companion_0); initMetadataForClass(Enum, 'Enum'); initMetadataForCompanion(Companion_1); initMetadataForClass(Long, 'Long', VOID, Number_0); initMetadataForClass(arrayIterator$1); initMetadataForObject(ByteCompanionObject, 'ByteCompanionObject'); initMetadataForObject(ShortCompanionObject, 'ShortCompanionObject'); initMetadataForObject(IntCompanionObject, 'IntCompanionObject'); initMetadataForObject(FloatCompanionObject, 'FloatCompanionObject'); initMetadataForObject(DoubleCompanionObject, 'DoubleCompanionObject'); initMetadataForObject(StringCompanionObject, 'StringCompanionObject'); initMetadataForObject(BooleanCompanionObject, 'BooleanCompanionObject'); initMetadataForObject(Digit, 'Digit'); initMetadataForObject(Letter, 'Letter'); initMetadataForObject(OtherLowercase, 'OtherLowercase'); initMetadataForClass(AbstractCollection, 'AbstractCollection', VOID, VOID, [Collection]); initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [AbstractCollection, Collection]); initMetadataForClass(IteratorImpl, 'IteratorImpl'); initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [AbstractMutableCollection, KtMutableList]); initMetadataForClass(AbstractMap, 'AbstractMap', VOID, VOID, [KtMap]); initMetadataForClass(AbstractMutableMap, 'AbstractMutableMap', VOID, AbstractMap, [AbstractMap, KtMutableMap]); initMetadataForClass(AbstractMutableSet, 'AbstractMutableSet', VOID, AbstractMutableCollection, [AbstractMutableCollection, KtMutableSet]); initMetadataForCompanion(Companion_2); initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [AbstractMutableList, KtMutableList]); initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [AbstractMutableMap, KtMutableMap]); initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]); initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [Collection, AbstractMutableCollection]); initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]); initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase); initMetadataForClass(HashMapKeysDefault$iterator$1); initMetadataForClass(HashMapKeysDefault, 'HashMapKeysDefault', VOID, AbstractMutableSet); initMetadataForClass(HashMapValuesDefault$iterator$1); initMetadataForClass(HashMapValuesDefault, 'HashMapValuesDefault', VOID, AbstractMutableCollection); initMetadataForClass(HashSet, 'HashSet', HashSet_init_$Create$, AbstractMutableSet, [AbstractMutableSet, KtMutableSet]); initMetadataForCompanion(Companion_3); initMetadataForClass(Itr, 'Itr'); initMetadataForClass(KeysItr, 'KeysItr', VOID, Itr); initMetadataForClass(ValuesItr, 'ValuesItr', VOID, Itr); initMetadataForClass(EntriesItr, 'EntriesItr', VOID, Itr); initMetadataForClass(EntryRef, 'EntryRef', VOID, VOID, [Entry]); function containsAllEntries(m) { var tmp$ret$0; $l$block_0: { // Inline function 'kotlin.collections.all' call var tmp; if (isInterface(m, Collection)) { tmp = m.n(); } else { tmp = false; } if (tmp) { tmp$ret$0 = true; break $l$block_0; } var tmp0_iterator = m.i(); while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); // Inline function 'kotlin.collections.InternalMap.containsAllEntries.<anonymous>' call // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call var entry = element; var tmp_0; if (!(entry == null) ? isInterface(entry, Entry) : false) { tmp_0 = this.m7(entry); } else { tmp_0 = false; } if (!tmp_0) { tmp$ret$0 = false; break $l$block_0; } } tmp$ret$0 = true; } return tmp$ret$0; } initMetadataForInterface(InternalMap, 'InternalMap'); initMetadataForClass(InternalHashMap, 'InternalHashMap', InternalHashMap_init_$Create$, VOID, [InternalMap]); initMetadataForClass(LinkedHashMap, 'LinkedHashMap', LinkedHashMap_init_$Create$, HashMap, [HashMap, KtMutableMap]); initMetadataForClass(LinkedHashSet, 'LinkedHashSet', LinkedHashSet_init_$Create$, HashSet, [HashSet, KtMutableSet]); initMetadataForInterface(Continuation, 'Continuation'); initMetadataForClass(InterceptedCoroutine, 'InterceptedCoroutine', VOID, VOID, [Continuation]); initMetadataForClass(CoroutineImpl, 'CoroutineImpl', VOID, InterceptedCoroutine, [InterceptedCoroutine, Continuation]); initMetadataForObject(CompletedContinuation, 'CompletedContinuation', VOID, VOID, [Continuation]); initMetadataForClass(Exception, 'Exception', Exception_init_$Create$, Error); initMetadataForClass(RuntimeException, 'RuntimeException', RuntimeException_init_$Create$, Exception); initMetadataForClass(IllegalArgumentException, 'IllegalArgumentException', IllegalArgumentException_init_$Create$, RuntimeException); initMetadataForClass(IndexOutOfBoundsException, 'IndexOutOfBoundsException', IndexOutOfBoundsException_init_$Create$, RuntimeException); initMetadataForClass(IllegalStateException, 'IllegalStateException', IllegalStateException_init_$Create$, RuntimeException); initMetadataForClass(UnsupportedOperationException, 'UnsupportedOperationException', UnsupportedOperationException_init_$Create$, RuntimeException); initMetadataForClass(NoSuchElementException, 'NoSuchElementException', NoSuchElementException_init_$Create$, RuntimeException); initMetadataForClass(Error_0, 'Error', Error_init_$Create$, Error); initMetadataForClass(AssertionError, 'AssertionError', AssertionError_init_$Create$, Error_0); initMetadataForClass(ConcurrentModificationException, 'ConcurrentModificationException', ConcurrentModificationException_init_$Create$, RuntimeException); initMetadataForClass(NumberFormatException, 'NumberFormatException', NumberFormatException_init_$Create$, IllegalArgumentException); initMetadataForClass(ArithmeticException, 'ArithmeticException', ArithmeticException_init_$Create$, RuntimeException); initMetadataForClass(ClassCastException, 'ClassCastException', ClassCastException_init_$Create$, RuntimeException); initMetadataForClass(NullPointerException, 'NullPointerException', NullPointerException_init_$Create$, RuntimeException); initMetadataForClass(NoWhenBranchMatchedException, 'NoWhenBranchMatchedException', NoWhenBranchMatchedException_init_$Create$, RuntimeException); initMetadataForClass(UninitializedPropertyAccessException, 'UninitializedPropertyAccessException', UninitializedPropertyAccessException_init_$Create$, RuntimeException); initMetadataForInterface(KClass, 'KClass'); initMetadataForClass(KClassImpl, 'KClassImpl', VOID, VOID, [KClass]); initMetadataForObject(NothingKClassImpl, 'NothingKClassImpl', VOID, KClassImpl); initMetadataForClass(ErrorKClass, 'ErrorKClass', ErrorKClass, VOID, [KClass]); initMetadataForClass(PrimitiveKClassImpl, 'PrimitiveKClassImpl', VOID, KClassImpl); initMetadataForClass(SimpleKClassImpl, 'SimpleKClassImpl', VOID, KClassImpl); initMetadataForInterface(KProperty1, 'KProperty1'); initMetadataForClass(KTypeImpl, 'KTypeImpl'); initMetadataForObject(PrimitiveClasses, 'PrimitiveClasses'); initMetadataForClass(StringBuilder, 'StringBuilder', StringBuilder_init_$Create$_0, VOID, [CharSequence]); initMetadataForCompanion(Companion_4); initMetadataForClass(Regex, 'Regex'); initMetadataForClass(ExceptionTraceBuilder, 'ExceptionTraceBuilder', ExceptionTraceBuilder); initMetadataForClass(DurationUnit, 'DurationUnit', VOID, Enum); initMetadataForCompanion(Companion_5); initMetadataForClass(AbstractMap$keys$1$iterator$1); initMetadataForClass(AbstractMap$values$1$iterator$1); initMetadataForCompanion(Companion_6); initMetadataForClass(AbstractSet, 'AbstractSet', VOID, AbstractCollection, [AbstractCollection, KtSet]); initMetadataForClass(AbstractMap$keys$1, VOID, VOID, AbstractSet); initMetadataForClass(AbstractMap$values$1, VOID, VOID, AbstractCollection); initMetadataForCompanion(Companion_7); initMetadataForObject(EmptyList, 'EmptyList', VOID, VOID, [KtList]); initMetadataForObject(EmptyIterator, 'EmptyIterator'); initMetadataForClass(ArrayAsCollection, 'ArrayAsCollection', VOID, VOID, [Collection]); initMetadataForClass(IndexedValue, 'IndexedValue'); initMetadataForClass(IndexingIterable, 'IndexingIterable'); initMetadataForClass(IndexingIterator, 'IndexingIterator'); initMetadataForInterface(MapWithDefault, 'MapWithDefault', VOID, VOID, [KtMap]); initMetadataForObject(EmptyMap, 'EmptyMap', VOID, VOID, [KtMap]); initMetadataForClass(IntIterator, 'IntIterator'); initMetadataForClass(TransformingSequence$iterator$1); initMetadataForClass(TransformingSequence, 'TransformingSequence'); initMetadataForObject(EmptySet, 'EmptySet', VOID, VOID, [KtSet]); initMetadataForObject(Key, 'Key'); initMetadataForInterface(ContinuationInterceptor, 'ContinuationInterceptor'); initMetadataForObject(EmptyCoroutineContext, 'EmptyCoroutineContext'); initMetadataForClass(CoroutineSingletons, 'CoroutineSingletons', VOID, Enum); initMetadataForClass(Random, 'Random'); initMetadataForObject(Default, 'Default', VOID, Random); initMetadataForCompanion(Companion_8); initMetadataForClass(XorWowRandom, 'XorWowRandom', VOID, Random); initMetadataForCompanion(Companion_9); initMetadataForClass(IntProgression, 'IntProgression'); initMetadataForClass(IntRange, 'IntRange', VOID, IntProgression); initMetadataForClass(IntProgressionIterator, 'IntProgressionIterator', VOID, IntIterator); initMetadataForCompanion(Companion_10); initMetadataForInterface(KTypeParameter, 'KTypeParameter'); initMetadataForClass(DelimitedRangesSequence$iterator$1); initMetadataForClass(DelimitedRangesSequence, 'DelimitedRangesSequence'); initMetadataForCompanion(Companion_11); initMetadataForClass(Duration, 'Duration'); initMetadataForClass(DeepRecursiveScope, 'DeepRecursiveScope', VOID, VOID, VOID, [1]); initMetadataForClass(DeepRecursiveFunction, 'DeepRecursiveFunction'); initMetadataForClass(DeepRecursiveScopeImpl, 'DeepRecursiveScopeImpl', VOID, DeepRecursiveScope, [DeepRecursiveScope, Continuation], [1]); initMetadataForClass(LazyThreadSafetyMode, 'LazyThreadSafetyMode', VOID, Enum); initMetadataForClass(UnsafeLazyImpl, 'UnsafeLazyImpl'); initMetadataForObject(UNINITIALIZED_VALUE, 'UNINITIALIZED_VALUE'); initMetadataForCompanion(Companion_12); initMetadataForClass(Failure, 'Failure'); initMetadataForClass(Result, 'Result'); initMetadataForClass(NotImplementedError, 'NotImplementedError', NotImplementedError, Error_0); initMetadataForClass(Pair, 'Pair'); initMetadataForClass(Triple, 'Triple'); initMetadataForCompanion(Companion_13); initMetadataForClass(UByte, 'UByte'); initMetadataForClass(Iterator, 'Iterator'); initMetadataForClass(UByteArray, 'UByteArray', VOID, VOID, [Collection]); initMetadataForCompanion(Companion_14); initMetadataForClass(UInt, 'UInt'); initMetadataForClass(Iterator_0, 'Iterator'); initMetadataForClass(UIntArray, 'UIntArray', VOID, VOID, [Collection]); initMetadataForCompanion(Companion_15); initMetadataForClass(ULong, 'ULong'); initMetadataForClass(Iterator_1, 'Iterator'); initMetadataForClass(ULongArray, 'ULongArray', VOID, VOID, [Collection]); initMetadataForCompanion(Companion_16); initMetadataForClass(UShort, 'UShort'); initMetadataForClass(Iterator_2, 'Iterator'); initMetadataForClass(UShortArray, 'UShortArray', VOID, VOID, [Collection]); //endregion function CharSequence() { } function Number_0() { } function Unit() { } protoOf(Unit).toString = function () { return 'kotlin.Unit'; }; var Unit_instance; function toList(_this__u8e3s4) { switch (_this__u8e3s4.length) { case 0: return emptyList(); case 1: return listOf(_this__u8e3s4[0]); default: return toMutableList(_this__u8e3s4); } } function withIndex(_this__u8e3s4) { return new IndexingIterable(withIndex$lambda(_this__u8e3s4)); } function get_indices(_this__u8e3s4) { return new IntRange(0, get_lastIndex(_this__u8e3s4)); } function get_indices_0(_this__u8e3s4) { return new IntRange(0, get_lastIndex_0(_this__u8e3s4)); } function contains(_this__u8e3s4, element) { return indexOf_0(_this__u8e3s4, element) >= 0; } function contains_0(_this__u8e3s4, element) { return indexOf_1(_this__u8e3s4, element) >= 0; } function contains_1(_this__u8e3s4, element) { return indexOf_2(_this__u8e3s4, element) >= 0; } function contains_2(_this__u8e3s4, element) { return indexOf_3(_this__u8e3s4, element) >= 0; } function indexOf(_this__u8e3s4, element) { if (element == null) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (_this__u8e3s4[index] == null) { return index; } } while (inductionVariable <= last); } else { var inductionVariable_0 = 0; var last_0 = _this__u8e3s4.length - 1 | 0; if (inductionVariable_0 <= last_0) do { var index_0 = inductionVariable_0; inductionVariable_0 = inductionVariable_0 + 1 | 0; if (equals(element, _this__u8e3s4[index_0])) { return index_0; } } while (inductionVariable_0 <= last_0); } return -1; } function toSet(_this__u8e3s4) { switch (_this__u8e3s4.length) { case 0: return emptySet(); case 1: return setOf(_this__u8e3s4[0]); default: return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length))); } } function single(_this__u8e3s4) { var tmp; switch (_this__u8e3s4.length) { case 0: throw NoSuchElementException_init_$Create$_0('Array is empty.'); case 1: tmp = _this__u8e3s4[0]; break; default: throw IllegalArgumentException_init_$Create$_0('Array has more than one element.'); } return tmp; } function toMutableList(_this__u8e3s4) { return ArrayList_init_$Create$_1(asCollection(_this__u8e3s4)); } function get_lastIndex(_this__u8e3s4) { return _this__u8e3s4.length - 1 | 0; } function get_lastIndex_0(_this__u8e3s4) { return _this__u8e3s4.length - 1 | 0; } function indexOf_0(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element.equals(_this__u8e3s4[index])) { return index; } } while (inductionVariable <= last); return -1; } function indexOf_1(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element === _this__u8e3s4[index]) { return index; } } while (inductionVariable <= last); return -1; } function indexOf_2(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element === _this__u8e3s4[index]) { return index; } } while (inductionVariable <= last); return -1; } function indexOf_3(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element === _this__u8e3s4[index]) { return index; } } while (inductionVariable <= last); return -1; } function toCollection(_this__u8e3s4, destination) { var inductionVariable = 0; var last = _this__u8e3s4.length; while (inductionVariable < last) { var item = _this__u8e3s4[inductionVariable]; inductionVariable = inductionVariable + 1 | 0; destination.d(item); } return destination; } function get_lastIndex_1(_this__u8e3s4) { return _this__u8e3s4.length - 1 | 0; } function contains_3(_this__u8e3s4, element) { return indexOf(_this__u8e3s4, element) >= 0; } function joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString(); } function joinTo(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; buffer.e(prefix); var count = 0; var inductionVariable = 0; var last = _this__u8e3s4.length; $l$loop: while (inductionVariable < last) { var element = _this__u8e3s4[inductionVariable]; inductionVariable = inductionVariable + 1 | 0; count = count + 1 | 0; if (count > 1) { buffer.e(separator); } if (limit < 0 || count <= limit) { appendElement(buffer, element, transform); } else break $l$loop; } if (limit >= 0 && count > limit) { buffer.e(truncated); } buffer.e(postfix); return buffer; } function reversed(_this__u8e3s4) { // Inline function 'kotlin.collections.isEmpty' call if (_this__u8e3s4.length === 0) return emptyList(); var list = toMutableList(_this__u8e3s4); reverse(list); return list; } function filterNotNull(_this__u8e3s4) { return filterNotNullTo(_this__u8e3s4, ArrayList_init_$Create$()); } function filterNotNullTo(_this__u8e3s4, destination) { var inductionVariable = 0; var last = _this__u8e3s4.length; while (inductionVariable < last) { var element = _this__u8e3s4[inductionVariable]; inductionVariable = inductionVariable + 1 | 0; if (!(element == null)) { destination.d(element); } } return destination; } function distinct(_this__u8e3s4) { return toList_0(toMutableSet(_this__u8e3s4)); } function zip(_this__u8e3s4, other) { // Inline function 'kotlin.collections.zip' call // Inline function 'kotlin.comparisons.minOf' call var a = _this__u8e3s4.length; var b = other.length; var size = Math.min(a, b); var list = ArrayList_init_$Create$_0(size); var inductionVariable = 0; if (inductionVariable < size) do { var i = inductionVariable; inductionVariable = inductionVariable + 1 | 0; // Inline function 'kotlin.collections.zip.<anonymous>' call var t1 = _this__u8e3s4[i]; var t2 = other[i]; var tmp$ret$1 = to(t1, t2); list.d(tmp$ret$1); } while (inductionVariable < size); return list; } function toMutableSet(_this__u8e3s4) { return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length))); } function withIndex$lambda($this_withIndex) { return function () { return arrayIterator($this_withIndex); }; } function joinToString_0(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; return joinTo_0(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString(); } function joinTo_0(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; buffer.e(prefix); var count = 0; var tmp0_iterator = _this__u8e3s4.i(); $l$loop: while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); count = count + 1 | 0; if (count > 1) { buffer.e(separator); } if (limit < 0 || count <= limit) { appendElement(buffer, element, transform); } else break $l$loop; } if (limit >= 0 && count > limit) { buffer.e(truncated); } buffer.e(postfix); return buffer; } function toHashSet(_this__u8e3s4) { return toCollection_0(_this__u8e3s4, HashSet_init_$Create$_1(mapCapacity(collectionSizeOrDefault(_this__u8e3s4, 12)))); } function toBooleanArray(_this__u8e3s4) { var result = booleanArray(_this__u8e3s4.l()); var index = 0; var tmp0_iterator = _this__u8e3s4.i(); while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); var tmp1 = index; index = tmp1 + 1 | 0; result[tmp1] = element; } return result; } function toCollection_0(_this__u8e3s4, destination) { var tmp0_iterator = _this__u8e3s4.i(); while (tmp0_iterator.j()) { var item = tmp0_iterator.k(); destination.d(item); } return destination; } function toList_0(_this__u8e3s4) { if (isInterface(_this__u8e3s4, Collection)) { var tmp; switch (_this__u8e3s4.l()) { case 0: tmp = emptyList(); break; case 1: var tmp_0; if (isInterface(_this__u8e3s4, KtList)) { tmp_0 = _this__u8e3s4.m(0); } else { tmp_0 = _this__u8e3s4.i().k(); } tmp = listOf(tmp_0); break; default: tmp = toMutableList_0(_this__u8e3s4); break; } return tmp; } return optimizeReadOnlyList(toMutableList_1(_this__u8e3s4)); } function last(_this__u8e3s4) { if (_this__u8e3s4.n()) throw NoSuchElementException_init_$Create$_0('List is empty.'); return _this__u8e3s4.m(get_lastIndex_2(_this__u8e3s4)); } function singleOrNull(_this__u8e3s4) { return _this__u8e3s4.l() === 1 ? _this__u8e3s4.m(0) : null; } function filterNotNull_0(_this__u8e3s4) { return filterNotNullTo_0(_this__u8e3s4, ArrayList_init_$Create$()); } function single_0(_this__u8e3s4) { if (isInterface(_this__u8e3s4, KtList)) return single_1(_this__u8e3s4); else { var iterator = _this__u8e3s4.i(); if (!iterator.j()) throw NoSuchElementException_init_$Create$_0('Collection is empty.'); var single = iterator.k(); if (iterator.j()) throw IllegalArgumentException_init_$Create$_0('Collection has more than one element.'); return single; } } function toMutableList_0(_this__u8e3s4) { return ArrayList_init_$Create$_1(_this__u8e3s4); } function toMutableList_1(_this__u8e3s4) { if (isInterface(_this__u8e3s4, Collection)) return toMutableList_0(_this__u8e3s4); return toCollection_0(_this__u8e3s4, ArrayList_init_$Create$()); } function filterNotNullTo_0(_this__u8e3s4, destination) { var tmp0_iterator = _this__u8e3s4.i(); while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); if (!(element == null)) { destination.d(element); } } return destination; } function single_1(_this__u8e3s4) { var tmp; switch (_this__u8e3s4.l()) { case 0: throw NoSuchElementException_init_$Create$_0('List is empty.'); case 1: tmp = _this__u8e3s4.m(0); break; default: throw IllegalArgumentException_init_$Create$_0('List has more than one element.'); } return tmp; } function toSet_0(_this__u8e3s4) { if (isInterface(_this__u8e3s4, Collection)) { var tmp; switch (_this__u8e3s4.l()) { case 0: tmp = emptySet(); break; case 1: var tmp_0; if (isInterface(_this__u8e3s4, KtList)) { tmp_0 = _this__u8e3s4.m(0); } else { tmp_0 = _this__u8e3s4.i().k(); } tmp = setOf(tmp_0); break; default: tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.l()))); break; } return tmp; } return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$())); } function lastOrNull(_this__u8e3s4) { return _this__u8e3s4.n() ? null : _this__u8e3s4.m(_this__u8e3s4.l() - 1 | 0); } function minOrNull(_this__u8e3s4) { var iterator = _this__u8e3s4.i(); if (!iterator.j()) return null; var min = iterator.k(); while (iterator.j()) { var e = iterator.k(); if (compareTo(min, e) > 0) min = e; } return min; } function titlecaseImpl(_this__u8e3s4) { // Inline function 'kotlin.text.uppercase' call // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call var uppercase = toString(_this__u8e3s4).toUpperCase(); if (uppercase.length > 1) { var tmp; if (_this__u8e3s4 === _Char___init__impl__6a9atx(329)) { tmp = uppercase; } else { // Inline function 'kotlin.text.plus' call var this_0 = charSequenceGet(uppercase, 0); // Inline function 'kotlin.text.lowercase' call // Inline function 'kotlin.text.substring' call // Inline function 'kotlin.js.asDynamic' call // Inline function 'kotlin.js.asDynamic' call var other = uppercase.substring(1).toLowerCase(); tmp = toString(this_0) + other; } return tmp; } return toString(titlecaseChar(_this__u8e3s4)); } function until(_this__u8e3s4, to) { if (to <= -2147483648) return Companion_getInstance_9().o_1; return numberRangeToNumber(_this__u8e3s4, to - 1 | 0); } function step(_this__u8e3s4, step) { checkStepIsPositive(step > 0, step); return Companion_instance_10.s(_this__u8e3s4.p_1, _this__u8e3s4.q_1, _this__u8e3s4.r_1 > 0 ? step : -step | 0); } function coerceAtLeast(_this__u8e3s4, minimumValue) { return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4; } function random(_this__u8e3s4, random) { try { return nextInt(random, _this__u8e3s4); } catch ($p) { if ($p instanceof IllegalArgumentException) { var e = $p; throw NoSuchElementException_init_$Create$_0(e.message); } else { throw $p; } } } function coerceIn(_this__u8e3s4, minimumValue, maximumValue) { if (minimumValue.v(maximumValue) > 0) throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue.toString() + ' is less than minimum ' + minimumValue.toString() + '.'); if (_this__u8e3s4.v(minimumValue) < 0) return minimumValue; if (_this__u8e3s4.v(maximumValue) > 0) return maximumValue; return _this__u8e3s4; } function coerceAtMost(_this__u8e3s4, maximumValue) { return _this__u8e3s4 > maximumValue ? maximumValue : _this__u8e3s4; } function downTo(_this__u8e3s4, to) { return Companion_instance_10.s(_this__u8e3s4, to, -1); } function coerceIn_0(_this__u8e3s4, minimumValue, maximumValue) { if (minimumValue > maximumValue) throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue + ' is less than minimum ' + minimumValue + '.'); if (_this__u8e3s4 < minimumValue) return minimumValue; if (_this__u8e3s4 > maximumValue) return maximumValue; return _this__u8e3s4; } function asIterable(_this__u8e3s4) { // Inline function 'kotlin.collections.Iterable' call return new _no_name_provided__qut3iv(_this__u8e3s4); } function map(_this__u8e3s4, transform) { return new TransformingSequence(_this__u8e3s4, transform); } function toList_1(_this__u8e3s4) { var it = _this__u8e3s4.i(); if (!it.j()) return emptyList(); var element = it.k(); if (!it.j()) return listOf(element); var dst = ArrayList_init_$Create$(); dst.d(element); while (it.j()) { dst.d(it.k()); } return dst; } function _no_name_provided__qut3iv($this_asIterable) { this.w_1 = $this_asIterable; } protoOf(_no_name_provided__qut3iv).i = function () { // Inline function 'kotlin.sequences.asIterable.<anonymous>' call return this.w_1.i(); }; function plus(_this__u8e3s4, elements) { var tmp0_safe_receiver = collectionSizeOrNull(elements); var tmp; if (tmp0_safe_receiver == null) { tmp = null; } else { // Inline function 'kotlin.let' call // Inline function 'kotlin.contracts.contract' call // Inline function 'kotlin.collections.plus.<anonymous>' call tmp = _this__u8e3s4.l() + tmp0_safe_receiver | 0; } var tmp1_elvis_lhs = tmp; var result = LinkedHashSet_init_$Create$_1(mapCapacity(tmp1_elvis_lhs == null ? imul(_this__u8e3s4.l(), 2) : tmp1_elvis_lhs)); result.x(_this__u8e3s4); addAll(result, elements); return result; } function last_0(_this__u8e3s4) { // Inline function 'kotlin.text.isEmpty' call if (charSequenceLength(_this__u8e3s4) === 0) throw NoSuchElementException_init_$Create$_0('Char sequence is empty.'); return charSequenceGet(_this__u8e3s4, get_lastIndex_3(_this__u8e3s4)); } function drop(_this__u8e3s4, n) { // Inline function 'kotlin.require' call // Inline function 'kotlin.contracts.contract' call if (!(n >= 0)) { // Inline function 'kotlin.text.drop.<anonymous>' call var message = 'Requested character count ' + n + ' is less than zero.'; throw IllegalArgumentException_init_$Create$_0(toString_1(message)); } // Inline function 'kotlin.text.substring' call var startIndex = coerceAtMost(n, _this__u8e3s4.length); // Inline function 'kotlin.js.asDynamic' call return _this__u8e3s4.substring(startIndex); } function single_2(_this__u8e3s4) { var tmp; switch (charSequenceLength(_this__u8e3s4)) { case 0: throw NoSuchElementException_init_$Create$_0('Char sequence is empty.'); case 1: tmp = charSequenceGet(_this__u8e3s4, 0); break; default: throw IllegalArgumentException_init_$Create$_0('Char sequence has more than one element.'); } return tmp; } function slice(_this__u8e3s4, indices) { if (indices.n()) return ''; return substring(_this__u8e3s4, indices); } function dropLast(_this__u8e3s4, n) { // Inline function 'kotlin.require' call // Inline function 'kotlin.contracts.contract' call if (!(n >= 0)) { // Inline function 'kotlin.text.dropLast.<anonymous>' call var message = 'Requested character count ' + n + ' is less than zero.'; throw IllegalArgumentException_init_$Create$_0(toString_1(message)); } return take(_this__u8e3s4, coerceAtLeast(_this__u8e3s4.length - n | 0, 0)); } function take(_this__u8e3s4, n) { // Inline function 'kotlin.require' call // Inline function 'kotlin.contracts.contract' call if (!(n >= 0)) { // Inline function 'kotlin.text.take.<anonymous>' call var message = 'Requested character count ' + n + ' is less than zero.'; throw IllegalArgumentException_init_$Create$_0(toString_1(message)); } // Inline function 'kotlin.text.substring' call var endIndex = coerceAtMost(n, _this__u8e3s4.length); // Inline function 'kotlin.js.asDynamic' call return _this__u8e3s4.substring(0, endIndex); } function _Char___init__impl__6a9atx(value) { return value; } function _get_value__a43j40($this) { return $this; } function _Char___init__impl__6a9atx_0(code) { // Inline function 'kotlin.UShort.toInt' call var tmp$ret$0 = _UShort___get_data__impl__g0245(code) & 65535; return _Char___init__impl__6a9atx(tmp$ret$0); } function Char__compareTo_impl_ypi4mb($this, other) { return _get_value__a43j40($this) - _get_value__a43j40(other) | 0; } function Char__compareTo_impl_ypi4mb_0($this, other) { return Char__compareTo_impl_ypi4mb($this.b1_1, other instanceof Char ? other.b1_1 : THROW_CCE()); } function Char__minus_impl_a2frrh($this, other) { return _get_value__a43j40($this) - _get_value__a43j40(other) | 0; } function Char__toInt_impl_vasixd($this) { return _get_value__a43j40($this); } function toString($this) { // Inline function 'kotlin.js.unsafeCast' call return String.fromCharCode(_get_value__a43j40($this)); } function Char__equals_impl_x6719k($this, other) { if (!(other instanceof Char)) return false; return _get_value__a43j40($this) === _get_value__a43j40(other.b1_1); } function Char__hashCode_impl_otmys($this) { return _get_value__a43j40($this); } function Companion() { Companion_instance = this; this.c1_1 = _Char___init__impl__6a9atx(0); this.d1_1 = _Char___init__impl__6a9atx(65535); this.e1_1 = _Char___init__impl__6a9atx(55296); this.f1_1 = _Char___init__impl__6a9atx(56319); this.g1_1 = _Char___init__impl__6a9atx(56320); this.h1_1 = _Char___init__impl__6a9atx(57343); this.i1_1 = _Char___init__impl__6a9atx(55296); this.j1_1 = _Char___init__impl__6a9atx(57343); this.k1_1 = 2; this.l1_1 = 16; } var Companion_instance; function Companion_getInstance() { if (Companion_instance == null) new Companion(); return Companion_instance; } function Char(value) { Companion_getInstance(); this.b1_1 = value; } protoOf(Char).m1 = function (other) { return Char__compareTo_impl_ypi4mb(this.b1_1, other); }; protoOf(Char).n1 = function (other) { return Char__compareTo_impl_ypi4mb_0(this, other); }; protoOf(Char).toString = function () { return toString(this.b1_1); }; protoOf(Char).equals = function (other) { return Char__equals_impl_x6719k(this.b1_1, other); }; protoOf(Char).hashCode = function () { return Char__hashCode_impl_otmys(this.b1_1); }; function KtList() { } function Collection() { } function KtSet() { } function Entry() { } function KtMap() { } function KtMutableList() { } function KtMutableSet() { } function KtMutableMap() { } function Companion_0() { } function Enum(name, ordinal) { this.d2_1 = name; this.e2_1 = ordinal; } protoOf(Enum).f2 = function () { return this.d2_1; }; protoOf(Enum).g2 = function () { return this.e2_1; }; protoOf(Enum).h2 = function (other) { return compareTo(this.e2_1, other.e2_1); }; protoOf(Enum).n1 = function (other) { return this.h2(other instanceof Enum ? other : THROW_CCE()); }; protoOf(Enum).equals = function (other) { return this === other; }; protoOf(Enum).hashCode = function () { return identityHashCode(this); }; protoOf(Enum).toString = function () { return this.d2_1; }; function arrayOf(elements) { // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call return elements; } function toString_0(_this__u8e3s4) { var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : toString_1(_this__u8e3s4); return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs; } function plus_0(_this__u8e3s4, other) { var tmp3_elvis_lhs = _this__u8e3s4 == null ? null : toString_1(_this__u8e3s4); var tmp = tmp3_elvis_lhs == null ? 'null' : tmp3_elvis_lhs; var tmp1_elvis_lhs = other == null ? null : toString_1(other); return tmp + (tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs); } function Companion_1() { Companion_instance_1 = this; this.i2_1 = new Long(0, -2147483648); this.j2_1 = new Long(-1, 2147483647); this.k2_1 = 8; this.l2_1 = 64; } var Companion_instance_1; function Companion_getInstance_1() { if (Companion_instance_1 == null) new Companion_1(); return Companion_instance_1; } function Long(low, high) { Companion_getInstance_1(); Number_0.call(this); this.t_1 = low; this.u_1 = high; } protoOf(Long).v = function (other) { return compare(this, other); }; protoOf(Long).n1 = function (other) { return this.v(other instanceof Long ? other : THROW_CCE()); }; protoOf(Long).m2 = function (other) { return add(this, other); }; protoOf(Long).n2 = function (other) { return subtract(this, other); }; protoOf(Long).o2 = function (other) { return multiply(this, other); }; protoOf(Long).p2 = function (other) { return divide(this, other); }; protoOf(Long).q2 = function (other) { return modulo(this, other); }; protoOf(Long).r2 = function () { return this.s2().m2(new Long(1, 0)); }; protoOf(Long).t2 = function (bitCount) { return shiftLeft(this, bitCount); }; protoOf(Long).u2 = function (bitCount) { return shiftRight(this, bitCount); }; protoOf(Long).v2 = function (bitCount) { return shiftRightUnsigned(this, bitCount); }; protoOf(Long).w2 = function (other) { return new Long(this.t_1 & other.t_1, this.u_1 & other.u_1); }; protoOf(Long).x2 = function (other) { return new Long(this.t_1 | other.t_1, this.u_1 | other.u_1); }; protoOf(Long).y2 = function (other) { return new Long(this.t_1 ^ other.t_1, this.u_1 ^ other.u_1); }; protoOf(Long).s2 = function () { return new Long(~this.t_1, ~this.u_1); }; protoOf(Long).z2 = function () { return toByte(this.t_1); }; protoOf(Long).a3 = function () { return toShort(this.t_1); }; protoOf(Long).b3 = function () { return this.t_1; }; protoOf(Long).c3 = function () { return toNumber(this); }; protoOf(Long).toString = function () { return toStringImpl(this, 10); }; protoOf(Long).equals = function (other) { var tmp; if (other instanceof Long) { tmp = equalsLong(this, other); } else { tmp = false; } return tmp; }; protoOf(Long).hashCode = function () { return hashCode_0(this); }; protoOf(Long).valueOf = function () { return this.c3(); }; function implement(interfaces) { var maxSize = 1; var masks = []; var inductionVariable = 0; var last = interfaces.length; while (inductionVariable < last) { var i = interfaces[inductionVariable]; inductionVariable = inductionVariable + 1 | 0; var currentSize = maxSize; var tmp1_elvis_lhs = i.prototype.$imask$; var imask = tmp1_elvis_lhs == null ? i.$imask$ : tmp1_elvis_lhs; if (!(imask == null)) { masks.push(imask); currentSize = imask.length; } var iid = i.$metadata$.iid; var tmp; if (iid == null) { tmp = null; } else { // Inline function 'kotlin.let' call // Inline function 'kotlin.contracts.contract' call // Inline function 'kotlin.js.implement.<anonymous>' call tmp = bitMaskWith(iid); } var iidImask = tmp; if (!(iidImask == null)) { masks.push(iidImask); currentSize = Math.max(currentSize, iidImask.length); } if (currentS