(function (_, $module$react, $module$react_router_h6p15h, $module$uuid, kotlin_kotlin, kotlin_dev_icerock_moko_resources, kotlin_moko_graphics_graphics, kotlin_org_jetbrains_kotlinx_kotlinx_datetime, kotlin_com_ustadmobile_app_lib_database, kotlin_org_kodein_di_kodein_di, kotlin_org_kodein_type_kaverit, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_com_github_UstadMobile_door_door_runtime, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_github_aakira_napier, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_github_pdvrieze_xmlutil_serialization, kotlin_io_github_pdvrieze_xmlutil_core, kotlin_com_ustadmobile_app_lib_util, kotlin_com_benasher44_uuid, kotlin_io_ktor_ktor_utils, kotlin_org_jetbrains_kotlinx_kotlinx_io_core, kotlin_io_ktor_ktor_io, kotlin_moe_tlaster_precompose_viewmodel, kotlin_UstadMobile_lib_xxhashkmp_core, kotlin_app_cash_paging_paging_common, kotlin_UstadMobile_lib_centralappconfigdb_common, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react, kotlin_org_jetbrains_kotlin_wrappers_kotlin_extensions, kotlin_org_jetbrains_kotlin_wrappers_kotlin_js) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var createContext = $module$react.createContext;
  var useState = $module$react.useState;
  var useNavigate = $module$react_router_h6p15h.useNavigate;
  var useLocation = $module$react_router_h6p15h.useLocation;
  var useMemo = $module$react.useMemo;
  var useState_0 = $module$react.useState;
  var v4 = $module$uuid.v4;
  var THROW_CCE = kotlin_kotlin.$_$.fm;
  var SupportedLocale = kotlin_dev_icerock_moko_resources.$_$.c;
  var listOf = kotlin_kotlin.$_$.ra;
  var SupportedLocales = kotlin_dev_icerock_moko_resources.$_$.b;
  var Impl = kotlin_dev_icerock_moko_resources.$_$.d;
  var StringResource = kotlin_dev_icerock_moko_resources.$_$.i;
  var protoOf = kotlin_kotlin.$_$.vf;
  var ResourceContainer = kotlin_dev_icerock_moko_resources.$_$.h;
  var RemoteJsStringLoaderHolder = kotlin_dev_icerock_moko_resources.$_$.a;
  var objectMeta = kotlin_kotlin.$_$.uf;
  var setMetadataFor = kotlin_kotlin.$_$.wf;
  var VOID = kotlin_kotlin.$_$.g;
  var PluralsResource = kotlin_dev_icerock_moko_resources.$_$.g;
  var ImageResource = kotlin_dev_icerock_moko_resources.$_$.f;
  var emptyList = kotlin_kotlin.$_$.d9;
  var Long = kotlin_kotlin.$_$.yl;
  var Color_init_$Create$ = kotlin_moko_graphics_graphics.$_$.a;
  var ColorResource = kotlin_dev_icerock_moko_resources.$_$.e;
  var listOf_0 = kotlin_kotlin.$_$.qa;
  var getBooleanHashCode = kotlin_kotlin.$_$.oe;
  var equals = kotlin_kotlin.$_$.ke;
  var classMeta = kotlin_kotlin.$_$.ge;
  var IllegalStateException = kotlin_kotlin.$_$.wl;
  var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.m2;
  var captureStack = kotlin_kotlin.$_$.ae;
  var CoroutineImpl = kotlin_kotlin.$_$.nd;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.yc;
  var contentEquals = kotlin_kotlin.$_$.i8;
  var Companion_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.e;
  var Collection = kotlin_kotlin.$_$.p6;
  var isInterface = kotlin_kotlin.$_$.ff;
  var Companion_getInstance_0 = kotlin_com_ustadmobile_app_lib_database.$_$.d6;
  var PersonAuth2 = kotlin_com_ustadmobile_app_lib_database.$_$.e3;
  var Companion_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.a6;
  var Unit_getInstance = kotlin_kotlin.$_$.g6;
  var Companion_getInstance_2 = kotlin_org_kodein_di_kodein_di.$_$.a;
  var getKClass = kotlin_kotlin.$_$.e;
  var arrayOf = kotlin_kotlin.$_$.um;
  var createKType = kotlin_kotlin.$_$.b;
  var typeToken = kotlin_org_kodein_type_kaverit.$_$.e;
  var TypeToken = kotlin_org_kodein_type_kaverit.$_$.b;
  var On = kotlin_org_kodein_di_kodein_di.$_$.g;
  var UmAppDataLayer = kotlin_com_ustadmobile_app_lib_database.$_$.a;
  var Instance = kotlin_org_kodein_di_kodein_di.$_$.f;
  var get_diContext = kotlin_org_kodein_di_kodein_di.$_$.b;
  var get_diTrigger = kotlin_org_kodein_di_kodein_di.$_$.c;
  var DIAware = kotlin_org_kodein_di_kodein_di.$_$.d;
  var KProperty1 = kotlin_kotlin.$_$.fh;
  var getPropertyCallableRef = kotlin_kotlin.$_$.se;
  var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x2;
  var $serializer_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.y5;
  var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b1;
  var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s;
  var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
  var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g;
  var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r2;
  var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s2;
  var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c3;
  var objectCreate = kotlin_kotlin.$_$.tf;
  var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;
  var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.l;
  var lazy = kotlin_kotlin.$_$.hn;
  var Url = kotlin_io_ktor_ktor_http.$_$.y;
  var endsWith = kotlin_kotlin.$_$.mi;
  var getStringHashCode = kotlin_kotlin.$_$.te;
  var $serializer_getInstance_0 = kotlin_com_ustadmobile_app_lib_database.$_$.c6;
  var $serializer_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.m6;
  var $serializer_getInstance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.f6;
  var removePrefix = kotlin_kotlin.$_$.ij;
  var removeSuffix = kotlin_kotlin.$_$.jj;
  var hashCode = kotlin_kotlin.$_$.ue;
  var compareValues = kotlin_kotlin.$_$.uc;
  var List = kotlin_kotlin.$_$.z6;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.q;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.z7;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.p;
  var UserSession = kotlin_com_ustadmobile_app_lib_database.$_$.p3;
  var Person = kotlin_com_ustadmobile_app_lib_database.$_$.j3;
  var sortedWith = kotlin_kotlin.$_$.zb;
  var plus = kotlin_kotlin.$_$.gb;
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h2;
  var get_direct = kotlin_org_kodein_di_kodein_di.$_$.h;
  var Companion_getInstance_3 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.p;
  var UmAppDatabase = kotlin_com_ustadmobile_app_lib_database.$_$.b;
  var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z2;
  var collectLatest = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
  var PersonAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.s;
  var shallowCopy = kotlin_com_ustadmobile_app_lib_database.$_$.b1;
  var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.h;
  var Pair = kotlin_kotlin.$_$.cm;
  var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.a;
  var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w3;
  var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l3;
  var interfaceMeta = kotlin_kotlin.$_$.we;
  var get_doorPrimaryKeyManager = kotlin_com_github_UstadMobile_door_door_runtime.$_$.d;
  var Companion_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.n6;
  var get_doorWrapperNodeId = kotlin_com_github_UstadMobile_door_door_runtime.$_$.e;
  var systemTimeInMillis = kotlin_com_github_UstadMobile_door_door_runtime.$_$.m;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l2;
  var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;
  var StringCompanionObject_getInstance = kotlin_kotlin.$_$.t5;
  var serializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
  var ListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
  var toSet = kotlin_kotlin.$_$.qc;
  var toList = kotlin_kotlin.$_$.jc;
  var Comparator = kotlin_kotlin.$_$.pl;
  var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j1;
  var withDoorTransactionAsync = kotlin_com_github_UstadMobile_door_door_runtime.$_$.o;
  var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.d;
  var url = kotlin_io_ktor_ktor_client_core.$_$.g;
  var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.c;
  var contentType = kotlin_io_ktor_ktor_http.$_$.f1;
  var setBodyJson = kotlin_com_github_UstadMobile_door_door_runtime.$_$.g;
  var Companion_getInstance_5 = kotlin_io_ktor_ktor_http.$_$.j;
  var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.i;
  var Exception_init_$Create$ = kotlin_kotlin.$_$.y1;
  var NodeIdAndAuth = kotlin_com_github_UstadMobile_door_door_runtime.$_$.a;
  var toHexString = kotlin_kotlin.$_$.lk;
  var to = kotlin_kotlin.$_$.xn;
  var parameter = kotlin_io_ktor_ktor_client_core.$_$.f;
  var Napier_getInstance = kotlin_io_github_aakira_napier.$_$.g;
  var UmAccount = kotlin_com_ustadmobile_app_lib_database.$_$.o3;
  var ensureNotNull = kotlin_kotlin.$_$.an;
  var DoorDatabaseRepository = kotlin_com_github_UstadMobile_door_door_runtime.$_$.n;
  var header = kotlin_io_ktor_ktor_client_core.$_$.e;
  var set_expectSuccess = kotlin_io_ktor_ktor_client_core.$_$.b;
  var Companion_getInstance_6 = kotlin_io_ktor_ktor_http.$_$.k;
  var addAll = kotlin_kotlin.$_$.m7;
  var get_jsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.x;
  var get_longOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.z;
  var get_intOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.v;
  var Companion_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.z5;
  var Companion_getInstance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.b6;
  var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.j;
  var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.q;
  var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
  var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c1;
  var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l2;
  var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g2;
  var MutableStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m1;
  var asStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o1;
  var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
  var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s2;
  var SuspendFunction1 = kotlin_kotlin.$_$.pd;
  var SuspendFunction0 = kotlin_kotlin.$_$.od;
  var Companion_getInstance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.i5;
  var isCharSequence = kotlin_kotlin.$_$.bf;
  var trim = kotlin_kotlin.$_$.cl;
  var toString = kotlin_kotlin.$_$.ag;
  var buildClassSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t1;
  var XmlInput = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.a;
  var EventType_END_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d;
  var EventType_START_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.f;
  var XmlSerialName = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.c;
  var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p2;
  var XmlValue = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.d;
  var Regex_init_$Create$ = kotlin_kotlin.$_$.k1;
  var contains = kotlin_kotlin.$_$.gi;
  var firstOrNull = kotlin_kotlin.$_$.l9;
  var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u2;
  var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w;
  var IllegalArgumentException = kotlin_kotlin.$_$.vl;
  var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.g2;
  var $serializer_getInstance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.j5;
  var $serializer_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.g5;
  var mapOf = kotlin_kotlin.$_$.ua;
  var charSequenceLength = kotlin_kotlin.$_$.ee;
  var toCharArray = kotlin_kotlin.$_$.ik;
  var isUpperCase = kotlin_kotlin.$_$.aj;
  var Exception = kotlin_kotlin.$_$.ul;
  var Site = kotlin_com_ustadmobile_app_lib_database.$_$.m3;
  var randomString = kotlin_com_ustadmobile_app_lib_util.$_$.c;
  var PermissionFlags_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.e4;
  var uuid4 = kotlin_com_benasher44_uuid.$_$.a;
  var Exception_init_$Init$ = kotlin_kotlin.$_$.x1;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.f2;
  var Companion_getInstance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.w4;
  var shallowCopy_0 = kotlin_com_ustadmobile_app_lib_database.$_$.y;
  var Companion_getInstance_11 = kotlin_kotlin.$_$.a6;
  var serializer_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h1;
  var MapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z;
  var plus_0 = kotlin_kotlin.$_$.ab;
  var XapiSessionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.v1;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.q2;
  var compareTo = kotlin_kotlin.$_$.he;
  var mapOf_0 = kotlin_kotlin.$_$.ta;
  var shallowCopy_1 = kotlin_com_ustadmobile_app_lib_database.$_$.d1;
  var PersonNames = kotlin_com_ustadmobile_app_lib_database.$_$.t;
  var Flow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k1;
  var first = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
  var Companion_getInstance_12 = kotlin_com_ustadmobile_app_lib_database.$_$.k5;
  var toLong = kotlin_kotlin.$_$.yf;
  var OfflineItem = kotlin_com_ustadmobile_app_lib_database.$_$.b3;
  var CancellationException = kotlin_kotlin.$_$.xc;
  var THROW_IAE = kotlin_kotlin.$_$.gm;
  var enumEntries = kotlin_kotlin.$_$.td;
  var Enum = kotlin_kotlin.$_$.sl;
  var Companion_getInstance_13 = kotlin_com_ustadmobile_app_lib_database.$_$.l5;
  var Companion_getInstance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.v4;
  var Companion_getInstance_15 = kotlin_com_ustadmobile_app_lib_database.$_$.x4;
  var Companion_getInstance_16 = kotlin_com_ustadmobile_app_lib_database.$_$.r5;
  var CoursePermission = kotlin_com_ustadmobile_app_lib_database.$_$.v2;
  var Exception_init_$Init$_0 = kotlin_kotlin.$_$.w1;
  var IllegalStateException_init_$Init$_0 = kotlin_kotlin.$_$.i2;
  var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.d2;
  var Companion_getInstance_17 = kotlin_com_ustadmobile_app_lib_database.$_$.w5;
  var EnrolmentRequest = kotlin_com_ustadmobile_app_lib_database.$_$.z2;
  var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.m;
  var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.s2;
  var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y2;
  var INT_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j;
  var PrimitiveSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k1;
  var doorNodeIdHeader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.c;
  var ContentEntryParentChildJoin = kotlin_com_ustadmobile_app_lib_database.$_$.j2;
  var Companion_getInstance_18 = kotlin_com_ustadmobile_app_lib_database.$_$.h5;
  var toMutableList = kotlin_kotlin.$_$.nc;
  var checkIndexOverflow = kotlin_kotlin.$_$.x7;
  var Companion_getInstance_19 = kotlin_com_ustadmobile_app_lib_database.$_$.m5;
  var getOrNull = kotlin_kotlin.$_$.u9;
  var getKClassFromExpression = kotlin_kotlin.$_$.d;
  var decodeBase64Bytes = kotlin_io_ktor_ktor_utils.$_$.x;
  var decodeToString = kotlin_kotlin.$_$.ii;
  var PersonPasskey = kotlin_com_ustadmobile_app_lib_database.$_$.h3;
  var split = kotlin_kotlin.$_$.qj;
  var startsWith = kotlin_kotlin.$_$.rj;
  var plus_1 = kotlin_kotlin.$_$.eb;
  var emptySet = kotlin_kotlin.$_$.f9;
  var first_0 = kotlin_kotlin.$_$.p9;
  var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.f;
  var charSequenceGet = kotlin_kotlin.$_$.de;
  var Char = kotlin_kotlin.$_$.ml;
  var isDigit = kotlin_kotlin.$_$.ui;
  var toString_0 = kotlin_kotlin.$_$.u3;
  var isLetter = kotlin_kotlin.$_$.wi;
  var joinToString = kotlin_kotlin.$_$.ca;
  var Companion_getInstance_20 = kotlin_com_ustadmobile_app_lib_database.$_$.z4;
  var ClazzEnrolment_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.v3;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.m3;
  var indexOf = kotlin_kotlin.$_$.si;
  var emptyMap = kotlin_kotlin.$_$.e9;
  var first_1 = kotlin_kotlin.$_$.q9;
  var distinct = kotlin_kotlin.$_$.a9;
  var until = kotlin_kotlin.$_$.ah;
  var PeerReviewerAllocation = kotlin_com_ustadmobile_app_lib_database.$_$.c3;
  var Companion_getInstance_21 = kotlin_com_ustadmobile_app_lib_database.$_$.x5;
  var toMap = kotlin_kotlin.$_$.mc;
  var checkCountOverflow = kotlin_kotlin.$_$.w7;
  var shuffled = kotlin_kotlin.$_$.tb;
  var shallowCopy_2 = kotlin_com_ustadmobile_app_lib_database.$_$.i1;
  var SystemPermission = kotlin_com_ustadmobile_app_lib_database.$_$.n3;
  var PersonParentJoin = kotlin_com_ustadmobile_app_lib_database.$_$.g3;
  var Companion_getInstance_22 = kotlin_com_ustadmobile_app_lib_database.$_$.k6;
  var IllegalArgumentException_init_$Init$_0 = kotlin_kotlin.$_$.e2;
  var filterNotNull = kotlin_kotlin.$_$.k9;
  var Iterator = kotlin_kotlin.$_$.v6;
  var numberToLong = kotlin_kotlin.$_$.sf;
  var Iterable = kotlin_kotlin.$_$.u6;
  var readTo = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.a;
  var closeFinally = kotlin_kotlin.$_$.vm;
  var TransferJobItemStatus_IN_PROGRESS_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.r3;
  var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.d1;
  var JsType_getInstance = kotlin_io_ktor_ktor_utils.$_$.b;
  var ByteReadChannel_0 = kotlin_io_ktor_ktor_io.$_$.f1;
  var typeInfoImpl = kotlin_io_ktor_ktor_utils.$_$.k;
  var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.q;
  var NullBody_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
  var TransferJobItemStatus_COMPLETE_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.q3;
  var isWhitespace = kotlin_kotlin.$_$.bj;
  var setOf = kotlin_kotlin.$_$.sb;
  var firstOrNull_0 = kotlin_kotlin.$_$.oi;
  var Companion_getInstance_23 = kotlin_com_ustadmobile_app_lib_database.$_$.n4;
  var Exception_init_$Init$_1 = kotlin_kotlin.$_$.z1;
  var Json_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.p;
  var uuidFrom = kotlin_com_benasher44_uuid.$_$.b;
  var Companion_getInstance_24 = kotlin_kotlin.$_$.y5;
  var _Duration___get_inWholeMilliseconds__impl__msfiry = kotlin_kotlin.$_$.e3;
  var Companion_getInstance_25 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.r;
  var XapiEntityObjectTypeFlags_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.s4;
  var mapCapacity = kotlin_kotlin.$_$.sa;
  var coerceAtLeast = kotlin_kotlin.$_$.ng;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.z;
  var plus_2 = kotlin_kotlin.$_$.db;
  var System_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.c;
  var Uuid_init_$Create$ = kotlin_com_benasher44_uuid.$_$.c;
  var Companion_getInstance_26 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.e;
  var replace = kotlin_kotlin.$_$.lj;
  var toBooleanStrictOrNull = kotlin_kotlin.$_$.fk;
  var listOfNotNull = kotlin_kotlin.$_$.pa;
  var flow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t1;
  var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;
  var Companion_getInstance_27 = kotlin_com_ustadmobile_app_lib_database.$_$.o4;
  var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.v5;
  var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
  var ActivityEntity = kotlin_com_ustadmobile_app_lib_database.$_$.k1;
  var Companion_getInstance_28 = kotlin_com_ustadmobile_app_lib_database.$_$.p4;
  var Companion_getInstance_29 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
  var ActivityExtensionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.l1;
  var ActivityLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.n1;
  var ActivityInteractionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.m1;
  var JsonContentPolymorphicSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;
  var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.w;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.jn;
  var ActorEntity = kotlin_com_ustadmobile_app_lib_database.$_$.o1;
  var JsonDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;
  var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.j2;
  var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;
  var Companion_getInstance_30 = kotlin_com_ustadmobile_app_lib_database.$_$.r4;
  var StatementContextActivityJoin = kotlin_com_ustadmobile_app_lib_database.$_$.q1;
  var Companion_getInstance_31 = kotlin_com_ustadmobile_app_lib_database.$_$.q4;
  var GroupMemberActorJoin = kotlin_com_ustadmobile_app_lib_database.$_$.p1;
  var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u3;
  var FloatSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
  var getNumberHashCode = kotlin_kotlin.$_$.qe;
  var StatementEntity = kotlin_com_ustadmobile_app_lib_database.$_$.s1;
  var StatementEntityJson = kotlin_com_ustadmobile_app_lib_database.$_$.r1;
  var JsonNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.k;
  var VerbEntity = kotlin_com_ustadmobile_app_lib_database.$_$.t1;
  var VerbLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.u1;
  var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.i;
  var toDuration = kotlin_kotlin.$_$.gl;
  var Duration__toIsoString_impl_9h6wsm = kotlin_kotlin.$_$.k3;
  var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.n;
  var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
  var values = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.g;
  var isBlank = kotlin_kotlin.$_$.ti;
  var toInt = kotlin_kotlin.$_$.nk;
  var sorted = kotlin_kotlin.$_$.ac;
  var BufferOverflow_DROP_OLDEST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
  var MutableSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l1;
  var asSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
  var toString_1 = kotlin_kotlin.$_$.wn;
  var mutableLinkedListOf = kotlin_com_github_UstadMobile_door_door_runtime.$_$.f;
  var ChannelResult__getOrThrow_impl_od1axs = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w;
  var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x;
  var delay = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n;
  var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
  var indexOf_0 = kotlin_kotlin.$_$.ri;
  var fillArrayVal = kotlin_kotlin.$_$.me;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.n1;
  var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.o3;
  var lastIndexOf = kotlin_kotlin.$_$.dj;
  var HashMap_init_$Create$ = kotlin_kotlin.$_$.t;
  var charSequenceSubSequence = kotlin_kotlin.$_$.fe;
  var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.m1;
  var round = kotlin_kotlin.$_$.hg;
  var lastIndexOf_0 = kotlin_kotlin.$_$.ej;
  var Text_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
  var Image_getInstance = kotlin_io_ktor_ktor_http.$_$.f;
  var ContentType_init_$Create$ = kotlin_io_ktor_ktor_http.$_$.a;
  var Video_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
  var Audio_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
  var Companion_getInstance_32 = kotlin_io_ktor_ktor_http.$_$.e;
  var lazy_0 = kotlin_kotlin.$_$.in;
  var roundToInt = kotlin_kotlin.$_$.gg;
  var Companion_getInstance_33 = kotlin_com_ustadmobile_app_lib_database.$_$.f5;
  var timeout = kotlin_io_ktor_ktor_client_core.$_$.c;
  var Companion_getInstance_34 = kotlin_com_ustadmobile_app_lib_database.$_$.j6;
  var Companion_getInstance_35 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.f;
  var toLocalDateTime = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.l;
  var toInstant = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.k;
  var periodUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.j;
  var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.g;
  var plus_3 = kotlin_kotlin.$_$.hb;
  var LocalTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
  var LocalDateTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.a;
  var equals_0 = kotlin_kotlin.$_$.ni;
  var distinctUntilChanged = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r1;
  var GlobalScope_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d1;
  var Companion_getInstance_36 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.d;
  var minus = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.h;
  var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.a1;
  var toMap_0 = kotlin_kotlin.$_$.lc;
  var substringBefore = kotlin_kotlin.$_$.zj;
  var toMutableSet = kotlin_kotlin.$_$.pc;
  var titlecase = kotlin_kotlin.$_$.ek;
  var isLowerCase = kotlin_kotlin.$_$.yi;
  var PersonGroup = kotlin_com_ustadmobile_app_lib_database.$_$.f3;
  var PersonGroupMember_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.w3;
  var ScopedGrant = kotlin_com_ustadmobile_app_lib_database.$_$.l3;
  var SerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o1;
  var toLong_0 = kotlin_kotlin.$_$.qk;
  var KProperty0 = kotlin_kotlin.$_$.eh;
  var THROW_ISE = kotlin_kotlin.$_$.hm;
  var getLocalDelegateReference = kotlin_kotlin.$_$.pe;
  var lastOrNull = kotlin_kotlin.$_$.ja;
  var ViewModel = kotlin_moe_tlaster_precompose_viewmodel.$_$.b;
  var ViewModel_init_$Init$ = kotlin_moe_tlaster_precompose_viewmodel.$_$.a;
  var get_viewModelScope = kotlin_moe_tlaster_precompose_viewmodel.$_$.c;
  var toMutableMap = kotlin_kotlin.$_$.oc;
  var XXStringHasher = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.a;
  var Companion_getInstance_37 = kotlin_com_ustadmobile_app_lib_database.$_$.t4;
  var toBoolean = kotlin_kotlin.$_$.gk;
  var InstanceOrNull = kotlin_org_kodein_di_kodein_di.$_$.e;
  var ClazzAndDetailPermissions = kotlin_com_ustadmobile_app_lib_database.$_$.d;
  var mutableListOf = kotlin_kotlin.$_$.xa;
  var PermissionTriple = kotlin_com_ustadmobile_app_lib_database.$_$.q;
  var ClazzAndDisplayDetails = kotlin_com_ustadmobile_app_lib_database.$_$.e;
  var combine = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q1;
  var ClazzWithHolidayCalendarAndAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.f2;
  var CourseBlockAndEditEntities = kotlin_com_ustadmobile_app_lib_database.$_$.l;
  var Schedule = kotlin_com_ustadmobile_app_lib_database.$_$.k3;
  var Companion_getInstance_38 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z;
  var shareIn = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u1;
  var SuspendFunction2 = kotlin_kotlin.$_$.qd;
  var $serializer_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.k4;
  var $serializer_getInstance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.h6;
  var $serializer_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.c5;
  var CourseBlockPicture = kotlin_com_ustadmobile_app_lib_database.$_$.q2;
  var Companion_getInstance_39 = kotlin_com_ustadmobile_app_lib_database.$_$.i6;
  var CoursePicture = kotlin_com_ustadmobile_app_lib_database.$_$.w2;
  var shallowCopy_3 = kotlin_com_ustadmobile_app_lib_database.$_$.g1;
  var shallowCopy_4 = kotlin_com_ustadmobile_app_lib_database.$_$.j1;
  var getDefaultTimeZoneId = kotlin_com_ustadmobile_app_lib_util.$_$.a;
  var CourseTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.x2;
  var Companion_getInstance_40 = kotlin_com_ustadmobile_app_lib_database.$_$.d5;
  var Companion_getInstance_41 = kotlin_com_ustadmobile_app_lib_database.$_$.l4;
  var deactivateByUids = kotlin_com_ustadmobile_app_lib_database.$_$.s3;
  var deactivateByUids_0 = kotlin_com_ustadmobile_app_lib_database.$_$.t3;
  var deactivateByUids_1 = kotlin_com_ustadmobile_app_lib_database.$_$.u3;
  var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r2;
  var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
  var Companion_getInstance_42 = kotlin_com_ustadmobile_app_lib_database.$_$.s5;
  var Companion_getInstance_43 = kotlin_com_ustadmobile_app_lib_database.$_$.n5;
  var Companion_getInstance_44 = kotlin_com_ustadmobile_app_lib_database.$_$.u5;
  var Page = kotlin_app_cash_paging_paging_common.$_$.c;
  var Invalid = kotlin_app_cash_paging_paging_common.$_$.b;
  var Error_0 = kotlin_app_cash_paging_paging_common.$_$.a;
  var StudentAndBlockStatuses = kotlin_com_ustadmobile_app_lib_database.$_$.u;
  var LoadResult = kotlin_app_cash_paging_paging_common.$_$.d;
  var PagingSourceWithHttpLoader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.k;
  var DelegatedInvalidationPagingSource = kotlin_com_github_UstadMobile_door_door_runtime.$_$.j;
  var Page_init_$Create$ = kotlin_app_cash_paging_paging_common.$_$.g;
  var PagingState = kotlin_app_cash_paging_paging_common.$_$.f;
  var ClazzEnrolmentDaoCommon_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.z3;
  var ClazzInviteAndClazz = kotlin_com_ustadmobile_app_lib_database.$_$.f;
  var last = kotlin_kotlin.$_$.la;
  var ClazzDaoCommon_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.y3;
  var PermissionPair = kotlin_com_ustadmobile_app_lib_database.$_$.p;
  var eachCount = kotlin_kotlin.$_$.c9;
  var AverageCourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.z1;
  var CourseAssignmentMarkAndMarkerName = kotlin_com_ustadmobile_app_lib_database.$_$.j;
  var Grouping = kotlin_kotlin.$_$.q6;
  var SubmissionAndFiles = kotlin_com_ustadmobile_app_lib_database.$_$.v;
  var ClazzAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.b2;
  var AssignmentProgressSummary = kotlin_com_ustadmobile_app_lib_database.$_$.w1;
  var ClazzAssignmentDaoCommon_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.x3;
  var ClazzAssignmentCourseBlockAndSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.a2;
  var throwKotlinNothingValueException = kotlin_kotlin.$_$.pn;
  var CourseAssignmentSubmission = kotlin_com_ustadmobile_app_lib_database.$_$.p2;
  var Comments = kotlin_com_ustadmobile_app_lib_database.$_$.h2;
  var CourseAssignmentSubmissionFile = kotlin_com_ustadmobile_app_lib_database.$_$.o2;
  var CourseAssignmentMarkDaoCommon_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.b4;
  var CourseGroupSet = kotlin_com_ustadmobile_app_lib_database.$_$.u2;
  var shallowCopy_5 = kotlin_com_ustadmobile_app_lib_database.$_$.h1;
  var CourseBlock = kotlin_com_ustadmobile_app_lib_database.$_$.r2;
  var $serializer_getInstance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.t5;
  var AssignmentSubmitterSummary = kotlin_com_ustadmobile_app_lib_database.$_$.y1;
  var AssignmentSubmitterAndAllocations = kotlin_com_ustadmobile_app_lib_database.$_$.x1;
  var Companion_getInstance_45 = kotlin_com_ustadmobile_app_lib_database.$_$.u4;
  var CourseBlockAndAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.k;
  var AssignmentPermissionAndActiveUserSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.c;
  var CourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.n2;
  var ClazzNameAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.g;
  var ClazzEnrolmentWithLeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.c2;
  var Companion_getInstance_46 = kotlin_com_ustadmobile_app_lib_database.$_$.y4;
  var flowOf = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s1;
  var Clazz = kotlin_com_ustadmobile_app_lib_database.$_$.g2;
  var Companion_getInstance_47 = kotlin_com_ustadmobile_app_lib_database.$_$.a5;
  var ClazzLog = kotlin_com_ustadmobile_app_lib_database.$_$.e2;
  var shallowCopy_6 = kotlin_com_ustadmobile_app_lib_database.$_$.f1;
  var Companion_getInstance_48 = kotlin_com_ustadmobile_app_lib_database.$_$.b5;
  var Companion_getInstance_49 = kotlin_com_ustadmobile_app_lib_database.$_$.m4;
  var ClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.d2;
  var PersonAndClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.r;
  var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z1;
  var shallowCopy_7 = kotlin_com_ustadmobile_app_lib_database.$_$.w;
  var ContentEntry = kotlin_com_ustadmobile_app_lib_database.$_$.m2;
  var AttemptsPersonListConst_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.h4;
  var firstOrNull_1 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
  var SessionTimeAndProgressInfoConst_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.f4;
  var StatementConst_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.g4;
  var ContentEntryAndDetail = kotlin_com_ustadmobile_app_lib_database.$_$.i;
  var ContentEntryVersion = kotlin_com_ustadmobile_app_lib_database.$_$.l2;
  var OfflineItemAndState = kotlin_com_ustadmobile_app_lib_database.$_$.o;
  var Companion_getInstance_50 = kotlin_com_ustadmobile_app_lib_database.$_$.l6;
  var Companion_getInstance_51 = kotlin_com_ustadmobile_app_lib_database.$_$.j4;
  var Companion_getInstance_52 = kotlin_com_ustadmobile_app_lib_database.$_$.e5;
  var shallowCopy_8 = kotlin_com_ustadmobile_app_lib_database.$_$.e1;
  var ContentEntryPicture2 = kotlin_com_ustadmobile_app_lib_database.$_$.k2;
  var ContentEntryAndContentJob = kotlin_com_ustadmobile_app_lib_database.$_$.h;
  var ContentEntryImportJob = kotlin_com_ustadmobile_app_lib_database.$_$.i2;
  var Companion_getInstance_53 = kotlin_com_ustadmobile_app_lib_database.$_$.i4;
  var setOf_0 = kotlin_kotlin.$_$.rb;
  var ContentEntryDaoCommon_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.a4;
  var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
  var first_2 = kotlin_kotlin.$_$.r9;
  var CourseBlockAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.m;
  var CourseGroupMemberAndName = kotlin_com_ustadmobile_app_lib_database.$_$.s2;
  var CourseGroupMember = kotlin_com_ustadmobile_app_lib_database.$_$.t2;
  var Companion_getInstance_54 = kotlin_com_ustadmobile_app_lib_database.$_$.o5;
  var Companion_getInstance_55 = kotlin_com_ustadmobile_app_lib_database.$_$.p5;
  var Companion_getInstance_56 = kotlin_com_ustadmobile_app_lib_database.$_$.q5;
  var shallowCopy_9 = kotlin_com_ustadmobile_app_lib_database.$_$.a1;
  var CourseGroupSetDaoConstants_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.c4;
  var shallowCopy_10 = kotlin_com_ustadmobile_app_lib_database.$_$.x;
  var DiscussionPost = kotlin_com_ustadmobile_app_lib_database.$_$.y2;
  var Companion_getInstance_57 = kotlin_com_ustadmobile_app_lib_database.$_$.v5;
  var shallowCopy_11 = kotlin_com_ustadmobile_app_lib_database.$_$.z;
  var substringBeforeLast = kotlin_kotlin.$_$.xj;
  var printStackTrace = kotlin_kotlin.$_$.ln;
  var XML = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.b;
  var Message = kotlin_com_ustadmobile_app_lib_database.$_$.a3;
  var NotImplementedError = kotlin_kotlin.$_$.am;
  var shallowCopy_12 = kotlin_com_ustadmobile_app_lib_database.$_$.c1;
  var Companion_getInstance_58 = kotlin_com_ustadmobile_app_lib_database.$_$.e6;
  var PersonAndDisplayDetail = kotlin_com_ustadmobile_app_lib_database.$_$.d3;
  var EditAndViewPermission = kotlin_com_ustadmobile_app_lib_database.$_$.n;
  var Companion_getInstance_59 = kotlin_com_ustadmobile_app_lib_database.$_$.g6;
  var PersonPicture = kotlin_com_ustadmobile_app_lib_database.$_$.i3;
  var CentralAppConfigDbDataSource = kotlin_UstadMobile_lib_centralappconfigdb_common.$_$.a;
  var PagingSource = kotlin_app_cash_paging_paging_common.$_$.e;
  var getSystemTimeInMillis = kotlin_com_ustadmobile_app_lib_util.$_$.b;
  var PersonDaoCommon_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.d4;
  var print = kotlin_kotlin.$_$.wd;
  var get_lastIndex = kotlin_kotlin.$_$.ha;
  var mutableMapOf = kotlin_kotlin.$_$.ya;
  var offsetAt = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.i;
  var addChild = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.b;
  var addChildNode = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.a;
  var FC = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react.$_$.a;
  var toUrlQueryString = kotlin_com_github_UstadMobile_door_door_runtime.$_$.h;
  var json = kotlin_kotlin.$_$.kf;
  var KMutableProperty0 = kotlin_kotlin.$_$.ch;
  var useEffect = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.d;
  var DoorMigrationStatementList = kotlin_com_github_UstadMobile_door_door_runtime.$_$.i;
  var format = kotlin_dev_icerock_moko_resources.$_$.j;
  var Default_getInstance_0 = kotlin_kotlin.$_$.u5;
  var getOwnPropertyNames = kotlin_org_jetbrains_kotlin_wrappers_kotlin_extensions.$_$.a;
  var toSet_0 = kotlin_kotlin.$_$.rc;
  var toSet_1 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_js.$_$.a;
  var plus_4 = kotlin_kotlin.$_$.cb;
  //endregion
  //region block: pre-declaration
  setMetadataFor(strings, 'strings', objectMeta, VOID, [ResourceContainer, RemoteJsStringLoaderHolder]);
  setMetadataFor(plurals, 'plurals', objectMeta, VOID, [ResourceContainer, RemoteJsStringLoaderHolder]);
  setMetadataFor(images, 'images', objectMeta, VOID, [ResourceContainer]);
  setMetadataFor(fonts, 'fonts', objectMeta, VOID, [ResourceContainer]);
  setMetadataFor(files, 'files', objectMeta, VOID, [ResourceContainer]);
  setMetadataFor(colors, 'colors', objectMeta, VOID, [ResourceContainer]);
  setMetadataFor(assets, 'assets', objectMeta, VOID, [ResourceContainer]);
  setMetadataFor(MR, 'MR', objectMeta);
  setMetadataFor(AccountRegisterOptions, 'AccountRegisterOptions', classMeta, VOID, VOID, AccountRegisterOptions);
  setMetadataFor(AdultAccountRequiredException, 'AdultAccountRequiredException', classMeta, IllegalStateException, VOID, AdultAccountRequiredException);
  setMetadataFor($authenticateCOROUTINE$0, '$authenticateCOROUTINE$0', classMeta, CoroutineImpl);
  setMetadataFor($setAuthCOROUTINE$1, '$setAuthCOROUTINE$1', classMeta, CoroutineImpl);
  setMetadataFor(AuthManager, 'AuthManager', classMeta, VOID, [DIAware], VOID, VOID, VOID, [2]);
  setMetadataFor(Companion, 'Companion', objectMeta);
  setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthResult, 'AuthResult', classMeta, VOID, VOID, AuthResult, VOID, {0: $serializer_getInstance_9});
  setMetadataFor(ConsentNotGrantedException, 'ConsentNotGrantedException', classMeta, IllegalStateException, VOID, ConsentNotGrantedException);
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(LearningSpace, 'LearningSpace', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_10});
  setMetadataFor(Companion_1, 'Companion', objectMeta);
  setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(RegisterRequest, 'RegisterRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_11});
  setMetadataFor(UnauthorizedException, 'UnauthorizedException', classMeta, IllegalStateException, VOID, UnauthorizedException);
  setMetadataFor(Companion_2, 'Companion', objectMeta);
  setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(UserSessionWithPersonAndLearningSpace, 'UserSessionWithPersonAndLearningSpace', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_12});
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda_1, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$registerWithPasskey$slambda$slambda, 'UstadAccountManager$registerWithPasskey$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda_1, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(EndpointFilter, 'EndpointFilter', interfaceMeta);
  setMetadataFor(Companion_3, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta, VOID, [EndpointFilter]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta, VOID, [EndpointFilter]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta, VOID, [EndpointFilter]);
  setMetadataFor(UstadAccountManager$slambda, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda_1, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$makeNewTempGuestSession$slambda, 'UstadAccountManager$makeNewTempGuestSession$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$registerWithPasskey$slambda, 'UstadAccountManager$registerWithPasskey$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda, 'UstadAccountManager$register$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$addSession$slambda, 'UstadAccountManager$addSession$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$loginWithPasskey$slambda, 'UstadAccountManager$loginWithPasskey$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$login$slambda, 'UstadAccountManager$login$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($activeSessionsListCOROUTINE$2, '$activeSessionsListCOROUTINE$2', classMeta, CoroutineImpl);
  setMetadataFor($activeSessionCountCOROUTINE$3, '$activeSessionCountCOROUTINE$3', classMeta, CoroutineImpl);
  setMetadataFor($addSessionCOROUTINE$4, '$addSessionCOROUTINE$4', classMeta, CoroutineImpl);
  setMetadataFor($onIncomingMessageReceivedCOROUTINE$5, '$onIncomingMessageReceivedCOROUTINE$5', classMeta, CoroutineImpl);
  setMetadataFor($endSessionCOROUTINE$6, '$endSessionCOROUTINE$6', classMeta, CoroutineImpl);
  setMetadataFor($getSiteFromDbOrLoadFromHttpCOROUTINE$7, '$getSiteFromDbOrLoadFromHttpCOROUTINE$7', classMeta, CoroutineImpl);
  setMetadataFor($createLocalAccountCOROUTINE$8, '$createLocalAccountCOROUTINE$8', classMeta, CoroutineImpl);
  setMetadataFor($startGuestSessionCOROUTINE$9, '$startGuestSessionCOROUTINE$9', classMeta, CoroutineImpl);
  setMetadataFor(UstadAccountManager, 'UstadAccountManager', classMeta, VOID, VOID, VOID, VOID, VOID, [1, 2, 4, 3, 5, 0]);
  setMetadataFor(ContentImportProgressListener, 'ContentImportProgressListener', interfaceMeta);
  setMetadataFor(Companion_4, 'Companion', objectMeta);
  setMetadataFor(ContentImporter, 'ContentImporter', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_5, 'Companion', objectMeta);
  setMetadataFor(Anchor, 'Anchor', classMeta, VOID, VOID, Anchor, VOID, {0: AnchorSerializer_getInstance});
  setMetadataFor(AnchorSerializer, 'AnchorSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_6, 'Companion', objectMeta);
  setMetadataFor(Body, 'Body', classMeta, VOID, VOID, VOID, VOID, {0: BodySerializer_getInstance});
  setMetadataFor(BodySerializer, 'BodySerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_7, 'Companion', objectMeta);
  setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ListItem, 'ListItem', classMeta, VOID, VOID, ListItem, VOID, {0: $serializer_getInstance_13});
  setMetadataFor(Companion_8, 'Companion', objectMeta);
  setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavElement, 'NavElement', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_14});
  setMetadataFor(Companion_9, 'Companion', objectMeta);
  setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavigationDocument, 'NavigationDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_15});
  setMetadataFor(Companion_10, 'Companion', objectMeta);
  setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(OrderedList, 'OrderedList', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_16});
  setMetadataFor(Companion_11, 'Companion', objectMeta);
  setMetadataFor(Span, 'Span', classMeta, VOID, VOID, Span, VOID, {0: SpanSerializer_getInstance});
  setMetadataFor(SpanSerializer, 'SpanSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_12, 'Companion', objectMeta);
  setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Content, 'Content', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_17});
  setMetadataFor(Companion_13, 'Companion', objectMeta);
  setMetadataFor($serializer_8, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DocTitle, 'DocTitle', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_18});
  setMetadataFor(Companion_14, 'Companion', objectMeta);
  setMetadataFor($serializer_9, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Head, 'Head', classMeta, VOID, VOID, Head, VOID, {0: $serializer_getInstance_19});
  setMetadataFor(Companion_15, 'Companion', objectMeta);
  setMetadataFor($serializer_10, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavLabel, 'NavLabel', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_20});
  setMetadataFor(Companion_16, 'Companion', objectMeta);
  setMetadataFor($serializer_11, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavMap, 'NavMap', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_21});
  setMetadataFor(Companion_17, 'Companion', objectMeta);
  setMetadataFor($serializer_12, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavPoint, 'NavPoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_22});
  setMetadataFor(Companion_18, 'Companion', objectMeta);
  setMetadataFor($serializer_13, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NcxDocument, 'NcxDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_23});
  setMetadataFor(Companion_19, 'Companion', objectMeta);
  setMetadataFor($serializer_14, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Text, 'Text', classMeta, VOID, VOID, Text, VOID, {0: $serializer_getInstance_24});
  setMetadataFor(Companion_20, 'Companion', objectMeta);
  setMetadataFor($serializer_15, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcCreator, 'DcCreator', classMeta, VOID, VOID, DcCreator, VOID, {0: $serializer_getInstance_25});
  setMetadataFor(Companion_21, 'Companion', objectMeta);
  setMetadataFor($serializer_16, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcDescription, 'DcDescription', classMeta, VOID, VOID, DcDescription, VOID, {0: $serializer_getInstance_26});
  setMetadataFor(Companion_22, 'Companion', objectMeta);
  setMetadataFor($serializer_17, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcIdentifier, 'DcIdentifier', classMeta, VOID, VOID, DcIdentifier, VOID, {0: $serializer_getInstance_27});
  setMetadataFor(Companion_23, 'Companion', objectMeta);
  setMetadataFor($serializer_18, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcLanguage, 'DcLanguage', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_28});
  setMetadataFor(Companion_24, 'Companion', objectMeta);
  setMetadataFor($serializer_19, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcTitle, 'DcTitle', classMeta, VOID, VOID, DcTitle, VOID, {0: $serializer_getInstance_29});
  setMetadataFor(Companion_25, 'Companion', objectMeta);
  setMetadataFor($serializer_20, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Item, 'Item', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_30});
  setMetadataFor(Companion_26, 'Companion', objectMeta);
  setMetadataFor($serializer_21, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ItemRef, 'ItemRef', classMeta, VOID, VOID, ItemRef, VOID, {0: $serializer_getInstance_31});
  setMetadataFor(Companion_27, 'Companion', objectMeta);
  setMetadataFor($serializer_22, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Manifest, 'Manifest', classMeta, VOID, VOID, Manifest, VOID, {0: $serializer_getInstance_32});
  setMetadataFor(Companion_28, 'Companion', objectMeta);
  setMetadataFor($serializer_23, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Meta, 'Meta', classMeta, VOID, VOID, Meta, VOID, {0: $serializer_getInstance_33});
  setMetadataFor(Companion_29, 'Companion', objectMeta);
  setMetadataFor($serializer_24, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Metadata, 'Metadata', classMeta, VOID, VOID, Metadata, VOID, {0: $serializer_getInstance_34});
  setMetadataFor(Companion_30, 'Companion', objectMeta);
  setMetadataFor($serializer_25, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PackageDocument, 'PackageDocument', classMeta, VOID, VOID, PackageDocument, VOID, {0: $serializer_getInstance_35});
  setMetadataFor(Companion_31, 'Companion', objectMeta);
  setMetadataFor($serializer_26, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Spine, 'Spine', classMeta, VOID, VOID, Spine, VOID, {0: $serializer_getInstance_36});
  setMetadataFor(Companion_32, 'Companion', objectMeta);
  setMetadataFor($serializer_27, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifest, 'ContentManifest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_37});
  setMetadataFor(Companion_33, 'Companion', objectMeta);
  setMetadataFor($serializer_28, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifestEntry, 'ContentManifestEntry', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_38});
  setMetadataFor(Companion_34, 'Companion', objectMeta);
  setMetadataFor($serializer_29, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SubtitleTrack, 'SubtitleTrack', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_39});
  setMetadataFor(InvalidContentException, 'InvalidContentException', classMeta, IllegalArgumentException);
  setMetadataFor(Companion_35, 'Companion', objectMeta);
  setMetadataFor($serializer_30, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MetadataResult, 'MetadataResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_40});
  setMetadataFor(TerminologyKeys, 'TerminologyKeys', objectMeta);
  setMetadataFor(ValidateUsernameUseCase, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase);
  setMetadataFor($invokeCOROUTINE$10, '$invokeCOROUTINE$10', classMeta, CoroutineImpl);
  setMetadataFor(CheckRegistrationAllowedUseCase, 'CheckRegistrationAllowedUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(NewLocalAccountResult, 'NewLocalAccountResult', classMeta);
  setMetadataFor(CreateNewLocalAccountUseCase$invoke$slambda, 'CreateNewLocalAccountUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CreateNewLocalAccountUseCase, 'CreateNewLocalAccountUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SetPasswordUseCase, 'SetPasswordUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(AssignmentSubmissionException, 'AssignmentSubmissionException', classMeta, Exception);
  setMetadataFor(AccountIsNotSubmitterException, 'AccountIsNotSubmitterException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentAlreadySubmittedException, 'AssignmentAlreadySubmittedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentDeadlinePassedException, 'AssignmentDeadlinePassedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentTextTooLongException, 'AssignmentTextTooLongException', classMeta, AssignmentSubmissionException);
  setMetadataFor(SubmitAssignmentResult, 'SubmitAssignmentResult', classMeta);
  setMetadataFor($invokeCOROUTINE$11, '$invokeCOROUTINE$11', classMeta, CoroutineImpl);
  setMetadataFor(SubmitAssignmentUseCase, 'SubmitAssignmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(SubmitMarkUseCase$invoke$slambda, 'SubmitMarkUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$12, '$invokeCOROUTINE$12', classMeta, CoroutineImpl);
  setMetadataFor(SubmitMarkUseCase, 'SubmitMarkUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda, 'GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$14, '$collectCOROUTINE$14', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$13, '$invokeCOROUTINE$13', classMeta, CoroutineImpl);
  setMetadataFor(GetAssignmentSubmitterNameUseCase, 'GetAssignmentSubmitterNameUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CancelDownloadUseCase, 'CancelDownloadUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueContentManifestDownloadUseCase, 'EnqueueContentManifestDownloadUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(MakeContentEntryAvailableOfflineUseCase$invoke$slambda, 'MakeContentEntryAvailableOfflineUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$15, '$invokeCOROUTINE$15', classMeta, CoroutineImpl);
  setMetadataFor(MakeContentEntryAvailableOfflineUseCase, 'MakeContentEntryAvailableOfflineUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(OpenBlobItem, 'OpenBlobItem', classMeta);
  setMetadataFor($invokeCOROUTINE$16, '$invokeCOROUTINE$16', classMeta, CoroutineImpl);
  setMetadataFor(OpenBlobUiUseCase, 'OpenBlobUiUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpenBlobIntent, 'OpenBlobIntent', classMeta, Enum);
  function invoke$default(item, onProgress, intent, $completion, $super) {
    var tmp;
    if (onProgress === VOID) {
      tmp = OpenBlobUseCase$invoke$lambda;
    } else {
      tmp = onProgress;
    }
    onProgress = tmp;
    intent = intent === VOID ? OpenBlobIntent_VIEW_getInstance() : intent;
    return $super === VOID ? this.invoke_euk202_k$(item, onProgress, intent, $completion) : $super.invoke_euk202_k$.call(this, item, onProgress, intent, $completion);
  }
  setMetadataFor(OpenBlobUseCase, 'OpenBlobUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpeningBlobState, 'OpeningBlobState', classMeta);
  setMetadataFor(SaveAndUploadLocalUrisUseCase$updateUris$slambda, 'SaveAndUploadLocalUrisUseCase$updateUris$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$17, '$invokeCOROUTINE$17', classMeta, CoroutineImpl);
  setMetadataFor(SaveAndUploadLocalUrisUseCase, 'SaveAndUploadLocalUrisUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_36, 'Companion', objectMeta);
  setMetadataFor($serializer_31, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SaveLocalUriAsBlobItem, 'SaveLocalUriAsBlobItem', classMeta);
  setMetadataFor(SavedBlob, 'SavedBlob', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_41});
  function invoke$default_0(localUrisToSave, onTransferJobItemCreated, $completion, $super) {
    var tmp;
    if (onTransferJobItemCreated === VOID) {
      tmp = SaveLocalUrisAsBlobsUseCase$invoke$lambda;
    } else {
      tmp = onTransferJobItemCreated;
    }
    onTransferJobItemCreated = tmp;
    return $super === VOID ? this.invoke_hnl2qw_k$(localUrisToSave, onTransferJobItemCreated, $completion) : $super.invoke_hnl2qw_k$.call(this, localUrisToSave, onTransferJobItemCreated, $completion);
  }
  setMetadataFor(SaveLocalUrisAsBlobsUseCase, 'SaveLocalUrisAsBlobsUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_37, 'Companion', objectMeta);
  setMetadataFor(EnqueueSavePictureUseCase, 'EnqueueSavePictureUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(CancelBlobUploadClientUseCase, 'CancelBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnqueueBlobUploadItem, 'EnqueueBlobUploadItem', classMeta);
  function invoke$default_1(items, batchUuid, chunkSize, tableId, entityUid, $completion, $super) {
    chunkSize = chunkSize === VOID ? Companion_getInstance_119().get_DEFAULT_CHUNK_SIZE_c0dc7u_k$() : chunkSize;
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    return $super === VOID ? this.invoke_wnprc2_k$(items, batchUuid, chunkSize, tableId, entityUid, $completion) : $super.invoke_wnprc2_k$.call(this, items, batchUuid, chunkSize, tableId, entityUid, $completion);
  }
  setMetadataFor(EnqueueBlobUploadClientUseCase, 'EnqueueBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(CreateNewClazzUseCase$invoke$slambda, 'CreateNewClazzUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CreateNewClazzUseCase, 'CreateNewClazzUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AlreadyEnroledInClassException, 'AlreadyEnroledInClassException', classMeta, Exception, VOID, AlreadyEnroledInClassException);
  setMetadataFor(AlreadyHasPendingRequestException, 'AlreadyHasPendingRequestException', classMeta, IllegalStateException, VOID, AlreadyHasPendingRequestException);
  setMetadataFor(EnrolIntoCourseUseCase$invoke$slambda, 'EnrolIntoCourseUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$18, '$invokeCOROUTINE$18', classMeta, CoroutineImpl);
  setMetadataFor(EnrolIntoCourseUseCase, 'EnrolIntoCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(IApproveOrDeclinePendingEnrolmentRequestUseCase, 'IApproveOrDeclinePendingEnrolmentRequestUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$19, '$invokeCOROUTINE$19', classMeta, CoroutineImpl);
  setMetadataFor(RequestEnrolmentUseCase, 'RequestEnrolmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(SetClipboardStringUseCase, 'SetClipboardStringUseCase', interfaceMeta);
  setMetadataFor(Companion_38, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompressionLevel, 'CompressionLevel', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_99});
  setMetadataFor(CompressionLevelSerializer, 'CompressionLevelSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase$invoke$slambda, 'DeleteContentEntryParentChildJoinUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase, 'DeleteContentEntryParentChildJoinUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_39, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCase, 'ContentEntryGetMetaDataFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(ContentEntryGetMetadataStatus, 'ContentEntryGetMetadataStatus', classMeta, VOID, VOID, ContentEntryGetMetadataStatus);
  setMetadataFor(UnsupportedContentException, 'UnsupportedContentException', classMeta, Exception);
  setMetadataFor(Companion_40, 'Companion', objectMeta);
  function invoke$default_2(subtitleTrackUri, filename, locale, $completion, $super) {
    locale = locale === VOID ? null : locale;
    return $super === VOID ? this.invoke_bh6cft_k$(subtitleTrackUri, filename, locale, $completion) : $super.invoke_bh6cft_k$.call(this, subtitleTrackUri, filename, locale, $completion);
  }
  setMetadataFor(GetSubtitleTrackFromUriUseCase, 'GetSubtitleTrackFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(CancelImportContentEntryUseCase, 'CancelImportContentEntryUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$20, '$invokeCOROUTINE$20', classMeta, CoroutineImpl);
  setMetadataFor(CancelRemoteContentEntryImportUseCase, 'CancelRemoteContentEntryImportUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$21, '$invokeCOROUTINE$21', classMeta, CoroutineImpl);
  setMetadataFor(DismissRemoteContentEntryImportErrorUseCase, 'DismissRemoteContentEntryImportErrorUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_41, 'Companion', objectMeta);
  setMetadataFor(EnqueueContentEntryImportUseCase, 'EnqueueContentEntryImportUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LaunchResult, 'LaunchResult', classMeta, VOID, VOID, LaunchResult);
  function invoke$default_3(contentEntryVersion, navController, clazzUid, cbUid, target, $completion, $super) {
    target = target === VOID ? LinkTarget_DEFAULT_getInstance() : target;
    return $super === VOID ? this.invoke_12n9zo_k$(contentEntryVersion, navController, clazzUid, cbUid, target, $completion) : $super.invoke_12n9zo_k$.call(this, contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  }
  setMetadataFor(LaunchContentEntryVersionUseCase, 'LaunchContentEntryVersionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(LaunchEpubUseCase, 'LaunchEpubUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(LaunchXapiUseCase, 'LaunchXapiUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(MoveContentEntriesUseCase, 'MoveContentEntriesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SaveContentEntryUseCase$invoke$slambda, 'SaveContentEntryUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$22, '$invokeCOROUTINE$22', classMeta, CoroutineImpl);
  setMetadataFor(SaveContentEntryUseCase, 'SaveContentEntryUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(AddOrUpdateCourseBlockUseCase, 'AddOrUpdateCourseBlockUseCase', classMeta, VOID, VOID, AddOrUpdateCourseBlockUseCase);
  setMetadataFor(UpdateCourseBlocksOnReorderOrCommitUseCase, 'UpdateCourseBlocksOnReorderOrCommitUseCase', classMeta, VOID, VOID, UpdateCourseBlocksOnReorderOrCommitUseCase);
  setMetadataFor(CreatePasskeyUseCase, 'CreatePasskeyUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CredentialResult, 'CredentialResult', classMeta);
  setMetadataFor(PasswordCredentialResult, 'PasswordCredentialResult', classMeta, CredentialResult);
  setMetadataFor(PasskeyCredentialResult, 'PasskeyCredentialResult', classMeta, CredentialResult);
  setMetadataFor(NoCredentialAvailableResult, 'NoCredentialAvailableResult', classMeta, CredentialResult, VOID, NoCredentialAvailableResult);
  setMetadataFor(Error_1, 'Error', classMeta, CredentialResult);
  setMetadataFor(GetCredentialUseCase, 'GetCredentialUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_42, 'Companion', objectMeta);
  setMetadataFor($serializer_32, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PasskeyVerifyResult, 'PasskeyVerifyResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_42});
  setMetadataFor(SavePersonPasskeyUseCase, 'SavePersonPasskeyUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_43, 'Companion', objectMeta);
  setMetadataFor($serializer_33, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(UserPasskeyChallenge, 'UserPasskeyChallenge', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_43});
  setMetadataFor(DecodeUserHandleUseCase, 'DecodeUserHandleUseCase', interfaceMeta);
  setMetadataFor(Companion_44, 'Companion', objectMeta);
  setMetadataFor($serializer_34, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsClientOutputsJSON, 'AuthenticationExtensionsClientOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsClientOutputsJSON, VOID, {0: $serializer_getInstance_44});
  setMetadataFor(Companion_45, 'Companion', objectMeta);
  setMetadataFor($serializer_35, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsPRFOutputsJSON, 'AuthenticationExtensionsPRFOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsPRFOutputsJSON, VOID, {0: $serializer_getInstance_45});
  setMetadataFor(Companion_46, 'Companion', objectMeta);
  setMetadataFor($serializer_36, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationResponseJSON, 'AuthenticationResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_46});
  setMetadataFor(Companion_47, 'Companion', objectMeta);
  setMetadataFor($serializer_37, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticatorAssertionResponseJSON, 'AuthenticatorAssertionResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_47});
  setMetadataFor(Companion_48, 'Companion', objectMeta);
  setMetadataFor($serializer_38, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClientDataJSON, 'ClientDataJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_48});
  setMetadataFor(SavePasswordUseCase, 'SavePasswordUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ParseCredentialUsernameUseCase, 'ParseCredentialUsernameUseCase', classMeta, VOID, VOID, ParseCredentialUsernameUseCase);
  setMetadataFor($invokeCOROUTINE$23, '$invokeCOROUTINE$23', classMeta, CoroutineImpl);
  setMetadataFor(GetEpubTableOfContentsUseCase, 'GetEpubTableOfContentsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_49, 'Companion', objectMeta);
  setMetadataFor(FilterUsernameUseCase, 'FilterUsernameUseCase', classMeta, VOID, VOID, FilterUsernameUseCase);
  setMetadataFor(VersionInfo, 'VersionInfo', classMeta);
  setMetadataFor(GetVersionUseCase, 'GetVersionUseCase', interfaceMeta);
  setMetadataFor(HideKeyboardUseCase, 'HideKeyboardUseCase', interfaceMeta);
  setMetadataFor(ExceptionWithStringResource, 'ExceptionWithStringResource', interfaceMeta);
  setMetadataFor(ClazzInviteRedeemException, 'ClazzInviteRedeemException', classMeta, Exception, [Exception, ExceptionWithStringResource]);
  setMetadataFor(ClazzInviteRedeemUseCase$invoke$slambda, 'ClazzInviteRedeemUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$24, '$invokeCOROUTINE$24', classMeta, CoroutineImpl);
  setMetadataFor(ClazzInviteRedeemUseCase, 'ClazzInviteRedeemUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(ClazzRedeemResult, 'ClazzRedeemResult', classMeta);
  setMetadataFor($invokeCOROUTINE$25, '$invokeCOROUTINE$25', classMeta, CoroutineImpl);
  setMetadataFor(EnrollToCourseFromInviteCodeUseCase, 'EnrollToCourseFromInviteCodeUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ParseInviteUseCase, 'ParseInviteUseCase', classMeta);
  setMetadataFor(Companion_50, 'Companion', objectMeta);
  setMetadataFor($serializer_39, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SendClazzInvitesRequest, 'SendClazzInvitesRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_49});
  setMetadataFor(SendClazzInvitesUseCase, 'SendClazzInvitesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SetLangResult, 'SetLangResult', classMeta);
  function invoke$default_4(uiLang, currentDestination, navController, navArgs, $super) {
    navArgs = navArgs === VOID ? emptyMap() : navArgs;
    return $super === VOID ? this.invoke_bo0obb_k$(uiLang, currentDestination, navController, navArgs) : $super.invoke_bo0obb_k$.call(this, uiLang, currentDestination, navController, navArgs);
  }
  setMetadataFor(SetLanguageUseCase, 'SetLanguageUseCase', interfaceMeta);
  setMetadataFor(LaunchOpenLicensesUseCase, 'LaunchOpenLicensesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(GoToLearningSpaceUseCase, 'GoToLearningSpaceUseCase', interfaceMeta);
  setMetadataFor(GetLocalAccountsSupportedUseCase, 'GetLocalAccountsSupportedUseCase', classMeta);
  setMetadataFor(MakeLinkUseCase, 'MakeLinkUseCase', classMeta);
  setMetadataFor(GetDefaultDestinationUseCase, 'GetDefaultDestinationUseCase', classMeta);
  setMetadataFor(OnClickLinkUseCase, 'OnClickLinkUseCase', classMeta);
  setMetadataFor(Companion_51, 'Companion', objectMeta);
  setMetadataFor(LinkTarget, 'LinkTarget', classMeta, Enum);
  setMetadataFor(Companion_52, 'Companion', objectMeta);
  setMetadataFor(OpenExternalLinkUseCase, 'OpenExternalLinkUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$26, '$invokeCOROUTINE$26', classMeta, CoroutineImpl);
  setMetadataFor(UpdatePeerReviewAllocationUseCase, 'UpdatePeerReviewAllocationUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(AddNewPersonUseCase$invoke$slambda, 'AddNewPersonUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddNewPersonUseCase, 'AddNewPersonUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(BulkAddPersonException, 'BulkAddPersonException', classMeta, IllegalArgumentException);
  setMetadataFor(Companion_53, 'Companion', objectMeta);
  setMetadataFor($serializer_40, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonsDataError, 'BulkAddPersonsDataError', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_50});
  setMetadataFor(BulkAddPersonsFromLocalUriUseCase, 'BulkAddPersonsFromLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_54, 'Companion', objectMeta);
  setMetadataFor($serializer_41, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddUsersResult, 'BulkAddUsersResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_51});
  setMetadataFor(BulkAddOnProgress, 'BulkAddOnProgress', interfaceMeta);
  setMetadataFor(BulkAddPersonsUseCase, 'BulkAddPersonsUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(IAsYouTypeFormatter, 'IAsYouTypeFormatter', interfaceMeta);
  setMetadataFor(IPhoneNumber, 'IPhoneNumber', interfaceMeta);
  setMetadataFor(IPhoneNumberUtil, 'IPhoneNumberUtil', interfaceMeta);
  setMetadataFor(OnClickPhoneNumUseCase, 'OnClickPhoneNumUseCase', interfaceMeta);
  setMetadataFor(PhoneNumValidatorUseCase, 'PhoneNumValidatorUseCase', interfaceMeta);
  setMetadataFor(OnClickEmailUseCase, 'OnClickEmailUseCase', interfaceMeta);
  setMetadataFor(ShareAppUseCase, 'ShareAppUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ShareTextUseCase, 'ShareTextUseCase', interfaceMeta);
  setMetadataFor(GetShowPoweredByUseCase, 'GetShowPoweredByUseCase', classMeta);
  setMetadataFor(Companion_55, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$27, '$invokeCOROUTINE$27', classMeta, CoroutineImpl);
  setMetadataFor(GetLocaleForSiteTermsUseCase, 'GetLocaleForSiteTermsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(OnClickSendSmsUseCase, 'OnClickSendSmsUseCase', interfaceMeta);
  setMetadataFor(Companion_56, 'Companion', objectMeta);
  setMetadataFor(DismissSocialWarningUseCase, 'DismissSocialWarningUseCase', classMeta);
  setMetadataFor(Companion_57, 'Companion', objectMeta);
  setMetadataFor(ShowSocialWarningUseCase, 'ShowSocialWarningUseCase', classMeta);
  setMetadataFor(ChunkIterator, 'ChunkIterator', classMeta, VOID, [Iterator]);
  setMetadataFor(Chunk, 'Chunk', classMeta);
  setMetadataFor(ChunkInfo, 'ChunkInfo', classMeta, VOID, [Iterable]);
  setMetadataFor(UploadChunkGetter, 'UploadChunkGetter', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  function invoke$default_5(uploadUuid, totalSize, getChunk, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, $completion, $super) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    chunkSize = chunkSize === VOID ? get_DEFAULT_CHUNK_SIZE() : chunkSize;
    var tmp;
    if (onProgress === VOID) {
      tmp = ChunkedUploadClientChunkGetterUseCase$invoke$lambda;
    } else {
      tmp = onProgress;
    }
    onProgress = tmp;
    var tmp_0;
    if (onStatusChange === VOID) {
      tmp_0 = ChunkedUploadClientChunkGetterUseCase$invoke$lambda_0;
    } else {
      tmp_0 = onStatusChange;
    }
    onStatusChange = tmp_0;
    return $super === VOID ? this.invoke_ghx818_k$(uploadUuid, totalSize, getChunk, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, $completion) : $super.invoke_ghx818_k$.call(this, uploadUuid, totalSize, getChunk, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, $completion);
  }
  setMetadataFor(ChunkedUploadClientChunkGetterUseCase, 'ChunkedUploadClientChunkGetterUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [8]);
  setMetadataFor(UploadProgress, 'UploadProgress', classMeta);
  setMetadataFor(LastChunkResponse, 'LastChunkResponse', classMeta);
  function invoke$default_6(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion, $super) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    chunkSize = chunkSize === VOID ? get_DEFAULT_CHUNK_SIZE() : chunkSize;
    var tmp;
    if (onProgress === VOID) {
      tmp = ChunkedUploadClientLocalUriUseCase$invoke$lambda;
    } else {
      tmp = onProgress;
    }
    onProgress = tmp;
    var tmp_0;
    if (onStatusChange === VOID) {
      tmp_0 = ChunkedUploadClientLocalUriUseCase$invoke$lambda_0;
    } else {
      tmp_0 = onStatusChange;
    }
    onStatusChange = tmp_0;
    lastChunkHeaders = lastChunkHeaders === VOID ? null : lastChunkHeaders;
    return $super === VOID ? this.invoke_yh6k1z_k$(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) : $super.invoke_yh6k1z_k$.call(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
  }
  setMetadataFor(ChunkedUploadClientLocalUriUseCase, 'ChunkedUploadClientLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [8]);
  setMetadataFor($invokeCOROUTINE$28, '$invokeCOROUTINE$28', classMeta, CoroutineImpl);
  setMetadataFor(ChunkResponseInfo, 'ChunkResponseInfo', classMeta, VOID, VOID, ChunkResponseInfo);
  setMetadataFor(LocalUriChunkGetter, 'LocalUriChunkGetter', classMeta, VOID, [UploadChunkGetter], VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_58, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$29, '$invokeCOROUTINE$29', classMeta, CoroutineImpl);
  setMetadataFor($invokeCOROUTINE$30, '$invokeCOROUTINE$30', classMeta, CoroutineImpl);
  setMetadataFor(ChunkedUploadClientUseCaseKtorImpl, 'ChunkedUploadClientUseCaseKtorImpl', classMeta, VOID, [ChunkedUploadClientLocalUriUseCase, ChunkedUploadClientChunkGetterUseCase], VOID, VOID, VOID, [8]);
  setMetadataFor($invokeCOROUTINE$31, '$invokeCOROUTINE$31', classMeta, CoroutineImpl);
  setMetadataFor(GetUsernameSuggestionUseCase, 'GetUsernameSuggestionUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(StartUserSessionUseCase, 'StartUserSessionUseCase', classMeta);
  setMetadataFor(ValidateEmailUseCase, 'ValidateEmailUseCase', classMeta, VOID, VOID, ValidateEmailUseCase);
  setMetadataFor(Companion_59, 'Companion', objectMeta);
  setMetadataFor(ValidateUsernameUseCase_0, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase_0);
  setMetadataFor(Companion_60, 'Companion', objectMeta);
  setMetadataFor(ValidationResult, 'ValidationResult', classMeta, VOID, VOID, ValidationResult);
  setMetadataFor(StoreActivitiesUseCase$invoke$slambda, 'StoreActivitiesUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$32, '$invokeCOROUTINE$32', classMeta, CoroutineImpl);
  setMetadataFor(StoreActivitiesUseCase, 'StoreActivitiesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(XapiException, 'XapiException', classMeta, Exception);
  setMetadataFor(XapiJson, 'XapiJson', classMeta, VOID, VOID, XapiJson);
  setMetadataFor(Format, 'Format', classMeta, Enum);
  setMetadataFor(StatementStoreResult, 'StatementStoreResult', classMeta);
  setMetadataFor(XapiStatementResource$storeStatements$slambda, 'XapiStatementResource$storeStatements$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($storeStatementsCOROUTINE$33, '$storeStatementsCOROUTINE$33', classMeta, CoroutineImpl);
  setMetadataFor($putCOROUTINE$34, '$putCOROUTINE$34', classMeta, CoroutineImpl);
  setMetadataFor($postCOROUTINE$35, '$postCOROUTINE$35', classMeta, CoroutineImpl);
  setMetadataFor($getCOROUTINE$36, '$getCOROUTINE$36', classMeta, CoroutineImpl);
  setMetadataFor(XapiStatementResource, 'XapiStatementResource', classMeta, VOID, VOID, VOID, VOID, VOID, [2, 3]);
  setMetadataFor(XapiGroupAndPersonUidMap, 'XapiGroupAndPersonUidMap', classMeta);
  setMetadataFor($invokeCOROUTINE$37, '$invokeCOROUTINE$37', classMeta, CoroutineImpl);
  setMetadataFor(CreateXapiGroupForCourseGroupUseCase, 'CreateXapiGroupForCourseGroupUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($insertOrUpdateActorsIfNameChangedCOROUTINE$38, '$insertOrUpdateActorsIfNameChangedCOROUTINE$38', classMeta, CoroutineImpl);
  setMetadataFor($insertOrUpdateIfLastModChangedCOROUTINE$39, '$insertOrUpdateIfLastModChangedCOROUTINE$39', classMeta, CoroutineImpl);
  setMetadataFor(FormattedStatementResponse, 'FormattedStatementResponse', classMeta);
  setMetadataFor(Companion_61, 'Companion', objectMeta);
  setMetadataFor(FormatStatementResponseUseCase$invoke$slambda, 'FormatStatementResponseUseCase$invoke$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(FormatStatementResponseUseCase, 'FormatStatementResponseUseCase', classMeta);
  setMetadataFor(Companion_62, 'Companion', objectMeta);
  setMetadataFor($serializer_42, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Attachment, 'Attachment', classMeta, VOID, VOID, Attachment, VOID, {0: $serializer_getInstance_52});
  setMetadataFor(Companion_63, 'Companion', objectMeta);
  setMetadataFor($serializer_43, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiAccount, 'XapiAccount', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_53});
  setMetadataFor(Companion_64, 'Companion', objectMeta);
  setMetadataFor($serializer_44, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Interaction, 'Interaction', classMeta, VOID, VOID, Interaction, VOID, {0: $serializer_getInstance_54});
  setMetadataFor(Companion_65, 'Companion', objectMeta);
  setMetadataFor($serializer_45, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivity, 'XapiActivity', classMeta, VOID, VOID, XapiActivity, VOID, {0: $serializer_getInstance_55});
  setMetadataFor(ActivityEntities, 'ActivityEntities', classMeta);
  setMetadataFor(Companion_66, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiActor, 'XapiActor', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiActorSerializer_getInstance});
  setMetadataFor(XapiActorSerializer, 'XapiActorSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(ActorEntities, 'ActorEntities', classMeta);
  setMetadataFor(Companion_67, 'Companion', objectMeta);
  setMetadataFor($serializer_46, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementObject, 'XapiStatementObject', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiStatementObjectSerializer_getInstance});
  setMetadataFor(XapiAgent, 'XapiAgent', classMeta, VOID, [XapiActor, XapiStatementObject], XapiAgent, VOID, {0: $serializer_getInstance_56});
  setMetadataFor(Companion_68, 'Companion', objectMeta);
  setMetadataFor($serializer_47, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContext, 'XapiContext', classMeta, VOID, VOID, XapiContext, VOID, {0: $serializer_getInstance_57});
  setMetadataFor(Companion_69, 'Companion', objectMeta);
  setMetadataFor(XapiContextActivities, 'XapiContextActivities', classMeta, VOID, VOID, XapiContextActivities, VOID, {0: XapiContextActivitiesSerializer_getInstance});
  setMetadataFor(XapiContextActivitiesSerializer, 'XapiContextActivitiesSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_70, 'Companion', objectMeta);
  setMetadataFor($serializer_48, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContextActivitiesSurrogate, 'XapiContextActivitiesSurrogate', classMeta, VOID, VOID, XapiContextActivitiesSurrogate, VOID, {0: $serializer_getInstance_58});
  setMetadataFor(Companion_71, 'Companion', objectMeta);
  setMetadataFor($serializer_49, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiGroup, 'XapiGroup', classMeta, VOID, [XapiActor, XapiStatementObject], XapiGroup, VOID, {0: $serializer_getInstance_59});
  setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(Companion_72, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiInteractionType, 'XapiInteractionType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_133});
  setMetadataFor(XapiInteractionTypeSerializer, 'XapiInteractionTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_73, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiObjectType, 'XapiObjectType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_134});
  setMetadataFor(XapiObjectTypeSerializer, 'XapiObjectTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_74, 'Companion', objectMeta);
  setMetadataFor($serializer_50, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Score, 'Score', classMeta, VOID, VOID, Score, VOID, {0: $serializer_getInstance_60});
  setMetadataFor(Companion_75, 'Companion', objectMeta);
  setMetadataFor($serializer_51, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiResult, 'XapiResult', classMeta, VOID, VOID, XapiResult, VOID, {0: $serializer_getInstance_61});
  setMetadataFor(Companion_76, 'Companion', objectMeta);
  setMetadataFor($serializer_52, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatement, 'XapiStatement', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_62});
  setMetadataFor(StatementEntities, 'StatementEntities', classMeta, VOID, VOID, StatementEntities);
  setMetadataFor(Companion_77, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiStatementObjectSerializer, 'XapiStatementObjectSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(Companion_78, 'Companion', objectMeta);
  setMetadataFor($serializer_53, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivityStatementObject, 'XapiActivityStatementObject', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_63});
  setMetadataFor(Companion_79, 'Companion', objectMeta);
  setMetadataFor($serializer_54, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementRef, 'XapiStatementRef', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_64});
  setMetadataFor(Companion_80, 'Companion', objectMeta);
  setMetadataFor($serializer_55, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiVerb, 'XapiVerb', classMeta, VOID, VOID, XapiVerb, VOID, {0: $serializer_getInstance_65});
  setMetadataFor(VerbEntities, 'VerbEntities', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder$onComplete$slambda, 'NonInteractiveContentXapiStatementRecorder$onComplete$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder, 'NonInteractiveContentXapiStatementRecorder', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorderFactory, 'NonInteractiveContentXapiStatementRecorderFactory', classMeta);
  setMetadataFor(Companion_81, 'Companion', objectMeta);
  setMetadataFor(SaveStatementOnClearUseCase, 'SaveStatementOnClearUseCase', interfaceMeta);
  setMetadataFor(SaveStatementOnUnloadUseCase, 'SaveStatementOnUnloadUseCase', interfaceMeta, VOID, [SaveStatementOnClearUseCase]);
  setMetadataFor(ContainerStorageDir, 'ContainerStorageDir', classMeta);
  setMetadataFor(UstadMobileConstants, 'UstadMobileConstants', objectMeta);
  setMetadataFor(Companion_82, 'Companion', objectMeta);
  setMetadataFor(LastGoToDest, 'LastGoToDest', classMeta);
  setMetadataFor(UstadGoOptions, 'UstadGoOptions', classMeta, VOID, VOID, UstadGoOptions);
  setMetadataFor(UiLanguage, 'UiLanguage', classMeta);
  setMetadataFor(Companion_83, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemCommon, 'UstadMobileSystemCommon', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ActionBarButtonUiState, 'ActionBarButtonUiState', classMeta, VOID, VOID, ActionBarButtonUiState);
  setMetadataFor(AppActionButton, 'AppActionButton', classMeta);
  setMetadataFor(AppBarColors, 'AppBarColors', classMeta, Enum);
  setMetadataFor(AppBarSearchUiState, 'AppBarSearchUiState', classMeta, VOID, VOID, AppBarSearchUiState);
  setMetadataFor(AppStateIcon, 'AppStateIcon', classMeta, Enum);
  setMetadataFor(AppUiState, 'AppUiState', classMeta, VOID, VOID, AppUiState);
  setMetadataFor(FabIcon, 'FabIcon', classMeta, Enum);
  setMetadataFor(FabUiState, 'FabUiState', classMeta, VOID, VOID, FabUiState);
  setMetadataFor(State, 'State', classMeta, Enum);
  setMetadataFor(Companion_84, 'Companion', objectMeta);
  setMetadataFor(LoadingUiState, 'LoadingUiState', classMeta, VOID, VOID, LoadingUiState);
  setMetadataFor(OverflowItem, 'OverflowItem', classMeta);
  setMetadataFor(Snack, 'Snack', classMeta);
  setMetadataFor(SnackBarDispatcher, 'SnackBarDispatcher', interfaceMeta);
  setMetadataFor(TabItem, 'TabItem', classMeta);
  setMetadataFor(UstadContextMenuItem, 'UstadContextMenuItem', classMeta);
  setMetadataFor(Companion_85, 'Companion', objectMeta);
  setMetadataFor(GenderConfig, 'GenderConfig', classMeta, VOID, VOID, GenderConfig);
  setMetadataFor(LocaleSettingDelegate, 'LocaleSettingDelegate', interfaceMeta);
  setMetadataFor(SettingsLocaleSettingDelegate, 'SettingsLocaleSettingDelegate', classMeta, VOID, [LocaleSettingDelegate]);
  setMetadataFor(Companion_86, 'Companion', objectMeta);
  setMetadataFor(SupportedLanguagesConfig, 'SupportedLanguagesConfig', classMeta);
  setMetadataFor(Companion_87, 'Companion', objectMeta);
  setMetadataFor(SystemUrlConfig, 'SystemUrlConfig', classMeta);
  setMetadataFor(Companion_88, 'Companion', objectMeta);
  setMetadataFor(UstadBuildConfig, 'UstadBuildConfig', interfaceMeta);
  setMetadataFor(Companion_89, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyStrings, 'CourseTerminologyStrings', classMeta);
  setMetadataFor(TerminologyEntry, 'TerminologyEntry', classMeta);
  setMetadataFor(PersonConstants, 'PersonConstants', objectMeta);
  function navigate$default(viewName, args, goOptions, $super) {
    goOptions = goOptions === VOID ? Companion_getInstance_143().get_Default_goqax4_k$() : goOptions;
    var tmp;
    if ($super === VOID) {
      this.navigate_6urlkw_k$(viewName, args, goOptions);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.navigate_6urlkw_k$.call(this, viewName, args, goOptions);
    }
    return tmp;
  }
  setMetadataFor(UstadNavController, 'UstadNavController', interfaceMeta);
  setMetadataFor(CommandFlowUstadNavController, 'CommandFlowUstadNavController', classMeta, VOID, [UstadNavController], CommandFlowUstadNavController);
  setMetadataFor(NavCommand, 'NavCommand', classMeta);
  setMetadataFor(NavigateNavCommand, 'NavigateNavCommand', classMeta, NavCommand);
  setMetadataFor(PopNavCommand, 'PopNavCommand', classMeta, NavCommand);
  setMetadataFor(NavResult, 'NavResult', classMeta);
  setMetadataFor(NavResultDest, 'NavResultDest', classMeta);
  setMetadataFor(NavResultReturner, 'NavResultReturner', interfaceMeta);
  setMetadataFor(UstadSavedStateHandle, 'UstadSavedStateHandle', interfaceMeta);
  setMetadataFor(RefreshCommand, 'RefreshCommand', classMeta, VOID, VOID, RefreshCommand);
  setMetadataFor(UriHelper, 'UriHelper', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UrlKmp, 'UrlKmp', interfaceMeta);
  setMetadataFor(UsernameErrorException, 'UsernameErrorException', classMeta, Exception);
  setMetadataFor(EventCollator2$receiveEvent$slambda, 'EventCollator2$receiveEvent$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(EventCollator2, 'EventCollator2', classMeta);
  setMetadataFor(IdOption, 'IdOption', classMeta);
  setMetadataFor(ListFilterIdOption, 'ListFilterIdOption', classMeta, IdOption);
  setMetadataFor(Companion_90, 'Companion', objectMeta);
  setMetadataFor(MessageIdOption2, 'MessageIdOption2', classMeta);
  setMetadataFor(SortOrderOption, 'SortOrderOption', classMeta);
  setMetadataFor(TypeWithParamHeader, 'TypeWithParamHeader', classMeta);
  setMetadataFor(UMFileUtil, 'UMFileUtil', objectMeta);
  setMetadataFor(Companion_91, 'Companion', objectMeta);
  setMetadataFor(UstadUrlComponents, 'UstadUrlComponents', classMeta);
  setMetadataFor($verifySiteCOROUTINE$40, '$verifySiteCOROUTINE$40', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_1, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$o$collect$slambda, 'whenSubscribed$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$41, '$collectCOROUTINE$41', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$slambda, 'whenSubscribed$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_2, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta, VOID, [EndpointFilter]);
  setMetadataFor(navigateToLink$slambda, 'navigateToLink$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ScopedGrantResult, 'ScopedGrantResult', classMeta);
  setMetadataFor($insertPersonAndGroupCOROUTINE$42, '$insertPersonAndGroupCOROUTINE$42', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfFalseCOROUTINE$43, '$localFirstThenRepoIfFalseCOROUTINE$43', classMeta, CoroutineImpl);
  setMetadataFor($grantScopedPermissionCOROUTINE$44, '$grantScopedPermissionCOROUTINE$44', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfNullCOROUTINE$45, '$localFirstThenRepoIfNullCOROUTINE$45', classMeta, CoroutineImpl);
  setMetadataFor(Companion_92, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(IStringValues, 'IStringValues', interfaceMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_153});
  setMetadataFor(KtorHeadersStringValues, 'KtorHeadersStringValues', classMeta, VOID, [IStringValues]);
  setMetadataFor(MapStringValues, 'MapStringValues', classMeta, VOID, [IStringValues]);
  setMetadataFor(StringValuesSerializer, 'StringValuesSerializer', classMeta, VOID, [KSerializer], StringValuesSerializer);
  setMetadataFor(Companion_93, 'Companion', objectMeta);
  function showSnackBar$default(message, action, actionMessageId, $super) {
    var tmp;
    if (action === VOID) {
      tmp = UstadView$showSnackBar$lambda;
    } else {
      tmp = action;
    }
    action = tmp;
    actionMessageId = actionMessageId === VOID ? null : actionMessageId;
    var tmp_0;
    if ($super === VOID) {
      this.showSnackBar_rtxcda_k$(message, action, actionMessageId);
      tmp_0 = Unit_getInstance();
    } else {
      tmp_0 = $super.showSnackBar_rtxcda_k$.call(this, message, action, actionMessageId);
    }
    return tmp_0;
  }
  setMetadataFor(UstadView, 'UstadView', interfaceMeta);
  setMetadataFor(UstadSingleEntityView, 'UstadSingleEntityView', interfaceMeta, VOID, [UstadView]);
  setMetadataFor(UstadDetailView, 'UstadDetailView', interfaceMeta, VOID, [UstadSingleEntityView]);
  setMetadataFor(SiteTermsDetailView, 'SiteTermsDetailView', interfaceMeta, VOID, [UstadDetailView]);
  setMetadataFor(EditButtonMode, 'EditButtonMode', classMeta, Enum);
  setMetadataFor(Companion_94, 'Companion', objectMeta);
  setMetadataFor(UstadEditView, 'UstadEditView', interfaceMeta, VOID, [UstadSingleEntityView]);
  setMetadataFor(ListViewMode, 'ListViewMode', classMeta, Enum);
  setMetadataFor(Companion_95, 'Companion', objectMeta);
  setMetadataFor(UstadViewModel, 'UstadViewModel', classMeta, ViewModel, [ViewModel, DIAware], VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DetailViewModel, 'DetailViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_96, 'Companion', objectMeta);
  setMetadataFor(HtmlEditViewModel$onHtmlChanged$slambda, 'HtmlEditViewModel$onHtmlChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadEditViewModel, 'UstadEditViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(HtmlEditViewModel, 'HtmlEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(HtmlEditUiState, 'HtmlEditUiState', classMeta, VOID, VOID, HtmlEditUiState);
  setMetadataFor(Companion_97, 'Companion', objectMeta);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_98, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_2, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$searchEvtCollator$slambda, 'UstadListViewModel$searchEvtCollator$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(UstadListViewModel, 'UstadListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(UstadViewModel$filteredResultFlowForKey$o$collect$slambda, 'UstadViewModel$filteredResultFlowForKey$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$49, '$collectCOROUTINE$49', classMeta, CoroutineImpl);
  setMetadataFor(Companion_99, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_3, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(_no_name_provided__qut3iv_1, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$getJson$slambda, 'UstadViewModel$getJson$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$setJson$slambda, 'UstadViewModel$setJson$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchIfHasPermission$slambda, 'UstadViewModel$launchIfHasPermission$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchWithLoadingIndicator$slambda, 'UstadViewModel$launchWithLoadingIndicator$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($getJsonCOROUTINE$46, '$getJsonCOROUTINE$46', classMeta, CoroutineImpl);
  setMetadataFor($setJsonCOROUTINE$47, '$setJsonCOROUTINE$47', classMeta, CoroutineImpl);
  setMetadataFor($loadEntityCOROUTINE$48, '$loadEntityCOROUTINE$48', classMeta, CoroutineImpl);
  setMetadataFor(Companion_100, 'Companion', objectMeta);
  setMetadataFor(OpenLicensesViewModel, 'OpenLicensesViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_101, 'Companion', objectMeta);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda, 'AddAccountSelectNewOrExistingViewModel$getCredentials$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda, 'AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel, 'AddAccountSelectNewOrExistingViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AddAccountSelectNewOrExistingUiState, 'AddAccountSelectNewOrExistingUiState', classMeta, VOID, VOID, AddAccountSelectNewOrExistingUiState);
  setMetadataFor(Companion_102, 'Companion', objectMeta);
  setMetadataFor(AddAccountSelectNewOrExistingUserTypeViewModel, 'AddAccountSelectNewOrExistingUserTypeViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AddAccountSelectNewOrExistingUserTypeUiState, 'AddAccountSelectNewOrExistingUserTypeUiState', classMeta, VOID, VOID, AddAccountSelectNewOrExistingUserTypeUiState);
  setMetadataFor(AccountListViewModel$slambda$slambda, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda$slambda, 'AccountListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda_1, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_103, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_4, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(AccountListViewModel$slambda, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda_1, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickAppShare$slambda, 'AccountListViewModel$onClickAppShare$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickLogout$slambda, 'AccountListViewModel$onClickLogout$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickAddAccount$slambda, 'AccountListViewModel$onClickAddAccount$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickDeleteAccount$slambda, 'AccountListViewModel$onClickDeleteAccount$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickOpenLicenses$slambda, 'AccountListViewModel$onClickOpenLicenses$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel, 'AccountListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AccountListUiState, 'AccountListUiState', classMeta, VOID, VOID, AccountListUiState);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_5, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda$slambda, 'launchSetTitleFromClazzUid$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda, 'launchSetTitleFromClazzUid$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_6, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(collectClazzNameAndUpdateTitle$slambda, 'collectClazzNameAndUpdateTitle$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionConstants, 'CoursePermissionConstants', objectMeta);
  setMetadataFor(getTitleForCoursePermission$slambda, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(getTitleForCoursePermission$slambda_1, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($getTitleForCoursePermissionCOROUTINE$50, '$getTitleForCoursePermissionCOROUTINE$50', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_104, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_7, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda, 'ClazzDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel, 'ClazzDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailUiState, 'ClazzDetailUiState', classMeta, VOID, VOID, ClazzDetailUiState);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$51, '$collectCOROUTINE$51', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_2, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$52, '$collectCOROUTINE$52', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_3, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$53, '$collectCOROUTINE$53', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_4, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_105, 'Companion', objectMeta);
  setMetadataFor(ClazzAction, 'ClazzAction', classMeta, Enum);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_8, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda, 'ClazzDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda_1, 'ClazzDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda, 'ClazzDetailOverviewViewModel$onClickCopyCourse$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel, 'ClazzDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailOverviewUiState, 'ClazzDetailOverviewUiState', classMeta, VOID, VOID, ClazzDetailOverviewUiState);
  setMetadataFor(Companion_106, 'Companion', objectMeta);
  setMetadataFor($serializer_56, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CopyCourseResult, 'CopyCourseResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_66});
  setMetadataFor($invokeCOROUTINE$54, '$invokeCOROUTINE$54', classMeta, CoroutineImpl);
  setMetadataFor(CopyCourseUseCase, 'CopyCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_17, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_19, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda$slambda, 'ClazzEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_107, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_9, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda_1, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlockList$slambda, 'ClazzEditViewModel$updateCourseBlockList$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onEntityChanged$slambda, 'ClazzEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda, 'ClazzEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$onCourseBlockMoved$slambda, 'ClazzEditViewModel$onCourseBlockMoved$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlock$slambda, 'ClazzEditViewModel$updateCourseBlock$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickDeleteCourseBlock$slambda, 'ClazzEditViewModel$onClickDeleteCourseBlock$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($updateCourseBlockListCOROUTINE$55, '$updateCourseBlockListCOROUTINE$55', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEditViewModel, 'ClazzEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(CourseBlockUiState, 'CourseBlockUiState', classMeta);
  setMetadataFor(Companion_108, 'Companion', objectMeta);
  setMetadataFor($serializer_57, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzEditUiState, 'ClazzEditUiState', classMeta, VOID, VOID, ClazzEditUiState, VOID, {0: $serializer_getInstance_67});
  setMetadataFor($loadCOROUTINE$56, '$loadCOROUTINE$56', classMeta, CoroutineImpl);
  setMetadataFor($loadHttpCOROUTINE$57, '$loadHttpCOROUTINE$57', classMeta, CoroutineImpl);
  setMetadataFor(ClazzGradebookPagingSource, 'ClazzGradebookPagingSource', classMeta, DelegatedInvalidationPagingSource, [DelegatedInvalidationPagingSource, PagingSourceWithHttpLoader], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_109, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_10, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda, 'ClazzGradebookViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel, 'ClazzGradebookViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzGradebookUiState, 'ClazzGradebookUiState', classMeta, VOID, VOID, ClazzGradebookUiState);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_110, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_11, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$processDecision$slambda, 'ClazzInviteRedeemViewModel$processDecision$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel, 'ClazzInviteRedeemViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzInviteRedeemUiState, 'ClazzInviteRedeemUiState', classMeta, VOID, VOID, ClazzInviteRedeemUiState);
  setMetadataFor(Companion_111, 'Companion', objectMeta);
  setMetadataFor($serializer_58, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Companion_112, 'Companion', objectMeta);
  setMetadataFor(InviteResult, 'InviteResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_68});
  setMetadataFor(ClazzInviteViaContactViewModel$onClickSend$slambda, 'ClazzInviteViaContactViewModel$onClickSend$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($sendContactsToServerCOROUTINE$58, '$sendContactsToServerCOROUTINE$58', classMeta, CoroutineImpl);
  setMetadataFor(ClazzInviteViaContactViewModel, 'ClazzInviteViaContactViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(ClazzInviteViaContactUiState, 'ClazzInviteViaContactUiState', classMeta, VOID, VOID, ClazzInviteViaContactUiState);
  setMetadataFor(InviteViaContactChip, 'InviteViaContactChip', classMeta);
  setMetadataFor(Companion_113, 'Companion', objectMeta);
  setMetadataFor(ClazzInviteViaLinkViewModel, 'ClazzInviteViaLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzInviteViaLinkUiState, 'ClazzInviteViaLinkUiState', classMeta, VOID, VOID, ClazzInviteViaLinkUiState);
  setMetadataFor(Companion_114, 'Companion', objectMeta);
  setMetadataFor(JoinWithCodeViewModel$onClickJoin$slambda, 'JoinWithCodeViewModel$onClickJoin$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(JoinWithCodeViewModel, 'JoinWithCodeViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(JoinWithCodeUiState, 'JoinWithCodeUiState', classMeta, VOID, VOID, JoinWithCodeUiState);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_115, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_12, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda_1, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda, 'ClazzListViewModel$onClickCancelEnrolmentRequest$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel, 'ClazzListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_116, 'Companion', objectMeta);
  setMetadataFor(ClazzListUiState, 'ClazzListUiState', classMeta, VOID, VOID, ClazzListUiState);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_117, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionDetailViewModel$slambda, 'CoursePermissionDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel, 'CoursePermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionDetailUiState, 'CoursePermissionDetailUiState', classMeta, VOID, VOID, CoursePermissionDetailUiState);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda_1, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_118, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionEditViewModel$slambda, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda_1, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel, 'CoursePermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionEditUiState, 'CoursePermissionEditUiState', classMeta, VOID, VOID, CoursePermissionEditUiState);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_119, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_13, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda, 'CoursePermissionListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$onClickDeleteEntry$slambda, 'CoursePermissionListViewModel$onClickDeleteEntry$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel, 'CoursePermissionListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CoursePermissionListUiState, 'CoursePermissionListUiState', classMeta, VOID, VOID, CoursePermissionListUiState);
  setMetadataFor(_no_name_provided__qut3iv_5, VOID, classMeta, VOID, [Grouping]);
  setMetadataFor(UstadAssignmentSubmissionHeaderUiState, 'UstadAssignmentSubmissionHeaderUiState', classMeta, VOID, VOID, UstadAssignmentSubmissionHeaderUiState);
  setMetadataFor(UstadCourseAssignmentMarkListItemUiState, 'UstadCourseAssignmentMarkListItemUiState', classMeta);
  setMetadataFor(Companion_120, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailViewModel$slambda, 'ClazzAssignmentDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailViewModel, 'ClazzAssignmentDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailUiState, 'ClazzAssignmentDetailUiState', classMeta, VOID, VOID, ClazzAssignmentDetailUiState);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_121, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_14, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel, 'ClazzAssignmentDetailSubmissionsTabViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_122, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabUiState, 'ClazzAssignmentDetailSubmissionsTabUiState', classMeta, VOID, VOID, ClazzAssignmentDetailSubmissionsTabUiState);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$59, '$collectCOROUTINE$59', classMeta, CoroutineImpl);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_6, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_123, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_15, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda, 'ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda, 'ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel, 'ClazzAssignmentDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailOverviewUiState, 'ClazzAssignmentDetailOverviewUiState', classMeta, VOID, VOID, ClazzAssignmentDetailOverviewUiState);
  setMetadataFor(ClazzAssignmentDetailoverviewSubmissionUiState, 'ClazzAssignmentDetailoverviewSubmissionUiState', classMeta, VOID, VOID, ClazzAssignmentDetailoverviewSubmissionUiState);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_7, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_9, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_11, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_124, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_16, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda, 'ClazzAssignmentEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda, 'ClazzAssignmentEditViewModel$onAssignmentChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda, 'ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onPictureChanged$slambda, 'ClazzAssignmentEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel, 'ClazzAssignmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [0, 2, 3, 6]);
  setMetadataFor(Companion_125, 'Companion', objectMeta);
  setMetadataFor($serializer_59, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzAssignmentEditUiState, 'ClazzAssignmentEditUiState', classMeta, VOID, VOID, ClazzAssignmentEditUiState, VOID, {0: $serializer_getInstance_69});
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda_1, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_126, 'Companion', objectMeta);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda, 'PeerReviewerAllocationEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda, 'PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel, 'PeerReviewerAllocationEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PeerReviewerAllocationEditUIState, 'PeerReviewerAllocationEditUIState', classMeta, VOID, VOID, PeerReviewerAllocationEditUIState);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_127, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_17, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel, 'ClazzAssignmentSubmitterDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzAssignmentSubmitterDetailUiState, 'ClazzAssignmentSubmitterDetailUiState', classMeta, VOID, VOID, ClazzAssignmentSubmitterDetailUiState);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_128, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_18, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda, 'ClazzMemberListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda, 'ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickRevokeInvite$slambda, 'ClazzMemberListViewModel$onClickRevokeInvite$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickResendInvite$slambda, 'ClazzMemberListViewModel$onClickResendInvite$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel, 'ClazzMemberListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzMemberListUiState, 'ClazzMemberListUiState', classMeta, VOID, VOID, ClazzMemberListUiState);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_1, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_3, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_129, 'Companion', objectMeta);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda_1, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onEntityChanged$slambda, 'ClazzEnrolmentEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onClickSave$slambda, 'ClazzEnrolmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel, 'ClazzEnrolmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzEnrolmentEditUiState, 'ClazzEnrolmentEditUiState', classMeta, VOID, VOID, ClazzEnrolmentEditUiState);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$60, '$collectCOROUTINE$60', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$61, '$collectCOROUTINE$61', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_7, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_8, VOID, classMeta, VOID, [Flow], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_130, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_19, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda, 'ClazzEnrolmentListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel, 'ClazzEnrolmentListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzEnrolmentListUiState, 'ClazzEnrolmentListUiState', classMeta, VOID, VOID, ClazzEnrolmentListUiState);
  setMetadataFor(ClazzEnrolmentListItemUiState, 'ClazzEnrolmentListItemUiState', classMeta);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(RecordAttendanceOption, 'RecordAttendanceOption', classMeta, Enum);
  setMetadataFor(AttendanceGraphData, 'AttendanceGraphData', classMeta);
  setMetadataFor(PermissionAndExistingLogs, 'PermissionAndExistingLogs', classMeta);
  setMetadataFor(Companion_131, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_20, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda, 'ClazzLogListAttendanceViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda, 'ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel, 'ClazzLogListAttendanceViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzLogListAttendanceUiState, 'ClazzLogListAttendanceUiState', classMeta, VOID, VOID, ClazzLogListAttendanceUiState);
  setMetadataFor(AttendanceGraphData_0, 'AttendanceGraphData', classMeta);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda_1, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_132, 'Companion', objectMeta);
  setMetadataFor(ClazzLogEditViewModel$slambda, 'ClazzLogEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$onEntityChanged$slambda, 'ClazzLogEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel, 'ClazzLogEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzLogEditUiState, 'ClazzLogEditUiState', classMeta, VOID, VOID, ClazzLogEditUiState);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_3, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_133, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_2, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda, 'ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda, 'ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda, 'ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($savePersonAndAttendanceRecordsCOROUTINE$62, '$savePersonAndAttendanceRecordsCOROUTINE$62', classMeta, CoroutineImpl);
  setMetadataFor($commitAttendanceRecordsToStateCOROUTINE$63, '$commitAttendanceRecordsToStateCOROUTINE$63', classMeta, CoroutineImpl);
  setMetadataFor(ClazzLogEditAttendanceViewModel, 'ClazzLogEditAttendanceViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 0, 3, 6]);
  setMetadataFor(ClazzLogEditAttendanceUiState, 'ClazzLogEditAttendanceUiState', classMeta, VOID, VOID, ClazzLogEditAttendanceUiState);
  setMetadataFor(Companion_134, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailViewModel, 'ContentEntryDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailUiState, 'ContentEntryDetailUiState', classMeta, VOID, VOID, ContentEntryDetailUiState);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_135, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_21, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda_1, 'ContentEntryDetailAttemptsPersonListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($buildSortOptionsCOROUTINE$64, '$buildSortOptionsCOROUTINE$64', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel, 'ContentEntryDetailAttemptsPersonListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [1, 3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListUiState, 'ContentEntryDetailAttemptsPersonListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsPersonListUiState);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1, 'ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_136, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda, 'ContentEntryDetailAttemptsSessionListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel, 'ContentEntryDetailAttemptsSessionListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListUiState, 'ContentEntryDetailAttemptsSessionListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsSessionListUiState);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_137, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_22, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel, 'ContentEntryDetailAttemptsStatementListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListUiState, 'ContentEntryDetailAttemptsStatementListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsStatementListUiState);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_138, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_23, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda, 'ContentEntryDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOffline$slambda, 'ContentEntryDetailOverviewViewModel$onClickOffline$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onCancelImport$slambda, 'ContentEntryDetailOverviewViewModel$onCancelImport$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda, 'ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onDismissImportError$slambda, 'ContentEntryDetailOverviewViewModel$onDismissImportError$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda, 'ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda, 'ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel, 'ContentEntryDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailOverviewUiState, 'ContentEntryDetailOverviewUiState', classMeta, VOID, VOID, ContentEntryDetailOverviewUiState);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_3, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_5, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_139, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_24, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda_1, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$scheduleEntityCommit$slambda, 'ContentEntryEditViewModel$scheduleEntityCommit$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$onClickSave$slambda, 'ContentEntryEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel, 'ContentEntryEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryEditUiState, 'ContentEntryEditUiState', classMeta, VOID, VOID, ContentEntryEditUiState);
  setMetadataFor(Companion_140, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetadataViewModel$slambda, 'ContentEntryGetMetadataViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryGetMetadataViewModel, 'ContentEntryGetMetadataViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryGetMetadataUiState, 'ContentEntryGetMetadataUiState', classMeta, VOID, VOID, ContentEntryGetMetadataUiState);
  setMetadataFor(Companion_141, 'Companion', objectMeta);
  setMetadataFor(GetSubtitleViewModel$slambda, 'GetSubtitleViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(GetSubtitleViewModel, 'GetSubtitleViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(GetSubtitleUiState, 'GetSubtitleUiState', classMeta, VOID, VOID, GetSubtitleUiState);
  setMetadataFor(Companion_142, 'Companion', objectMeta);
  setMetadataFor(ContentEntryImportLinkViewModel$onChangeLink$slambda, 'ContentEntryImportLinkViewModel$onChangeLink$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel$onClickNext$slambda, 'ContentEntryImportLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel, 'ContentEntryImportLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryImportLinkUiState, 'ContentEntryImportLinkUiState', classMeta, VOID, VOID, ContentEntryImportLinkUiState);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_1, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_3, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_5, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_143, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_25, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_1, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_3, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_5, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$launchDeleteEntries$slambda, 'ContentEntryListViewModel$launchDeleteEntries$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel, 'ContentEntryListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_144, 'Companion', objectMeta);
  setMetadataFor(ContentEntryListUiState, 'ContentEntryListUiState', classMeta, VOID, VOID, ContentEntryListUiState);
  setMetadataFor(Companion_145, 'Companion', objectMeta);
  setMetadataFor($serializer_60, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentEntryListSelectedItem, 'ContentEntryListSelectedItem', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_70});
  setMetadataFor(SubtitleEditViewModel$slambda$slambda, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$slambda$slambda_1, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_146, 'Companion', objectMeta);
  setMetadataFor(SubtitleEditViewModel$slambda, 'SubtitleEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$onEntityChanged$slambda, 'SubtitleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel, 'SubtitleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SubtitleEditUiState, 'SubtitleEditUiState', classMeta, VOID, VOID, SubtitleEditUiState);
  setMetadataFor(Companion_147, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompletionCriteria, 'CompletionCriteria', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_208});
  setMetadataFor(CourseBlockViewModelConstants, 'CourseBlockViewModelConstants', classMeta, VOID, VOID, CourseBlockViewModelConstants);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_3, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_5, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_148, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_26, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda, 'CourseBlockEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onEntityChanged$slambda, 'CourseBlockEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onPictureChanged$slambda, 'CourseBlockEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel, 'CourseBlockEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_149, 'Companion', objectMeta);
  setMetadataFor($serializer_61, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CourseBlockEditUiState, 'CourseBlockEditUiState', classMeta, VOID, VOID, CourseBlockEditUiState, VOID, {0: $serializer_getInstance_71});
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_150, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_27, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda, 'TextBlockDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel, 'TextBlockDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(TextBlockDetailUiState, 'TextBlockDetailUiState', classMeta, VOID, VOID, TextBlockDetailUiState);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_151, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_28, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda, 'CourseGroupSetDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel, 'CourseGroupSetDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetDetailUiState, 'CourseGroupSetDetailUiState', classMeta, VOID, VOID, CourseGroupSetDetailUiState);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_3, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_5, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_152, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetEditViewModel$slambda, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda_1, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onEntityChanged$slambda, 'CourseGroupSetEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda, 'CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda, 'CourseGroupSetEditViewModel$onClickAssignRandomly$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel, 'CourseGroupSetEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetEditUiState, 'CourseGroupSetEditUiState', classMeta, VOID, VOID, CourseGroupSetEditUiState);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_153, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListViewModel$slambda, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda_1, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel, 'CourseGroupSetListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_154, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListUiState, 'CourseGroupSetListUiState', classMeta, VOID, VOID, CourseGroupSetListUiState);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda_1, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_155, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyEditViewModel$slambda, 'CourseTerminologyEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onEntityChanged$slambda, 'CourseTerminologyEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onClickSave$slambda, 'CourseTerminologyEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel, 'CourseTerminologyEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseTerminologyEditUiState, 'CourseTerminologyEditUiState', classMeta, VOID, VOID, CourseTerminologyEditUiState);
  setMetadataFor(Companion_156, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyListViewModel$slambda, 'CourseTerminologyListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyListViewModel, 'CourseTerminologyListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseTerminologyListUiState, 'CourseTerminologyListUiState', classMeta, VOID, VOID, CourseTerminologyListUiState);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_157, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_29, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda, 'CourseDiscussionDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$onDeletePost$slambda, 'CourseDiscussionDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel, 'CourseDiscussionDetailViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseDiscussionDetailUiState, 'CourseDiscussionDetailUiState', classMeta, VOID, VOID, CourseDiscussionDetailUiState);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_158, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_30, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda, 'DiscussionPostDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onChangeReplyText$slambda, 'DiscussionPostDetailViewModel$onChangeReplyText$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onClickPostReply$slambda, 'DiscussionPostDetailViewModel$onClickPostReply$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$submitReply$slambda, 'DiscussionPostDetailViewModel$submitReply$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onDeletePost$slambda, 'DiscussionPostDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($submitReplyCOROUTINE$65, '$submitReplyCOROUTINE$65', classMeta, CoroutineImpl);
  setMetadataFor(DiscussionPostDetailViewModel, 'DiscussionPostDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(DiscussionPostDetailUiState2, 'DiscussionPostDetailUiState2', classMeta, VOID, VOID, DiscussionPostDetailUiState2);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda_1, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_159, 'Companion', objectMeta);
  setMetadataFor(DiscussionPostEditViewModel$slambda, 'DiscussionPostEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onEntityChanged$slambda, 'DiscussionPostEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda, 'DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel, 'DiscussionPostEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DiscussionPostEditUiState, 'DiscussionPostEditUiState', classMeta, VOID, VOID, DiscussionPostEditUiState);
  setMetadataFor(EpubContentViewModel$slambda$slambda$slambda, 'EpubContentViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(EpubContentViewModel$slambda$slambda, 'EpubContentViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_160, 'Companion', objectMeta);
  setMetadataFor(EpubContentViewModel$slambda, 'EpubContentViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AbstractNonInteractiveContentViewModel, 'AbstractNonInteractiveContentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentViewModel, 'EpubContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentUiState, 'EpubContentUiState', classMeta, VOID, VOID, EpubContentUiState);
  setMetadataFor(EpubScrollCommand, 'EpubScrollCommand', classMeta);
  setMetadataFor(EpubTocItem, 'EpubTocItem', classMeta);
  setMetadataFor(Companion_161, 'Companion', objectMeta);
  setMetadataFor(ErrorViewModel, 'ErrorViewModel', classMeta, VOID, VOID, ErrorViewModel);
  setMetadataFor(Companion_162, 'Companion', objectMeta);
  setMetadataFor(LoginViewModel$slambda, 'LoginViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickLogin$slambda, 'LoginViewModel$onClickLogin$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickConnectAsGuest$slambda, 'LoginViewModel$onClickConnectAsGuest$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$getCredentials$slambda, 'LoginViewModel$getCredentials$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel, 'LoginViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LoginUiState, 'LoginUiState', classMeta, VOID, VOID, LoginUiState);
  setMetadataFor(Companion_163, 'Companion', objectMeta);
  setMetadataFor(ConversationListViewModel, 'ConversationListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ConversationListUiState, 'ConversationListUiState', classMeta, VOID, VOID, ConversationListUiState);
  setMetadataFor(MessageListViewModel$slambda$slambda$slambda, 'MessageListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda$slambda, 'MessageListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_164, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_31, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda, 'MessageListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$onWarningDismiss$slambda, 'MessageListViewModel$onWarningDismiss$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$onClickSend$slambda, 'MessageListViewModel$onClickSend$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel, 'MessageListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(MessageListUiState, 'MessageListUiState', classMeta, VOID, VOID, MessageListUiState);
  setMetadataFor(TitleAndLangCode, 'TitleAndLangCode', classMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_165, 'Companion', objectMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$updateStatus$slambda, 'ParentalConsentManagementViewModel$updateStatus$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel, 'ParentalConsentManagementViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ParentalConsentManagementUiState, 'ParentalConsentManagementUiState', classMeta, VOID, VOID, ParentalConsentManagementUiState);
  setMetadataFor(PersonViewModelConstants, 'PersonViewModelConstants', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda_1, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda$slambda, 'PersonAccountEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_166, 'Companion', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda_1, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onEntityChanged$slambda, 'PersonAccountEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda, 'PersonAccountEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel, 'PersonAccountEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonAccountEditUiState, 'PersonAccountEditUiState', classMeta, VOID, VOID, PersonAccountEditUiState);
  setMetadataFor(Companion_167, 'Companion', objectMeta);
  setMetadataFor($serializer_62, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PersonUsernameAndPasswordModel, 'PersonUsernameAndPasswordModel', classMeta, VOID, VOID, PersonUsernameAndPasswordModel, VOID, {0: $serializer_getInstance_72});
  setMetadataFor(Companion_168, 'Companion', objectMeta);
  setMetadataFor(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0, 'sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0', classMeta, VOID, [BulkAddOnProgress]);
  setMetadataFor(BulkAddPersonRunImportViewModel$slambda, 'BulkAddPersonRunImportViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonRunImportViewModel, 'BulkAddPersonRunImportViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_169, 'Companion', objectMeta);
  setMetadataFor($serializer_63, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonRunImportUiState, 'BulkAddPersonRunImportUiState', classMeta, VOID, VOID, BulkAddPersonRunImportUiState, VOID, {0: $serializer_getInstance_73});
  setMetadataFor(Companion_170, 'Companion', objectMeta);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda_1, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda, 'BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel, 'BulkAddPersonSelectFileViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(BulkAddPersonSelectFileUiState, 'BulkAddPersonSelectFileUiState', classMeta, VOID, VOID, BulkAddPersonSelectFileUiState);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda_1, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda_3, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda, 'AddChildProfilesViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_171, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_32, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda, 'AddChildProfilesViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda_1, 'AddChildProfilesViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$updateChildProfileList$slambda, 'AddChildProfilesViewModel$updateChildProfileList$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda, 'AddChildProfilesViewModel$onClickDeleteChildProfile$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$onProfileSelected$slambda, 'AddChildProfilesViewModel$onProfileSelected$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($updateChildProfileListCOROUTINE$66, '$updateChildProfileListCOROUTINE$66', classMeta, CoroutineImpl);
  setMetadataFor(AddChildProfilesViewModel, 'AddChildProfilesViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(AddChildProfilesUiState, 'AddChildProfilesUiState', classMeta, VOID, VOID, AddChildProfilesUiState);
  setMetadataFor(EditChildProfileViewModel$slambda$slambda, 'EditChildProfileViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel$slambda$slambda_1, 'EditChildProfileViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_172, 'Companion', objectMeta);
  setMetadataFor(EditChildProfileViewModel$slambda, 'EditChildProfileViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel$onEntityChanged$slambda, 'EditChildProfileViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel, 'EditChildProfileViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EditChildProfileUiState, 'EditChildProfileUiState', classMeta, VOID, VOID, EditChildProfileUiState);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_7, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda, 'PersonDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_173, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_33, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda, 'PersonDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel, 'PersonDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonDetailUiState, 'PersonDetailUiState', classMeta, VOID, VOID, PersonDetailUiState);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_3, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_5, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda$slambda, 'PersonEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_174, 'Companion', objectMeta);
  setMetadataFor(PersonEditViewModel$slambda, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda_1, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onEntityChanged$slambda, 'PersonEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onPersonPictureChanged$slambda, 'PersonEditViewModel$onPersonPictureChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda, 'PersonEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel, 'PersonEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonEditUiState, 'PersonEditUiState', classMeta, VOID, VOID, PersonEditUiState);
  setMetadataFor(LearningSpaceListViewModel$slambda$slambda$slambda, 'LearningSpaceListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel$slambda$slambda, 'LearningSpaceListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_175, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_34, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel$slambda, 'LearningSpaceListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel, 'LearningSpaceListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(LearningSpaceListUiState, 'LearningSpaceListUiState', classMeta, VOID, VOID, LearningSpaceListUiState);
  setMetadataFor(EmptyPagingSource, 'EmptyPagingSource', classMeta, PagingSource, VOID, EmptyPagingSource, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda$slambda, 'PersonListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(PersonListViewModel$slambda$slambda_1, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_176, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_35, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda_1, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel, 'PersonListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(PersonListUiState, 'PersonListUiState', classMeta, VOID, VOID, PersonListUiState);
  setMetadataFor(ManageAccountViewModel$slambda$slambda, 'ManageAccountViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda$slambda_1, 'ManageAccountViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_177, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_36, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda, 'ManageAccountViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda_1, 'ManageAccountViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$onCreatePasskeyClick$slambda, 'ManageAccountViewModel$onCreatePasskeyClick$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel, 'ManageAccountViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ManageAccountUiState, 'ManageAccountUiState', classMeta, VOID, VOID, ManageAccountUiState);
  setMetadataFor(PasskeyListViewModel$slambda$slambda, 'PasskeyListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_178, 'Companion', objectMeta);
  setMetadataFor(PasskeyListViewModel$slambda, 'PasskeyListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PasskeyListViewModel$revokePasskey$slambda, 'PasskeyListViewModel$revokePasskey$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(PasskeyListViewModel, 'PasskeyListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(PasskeyListUiState, 'PasskeyListUiState', classMeta, VOID, VOID, PasskeyListUiState);
  setMetadataFor(Companion_179, 'Companion', objectMeta);
  setMetadataFor(RegisterAgeRedirectViewModel, 'RegisterAgeRedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterAgeRedirectUiState, 'RegisterAgeRedirectUiState', classMeta, VOID, VOID, RegisterAgeRedirectUiState);
  setMetadataFor(Companion_180, 'Companion', objectMeta);
  setMetadataFor(RegisterMinorWaitForParentViewModel, 'RegisterMinorWaitForParentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterMinorWaitForParentUiState, 'RegisterMinorWaitForParentUiState', classMeta, VOID, VOID, RegisterMinorWaitForParentUiState);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda_1, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_181, 'Companion', objectMeta);
  setMetadataFor(ScheduleEditViewModel$slambda, 'ScheduleEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$onEntityChanged$slambda, 'ScheduleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel, 'ScheduleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ScheduleEditUiState, 'ScheduleEditUiState', classMeta, VOID, VOID, ScheduleEditUiState);
  setMetadataFor(Companion_182, 'Companion', objectMeta);
  setMetadataFor(OtherSignUpOptionSelectionViewModel$slambda, 'OtherSignUpOptionSelectionViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda, 'OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda, 'OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($enrollToCourseFromInviteUidCOROUTINE$67, '$enrollToCourseFromInviteUidCOROUTINE$67', classMeta, CoroutineImpl);
  setMetadataFor(OtherSignUpOptionSelectionViewModel, 'OtherSignUpOptionSelectionViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(OtherSignUpOptionSelectionUiState, 'OtherSignUpOptionSelectionUiState', classMeta, VOID, VOID, OtherSignUpOptionSelectionUiState);
  setMetadataFor(SignUpViewModel$slambda$slambda, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$slambda$slambda_1, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(SignUpViewModel$slambda$slambda_3, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$slambda$slambda_5, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_183, 'Companion', objectMeta);
  setMetadataFor(SignUpViewModel$slambda, 'SignUpViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onEntityChanged$slambda, 'SignUpViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onPersonPictureChanged$slambda, 'SignUpViewModel$onPersonPictureChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onFullNameFocusedChanged$slambda, 'SignUpViewModel$onFullNameFocusedChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onClickSignup$slambda, 'SignUpViewModel$onClickSignup$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor($enrollToCourseFromInviteUidCOROUTINE$68, '$enrollToCourseFromInviteUidCOROUTINE$68', classMeta, CoroutineImpl);
  setMetadataFor(SignUpViewModel, 'SignUpViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(SignUpUiState, 'SignUpUiState', classMeta, VOID, VOID, SignUpUiState);
  setMetadataFor(Companion_184, 'Companion', objectMeta);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$slambda, 'SignupEnterUsernamePasswordViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda, 'SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda, 'SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel, 'SignupEnterUsernamePasswordViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SignupEnterUsernamePasswordUiState, 'SignupEnterUsernamePasswordUiState', classMeta, VOID, VOID, SignupEnterUsernamePasswordUiState);
  setMetadataFor(Companion_185, 'Companion', objectMeta);
  setMetadataFor(SiteTermsDetailViewModel$slambda, 'SiteTermsDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SiteTermsDetailViewModel, 'SiteTermsDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteTermsDetailUiState, 'SiteTermsDetailUiState', classMeta, VOID, VOID, SiteTermsDetailUiState);
  setMetadataFor(Companion_186, 'Companion', objectMeta);
  setMetadataFor(LearningSpaceEnterLinkViewModel$onClickNext$slambda, 'LearningSpaceEnterLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceEnterLinkViewModel, 'LearningSpaceEnterLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LearningSpaceEnterLinkUiState, 'LearningSpaceEnterLinkUiState', classMeta, VOID, VOID, LearningSpaceEnterLinkUiState);
  setMetadataFor(SystemPermissionConstants, 'SystemPermissionConstants', objectMeta);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [2]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_187, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_37, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda, 'SystemPermissionDetailViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel, 'SystemPermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionDetailUiState, 'SystemPermissionDetailUiState', classMeta, VOID, VOID, SystemPermissionDetailUiState);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda_1, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_188, 'Companion', objectMeta);
  setMetadataFor(SystemPermissionEditViewModel$slambda, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda_1, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel, 'SystemPermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionEditUiState, 'SystemPermissionEditUiState', classMeta, VOID, VOID, SystemPermissionEditUiState);
  setMetadataFor(TimeZoneListViewModel$slambda$slambda, 'TimeZoneListViewModel$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_189, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_3, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(TimeZoneListViewModel$slambda, 'TimeZoneListViewModel$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel, 'TimeZoneListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(TimezoneListUiState, 'TimezoneListUiState', classMeta, VOID, VOID, TimezoneListUiState);
  setMetadataFor($encryptPbkdf2COROUTINE$69, '$encryptPbkdf2COROUTINE$69', classMeta, CoroutineImpl);
  setMetadataFor($doublePbkdf2HashCOROUTINE$70, '$doublePbkdf2HashCOROUTINE$70', classMeta, CoroutineImpl);
  setMetadataFor($doublePbkdf2HashAsBase64COROUTINE$71, '$doublePbkdf2HashAsBase64COROUTINE$71', classMeta, CoroutineImpl);
  setMetadataFor(NavHostFunction, 'NavHostFunction', classMeta);
  setMetadataFor(NavHost$lambda$lambda$launchClearStackTimeout$slambda, 'NavHost$lambda$lambda$launchClearStackTimeout$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_190, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemImpl$openFileInDefaultViewer$slambda, 'UstadMobileSystemImpl$openFileInDefaultViewer$slambda', classMeta, CoroutineImpl, [CoroutineImpl], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadMobileSystemImpl, 'UstadMobileSystemImpl', classMeta, UstadMobileSystemCommon, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_191, 'Companion', objectMeta);
  setMetadataFor(SavedStateHandle2, 'SavedStateHandle2', classMeta, VOID, [UstadSavedStateHandle]);
  setMetadataFor(UrlKmpJs, 'UrlKmpJs', classMeta, VOID, [UrlKmp]);
  setMetadataFor(Companion_192, 'Companion', objectMeta);
  setMetadataFor(UMURLEncoder, 'UMURLEncoder', classMeta, VOID, VOID, UMURLEncoder);
  //endregion
  function _get_stringsFallbackFileUrl__lthhoc($this) {
    return $this.stringsFallbackFileUrl_1;
  }
  function _get_supportedLocales__hr5f8g($this) {
    return $this.supportedLocales_1;
  }
  function _get_stringsFallbackFileUrl__lthhoc_0($this) {
    return $this.stringsFallbackFileUrl_1;
  }
  function _get_supportedLocales__hr5f8g_0($this) {
    return $this.supportedLocales_1;
  }
  function _get_contentHash__u9zhyu($this) {
    return $this.contentHash_1;
  }
  function strings() {
    strings_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_stringsJson.json');
    tmp.stringsFallbackFileUrl_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_stringsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_stringsJson_ne.json');
    var tmp_5 = new SupportedLocale('ne', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_stringsJson_ar.json');
    var tmp_7 = new SupportedLocale('ar', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_stringsJson_bn.json');
    var tmp_9 = new SupportedLocale('bn', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_stringsJson_fr.json');
    var tmp_11 = new SupportedLocale('fr', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_stringsJson_km.json');
    var tmp_13 = new SupportedLocale('km', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_stringsJson_fa.json');
    var tmp_15 = new SupportedLocale('fa', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_stringsJson_nb-NO.json');
    var tmp_17 = new SupportedLocale('nb-NO', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_stringsJson_it.json');
    var tmp_19 = new SupportedLocale('it', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_stringsJson_my.json');
    var tmp_21 = new SupportedLocale('my', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_stringsJson_ps.json');
    var tmp_23 = new SupportedLocale('ps', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_stringsJson_tg.json');
    var tmp_25 = new SupportedLocale('tg', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE());
    var tmp_26 = require('localization/comustadmobilecore_stringsJson_ru.json');
    tmp_1.supportedLocales_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, tmp_25, new SupportedLocale('ru', (!(tmp_26 == null) ? typeof tmp_26 === 'string' : false) ? tmp_26 : THROW_CCE())]));
    this.stringsLoader_1 = new Impl(this.supportedLocales_1, this.stringsFallbackFileUrl_1);
    this.app_name_1 = new StringResource('app_name', this.stringsLoader_1);
    this.blank_1 = new StringResource('blank', this.stringsLoader_1);
    this.login_1 = new StringResource('login', this.stringsLoader_1);
    this.got_it_1 = new StringResource('got_it', this.stringsLoader_1);
    this.learn_more_1 = new StringResource('learn_more', this.stringsLoader_1);
    this.be_careful_interacting_online_1 = new StringResource('be_careful_interacting_online', this.stringsLoader_1);
    this.be_careful_not_to_share_1 = new StringResource('be_careful_not_to_share', this.stringsLoader_1);
    this.share_app_1 = new StringResource('share_app', this.stringsLoader_1);
    this.send_apk_file_1 = new StringResource('send_apk_file', this.stringsLoader_1);
    this.send_app_link_1 = new StringResource('send_app_link', this.stringsLoader_1);
    this.error_1 = new StringResource('error', this.stringsLoader_1);
    this.create_backup_1 = new StringResource('create_backup', this.stringsLoader_1);
    this.create_backup_description_1 = new StringResource('create_backup_description', this.stringsLoader_1);
    this.err_registering_new_user_1 = new StringResource('err_registering_new_user', this.stringsLoader_1);
    this.register_empty_fields_1 = new StringResource('register_empty_fields', this.stringsLoader_1);
    this.register_incorrect_email_1 = new StringResource('register_incorrect_email', this.stringsLoader_1);
    this.group_activity_1 = new StringResource('group_activity', this.stringsLoader_1);
    this.select_group_members_1 = new StringResource('select_group_members', this.stringsLoader_1);
    this.confirm_delete_message_1 = new StringResource('confirm_delete_message', this.stringsLoader_1);
    this.wrong_user_pass_combo_1 = new StringResource('wrong_user_pass_combo', this.stringsLoader_1);
    this.login_network_error_1 = new StringResource('login_network_error', this.stringsLoader_1);
    this.download_1 = new StringResource('download', this.stringsLoader_1);
    this.downloaded_1 = new StringResource('downloaded', this.stringsLoader_1);
    this.recycled_1 = new StringResource('recycled', this.stringsLoader_1);
    this.libraries_1 = new StringResource('libraries', this.stringsLoader_1);
    this.pause_download_1 = new StringResource('pause_download', this.stringsLoader_1);
    this.ok_1 = new StringResource('ok', this.stringsLoader_1);
    this.confirm_1 = new StringResource('confirm', this.stringsLoader_1);
    this.cancel_1 = new StringResource('cancel', this.stringsLoader_1);
    this.canceled_1 = new StringResource('canceled', this.stringsLoader_1);
    this.delete_1 = new StringResource('delete', this.stringsLoader_1);
    this.deleted_1 = new StringResource('deleted', this.stringsLoader_1);
    this.new_tab_1 = new StringResource('new_tab', this.stringsLoader_1);
    this.loading_1 = new StringResource('loading', this.stringsLoader_1);
    this.deleting_1 = new StringResource('deleting', this.stringsLoader_1);
    this.processing_1 = new StringResource('processing', this.stringsLoader_1);
    this.uploading_1 = new StringResource('uploading', this.stringsLoader_1);
    this.error_opening_file_1 = new StringResource('error_opening_file', this.stringsLoader_1);
    this.logout_1 = new StringResource('logout', this.stringsLoader_1);
    this.about_1 = new StringResource('about', this.stringsLoader_1);
    this.download_all_1 = new StringResource('download_all', this.stringsLoader_1);
    this.next_1 = new StringResource('next', this.stringsLoader_1);
    this.previous_1 = new StringResource('previous', this.stringsLoader_1);
    this.back_1 = new StringResource('back', this.stringsLoader_1);
    this.username_1 = new StringResource('username', this.stringsLoader_1);
    this.password_1 = new StringResource('password', this.stringsLoader_1);
    this.confirm_password_1 = new StringResource('confirm_password', this.stringsLoader_1);
    this.last_name_1 = new StringResource('last_name', this.stringsLoader_1);
    this.first_name_1 = new StringResource('first_name', this.stringsLoader_1);
    this.least_recent_1 = new StringResource('least_recent', this.stringsLoader_1);
    this.by_score_1 = new StringResource('by_score', this.stringsLoader_1);
    this.by_completion_1 = new StringResource('by_completion', this.stringsLoader_1);
    this.by_recent_attempt_1 = new StringResource('by_recent_attempt', this.stringsLoader_1);
    this.by_timestamp_1 = new StringResource('by_timestamp', this.stringsLoader_1);
    this.register_now_1 = new StringResource('register_now', this.stringsLoader_1);
    this.new_password_1 = new StringResource('new_password', this.stringsLoader_1);
    this.phone_memory_1 = new StringResource('phone_memory', this.stringsLoader_1);
    this.memory_card_1 = new StringResource('memory_card', this.stringsLoader_1);
    this.device_1 = new StringResource('device', this.stringsLoader_1);
    this.register_1 = new StringResource('register', this.stringsLoader_1);
    this.phone_number_1 = new StringResource('phone_number', this.stringsLoader_1);
    this.name_key_1 = new StringResource('name_key', this.stringsLoader_1);
    this.description_1 = new StringResource('description', this.stringsLoader_1);
    this.male_1 = new StringResource('male', this.stringsLoader_1);
    this.female_1 = new StringResource('female', this.stringsLoader_1);
    this.other_1 = new StringResource('other', this.stringsLoader_1);
    this.unset_1 = new StringResource('unset', this.stringsLoader_1);
    this.settings_1 = new StringResource('settings', this.stringsLoader_1);
    this.language_1 = new StringResource('language', this.stringsLoader_1);
    this.add_a_new_language_1 = new StringResource('add_a_new_language', this.stringsLoader_1);
    this.add_new_language_1 = new StringResource('add_new_language', this.stringsLoader_1);
    this.select_language_1 = new StringResource('select_language', this.stringsLoader_1);
    this.languages_1 = new StringResource('languages', this.stringsLoader_1);
    this.edit_language_1 = new StringResource('edit_language', this.stringsLoader_1);
    this.two_letter_code_1 = new StringResource('two_letter_code', this.stringsLoader_1);
    this.three_letter_code_1 = new StringResource('three_letter_code', this.stringsLoader_1);
    this.languages_description_1 = new StringResource('languages_description', this.stringsLoader_1);
    this.advanced_1 = new StringResource('advanced', this.stringsLoader_1);
    this.optional_1 = new StringResource('optional', this.stringsLoader_1);
    this.email_1 = new StringResource('email', this.stringsLoader_1);
    this.regcode_1 = new StringResource('regcode', this.stringsLoader_1);
    this.home_1 = new StringResource('home', this.stringsLoader_1);
    this.phone_1 = new StringResource('phone', this.stringsLoader_1);
    this.attendance_1 = new StringResource('attendance', this.stringsLoader_1);
    this.classes_1 = new StringResource('classes', this.stringsLoader_1);
    this.exams_1 = new StringResource('exams', this.stringsLoader_1);
    this.reports_1 = new StringResource('reports', this.stringsLoader_1);
    this.choose_template_1 = new StringResource('choose_template', this.stringsLoader_1);
    this.save_as_template_1 = new StringResource('save_as_template', this.stringsLoader_1);
    this.contents_1 = new StringResource('contents', this.stringsLoader_1);
    this.students_1 = new StringResource('students', this.stringsLoader_1);
    this.add_a_student_1 = new StringResource('add_a_student', this.stringsLoader_1);
    this.forgot_password_1 = new StringResource('forgot_password', this.stringsLoader_1);
    this.notifications_1 = new StringResource('notifications', this.stringsLoader_1);
    this.account_1 = new StringResource('account', this.stringsLoader_1);
    this.accounts_1 = new StringResource('accounts', this.stringsLoader_1);
    this.share_1 = new StringResource('share', this.stringsLoader_1);
    this.send_1 = new StringResource('send', this.stringsLoader_1);
    this.open_1 = new StringResource('open', this.stringsLoader_1);
    this.downloading_1 = new StringResource('downloading', this.stringsLoader_1);
    this.waiting_1 = new StringResource('waiting', this.stringsLoader_1);
    this.waiting_for_connection_1 = new StringResource('waiting_for_connection', this.stringsLoader_1);
    this.queued_1 = new StringResource('queued', this.stringsLoader_1);
    this.failed_1 = new StringResource('failed', this.stringsLoader_1);
    this.passed_1 = new StringResource('passed', this.stringsLoader_1);
    this.success_1 = new StringResource('success', this.stringsLoader_1);
    this.failure_1 = new StringResource('failure', this.stringsLoader_1);
    this.incomplete_1 = new StringResource('incomplete', this.stringsLoader_1);
    this.completed_1 = new StringResource('completed', this.stringsLoader_1);
    this.experience_1 = new StringResource('experience', this.stringsLoader_1);
    this.answered_1 = new StringResource('answered', this.stringsLoader_1);
    this.select_subtitle_video_1 = new StringResource('select_subtitle_video', this.stringsLoader_1);
    this.no_subtitle_1 = new StringResource('no_subtitle', this.stringsLoader_1);
    this.no_video_file_found_1 = new StringResource('no_video_file_found', this.stringsLoader_1);
    this.content_from_file_1 = new StringResource('content_from_file', this.stringsLoader_1);
    this.content_from_link_1 = new StringResource('content_from_link', this.stringsLoader_1);
    this.import_from_file_1 = new StringResource('import_from_file', this.stringsLoader_1);
    this.import_from_link_1 = new StringResource('import_from_link', this.stringsLoader_1);
    this.import_content_1 = new StringResource('import_content', this.stringsLoader_1);
    this.update_content_1 = new StringResource('update_content', this.stringsLoader_1);
    this.publicly_accessible_1 = new StringResource('publicly_accessible', this.stringsLoader_1);
    this.title_1 = new StringResource('title', this.stringsLoader_1);
    this.licence_1 = new StringResource('licence', this.stringsLoader_1);
    this.ebook_1 = new StringResource('ebook', this.stringsLoader_1);
    this.interactive_1 = new StringResource('interactive', this.stringsLoader_1);
    this.collection_1 = new StringResource('collection', this.stringsLoader_1);
    this.document_1 = new StringResource('document', this.stringsLoader_1);
    this.article_1 = new StringResource('article', this.stringsLoader_1);
    this.audio_1 = new StringResource('audio', this.stringsLoader_1);
    this.move_1 = new StringResource('move', this.stringsLoader_1);
    this.hide_1 = new StringResource('hide', this.stringsLoader_1);
    this.unhide_1 = new StringResource('unhide', this.stringsLoader_1);
    this.compress_1 = new StringResource('compress', this.stringsLoader_1);
    this.and_key_1 = new StringResource('and_key', this.stringsLoader_1);
    this.added_1 = new StringResource('added', this.stringsLoader_1);
    this.attempts_1 = new StringResource('attempts', this.stringsLoader_1);
    this.add_link_description_1 = new StringResource('add_link_description', this.stringsLoader_1);
    this.add_gallery_description_1 = new StringResource('add_gallery_description', this.stringsLoader_1);
    this.add_file_description_1 = new StringResource('add_file_description', this.stringsLoader_1);
    this.error_this_device_doesnt_support_bluetooth_sharing_1 = new StringResource('error_this_device_doesnt_support_bluetooth_sharing', this.stringsLoader_1);
    this.share_offline_zip_checkbox_label_1 = new StringResource('share_offline_zip_checkbox_label', this.stringsLoader_1);
    this.share_offline_dialog_message_1 = new StringResource('share_offline_dialog_message', this.stringsLoader_1);
    this.preparing_1 = new StringResource('preparing', this.stringsLoader_1);
    this.fixed_date_1 = new StringResource('fixed_date', this.stringsLoader_1);
    this.relative_date_1 = new StringResource('relative_date', this.stringsLoader_1);
    this.field_required_prompt_1 = new StringResource('field_required_prompt', this.stringsLoader_1);
    this.field_password_error_min_1 = new StringResource('field_password_error_min', this.stringsLoader_1);
    this.filed_password_no_match_1 = new StringResource('filed_password_no_match', this.stringsLoader_1);
    this.update_1 = new StringResource('update', this.stringsLoader_1);
    this.profile_1 = new StringResource('profile', this.stringsLoader_1);
    this.dialog_download_from_playstore_message_1 = new StringResource('dialog_download_from_playstore_message', this.stringsLoader_1);
    this.dialog_download_from_playstore_ok_1 = new StringResource('dialog_download_from_playstore_ok', this.stringsLoader_1);
    this.dialog_download_from_playstore_cancel_1 = new StringResource('dialog_download_from_playstore_cancel', this.stringsLoader_1);
    this.accept_1 = new StringResource('accept', this.stringsLoader_1);
    this.also_available_in_1 = new StringResource('also_available_in', this.stringsLoader_1);
    this.created_partnership_1 = new StringResource('created_partnership', this.stringsLoader_1);
    this.onboarding_get_started_label_1 = new StringResource('onboarding_get_started_label', this.stringsLoader_1);
    this.lets_get_started_label_1 = new StringResource('lets_get_started_label', this.stringsLoader_1);
    this.onboarding_headline1__1 = new StringResource('onboarding_headline1', this.stringsLoader_1);
    this.onboarding_subheadline1__1 = new StringResource('onboarding_subheadline1', this.stringsLoader_1);
    this.onboarding_headline2__1 = new StringResource('onboarding_headline2', this.stringsLoader_1);
    this.onboarding_subheadline2__1 = new StringResource('onboarding_subheadline2', this.stringsLoader_1);
    this.onboarding_headline3__1 = new StringResource('onboarding_headline3', this.stringsLoader_1);
    this.onboarding_subheadline3__1 = new StringResource('onboarding_subheadline3', this.stringsLoader_1);
    this.download_continue_stacked_label_1 = new StringResource('download_continue_stacked_label', this.stringsLoader_1);
    this.im_an_individual_learner_1 = new StringResource('im_an_individual_learner', this.stringsLoader_1);
    this.im_an_individual_learner_description_1 = new StringResource('im_an_individual_learner_description', this.stringsLoader_1);
    this.i_want_to_join_my_organization_school_1 = new StringResource('i_want_to_join_my_organization_school', this.stringsLoader_1);
    this.i_want_to_join_my_organization_school_description_1 = new StringResource('i_want_to_join_my_organization_school_description', this.stringsLoader_1);
    this.i_want_to_add_my_organization_school_1 = new StringResource('i_want_to_add_my_organization_school', this.stringsLoader_1);
    this.i_want_to_add_my_organization_school_description_1 = new StringResource('i_want_to_add_my_organization_school_description', this.stringsLoader_1);
    this.individual_action_title_1 = new StringResource('individual_action_title', this.stringsLoader_1);
    this.create_new_local_account_title_1 = new StringResource('create_new_local_account_title', this.stringsLoader_1);
    this.create_new_local_account_description_1 = new StringResource('create_new_local_account_description', this.stringsLoader_1);
    this.restore_local_account_title_1 = new StringResource('restore_local_account_title', this.stringsLoader_1);
    this.restore_local_account_description_1 = new StringResource('restore_local_account_description', this.stringsLoader_1);
    this.download_continue_btn_label_1 = new StringResource('download_continue_btn_label', this.stringsLoader_1);
    this.download_wifi_only_1 = new StringResource('download_wifi_only', this.stringsLoader_1);
    this.download_calculating_1 = new StringResource('download_calculating', this.stringsLoader_1);
    this.download_state_download_1 = new StringResource('download_state_download', this.stringsLoader_1);
    this.download_state_downloading_1 = new StringResource('download_state_downloading', this.stringsLoader_1);
    this.download_state_downloaded_1 = new StringResource('download_state_downloaded', this.stringsLoader_1);
    this.download_downloading_placeholder_1 = new StringResource('download_downloading_placeholder', this.stringsLoader_1);
    this.download_summary_title_1 = new StringResource('download_summary_title', this.stringsLoader_1);
    this.download_cancel_label_1 = new StringResource('download_cancel_label', this.stringsLoader_1);
    this.download_pause_download_1 = new StringResource('download_pause_download', this.stringsLoader_1);
    this.download_storage_option_device_1 = new StringResource('download_storage_option_device', this.stringsLoader_1);
    this.download_locally_availability_1 = new StringResource('download_locally_availability', this.stringsLoader_1);
    this.download_cloud_availability_1 = new StringResource('download_cloud_availability', this.stringsLoader_1);
    this.insufficient_space_1 = new StringResource('insufficient_space', this.stringsLoader_1);
    this.download_entry_state_paused_1 = new StringResource('download_entry_state_paused', this.stringsLoader_1);
    this.get_app_1 = new StringResource('get_app', this.stringsLoader_1);
    this.no_app_found_1 = new StringResource('no_app_found', this.stringsLoader_1);
    this.entry_details_author_1 = new StringResource('entry_details_author', this.stringsLoader_1);
    this.entry_details_publisher_1 = new StringResource('entry_details_publisher', this.stringsLoader_1);
    this.entry_details_license_1 = new StringResource('entry_details_license', this.stringsLoader_1);
    this.file_not_found_1 = new StringResource('file_not_found', this.stringsLoader_1);
    this.multiple_choice_1 = new StringResource('multiple_choice', this.stringsLoader_1);
    this.preview_1 = new StringResource('preview', this.stringsLoader_1);
    this.content_creation_storage_option_title_1 = new StringResource('content_creation_storage_option_title', this.stringsLoader_1);
    this.file_required_prompt_1 = new StringResource('file_required_prompt', this.stringsLoader_1);
    this.content_creation_folder_new_message_1 = new StringResource('content_creation_folder_new_message', this.stringsLoader_1);
    this.content_creation_folder_update_message_1 = new StringResource('content_creation_folder_update_message', this.stringsLoader_1);
    this.error_message_load_page_1 = new StringResource('error_message_load_page', this.stringsLoader_1);
    this.error_message_update_document_1 = new StringResource('error_message_update_document', this.stringsLoader_1);
    this.supported_files_1 = new StringResource('supported_files', this.stringsLoader_1);
    this.content_editor_save_error_1 = new StringResource('content_editor_save_error', this.stringsLoader_1);
    this.content_entry_export_inprogress_1 = new StringResource('content_entry_export_inprogress', this.stringsLoader_1);
    this.content_entry_export_message_1 = new StringResource('content_entry_export_message', this.stringsLoader_1);
    this.show_hidden_items_1 = new StringResource('show_hidden_items', this.stringsLoader_1);
    this.open_folder_1 = new StringResource('open_folder', this.stringsLoader_1);
    this.action_hidden_1 = new StringResource('action_hidden', this.stringsLoader_1);
    this.invalid_1 = new StringResource('invalid', this.stringsLoader_1);
    this.enter_register_code_1 = new StringResource('enter_register_code', this.stringsLoader_1);
    this.bar_chart_1 = new StringResource('bar_chart', this.stringsLoader_1);
    this.line_chart_1 = new StringResource('line_chart', this.stringsLoader_1);
    this.score_1 = new StringResource('score', this.stringsLoader_1);
    this.content_total_duration_1 = new StringResource('content_total_duration', this.stringsLoader_1);
    this.content_average_duration_1 = new StringResource('content_average_duration', this.stringsLoader_1);
    this.count_session_1 = new StringResource('count_session', this.stringsLoader_1);
    this.interaction_recorded_1 = new StringResource('interaction_recorded', this.stringsLoader_1);
    this.number_active_users_1 = new StringResource('number_active_users', this.stringsLoader_1);
    this.average_usage_time_per_user_1 = new StringResource('average_usage_time_per_user', this.stringsLoader_1);
    this.number_students_completed_1 = new StringResource('number_students_completed', this.stringsLoader_1);
    this.percent_students_completed_1 = new StringResource('percent_students_completed', this.stringsLoader_1);
    this.total_attendances_1 = new StringResource('total_attendances', this.stringsLoader_1);
    this.total_absences_1 = new StringResource('total_absences', this.stringsLoader_1);
    this.total_lates_1 = new StringResource('total_lates', this.stringsLoader_1);
    this.percent_students_attended_1 = new StringResource('percent_students_attended', this.stringsLoader_1);
    this.percent_students_attended_or_late_1 = new StringResource('percent_students_attended_or_late', this.stringsLoader_1);
    this.total_number_of_classes_1 = new StringResource('total_number_of_classes', this.stringsLoader_1);
    this.number_unique_students_attending_1 = new StringResource('number_unique_students_attending', this.stringsLoader_1);
    this.xapi_day_1 = new StringResource('xapi_day', this.stringsLoader_1);
    this.xapi_week_1 = new StringResource('xapi_week', this.stringsLoader_1);
    this.xapi_month_1 = new StringResource('xapi_month', this.stringsLoader_1);
    this.xapi_custom_date_1 = new StringResource('xapi_custom_date', this.stringsLoader_1);
    this.xapi_content_entry_1 = new StringResource('xapi_content_entry', this.stringsLoader_1);
    this.xapi_clear_1 = new StringResource('xapi_clear', this.stringsLoader_1);
    this.last_week_date_range_1 = new StringResource('last_week_date_range', this.stringsLoader_1);
    this.last_two_week_date_range_1 = new StringResource('last_two_week_date_range', this.stringsLoader_1);
    this.last_month_date_range_1 = new StringResource('last_month_date_range', this.stringsLoader_1);
    this.last_three_months_date_range_1 = new StringResource('last_three_months_date_range', this.stringsLoader_1);
    this.new_custom_date_range_1 = new StringResource('new_custom_date_range', this.stringsLoader_1);
    this.selected_custom_range_1 = new StringResource('selected_custom_range', this.stringsLoader_1);
    this.time_range_1 = new StringResource('time_range', this.stringsLoader_1);
    this.year_1 = new StringResource('year', this.stringsLoader_1);
    this.from_1 = new StringResource('from', this.stringsLoader_1);
    this.done_1 = new StringResource('done', this.stringsLoader_1);
    this.xapi_options_general_1 = new StringResource('xapi_options_general', this.stringsLoader_1);
    this.xapi_options_report_title_1 = new StringResource('xapi_options_report_title', this.stringsLoader_1);
    this.xapi_options_visual_type_1 = new StringResource('xapi_options_visual_type', this.stringsLoader_1);
    this.xapi_options_data_set_1 = new StringResource('xapi_options_data_set', this.stringsLoader_1);
    this.xapi_options_series_1 = new StringResource('xapi_options_series', this.stringsLoader_1);
    this.xapi_options_axes_1 = new StringResource('xapi_options_axes', this.stringsLoader_1);
    this.xapi_options_y_axes_1 = new StringResource('xapi_options_y_axes', this.stringsLoader_1);
    this.xapi_options_x_axes_1 = new StringResource('xapi_options_x_axes', this.stringsLoader_1);
    this.xapi_options_subgroup_1 = new StringResource('xapi_options_subgroup', this.stringsLoader_1);
    this.xapi_options_filters_1 = new StringResource('xapi_options_filters', this.stringsLoader_1);
    this.xapi_options_who_1 = new StringResource('xapi_options_who', this.stringsLoader_1);
    this.xapi_options_did_1 = new StringResource('xapi_options_did', this.stringsLoader_1);
    this.xapi_options_what_1 = new StringResource('xapi_options_what', this.stringsLoader_1);
    this.xapi_options_when_1 = new StringResource('xapi_options_when', this.stringsLoader_1);
    this.xapi_options_where_1 = new StringResource('xapi_options_where', this.stringsLoader_1);
    this.time_range_all_1 = new StringResource('time_range_all', this.stringsLoader_1);
    this.report_filter_edit_field_1 = new StringResource('report_filter_edit_field', this.stringsLoader_1);
    this.report_filter_edit_condition_1 = new StringResource('report_filter_edit_condition', this.stringsLoader_1);
    this.report_filter_edit_values_1 = new StringResource('report_filter_edit_values', this.stringsLoader_1);
    this.report_1 = new StringResource('report', this.stringsLoader_1);
    this.create_a_new_report_1 = new StringResource('create_a_new_report', this.stringsLoader_1);
    this.edit_report_1 = new StringResource('edit_report', this.stringsLoader_1);
    this.verb_1 = new StringResource('verb', this.stringsLoader_1);
    this.add_a_new_verb_1 = new StringResource('add_a_new_verb', this.stringsLoader_1);
    this.id_verbentity_urlid_1 = new StringResource('id_verbentity_urlid', this.stringsLoader_1);
    this.edit_filters_1 = new StringResource('edit_filters', this.stringsLoader_1);
    this.field_person_gender_1 = new StringResource('field_person_gender', this.stringsLoader_1);
    this.field_person_age_1 = new StringResource('field_person_age', this.stringsLoader_1);
    this.field_content_completion_1 = new StringResource('field_content_completion', this.stringsLoader_1);
    this.field_content_entry_1 = new StringResource('field_content_entry', this.stringsLoader_1);
    this.field_content_progress_1 = new StringResource('field_content_progress', this.stringsLoader_1);
    this.field_attendance_percentage_1 = new StringResource('field_attendance_percentage', this.stringsLoader_1);
    this.condition_is_1 = new StringResource('condition_is', this.stringsLoader_1);
    this.condition_is_not_1 = new StringResource('condition_is_not', this.stringsLoader_1);
    this.condition_greater_than_1 = new StringResource('condition_greater_than', this.stringsLoader_1);
    this.condition_less_than_1 = new StringResource('condition_less_than', this.stringsLoader_1);
    this.condition_in_list_1 = new StringResource('condition_in_list', this.stringsLoader_1);
    this.condition_not_in_list_1 = new StringResource('condition_not_in_list', this.stringsLoader_1);
    this.condition_between_1 = new StringResource('condition_between', this.stringsLoader_1);
    this.add_person_filter_1 = new StringResource('add_person_filter', this.stringsLoader_1);
    this.add_verb_filter_1 = new StringResource('add_verb_filter', this.stringsLoader_1);
    this.add_content_filter_1 = new StringResource('add_content_filter', this.stringsLoader_1);
    this.dashboard_1 = new StringResource('dashboard', this.stringsLoader_1);
    this.activity_import_link_1 = new StringResource('activity_import_link', this.stringsLoader_1);
    this.xapi_hours_1 = new StringResource('xapi_hours', this.stringsLoader_1);
    this.xapi_minutes_1 = new StringResource('xapi_minutes', this.stringsLoader_1);
    this.xapi_seconds_1 = new StringResource('xapi_seconds', this.stringsLoader_1);
    this.xapi_verb_header_1 = new StringResource('xapi_verb_header', this.stringsLoader_1);
    this.xapi_result_header_1 = new StringResource('xapi_result_header', this.stringsLoader_1);
    this.xapi_score_1 = new StringResource('xapi_score', this.stringsLoader_1);
    this.content_score_1 = new StringResource('content_score', this.stringsLoader_1);
    this.completion_key_1 = new StringResource('completion_key', this.stringsLoader_1);
    this.import_title_not_entered_1 = new StringResource('import_title_not_entered', this.stringsLoader_1);
    this.no_account_1 = new StringResource('no_account', this.stringsLoader_1);
    this.enter_url_1 = new StringResource('enter_url', this.stringsLoader_1);
    this.invalid_link_1 = new StringResource('invalid_link', this.stringsLoader_1);
    this.invalid_file_1 = new StringResource('invalid_file', this.stringsLoader_1);
    this.import_link_content_not_supported_1 = new StringResource('import_link_content_not_supported', this.stringsLoader_1);
    this.unsupported_file_type_1 = new StringResource('unsupported_file_type', this.stringsLoader_1);
    this.import_link_big_size_1 = new StringResource('import_link_big_size', this.stringsLoader_1);
    this.import_link_error_1 = new StringResource('import_link_error', this.stringsLoader_1);
    this.supported_link_1 = new StringResource('supported_link', this.stringsLoader_1);
    this.offline_sharing_enable_bluetooth_prompt_1 = new StringResource('offline_sharing_enable_bluetooth_prompt', this.stringsLoader_1);
    this.offline_sharing_enable_wifi_promot_1 = new StringResource('offline_sharing_enable_wifi_promot', this.stringsLoader_1);
    this.enable_1 = new StringResource('enable', this.stringsLoader_1);
    this.repo_loading_status_loading_cloud_1 = new StringResource('repo_loading_status_loading_cloud', this.stringsLoader_1);
    this.repo_loading_status_loading_mirror_1 = new StringResource('repo_loading_status_loading_mirror', this.stringsLoader_1);
    this.repo_loading_status_failed_noconnection_1 = new StringResource('repo_loading_status_failed_noconnection', this.stringsLoader_1);
    this.repo_loading_status_failed_connection_error_1 = new StringResource('repo_loading_status_failed_connection_error', this.stringsLoader_1);
    this.licence_type_cc_by_1 = new StringResource('licence_type_cc_by', this.stringsLoader_1);
    this.licence_type_cc_by_sa_1 = new StringResource('licence_type_cc_by_sa', this.stringsLoader_1);
    this.licence_type_cc_by_sa_nc_1 = new StringResource('licence_type_cc_by_sa_nc', this.stringsLoader_1);
    this.licence_type_cc_by_nc_1 = new StringResource('licence_type_cc_by_nc', this.stringsLoader_1);
    this.licence_type_cc_by_nc_sa_1 = new StringResource('licence_type_cc_by_nc_sa', this.stringsLoader_1);
    this.licence_type_public_domain_1 = new StringResource('licence_type_public_domain', this.stringsLoader_1);
    this.licence_type_all_rights_1 = new StringResource('licence_type_all_rights', this.stringsLoader_1);
    this.license_type_cc_0__1 = new StringResource('license_type_cc_0', this.stringsLoader_1);
    this.syncing_1 = new StringResource('syncing', this.stringsLoader_1);
    this.feed_1 = new StringResource('feed', this.stringsLoader_1);
    this.people_1 = new StringResource('people', this.stringsLoader_1);
    this.record_attendance_1 = new StringResource('record_attendance', this.stringsLoader_1);
    this.today_1 = new StringResource('today', this.stringsLoader_1);
    this.sort_by_1 = new StringResource('sort_by', this.stringsLoader_1);
    this.log_1 = new StringResource('log', this.stringsLoader_1);
    this.schedule_1 = new StringResource('schedule', this.stringsLoader_1);
    this.add_a_schedule_1 = new StringResource('add_a_schedule', this.stringsLoader_1);
    this.edit_schedule_1 = new StringResource('edit_schedule', this.stringsLoader_1);
    this.first_key_1 = new StringResource('first_key', this.stringsLoader_1);
    this.last_key_1 = new StringResource('last_key', this.stringsLoader_1);
    this.last_week_1 = new StringResource('last_week', this.stringsLoader_1);
    this.mark_all_1 = new StringResource('mark_all', this.stringsLoader_1);
    this.mark_all_present_1 = new StringResource('mark_all_present', this.stringsLoader_1);
    this.mark_all_absent_1 = new StringResource('mark_all_absent', this.stringsLoader_1);
    this.present_1 = new StringResource('present', this.stringsLoader_1);
    this.absent_1 = new StringResource('absent', this.stringsLoader_1);
    this.attendance_report_1 = new StringResource('attendance_report', this.stringsLoader_1);
    this.father_1 = new StringResource('father', this.stringsLoader_1);
    this.mother_1 = new StringResource('mother', this.stringsLoader_1);
    this.birthday_1 = new StringResource('birthday', this.stringsLoader_1);
    this.first_names_1 = new StringResource('first_names', this.stringsLoader_1);
    this.basic_details_1 = new StringResource('basic_details', this.stringsLoader_1);
    this.address_1 = new StringResource('address', this.stringsLoader_1);
    this.add_person_to_class_1 = new StringResource('add_person_to_class', this.stringsLoader_1);
    this.edit_1 = new StringResource('edit', this.stringsLoader_1);
    this.clazz_1 = new StringResource('clazz', this.stringsLoader_1);
    this.add_a_new_class_1 = new StringResource('add_a_new_class', this.stringsLoader_1);
    this.edit_clazz_1 = new StringResource('edit_clazz', this.stringsLoader_1);
    this.add_a_class_1 = new StringResource('add_a_class', this.stringsLoader_1);
    this.join_existing_class_1 = new StringResource('join_existing_class', this.stringsLoader_1);
    this.student_image_1 = new StringResource('student_image', this.stringsLoader_1);
    this.question_key_1 = new StringResource('question_key', this.stringsLoader_1);
    this.add_question_1 = new StringResource('add_question', this.stringsLoader_1);
    this.edit_question_1 = new StringResource('edit_question', this.stringsLoader_1);
    this.questions_1 = new StringResource('questions', this.stringsLoader_1);
    this.add_person_1 = new StringResource('add_person', this.stringsLoader_1);
    this.add_class_1 = new StringResource('add_class', this.stringsLoader_1);
    this.class_name_1 = new StringResource('class_name', this.stringsLoader_1);
    this.class_description_1 = new StringResource('class_description', this.stringsLoader_1);
    this.to_key_1 = new StringResource('to_key', this.stringsLoader_1);
    this.holiday_1 = new StringResource('holiday', this.stringsLoader_1);
    this.add_a_holiday_1 = new StringResource('add_a_holiday', this.stringsLoader_1);
    this.edit_holiday_1 = new StringResource('edit_holiday', this.stringsLoader_1);
    this.holidays_1 = new StringResource('holidays', this.stringsLoader_1);
    this.holiday_calendar_1 = new StringResource('holiday_calendar', this.stringsLoader_1);
    this.add_a_new_holiday_calendar_1 = new StringResource('add_a_new_holiday_calendar', this.stringsLoader_1);
    this.edit_holiday_calendar_1 = new StringResource('edit_holiday_calendar', this.stringsLoader_1);
    this.features_enabled_1 = new StringResource('features_enabled', this.stringsLoader_1);
    this.weekly_1 = new StringResource('weekly', this.stringsLoader_1);
    this.once_1 = new StringResource('once', this.stringsLoader_1);
    this.daily_1 = new StringResource('daily', this.stringsLoader_1);
    this.monthly_1 = new StringResource('monthly', this.stringsLoader_1);
    this.yearly_1 = new StringResource('yearly', this.stringsLoader_1);
    this.sunday_1 = new StringResource('sunday', this.stringsLoader_1);
    this.monday_1 = new StringResource('monday', this.stringsLoader_1);
    this.tuesday_1 = new StringResource('tuesday', this.stringsLoader_1);
    this.wednesday_1 = new StringResource('wednesday', this.stringsLoader_1);
    this.thursday_1 = new StringResource('thursday', this.stringsLoader_1);
    this.friday_1 = new StringResource('friday', this.stringsLoader_1);
    this.saturday_1 = new StringResource('saturday', this.stringsLoader_1);
    this.day_1 = new StringResource('day', this.stringsLoader_1);
    this.toC_1 = new StringResource('toC', this.stringsLoader_1);
    this.last_month_1 = new StringResource('last_month', this.stringsLoader_1);
    this.activity_change_1 = new StringResource('activity_change', this.stringsLoader_1);
    this.change_implemented_if_any_1 = new StringResource('change_implemented_if_any', this.stringsLoader_1);
    this.duration_1 = new StringResource('duration', this.stringsLoader_1);
    this.how_did_it_go_1 = new StringResource('how_did_it_go', this.stringsLoader_1);
    this.notes_1 = new StringResource('notes', this.stringsLoader_1);
    this.activity_1 = new StringResource('activity', this.stringsLoader_1);
    this.sort_by_name_1 = new StringResource('sort_by_name', this.stringsLoader_1);
    this.sort_by_name_asc_1 = new StringResource('sort_by_name_asc', this.stringsLoader_1);
    this.sort_by_name_desc_1 = new StringResource('sort_by_name_desc', this.stringsLoader_1);
    this.date_enroll_1 = new StringResource('date_enroll', this.stringsLoader_1);
    this.date_left_1 = new StringResource('date_left', this.stringsLoader_1);
    this.enroled_1 = new StringResource('enroled', this.stringsLoader_1);
    this.class_enrolment_1 = new StringResource('class_enrolment', this.stringsLoader_1);
    this.graduated_1 = new StringResource('graduated', this.stringsLoader_1);
    this.dropped_out_1 = new StringResource('dropped_out', this.stringsLoader_1);
    this.moved_1 = new StringResource('moved', this.stringsLoader_1);
    this.new_leaving_reason_1 = new StringResource('new_leaving_reason', this.stringsLoader_1);
    this.edit_leaving_reason_1 = new StringResource('edit_leaving_reason', this.stringsLoader_1);
    this.edit_enrolment_1 = new StringResource('edit_enrolment', this.stringsLoader_1);
    this.new_enrolment_1 = new StringResource('new_enrolment', this.stringsLoader_1);
    this.select_leaving_reason_1 = new StringResource('select_leaving_reason', this.stringsLoader_1);
    this.add_leaving_reason_1 = new StringResource('add_leaving_reason', this.stringsLoader_1);
    this.leaving_reason_1 = new StringResource('leaving_reason', this.stringsLoader_1);
    this.leaving_reasons_1 = new StringResource('leaving_reasons', this.stringsLoader_1);
    this.leaving_reason_manage_1 = new StringResource('leaving_reason_manage', this.stringsLoader_1);
    this.view_profile_1 = new StringResource('view_profile', this.stringsLoader_1);
    this.class_enrolment_outcome_1 = new StringResource('class_enrolment_outcome', this.stringsLoader_1);
    this.class_enrolment_leaving_1 = new StringResource('class_enrolment_leaving', this.stringsLoader_1);
    this.in_progress_1 = new StringResource('in_progress', this.stringsLoader_1);
    this.outcome_1 = new StringResource('outcome', this.stringsLoader_1);
    this.person_enrolment_in_class_1 = new StringResource('person_enrolment_in_class', this.stringsLoader_1);
    this.enrolment_1 = new StringResource('enrolment', this.stringsLoader_1);
    this.error_start_date_before_clazz_date_1 = new StringResource('error_start_date_before_clazz_date', this.stringsLoader_1);
    this.error_start_date_before_previous_enrolment_date_1 = new StringResource('error_start_date_before_previous_enrolment_date', this.stringsLoader_1);
    this.time_present_1 = new StringResource('time_present', this.stringsLoader_1);
    this.ascending_1 = new StringResource('ascending', this.stringsLoader_1);
    this.descending_1 = new StringResource('descending', this.stringsLoader_1);
    this.sort_by_text_1 = new StringResource('sort_by_text', this.stringsLoader_1);
    this.attendance_high_to_low_1 = new StringResource('attendance_high_to_low', this.stringsLoader_1);
    this.attendance_low_to_high_1 = new StringResource('attendance_low_to_high', this.stringsLoader_1);
    this.teacher_1 = new StringResource('teacher', this.stringsLoader_1);
    this.add_a_teacher_1 = new StringResource('add_a_teacher', this.stringsLoader_1);
    this.partial_1 = new StringResource('partial', this.stringsLoader_1);
    this.teachers_literal_1 = new StringResource('teachers_literal', this.stringsLoader_1);
    this.participant_1 = new StringResource('participant', this.stringsLoader_1);
    this.primary_user_1 = new StringResource('primary_user', this.stringsLoader_1);
    this.up_key_1 = new StringResource('up_key', this.stringsLoader_1);
    this.down_key_1 = new StringResource('down_key', this.stringsLoader_1);
    this.activity_went_good_1 = new StringResource('activity_went_good', this.stringsLoader_1);
    this.activity_went_bad_1 = new StringResource('activity_went_bad', this.stringsLoader_1);
    this.activity_enter_any_notes_1 = new StringResource('activity_enter_any_notes', this.stringsLoader_1);
    this.uom_frequency_title_1 = new StringResource('uom_frequency_title', this.stringsLoader_1);
    this.uom_duration_title_1 = new StringResource('uom_duration_title', this.stringsLoader_1);
    this.uom_boolean_title_1 = new StringResource('uom_boolean_title', this.stringsLoader_1);
    this.uom_default_title_1 = new StringResource('uom_default_title', this.stringsLoader_1);
    this.add_activity_1 = new StringResource('add_activity', this.stringsLoader_1);
    this.add_activity_literal_1 = new StringResource('add_activity_literal', this.stringsLoader_1);
    this.select_one_1 = new StringResource('select_one', this.stringsLoader_1);
    this.measurement_type_1 = new StringResource('measurement_type', this.stringsLoader_1);
    this.frequency_1 = new StringResource('frequency', this.stringsLoader_1);
    this.yes_no_1 = new StringResource('yes_no', this.stringsLoader_1);
    this.time_period_1 = new StringResource('time_period', this.stringsLoader_1);
    this.location_1 = new StringResource('location', this.stringsLoader_1);
    this.last_three_months_1 = new StringResource('last_three_months', this.stringsLoader_1);
    this.export_1 = new StringResource('export', this.stringsLoader_1);
    this.date_1 = new StringResource('date', this.stringsLoader_1);
    this.average_1 = new StringResource('average', this.stringsLoader_1);
    this.age_1 = new StringResource('age', this.stringsLoader_1);
    this.days_1 = new StringResource('days', this.stringsLoader_1);
    this.apply_1 = new StringResource('apply', this.stringsLoader_1);
    this.file_selected_1 = new StringResource('file_selected', this.stringsLoader_1);
    this.all_1 = new StringResource('all', this.stringsLoader_1);
    this.holiday_calendars_1 = new StringResource('holiday_calendars', this.stringsLoader_1);
    this.holiday_calendars_desc_1 = new StringResource('holiday_calendars_desc', this.stringsLoader_1);
    this.sel_question_set_1 = new StringResource('sel_question_set', this.stringsLoader_1);
    this.sel_question_set_desc_1 = new StringResource('sel_question_set_desc', this.stringsLoader_1);
    this.users_1 = new StringResource('users', this.stringsLoader_1);
    this.nomination_1 = new StringResource('nomination', this.stringsLoader_1);
    this.active_1 = new StringResource('active', this.stringsLoader_1);
    this.class_id_1 = new StringResource('class_id', this.stringsLoader_1);
    this.gender_literal_1 = new StringResource('gender_literal', this.stringsLoader_1);
    this.country_1 = new StringResource('country', this.stringsLoader_1);
    this.connectivity_1 = new StringResource('connectivity', this.stringsLoader_1);
    this.home_internet_access_1 = new StringResource('home_internet_access', this.stringsLoader_1);
    this.mobile_internet_access_1 = new StringResource('mobile_internet_access', this.stringsLoader_1);
    this.connectivity_limited_1 = new StringResource('connectivity_limited', this.stringsLoader_1);
    this.connectivity_full_1 = new StringResource('connectivity_full', this.stringsLoader_1);
    this.prefer_not_to_say_1 = new StringResource('prefer_not_to_say', this.stringsLoader_1);
    this.sel_question_set_to_use_1 = new StringResource('sel_question_set_to_use', this.stringsLoader_1);
    this.search_1 = new StringResource('search', this.stringsLoader_1);
    this.attendance_percentage_1 = new StringResource('attendance_percentage', this.stringsLoader_1);
    this.filter_1 = new StringResource('filter', this.stringsLoader_1);
    this.over_key_1 = new StringResource('over_key', this.stringsLoader_1);
    this.sync_1 = new StringResource('sync', this.stringsLoader_1);
    this.not_recorded_1 = new StringResource('not_recorded', this.stringsLoader_1);
    this.groups_1 = new StringResource('groups', this.stringsLoader_1);
    this.group_setting_desc_1 = new StringResource('group_setting_desc', this.stringsLoader_1);
    this.roles_1 = new StringResource('roles', this.stringsLoader_1);
    this.role_1 = new StringResource('role', this.stringsLoader_1);
    this.add_a_new_role_1 = new StringResource('add_a_new_role', this.stringsLoader_1);
    this.edit_role_1 = new StringResource('edit_role', this.stringsLoader_1);
    this.rols_assignment_1 = new StringResource('rols_assignment', this.stringsLoader_1);
    this.role_assignment_setting_desc_1 = new StringResource('role_assignment_setting_desc', this.stringsLoader_1);
    this.locations_1 = new StringResource('locations', this.stringsLoader_1);
    this.locations_setting_desc_1 = new StringResource('locations_setting_desc', this.stringsLoader_1);
    this.audit_log_1 = new StringResource('audit_log', this.stringsLoader_1);
    this.audit_log_setting_desc_1 = new StringResource('audit_log_setting_desc', this.stringsLoader_1);
    this.entry_key_1 = new StringResource('entry_key', this.stringsLoader_1);
    this.permission_key_1 = new StringResource('permission_key', this.stringsLoader_1);
    this.permissions_1 = new StringResource('permissions', this.stringsLoader_1);
    this.role_name_1 = new StringResource('role_name', this.stringsLoader_1);
    this.members_key_1 = new StringResource('members_key', this.stringsLoader_1);
    this.member_key_1 = new StringResource('member_key', this.stringsLoader_1);
    this.role_assignment_1 = new StringResource('role_assignment', this.stringsLoader_1);
    this.scope_by_1 = new StringResource('scope_by', this.stringsLoader_1);
    this.assign_to_1 = new StringResource('assign_to', this.stringsLoader_1);
    this.person_1 = new StringResource('person', this.stringsLoader_1);
    this.add_a_new_person_1 = new StringResource('add_a_new_person', this.stringsLoader_1);
    this.edit_person_1 = new StringResource('edit_person', this.stringsLoader_1);
    this.permission_person_select_1 = new StringResource('permission_person_select', this.stringsLoader_1);
    this.permission_person_insert_1 = new StringResource('permission_person_insert', this.stringsLoader_1);
    this.permission_person_update_1 = new StringResource('permission_person_update', this.stringsLoader_1);
    this.permission_person_picture_select_1 = new StringResource('permission_person_picture_select', this.stringsLoader_1);
    this.permission_person_picture_insert_1 = new StringResource('permission_person_picture_insert', this.stringsLoader_1);
    this.permission_person_picture_update_1 = new StringResource('permission_person_picture_update', this.stringsLoader_1);
    this.permission_clazz_select_1 = new StringResource('permission_clazz_select', this.stringsLoader_1);
    this.permission_clazz_insert_1 = new StringResource('permission_clazz_insert', this.stringsLoader_1);
    this.permission_clazz_update_1 = new StringResource('permission_clazz_update', this.stringsLoader_1);
    this.permission_clazz_add_teacher_1 = new StringResource('permission_clazz_add_teacher', this.stringsLoader_1);
    this.permission_clazz_add_student_1 = new StringResource('permission_clazz_add_student', this.stringsLoader_1);
    this.permission_attendance_select_1 = new StringResource('permission_attendance_select', this.stringsLoader_1);
    this.permission_attendance_insert_1 = new StringResource('permission_attendance_insert', this.stringsLoader_1);
    this.permission_attendance_update_1 = new StringResource('permission_attendance_update', this.stringsLoader_1);
    this.permission_activity_select_1 = new StringResource('permission_activity_select', this.stringsLoader_1);
    this.permission_activity_insert_1 = new StringResource('permission_activity_insert', this.stringsLoader_1);
    this.permission_activity_update_1 = new StringResource('permission_activity_update', this.stringsLoader_1);
    this.permission_sel_question_select_1 = new StringResource('permission_sel_question_select', this.stringsLoader_1);
    this.permission_sel_question_insert_1 = new StringResource('permission_sel_question_insert', this.stringsLoader_1);
    this.permission_sel_question_update_1 = new StringResource('permission_sel_question_update', this.stringsLoader_1);
    this.permission_sel_select_1 = new StringResource('permission_sel_select', this.stringsLoader_1);
    this.permission_sel_update_1 = new StringResource('permission_sel_update', this.stringsLoader_1);
    this.custom_fields_1 = new StringResource('custom_fields', this.stringsLoader_1);
    this.custom_field_1 = new StringResource('custom_field', this.stringsLoader_1);
    this.custom_fields_desc_1 = new StringResource('custom_fields_desc', this.stringsLoader_1);
    this.field_type_1 = new StringResource('field_type', this.stringsLoader_1);
    this.text_1 = new StringResource('text', this.stringsLoader_1);
    this.dropdown_1 = new StringResource('dropdown', this.stringsLoader_1);
    this.options_1 = new StringResource('options', this.stringsLoader_1);
    this.option_value_1 = new StringResource('option_value', this.stringsLoader_1);
    this.errors_1 = new StringResource('errors', this.stringsLoader_1);
    this.shake_feedback_1 = new StringResource('shake_feedback', this.stringsLoader_1);
    this.feedback_hint_1 = new StringResource('feedback_hint', this.stringsLoader_1);
    this.send_feedback_1 = new StringResource('send_feedback', this.stringsLoader_1);
    this.feedback_thanks_1 = new StringResource('feedback_thanks', this.stringsLoader_1);
    this.start_date_1 = new StringResource('start_date', this.stringsLoader_1);
    this.end_date_1 = new StringResource('end_date', this.stringsLoader_1);
    this.last_active_1 = new StringResource('last_active', this.stringsLoader_1);
    this.save_1 = new StringResource('save', this.stringsLoader_1);
    this.change_password_1 = new StringResource('change_password', this.stringsLoader_1);
    this.current_password_1 = new StringResource('current_password', this.stringsLoader_1);
    this.password_unchanged_1 = new StringResource('password_unchanged', this.stringsLoader_1);
    this.timezone_1 = new StringResource('timezone', this.stringsLoader_1);
    this.users_settings_desc_1 = new StringResource('users_settings_desc', this.stringsLoader_1);
    this.add_1 = new StringResource('add', this.stringsLoader_1);
    this.refresh_1 = new StringResource('refresh', this.stringsLoader_1);
    this.school_1 = new StringResource('school', this.stringsLoader_1);
    this.add_a_new_school_1 = new StringResource('add_a_new_school', this.stringsLoader_1);
    this.edit_school_1 = new StringResource('edit_school', this.stringsLoader_1);
    this.join_existing_school_1 = new StringResource('join_existing_school', this.stringsLoader_1);
    this.schools_1 = new StringResource('schools', this.stringsLoader_1);
    this.assignments_1 = new StringResource('assignments', this.stringsLoader_1);
    this.assignment_1 = new StringResource('assignment', this.stringsLoader_1);
    this.none_key_1 = new StringResource('none_key', this.stringsLoader_1);
    this.instructions_for_students_1 = new StringResource('instructions_for_students', this.stringsLoader_1);
    this.not_started_1 = new StringResource('not_started', this.stringsLoader_1);
    this.percentage_complete_1 = new StringResource('percentage_complete', this.stringsLoader_1);
    this.percentage_score_1 = new StringResource('percentage_score', this.stringsLoader_1);
    this.started_date_1 = new StringResource('started_date', this.stringsLoader_1);
    this.started_1 = new StringResource('started', this.stringsLoader_1);
    this.mixed_1 = new StringResource('mixed', this.stringsLoader_1);
    this.store_title_1 = new StringResource('store_title', this.stringsLoader_1);
    this.store_description_short_1 = new StringResource('store_description_short', this.stringsLoader_1);
    this.store_description_full_1 = new StringResource('store_description_full', this.stringsLoader_1);
    this.due_date_1 = new StringResource('due_date', this.stringsLoader_1);
    this.content_1 = new StringResource('content', this.stringsLoader_1);
    this.add_new_content_1 = new StringResource('add_new_content', this.stringsLoader_1);
    this.add_content_1 = new StringResource('add_content', this.stringsLoader_1);
    this.student_progress_1 = new StringResource('student_progress', this.stringsLoader_1);
    this.status_1 = new StringResource('status', this.stringsLoader_1);
    this.use_device_language_1 = new StringResource('use_device_language', this.stringsLoader_1);
    this.select_item_1 = new StringResource('select_item', this.stringsLoader_1);
    this.from_to_date_1 = new StringResource('from_to_date', this.stringsLoader_1);
    this.num_items_with_name_1 = new StringResource('num_items_with_name', this.stringsLoader_1);
    this.num_items_with_name_with_comma_1 = new StringResource('num_items_with_name_with_comma', this.stringsLoader_1);
    this.add_to_1 = new StringResource('add_to', this.stringsLoader_1);
    this.remove_from_1 = new StringResource('remove_from', this.stringsLoader_1);
    this.change_photo_1 = new StringResource('change_photo', this.stringsLoader_1);
    this.remove_picture_1 = new StringResource('remove_picture', this.stringsLoader_1);
    this.take_new_photo_from_camera_1 = new StringResource('take_new_photo_from_camera', this.stringsLoader_1);
    this.select_picture_from_gallery_1 = new StringResource('select_picture_from_gallery', this.stringsLoader_1);
    this.select_file_1 = new StringResource('select_file', this.stringsLoader_1);
    this.permission_clazz_assignment_view_1 = new StringResource('permission_clazz_assignment_view', this.stringsLoader_1);
    this.permission_clazz_asignment_edit_1 = new StringResource('permission_clazz_asignment_edit', this.stringsLoader_1);
    this.overview_1 = new StringResource('overview', this.stringsLoader_1);
    this.add_new_1 = new StringResource('add_new', this.stringsLoader_1);
    this.staff_1 = new StringResource('staff', this.stringsLoader_1);
    this.x_teachers_y_students_1 = new StringResource('x_teachers_y_students', this.stringsLoader_1);
    this.call_1 = new StringResource('call', this.stringsLoader_1);
    this.organization_id_1 = new StringResource('organization_id', this.stringsLoader_1);
    this.student_1 = new StringResource('student', this.stringsLoader_1);
    this.contact_details_1 = new StringResource('contact_details', this.stringsLoader_1);
    this.untitled_1 = new StringResource('untitled', this.stringsLoader_1);
    this.present_late_absent_1 = new StringResource('present_late_absent', this.stringsLoader_1);
    this.marked_cap_1 = new StringResource('marked_cap', this.stringsLoader_1);
    this.submitted_cap_1 = new StringResource('submitted_cap', this.stringsLoader_1);
    this.not_submitted_cap_1 = new StringResource('not_submitted_cap', this.stringsLoader_1);
    this.submitliteral_1 = new StringResource('submitliteral', this.stringsLoader_1);
    this.x_percent_attended_1 = new StringResource('x_percent_attended', this.stringsLoader_1);
    this.answer_1 = new StringResource('answer', this.stringsLoader_1);
    this.of_content_1 = new StringResource('of_content', this.stringsLoader_1);
    this.nothing_here_1 = new StringResource('nothing_here', this.stringsLoader_1);
    this.not_answered_1 = new StringResource('not_answered', this.stringsLoader_1);
    this.clazz_work_1 = new StringResource('clazz_work', this.stringsLoader_1);
    this.add_a_new_clazzwork_1 = new StringResource('add_a_new_clazzwork', this.stringsLoader_1);
    this.edit_clazzwork_1 = new StringResource('edit_clazzwork', this.stringsLoader_1);
    this.clazz_assignment_1 = new StringResource('clazz_assignment', this.stringsLoader_1);
    this.new_assignment_1 = new StringResource('new_assignment', this.stringsLoader_1);
    this.edit_assignment_1 = new StringResource('edit_assignment', this.stringsLoader_1);
    this.total_score_1 = new StringResource('total_score', this.stringsLoader_1);
    this.late_submission_1 = new StringResource('late_submission', this.stringsLoader_1);
    this.mark_penalty_1 = new StringResource('mark_penalty', this.stringsLoader_1);
    this.late_submission_penalty_1 = new StringResource('late_submission_penalty', this.stringsLoader_1);
    this.end_of_grace_period_1 = new StringResource('end_of_grace_period', this.stringsLoader_1);
    this.allow_class_comments_1 = new StringResource('allow_class_comments', this.stringsLoader_1);
    this.after_deadline_date_error_1 = new StringResource('after_deadline_date_error', this.stringsLoader_1);
    this.points_1 = new StringResource('points', this.stringsLoader_1);
    this.minimum_score_1 = new StringResource('minimum_score', this.stringsLoader_1);
    this.automatic_1 = new StringResource('automatic', this.stringsLoader_1);
    this.student_marks_content_1 = new StringResource('student_marks_content', this.stringsLoader_1);
    this.completion_criteria_1 = new StringResource('completion_criteria', this.stringsLoader_1);
    this.mark_complete_1 = new StringResource('mark_complete', this.stringsLoader_1);
    this.late_penalty_1 = new StringResource('late_penalty', this.stringsLoader_1);
    this.marked_key_1 = new StringResource('marked_key', this.stringsLoader_1);
    this.submitted_key_1 = new StringResource('submitted_key', this.stringsLoader_1);
    this.not_submitted_1 = new StringResource('not_submitted', this.stringsLoader_1);
    this.visible_from_date_1 = new StringResource('visible_from_date', this.stringsLoader_1);
    this.submission_type_1 = new StringResource('submission_type', this.stringsLoader_1);
    this.no_submission_required_1 = new StringResource('no_submission_required', this.stringsLoader_1);
    this.short_text_1 = new StringResource('short_text', this.stringsLoader_1);
    this.attachment_1 = new StringResource('attachment', this.stringsLoader_1);
    this.quiz_1 = new StringResource('quiz', this.stringsLoader_1);
    this.allow_private_comments_from_students_1 = new StringResource('allow_private_comments_from_students', this.stringsLoader_1);
    this.deadline_1 = new StringResource('deadline', this.stringsLoader_1);
    this.class_timezone_1 = new StringResource('class_timezone', this.stringsLoader_1);
    this.maximum_score_1 = new StringResource('maximum_score', this.stringsLoader_1);
    this.quiz_questions_1 = new StringResource('quiz_questions', this.stringsLoader_1);
    this.time_1 = new StringResource('time', this.stringsLoader_1);
    this.submission_1 = new StringResource('submission', this.stringsLoader_1);
    this.public_comments_1 = new StringResource('public_comments', this.stringsLoader_1);
    this.private_comments_1 = new StringResource('private_comments', this.stringsLoader_1);
    this.submit_your_answer_1 = new StringResource('submit_your_answer', this.stringsLoader_1);
    this.add_class_comment_1 = new StringResource('add_class_comment', this.stringsLoader_1);
    this.add_private_comment_1 = new StringResource('add_private_comment', this.stringsLoader_1);
    this.class_comments_1 = new StringResource('class_comments', this.stringsLoader_1);
    this.submit_1 = new StringResource('submit', this.stringsLoader_1);
    this.three_num_items_with_name_with_comma_1 = new StringResource('three_num_items_with_name_with_comma', this.stringsLoader_1);
    this.marking_1 = new StringResource('marking', this.stringsLoader_1);
    this.return_and_mark_next_1 = new StringResource('return_and_mark_next', this.stringsLoader_1);
    this.return_only_1 = new StringResource('return_only', this.stringsLoader_1);
    this.workspace_1 = new StringResource('workspace', this.stringsLoader_1);
    this.organisation_1 = new StringResource('organisation', this.stringsLoader_1);
    this.use_public_library_site_1 = new StringResource('use_public_library_site', this.stringsLoader_1);
    this.create_site_1 = new StringResource('create_site', this.stringsLoader_1);
    this.connect_as_guest_1 = new StringResource('connect_as_guest', this.stringsLoader_1);
    this.create_account_1 = new StringResource('create_account', this.stringsLoader_1);
    this.my_1 = new StringResource('my', this.stringsLoader_1);
    this.add_another_1 = new StringResource('add_another', this.stringsLoader_1);
    this.logged_in_as_1 = new StringResource('logged_in_as', this.stringsLoader_1);
    this.person_exists_1 = new StringResource('person_exists', this.stringsLoader_1);
    this.username_too_short_1 = new StringResource('username_too_short', this.stringsLoader_1);
    this.username_too_long_1 = new StringResource('username_too_long', this.stringsLoader_1);
    this.username_starts_with_number_1 = new StringResource('username_starts_with_number', this.stringsLoader_1);
    this.invalid_username_1 = new StringResource('invalid_username', this.stringsLoader_1);
    this.incorrect_current_password_1 = new StringResource('incorrect_current_password', this.stringsLoader_1);
    this.sel_question_type_free_text_1 = new StringResource('sel_question_type_free_text', this.stringsLoader_1);
    this.sel_question_type_multiple_choice_1 = new StringResource('sel_question_type_multiple_choice', this.stringsLoader_1);
    this.question_text_1 = new StringResource('question_text', this.stringsLoader_1);
    this.question_type_1 = new StringResource('question_type', this.stringsLoader_1);
    this.add_option_1 = new StringResource('add_option', this.stringsLoader_1);
    this.roles_and_permissions_1 = new StringResource('roles_and_permissions', this.stringsLoader_1);
    this.add_role_permission_1 = new StringResource('add_role_permission', this.stringsLoader_1);
    this.scope_1 = new StringResource('scope', this.stringsLoader_1);
    this.scope_description_1 = new StringResource('scope_description', this.stringsLoader_1);
    this.role_description_1 = new StringResource('role_description', this.stringsLoader_1);
    this.assign_role_1 = new StringResource('assign_role', this.stringsLoader_1);
    this.more_information_1 = new StringResource('more_information', this.stringsLoader_1);
    this.pending_requests_1 = new StringResource('pending_requests', this.stringsLoader_1);
    this.pending_1 = new StringResource('pending', this.stringsLoader_1);
    this.please_wait_for_approval_1 = new StringResource('please_wait_for_approval', this.stringsLoader_1);
    this.reject_1 = new StringResource('reject', this.stringsLoader_1);
    this.ask_your_teacher_for_code_1 = new StringResource('ask_your_teacher_for_code', this.stringsLoader_1);
    this.copied_to_clipboard_1 = new StringResource('copied_to_clipboard', this.stringsLoader_1);
    this.invite_link_desc_1 = new StringResource('invite_link_desc', this.stringsLoader_1);
    this.copy_link_1 = new StringResource('copy_link', this.stringsLoader_1);
    this.copy_code_1 = new StringResource('copy_code', this.stringsLoader_1);
    this.share_link_1 = new StringResource('share_link', this.stringsLoader_1);
    this.invite_with_link_1 = new StringResource('invite_with_link', this.stringsLoader_1);
    this.role_not_selected_error_1 = new StringResource('role_not_selected_error', this.stringsLoader_1);
    this.permission_person_delegate_1 = new StringResource('permission_person_delegate', this.stringsLoader_1);
    this.this_field_is_mandatory_1 = new StringResource('this_field_is_mandatory', this.stringsLoader_1);
    this.permission_role_select_1 = new StringResource('permission_role_select', this.stringsLoader_1);
    this.permission_role_insert_1 = new StringResource('permission_role_insert', this.stringsLoader_1);
    this.permission_school_select_1 = new StringResource('permission_school_select', this.stringsLoader_1);
    this.permission_school_insert_1 = new StringResource('permission_school_insert', this.stringsLoader_1);
    this.permission_school_update_1 = new StringResource('permission_school_update', this.stringsLoader_1);
    this.add_student_to_school_1 = new StringResource('add_student_to_school', this.stringsLoader_1);
    this.add_staff_to_school_1 = new StringResource('add_staff_to_school', this.stringsLoader_1);
    this.permission_password_reset_1 = new StringResource('permission_password_reset', this.stringsLoader_1);
    this.school_code_1 = new StringResource('school_code', this.stringsLoader_1);
    this.invite_code_1 = new StringResource('invite_code', this.stringsLoader_1);
    this.entity_code_1 = new StringResource('entity_code', this.stringsLoader_1);
    this.join_code_instructions_1 = new StringResource('join_code_instructions', this.stringsLoader_1);
    this.record_for_student_1 = new StringResource('record_for_student', this.stringsLoader_1);
    this.moved_x_entries_1 = new StringResource('moved_x_entries', this.stringsLoader_1);
    this.end_is_before_start_error_1 = new StringResource('end_is_before_start_error', this.stringsLoader_1);
    this.record_attendance_for_most_recent_occurrence_1 = new StringResource('record_attendance_for_most_recent_occurrence', this.stringsLoader_1);
    this.add_a_new_occurrence_1 = new StringResource('add_a_new_occurrence', this.stringsLoader_1);
    this.active_classes_1 = new StringResource('active_classes', this.stringsLoader_1);
    this.terms_and_policies_1 = new StringResource('terms_and_policies', this.stringsLoader_1);
    this.manage_site_settings_1 = new StringResource('manage_site_settings', this.stringsLoader_1);
    this.guest_login_enabled_1 = new StringResource('guest_login_enabled', this.stringsLoader_1);
    this.registration_allowed_1 = new StringResource('registration_allowed', this.stringsLoader_1);
    this.yes_1 = new StringResource('yes', this.stringsLoader_1);
    this.no_1 = new StringResource('no', this.stringsLoader_1);
    this.edit_site_1 = new StringResource('edit_site', this.stringsLoader_1);
    this.site_1 = new StringResource('site', this.stringsLoader_1);
    this.site_link_1 = new StringResource('site_link', this.stringsLoader_1);
    this.please_enter_the_linK_1 = new StringResource('please_enter_the_linK', this.stringsLoader_1);
    this.or_1 = new StringResource('or', this.stringsLoader_1);
    this.connect_1 = new StringResource('connect', this.stringsLoader_1);
    this.terms_and_policies_text_1 = new StringResource('terms_and_policies_text', this.stringsLoader_1);
    this.edit_terms_and_policies_1 = new StringResource('edit_terms_and_policies', this.stringsLoader_1);
    this.strings_not_allowed_1 = new StringResource('strings_not_allowed', this.stringsLoader_1);
    this.undo_1 = new StringResource('undo', this.stringsLoader_1);
    this.video_1 = new StringResource('video', this.stringsLoader_1);
    this.content_editor_create_new_category_1 = new StringResource('content_editor_create_new_category', this.stringsLoader_1);
    this.content_pieces_completed_1 = new StringResource('content_pieces_completed', this.stringsLoader_1);
    this.content_usage_duration_1 = new StringResource('content_usage_duration', this.stringsLoader_1);
    this.manage_download_1 = new StringResource('manage_download', this.stringsLoader_1);
    this.powered_by_1 = new StringResource('powered_by', this.stringsLoader_1);
    this.invalid_email_1 = new StringResource('invalid_email', this.stringsLoader_1);
    this.select_account_1 = new StringResource('select_account', this.stringsLoader_1);
    this.opening_link_1 = new StringResource('opening_link', this.stringsLoader_1);
    this.select_account_to_continue_1 = new StringResource('select_account_to_continue', this.stringsLoader_1);
    this.you_are_already_in_class_1 = new StringResource('you_are_already_in_class', this.stringsLoader_1);
    this.you_are_already_in_school_1 = new StringResource('you_are_already_in_school', this.stringsLoader_1);
    this.join_class_1 = new StringResource('join_class', this.stringsLoader_1);
    this.join_school_1 = new StringResource('join_school', this.stringsLoader_1);
    this.what_is_your_date_of_birth_1 = new StringResource('what_is_your_date_of_birth', this.stringsLoader_1);
    this.parents_email_address_1 = new StringResource('parents_email_address', this.stringsLoader_1);
    this.we_sent_a_message_to_your_parent_1 = new StringResource('we_sent_a_message_to_your_parent', this.stringsLoader_1);
    this.toggle_visibility_1 = new StringResource('toggle_visibility', this.stringsLoader_1);
    this.parental_consent_1 = new StringResource('parental_consent', this.stringsLoader_1);
    this.parent_child_register_message_subject_1 = new StringResource('parent_child_register_message_subject', this.stringsLoader_1);
    this.parent_child_register_message_1 = new StringResource('parent_child_register_message', this.stringsLoader_1);
    this.parent_consent_explanation_1 = new StringResource('parent_consent_explanation', this.stringsLoader_1);
    this.relationship_1 = new StringResource('relationship', this.stringsLoader_1);
    this.i_consent_1 = new StringResource('i_consent', this.stringsLoader_1);
    this.i_do_not_consent_1 = new StringResource('i_do_not_consent', this.stringsLoader_1);
    this.revoke_consent_1 = new StringResource('revoke_consent', this.stringsLoader_1);
    this.restore_consent_1 = new StringResource('restore_consent', this.stringsLoader_1);
    this.status_consent_granted_1 = new StringResource('status_consent_granted', this.stringsLoader_1);
    this.status_consent_denied_1 = new StringResource('status_consent_denied', this.stringsLoader_1);
    this.other_legal_guardian_1 = new StringResource('other_legal_guardian', this.stringsLoader_1);
    this.manage_parental_consent_1 = new StringResource('manage_parental_consent', this.stringsLoader_1);
    this.view_class_content_1 = new StringResource('view_class_content', this.stringsLoader_1);
    this.edit_class_content_1 = new StringResource('edit_class_content', this.stringsLoader_1);
    this.view_class_learning_records_1 = new StringResource('view_class_learning_records', this.stringsLoader_1);
    this.view_contact_details_of_members_1 = new StringResource('view_contact_details_of_members', this.stringsLoader_1);
    this.edit_contact_details_of_members_1 = new StringResource('edit_contact_details_of_members', this.stringsLoader_1);
    this.view_socioeconomic_details_of_members_1 = new StringResource('view_socioeconomic_details_of_members', this.stringsLoader_1);
    this.edit_socioeconomic_details_of_members_1 = new StringResource('edit_socioeconomic_details_of_members', this.stringsLoader_1);
    this.add_person_or_group_1 = new StringResource('add_person_or_group', this.stringsLoader_1);
    this.lets_get_started_1 = new StringResource('lets_get_started', this.stringsLoader_1);
    this.looks_like_installed_app_from_link_1 = new StringResource('looks_like_installed_app_from_link', this.stringsLoader_1);
    this.continue_using_link_recommended_1 = new StringResource('continue_using_link_recommended', this.stringsLoader_1);
    this.continue_using_the_link_1 = new StringResource('continue_using_the_link', this.stringsLoader_1);
    this.start_from_scratch_1 = new StringResource('start_from_scratch', this.stringsLoader_1);
    this.ignore_the_link_1 = new StringResource('ignore_the_link', this.stringsLoader_1);
    this.add_permission_for_a_person_1 = new StringResource('add_permission_for_a_person', this.stringsLoader_1);
    this.add_permission_for_a_group_1 = new StringResource('add_permission_for_a_group', this.stringsLoader_1);
    this.add_using_link_1 = new StringResource('add_using_link', this.stringsLoader_1);
    this.add_using_a_web_link_then_1 = new StringResource('add_using_a_web_link_then', this.stringsLoader_1);
    this.add_from_gallery_1 = new StringResource('add_from_gallery', this.stringsLoader_1);
    this.add_video_or_audio_from_the_device_gallery_1 = new StringResource('add_video_or_audio_from_the_device_gallery', this.stringsLoader_1);
    this.add_file_1 = new StringResource('add_file', this.stringsLoader_1);
    this.add_folder_1 = new StringResource('add_folder', this.stringsLoader_1);
    this.importing_1 = new StringResource('importing', this.stringsLoader_1);
    this.downloading_content_1 = new StringResource('downloading_content', this.stringsLoader_1);
    this.deleting_content_1 = new StringResource('deleting_content', this.stringsLoader_1);
    this.add_folder_description_1 = new StringResource('add_folder_description', this.stringsLoader_1);
    this.add_educational_content_using_supported_formats_eg_pdf_xapi_h5p_1 = new StringResource('add_educational_content_using_supported_formats_eg_pdf_xapi_h5p', this.stringsLoader_1);
    this.current_status_consent_granted_1 = new StringResource('current_status_consent_granted', this.stringsLoader_1);
    this.select_country_1 = new StringResource('select_country', this.stringsLoader_1);
    this.enter_link_1 = new StringResource('enter_link', this.stringsLoader_1);
    this.add_subject_1 = new StringResource('add_subject', this.stringsLoader_1);
    this.share_via_1 = new StringResource('share_via', this.stringsLoader_1);
    this.share_apk_file_1 = new StringResource('share_apk_file', this.stringsLoader_1);
    this.recommended_for_advanced_users_1 = new StringResource('recommended_for_advanced_users', this.stringsLoader_1);
    this.nearby_share_1 = new StringResource('nearby_share', this.stringsLoader_1);
    this.recommended_for_offline_installation_1 = new StringResource('recommended_for_offline_installation', this.stringsLoader_1);
    this.app_store_link_1 = new StringResource('app_store_link', this.stringsLoader_1);
    this.everything_works_offline_1 = new StringResource('everything_works_offline', this.stringsLoader_1);
    this.swipe_to_next_1 = new StringResource('swipe_to_next', this.stringsLoader_1);
    this.content_entries_completed_1 = new StringResource('content_entries_completed', this.stringsLoader_1);
    this.content_usage_time_1 = new StringResource('content_usage_time', this.stringsLoader_1);
    this.all_permissions_1 = new StringResource('all_permissions', this.stringsLoader_1);
    this.folder_1 = new StringResource('folder', this.stringsLoader_1);
    this.create_a_new_learning_env_1 = new StringResource('create_a_new_learning_env', this.stringsLoader_1);
    this.add_educational_content_to_new_learning_env_1 = new StringResource('add_educational_content_to_new_learning_env', this.stringsLoader_1);
    this.connect_to_an_existing_learning_environment_1 = new StringResource('connect_to_an_existing_learning_environment', this.stringsLoader_1);
    this.does_your_class_already_have_learning_env_1 = new StringResource('does_your_class_already_have_learning_env', this.stringsLoader_1);
    this.use_the_public_lib_env_1 = new StringResource('use_the_public_lib_env', this.stringsLoader_1);
    this.just_want_to_browse_1 = new StringResource('just_want_to_browse', this.stringsLoader_1);
    this.revoking_consent_will_1 = new StringResource('revoking_consent_will', this.stringsLoader_1);
    this.you_must_comply_with_license_1 = new StringResource('you_must_comply_with_license', this.stringsLoader_1);
    this.you_can_copypaste_a_link_1 = new StringResource('you_can_copypaste_a_link', this.stringsLoader_1);
    this.see_supported_sites_1 = new StringResource('see_supported_sites', this.stringsLoader_1);
    this.class_setup_1 = new StringResource('class_setup', this.stringsLoader_1);
    this.anyone_with_this_can_join_school_1 = new StringResource('anyone_with_this_can_join_school', this.stringsLoader_1);
    this.this_class_1 = new StringResource('this_class', this.stringsLoader_1);
    this.from_my_classes_1 = new StringResource('from_my_classes', this.stringsLoader_1);
    this.my_content_1 = new StringResource('my_content', this.stringsLoader_1);
    this.learning_environment_1 = new StringResource('learning_environment', this.stringsLoader_1);
    this.grades_class_age_1 = new StringResource('grades_class_age', this.stringsLoader_1);
    this.add_remove_and_modify_grades_1 = new StringResource('add_remove_and_modify_grades', this.stringsLoader_1);
    this.subjects_1 = new StringResource('subjects', this.stringsLoader_1);
    this.add_remove_and_modify_subjects_1 = new StringResource('add_remove_and_modify_subjects', this.stringsLoader_1);
    this.create_my_account_1 = new StringResource('create_my_account', this.stringsLoader_1);
    this.recommend_it_1 = new StringResource('recommend_it', this.stringsLoader_1);
    this.edit_permissions_1 = new StringResource('edit_permissions', this.stringsLoader_1);
    this.add_from_contacts_1 = new StringResource('add_from_contacts', this.stringsLoader_1);
    this.almost_done_1 = new StringResource('almost_done', this.stringsLoader_1);
    this.your_username_1 = new StringResource('your_username', this.stringsLoader_1);
    this.select_content_1 = new StringResource('select_content', this.stringsLoader_1);
    this.search_in_1 = new StringResource('search_in', this.stringsLoader_1);
    this.type_1 = new StringResource('type', this.stringsLoader_1);
    this.please_download_the_app_1 = new StringResource('please_download_the_app', this.stringsLoader_1);
    this.alternatively_you_can_download_the_apk_1 = new StringResource('alternatively_you_can_download_the_apk', this.stringsLoader_1);
    this.full_i_can_download_as_much_as_i_like_1 = new StringResource('full_i_can_download_as_much_as_i_like', this.stringsLoader_1);
    this.limited_i_avoid_downloading_too_much_1 = new StringResource('limited_i_avoid_downloading_too_much', this.stringsLoader_1);
    this.oops_1 = new StringResource('oops', this.stringsLoader_1);
    this.sorry_something_went_wrong_1 = new StringResource('sorry_something_went_wrong', this.stringsLoader_1);
    this.incident_id_1 = new StringResource('incident_id', this.stringsLoader_1);
    this.error_code_1 = new StringResource('error_code', this.stringsLoader_1);
    this.take_me_home_1 = new StringResource('take_me_home', this.stringsLoader_1);
    this.view_clazz_1 = new StringResource('view_clazz', this.stringsLoader_1);
    this.view_clazzes_1 = new StringResource('view_clazzes', this.stringsLoader_1);
    this.enrol_and_unenrol_students_1 = new StringResource('enrol_and_unenrol_students', this.stringsLoader_1);
    this.enrol_and_unenrol_teachers_1 = new StringResource('enrol_and_unenrol_teachers', this.stringsLoader_1);
    this.view_assignments_1 = new StringResource('view_assignments', this.stringsLoader_1);
    this.add_or_edit_assignment_1 = new StringResource('add_or_edit_assignment', this.stringsLoader_1);
    this.view_basic_profile_of_members_1 = new StringResource('view_basic_profile_of_members', this.stringsLoader_1);
    this.edit_basic_profile_of_members_1 = new StringResource('edit_basic_profile_of_members', this.stringsLoader_1);
    this.view_school_1 = new StringResource('view_school', this.stringsLoader_1);
    this.edit_clazzes_1 = new StringResource('edit_clazzes', this.stringsLoader_1);
    this.add_new_clazz_to_school_1 = new StringResource('add_new_clazz_to_school', this.stringsLoader_1);
    this.added_to_class_content_1 = new StringResource('added_to_class_content', this.stringsLoader_1);
    this.content_already_added_to_class_1 = new StringResource('content_already_added_to_class', this.stringsLoader_1);
    this.your_account_needs_approved_1 = new StringResource('your_account_needs_approved', this.stringsLoader_1);
    this.adult_account_required_1 = new StringResource('adult_account_required', this.stringsLoader_1);
    this.blank_report_1 = new StringResource('blank_report', this.stringsLoader_1);
    this.attendance_over_time_by_class_1 = new StringResource('attendance_over_time_by_class', this.stringsLoader_1);
    this.percentage_of_students_attending_over_time_1 = new StringResource('percentage_of_students_attending_over_time', this.stringsLoader_1);
    this.content_completion_1 = new StringResource('content_completion', this.stringsLoader_1);
    this.number_of_students_completed_time_1 = new StringResource('number_of_students_completed_time', this.stringsLoader_1);
    this.content_usage_by_class_1 = new StringResource('content_usage_by_class', this.stringsLoader_1);
    this.total_content_usage_duration_class_1 = new StringResource('total_content_usage_duration_class', this.stringsLoader_1);
    this.content_usage_over_time_1 = new StringResource('content_usage_over_time', this.stringsLoader_1);
    this.total_content_duration_gender_1 = new StringResource('total_content_duration_gender', this.stringsLoader_1);
    this.unique_content_users_over_time_1 = new StringResource('unique_content_users_over_time', this.stringsLoader_1);
    this.number_of_active_users_over_time_1 = new StringResource('number_of_active_users_over_time', this.stringsLoader_1);
    this.parent_1 = new StringResource('parent', this.stringsLoader_1);
    this.upload_1 = new StringResource('upload', this.stringsLoader_1);
    this.selected_file_summary_1 = new StringResource('selected_file_summary', this.stringsLoader_1);
    this.drag_and_drop_or_click_to_add_file_1 = new StringResource('drag_and_drop_or_click_to_add_file', this.stringsLoader_1);
    this.extra_active_tab_warning_1 = new StringResource('extra_active_tab_warning', this.stringsLoader_1);
    this.saved_1 = new StringResource('saved', this.stringsLoader_1);
    this.individual_1 = new StringResource('individual', this.stringsLoader_1);
    this.group_1 = new StringResource('group', this.stringsLoader_1);
    this.dont_show_before_1 = new StringResource('dont_show_before', this.stringsLoader_1);
    this.group_submission_1 = new StringResource('group_submission', this.stringsLoader_1);
    this.require_file_submission_1 = new StringResource('require_file_submission', this.stringsLoader_1);
    this.require_text_submission_1 = new StringResource('require_text_submission', this.stringsLoader_1);
    this.maximum_1 = new StringResource('maximum', this.stringsLoader_1);
    this.size_limit_1 = new StringResource('size_limit', this.stringsLoader_1);
    this.size_limit_error_1 = new StringResource('size_limit_error', this.stringsLoader_1);
    this.limit_1 = new StringResource('limit', this.stringsLoader_1);
    this.number_of_files_1 = new StringResource('number_of_files', this.stringsLoader_1);
    this.edit_after_submission_1 = new StringResource('edit_after_submission', this.stringsLoader_1);
    this.allowed_till_deadline_1 = new StringResource('allowed_till_deadline', this.stringsLoader_1);
    this.allowed_till_grace_1 = new StringResource('allowed_till_grace', this.stringsLoader_1);
    this.not_allowed_1 = new StringResource('not_allowed', this.stringsLoader_1);
    this.marked_by_1 = new StringResource('marked_by', this.stringsLoader_1);
    this.peers_1 = new StringResource('peers', this.stringsLoader_1);
    this.peers_to_review_1 = new StringResource('peers_to_review', this.stringsLoader_1);
    this.file_type_1 = new StringResource('file_type', this.stringsLoader_1);
    this.file_type_chosen_1 = new StringResource('file_type_chosen', this.stringsLoader_1);
    this.file_type_any_1 = new StringResource('file_type_any', this.stringsLoader_1);
    this.file_document_1 = new StringResource('file_document', this.stringsLoader_1);
    this.file_image_1 = new StringResource('file_image', this.stringsLoader_1);
    this.submit_grade_1 = new StringResource('submit_grade', this.stringsLoader_1);
    this.submit_grade_and_mark_next_1 = new StringResource('submit_grade_and_mark_next', this.stringsLoader_1);
    this.graded_1 = new StringResource('graded', this.stringsLoader_1);
    this.score_greater_than_zero_1 = new StringResource('score_greater_than_zero', this.stringsLoader_1);
    this.words_1 = new StringResource('words', this.stringsLoader_1);
    this.characters_1 = new StringResource('characters', this.stringsLoader_1);
    this.class_timezone_set_1 = new StringResource('class_timezone_set', this.stringsLoader_1);
    this.maximum_points_1 = new StringResource('maximum_points', this.stringsLoader_1);
    this.penalty_label_1 = new StringResource('penalty_label', this.stringsLoader_1);
    this.submissions_1 = new StringResource('submissions', this.stringsLoader_1);
    this.add_text_1 = new StringResource('add_text', this.stringsLoader_1);
    this.course_blocks_1 = new StringResource('course_blocks', this.stringsLoader_1);
    this.add_block_1 = new StringResource('add_block', this.stringsLoader_1);
    this.edit_block_1 = new StringResource('edit_block', this.stringsLoader_1);
    this.module_1 = new StringResource('module', this.stringsLoader_1);
    this.course_module_1 = new StringResource('course_module', this.stringsLoader_1);
    this.formatted_text_to_show_to_course_participants_1 = new StringResource('formatted_text_to_show_to_course_participants', this.stringsLoader_1);
    this.add_course_block_content_desc_1 = new StringResource('add_course_block_content_desc', this.stringsLoader_1);
    this.add_assignment_block_content_desc_1 = new StringResource('add_assignment_block_content_desc', this.stringsLoader_1);
    this.discussion_board_1 = new StringResource('discussion_board', this.stringsLoader_1);
    this.add_discussion_board_desc_1 = new StringResource('add_discussion_board_desc', this.stringsLoader_1);
    this.new_module_1 = new StringResource('new_module', this.stringsLoader_1);
    this.edit_module_1 = new StringResource('edit_module', this.stringsLoader_1);
    this.indent_1 = new StringResource('indent', this.stringsLoader_1);
    this.unindent_1 = new StringResource('unindent', this.stringsLoader_1);
    this.institution_1 = new StringResource('institution', this.stringsLoader_1);
    this.student_enrolment_policy_1 = new StringResource('student_enrolment_policy', this.stringsLoader_1);
    this.teacher_enrolment_policy_1 = new StringResource('teacher_enrolment_policy', this.stringsLoader_1);
    this.open_enrolment_1 = new StringResource('open_enrolment', this.stringsLoader_1);
    this.enrolment_requests_must_be_approved_1 = new StringResource('enrolment_requests_must_be_approved', this.stringsLoader_1);
    this.accept_enrolment_requests_automatically_1 = new StringResource('accept_enrolment_requests_automatically', this.stringsLoader_1);
    this.visibility_1 = new StringResource('visibility', this.stringsLoader_1);
    this.hidden_enrolment_via_links_code_or_invitation_1 = new StringResource('hidden_enrolment_via_links_code_or_invitation', this.stringsLoader_1);
    this.visible_for_all_1 = new StringResource('visible_for_all', this.stringsLoader_1);
    this.terminology_1 = new StringResource('terminology', this.stringsLoader_1);
    this.select_terminology_1 = new StringResource('select_terminology', this.stringsLoader_1);
    this.add_new_terminology_1 = new StringResource('add_new_terminology', this.stringsLoader_1);
    this.edit_terminology_1 = new StringResource('edit_terminology', this.stringsLoader_1);
    this.your_words_for_1 = new StringResource('your_words_for', this.stringsLoader_1);
    this.course_setup_1 = new StringResource('course_setup', this.stringsLoader_1);
    this.number_of_groups_1 = new StringResource('number_of_groups', this.stringsLoader_1);
    this.assign_to_random_groups_1 = new StringResource('assign_to_random_groups', this.stringsLoader_1);
    this.add_new_groups_1 = new StringResource('add_new_groups', this.stringsLoader_1);
    this.edit_groups_1 = new StringResource('edit_groups', this.stringsLoader_1);
    this.num_replies_1 = new StringResource('num_replies', this.stringsLoader_1);
    this.topics_1 = new StringResource('topics', this.stringsLoader_1);
    this.add_topic_1 = new StringResource('add_topic', this.stringsLoader_1);
    this.add_a_reply_1 = new StringResource('add_a_reply', this.stringsLoader_1);
    this.messages_1 = new StringResource('messages', this.stringsLoader_1);
    this.message_1 = new StringResource('message', this.stringsLoader_1);
    this.library_1 = new StringResource('library', this.stringsLoader_1);
    this.courses_1 = new StringResource('courses', this.stringsLoader_1);
    this.course_1 = new StringResource('course', this.stringsLoader_1);
    this.reports_and_analytics_1 = new StringResource('reports_and_analytics', this.stringsLoader_1);
    this.course_comments_1 = new StringResource('course_comments', this.stringsLoader_1);
    this.currently_enroled_1 = new StringResource('currently_enroled', this.stringsLoader_1);
    this.past_enrolments_1 = new StringResource('past_enrolments', this.stringsLoader_1);
    this.standard_1 = new StringResource('standard', this.stringsLoader_1);
    this.group_number_1 = new StringResource('group_number', this.stringsLoader_1);
    this.add_group_1 = new StringResource('add_group', this.stringsLoader_1);
    this.edit_group_1 = new StringResource('edit_group', this.stringsLoader_1);
    this.new_group_set_1 = new StringResource('new_group_set', this.stringsLoader_1);
    this.edit_text_1 = new StringResource('edit_text', this.stringsLoader_1);
    this.add_module_1 = new StringResource('add_module', this.stringsLoader_1);
    this.add_a_new_course_1 = new StringResource('add_a_new_course', this.stringsLoader_1);
    this.join_existing_course_1 = new StringResource('join_existing_course', this.stringsLoader_1);
    this.edit_course_1 = new StringResource('edit_course', this.stringsLoader_1);
    this.currently_enrolled_1 = new StringResource('currently_enrolled', this.stringsLoader_1);
    this.past_enrollments_1 = new StringResource('past_enrollments', this.stringsLoader_1);
    this.unread_1 = new StringResource('unread', this.stringsLoader_1);
    this.new_chat_1 = new StringResource('new_chat', this.stringsLoader_1);
    this.new_group_1 = new StringResource('new_group', this.stringsLoader_1);
    this.chat_1 = new StringResource('chat', this.stringsLoader_1);
    this.you_1 = new StringResource('you', this.stringsLoader_1);
    this.edit_topic_1 = new StringResource('edit_topic', this.stringsLoader_1);
    this.posts_1 = new StringResource('posts', this.stringsLoader_1);
    this.post_1 = new StringResource('post', this.stringsLoader_1);
    this.individual_submission_1 = new StringResource('individual_submission', this.stringsLoader_1);
    this.unassigned_1 = new StringResource('unassigned', this.stringsLoader_1);
    this.error_too_long_text_1 = new StringResource('error_too_long_text', this.stringsLoader_1);
    this.managed_enrolment_1 = new StringResource('managed_enrolment', this.stringsLoader_1);
    this.text_file_submission_error_1 = new StringResource('text_file_submission_error', this.stringsLoader_1);
    this.submit_all_at_once_submission_policy_1 = new StringResource('submit_all_at_once_submission_policy', this.stringsLoader_1);
    this.multiple_submission_allowed_submission_policy_1 = new StringResource('multiple_submission_allowed_submission_policy', this.stringsLoader_1);
    this.enrolment_policy_1 = new StringResource('enrolment_policy', this.stringsLoader_1);
    this.submission_policy_1 = new StringResource('submission_policy', this.stringsLoader_1);
    this.submission_already_made_1 = new StringResource('submission_already_made', this.stringsLoader_1);
    this.grade_out_of_range_1 = new StringResource('grade_out_of_range', this.stringsLoader_1);
    this.update_grade_1 = new StringResource('update_grade', this.stringsLoader_1);
    this.update_grade_and_mark_next_1 = new StringResource('update_grade_and_mark_next', this.stringsLoader_1);
    this.add_discussion_1 = new StringResource('add_discussion', this.stringsLoader_1);
    this.edit_discussion_1 = new StringResource('edit_discussion', this.stringsLoader_1);
    this.type_here_1 = new StringResource('type_here', this.stringsLoader_1);
    this.deadline_has_passed_1 = new StringResource('deadline_has_passed', this.stringsLoader_1);
    this.already_submitted_1 = new StringResource('already_submitted', this.stringsLoader_1);
    this.exceeds_word_limit_1 = new StringResource('exceeds_word_limit', this.stringsLoader_1);
    this.exceeds_char_limit_1 = new StringResource('exceeds_char_limit', this.stringsLoader_1);
    this.unassigned_error_1 = new StringResource('unassigned_error', this.stringsLoader_1);
    this.enabled_1 = new StringResource('enabled', this.stringsLoader_1);
    this.disabled_1 = new StringResource('disabled', this.stringsLoader_1);
    this.from_my_courses_1 = new StringResource('from_my_courses', this.stringsLoader_1);
    this.assign_reviewers_1 = new StringResource('assign_reviewers', this.stringsLoader_1);
    this.reviews_per_user_group_1 = new StringResource('reviews_per_user_group', this.stringsLoader_1);
    this.assign_random_reviewers_1 = new StringResource('assign_random_reviewers', this.stringsLoader_1);
    this.reviewer_1 = new StringResource('reviewer', this.stringsLoader_1);
    this.app_language_1 = new StringResource('app_language', this.stringsLoader_1);
    this.pdf_1 = new StringResource('pdf', this.stringsLoader_1);
    this.panic_button_app_1 = new StringResource('panic_button_app', this.stringsLoader_1);
    this.actions_to_be_taken_in_case_of_emergency_1 = new StringResource('actions_to_be_taken_in_case_of_emergency', this.stringsLoader_1);
    this.exit_app_1 = new StringResource('exit_app', this.stringsLoader_1);
    this.delete_app_data_from_device_1 = new StringResource('delete_app_data_from_device', this.stringsLoader_1);
    this.more_options_1 = new StringResource('more_options', this.stringsLoader_1);
    this.num_holidays_1 = new StringResource('num_holidays', this.stringsLoader_1);
    this.hide_app_1 = new StringResource('hide_app', this.stringsLoader_1);
    this.panic_button_explanation_1 = new StringResource('panic_button_explanation', this.stringsLoader_1);
    this.hide_app_explanation_1 = new StringResource('hide_app_explanation', this.stringsLoader_1);
    this.most_recent_1 = new StringResource('most_recent', this.stringsLoader_1);
    this.comment_1 = new StringResource('comment', this.stringsLoader_1);
    this.grant_app_permission_1 = new StringResource('grant_app_permission', this.stringsLoader_1);
    this.this_app_will_receive_1 = new StringResource('this_app_will_receive', this.stringsLoader_1);
    this.my_profile_1 = new StringResource('my_profile', this.stringsLoader_1);
    this.add_another_account_1 = new StringResource('add_another_account', this.stringsLoader_1);
    this.end_is_before_start_1 = new StringResource('end_is_before_start', this.stringsLoader_1);
    this.select_person_1 = new StringResource('select_person', this.stringsLoader_1);
    this.your_submission_1 = new StringResource('your_submission', this.stringsLoader_1);
    this.edit_content_1 = new StringResource('edit_content', this.stringsLoader_1);
    this.edit_folder_1 = new StringResource('edit_folder', this.stringsLoader_1);
    this.add_new_post_1 = new StringResource('add_new_post', this.stringsLoader_1);
    this.grades_scoring_1 = new StringResource('grades_scoring', this.stringsLoader_1);
    this.mark_comment_1 = new StringResource('mark_comment', this.stringsLoader_1);
    this.mark_1 = new StringResource('mark', this.stringsLoader_1);
    this.too_high_1 = new StringResource('too_high', this.stringsLoader_1);
    this.required_1 = new StringResource('required', this.stringsLoader_1);
    this.expand_1 = new StringResource('expand', this.stringsLoader_1);
    this.collapse_1 = new StringResource('collapse', this.stringsLoader_1);
    this.remove_1 = new StringResource('remove', this.stringsLoader_1);
    this.table_of_contents_1 = new StringResource('table_of_contents', this.stringsLoader_1);
    this.select_date_1 = new StringResource('select_date', this.stringsLoader_1);
    this.link_1 = new StringResource('link', this.stringsLoader_1);
    this.time_submitted_1 = new StringResource('time_submitted', this.stringsLoader_1);
    this.group_assignment_1 = new StringResource('group_assignment', this.stringsLoader_1);
    this.menu_1 = new StringResource('menu', this.stringsLoader_1);
    this.restarting_1 = new StringResource('restarting', this.stringsLoader_1);
    this.terms_required_if_registration_enabled_1 = new StringResource('terms_required_if_registration_enabled', this.stringsLoader_1);
    this.drop_files_to_import_1 = new StringResource('drop_files_to_import', this.stringsLoader_1);
    this.compose_post_1 = new StringResource('compose_post', this.stringsLoader_1);
    this.password_updated_1 = new StringResource('password_updated', this.stringsLoader_1);
    this.html5_content_display_engine_1 = new StringResource('html5_content_display_engine', this.stringsLoader_1);
    this.chrome_recommended_1 = new StringResource('chrome_recommended', this.stringsLoader_1);
    this.chrome_recommended_info_1 = new StringResource('chrome_recommended_info', this.stringsLoader_1);
    this.internal_webview_1 = new StringResource('internal_webview', this.stringsLoader_1);
    this.internal_webview_info_1 = new StringResource('internal_webview_info', this.stringsLoader_1);
    this.content_not_ready_try_later_1 = new StringResource('content_not_ready_try_later', this.stringsLoader_1);
    this.version_1 = new StringResource('version', this.stringsLoader_1);
    this.licenses_1 = new StringResource('licenses', this.stringsLoader_1);
    this.cannot_record_attendance_for_future_date_time_1 = new StringResource('cannot_record_attendance_for_future_date_time', this.stringsLoader_1);
    this.could_not_load_vlc_1 = new StringResource('could_not_load_vlc', this.stringsLoader_1);
    this.selected_1 = new StringResource('selected', this.stringsLoader_1);
    this.clear_selection_1 = new StringResource('clear_selection', this.stringsLoader_1);
    this.move_entries_to_this_folder_1 = new StringResource('move_entries_to_this_folder', this.stringsLoader_1);
    this.cannot_move_to_subfolder_of_self_1 = new StringResource('cannot_move_to_subfolder_of_self', this.stringsLoader_1);
    this.cannot_move_already_in_same_folder_1 = new StringResource('cannot_move_already_in_same_folder', this.stringsLoader_1);
    this.move_to_1 = new StringResource('move_to', this.stringsLoader_1);
    this.restore_1 = new StringResource('restore', this.stringsLoader_1);
    this.delete_permanently_1 = new StringResource('delete_permanently', this.stringsLoader_1);
    this.deleted_items_1 = new StringResource('deleted_items', this.stringsLoader_1);
    this.delete_or_restore_items_1 = new StringResource('delete_or_restore_items', this.stringsLoader_1);
    this.yesterday_1 = new StringResource('yesterday', this.stringsLoader_1);
    this.request_to_enrol_already_pending_1 = new StringResource('request_to_enrol_already_pending', this.stringsLoader_1);
    this.request_submitted_1 = new StringResource('request_submitted', this.stringsLoader_1);
    this.canceled_enrolment_request_1 = new StringResource('canceled_enrolment_request', this.stringsLoader_1);
    this.enroled_into_name_1 = new StringResource('enroled_into_name', this.stringsLoader_1);
    this.declined_request_from_name_1 = new StringResource('declined_request_from_name', this.stringsLoader_1);
    this.view_course_1 = new StringResource('view_course', this.stringsLoader_1);
    this.moderate_1 = new StringResource('moderate', this.stringsLoader_1);
    this.manage_student_enrolments_1 = new StringResource('manage_student_enrolments', this.stringsLoader_1);
    this.manage_teacher_enrolments_1 = new StringResource('manage_teacher_enrolments', this.stringsLoader_1);
    this.view_learning_records_1 = new StringResource('view_learning_records', this.stringsLoader_1);
    this.edit_learning_records_1 = new StringResource('edit_learning_records', this.stringsLoader_1);
    this.view_members_1 = new StringResource('view_members', this.stringsLoader_1);
    this.copy_invite_code_1 = new StringResource('copy_invite_code', this.stringsLoader_1);
    this.direct_enrol_users_onto_courses_1 = new StringResource('direct_enrol_users_onto_courses', this.stringsLoader_1);
    this.could_not_restart_1 = new StringResource('could_not_restart', this.stringsLoader_1);
    this.close_now_1 = new StringResource('close_now', this.stringsLoader_1);
    this.view_all_courses_1 = new StringResource('view_all_courses', this.stringsLoader_1);
    this.edit_all_courses_1 = new StringResource('edit_all_courses', this.stringsLoader_1);
    this.moderate_all_courses_1 = new StringResource('moderate_all_courses', this.stringsLoader_1);
    this.manage_student_enrolments_for_all_courses_1 = new StringResource('manage_student_enrolments_for_all_courses', this.stringsLoader_1);
    this.manage_teacher_enrolments_for_all_courses_1 = new StringResource('manage_teacher_enrolments_for_all_courses', this.stringsLoader_1);
    this.view_attendance_records_for_all_courses_1 = new StringResource('view_attendance_records_for_all_courses', this.stringsLoader_1);
    this.edit_attendance_records_for_all_courses_1 = new StringResource('edit_attendance_records_for_all_courses', this.stringsLoader_1);
    this.add_new_users_1 = new StringResource('add_new_users', this.stringsLoader_1);
    this.view_all_users_1 = new StringResource('view_all_users', this.stringsLoader_1);
    this.edit_all_users_1 = new StringResource('edit_all_users', this.stringsLoader_1);
    this.view_learning_records_for_all_courses_1 = new StringResource('view_learning_records_for_all_courses', this.stringsLoader_1);
    this.edit_learning_records_for_all_courses_1 = new StringResource('edit_learning_records_for_all_courses', this.stringsLoader_1);
    this.add_new_courses_1 = new StringResource('add_new_courses', this.stringsLoader_1);
    this.manage_user_permissions_1 = new StringResource('manage_user_permissions', this.stringsLoader_1);
    this.reset_passwords_1 = new StringResource('reset_passwords', this.stringsLoader_1);
    this.upload_failed_1 = new StringResource('upload_failed', this.stringsLoader_1);
    this.opening_name_1 = new StringResource('opening_name', this.stringsLoader_1);
    this.invalid_invite_code_1 = new StringResource('invalid_invite_code', this.stringsLoader_1);
    this.bulk_import_1 = new StringResource('bulk_import', this.stringsLoader_1);
    this.import_key_1 = new StringResource('import_key', this.stringsLoader_1);
    this.imported_1 = new StringResource('imported', this.stringsLoader_1);
    this.you_can_import_users_using_a_csv_file_1 = new StringResource('you_can_import_users_using_a_csv_file', this.stringsLoader_1);
    this.get_template_1 = new StringResource('get_template', this.stringsLoader_1);
    this.line_number_1 = new StringResource('line_number', this.stringsLoader_1);
    this.selected_content_1 = new StringResource('selected_content', this.stringsLoader_1);
    this.edit_content_block_1 = new StringResource('edit_content_block', this.stringsLoader_1);
    this.compression_1 = new StringResource('compression', this.stringsLoader_1);
    this.compression_highest_1 = new StringResource('compression_highest', this.stringsLoader_1);
    this.compression_high_1 = new StringResource('compression_high', this.stringsLoader_1);
    this.compression_medium_1 = new StringResource('compression_medium', this.stringsLoader_1);
    this.compression_low_1 = new StringResource('compression_low', this.stringsLoader_1);
    this.compression_lowest_1 = new StringResource('compression_lowest', this.stringsLoader_1);
    this.compression_none_1 = new StringResource('compression_none', this.stringsLoader_1);
    this.size_compressed_was_1 = new StringResource('size_compressed_was', this.stringsLoader_1);
    this.size_1 = new StringResource('size', this.stringsLoader_1);
    this.import_error_1 = new StringResource('import_error', this.stringsLoader_1);
    this.upload_error_1 = new StringResource('upload_error', this.stringsLoader_1);
    this.offline_items_storage_1 = new StringResource('offline_items_storage', this.stringsLoader_1);
    this.space_available_1 = new StringResource('space_available', this.stringsLoader_1);
    this.grant_permission_1 = new StringResource('grant_permission', this.stringsLoader_1);
    this.gradebook_1 = new StringResource('gradebook', this.stringsLoader_1);
    this.full_screen_1 = new StringResource('full_screen', this.stringsLoader_1);
    this.exit_full_screen_1 = new StringResource('exit_full_screen', this.stringsLoader_1);
    this.increase_text_size_1 = new StringResource('increase_text_size', this.stringsLoader_1);
    this.decrease_text_size_1 = new StringResource('decrease_text_size', this.stringsLoader_1);
    this.nothing_here_yet_1 = new StringResource('nothing_here_yet', this.stringsLoader_1);
    this.signup_with_passkey_1 = new StringResource('signup_with_passkey', this.stringsLoader_1);
    this.other_options_1 = new StringResource('other_options', this.stringsLoader_1);
    this.i_am_teacher_1 = new StringResource('i_am_teacher', this.stringsLoader_1);
    this.i_am_parent_1 = new StringResource('i_am_parent', this.stringsLoader_1);
    this.select_picture_from_files_1 = new StringResource('select_picture_from_files', this.stringsLoader_1);
    this.your_date_of_birth_1 = new StringResource('your_date_of_birth', this.stringsLoader_1);
    this.add_child_profiles_1 = new StringResource('add_child_profiles', this.stringsLoader_1);
    this.child_profile_1 = new StringResource('child_profile', this.stringsLoader_1);
    this.finish_1 = new StringResource('finish', this.stringsLoader_1);
    this.scan_badge_qr_code_1 = new StringResource('scan_badge_qr_code', this.stringsLoader_1);
    this.new_user_1 = new StringResource('new_user', this.stringsLoader_1);
    this.existing_user_1 = new StringResource('existing_user', this.stringsLoader_1);
    this.personal_account_1 = new StringResource('personal_account', this.stringsLoader_1);
    this.signup_1 = new StringResource('signup', this.stringsLoader_1);
    this.access_educational_content_download_offline_1 = new StringResource('access_educational_content_download_offline', this.stringsLoader_1);
    this.join_learning_space_1 = new StringResource('join_learning_space', this.stringsLoader_1);
    this.learning_space_1 = new StringResource('learning_space', this.stringsLoader_1);
    this.eg_for_your_school_organization_1 = new StringResource('eg_for_your_school_organization', this.stringsLoader_1);
    this.new_learning_space_1 = new StringResource('new_learning_space', this.stringsLoader_1);
    this.full_name_1 = new StringResource('full_name', this.stringsLoader_1);
    this.which_profile_do_you_want_to_start_1 = new StringResource('which_profile_do_you_want_to_start', this.stringsLoader_1);
    this.create_passkey_for_faster_and_easier_signin_1 = new StringResource('create_passkey_for_faster_and_easier_signin', this.stringsLoader_1);
    this.create_username_and_password_1 = new StringResource('create_username_and_password', this.stringsLoader_1);
    this.create_local_account_1 = new StringResource('create_local_account', this.stringsLoader_1);
    this.with_passkeys_no_complex_passwords_needed_1 = new StringResource('with_passkeys_no_complex_passwords_needed', this.stringsLoader_1);
    this.enter_link_manually_1 = new StringResource('enter_link_manually', this.stringsLoader_1);
    this.registration_not_allowed_1 = new StringResource('registration_not_allowed', this.stringsLoader_1);
    this.add_subtitles_1 = new StringResource('add_subtitles', this.stringsLoader_1);
    this.edit_subtitles_1 = new StringResource('edit_subtitles', this.stringsLoader_1);
    this.subtitles_1 = new StringResource('subtitles', this.stringsLoader_1);
    this.progress_key_1 = new StringResource('progress_key', this.stringsLoader_1);
    this.response_1 = new StringResource('response', this.stringsLoader_1);
    this.true_key_1 = new StringResource('true_key', this.stringsLoader_1);
    this.false_key_1 = new StringResource('false_key', this.stringsLoader_1);
    this.copy_1 = new StringResource('copy', this.stringsLoader_1);
    this.copy_course_1 = new StringResource('copy_course', this.stringsLoader_1);
    this.copy_of_1 = new StringResource('copy_of', this.stringsLoader_1);
    this.invite_via_contact_1 = new StringResource('invite_via_contact', this.stringsLoader_1);
    this.invite_to_course_1 = new StringResource('invite_to_course', this.stringsLoader_1);
    this.use_email_1 = new StringResource('use_email', this.stringsLoader_1);
    this.use_phone_number_1 = new StringResource('use_phone_number', this.stringsLoader_1);
    this.add_username_email_phone_1 = new StringResource('add_username_email_phone', this.stringsLoader_1);
    this.no_valid_contact_found_1 = new StringResource('no_valid_contact_found', this.stringsLoader_1);
    this.no_contact_found_1 = new StringResource('no_contact_found', this.stringsLoader_1);
    this.decline_1 = new StringResource('decline', this.stringsLoader_1);
    this.do_you_want_to_join_this_course_1 = new StringResource('do_you_want_to_join_this_course', this.stringsLoader_1);
    this.invite_has_been_used_1 = new StringResource('invite_has_been_used', this.stringsLoader_1);
    this.pending_invites_1 = new StringResource('pending_invites', this.stringsLoader_1);
    this.expires_1 = new StringResource('expires', this.stringsLoader_1);
    this.reminder_1 = new StringResource('reminder', this.stringsLoader_1);
    this.resend_1 = new StringResource('resend', this.stringsLoader_1);
    this.revoke_1 = new StringResource('revoke', this.stringsLoader_1);
    this.invite_code_redeemed_1 = new StringResource('invite_code_redeemed', this.stringsLoader_1);
    this.invite_code_invalid_1 = new StringResource('invite_code_invalid', this.stringsLoader_1);
    this.invite_declined_1 = new StringResource('invite_declined', this.stringsLoader_1);
    this.invite_code_already_redeemed_1 = new StringResource('invite_code_already_redeemed', this.stringsLoader_1);
    this.invite_code_expired_1 = new StringResource('invite_code_expired', this.stringsLoader_1);
    this.invitation_is_revoked_1 = new StringResource('invitation_is_revoked', this.stringsLoader_1);
    this.security_1 = new StringResource('security', this.stringsLoader_1);
    this.manage_account_1 = new StringResource('manage_account', this.stringsLoader_1);
    this.passkeys_1 = new StringResource('passkeys', this.stringsLoader_1);
    this.manage_1 = new StringResource('manage', this.stringsLoader_1);
    this.created_1 = new StringResource('created', this.stringsLoader_1);
    this.create_passkey_1 = new StringResource('create_passkey', this.stringsLoader_1);
    this.last_updated_1 = new StringResource('last_updated', this.stringsLoader_1);
    this.delete_this_passkey_1 = new StringResource('delete_this_passkey', this.stringsLoader_1);
    this.loss_access_passkey_dialog_1 = new StringResource('loss_access_passkey_dialog', this.stringsLoader_1);
    this.sign_in_faster_next_time_1 = new StringResource('sign_in_faster_next_time', this.stringsLoader_1);
    this.secure_passkey_detail_text_1 = new StringResource('secure_passkey_detail_text', this.stringsLoader_1);
    this.invitations_sent_1 = new StringResource('invitations_sent', this.stringsLoader_1);
    this.invitation_sent_1 = new StringResource('invitation_sent', this.stringsLoader_1);
  }
  protoOf(strings).get_stringsLoader_6aatx0_k$ = function () {
    return this.stringsLoader_1;
  };
  protoOf(strings).get_app_name_chqzim_k$ = function () {
    return this.app_name_1;
  };
  protoOf(strings).get_blank_ip8b3f_k$ = function () {
    return this.blank_1;
  };
  protoOf(strings).get_login_iusabk_k$ = function () {
    return this.login_1;
  };
  protoOf(strings).get_got_it_dwgfk7_k$ = function () {
    return this.got_it_1;
  };
  protoOf(strings).get_learn_more_439clj_k$ = function () {
    return this.learn_more_1;
  };
  protoOf(strings).get_be_careful_interacting_online_m9wx4c_k$ = function () {
    return this.be_careful_interacting_online_1;
  };
  protoOf(strings).get_be_careful_not_to_share_emg2el_k$ = function () {
    return this.be_careful_not_to_share_1;
  };
  protoOf(strings).get_share_app_hn6two_k$ = function () {
    return this.share_app_1;
  };
  protoOf(strings).get_send_apk_file_chsiab_k$ = function () {
    return this.send_apk_file_1;
  };
  protoOf(strings).get_send_app_link_a4gkca_k$ = function () {
    return this.send_app_link_1;
  };
  protoOf(strings).get_error_iqzvfj_k$ = function () {
    return this.error_1;
  };
  protoOf(strings).get_create_backup_u3ovng_k$ = function () {
    return this.create_backup_1;
  };
  protoOf(strings).get_create_backup_description_5idp53_k$ = function () {
    return this.create_backup_description_1;
  };
  protoOf(strings).get_err_registering_new_user_2j5pot_k$ = function () {
    return this.err_registering_new_user_1;
  };
  protoOf(strings).get_register_empty_fields_um8ov2_k$ = function () {
    return this.register_empty_fields_1;
  };
  protoOf(strings).get_register_incorrect_email_xdycof_k$ = function () {
    return this.register_incorrect_email_1;
  };
  protoOf(strings).get_group_activity_w8jqhk_k$ = function () {
    return this.group_activity_1;
  };
  protoOf(strings).get_select_group_members_h5557j_k$ = function () {
    return this.select_group_members_1;
  };
  protoOf(strings).get_confirm_delete_message_evzyg5_k$ = function () {
    return this.confirm_delete_message_1;
  };
  protoOf(strings).get_wrong_user_pass_combo_so7k7t_k$ = function () {
    return this.wrong_user_pass_combo_1;
  };
  protoOf(strings).get_login_network_error_b1pwy0_k$ = function () {
    return this.login_network_error_1;
  };
  protoOf(strings).get_download_86umr3_k$ = function () {
    return this.download_1;
  };
  protoOf(strings).get_downloaded_djsss0_k$ = function () {
    return this.downloaded_1;
  };
  protoOf(strings).get_recycled_q5khkq_k$ = function () {
    return this.recycled_1;
  };
  protoOf(strings).get_libraries_lyf10w_k$ = function () {
    return this.libraries_1;
  };
  protoOf(strings).get_pause_download_emajie_k$ = function () {
    return this.pause_download_1;
  };
  protoOf(strings).get_ok_kntnrv_k$ = function () {
    return this.ok_1;
  };
  protoOf(strings).get_confirm_gztp07_k$ = function () {
    return this.confirm_1;
  };
  protoOf(strings).get_cancel_bsh2mb_k$ = function () {
    return this.cancel_1;
  };
  protoOf(strings).get_canceled_xu9s4e_k$ = function () {
    return this.canceled_1;
  };
  protoOf(strings).get_delete_cbon90_k$ = function () {
    return this.delete_1;
  };
  protoOf(strings).get_deleted_qwnqy8_k$ = function () {
    return this.deleted_1;
  };
  protoOf(strings).get_new_tab_vscdql_k$ = function () {
    return this.new_tab_1;
  };
  protoOf(strings).get_loading_6tzj9v_k$ = function () {
    return this.loading_1;
  };
  protoOf(strings).get_deleting_i8wcy7_k$ = function () {
    return this.deleting_1;
  };
  protoOf(strings).get_processing_d6vyw4_k$ = function () {
    return this.processing_1;
  };
  protoOf(strings).get_uploading_t094t4_k$ = function () {
    return this.uploading_1;
  };
  protoOf(strings).get_error_opening_file_2yp50d_k$ = function () {
    return this.error_opening_file_1;
  };
  protoOf(strings).get_logout_g9gkur_k$ = function () {
    return this.logout_1;
  };
  protoOf(strings).get_about_ioif6s_k$ = function () {
    return this.about_1;
  };
  protoOf(strings).get_download_all_mw2chf_k$ = function () {
    return this.download_all_1;
  };
  protoOf(strings).get_next_wor1vg_k$ = function () {
    return this.next_1;
  };
  protoOf(strings).get_previous_i5svy8_k$ = function () {
    return this.previous_1;
  };
  protoOf(strings).get_back_wojak0_k$ = function () {
    return this.back_1;
  };
  protoOf(strings).get_username_ytz5i7_k$ = function () {
    return this.username_1;
  };
  protoOf(strings).get_password_bodifw_k$ = function () {
    return this.password_1;
  };
  protoOf(strings).get_confirm_password_s57apv_k$ = function () {
    return this.confirm_password_1;
  };
  protoOf(strings).get_last_name_t811qt_k$ = function () {
    return this.last_name_1;
  };
  protoOf(strings).get_first_name_mu3jr1_k$ = function () {
    return this.first_name_1;
  };
  protoOf(strings).get_least_recent_l4iwg6_k$ = function () {
    return this.least_recent_1;
  };
  protoOf(strings).get_by_score_1dqhl9_k$ = function () {
    return this.by_score_1;
  };
  protoOf(strings).get_by_completion_3pe4kb_k$ = function () {
    return this.by_completion_1;
  };
  protoOf(strings).get_by_recent_attempt_qquyp4_k$ = function () {
    return this.by_recent_attempt_1;
  };
  protoOf(strings).get_by_timestamp_3m0707_k$ = function () {
    return this.by_timestamp_1;
  };
  protoOf(strings).get_register_now_nozeyl_k$ = function () {
    return this.register_now_1;
  };
  protoOf(strings).get_new_password_1xua1p_k$ = function () {
    return this.new_password_1;
  };
  protoOf(strings).get_phone_memory_6auked_k$ = function () {
    return this.phone_memory_1;
  };
  protoOf(strings).get_memory_card_xohv4r_k$ = function () {
    return this.memory_card_1;
  };
  protoOf(strings).get_device_cbv3of_k$ = function () {
    return this.device_1;
  };
  protoOf(strings).get_register_rt8ne4_k$ = function () {
    return this.register_1;
  };
  protoOf(strings).get_phone_number_5l0igt_k$ = function () {
    return this.phone_number_1;
  };
  protoOf(strings).get_name_key_1cwo7g_k$ = function () {
    return this.name_key_1;
  };
  protoOf(strings).get_description_emjre5_k$ = function () {
    return this.description_1;
  };
  protoOf(strings).get_male_woqbme_k$ = function () {
    return this.male_1;
  };
  protoOf(strings).get_female_d9sfv9_k$ = function () {
    return this.female_1;
  };
  protoOf(strings).get_other_iwivon_k$ = function () {
    return this.other_1;
  };
  protoOf(strings).get_unset_izq1hc_k$ = function () {
    return this.unset_1;
  };
  protoOf(strings).get_settings_82sm50_k$ = function () {
    return this.settings_1;
  };
  protoOf(strings).get_language_cjhhk1_k$ = function () {
    return this.language_1;
  };
  protoOf(strings).get_add_a_new_language_bqqyvw_k$ = function () {
    return this.add_a_new_language_1;
  };
  protoOf(strings).get_add_new_language_71et6q_k$ = function () {
    return this.add_new_language_1;
  };
  protoOf(strings).get_select_language_rl3nou_k$ = function () {
    return this.select_language_1;
  };
  protoOf(strings).get_languages_xmhugi_k$ = function () {
    return this.languages_1;
  };
  protoOf(strings).get_edit_language_z8max0_k$ = function () {
    return this.edit_language_1;
  };
  protoOf(strings).get_two_letter_code_plk4qe_k$ = function () {
    return this.two_letter_code_1;
  };
  protoOf(strings).get_three_letter_code_2r821w_k$ = function () {
    return this.three_letter_code_1;
  };
  protoOf(strings).get_languages_description_7vua8h_k$ = function () {
    return this.languages_description_1;
  };
  protoOf(strings).get_advanced_rc74kr_k$ = function () {
    return this.advanced_1;
  };
  protoOf(strings).get_optional_x3zcnr_k$ = function () {
    return this.optional_1;
  };
  protoOf(strings).get_email_iqwbqr_k$ = function () {
    return this.email_1;
  };
  protoOf(strings).get_regcode_j837h4_k$ = function () {
    return this.regcode_1;
  };
  protoOf(strings).get_home_wonf3c_k$ = function () {
    return this.home_1;
  };
  protoOf(strings).get_phone_iwv5tx_k$ = function () {
    return this.phone_1;
  };
  protoOf(strings).get_attendance_b7eliq_k$ = function () {
    return this.attendance_1;
  };
  protoOf(strings).get_classes_fds01p_k$ = function () {
    return this.classes_1;
  };
  protoOf(strings).get_exams_ir3cp7_k$ = function () {
    return this.exams_1;
  };
  protoOf(strings).get_reports_jd939y_k$ = function () {
    return this.reports_1;
  };
  protoOf(strings).get_choose_template_ec279j_k$ = function () {
    return this.choose_template_1;
  };
  protoOf(strings).get_save_as_template_omf5le_k$ = function () {
    return this.save_as_template_1;
  };
  protoOf(strings).get_contents_tuemzn_k$ = function () {
    return this.contents_1;
  };
  protoOf(strings).get_students_s05gf_k$ = function () {
    return this.students_1;
  };
  protoOf(strings).get_add_a_student_x7zms6_k$ = function () {
    return this.add_a_student_1;
  };
  protoOf(strings).get_forgot_password_bdh172_k$ = function () {
    return this.forgot_password_1;
  };
  protoOf(strings).get_notifications_jts33z_k$ = function () {
    return this.notifications_1;
  };
  protoOf(strings).get_account_i7e30c_k$ = function () {
    return this.account_1;
  };
  protoOf(strings).get_accounts_3vrulr_k$ = function () {
    return this.accounts_1;
  };
  protoOf(strings).get_share_iyi9bq_k$ = function () {
    return this.share_1;
  };
  protoOf(strings).get_send_wou8k1_k$ = function () {
    return this.send_1;
  };
  protoOf(strings).get_open_worwk3_k$ = function () {
    return this.open_1;
  };
  protoOf(strings).get_downloading_64vggf_k$ = function () {
    return this.downloading_1;
  };
  protoOf(strings).get_waiting_jq6esk_k$ = function () {
    return this.waiting_1;
  };
  protoOf(strings).get_waiting_for_connection_tqi79r_k$ = function () {
    return this.waiting_for_connection_1;
  };
  protoOf(strings).get_queued_ipyags_k$ = function () {
    return this.queued_1;
  };
  protoOf(strings).get_failed_d7ixja_k$ = function () {
    return this.failed_1;
  };
  protoOf(strings).get_passed_hy5ojd_k$ = function () {
    return this.passed_1;
  };
  protoOf(strings).get_success_tm3zdy_k$ = function () {
    return this.success_1;
  };
  protoOf(strings).get_failure_gpd3z3_k$ = function () {
    return this.failure_1;
  };
  protoOf(strings).get_incomplete_y5ipd3_k$ = function () {
    return this.incomplete_1;
  };
  protoOf(strings).get_completed_eoqvry_k$ = function () {
    return this.completed_1;
  };
  protoOf(strings).get_experience_ll72ml_k$ = function () {
    return this.experience_1;
  };
  protoOf(strings).get_answered_uyr0yu_k$ = function () {
    return this.answered_1;
  };
  protoOf(strings).get_select_subtitle_video_8j0lpu_k$ = function () {
    return this.select_subtitle_video_1;
  };
  protoOf(strings).get_no_subtitle_pv966r_k$ = function () {
    return this.no_subtitle_1;
  };
  protoOf(strings).get_no_video_file_found_qe78ns_k$ = function () {
    return this.no_video_file_found_1;
  };
  protoOf(strings).get_content_from_file_6p4w02_k$ = function () {
    return this.content_from_file_1;
  };
  protoOf(strings).get_content_from_link_6p8pz4_k$ = function () {
    return this.content_from_link_1;
  };
  protoOf(strings).get_import_from_file_5qbcdc_k$ = function () {
    return this.import_from_file_1;
  };
  protoOf(strings).get_import_from_link_5q7iea_k$ = function () {
    return this.import_from_link_1;
  };
  protoOf(strings).get_import_content_n9nv1k_k$ = function () {
    return this.import_content_1;
  };
  protoOf(strings).get_update_content_udzmrw_k$ = function () {
    return this.update_content_1;
  };
  protoOf(strings).get_publicly_accessible_7anxqi_k$ = function () {
    return this.publicly_accessible_1;
  };
  protoOf(strings).get_title_iz32un_k$ = function () {
    return this.title_1;
  };
  protoOf(strings).get_licence_40u4iw_k$ = function () {
    return this.licence_1;
  };
  protoOf(strings).get_ebook_iqplet_k$ = function () {
    return this.ebook_1;
  };
  protoOf(strings).get_interactive_qmz8nb_k$ = function () {
    return this.interactive_1;
  };
  protoOf(strings).get_collection_m24m5j_k$ = function () {
    return this.collection_1;
  };
  protoOf(strings).get_document_hjw2l8_k$ = function () {
    return this.document_1;
  };
  protoOf(strings).get_article_auhgc3_k$ = function () {
    return this.article_1;
  };
  protoOf(strings).get_audio_ioubhp_k$ = function () {
    return this.audio_1;
  };
  protoOf(strings).get_move_woqm8q_k$ = function () {
    return this.move_1;
  };
  protoOf(strings).get_hide_wonaff_k$ = function () {
    return this.hide_1;
  };
  protoOf(strings).get_unhide_kibvxg_k$ = function () {
    return this.unhide_1;
  };
  protoOf(strings).get_compress_tbdycr_k$ = function () {
    return this.compress_1;
  };
  protoOf(strings).get_and_key_czmvhu_k$ = function () {
    return this.and_key_1;
  };
  protoOf(strings).get_added_iojglz_k$ = function () {
    return this.added_1;
  };
  protoOf(strings).get_attempts_mtsz5d_k$ = function () {
    return this.attempts_1;
  };
  protoOf(strings).get_add_link_description_nmubmm_k$ = function () {
    return this.add_link_description_1;
  };
  protoOf(strings).get_add_gallery_description_rhp0js_k$ = function () {
    return this.add_gallery_description_1;
  };
  protoOf(strings).get_add_file_description_lxj1uo_k$ = function () {
    return this.add_file_description_1;
  };
  protoOf(strings).get_error_this_device_doesnt_support_bluetooth_sharing_4lgu8z_k$ = function () {
    return this.error_this_device_doesnt_support_bluetooth_sharing_1;
  };
  protoOf(strings).get_share_offline_zip_checkbox_label_bscpet_k$ = function () {
    return this.share_offline_zip_checkbox_label_1;
  };
  protoOf(strings).get_share_offline_dialog_message_c7v42z_k$ = function () {
    return this.share_offline_dialog_message_1;
  };
  protoOf(strings).get_preparing_87ncf9_k$ = function () {
    return this.preparing_1;
  };
  protoOf(strings).get_fixed_date_82b1gi_k$ = function () {
    return this.fixed_date_1;
  };
  protoOf(strings).get_relative_date_xqrxg8_k$ = function () {
    return this.relative_date_1;
  };
  protoOf(strings).get_field_required_prompt_keky22_k$ = function () {
    return this.field_required_prompt_1;
  };
  protoOf(strings).get_field_password_error_min_tc3j1h_k$ = function () {
    return this.field_password_error_min_1;
  };
  protoOf(strings).get_filed_password_no_match_l2yiol_k$ = function () {
    return this.filed_password_no_match_1;
  };
  protoOf(strings).get_update_kjcrma_k$ = function () {
    return this.update_1;
  };
  protoOf(strings).get_profile_3uo4e8_k$ = function () {
    return this.profile_1;
  };
  protoOf(strings).get_dialog_download_from_playstore_message_w5te47_k$ = function () {
    return this.dialog_download_from_playstore_message_1;
  };
  protoOf(strings).get_dialog_download_from_playstore_ok_9bg8ka_k$ = function () {
    return this.dialog_download_from_playstore_ok_1;
  };
  protoOf(strings).get_dialog_download_from_playstore_cancel_o5zvns_k$ = function () {
    return this.dialog_download_from_playstore_cancel_1;
  };
  protoOf(strings).get_accept_avafwx_k$ = function () {
    return this.accept_1;
  };
  protoOf(strings).get_also_available_in_ssswra_k$ = function () {
    return this.also_available_in_1;
  };
  protoOf(strings).get_created_partnership_2bypqc_k$ = function () {
    return this.created_partnership_1;
  };
  protoOf(strings).get_onboarding_get_started_label_yeu24u_k$ = function () {
    return this.onboarding_get_started_label_1;
  };
  protoOf(strings).get_lets_get_started_label_4iipf5_k$ = function () {
    return this.lets_get_started_label_1;
  };
  protoOf(strings).get_onboarding_headline1_mglse6_k$ = function () {
    return this.onboarding_headline1__1;
  };
  protoOf(strings).get_onboarding_subheadline1_7d5x2g_k$ = function () {
    return this.onboarding_subheadline1__1;
  };
  protoOf(strings).get_onboarding_headline2_mglse5_k$ = function () {
    return this.onboarding_headline2__1;
  };
  protoOf(strings).get_onboarding_subheadline2_7d5x2f_k$ = function () {
    return this.onboarding_subheadline2__1;
  };
  protoOf(strings).get_onboarding_headline3_mglse4_k$ = function () {
    return this.onboarding_headline3__1;
  };
  protoOf(strings).get_onboarding_subheadline3_7d5x2e_k$ = function () {
    return this.onboarding_subheadline3__1;
  };
  protoOf(strings).get_download_continue_stacked_label_8b13im_k$ = function () {
    return this.download_continue_stacked_label_1;
  };
  protoOf(strings).get_im_an_individual_learner_dfu3jp_k$ = function () {
    return this.im_an_individual_learner_1;
  };
  protoOf(strings).get_im_an_individual_learner_description_axmmyg_k$ = function () {
    return this.im_an_individual_learner_description_1;
  };
  protoOf(strings).get_i_want_to_join_my_organization_school_ndftaq_k$ = function () {
    return this.i_want_to_join_my_organization_school_1;
  };
  protoOf(strings).get_i_want_to_join_my_organization_school_description_eeix1x_k$ = function () {
    return this.i_want_to_join_my_organization_school_description_1;
  };
  protoOf(strings).get_i_want_to_add_my_organization_school_lu1lz3_k$ = function () {
    return this.i_want_to_add_my_organization_school_1;
  };
  protoOf(strings).get_i_want_to_add_my_organization_school_description_yi2rss_k$ = function () {
    return this.i_want_to_add_my_organization_school_description_1;
  };
  protoOf(strings).get_individual_action_title_nmspo4_k$ = function () {
    return this.individual_action_title_1;
  };
  protoOf(strings).get_create_new_local_account_title_pwcs4n_k$ = function () {
    return this.create_new_local_account_title_1;
  };
  protoOf(strings).get_create_new_local_account_description_blb531_k$ = function () {
    return this.create_new_local_account_description_1;
  };
  protoOf(strings).get_restore_local_account_title_aall7s_k$ = function () {
    return this.restore_local_account_title_1;
  };
  protoOf(strings).get_restore_local_account_description_wof85g_k$ = function () {
    return this.restore_local_account_description_1;
  };
  protoOf(strings).get_download_continue_btn_label_fpjdzt_k$ = function () {
    return this.download_continue_btn_label_1;
  };
  protoOf(strings).get_download_wifi_only_pl7960_k$ = function () {
    return this.download_wifi_only_1;
  };
  protoOf(strings).get_download_calculating_ze40qd_k$ = function () {
    return this.download_calculating_1;
  };
  protoOf(strings).get_download_state_download_u7dj30_k$ = function () {
    return this.download_state_download_1;
  };
  protoOf(strings).get_download_state_downloading_e6lnsy_k$ = function () {
    return this.download_state_downloading_1;
  };
  protoOf(strings).get_download_state_downloaded_oqw3b7_k$ = function () {
    return this.download_state_downloaded_1;
  };
  protoOf(strings).get_download_downloading_placeholder_rr5yao_k$ = function () {
    return this.download_downloading_placeholder_1;
  };
  protoOf(strings).get_download_summary_title_9kkcgh_k$ = function () {
    return this.download_summary_title_1;
  };
  protoOf(strings).get_download_cancel_label_av6bxf_k$ = function () {
    return this.download_cancel_label_1;
  };
  protoOf(strings).get_download_pause_download_hfaycf_k$ = function () {
    return this.download_pause_download_1;
  };
  protoOf(strings).get_download_storage_option_device_vyh7te_k$ = function () {
    return this.download_storage_option_device_1;
  };
  protoOf(strings).get_download_locally_availability_j8aguo_k$ = function () {
    return this.download_locally_availability_1;
  };
  protoOf(strings).get_download_cloud_availability_121mmr_k$ = function () {
    return this.download_cloud_availability_1;
  };
  protoOf(strings).get_insufficient_space_g2o7n1_k$ = function () {
    return this.insufficient_space_1;
  };
  protoOf(strings).get_download_entry_state_paused_ozysqx_k$ = function () {
    return this.download_entry_state_paused_1;
  };
  protoOf(strings).get_get_app_10onj_k$ = function () {
    return this.get_app_1;
  };
  protoOf(strings).get_no_app_found_m7e3z_k$ = function () {
    return this.no_app_found_1;
  };
  protoOf(strings).get_entry_details_author_3c5xk2_k$ = function () {
    return this.entry_details_author_1;
  };
  protoOf(strings).get_entry_details_publisher_33y2fd_k$ = function () {
    return this.entry_details_publisher_1;
  };
  protoOf(strings).get_entry_details_license_izsq7m_k$ = function () {
    return this.entry_details_license_1;
  };
  protoOf(strings).get_file_not_found_lxq3a4_k$ = function () {
    return this.file_not_found_1;
  };
  protoOf(strings).get_multiple_choice_3oqc6x_k$ = function () {
    return this.multiple_choice_1;
  };
  protoOf(strings).get_preview_3zvuox_k$ = function () {
    return this.preview_1;
  };
  protoOf(strings).get_content_creation_storage_option_title_u1x4qr_k$ = function () {
    return this.content_creation_storage_option_title_1;
  };
  protoOf(strings).get_file_required_prompt_olip9y_k$ = function () {
    return this.file_required_prompt_1;
  };
  protoOf(strings).get_content_creation_folder_new_message_y4xmew_k$ = function () {
    return this.content_creation_folder_new_message_1;
  };
  protoOf(strings).get_content_creation_folder_update_message_16rnf3_k$ = function () {
    return this.content_creation_folder_update_message_1;
  };
  protoOf(strings).get_error_message_load_page_mee9ww_k$ = function () {
    return this.error_message_load_page_1;
  };
  protoOf(strings).get_error_message_update_document_kvv7ll_k$ = function () {
    return this.error_message_update_document_1;
  };
  protoOf(strings).get_supported_files_lfn2gz_k$ = function () {
    return this.supported_files_1;
  };
  protoOf(strings).get_content_editor_save_error_khawbb_k$ = function () {
    return this.content_editor_save_error_1;
  };
  protoOf(strings).get_content_entry_export_inprogress_p5cdq7_k$ = function () {
    return this.content_entry_export_inprogress_1;
  };
  protoOf(strings).get_content_entry_export_message_u09qdk_k$ = function () {
    return this.content_entry_export_message_1;
  };
  protoOf(strings).get_show_hidden_items_bjdv3w_k$ = function () {
    return this.show_hidden_items_1;
  };
  protoOf(strings).get_open_folder_6wyuu2_k$ = function () {
    return this.open_folder_1;
  };
  protoOf(strings).get_action_hidden_ivdine_k$ = function () {
    return this.action_hidden_1;
  };
  protoOf(strings).get_invalid_xocxse_k$ = function () {
    return this.invalid_1;
  };
  protoOf(strings).get_enter_register_code_hnq5q1_k$ = function () {
    return this.enter_register_code_1;
  };
  protoOf(strings).get_bar_chart_w1i0ax_k$ = function () {
    return this.bar_chart_1;
  };
  protoOf(strings).get_line_chart_hufnok_k$ = function () {
    return this.line_chart_1;
  };
  protoOf(strings).get_score_iyfcrt_k$ = function () {
    return this.score_1;
  };
  protoOf(strings).get_content_total_duration_8q20ci_k$ = function () {
    return this.content_total_duration_1;
  };
  protoOf(strings).get_content_average_duration_it2ix1_k$ = function () {
    return this.content_average_duration_1;
  };
  protoOf(strings).get_count_session_gkirwj_k$ = function () {
    return this.count_session_1;
  };
  protoOf(strings).get_interaction_recorded_8d406_k$ = function () {
    return this.interaction_recorded_1;
  };
  protoOf(strings).get_number_active_users_w2f7mk_k$ = function () {
    return this.number_active_users_1;
  };
  protoOf(strings).get_average_usage_time_per_user_83fg0a_k$ = function () {
    return this.average_usage_time_per_user_1;
  };
  protoOf(strings).get_number_students_completed_9f7ipd_k$ = function () {
    return this.number_students_completed_1;
  };
  protoOf(strings).get_percent_students_completed_41wpnd_k$ = function () {
    return this.percent_students_completed_1;
  };
  protoOf(strings).get_total_attendances_ttt1fq_k$ = function () {
    return this.total_attendances_1;
  };
  protoOf(strings).get_total_absences_rbm2yu_k$ = function () {
    return this.total_absences_1;
  };
  protoOf(strings).get_total_lates_7a4odl_k$ = function () {
    return this.total_lates_1;
  };
  protoOf(strings).get_percent_students_attended_hwgwpv_k$ = function () {
    return this.percent_students_attended_1;
  };
  protoOf(strings).get_percent_students_attended_or_late_x6u55s_k$ = function () {
    return this.percent_students_attended_or_late_1;
  };
  protoOf(strings).get_total_number_of_classes_o6bi34_k$ = function () {
    return this.total_number_of_classes_1;
  };
  protoOf(strings).get_number_unique_students_attending_lda9um_k$ = function () {
    return this.number_unique_students_attending_1;
  };
  protoOf(strings).get_xapi_day_487qrs_k$ = function () {
    return this.xapi_day_1;
  };
  protoOf(strings).get_xapi_week_az7upk_k$ = function () {
    return this.xapi_week_1;
  };
  protoOf(strings).get_xapi_month_eohgrw_k$ = function () {
    return this.xapi_month_1;
  };
  protoOf(strings).get_xapi_custom_date_ewgew8_k$ = function () {
    return this.xapi_custom_date_1;
  };
  protoOf(strings).get_xapi_content_entry_vaemzc_k$ = function () {
    return this.xapi_content_entry_1;
  };
  protoOf(strings).get_xapi_clear_eixerd_k$ = function () {
    return this.xapi_clear_1;
  };
  protoOf(strings).get_last_week_date_range_b7c6rb_k$ = function () {
    return this.last_week_date_range_1;
  };
  protoOf(strings).get_last_two_week_date_range_cm5uik_k$ = function () {
    return this.last_two_week_date_range_1;
  };
  protoOf(strings).get_last_month_date_range_o1t817_k$ = function () {
    return this.last_month_date_range_1;
  };
  protoOf(strings).get_last_three_months_date_range_z30pe1_k$ = function () {
    return this.last_three_months_date_range_1;
  };
  protoOf(strings).get_new_custom_date_range_pahwr2_k$ = function () {
    return this.new_custom_date_range_1;
  };
  protoOf(strings).get_selected_custom_range_jr9h4a_k$ = function () {
    return this.selected_custom_range_1;
  };
  protoOf(strings).get_time_range_1et3qk_k$ = function () {
    return this.time_range_1;
  };
  protoOf(strings).get_year_woy26e_k$ = function () {
    return this.year_1;
  };
  protoOf(strings).get_from_wom7eb_k$ = function () {
    return this.from_1;
  };
  protoOf(strings).get_done_wokv63_k$ = function () {
    return this.done_1;
  };
  protoOf(strings).get_xapi_options_general_inpjhv_k$ = function () {
    return this.xapi_options_general_1;
  };
  protoOf(strings).get_xapi_options_report_title_g5nxb6_k$ = function () {
    return this.xapi_options_report_title_1;
  };
  protoOf(strings).get_xapi_options_visual_type_v0ts4c_k$ = function () {
    return this.xapi_options_visual_type_1;
  };
  protoOf(strings).get_xapi_options_data_set_9tloyq_k$ = function () {
    return this.xapi_options_data_set_1;
  };
  protoOf(strings).get_xapi_options_series_d5qsjw_k$ = function () {
    return this.xapi_options_series_1;
  };
  protoOf(strings).get_xapi_options_axes_8n50qu_k$ = function () {
    return this.xapi_options_axes_1;
  };
  protoOf(strings).get_xapi_options_y_axes_fwf7pc_k$ = function () {
    return this.xapi_options_y_axes_1;
  };
  protoOf(strings).get_xapi_options_x_axes_ffdlb5_k$ = function () {
    return this.xapi_options_x_axes_1;
  };
  protoOf(strings).get_xapi_options_subgroup_gzlk7o_k$ = function () {
    return this.xapi_options_subgroup_1;
  };
  protoOf(strings).get_xapi_options_filters_5unh8m_k$ = function () {
    return this.xapi_options_filters_1;
  };
  protoOf(strings).get_xapi_options_who_wcukzb_k$ = function () {
    return this.xapi_options_who_1;
  };
  protoOf(strings).get_xapi_options_did_wcuz1y_k$ = function () {
    return this.xapi_options_did_1;
  };
  protoOf(strings).get_xapi_options_what_8mrazr_k$ = function () {
    return this.xapi_options_what_1;
  };
  protoOf(strings).get_xapi_options_when_8mrawh_k$ = function () {
    return this.xapi_options_when_1;
  };
  protoOf(strings).get_xapi_options_where_gixu42_k$ = function () {
    return this.xapi_options_where_1;
  };
  protoOf(strings).get_time_range_all_9xp706_k$ = function () {
    return this.time_range_all_1;
  };
  protoOf(strings).get_report_filter_edit_field_kduriu_k$ = function () {
    return this.report_filter_edit_field_1;
  };
  protoOf(strings).get_report_filter_edit_condition_hzgqbv_k$ = function () {
    return this.report_filter_edit_condition_1;
  };
  protoOf(strings).get_report_filter_edit_values_esz1te_k$ = function () {
    return this.report_filter_edit_values_1;
  };
  protoOf(strings).get_report_iye43h_k$ = function () {
    return this.report_1;
  };
  protoOf(strings).get_create_a_new_report_qns1bp_k$ = function () {
    return this.create_a_new_report_1;
  };
  protoOf(strings).get_edit_report_o6prog_k$ = function () {
    return this.edit_report_1;
  };
  protoOf(strings).get_verb_wow5m0_k$ = function () {
    return this.verb_1;
  };
  protoOf(strings).get_add_a_new_verb_r78fs3_k$ = function () {
    return this.add_a_new_verb_1;
  };
  protoOf(strings).get_id_verbentity_urlid_g3mg5k_k$ = function () {
    return this.id_verbentity_urlid_1;
  };
  protoOf(strings).get_edit_filters_ofai9_k$ = function () {
    return this.edit_filters_1;
  };
  protoOf(strings).get_field_person_gender_hh8t1f_k$ = function () {
    return this.field_person_gender_1;
  };
  protoOf(strings).get_field_person_age_fuckzn_k$ = function () {
    return this.field_person_age_1;
  };
  protoOf(strings).get_field_content_completion_j7te34_k$ = function () {
    return this.field_content_completion_1;
  };
  protoOf(strings).get_field_content_entry_4lh2ke_k$ = function () {
    return this.field_content_entry_1;
  };
  protoOf(strings).get_field_content_progress_4zcuzl_k$ = function () {
    return this.field_content_progress_1;
  };
  protoOf(strings).get_field_attendance_percentage_rp9gw2_k$ = function () {
    return this.field_attendance_percentage_1;
  };
  protoOf(strings).get_condition_is_fcggdl_k$ = function () {
    return this.condition_is_1;
  };
  protoOf(strings).get_condition_is_not_acyclx_k$ = function () {
    return this.condition_is_not_1;
  };
  protoOf(strings).get_condition_greater_than_9ao13h_k$ = function () {
    return this.condition_greater_than_1;
  };
  protoOf(strings).get_condition_less_than_exb18a_k$ = function () {
    return this.condition_less_than_1;
  };
  protoOf(strings).get_condition_in_list_vmpwob_k$ = function () {
    return this.condition_in_list_1;
  };
  protoOf(strings).get_condition_not_in_list_8mc69r_k$ = function () {
    return this.condition_not_in_list_1;
  };
  protoOf(strings).get_condition_between_40m0g5_k$ = function () {
    return this.condition_between_1;
  };
  protoOf(strings).get_add_person_filter_93b76t_k$ = function () {
    return this.add_person_filter_1;
  };
  protoOf(strings).get_add_verb_filter_dqp67_k$ = function () {
    return this.add_verb_filter_1;
  };
  protoOf(strings).get_add_content_filter_ahuk9n_k$ = function () {
    return this.add_content_filter_1;
  };
  protoOf(strings).get_dashboard_8tch79_k$ = function () {
    return this.dashboard_1;
  };
  protoOf(strings).get_activity_import_link_a2xt3n_k$ = function () {
    return this.activity_import_link_1;
  };
  protoOf(strings).get_xapi_hours_elqmyj_k$ = function () {
    return this.xapi_hours_1;
  };
  protoOf(strings).get_xapi_minutes_udewl1_k$ = function () {
    return this.xapi_minutes_1;
  };
  protoOf(strings).get_xapi_seconds_fehfpx_k$ = function () {
    return this.xapi_seconds_1;
  };
  protoOf(strings).get_xapi_verb_header_g9emjr_k$ = function () {
    return this.xapi_verb_header_1;
  };
  protoOf(strings).get_xapi_result_header_da0p7f_k$ = function () {
    return this.xapi_result_header_1;
  };
  protoOf(strings).get_xapi_score_erkl6m_k$ = function () {
    return this.xapi_score_1;
  };
  protoOf(strings).get_content_score_yb659_k$ = function () {
    return this.content_score_1;
  };
  protoOf(strings).get_completion_key_ip9l6j_k$ = function () {
    return this.completion_key_1;
  };
  protoOf(strings).get_import_title_not_entered_h438sz_k$ = function () {
    return this.import_title_not_entered_1;
  };
  protoOf(strings).get_no_account_hgdy60_k$ = function () {
    return this.no_account_1;
  };
  protoOf(strings).get_enter_url_5o4aht_k$ = function () {
    return this.enter_url_1;
  };
  protoOf(strings).get_invalid_link_d9bc7f_k$ = function () {
    return this.invalid_link_1;
  };
  protoOf(strings).get_invalid_file_d97i8d_k$ = function () {
    return this.invalid_file_1;
  };
  protoOf(strings).get_import_link_content_not_supported_4rqp48_k$ = function () {
    return this.import_link_content_not_supported_1;
  };
  protoOf(strings).get_unsupported_file_type_e13bfa_k$ = function () {
    return this.unsupported_file_type_1;
  };
  protoOf(strings).get_import_link_big_size_8lyczw_k$ = function () {
    return this.import_link_big_size_1;
  };
  protoOf(strings).get_import_link_error_dofsfo_k$ = function () {
    return this.import_link_error_1;
  };
  protoOf(strings).get_supported_link_1lpa7o_k$ = function () {
    return this.supported_link_1;
  };
  protoOf(strings).get_offline_sharing_enable_bluetooth_prompt_n12u95_k$ = function () {
    return this.offline_sharing_enable_bluetooth_prompt_1;
  };
  protoOf(strings).get_offline_sharing_enable_wifi_promot_gk4b51_k$ = function () {
    return this.offline_sharing_enable_wifi_promot_1;
  };
  protoOf(strings).get_enable_cxhbpo_k$ = function () {
    return this.enable_1;
  };
  protoOf(strings).get_repo_loading_status_loading_cloud_biz7d8_k$ = function () {
    return this.repo_loading_status_loading_cloud_1;
  };
  protoOf(strings).get_repo_loading_status_loading_mirror_6vlrrc_k$ = function () {
    return this.repo_loading_status_loading_mirror_1;
  };
  protoOf(strings).get_repo_loading_status_failed_noconnection_56a797_k$ = function () {
    return this.repo_loading_status_failed_noconnection_1;
  };
  protoOf(strings).get_repo_loading_status_failed_connection_error_fng3wd_k$ = function () {
    return this.repo_loading_status_failed_connection_error_1;
  };
  protoOf(strings).get_licence_type_cc_by_rwairs_k$ = function () {
    return this.licence_type_cc_by_1;
  };
  protoOf(strings).get_licence_type_cc_by_sa_i5031h_k$ = function () {
    return this.licence_type_cc_by_sa_1;
  };
  protoOf(strings).get_licence_type_cc_by_sa_nc_pjyzox_k$ = function () {
    return this.licence_type_cc_by_sa_nc_1;
  };
  protoOf(strings).get_licence_type_cc_by_nc_i502x8_k$ = function () {
    return this.licence_type_cc_by_nc_1;
  };
  protoOf(strings).get_licence_type_cc_by_nc_sa_pmookf_k$ = function () {
    return this.licence_type_cc_by_nc_sa_1;
  };
  protoOf(strings).get_licence_type_public_domain_vutavg_k$ = function () {
    return this.licence_type_public_domain_1;
  };
  protoOf(strings).get_licence_type_all_rights_mwfvcz_k$ = function () {
    return this.licence_type_all_rights_1;
  };
  protoOf(strings).get_license_type_cc_0_wrjrv3_k$ = function () {
    return this.license_type_cc_0__1;
  };
  protoOf(strings).get_syncing_rjvog2_k$ = function () {
    return this.syncing_1;
  };
  protoOf(strings).get_feed_wolxif_k$ = function () {
    return this.feed_1;
  };
  protoOf(strings).get_people_i0a8wo_k$ = function () {
    return this.people_1;
  };
  protoOf(strings).get_record_attendance_7e5gxa_k$ = function () {
    return this.record_attendance_1;
  };
  protoOf(strings).get_today_iz6kns_k$ = function () {
    return this.today_1;
  };
  protoOf(strings).get_sort_by_w7u2xd_k$ = function () {
    return this.sort_by_1;
  };
  protoOf(strings).get_log_18j19h_k$ = function () {
    return this.log_1;
  };
  protoOf(strings).get_schedule_rong4g_k$ = function () {
    return this.schedule_1;
  };
  protoOf(strings).get_add_a_schedule_74clpg_k$ = function () {
    return this.add_a_schedule_1;
  };
  protoOf(strings).get_edit_schedule_knbshp_k$ = function () {
    return this.edit_schedule_1;
  };
  protoOf(strings).get_first_key_apwzvr_k$ = function () {
    return this.first_key_1;
  };
  protoOf(strings).get_last_key_f3h2wv_k$ = function () {
    return this.last_key_1;
  };
  protoOf(strings).get_last_week_t7v830_k$ = function () {
    return this.last_week_1;
  };
  protoOf(strings).get_mark_all_rq0gzs_k$ = function () {
    return this.mark_all_1;
  };
  protoOf(strings).get_mark_all_present_48jrsk_k$ = function () {
    return this.mark_all_present_1;
  };
  protoOf(strings).get_mark_all_absent_ml0x9c_k$ = function () {
    return this.mark_all_absent_1;
  };
  protoOf(strings).get_present_3zxuem_k$ = function () {
    return this.present_1;
  };
  protoOf(strings).get_absent_av0v2a_k$ = function () {
    return this.absent_1;
  };
  protoOf(strings).get_attendance_report_dutsv3_k$ = function () {
    return this.attendance_report_1;
  };
  protoOf(strings).get_father_d7pvfp_k$ = function () {
    return this.father_1;
  };
  protoOf(strings).get_mother_gqqci4_k$ = function () {
    return this.mother_1;
  };
  protoOf(strings).get_birthday_e49are_k$ = function () {
    return this.birthday_1;
  };
  protoOf(strings).get_first_names_2e2jkg_k$ = function () {
    return this.first_names_1;
  };
  protoOf(strings).get_basic_details_x2g0s8_k$ = function () {
    return this.basic_details_1;
  };
  protoOf(strings).get_address_hpr2t1_k$ = function () {
    return this.address_1;
  };
  protoOf(strings).get_add_person_to_class_cmllex_k$ = function () {
    return this.add_person_to_class_1;
  };
  protoOf(strings).get_edit_wol9w3_k$ = function () {
    return this.edit_1;
  };
  protoOf(strings).get_clazz_ips3zj_k$ = function () {
    return this.clazz_1;
  };
  protoOf(strings).get_add_a_new_class_9ff0zw_k$ = function () {
    return this.add_a_new_class_1;
  };
  protoOf(strings).get_edit_clazz_hboi24_k$ = function () {
    return this.edit_clazz_1;
  };
  protoOf(strings).get_add_a_class_echlhv_k$ = function () {
    return this.add_a_class_1;
  };
  protoOf(strings).get_join_existing_class_q9m6fk_k$ = function () {
    return this.join_existing_class_1;
  };
  protoOf(strings).get_student_image_b00l3m_k$ = function () {
    return this.student_image_1;
  };
  protoOf(strings).get_question_key_1pa6kv_k$ = function () {
    return this.question_key_1;
  };
  protoOf(strings).get_add_question_md84y5_k$ = function () {
    return this.add_question_1;
  };
  protoOf(strings).get_edit_question_sdxkfi_k$ = function () {
    return this.edit_question_1;
  };
  protoOf(strings).get_questions_kyknz0_k$ = function () {
    return this.questions_1;
  };
  protoOf(strings).get_add_person_c8vpz0_k$ = function () {
    return this.add_person_1;
  };
  protoOf(strings).get_add_class_dy433l_k$ = function () {
    return this.add_class_1;
  };
  protoOf(strings).get_class_name_oz6ydh_k$ = function () {
    return this.class_name_1;
  };
  protoOf(strings).get_class_description_431ouk_k$ = function () {
    return this.class_description_1;
  };
  protoOf(strings).get_to_key_k1ocro_k$ = function () {
    return this.to_key_1;
  };
  protoOf(strings).get_holiday_jbn9tb_k$ = function () {
    return this.holiday_1;
  };
  protoOf(strings).get_add_a_holiday_bbriur_k$ = function () {
    return this.add_a_holiday_1;
  };
  protoOf(strings).get_edit_holiday_vifyb0_k$ = function () {
    return this.edit_holiday_1;
  };
  protoOf(strings).get_holidays_us50is_k$ = function () {
    return this.holidays_1;
  };
  protoOf(strings).get_holiday_calendar_5mpu5u_k$ = function () {
    return this.holiday_calendar_1;
  };
  protoOf(strings).get_add_a_new_holiday_calendar_xnk3d5_k$ = function () {
    return this.add_a_new_holiday_calendar_1;
  };
  protoOf(strings).get_edit_holiday_calendar_wr01n3_k$ = function () {
    return this.edit_holiday_calendar_1;
  };
  protoOf(strings).get_features_enabled_lmi4ug_k$ = function () {
    return this.features_enabled_1;
  };
  protoOf(strings).get_weekly_lbf43u_k$ = function () {
    return this.weekly_1;
  };
  protoOf(strings).get_once_worv0q_k$ = function () {
    return this.once_1;
  };
  protoOf(strings).get_daily_iq51bk_k$ = function () {
    return this.daily_1;
  };
  protoOf(strings).get_monthly_lptc84_k$ = function () {
    return this.monthly_1;
  };
  protoOf(strings).get_yearly_m9fy4z_k$ = function () {
    return this.yearly_1;
  };
  protoOf(strings).get_sunday_jo6xg9_k$ = function () {
    return this.sunday_1;
  };
  protoOf(strings).get_monday_gqmfix_k$ = function () {
    return this.monday_1;
  };
  protoOf(strings).get_tuesday_ewbxcs_k$ = function () {
    return this.tuesday_1;
  };
  protoOf(strings).get_wednesday_vk70dp_k$ = function () {
    return this.wednesday_1;
  };
  protoOf(strings).get_thursday_5sz4v1_k$ = function () {
    return this.thursday_1;
  };
  protoOf(strings).get_friday_dgv9m0_k$ = function () {
    return this.friday_1;
  };
  protoOf(strings).get_saturday_49fmv6_k$ = function () {
    return this.saturday_1;
  };
  protoOf(strings).get_day_18j7il_k$ = function () {
    return this.day_1;
  };
  protoOf(strings).get_toC_18ivcx_k$ = function () {
    return this.toC_1;
  };
  protoOf(strings).get_last_month_hh9e00_k$ = function () {
    return this.last_month_1;
  };
  protoOf(strings).get_activity_change_ruthjd_k$ = function () {
    return this.activity_change_1;
  };
  protoOf(strings).get_change_implemented_if_any_bdglcj_k$ = function () {
    return this.change_implemented_if_any_1;
  };
  protoOf(strings).get_duration_6a6kpp_k$ = function () {
    return this.duration_1;
  };
  protoOf(strings).get_how_did_it_go_5e540s_k$ = function () {
    return this.how_did_it_go_1;
  };
  protoOf(strings).get_notes_ivw520_k$ = function () {
    return this.notes_1;
  };
  protoOf(strings).get_activity_bu9714_k$ = function () {
    return this.activity_1;
  };
  protoOf(strings).get_sort_by_name_n4hexx_k$ = function () {
    return this.sort_by_name_1;
  };
  protoOf(strings).get_sort_by_name_asc_41mwct_k$ = function () {
    return this.sort_by_name_asc_1;
  };
  protoOf(strings).get_sort_by_name_desc_gnglvv_k$ = function () {
    return this.sort_by_name_desc_1;
  };
  protoOf(strings).get_date_enroll_tg6mem_k$ = function () {
    return this.date_enroll_1;
  };
  protoOf(strings).get_date_left_4e7psf_k$ = function () {
    return this.date_left_1;
  };
  protoOf(strings).get_enroled_p36fr8_k$ = function () {
    return this.enroled_1;
  };
  protoOf(strings).get_class_enrolment_tnthpw_k$ = function () {
    return this.class_enrolment_1;
  };
  protoOf(strings).get_graduated_gdenu8_k$ = function () {
    return this.graduated_1;
  };
  protoOf(strings).get_dropped_out_k8l9ui_k$ = function () {
    return this.dropped_out_1;
  };
  protoOf(strings).get_moved_ivcdxm_k$ = function () {
    return this.moved_1;
  };
  protoOf(strings).get_new_leaving_reason_6j30ll_k$ = function () {
    return this.new_leaving_reason_1;
  };
  protoOf(strings).get_edit_leaving_reason_eiflaz_k$ = function () {
    return this.edit_leaving_reason_1;
  };
  protoOf(strings).get_edit_enrolment_xzlzp4_k$ = function () {
    return this.edit_enrolment_1;
  };
  protoOf(strings).get_new_enrolment_cnesdg_k$ = function () {
    return this.new_enrolment_1;
  };
  protoOf(strings).get_select_leaving_reason_lyvxd5_k$ = function () {
    return this.select_leaving_reason_1;
  };
  protoOf(strings).get_add_leaving_reason_99y6ei_k$ = function () {
    return this.add_leaving_reason_1;
  };
  protoOf(strings).get_leaving_reason_ye23m0_k$ = function () {
    return this.leaving_reason_1;
  };
  protoOf(strings).get_leaving_reasons_n4a85_k$ = function () {
    return this.leaving_reasons_1;
  };
  protoOf(strings).get_leaving_reason_manage_4xayx8_k$ = function () {
    return this.leaving_reason_manage_1;
  };
  protoOf(strings).get_view_profile_wgbqs8_k$ = function () {
    return this.view_profile_1;
  };
  protoOf(strings).get_class_enrolment_outcome_syfojd_k$ = function () {
    return this.class_enrolment_outcome_1;
  };
  protoOf(strings).get_class_enrolment_leaving_9tcihj_k$ = function () {
    return this.class_enrolment_leaving_1;
  };
  protoOf(strings).get_in_progress_1fk8ta_k$ = function () {
    return this.in_progress_1;
  };
  protoOf(strings).get_outcome_h18cyf_k$ = function () {
    return this.outcome_1;
  };
  protoOf(strings).get_person_enrolment_in_class_yo1m06_k$ = function () {
    return this.person_enrolment_in_class_1;
  };
  protoOf(strings).get_enrolment_udisp1_k$ = function () {
    return this.enrolment_1;
  };
  protoOf(strings).get_error_start_date_before_clazz_date_svak5b_k$ = function () {
    return this.error_start_date_before_clazz_date_1;
  };
  protoOf(strings).get_error_start_date_before_previous_enrolment_date_lrenqd_k$ = function () {
    return this.error_start_date_before_previous_enrolment_date_1;
  };
  protoOf(strings).get_time_present_s5j4vi_k$ = function () {
    return this.time_present_1;
  };
  protoOf(strings).get_ascending_8fl3qn_k$ = function () {
    return this.ascending_1;
  };
  protoOf(strings).get_descending_we8vi9_k$ = function () {
    return this.descending_1;
  };
  protoOf(strings).get_sort_by_text_n4dhs3_k$ = function () {
    return this.sort_by_text_1;
  };
  protoOf(strings).get_attendance_high_to_low_jqxfuo_k$ = function () {
    return this.attendance_high_to_low_1;
  };
  protoOf(strings).get_attendance_low_to_high_lxe7gy_k$ = function () {
    return this.attendance_low_to_high_1;
  };
  protoOf(strings).get_teacher_mjj6rr_k$ = function () {
    return this.teacher_1;
  };
  protoOf(strings).get_add_a_teacher_ujexqb_k$ = function () {
    return this.add_a_teacher_1;
  };
  protoOf(strings).get_partial_bujdrc_k$ = function () {
    return this.partial_1;
  };
  protoOf(strings).get_teachers_literal_n9taeu_k$ = function () {
    return this.teachers_literal_1;
  };
  protoOf(strings).get_participant_ql3rnu_k$ = function () {
    return this.participant_1;
  };
  protoOf(strings).get_primary_user_dvsclr_k$ = function () {
    return this.primary_user_1;
  };
  protoOf(strings).get_up_key_kj9rr8_k$ = function () {
    return this.up_key_1;
  };
  protoOf(strings).get_down_key_8730fp_k$ = function () {
    return this.down_key_1;
  };
  protoOf(strings).get_activity_went_good_4pqxr_k$ = function () {
    return this.activity_went_good_1;
  };
  protoOf(strings).get_activity_went_bad_kmjjfj_k$ = function () {
    return this.activity_went_bad_1;
  };
  protoOf(strings).get_activity_enter_any_notes_g4hx7k_k$ = function () {
    return this.activity_enter_any_notes_1;
  };
  protoOf(strings).get_uom_frequency_title_juovkw_k$ = function () {
    return this.uom_frequency_title_1;
  };
  protoOf(strings).get_uom_duration_title_t0bkda_k$ = function () {
    return this.uom_duration_title_1;
  };
  protoOf(strings).get_uom_boolean_title_axhcno_k$ = function () {
    return this.uom_boolean_title_1;
  };
  protoOf(strings).get_uom_default_title_p0jdob_k$ = function () {
    return this.uom_default_title_1;
  };
  protoOf(strings).get_add_activity_e9fnsm_k$ = function () {
    return this.add_activity_1;
  };
  protoOf(strings).get_add_activity_literal_yu62li_k$ = function () {
    return this.add_activity_literal_1;
  };
  protoOf(strings).get_select_one_nh58vg_k$ = function () {
    return this.select_one_1;
  };
  protoOf(strings).get_measurement_type_sea9ba_k$ = function () {
    return this.measurement_type_1;
  };
  protoOf(strings).get_frequency_7ctygj_k$ = function () {
    return this.frequency_1;
  };
  protoOf(strings).get_yes_no_m9r1uq_k$ = function () {
    return this.yes_no_1;
  };
  protoOf(strings).get_time_period_qe8dfu_k$ = function () {
    return this.time_period_1;
  };
  protoOf(strings).get_location_d3s02_k$ = function () {
    return this.location_1;
  };
  protoOf(strings).get_last_three_months_4pbpbg_k$ = function () {
    return this.last_three_months_1;
  };
  protoOf(strings).get_export_d3948t_k$ = function () {
    return this.export_1;
  };
  protoOf(strings).get_date_wokkxj_k$ = function () {
    return this.date_1;
  };
  protoOf(strings).get_average_96e6do_k$ = function () {
    return this.average_1;
  };
  protoOf(strings).get_age_18j9m2_k$ = function () {
    return this.age_1;
  };
  protoOf(strings).get_days_wokl28_k$ = function () {
    return this.days_1;
  };
  protoOf(strings).get_apply_iordj9_k$ = function () {
    return this.apply_1;
  };
  protoOf(strings).get_file_selected_nzdt0r_k$ = function () {
    return this.file_selected_1;
  };
  protoOf(strings).get_all_18j9hk_k$ = function () {
    return this.all_1;
  };
  protoOf(strings).get_holiday_calendars_wi0uzf_k$ = function () {
    return this.holiday_calendars_1;
  };
  protoOf(strings).get_holiday_calendars_desc_tjvomj_k$ = function () {
    return this.holiday_calendars_desc_1;
  };
  protoOf(strings).get_sel_question_set_8ghazt_k$ = function () {
    return this.sel_question_set_1;
  };
  protoOf(strings).get_sel_question_set_desc_qkaamf_k$ = function () {
    return this.sel_question_set_desc_1;
  };
  protoOf(strings).get_users_izsycf_k$ = function () {
    return this.users_1;
  };
  protoOf(strings).get_nomination_oo4dsj_k$ = function () {
    return this.nomination_1;
  };
  protoOf(strings).get_active_avldsf_k$ = function () {
    return this.active_1;
  };
  protoOf(strings).get_class_id_kcogz9_k$ = function () {
    return this.class_id_1;
  };
  protoOf(strings).get_gender_literal_6gla6e_k$ = function () {
    return this.gender_literal_1;
  };
  protoOf(strings).get_country_h3tl7x_k$ = function () {
    return this.country_1;
  };
  protoOf(strings).get_connectivity_yogi68_k$ = function () {
    return this.connectivity_1;
  };
  protoOf(strings).get_home_internet_access_39q96d_k$ = function () {
    return this.home_internet_access_1;
  };
  protoOf(strings).get_mobile_internet_access_1q5xq_k$ = function () {
    return this.mobile_internet_access_1;
  };
  protoOf(strings).get_connectivity_limited_4ms1gb_k$ = function () {
    return this.connectivity_limited_1;
  };
  protoOf(strings).get_connectivity_full_ig43v6_k$ = function () {
    return this.connectivity_full_1;
  };
  protoOf(strings).get_prefer_not_to_say_m2imex_k$ = function () {
    return this.prefer_not_to_say_1;
  };
  protoOf(strings).get_sel_question_set_to_use_jpial1_k$ = function () {
    return this.sel_question_set_to_use_1;
  };
  protoOf(strings).get_search_jf67jl_k$ = function () {
    return this.search_1;
  };
  protoOf(strings).get_attendance_percentage_dilz09_k$ = function () {
    return this.attendance_percentage_1;
  };
  protoOf(strings).get_filter_dbzd6p_k$ = function () {
    return this.filter_1;
  };
  protoOf(strings).get_over_key_n1q5s3_k$ = function () {
    return this.over_key_1;
  };
  protoOf(strings).get_sync_woundw_k$ = function () {
    return this.sync_1;
  };
  protoOf(strings).get_not_recorded_wfq9r9_k$ = function () {
    return this.not_recorded_1;
  };
  protoOf(strings).get_groups_dy12vx_k$ = function () {
    return this.groups_1;
  };
  protoOf(strings).get_group_setting_desc_l31d3r_k$ = function () {
    return this.group_setting_desc_1;
  };
  protoOf(strings).get_roles_iy35hw_k$ = function () {
    return this.roles_1;
  };
  protoOf(strings).get_role_wotsxr_k$ = function () {
    return this.role_1;
  };
  protoOf(strings).get_add_a_new_role_r7633u_k$ = function () {
    return this.add_a_new_role_1;
  };
  protoOf(strings).get_edit_role_mchkwu_k$ = function () {
    return this.edit_role_1;
  };
  protoOf(strings).get_rols_assignment_5lrnun_k$ = function () {
    return this.rols_assignment_1;
  };
  protoOf(strings).get_role_assignment_setting_desc_utcqb2_k$ = function () {
    return this.role_assignment_setting_desc_1;
  };
  protoOf(strings).get_locations_ba93yj_k$ = function () {
    return this.locations_1;
  };
  protoOf(strings).get_locations_setting_desc_88ewa_k$ = function () {
    return this.locations_setting_desc_1;
  };
  protoOf(strings).get_audit_log_bpiek7_k$ = function () {
    return this.audit_log_1;
  };
  protoOf(strings).get_audit_log_setting_desc_cu4d08_k$ = function () {
    return this.audit_log_setting_desc_1;
  };
  protoOf(strings).get_entry_key_lb52h_k$ = function () {
    return this.entry_key_1;
  };
  protoOf(strings).get_permission_key_9ky320_k$ = function () {
    return this.permission_key_1;
  };
  protoOf(strings).get_permissions_wn6gpn_k$ = function () {
    return this.permissions_1;
  };
  protoOf(strings).get_role_name_e2h2x7_k$ = function () {
    return this.role_name_1;
  };
  protoOf(strings).get_members_key_xy93qo_k$ = function () {
    return this.members_key_1;
  };
  protoOf(strings).get_member_key_sok8g3_k$ = function () {
    return this.member_key_1;
  };
  protoOf(strings).get_role_assignment_oa608j_k$ = function () {
    return this.role_assignment_1;
  };
  protoOf(strings).get_scope_by_v60puz_k$ = function () {
    return this.scope_by_1;
  };
  protoOf(strings).get_assign_to_vz3leq_k$ = function () {
    return this.assign_to_1;
  };
  protoOf(strings).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(strings).get_add_a_new_person_23g99j_k$ = function () {
    return this.add_a_new_person_1;
  };
  protoOf(strings).get_edit_person_p4rnlr_k$ = function () {
    return this.edit_person_1;
  };
  protoOf(strings).get_permission_person_select_1t7mv5_k$ = function () {
    return this.permission_person_select_1;
  };
  protoOf(strings).get_permission_person_insert_6el878_k$ = function () {
    return this.permission_person_insert_1;
  };
  protoOf(strings).get_permission_person_update_p7u0k_k$ = function () {
    return this.permission_person_update_1;
  };
  protoOf(strings).get_permission_person_picture_select_l173kw_k$ = function () {
    return this.permission_person_picture_select_1;
  };
  protoOf(strings).get_permission_person_picture_insert_gfti8t_k$ = function () {
    return this.permission_person_picture_insert_1;
  };
  protoOf(strings).get_permission_person_picture_update_m56wfh_k$ = function () {
    return this.permission_person_picture_update_1;
  };
  protoOf(strings).get_permission_clazz_select_b0qoxi_k$ = function () {
    return this.permission_clazz_select_1;
  };
  protoOf(strings).get_permission_clazz_insert_fm4a9l_k$ = function () {
    return this.permission_clazz_insert_1;
  };
  protoOf(strings).get_permission_clazz_update_9wqw2x_k$ = function () {
    return this.permission_clazz_update_1;
  };
  protoOf(strings).get_permission_clazz_add_teacher_npa852_k$ = function () {
    return this.permission_clazz_add_teacher_1;
  };
  protoOf(strings).get_permission_clazz_add_student_gfkqof_k$ = function () {
    return this.permission_clazz_add_student_1;
  };
  protoOf(strings).get_permission_attendance_select_15w3xn_k$ = function () {
    return this.permission_attendance_select_1;
  };
  protoOf(strings).get_permission_attendance_insert_3fhheg_k$ = function () {
    return this.permission_attendance_insert_1;
  };
  protoOf(strings).get_permission_attendance_update_29vws8_k$ = function () {
    return this.permission_attendance_update_1;
  };
  protoOf(strings).get_permission_activity_select_j73kxn_k$ = function () {
    return this.permission_activity_select_1;
  };
  protoOf(strings).get_permission_activity_insert_nsh69q_k$ = function () {
    return this.permission_activity_insert_1;
  };
  protoOf(strings).get_permission_activity_update_i33s32_k$ = function () {
    return this.permission_activity_update_1;
  };
  protoOf(strings).get_permission_sel_question_select_vg4r87_k$ = function () {
    return this.permission_sel_question_select_1;
  };
  protoOf(strings).get_permission_sel_question_insert_yzlpeu_k$ = function () {
    return this.permission_sel_question_insert_1;
  };
  protoOf(strings).get_permission_sel_question_update_uc4ydm_k$ = function () {
    return this.permission_sel_question_update_1;
  };
  protoOf(strings).get_permission_sel_select_eg4348_k$ = function () {
    return this.permission_sel_select_1;
  };
  protoOf(strings).get_permission_sel_update_fk3vyt_k$ = function () {
    return this.permission_sel_update_1;
  };
  protoOf(strings).get_custom_fields_bsj0ny_k$ = function () {
    return this.custom_fields_1;
  };
  protoOf(strings).get_custom_field_gf3unp_k$ = function () {
    return this.custom_field_1;
  };
  protoOf(strings).get_custom_fields_desc_4boe0e_k$ = function () {
    return this.custom_fields_desc_1;
  };
  protoOf(strings).get_field_type_amsxso_k$ = function () {
    return this.field_type_1;
  };
  protoOf(strings).get_text_wouvsm_k$ = function () {
    return this.text_1;
  };
  protoOf(strings).get_dropdown_w2xql6_k$ = function () {
    return this.dropdown_1;
  };
  protoOf(strings).get_options_jecmyz_k$ = function () {
    return this.options_1;
  };
  protoOf(strings).get_option_value_xw4l0w_k$ = function () {
    return this.option_value_1;
  };
  protoOf(strings).get_errors_czzmno_k$ = function () {
    return this.errors_1;
  };
  protoOf(strings).get_shake_feedback_nkj15z_k$ = function () {
    return this.shake_feedback_1;
  };
  protoOf(strings).get_feedback_hint_xgqiw8_k$ = function () {
    return this.feedback_hint_1;
  };
  protoOf(strings).get_send_feedback_wlmqx9_k$ = function () {
    return this.send_feedback_1;
  };
  protoOf(strings).get_feedback_thanks_mvps62_k$ = function () {
    return this.feedback_thanks_1;
  };
  protoOf(strings).get_start_date_otyn04_k$ = function () {
    return this.start_date_1;
  };
  protoOf(strings).get_end_date_39vk4l_k$ = function () {
    return this.end_date_1;
  };
  protoOf(strings).get_last_active_w8urh6_k$ = function () {
    return this.last_active_1;
  };
  protoOf(strings).get_save_wou5s6_k$ = function () {
    return this.save_1;
  };
  protoOf(strings).get_change_password_nvo7kx_k$ = function () {
    return this.change_password_1;
  };
  protoOf(strings).get_current_password_vl5fu2_k$ = function () {
    return this.current_password_1;
  };
  protoOf(strings).get_password_unchanged_acup7k_k$ = function () {
    return this.password_unchanged_1;
  };
  protoOf(strings).get_timezone_4w1juq_k$ = function () {
    return this.timezone_1;
  };
  protoOf(strings).get_users_settings_desc_eibd1p_k$ = function () {
    return this.users_settings_desc_1;
  };
  protoOf(strings).get_add_18j9oo_k$ = function () {
    return this.add_1;
  };
  protoOf(strings).get_refresh_j7ssmq_k$ = function () {
    return this.refresh_1;
  };
  protoOf(strings).get_school_je71bx_k$ = function () {
    return this.school_1;
  };
  protoOf(strings).get_add_a_new_school_plg3s_k$ = function () {
    return this.add_a_new_school_1;
  };
  protoOf(strings).get_edit_school_nqwug0_k$ = function () {
    return this.edit_school_1;
  };
  protoOf(strings).get_join_existing_school_uncxes_k$ = function () {
    return this.join_existing_school_1;
  };
  protoOf(strings).get_schools_wz5pjq_k$ = function () {
    return this.schools_1;
  };
  protoOf(strings).get_assignments_s7dnoj_k$ = function () {
    return this.assignments_1;
  };
  protoOf(strings).get_assignment_378p7u_k$ = function () {
    return this.assignment_1;
  };
  protoOf(strings).get_none_key_8hn8m7_k$ = function () {
    return this.none_key_1;
  };
  protoOf(strings).get_instructions_for_students_z5y4n3_k$ = function () {
    return this.instructions_for_students_1;
  };
  protoOf(strings).get_not_started_rdo5nw_k$ = function () {
    return this.not_started_1;
  };
  protoOf(strings).get_percentage_complete_4lg0tn_k$ = function () {
    return this.percentage_complete_1;
  };
  protoOf(strings).get_percentage_score_yzglu2_k$ = function () {
    return this.percentage_score_1;
  };
  protoOf(strings).get_started_date_efpgj9_k$ = function () {
    return this.started_date_1;
  };
  protoOf(strings).get_started_u3zbe0_k$ = function () {
    return this.started_1;
  };
  protoOf(strings).get_mixed_iv8lhu_k$ = function () {
    return this.mixed_1;
  };
  protoOf(strings).get_store_title_anz1m7_k$ = function () {
    return this.store_title_1;
  };
  protoOf(strings).get_store_description_short_aonjny_k$ = function () {
    return this.store_description_short_1;
  };
  protoOf(strings).get_store_description_full_r57vdl_k$ = function () {
    return this.store_description_full_1;
  };
  protoOf(strings).get_due_date_37isi_k$ = function () {
    return this.due_date_1;
  };
  protoOf(strings).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  protoOf(strings).get_add_new_content_6jjjjh_k$ = function () {
    return this.add_new_content_1;
  };
  protoOf(strings).get_add_content_jkx0ge_k$ = function () {
    return this.add_content_1;
  };
  protoOf(strings).get_student_progress_jshri2_k$ = function () {
    return this.student_progress_1;
  };
  protoOf(strings).get_status_jnf6d7_k$ = function () {
    return this.status_1;
  };
  protoOf(strings).get_use_device_language_niewhs_k$ = function () {
    return this.use_device_language_1;
  };
  protoOf(strings).get_select_item_hgadxp_k$ = function () {
    return this.select_item_1;
  };
  protoOf(strings).get_from_to_date_gqetei_k$ = function () {
    return this.from_to_date_1;
  };
  protoOf(strings).get_num_items_with_name_cxqu0z_k$ = function () {
    return this.num_items_with_name_1;
  };
  protoOf(strings).get_num_items_with_name_with_comma_oa9ei0_k$ = function () {
    return this.num_items_with_name_with_comma_1;
  };
  protoOf(strings).get_add_to_avur4y_k$ = function () {
    return this.add_to_1;
  };
  protoOf(strings).get_remove_from_916om4_k$ = function () {
    return this.remove_from_1;
  };
  protoOf(strings).get_change_photo_8msd2k_k$ = function () {
    return this.change_photo_1;
  };
  protoOf(strings).get_remove_picture_zd8n64_k$ = function () {
    return this.remove_picture_1;
  };
  protoOf(strings).get_take_new_photo_from_camera_eb01j3_k$ = function () {
    return this.take_new_photo_from_camera_1;
  };
  protoOf(strings).get_select_picture_from_gallery_ni9huw_k$ = function () {
    return this.select_picture_from_gallery_1;
  };
  protoOf(strings).get_select_file_hg88za_k$ = function () {
    return this.select_file_1;
  };
  protoOf(strings).get_permission_clazz_assignment_view_g98dyv_k$ = function () {
    return this.permission_clazz_assignment_view_1;
  };
  protoOf(strings).get_permission_clazz_asignment_edit_q1t4xx_k$ = function () {
    return this.permission_clazz_asignment_edit_1;
  };
  protoOf(strings).get_overview_n1bike_k$ = function () {
    return this.overview_1;
  };
  protoOf(strings).get_add_new_hq317r_k$ = function () {
    return this.add_new_1;
  };
  protoOf(strings).get_staff_iypwvr_k$ = function () {
    return this.staff_1;
  };
  protoOf(strings).get_x_teachers_y_students_u6vrw_k$ = function () {
    return this.x_teachers_y_students_1;
  };
  protoOf(strings).get_call_wojxrb_k$ = function () {
    return this.call_1;
  };
  protoOf(strings).get_organization_id_9cvsqq_k$ = function () {
    return this.organization_id_1;
  };
  protoOf(strings).get_student_tt8o8e_k$ = function () {
    return this.student_1;
  };
  protoOf(strings).get_contact_details_e0e7ne_k$ = function () {
    return this.contact_details_1;
  };
  protoOf(strings).get_untitled_vl615e_k$ = function () {
    return this.untitled_1;
  };
  protoOf(strings).get_present_late_absent_x0ib5n_k$ = function () {
    return this.present_late_absent_1;
  };
  protoOf(strings).get_marked_cap_1xoda0_k$ = function () {
    return this.marked_cap_1;
  };
  protoOf(strings).get_submitted_cap_eetrad_k$ = function () {
    return this.submitted_cap_1;
  };
  protoOf(strings).get_not_submitted_cap_dbaj5z_k$ = function () {
    return this.not_submitted_cap_1;
  };
  protoOf(strings).get_submitliteral_tu54eq_k$ = function () {
    return this.submitliteral_1;
  };
  protoOf(strings).get_x_percent_attended_iejnj7_k$ = function () {
    return this.x_percent_attended_1;
  };
  protoOf(strings).get_answer_b1mrbb_k$ = function () {
    return this.answer_1;
  };
  protoOf(strings).get_of_content_ybelcq_k$ = function () {
    return this.of_content_1;
  };
  protoOf(strings).get_nothing_here_73jxqt_k$ = function () {
    return this.nothing_here_1;
  };
  protoOf(strings).get_not_answered_xmypri_k$ = function () {
    return this.not_answered_1;
  };
  protoOf(strings).get_clazz_work_a1ydcx_k$ = function () {
    return this.clazz_work_1;
  };
  protoOf(strings).get_add_a_new_clazzwork_cyatwb_k$ = function () {
    return this.add_a_new_clazzwork_1;
  };
  protoOf(strings).get_edit_clazzwork_54jzb1_k$ = function () {
    return this.edit_clazzwork_1;
  };
  protoOf(strings).get_clazz_assignment_7veu5f_k$ = function () {
    return this.clazz_assignment_1;
  };
  protoOf(strings).get_new_assignment_lyov1n_k$ = function () {
    return this.new_assignment_1;
  };
  protoOf(strings).get_edit_assignment_38q7nd_k$ = function () {
    return this.edit_assignment_1;
  };
  protoOf(strings).get_total_score_7e0f3i_k$ = function () {
    return this.total_score_1;
  };
  protoOf(strings).get_late_submission_4wb1ic_k$ = function () {
    return this.late_submission_1;
  };
  protoOf(strings).get_mark_penalty_6z8zhc_k$ = function () {
    return this.mark_penalty_1;
  };
  protoOf(strings).get_late_submission_penalty_7uacm_k$ = function () {
    return this.late_submission_penalty_1;
  };
  protoOf(strings).get_end_of_grace_period_v8zlml_k$ = function () {
    return this.end_of_grace_period_1;
  };
  protoOf(strings).get_allow_class_comments_mom02i_k$ = function () {
    return this.allow_class_comments_1;
  };
  protoOf(strings).get_after_deadline_date_error_9ovwtu_k$ = function () {
    return this.after_deadline_date_error_1;
  };
  protoOf(strings).get_points_i5obn0_k$ = function () {
    return this.points_1;
  };
  protoOf(strings).get_minimum_score_olcv7s_k$ = function () {
    return this.minimum_score_1;
  };
  protoOf(strings).get_automatic_yu4nsu_k$ = function () {
    return this.automatic_1;
  };
  protoOf(strings).get_student_marks_content_5v0z83_k$ = function () {
    return this.student_marks_content_1;
  };
  protoOf(strings).get_completion_criteria_phlouf_k$ = function () {
    return this.completion_criteria_1;
  };
  protoOf(strings).get_mark_complete_ic0kam_k$ = function () {
    return this.mark_complete_1;
  };
  protoOf(strings).get_late_penalty_loceux_k$ = function () {
    return this.late_penalty_1;
  };
  protoOf(strings).get_marked_key_1xo78r_k$ = function () {
    return this.marked_key_1;
  };
  protoOf(strings).get_submitted_key_eetxbm_k$ = function () {
    return this.submitted_key_1;
  };
  protoOf(strings).get_not_submitted_g3pt2_k$ = function () {
    return this.not_submitted_1;
  };
  protoOf(strings).get_visible_from_date_ist4a5_k$ = function () {
    return this.visible_from_date_1;
  };
  protoOf(strings).get_submission_type_vkr2hw_k$ = function () {
    return this.submission_type_1;
  };
  protoOf(strings).get_no_submission_required_4o1hh9_k$ = function () {
    return this.no_submission_required_1;
  };
  protoOf(strings).get_short_text_5q38gp_k$ = function () {
    return this.short_text_1;
  };
  protoOf(strings).get_attachment_iduc30_k$ = function () {
    return this.attachment_1;
  };
  protoOf(strings).get_quiz_wotace_k$ = function () {
    return this.quiz_1;
  };
  protoOf(strings).get_allow_private_comments_from_students_de7877_k$ = function () {
    return this.allow_private_comments_from_students_1;
  };
  protoOf(strings).get_deadline_nh33rz_k$ = function () {
    return this.deadline_1;
  };
  protoOf(strings).get_class_timezone_yf0emv_k$ = function () {
    return this.class_timezone_1;
  };
  protoOf(strings).get_maximum_score_gasubu_k$ = function () {
    return this.maximum_score_1;
  };
  protoOf(strings).get_quiz_questions_xlqjv8_k$ = function () {
    return this.quiz_questions_1;
  };
  protoOf(strings).get_time_wouyhi_k$ = function () {
    return this.time_1;
  };
  protoOf(strings).get_submission_gidiad_k$ = function () {
    return this.submission_1;
  };
  protoOf(strings).get_public_comments_53elnl_k$ = function () {
    return this.public_comments_1;
  };
  protoOf(strings).get_private_comments_isw8hl_k$ = function () {
    return this.private_comments_1;
  };
  protoOf(strings).get_submit_your_answer_og7x2k_k$ = function () {
    return this.submit_your_answer_1;
  };
  protoOf(strings).get_add_class_comment_e8fdn5_k$ = function () {
    return this.add_class_comment_1;
  };
  protoOf(strings).get_add_private_comment_bjwd5o_k$ = function () {
    return this.add_private_comment_1;
  };
  protoOf(strings).get_class_comments_a1ji1o_k$ = function () {
    return this.class_comments_1;
  };
  protoOf(strings).get_submit_jnzggx_k$ = function () {
    return this.submit_1;
  };
  protoOf(strings).get_three_num_items_with_name_with_comma_z018yv_k$ = function () {
    return this.three_num_items_with_name_with_comma_1;
  };
  protoOf(strings).get_marking_f582z0_k$ = function () {
    return this.marking_1;
  };
  protoOf(strings).get_return_and_mark_next_n45scp_k$ = function () {
    return this.return_and_mark_next_1;
  };
  protoOf(strings).get_return_only_aorg26_k$ = function () {
    return this.return_only_1;
  };
  protoOf(strings).get_workspace_qupm98_k$ = function () {
    return this.workspace_1;
  };
  protoOf(strings).get_organisation_kq5c83_k$ = function () {
    return this.organisation_1;
  };
  protoOf(strings).get_use_public_library_site_p6ncqo_k$ = function () {
    return this.use_public_library_site_1;
  };
  protoOf(strings).get_create_site_5qbltt_k$ = function () {
    return this.create_site_1;
  };
  protoOf(strings).get_connect_as_guest_cx3k09_k$ = function () {
    return this.connect_as_guest_1;
  };
  protoOf(strings).get_create_account_3y9xxp_k$ = function () {
    return this.create_account_1;
  };
  protoOf(strings).get_my_kntnt7_k$ = function () {
    return this.my_1;
  };
  protoOf(strings).get_add_another_lmwpa4_k$ = function () {
    return this.add_another_1;
  };
  protoOf(strings).get_logged_in_as_85ycwo_k$ = function () {
    return this.logged_in_as_1;
  };
  protoOf(strings).get_person_exists_nw92g3_k$ = function () {
    return this.person_exists_1;
  };
  protoOf(strings).get_username_too_short_qo42ep_k$ = function () {
    return this.username_too_short_1;
  };
  protoOf(strings).get_username_too_long_f6k7h5_k$ = function () {
    return this.username_too_long_1;
  };
  protoOf(strings).get_username_starts_with_number_3fjrl8_k$ = function () {
    return this.username_starts_with_number_1;
  };
  protoOf(strings).get_invalid_username_okhbfd_k$ = function () {
    return this.invalid_username_1;
  };
  protoOf(strings).get_incorrect_current_password_ma1gu4_k$ = function () {
    return this.incorrect_current_password_1;
  };
  protoOf(strings).get_sel_question_type_free_text_tlocxm_k$ = function () {
    return this.sel_question_type_free_text_1;
  };
  protoOf(strings).get_sel_question_type_multiple_choice_8sn4ie_k$ = function () {
    return this.sel_question_type_multiple_choice_1;
  };
  protoOf(strings).get_question_text_i96n2b_k$ = function () {
    return this.question_text_1;
  };
  protoOf(strings).get_question_type_i968fq_k$ = function () {
    return this.question_type_1;
  };
  protoOf(strings).get_add_option_bxwwnw_k$ = function () {
    return this.add_option_1;
  };
  protoOf(strings).get_roles_and_permissions_b9at8v_k$ = function () {
    return this.roles_and_permissions_1;
  };
  protoOf(strings).get_add_role_permission_iewbap_k$ = function () {
    return this.add_role_permission_1;
  };
  protoOf(strings).get_scope_iyfcq3_k$ = function () {
    return this.scope_1;
  };
  protoOf(strings).get_scope_description_rvb9wo_k$ = function () {
    return this.scope_description_1;
  };
  protoOf(strings).get_role_description_sv7r7o_k$ = function () {
    return this.role_description_1;
  };
  protoOf(strings).get_assign_role_seugmb_k$ = function () {
    return this.assign_role_1;
  };
  protoOf(strings).get_more_information_o9ej2j_k$ = function () {
    return this.more_information_1;
  };
  protoOf(strings).get_pending_requests_3llnhx_k$ = function () {
    return this.pending_requests_1;
  };
  protoOf(strings).get_pending_a0ua1e_k$ = function () {
    return this.pending_1;
  };
  protoOf(strings).get_please_wait_for_approval_mq2q7r_k$ = function () {
    return this.please_wait_for_approval_1;
  };
  protoOf(strings).get_reject_iya2eg_k$ = function () {
    return this.reject_1;
  };
  protoOf(strings).get_ask_your_teacher_for_code_qcgw77_k$ = function () {
    return this.ask_your_teacher_for_code_1;
  };
  protoOf(strings).get_copied_to_clipboard_mjx1bw_k$ = function () {
    return this.copied_to_clipboard_1;
  };
  protoOf(strings).get_invite_link_desc_66v03b_k$ = function () {
    return this.invite_link_desc_1;
  };
  protoOf(strings).get_copy_link_xethp7_k$ = function () {
    return this.copy_link_1;
  };
  protoOf(strings).get_copy_code_xenv0u_k$ = function () {
    return this.copy_code_1;
  };
  protoOf(strings).get_share_link_la7kdf_k$ = function () {
    return this.share_link_1;
  };
  protoOf(strings).get_invite_with_link_z9d1y2_k$ = function () {
    return this.invite_with_link_1;
  };
  protoOf(strings).get_role_not_selected_error_76vvf4_k$ = function () {
    return this.role_not_selected_error_1;
  };
  protoOf(strings).get_permission_person_delegate_stdgso_k$ = function () {
    return this.permission_person_delegate_1;
  };
  protoOf(strings).get_this_field_is_mandatory_nm47sv_k$ = function () {
    return this.this_field_is_mandatory_1;
  };
  protoOf(strings).get_permission_role_select_o5gj9e_k$ = function () {
    return this.permission_role_select_1;
  };
  protoOf(strings).get_permission_role_insert_squ4lh_k$ = function () {
    return this.permission_role_insert_1;
  };
  protoOf(strings).get_permission_school_select_it0ubk_k$ = function () {
    return this.permission_school_select_1;
  };
  protoOf(strings).get_permission_school_insert_e7n8zh_k$ = function () {
    return this.permission_school_insert_1;
  };
  protoOf(strings).get_permission_school_update_jx0n65_k$ = function () {
    return this.permission_school_update_1;
  };
  protoOf(strings).get_add_student_to_school_s8t9xv_k$ = function () {
    return this.add_student_to_school_1;
  };
  protoOf(strings).get_add_staff_to_school_ksjfgy_k$ = function () {
    return this.add_staff_to_school_1;
  };
  protoOf(strings).get_permission_password_reset_l4irg2_k$ = function () {
    return this.permission_password_reset_1;
  };
  protoOf(strings).get_school_code_z6qump_k$ = function () {
    return this.school_code_1;
  };
  protoOf(strings).get_invite_code_azcb2e_k$ = function () {
    return this.invite_code_1;
  };
  protoOf(strings).get_entity_code_z2zom8_k$ = function () {
    return this.entity_code_1;
  };
  protoOf(strings).get_join_code_instructions_9er57_k$ = function () {
    return this.join_code_instructions_1;
  };
  protoOf(strings).get_record_for_student_62p1nk_k$ = function () {
    return this.record_for_student_1;
  };
  protoOf(strings).get_moved_x_entries_fps5zo_k$ = function () {
    return this.moved_x_entries_1;
  };
  protoOf(strings).get_end_is_before_start_error_iebdqr_k$ = function () {
    return this.end_is_before_start_error_1;
  };
  protoOf(strings).get_record_attendance_for_most_recent_occurrence_hei2sg_k$ = function () {
    return this.record_attendance_for_most_recent_occurrence_1;
  };
  protoOf(strings).get_add_a_new_occurrence_lz04np_k$ = function () {
    return this.add_a_new_occurrence_1;
  };
  protoOf(strings).get_active_classes_m1t6oa_k$ = function () {
    return this.active_classes_1;
  };
  protoOf(strings).get_terms_and_policies_tm2jnd_k$ = function () {
    return this.terms_and_policies_1;
  };
  protoOf(strings).get_manage_site_settings_sjexvu_k$ = function () {
    return this.manage_site_settings_1;
  };
  protoOf(strings).get_guest_login_enabled_dkzr51_k$ = function () {
    return this.guest_login_enabled_1;
  };
  protoOf(strings).get_registration_allowed_k2r59n_k$ = function () {
    return this.registration_allowed_1;
  };
  protoOf(strings).get_yes_18iruq_k$ = function () {
    return this.yes_1;
  };
  protoOf(strings).get_no_kntnsm_k$ = function () {
    return this.no_1;
  };
  protoOf(strings).get_edit_site_mch26l_k$ = function () {
    return this.edit_site_1;
  };
  protoOf(strings).get_site_woubo0_k$ = function () {
    return this.site_1;
  };
  protoOf(strings).get_site_link_b4khj_k$ = function () {
    return this.site_link_1;
  };
  protoOf(strings).get_please_enter_the_linK_x1j8zf_k$ = function () {
    return this.please_enter_the_linK_1;
  };
  protoOf(strings).get_or_kntnro_k$ = function () {
    return this.or_1;
  };
  protoOf(strings).get_connect_gzypkx_k$ = function () {
    return this.connect_1;
  };
  protoOf(strings).get_terms_and_policies_text_c8hdpv_k$ = function () {
    return this.terms_and_policies_text_1;
  };
  protoOf(strings).get_edit_terms_and_policies_yf70v8_k$ = function () {
    return this.edit_terms_and_policies_1;
  };
  protoOf(strings).get_strings_not_allowed_rzfaty_k$ = function () {
    return this.strings_not_allowed_1;
  };
  protoOf(strings).get_undo_wovoz1_k$ = function () {
    return this.undo_1;
  };
  protoOf(strings).get_video_j06c0i_k$ = function () {
    return this.video_1;
  };
  protoOf(strings).get_content_editor_create_new_category_4kvsf7_k$ = function () {
    return this.content_editor_create_new_category_1;
  };
  protoOf(strings).get_content_pieces_completed_usrq8w_k$ = function () {
    return this.content_pieces_completed_1;
  };
  protoOf(strings).get_content_usage_duration_jit2wv_k$ = function () {
    return this.content_usage_duration_1;
  };
  protoOf(strings).get_manage_download_vafdbt_k$ = function () {
    return this.manage_download_1;
  };
  protoOf(strings).get_powered_by_cspn51_k$ = function () {
    return this.powered_by_1;
  };
  protoOf(strings).get_invalid_email_f9p39x_k$ = function () {
    return this.invalid_email_1;
  };
  protoOf(strings).get_select_account_3gktfx_k$ = function () {
    return this.select_account_1;
  };
  protoOf(strings).get_opening_link_n7y1iu_k$ = function () {
    return this.opening_link_1;
  };
  protoOf(strings).get_select_account_to_continue_yuuwf3_k$ = function () {
    return this.select_account_to_continue_1;
  };
  protoOf(strings).get_you_are_already_in_class_ke0bq1_k$ = function () {
    return this.you_are_already_in_class_1;
  };
  protoOf(strings).get_you_are_already_in_school_85sj7_k$ = function () {
    return this.you_are_already_in_school_1;
  };
  protoOf(strings).get_join_class_adr1rg_k$ = function () {
    return this.join_class_1;
  };
  protoOf(strings).get_join_school_pvdkcg_k$ = function () {
    return this.join_school_1;
  };
  protoOf(strings).get_what_is_your_date_of_birth_qqkiip_k$ = function () {
    return this.what_is_your_date_of_birth_1;
  };
  protoOf(strings).get_parents_email_address_vbsjn6_k$ = function () {
    return this.parents_email_address_1;
  };
  protoOf(strings).get_we_sent_a_message_to_your_parent_2z2uvt_k$ = function () {
    return this.we_sent_a_message_to_your_parent_1;
  };
  protoOf(strings).get_toggle_visibility_o942t0_k$ = function () {
    return this.toggle_visibility_1;
  };
  protoOf(strings).get_parental_consent_td11bt_k$ = function () {
    return this.parental_consent_1;
  };
  protoOf(strings).get_parent_child_register_message_subject_y6z5y1_k$ = function () {
    return this.parent_child_register_message_subject_1;
  };
  protoOf(strings).get_parent_child_register_message_yc4rly_k$ = function () {
    return this.parent_child_register_message_1;
  };
  protoOf(strings).get_parent_consent_explanation_hplo9k_k$ = function () {
    return this.parent_consent_explanation_1;
  };
  protoOf(strings).get_relationship_7nwqp_k$ = function () {
    return this.relationship_1;
  };
  protoOf(strings).get_i_consent_l2u89x_k$ = function () {
    return this.i_consent_1;
  };
  protoOf(strings).get_i_do_not_consent_v7saef_k$ = function () {
    return this.i_do_not_consent_1;
  };
  protoOf(strings).get_revoke_consent_qfunbq_k$ = function () {
    return this.revoke_consent_1;
  };
  protoOf(strings).get_restore_consent_5amt8g_k$ = function () {
    return this.restore_consent_1;
  };
  protoOf(strings).get_status_consent_granted_q4ujse_k$ = function () {
    return this.status_consent_granted_1;
  };
  protoOf(strings).get_status_consent_denied_ihtgbg_k$ = function () {
    return this.status_consent_denied_1;
  };
  protoOf(strings).get_other_legal_guardian_1fl2gf_k$ = function () {
    return this.other_legal_guardian_1;
  };
  protoOf(strings).get_manage_parental_consent_i2qti9_k$ = function () {
    return this.manage_parental_consent_1;
  };
  protoOf(strings).get_view_class_content_o7h97j_k$ = function () {
    return this.view_class_content_1;
  };
  protoOf(strings).get_edit_class_content_zdzy9m_k$ = function () {
    return this.edit_class_content_1;
  };
  protoOf(strings).get_view_class_learning_records_kvyj5z_k$ = function () {
    return this.view_class_learning_records_1;
  };
  protoOf(strings).get_view_contact_details_of_members_aber7i_k$ = function () {
    return this.view_contact_details_of_members_1;
  };
  protoOf(strings).get_edit_contact_details_of_members_ur8mdj_k$ = function () {
    return this.edit_contact_details_of_members_1;
  };
  protoOf(strings).get_view_socioeconomic_details_of_members_ymc70c_k$ = function () {
    return this.view_socioeconomic_details_of_members_1;
  };
  protoOf(strings).get_edit_socioeconomic_details_of_members_e1c0g9_k$ = function () {
    return this.edit_socioeconomic_details_of_members_1;
  };
  protoOf(strings).get_add_person_or_group_tf0ame_k$ = function () {
    return this.add_person_or_group_1;
  };
  protoOf(strings).get_lets_get_started_8s9dpi_k$ = function () {
    return this.lets_get_started_1;
  };
  protoOf(strings).get_looks_like_installed_app_from_link_jjrmmw_k$ = function () {
    return this.looks_like_installed_app_from_link_1;
  };
  protoOf(strings).get_continue_using_link_recommended_xf18rk_k$ = function () {
    return this.continue_using_link_recommended_1;
  };
  protoOf(strings).get_continue_using_the_link_lyj0fi_k$ = function () {
    return this.continue_using_the_link_1;
  };
  protoOf(strings).get_start_from_scratch_10zuc5_k$ = function () {
    return this.start_from_scratch_1;
  };
  protoOf(strings).get_ignore_the_link_52yzu4_k$ = function () {
    return this.ignore_the_link_1;
  };
  protoOf(strings).get_add_permission_for_a_person_hv68sy_k$ = function () {
    return this.add_permission_for_a_person_1;
  };
  protoOf(strings).get_add_permission_for_a_group_orc1r2_k$ = function () {
    return this.add_permission_for_a_group_1;
  };
  protoOf(strings).get_add_using_link_fyewn8_k$ = function () {
    return this.add_using_link_1;
  };
  protoOf(strings).get_add_using_a_web_link_then_vmye2x_k$ = function () {
    return this.add_using_a_web_link_then_1;
  };
  protoOf(strings).get_add_from_gallery_u702ho_k$ = function () {
    return this.add_from_gallery_1;
  };
  protoOf(strings).get_add_video_or_audio_from_the_device_gallery_j2xyxe_k$ = function () {
    return this.add_video_or_audio_from_the_device_gallery_1;
  };
  protoOf(strings).get_add_file_is5d0j_k$ = function () {
    return this.add_file_1;
  };
  protoOf(strings).get_add_folder_7ntaol_k$ = function () {
    return this.add_folder_1;
  };
  protoOf(strings).get_importing_52djzo_k$ = function () {
    return this.importing_1;
  };
  protoOf(strings).get_downloading_content_ipy71n_k$ = function () {
    return this.downloading_content_1;
  };
  protoOf(strings).get_deleting_content_h6rijv_k$ = function () {
    return this.deleting_content_1;
  };
  protoOf(strings).get_add_folder_description_ou6wa6_k$ = function () {
    return this.add_folder_description_1;
  };
  protoOf(strings).get_add_educational_content_using_supported_formats_eg_pdf_xapi_h5p_tg46ag_k$ = function () {
    return this.add_educational_content_using_supported_formats_eg_pdf_xapi_h5p_1;
  };
  protoOf(strings).get_current_status_consent_granted_8hfoko_k$ = function () {
    return this.current_status_consent_granted_1;
  };
  protoOf(strings).get_select_country_vumusc_k$ = function () {
    return this.select_country_1;
  };
  protoOf(strings).get_enter_link_xpmut2_k$ = function () {
    return this.enter_link_1;
  };
  protoOf(strings).get_add_subject_4tl6at_k$ = function () {
    return this.add_subject_1;
  };
  protoOf(strings).get_share_via_hn6eij_k$ = function () {
    return this.share_via_1;
  };
  protoOf(strings).get_share_apk_file_maey1k_k$ = function () {
    return this.share_apk_file_1;
  };
  protoOf(strings).get_recommended_for_advanced_users_sli24u_k$ = function () {
    return this.recommended_for_advanced_users_1;
  };
  protoOf(strings).get_nearby_share_94ivl4_k$ = function () {
    return this.nearby_share_1;
  };
  protoOf(strings).get_recommended_for_offline_installation_gbx9qf_k$ = function () {
    return this.recommended_for_offline_installation_1;
  };
  protoOf(strings).get_app_store_link_goi6in_k$ = function () {
    return this.app_store_link_1;
  };
  protoOf(strings).get_everything_works_offline_quwexp_k$ = function () {
    return this.everything_works_offline_1;
  };
  protoOf(strings).get_swipe_to_next_u5yhah_k$ = function () {
    return this.swipe_to_next_1;
  };
  protoOf(strings).get_content_entries_completed_jatpbh_k$ = function () {
    return this.content_entries_completed_1;
  };
  protoOf(strings).get_content_usage_time_4otvt2_k$ = function () {
    return this.content_usage_time_1;
  };
  protoOf(strings).get_all_permissions_pw2t4z_k$ = function () {
    return this.all_permissions_1;
  };
  protoOf(strings).get_folder_df9svr_k$ = function () {
    return this.folder_1;
  };
  protoOf(strings).get_create_a_new_learning_env_hm2yhv_k$ = function () {
    return this.create_a_new_learning_env_1;
  };
  protoOf(strings).get_add_educational_content_to_new_learning_env_5eah7a_k$ = function () {
    return this.add_educational_content_to_new_learning_env_1;
  };
  protoOf(strings).get_connect_to_an_existing_learning_environment_wjidba_k$ = function () {
    return this.connect_to_an_existing_learning_environment_1;
  };
  protoOf(strings).get_does_your_class_already_have_learning_env_mufox2_k$ = function () {
    return this.does_your_class_already_have_learning_env_1;
  };
  protoOf(strings).get_use_the_public_lib_env_oz7rn0_k$ = function () {
    return this.use_the_public_lib_env_1;
  };
  protoOf(strings).get_just_want_to_browse_kucsif_k$ = function () {
    return this.just_want_to_browse_1;
  };
  protoOf(strings).get_revoking_consent_will_1fsyp6_k$ = function () {
    return this.revoking_consent_will_1;
  };
  protoOf(strings).get_you_must_comply_with_license_ltde9u_k$ = function () {
    return this.you_must_comply_with_license_1;
  };
  protoOf(strings).get_you_can_copypaste_a_link_x6h9rl_k$ = function () {
    return this.you_can_copypaste_a_link_1;
  };
  protoOf(strings).get_see_supported_sites_el7pba_k$ = function () {
    return this.see_supported_sites_1;
  };
  protoOf(strings).get_class_setup_742op9_k$ = function () {
    return this.class_setup_1;
  };
  protoOf(strings).get_anyone_with_this_can_join_school_jw0112_k$ = function () {
    return this.anyone_with_this_can_join_school_1;
  };
  protoOf(strings).get_this_class_nlx9eo_k$ = function () {
    return this.this_class_1;
  };
  protoOf(strings).get_from_my_classes_j7hxgh_k$ = function () {
    return this.from_my_classes_1;
  };
  protoOf(strings).get_my_content_twxi8h_k$ = function () {
    return this.my_content_1;
  };
  protoOf(strings).get_learning_environment_dg23sr_k$ = function () {
    return this.learning_environment_1;
  };
  protoOf(strings).get_grades_class_age_uytev2_k$ = function () {
    return this.grades_class_age_1;
  };
  protoOf(strings).get_add_remove_and_modify_grades_oysj1h_k$ = function () {
    return this.add_remove_and_modify_grades_1;
  };
  protoOf(strings).get_subjects_4ztuog_k$ = function () {
    return this.subjects_1;
  };
  protoOf(strings).get_add_remove_and_modify_subjects_jmy54g_k$ = function () {
    return this.add_remove_and_modify_subjects_1;
  };
  protoOf(strings).get_create_my_account_347bo_k$ = function () {
    return this.create_my_account_1;
  };
  protoOf(strings).get_recommend_it_vfhknr_k$ = function () {
    return this.recommend_it_1;
  };
  protoOf(strings).get_edit_permissions_jawlnc_k$ = function () {
    return this.edit_permissions_1;
  };
  protoOf(strings).get_add_from_contacts_7lrbsx_k$ = function () {
    return this.add_from_contacts_1;
  };
  protoOf(strings).get_almost_done_sdk3gq_k$ = function () {
    return this.almost_done_1;
  };
  protoOf(strings).get_your_username_azxyvb_k$ = function () {
    return this.your_username_1;
  };
  protoOf(strings).get_select_content_vqvtbz_k$ = function () {
    return this.select_content_1;
  };
  protoOf(strings).get_search_in_x3w32l_k$ = function () {
    return this.search_in_1;
  };
  protoOf(strings).get_type_wovaf7_k$ = function () {
    return this.type_1;
  };
  protoOf(strings).get_please_download_the_app_77quzs_k$ = function () {
    return this.please_download_the_app_1;
  };
  protoOf(strings).get_alternatively_you_can_download_the_apk_bcqsxg_k$ = function () {
    return this.alternatively_you_can_download_the_apk_1;
  };
  protoOf(strings).get_full_i_can_download_as_much_as_i_like_mas6kq_k$ = function () {
    return this.full_i_can_download_as_much_as_i_like_1;
  };
  protoOf(strings).get_limited_i_avoid_downloading_too_much_wvaqwl_k$ = function () {
    return this.limited_i_avoid_downloading_too_much_1;
  };
  protoOf(strings).get_oops_worw30_k$ = function () {
    return this.oops_1;
  };
  protoOf(strings).get_sorry_something_went_wrong_8e4v8u_k$ = function () {
    return this.sorry_something_went_wrong_1;
  };
  protoOf(strings).get_incident_id_wsl9kx_k$ = function () {
    return this.incident_id_1;
  };
  protoOf(strings).get_error_code_6vldfx_k$ = function () {
    return this.error_code_1;
  };
  protoOf(strings).get_take_me_home_nque9j_k$ = function () {
    return this.take_me_home_1;
  };
  protoOf(strings).get_view_clazz_pha4zr_k$ = function () {
    return this.view_clazz_1;
  };
  protoOf(strings).get_view_clazzes_jc7knf_k$ = function () {
    return this.view_clazzes_1;
  };
  protoOf(strings).get_enrol_and_unenrol_students_2djeng_k$ = function () {
    return this.enrol_and_unenrol_students_1;
  };
  protoOf(strings).get_enrol_and_unenrol_teachers_9w2gr1_k$ = function () {
    return this.enrol_and_unenrol_teachers_1;
  };
  protoOf(strings).get_view_assignments_thvm2d_k$ = function () {
    return this.view_assignments_1;
  };
  protoOf(strings).get_add_or_edit_assignment_o58hcj_k$ = function () {
    return this.add_or_edit_assignment_1;
  };
  protoOf(strings).get_view_basic_profile_of_members_p3l5ux_k$ = function () {
    return this.view_basic_profile_of_members_1;
  };
  protoOf(strings).get_edit_basic_profile_of_members_flfsnw_k$ = function () {
    return this.edit_basic_profile_of_members_1;
  };
  protoOf(strings).get_view_school_fzdqlh_k$ = function () {
    return this.view_school_1;
  };
  protoOf(strings).get_edit_clazzes_rkpamy_k$ = function () {
    return this.edit_clazzes_1;
  };
  protoOf(strings).get_add_new_clazz_to_school_ejvfxn_k$ = function () {
    return this.add_new_clazz_to_school_1;
  };
  protoOf(strings).get_added_to_class_content_a6jctm_k$ = function () {
    return this.added_to_class_content_1;
  };
  protoOf(strings).get_content_already_added_to_class_jrr3iv_k$ = function () {
    return this.content_already_added_to_class_1;
  };
  protoOf(strings).get_your_account_needs_approved_9xp7xu_k$ = function () {
    return this.your_account_needs_approved_1;
  };
  protoOf(strings).get_adult_account_required_hbft5r_k$ = function () {
    return this.adult_account_required_1;
  };
  protoOf(strings).get_blank_report_5abi9k_k$ = function () {
    return this.blank_report_1;
  };
  protoOf(strings).get_attendance_over_time_by_class_y8ku4_k$ = function () {
    return this.attendance_over_time_by_class_1;
  };
  protoOf(strings).get_percentage_of_students_attending_over_time_rux3i2_k$ = function () {
    return this.percentage_of_students_attending_over_time_1;
  };
  protoOf(strings).get_content_completion_fh9gx7_k$ = function () {
    return this.content_completion_1;
  };
  protoOf(strings).get_number_of_students_completed_time_3dy54d_k$ = function () {
    return this.number_of_students_completed_time_1;
  };
  protoOf(strings).get_content_usage_by_class_rfde6b_k$ = function () {
    return this.content_usage_by_class_1;
  };
  protoOf(strings).get_total_content_usage_duration_class_t0wqhh_k$ = function () {
    return this.total_content_usage_duration_class_1;
  };
  protoOf(strings).get_content_usage_over_time_mspchh_k$ = function () {
    return this.content_usage_over_time_1;
  };
  protoOf(strings).get_total_content_duration_gender_cxvnry_k$ = function () {
    return this.total_content_duration_gender_1;
  };
  protoOf(strings).get_unique_content_users_over_time_28k052_k$ = function () {
    return this.unique_content_users_over_time_1;
  };
  protoOf(strings).get_number_of_active_users_over_time_7tu7vn_k$ = function () {
    return this.number_of_active_users_over_time_1;
  };
  protoOf(strings).get_parent_hy4reb_k$ = function () {
    return this.parent_1;
  };
  protoOf(strings).get_upload_kji5fu_k$ = function () {
    return this.upload_1;
  };
  protoOf(strings).get_selected_file_summary_625noi_k$ = function () {
    return this.selected_file_summary_1;
  };
  protoOf(strings).get_drag_and_drop_or_click_to_add_file_83kthr_k$ = function () {
    return this.drag_and_drop_or_click_to_add_file_1;
  };
  protoOf(strings).get_extra_active_tab_warning_o7j3vz_k$ = function () {
    return this.extra_active_tab_warning_1;
  };
  protoOf(strings).get_saved_iye7oe_k$ = function () {
    return this.saved_1;
  };
  protoOf(strings).get_individual_kxt9zy_k$ = function () {
    return this.individual_1;
  };
  protoOf(strings).get_group_is3eja_k$ = function () {
    return this.group_1;
  };
  protoOf(strings).get_dont_show_before_szyyak_k$ = function () {
    return this.dont_show_before_1;
  };
  protoOf(strings).get_group_submission_dinr2t_k$ = function () {
    return this.group_submission_1;
  };
  protoOf(strings).get_require_file_submission_2hp9gs_k$ = function () {
    return this.require_file_submission_1;
  };
  protoOf(strings).get_require_text_submission_3mi21n_k$ = function () {
    return this.require_text_submission_1;
  };
  protoOf(strings).get_maximum_f8hnp3_k$ = function () {
    return this.maximum_1;
  };
  protoOf(strings).get_size_limit_lal2me_k$ = function () {
    return this.size_limit_1;
  };
  protoOf(strings).get_size_limit_error_z4ombz_k$ = function () {
    return this.size_limit_error_1;
  };
  protoOf(strings).get_limit_iuokuq_k$ = function () {
    return this.limit_1;
  };
  protoOf(strings).get_number_of_files_flyue4_k$ = function () {
    return this.number_of_files_1;
  };
  protoOf(strings).get_edit_after_submission_8xjnyd_k$ = function () {
    return this.edit_after_submission_1;
  };
  protoOf(strings).get_allowed_till_deadline_kkogma_k$ = function () {
    return this.allowed_till_deadline_1;
  };
  protoOf(strings).get_allowed_till_grace_nwnglu_k$ = function () {
    return this.allowed_till_grace_1;
  };
  protoOf(strings).get_not_allowed_rchvsd_k$ = function () {
    return this.not_allowed_1;
  };
  protoOf(strings).get_marked_by_6xpkdb_k$ = function () {
    return this.marked_by_1;
  };
  protoOf(strings).get_peers_iwt1k8_k$ = function () {
    return this.peers_1;
  };
  protoOf(strings).get_peers_to_review_m88o8r_k$ = function () {
    return this.peers_to_review_1;
  };
  protoOf(strings).get_file_type_d95c3w_k$ = function () {
    return this.file_type_1;
  };
  protoOf(strings).get_file_type_chosen_t6rf6l_k$ = function () {
    return this.file_type_chosen_1;
  };
  protoOf(strings).get_file_type_any_g5todd_k$ = function () {
    return this.file_type_any_1;
  };
  protoOf(strings).get_file_document_tfrnvv_k$ = function () {
    return this.file_document_1;
  };
  protoOf(strings).get_file_image_f4t74x_k$ = function () {
    return this.file_image_1;
  };
  protoOf(strings).get_submit_grade_vswx15_k$ = function () {
    return this.submit_grade_1;
  };
  protoOf(strings).get_submit_grade_and_mark_next_rjnnih_k$ = function () {
    return this.submit_grade_and_mark_next_1;
  };
  protoOf(strings).get_graded_dxrs6u_k$ = function () {
    return this.graded_1;
  };
  protoOf(strings).get_score_greater_than_zero_vlrrqj_k$ = function () {
    return this.score_greater_than_zero_1;
  };
  protoOf(strings).get_words_j0u8w0_k$ = function () {
    return this.words_1;
  };
  protoOf(strings).get_characters_f8ovn_k$ = function () {
    return this.characters_1;
  };
  protoOf(strings).get_class_timezone_set_yyuebw_k$ = function () {
    return this.class_timezone_set_1;
  };
  protoOf(strings).get_maximum_points_6uehuz_k$ = function () {
    return this.maximum_points_1;
  };
  protoOf(strings).get_penalty_label_dcawet_k$ = function () {
    return this.penalty_label_1;
  };
  protoOf(strings).get_submissions_elud6m_k$ = function () {
    return this.submissions_1;
  };
  protoOf(strings).get_add_text_ise85w_k$ = function () {
    return this.add_text_1;
  };
  protoOf(strings).get_course_blocks_k8kjr5_k$ = function () {
    return this.course_blocks_1;
  };
  protoOf(strings).get_add_block_dxkkhy_k$ = function () {
    return this.add_block_1;
  };
  protoOf(strings).get_edit_block_hb4za9_k$ = function () {
    return this.edit_block_1;
  };
  protoOf(strings).get_module_gqgeid_k$ = function () {
    return this.module_1;
  };
  protoOf(strings).get_course_module_phj4dj_k$ = function () {
    return this.course_module_1;
  };
  protoOf(strings).get_formatted_text_to_show_to_course_participants_mzpdgk_k$ = function () {
    return this.formatted_text_to_show_to_course_participants_1;
  };
  protoOf(strings).get_add_course_block_content_desc_s5lz6u_k$ = function () {
    return this.add_course_block_content_desc_1;
  };
  protoOf(strings).get_add_assignment_block_content_desc_ww2g38_k$ = function () {
    return this.add_assignment_block_content_desc_1;
  };
  protoOf(strings).get_discussion_board_rqxg48_k$ = function () {
    return this.discussion_board_1;
  };
  protoOf(strings).get_add_discussion_board_desc_pp5a86_k$ = function () {
    return this.add_discussion_board_desc_1;
  };
  protoOf(strings).get_new_module_ar12fg_k$ = function () {
    return this.new_module_1;
  };
  protoOf(strings).get_edit_module_qenh9k_k$ = function () {
    return this.edit_module_1;
  };
  protoOf(strings).get_indent_etpsj9_k$ = function () {
    return this.indent_1;
  };
  protoOf(strings).get_unindent_yawspa_k$ = function () {
    return this.unindent_1;
  };
  protoOf(strings).get_institution_sn885r_k$ = function () {
    return this.institution_1;
  };
  protoOf(strings).get_student_enrolment_policy_dir7lm_k$ = function () {
    return this.student_enrolment_policy_1;
  };
  protoOf(strings).get_teacher_enrolment_policy_few8s3_k$ = function () {
    return this.teacher_enrolment_policy_1;
  };
  protoOf(strings).get_open_enrolment_93xwaw_k$ = function () {
    return this.open_enrolment_1;
  };
  protoOf(strings).get_enrolment_requests_must_be_approved_4gmmss_k$ = function () {
    return this.enrolment_requests_must_be_approved_1;
  };
  protoOf(strings).get_accept_enrolment_requests_automatically_edcn73_k$ = function () {
    return this.accept_enrolment_requests_automatically_1;
  };
  protoOf(strings).get_visibility_bxkfbv_k$ = function () {
    return this.visibility_1;
  };
  protoOf(strings).get_hidden_enrolment_via_links_code_or_invitation_yomr9b_k$ = function () {
    return this.hidden_enrolment_via_links_code_or_invitation_1;
  };
  protoOf(strings).get_visible_for_all_9sdax7_k$ = function () {
    return this.visible_for_all_1;
  };
  protoOf(strings).get_terminology_hmih12_k$ = function () {
    return this.terminology_1;
  };
  protoOf(strings).get_select_terminology_3njcef_k$ = function () {
    return this.select_terminology_1;
  };
  protoOf(strings).get_add_new_terminology_xte25v_k$ = function () {
    return this.add_new_terminology_1;
  };
  protoOf(strings).get_edit_terminology_uysc3d_k$ = function () {
    return this.edit_terminology_1;
  };
  protoOf(strings).get_your_words_for_ndtuls_k$ = function () {
    return this.your_words_for_1;
  };
  protoOf(strings).get_course_setup_wzjxk2_k$ = function () {
    return this.course_setup_1;
  };
  protoOf(strings).get_number_of_groups_coq73l_k$ = function () {
    return this.number_of_groups_1;
  };
  protoOf(strings).get_assign_to_random_groups_4biavh_k$ = function () {
    return this.assign_to_random_groups_1;
  };
  protoOf(strings).get_add_new_groups_uckp52_k$ = function () {
    return this.add_new_groups_1;
  };
  protoOf(strings).get_edit_groups_t72sw0_k$ = function () {
    return this.edit_groups_1;
  };
  protoOf(strings).get_num_replies_hitesa_k$ = function () {
    return this.num_replies_1;
  };
  protoOf(strings).get_topics_k1z60d_k$ = function () {
    return this.topics_1;
  };
  protoOf(strings).get_add_topic_e7it0o_k$ = function () {
    return this.add_topic_1;
  };
  protoOf(strings).get_add_a_reply_ekmcg5_k$ = function () {
    return this.add_a_reply_1;
  };
  protoOf(strings).get_messages_vl21at_k$ = function () {
    return this.messages_1;
  };
  protoOf(strings).get_message_h23axq_k$ = function () {
    return this.message_1;
  };
  protoOf(strings).get_library_40idhu_k$ = function () {
    return this.library_1;
  };
  protoOf(strings).get_courses_h3w43z_k$ = function () {
    return this.courses_1;
  };
  protoOf(strings).get_course_c0azac_k$ = function () {
    return this.course_1;
  };
  protoOf(strings).get_reports_and_analytics_gblc3v_k$ = function () {
    return this.reports_and_analytics_1;
  };
  protoOf(strings).get_course_comments_cnbln5_k$ = function () {
    return this.course_comments_1;
  };
  protoOf(strings).get_currently_enroled_ntrkvx_k$ = function () {
    return this.currently_enroled_1;
  };
  protoOf(strings).get_past_enrolments_px6oab_k$ = function () {
    return this.past_enrolments_1;
  };
  protoOf(strings).get_standard_a3fk3e_k$ = function () {
    return this.standard_1;
  };
  protoOf(strings).get_group_number_12ujla_k$ = function () {
    return this.group_number_1;
  };
  protoOf(strings).get_add_group_e0fdtk_k$ = function () {
    return this.add_group_1;
  };
  protoOf(strings).get_edit_group_hdzslv_k$ = function () {
    return this.edit_group_1;
  };
  protoOf(strings).get_new_group_set_1pwgpm_k$ = function () {
    return this.new_group_set_1;
  };
  protoOf(strings).get_edit_text_mcgi1z_k$ = function () {
    return this.edit_text_1;
  };
  protoOf(strings).get_add_module_ayzwb7_k$ = function () {
    return this.add_module_1;
  };
  protoOf(strings).get_add_a_new_course_83hi5d_k$ = function () {
    return this.add_a_new_course_1;
  };
  protoOf(strings).get_join_existing_course_wzv2ir_k$ = function () {
    return this.join_existing_course_1;
  };
  protoOf(strings).get_edit_course_v4swhl_k$ = function () {
    return this.edit_course_1;
  };
  protoOf(strings).get_currently_enrolled_sbmaft_k$ = function () {
    return this.currently_enrolled_1;
  };
  protoOf(strings).get_past_enrollments_lvp6a3_k$ = function () {
    return this.past_enrollments_1;
  };
  protoOf(strings).get_unread_kii6rc_k$ = function () {
    return this.unread_1;
  };
  protoOf(strings).get_new_chat_917na8_k$ = function () {
    return this.new_chat_1;
  };
  protoOf(strings).get_new_group_4590tz_k$ = function () {
    return this.new_group_1;
  };
  protoOf(strings).get_chat_wok2ox_k$ = function () {
    return this.chat_1;
  };
  protoOf(strings).get_you_18irm2_k$ = function () {
    return this.you_1;
  };
  protoOf(strings).get_edit_topic_hl37sz_k$ = function () {
    return this.edit_topic_1;
  };
  protoOf(strings).get_posts_iwzpuy_k$ = function () {
    return this.posts_1;
  };
  protoOf(strings).get_post_wosj55_k$ = function () {
    return this.post_1;
  };
  protoOf(strings).get_individual_submission_g07gqx_k$ = function () {
    return this.individual_submission_1;
  };
  protoOf(strings).get_unassigned_11sjrk_k$ = function () {
    return this.unassigned_1;
  };
  protoOf(strings).get_error_too_long_text_y0t7k5_k$ = function () {
    return this.error_too_long_text_1;
  };
  protoOf(strings).get_managed_enrolment_9gus85_k$ = function () {
    return this.managed_enrolment_1;
  };
  protoOf(strings).get_text_file_submission_error_ngib3j_k$ = function () {
    return this.text_file_submission_error_1;
  };
  protoOf(strings).get_submit_all_at_once_submission_policy_w0yn13_k$ = function () {
    return this.submit_all_at_once_submission_policy_1;
  };
  protoOf(strings).get_multiple_submission_allowed_submission_policy_xv5cdb_k$ = function () {
    return this.multiple_submission_allowed_submission_policy_1;
  };
  protoOf(strings).get_enrolment_policy_aed86u_k$ = function () {
    return this.enrolment_policy_1;
  };
  protoOf(strings).get_submission_policy_cpre1o_k$ = function () {
    return this.submission_policy_1;
  };
  protoOf(strings).get_submission_already_made_ikrrnq_k$ = function () {
    return this.submission_already_made_1;
  };
  protoOf(strings).get_grade_out_of_range_vzsmtz_k$ = function () {
    return this.grade_out_of_range_1;
  };
  protoOf(strings).get_update_grade_5iue3a_k$ = function () {
    return this.update_grade_1;
  };
  protoOf(strings).get_update_grade_and_mark_next_tzaxlk_k$ = function () {
    return this.update_grade_and_mark_next_1;
  };
  protoOf(strings).get_add_discussion_pagynl_k$ = function () {
    return this.add_discussion_1;
  };
  protoOf(strings).get_edit_discussion_21dqp8_k$ = function () {
    return this.edit_discussion_1;
  };
  protoOf(strings).get_type_here_h3iy3w_k$ = function () {
    return this.type_here_1;
  };
  protoOf(strings).get_deadline_has_passed_2edwml_k$ = function () {
    return this.deadline_has_passed_1;
  };
  protoOf(strings).get_already_submitted_4pnd1x_k$ = function () {
    return this.already_submitted_1;
  };
  protoOf(strings).get_exceeds_word_limit_bsm4oh_k$ = function () {
    return this.exceeds_word_limit_1;
  };
  protoOf(strings).get_exceeds_char_limit_m1wq91_k$ = function () {
    return this.exceeds_char_limit_1;
  };
  protoOf(strings).get_unassigned_error_spk9on_k$ = function () {
    return this.unassigned_error_1;
  };
  protoOf(strings).get_enabled_pcr8o8_k$ = function () {
    return this.enabled_1;
  };
  protoOf(strings).get_disabled_rbmjej_k$ = function () {
    return this.disabled_1;
  };
  protoOf(strings).get_from_my_courses_hhdte7_k$ = function () {
    return this.from_my_courses_1;
  };
  protoOf(strings).get_assign_reviewers_lxs493_k$ = function () {
    return this.assign_reviewers_1;
  };
  protoOf(strings).get_reviews_per_user_group_rf16ai_k$ = function () {
    return this.reviews_per_user_group_1;
  };
  protoOf(strings).get_assign_random_reviewers_fwnbif_k$ = function () {
    return this.assign_random_reviewers_1;
  };
  protoOf(strings).get_reviewer_ywo3pq_k$ = function () {
    return this.reviewer_1;
  };
  protoOf(strings).get_app_language_pi27sx_k$ = function () {
    return this.app_language_1;
  };
  protoOf(strings).get_pdf_18iyk7_k$ = function () {
    return this.pdf_1;
  };
  protoOf(strings).get_panic_button_app_izi6g5_k$ = function () {
    return this.panic_button_app_1;
  };
  protoOf(strings).get_actions_to_be_taken_in_case_of_emergency_9xn8w7_k$ = function () {
    return this.actions_to_be_taken_in_case_of_emergency_1;
  };
  protoOf(strings).get_exit_app_44jrk9_k$ = function () {
    return this.exit_app_1;
  };
  protoOf(strings).get_delete_app_data_from_device_e4jzb5_k$ = function () {
    return this.delete_app_data_from_device_1;
  };
  protoOf(strings).get_more_options_v2e77h_k$ = function () {
    return this.more_options_1;
  };
  protoOf(strings).get_num_holidays_nplrzx_k$ = function () {
    return this.num_holidays_1;
  };
  protoOf(strings).get_hide_app_9w80h9_k$ = function () {
    return this.hide_app_1;
  };
  protoOf(strings).get_panic_button_explanation_m2o0rn_k$ = function () {
    return this.panic_button_explanation_1;
  };
  protoOf(strings).get_hide_app_explanation_8ngoft_k$ = function () {
    return this.hide_app_explanation_1;
  };
  protoOf(strings).get_most_recent_sd0x5e_k$ = function () {
    return this.most_recent_1;
  };
  protoOf(strings).get_comment_gzea9i_k$ = function () {
    return this.comment_1;
  };
  protoOf(strings).get_grant_app_permission_ejmruh_k$ = function () {
    return this.grant_app_permission_1;
  };
  protoOf(strings).get_this_app_will_receive_kad9lg_k$ = function () {
    return this.this_app_will_receive_1;
  };
  protoOf(strings).get_my_profile_k9fvkv_k$ = function () {
    return this.my_profile_1;
  };
  protoOf(strings).get_add_another_account_m135sm_k$ = function () {
    return this.add_another_account_1;
  };
  protoOf(strings).get_end_is_before_start_o1i85m_k$ = function () {
    return this.end_is_before_start_1;
  };
  protoOf(strings).get_select_person_bm005r_k$ = function () {
    return this.select_person_1;
  };
  protoOf(strings).get_your_submission_bz1qlr_k$ = function () {
    return this.your_submission_1;
  };
  protoOf(strings).get_edit_content_t6v899_k$ = function () {
    return this.edit_content_1;
  };
  protoOf(strings).get_edit_folder_tpu2w6_k$ = function () {
    return this.edit_folder_1;
  };
  protoOf(strings).get_add_new_post_6lsq2i_k$ = function () {
    return this.add_new_post_1;
  };
  protoOf(strings).get_grades_scoring_rcp97v_k$ = function () {
    return this.grades_scoring_1;
  };
  protoOf(strings).get_mark_comment_k11fee_k$ = function () {
    return this.mark_comment_1;
  };
  protoOf(strings).get_mark_woqbrq_k$ = function () {
    return this.mark_1;
  };
  protoOf(strings).get_too_high_mrs22e_k$ = function () {
    return this.too_high_1;
  };
  protoOf(strings).get_required_wq3z3c_k$ = function () {
    return this.required_1;
  };
  protoOf(strings).get_expand_d38tr7_k$ = function () {
    return this.expand_1;
  };
  protoOf(strings).get_collapse_sruiye_k$ = function () {
    return this.collapse_1;
  };
  protoOf(strings).get_remove_iyc77x_k$ = function () {
    return this.remove_1;
  };
  protoOf(strings).get_table_of_contents_2jgk4o_k$ = function () {
    return this.table_of_contents_1;
  };
  protoOf(strings).get_select_date_hg6t9k_k$ = function () {
    return this.select_date_1;
  };
  protoOf(strings).get_link_wopumb_k$ = function () {
    return this.link_1;
  };
  protoOf(strings).get_time_submitted_s4lo9e_k$ = function () {
    return this.time_submitted_1;
  };
  protoOf(strings).get_group_assignment_66ygfe_k$ = function () {
    return this.group_assignment_1;
  };
  protoOf(strings).get_menu_woqenc_k$ = function () {
    return this.menu_1;
  };
  protoOf(strings).get_restarting_lhywvw_k$ = function () {
    return this.restarting_1;
  };
  protoOf(strings).get_terms_required_if_registration_enabled_8wm8g2_k$ = function () {
    return this.terms_required_if_registration_enabled_1;
  };
  protoOf(strings).get_drop_files_to_import_dfy7l2_k$ = function () {
    return this.drop_files_to_import_1;
  };
  protoOf(strings).get_compose_post_1l1lze_k$ = function () {
    return this.compose_post_1;
  };
  protoOf(strings).get_password_updated_10ss0w_k$ = function () {
    return this.password_updated_1;
  };
  protoOf(strings).get_html5_content_display_engine_2qqpsz_k$ = function () {
    return this.html5_content_display_engine_1;
  };
  protoOf(strings).get_chrome_recommended_27rusf_k$ = function () {
    return this.chrome_recommended_1;
  };
  protoOf(strings).get_chrome_recommended_info_eqhu8e_k$ = function () {
    return this.chrome_recommended_info_1;
  };
  protoOf(strings).get_internal_webview_iz58ow_k$ = function () {
    return this.internal_webview_1;
  };
  protoOf(strings).get_internal_webview_info_hrisoj_k$ = function () {
    return this.internal_webview_info_1;
  };
  protoOf(strings).get_content_not_ready_try_later_2wybsf_k$ = function () {
    return this.content_not_ready_try_later_1;
  };
  protoOf(strings).get_version_72w4j3_k$ = function () {
    return this.version_1;
  };
  protoOf(strings).get_licenses_hc9vqd_k$ = function () {
    return this.licenses_1;
  };
  protoOf(strings).get_cannot_record_attendance_for_future_date_time_jg5kul_k$ = function () {
    return this.cannot_record_attendance_for_future_date_time_1;
  };
  protoOf(strings).get_could_not_load_vlc_86bu87_k$ = function () {
    return this.could_not_load_vlc_1;
  };
  protoOf(strings).get_selected_c3i7q4_k$ = function () {
    return this.selected_1;
  };
  protoOf(strings).get_clear_selection_c1zwa9_k$ = function () {
    return this.clear_selection_1;
  };
  protoOf(strings).get_move_entries_to_this_folder_arj2rj_k$ = function () {
    return this.move_entries_to_this_folder_1;
  };
  protoOf(strings).get_cannot_move_to_subfolder_of_self_biv0ka_k$ = function () {
    return this.cannot_move_to_subfolder_of_self_1;
  };
  protoOf(strings).get_cannot_move_already_in_same_folder_w6qwlr_k$ = function () {
    return this.cannot_move_already_in_same_folder_1;
  };
  protoOf(strings).get_move_to_ltxxog_k$ = function () {
    return this.move_to_1;
  };
  protoOf(strings).get_restore_jezlph_k$ = function () {
    return this.restore_1;
  };
  protoOf(strings).get_delete_permanently_xktx9s_k$ = function () {
    return this.delete_permanently_1;
  };
  protoOf(strings).get_deleted_items_9db6z3_k$ = function () {
    return this.deleted_items_1;
  };
  protoOf(strings).get_delete_or_restore_items_copaxq_k$ = function () {
    return this.delete_or_restore_items_1;
  };
  protoOf(strings).get_yesterday_ib5uef_k$ = function () {
    return this.yesterday_1;
  };
  protoOf(strings).get_request_to_enrol_already_pending_lm7luc_k$ = function () {
    return this.request_to_enrol_already_pending_1;
  };
  protoOf(strings).get_request_submitted_b6k9eq_k$ = function () {
    return this.request_submitted_1;
  };
  protoOf(strings).get_canceled_enrolment_request_6denpz_k$ = function () {
    return this.canceled_enrolment_request_1;
  };
  protoOf(strings).get_enroled_into_name_43dp6h_k$ = function () {
    return this.enroled_into_name_1;
  };
  protoOf(strings).get_declined_request_from_name_oynzew_k$ = function () {
    return this.declined_request_from_name_1;
  };
  protoOf(strings).get_view_course_8lhojw_k$ = function () {
    return this.view_course_1;
  };
  protoOf(strings).get_moderate_szq218_k$ = function () {
    return this.moderate_1;
  };
  protoOf(strings).get_manage_student_enrolments_6vauis_k$ = function () {
    return this.manage_student_enrolments_1;
  };
  protoOf(strings).get_manage_teacher_enrolments_q07jst_k$ = function () {
    return this.manage_teacher_enrolments_1;
  };
  protoOf(strings).get_view_learning_records_r7uqb2_k$ = function () {
    return this.view_learning_records_1;
  };
  protoOf(strings).get_edit_learning_records_bswivh_k$ = function () {
    return this.edit_learning_records_1;
  };
  protoOf(strings).get_view_members_hrmeyg_k$ = function () {
    return this.view_members_1;
  };
  protoOf(strings).get_copy_invite_code_t2awta_k$ = function () {
    return this.copy_invite_code_1;
  };
  protoOf(strings).get_direct_enrol_users_onto_courses_e8yeq8_k$ = function () {
    return this.direct_enrol_users_onto_courses_1;
  };
  protoOf(strings).get_could_not_restart_a2dpxg_k$ = function () {
    return this.could_not_restart_1;
  };
  protoOf(strings).get_close_now_jgodi_k$ = function () {
    return this.close_now_1;
  };
  protoOf(strings).get_view_all_courses_dtdx2v_k$ = function () {
    return this.view_all_courses_1;
  };
  protoOf(strings).get_edit_all_courses_dtszwy_k$ = function () {
    return this.edit_all_courses_1;
  };
  protoOf(strings).get_moderate_all_courses_lab2g7_k$ = function () {
    return this.moderate_all_courses_1;
  };
  protoOf(strings).get_manage_student_enrolments_for_all_courses_ya5klz_k$ = function () {
    return this.manage_student_enrolments_for_all_courses_1;
  };
  protoOf(strings).get_manage_teacher_enrolments_for_all_courses_ntchgi_k$ = function () {
    return this.manage_teacher_enrolments_for_all_courses_1;
  };
  protoOf(strings).get_view_attendance_records_for_all_courses_7dlari_k$ = function () {
    return this.view_attendance_records_for_all_courses_1;
  };
  protoOf(strings).get_edit_attendance_records_for_all_courses_syocoz_k$ = function () {
    return this.edit_attendance_records_for_all_courses_1;
  };
  protoOf(strings).get_add_new_users_8eeyci_k$ = function () {
    return this.add_new_users_1;
  };
  protoOf(strings).get_view_all_users_kfv36h_k$ = function () {
    return this.view_all_users_1;
  };
  protoOf(strings).get_edit_all_users_ergfy_k$ = function () {
    return this.edit_all_users_1;
  };
  protoOf(strings).get_view_learning_records_for_all_courses_hzzayx_k$ = function () {
    return this.view_learning_records_for_all_courses_1;
  };
  protoOf(strings).get_edit_learning_records_for_all_courses_4dgjjm_k$ = function () {
    return this.edit_learning_records_for_all_courses_1;
  };
  protoOf(strings).get_add_new_courses_6fpz72_k$ = function () {
    return this.add_new_courses_1;
  };
  protoOf(strings).get_manage_user_permissions_5xjnpd_k$ = function () {
    return this.manage_user_permissions_1;
  };
  protoOf(strings).get_reset_passwords_ge2mjl_k$ = function () {
    return this.reset_passwords_1;
  };
  protoOf(strings).get_upload_failed_cw455e_k$ = function () {
    return this.upload_failed_1;
  };
  protoOf(strings).get_opening_name_n7wxid_k$ = function () {
    return this.opening_name_1;
  };
  protoOf(strings).get_invalid_invite_code_k16xma_k$ = function () {
    return this.invalid_invite_code_1;
  };
  protoOf(strings).get_bulk_import_bnh7nt_k$ = function () {
    return this.bulk_import_1;
  };
  protoOf(strings).get_import_key_ez9npq_k$ = function () {
    return this.import_key_1;
  };
  protoOf(strings).get_imported_w8phot_k$ = function () {
    return this.imported_1;
  };
  protoOf(strings).get_you_can_import_users_using_a_csv_file_tlsozd_k$ = function () {
    return this.you_can_import_users_using_a_csv_file_1;
  };
  protoOf(strings).get_get_template_lwxa4s_k$ = function () {
    return this.get_template_1;
  };
  protoOf(strings).get_line_number_kg9jez_k$ = function () {
    return this.line_number_1;
  };
  protoOf(strings).get_selected_content_1fc2vy_k$ = function () {
    return this.selected_content_1;
  };
  protoOf(strings).get_edit_content_block_yqlra3_k$ = function () {
    return this.edit_content_block_1;
  };
  protoOf(strings).get_compression_xgcetf_k$ = function () {
    return this.compression_1;
  };
  protoOf(strings).get_compression_highest_u4kqla_k$ = function () {
    return this.compression_highest_1;
  };
  protoOf(strings).get_compression_high_9o0fa4_k$ = function () {
    return this.compression_high_1;
  };
  protoOf(strings).get_compression_medium_hdee47_k$ = function () {
    return this.compression_medium_1;
  };
  protoOf(strings).get_compression_low_u3k7hq_k$ = function () {
    return this.compression_low_1;
  };
  protoOf(strings).get_compression_lowest_h26rec_k$ = function () {
    return this.compression_lowest_1;
  };
  protoOf(strings).get_compression_none_9nwgqu_k$ = function () {
    return this.compression_none_1;
  };
  protoOf(strings).get_size_compressed_was_288pxc_k$ = function () {
    return this.size_compressed_was_1;
  };
  protoOf(strings).get_size_woubt6_k$ = function () {
    return this.size_1;
  };
  protoOf(strings).get_import_error_nw3mix_k$ = function () {
    return this.import_error_1;
  };
  protoOf(strings).get_upload_error_hx66i5_k$ = function () {
    return this.upload_error_1;
  };
  protoOf(strings).get_offline_items_storage_bk8bk9_k$ = function () {
    return this.offline_items_storage_1;
  };
  protoOf(strings).get_space_available_mfzlrb_k$ = function () {
    return this.space_available_1;
  };
  protoOf(strings).get_grant_permission_e87r6t_k$ = function () {
    return this.grant_permission_1;
  };
  protoOf(strings).get_gradebook_gm6tt5_k$ = function () {
    return this.gradebook_1;
  };
  protoOf(strings).get_full_screen_2s8j7x_k$ = function () {
    return this.full_screen_1;
  };
  protoOf(strings).get_exit_full_screen_ep5fp8_k$ = function () {
    return this.exit_full_screen_1;
  };
  protoOf(strings).get_increase_text_size_2f0db_k$ = function () {
    return this.increase_text_size_1;
  };
  protoOf(strings).get_decrease_text_size_n59m2j_k$ = function () {
    return this.decrease_text_size_1;
  };
  protoOf(strings).get_nothing_here_yet_gqlyi4_k$ = function () {
    return this.nothing_here_yet_1;
  };
  protoOf(strings).get_signup_with_passkey_m9bwr7_k$ = function () {
    return this.signup_with_passkey_1;
  };
  protoOf(strings).get_other_options_2lmedi_k$ = function () {
    return this.other_options_1;
  };
  protoOf(strings).get_i_am_teacher_qv6dv2_k$ = function () {
    return this.i_am_teacher_1;
  };
  protoOf(strings).get_i_am_parent_jerzqa_k$ = function () {
    return this.i_am_parent_1;
  };
  protoOf(strings).get_select_picture_from_files_2rqozn_k$ = function () {
    return this.select_picture_from_files_1;
  };
  protoOf(strings).get_your_date_of_birth_6i6ugr_k$ = function () {
    return this.your_date_of_birth_1;
  };
  protoOf(strings).get_add_child_profiles_hlm00k_k$ = function () {
    return this.add_child_profiles_1;
  };
  protoOf(strings).get_child_profile_9eobs3_k$ = function () {
    return this.child_profile_1;
  };
  protoOf(strings).get_finish_dc0fbw_k$ = function () {
    return this.finish_1;
  };
  protoOf(strings).get_scan_badge_qr_code_re52iy_k$ = function () {
    return this.scan_badge_qr_code_1;
  };
  protoOf(strings).get_new_user_90vx9p_k$ = function () {
    return this.new_user_1;
  };
  protoOf(strings).get_existing_user_jgf48a_k$ = function () {
    return this.existing_user_1;
  };
  protoOf(strings).get_personal_account_6p3rih_k$ = function () {
    return this.personal_account_1;
  };
  protoOf(strings).get_signup_jhh5b5_k$ = function () {
    return this.signup_1;
  };
  protoOf(strings).get_access_educational_content_download_offline_ycy65s_k$ = function () {
    return this.access_educational_content_download_offline_1;
  };
  protoOf(strings).get_join_learning_space_lafo4x_k$ = function () {
    return this.join_learning_space_1;
  };
  protoOf(strings).get_learning_space_uvshwu_k$ = function () {
    return this.learning_space_1;
  };
  protoOf(strings).get_eg_for_your_school_organization_4rgw4k_k$ = function () {
    return this.eg_for_your_school_organization_1;
  };
  protoOf(strings).get_new_learning_space_cach1v_k$ = function () {
    return this.new_learning_space_1;
  };
  protoOf(strings).get_full_name_j80wa6_k$ = function () {
    return this.full_name_1;
  };
  protoOf(strings).get_which_profile_do_you_want_to_start_bkbntm_k$ = function () {
    return this.which_profile_do_you_want_to_start_1;
  };
  protoOf(strings).get_create_passkey_for_faster_and_easier_signin_qn73y3_k$ = function () {
    return this.create_passkey_for_faster_and_easier_signin_1;
  };
  protoOf(strings).get_create_username_and_password_oqsgry_k$ = function () {
    return this.create_username_and_password_1;
  };
  protoOf(strings).get_create_local_account_1go50h_k$ = function () {
    return this.create_local_account_1;
  };
  protoOf(strings).get_with_passkeys_no_complex_passwords_needed_3jdchr_k$ = function () {
    return this.with_passkeys_no_complex_passwords_needed_1;
  };
  protoOf(strings).get_enter_link_manually_yj6220_k$ = function () {
    return this.enter_link_manually_1;
  };
  protoOf(strings).get_registration_not_allowed_kcsfpb_k$ = function () {
    return this.registration_not_allowed_1;
  };
  protoOf(strings).get_add_subtitles_lmvrpw_k$ = function () {
    return this.add_subtitles_1;
  };
  protoOf(strings).get_edit_subtitles_axg4fj_k$ = function () {
    return this.edit_subtitles_1;
  };
  protoOf(strings).get_subtitles_hlfe0i_k$ = function () {
    return this.subtitles_1;
  };
  protoOf(strings).get_progress_key_gezyja_k$ = function () {
    return this.progress_key_1;
  };
  protoOf(strings).get_response_xlk07e_k$ = function () {
    return this.response_1;
  };
  protoOf(strings).get_true_key_1aqcqx_k$ = function () {
    return this.true_key_1;
  };
  protoOf(strings).get_false_key_o196xy_k$ = function () {
    return this.false_key_1;
  };
  protoOf(strings).get_copy_wok88u_k$ = function () {
    return this.copy_1;
  };
  protoOf(strings).get_copy_course_1jmgck_k$ = function () {
    return this.copy_course_1;
  };
  protoOf(strings).get_copy_of_h197g8_k$ = function () {
    return this.copy_of_1;
  };
  protoOf(strings).get_invite_via_contact_uwhdq6_k$ = function () {
    return this.invite_via_contact_1;
  };
  protoOf(strings).get_invite_to_course_byriq6_k$ = function () {
    return this.invite_to_course_1;
  };
  protoOf(strings).get_use_email_57zdbv_k$ = function () {
    return this.use_email_1;
  };
  protoOf(strings).get_use_phone_number_jsildn_k$ = function () {
    return this.use_phone_number_1;
  };
  protoOf(strings).get_add_username_email_phone_ucqx8p_k$ = function () {
    return this.add_username_email_phone_1;
  };
  protoOf(strings).get_no_valid_contact_found_dird1x_k$ = function () {
    return this.no_valid_contact_found_1;
  };
  protoOf(strings).get_no_contact_found_iw838u_k$ = function () {
    return this.no_contact_found_1;
  };
  protoOf(strings).get_decline_qrtukt_k$ = function () {
    return this.decline_1;
  };
  protoOf(strings).get_do_you_want_to_join_this_course_ooxz5z_k$ = function () {
    return this.do_you_want_to_join_this_course_1;
  };
  protoOf(strings).get_invite_has_been_used_v6znqa_k$ = function () {
    return this.invite_has_been_used_1;
  };
  protoOf(strings).get_pending_invites_c4aprt_k$ = function () {
    return this.pending_invites_1;
  };
  protoOf(strings).get_expires_kdxigl_k$ = function () {
    return this.expires_1;
  };
  protoOf(strings).get_reminder_uneuyj_k$ = function () {
    return this.reminder_1;
  };
  protoOf(strings).get_resend_iyftj8_k$ = function () {
    return this.resend_1;
  };
  protoOf(strings).get_revoke_iyhxu7_k$ = function () {
    return this.revoke_1;
  };
  protoOf(strings).get_invite_code_redeemed_eg7acg_k$ = function () {
    return this.invite_code_redeemed_1;
  };
  protoOf(strings).get_invite_code_invalid_6la0r2_k$ = function () {
    return this.invite_code_invalid_1;
  };
  protoOf(strings).get_invite_declined_v6gx8l_k$ = function () {
    return this.invite_declined_1;
  };
  protoOf(strings).get_invite_code_already_redeemed_7ds63r_k$ = function () {
    return this.invite_code_already_redeemed_1;
  };
  protoOf(strings).get_invite_code_expired_adjkyo_k$ = function () {
    return this.invite_code_expired_1;
  };
  protoOf(strings).get_invitation_is_revoked_g7pubq_k$ = function () {
    return this.invitation_is_revoked_1;
  };
  protoOf(strings).get_security_g3uqrb_k$ = function () {
    return this.security_1;
  };
  protoOf(strings).get_manage_account_en20mc_k$ = function () {
    return this.manage_account_1;
  };
  protoOf(strings).get_passkeys_boldiq_k$ = function () {
    return this.passkeys_1;
  };
  protoOf(strings).get_manage_gix94e_k$ = function () {
    return this.manage_1;
  };
  protoOf(strings).get_created_i9xfr3_k$ = function () {
    return this.created_1;
  };
  protoOf(strings).get_create_passkey_2f3yic_k$ = function () {
    return this.create_passkey_1;
  };
  protoOf(strings).get_last_updated_a57srf_k$ = function () {
    return this.last_updated_1;
  };
  protoOf(strings).get_delete_this_passkey_187wi0_k$ = function () {
    return this.delete_this_passkey_1;
  };
  protoOf(strings).get_loss_access_passkey_dialog_tbbn35_k$ = function () {
    return this.loss_access_passkey_dialog_1;
  };
  protoOf(strings).get_sign_in_faster_next_time_1b2138_k$ = function () {
    return this.sign_in_faster_next_time_1;
  };
  protoOf(strings).get_secure_passkey_detail_text_3tmak5_k$ = function () {
    return this.secure_passkey_detail_text_1;
  };
  protoOf(strings).get_invitations_sent_qpuk5i_k$ = function () {
    return this.invitations_sent_1;
  };
  protoOf(strings).get_invitation_sent_55cot1_k$ = function () {
    return this.invitation_sent_1;
  };
  protoOf(strings).values_dmh61q_k$ = function () {
    return listOf([this.app_name_1, this.blank_1, this.login_1, this.got_it_1, this.learn_more_1, this.be_careful_interacting_online_1, this.be_careful_not_to_share_1, this.share_app_1, this.send_apk_file_1, this.send_app_link_1, this.error_1, this.create_backup_1, this.create_backup_description_1, this.err_registering_new_user_1, this.register_empty_fields_1, this.register_incorrect_email_1, this.group_activity_1, this.select_group_members_1, this.confirm_delete_message_1, this.wrong_user_pass_combo_1, this.login_network_error_1, this.download_1, this.downloaded_1, this.recycled_1, this.libraries_1, this.pause_download_1, this.ok_1, this.confirm_1, this.cancel_1, this.canceled_1, this.delete_1, this.deleted_1, this.new_tab_1, this.loading_1, this.deleting_1, this.processing_1, this.uploading_1, this.error_opening_file_1, this.logout_1, this.about_1, this.download_all_1, this.next_1, this.previous_1, this.back_1, this.username_1, this.password_1, this.confirm_password_1, this.last_name_1, this.first_name_1, this.least_recent_1, this.by_score_1, this.by_completion_1, this.by_recent_attempt_1, this.by_timestamp_1, this.register_now_1, this.new_password_1, this.phone_memory_1, this.memory_card_1, this.device_1, this.register_1, this.phone_number_1, this.name_key_1, this.description_1, this.male_1, this.female_1, this.other_1, this.unset_1, this.settings_1, this.language_1, this.add_a_new_language_1, this.add_new_language_1, this.select_language_1, this.languages_1, this.edit_language_1, this.two_letter_code_1, this.three_letter_code_1, this.languages_description_1, this.advanced_1, this.optional_1, this.email_1, this.regcode_1, this.home_1, this.phone_1, this.attendance_1, this.classes_1, this.exams_1, this.reports_1, this.choose_template_1, this.save_as_template_1, this.contents_1, this.students_1, this.add_a_student_1, this.forgot_password_1, this.notifications_1, this.account_1, this.accounts_1, this.share_1, this.send_1, this.open_1, this.downloading_1, this.waiting_1, this.waiting_for_connection_1, this.queued_1, this.failed_1, this.passed_1, this.success_1, this.failure_1, this.incomplete_1, this.completed_1, this.experience_1, this.answered_1, this.select_subtitle_video_1, this.no_subtitle_1, this.no_video_file_found_1, this.content_from_file_1, this.content_from_link_1, this.import_from_file_1, this.import_from_link_1, this.import_content_1, this.update_content_1, this.publicly_accessible_1, this.title_1, this.licence_1, this.ebook_1, this.interactive_1, this.collection_1, this.document_1, this.article_1, this.audio_1, this.move_1, this.hide_1, this.unhide_1, this.compress_1, this.and_key_1, this.added_1, this.attempts_1, this.add_link_description_1, this.add_gallery_description_1, this.add_file_description_1, this.error_this_device_doesnt_support_bluetooth_sharing_1, this.share_offline_zip_checkbox_label_1, this.share_offline_dialog_message_1, this.preparing_1, this.fixed_date_1, this.relative_date_1, this.field_required_prompt_1, this.field_password_error_min_1, this.filed_password_no_match_1, this.update_1, this.profile_1, this.dialog_download_from_playstore_message_1, this.dialog_download_from_playstore_ok_1, this.dialog_download_from_playstore_cancel_1, this.accept_1, this.also_available_in_1, this.created_partnership_1, this.onboarding_get_started_label_1, this.lets_get_started_label_1, this.onboarding_headline1__1, this.onboarding_subheadline1__1, this.onboarding_headline2__1, this.onboarding_subheadline2__1, this.onboarding_headline3__1, this.onboarding_subheadline3__1, this.download_continue_stacked_label_1, this.im_an_individual_learner_1, this.im_an_individual_learner_description_1, this.i_want_to_join_my_organization_school_1, this.i_want_to_join_my_organization_school_description_1, this.i_want_to_add_my_organization_school_1, this.i_want_to_add_my_organization_school_description_1, this.individual_action_title_1, this.create_new_local_account_title_1, this.create_new_local_account_description_1, this.restore_local_account_title_1, this.restore_local_account_description_1, this.download_continue_btn_label_1, this.download_wifi_only_1, this.download_calculating_1, this.download_state_download_1, this.download_state_downloading_1, this.download_state_downloaded_1, this.download_downloading_placeholder_1, this.download_summary_title_1, this.download_cancel_label_1, this.download_pause_download_1, this.download_storage_option_device_1, this.download_locally_availability_1, this.download_cloud_availability_1, this.insufficient_space_1, this.download_entry_state_paused_1, this.get_app_1, this.no_app_found_1, this.entry_details_author_1, this.entry_details_publisher_1, this.entry_details_license_1, this.file_not_found_1, this.multiple_choice_1, this.preview_1, this.content_creation_storage_option_title_1, this.file_required_prompt_1, this.content_creation_folder_new_message_1, this.content_creation_folder_update_message_1, this.error_message_load_page_1, this.error_message_update_document_1, this.supported_files_1, this.content_editor_save_error_1, this.content_entry_export_inprogress_1, this.content_entry_export_message_1, this.show_hidden_items_1, this.open_folder_1, this.action_hidden_1, this.invalid_1, this.enter_register_code_1, this.bar_chart_1, this.line_chart_1, this.score_1, this.content_total_duration_1, this.content_average_duration_1, this.count_session_1, this.interaction_recorded_1, this.number_active_users_1, this.average_usage_time_per_user_1, this.number_students_completed_1, this.percent_students_completed_1, this.total_attendances_1, this.total_absences_1, this.total_lates_1, this.percent_students_attended_1, this.percent_students_attended_or_late_1, this.total_number_of_classes_1, this.number_unique_students_attending_1, this.xapi_day_1, this.xapi_week_1, this.xapi_month_1, this.xapi_custom_date_1, this.xapi_content_entry_1, this.xapi_clear_1, this.last_week_date_range_1, this.last_two_week_date_range_1, this.last_month_date_range_1, this.last_three_months_date_range_1, this.new_custom_date_range_1, this.selected_custom_range_1, this.time_range_1, this.year_1, this.from_1, this.done_1, this.xapi_options_general_1, this.xapi_options_report_title_1, this.xapi_options_visual_type_1, this.xapi_options_data_set_1, this.xapi_options_series_1, this.xapi_options_axes_1, this.xapi_options_y_axes_1, this.xapi_options_x_axes_1, this.xapi_options_subgroup_1, this.xapi_options_filters_1, this.xapi_options_who_1, this.xapi_options_did_1, this.xapi_options_what_1, this.xapi_options_when_1, this.xapi_options_where_1, this.time_range_all_1, this.report_filter_edit_field_1, this.report_filter_edit_condition_1, this.report_filter_edit_values_1, this.report_1, this.create_a_new_report_1, this.edit_report_1, this.verb_1, this.add_a_new_verb_1, this.id_verbentity_urlid_1, this.edit_filters_1, this.field_person_gender_1, this.field_person_age_1, this.field_content_completion_1, this.field_content_entry_1, this.field_content_progress_1, this.field_attendance_percentage_1, this.condition_is_1, this.condition_is_not_1, this.condition_greater_than_1, this.condition_less_than_1, this.condition_in_list_1, this.condition_not_in_list_1, this.condition_between_1, this.add_person_filter_1, this.add_verb_filter_1, this.add_content_filter_1, this.dashboard_1, this.activity_import_link_1, this.xapi_hours_1, this.xapi_minutes_1, this.xapi_seconds_1, this.xapi_verb_header_1, this.xapi_result_header_1, this.xapi_score_1, this.content_score_1, this.completion_key_1, this.import_title_not_entered_1, this.no_account_1, this.enter_url_1, this.invalid_link_1, this.invalid_file_1, this.import_link_content_not_supported_1, this.unsupported_file_type_1, this.import_link_big_size_1, this.import_link_error_1, this.supported_link_1, this.offline_sharing_enable_bluetooth_prompt_1, this.offline_sharing_enable_wifi_promot_1, this.enable_1, this.repo_loading_status_loading_cloud_1, this.repo_loading_status_loading_mirror_1, this.repo_loading_status_failed_noconnection_1, this.repo_loading_status_failed_connection_error_1, this.licence_type_cc_by_1, this.licence_type_cc_by_sa_1, this.licence_type_cc_by_sa_nc_1, this.licence_type_cc_by_nc_1, this.licence_type_cc_by_nc_sa_1, this.licence_type_public_domain_1, this.licence_type_all_rights_1, this.license_type_cc_0__1, this.syncing_1, this.feed_1, this.people_1, this.record_attendance_1, this.today_1, this.sort_by_1, this.log_1, this.schedule_1, this.add_a_schedule_1, this.edit_schedule_1, this.first_key_1, this.last_key_1, this.last_week_1, this.mark_all_1, this.mark_all_present_1, this.mark_all_absent_1, this.present_1, this.absent_1, this.attendance_report_1, this.father_1, this.mother_1, this.birthday_1, this.first_names_1, this.basic_details_1, this.address_1, this.add_person_to_class_1, this.edit_1, this.clazz_1, this.add_a_new_class_1, this.edit_clazz_1, this.add_a_class_1, this.join_existing_class_1, this.student_image_1, this.question_key_1, this.add_question_1, this.edit_question_1, this.questions_1, this.add_person_1, this.add_class_1, this.class_name_1, this.class_description_1, this.to_key_1, this.holiday_1, this.add_a_holiday_1, this.edit_holiday_1, this.holidays_1, this.holiday_calendar_1, this.add_a_new_holiday_calendar_1, this.edit_holiday_calendar_1, this.features_enabled_1, this.weekly_1, this.once_1, this.daily_1, this.monthly_1, this.yearly_1, this.sunday_1, this.monday_1, this.tuesday_1, this.wednesday_1, this.thursday_1, this.friday_1, this.saturday_1, this.day_1, this.toC_1, this.last_month_1, this.activity_change_1, this.change_implemented_if_any_1, this.duration_1, this.how_did_it_go_1, this.notes_1, this.activity_1, this.sort_by_name_1, this.sort_by_name_asc_1, this.sort_by_name_desc_1, this.date_enroll_1, this.date_left_1, this.enroled_1, this.class_enrolment_1, this.graduated_1, this.dropped_out_1, this.moved_1, this.new_leaving_reason_1, this.edit_leaving_reason_1, this.edit_enrolment_1, this.new_enrolment_1, this.select_leaving_reason_1, this.add_leaving_reason_1, this.leaving_reason_1, this.leaving_reasons_1, this.leaving_reason_manage_1, this.view_profile_1, this.class_enrolment_outcome_1, this.class_enrolment_leaving_1, this.in_progress_1, this.outcome_1, this.person_enrolment_in_class_1, this.enrolment_1, this.error_start_date_before_clazz_date_1, this.error_start_date_before_previous_enrolment_date_1, this.time_present_1, this.ascending_1, this.descending_1, this.sort_by_text_1, this.attendance_high_to_low_1, this.attendance_low_to_high_1, this.teacher_1, this.add_a_teacher_1, this.partial_1, this.teachers_literal_1, this.participant_1, this.primary_user_1, this.up_key_1, this.down_key_1, this.activity_went_good_1, this.activity_went_bad_1, this.activity_enter_any_notes_1, this.uom_frequency_title_1, this.uom_duration_title_1, this.uom_boolean_title_1, this.uom_default_title_1, this.add_activity_1, this.add_activity_literal_1, this.select_one_1, this.measurement_type_1, this.frequency_1, this.yes_no_1, this.time_period_1, this.location_1, this.last_three_months_1, this.export_1, this.date_1, this.average_1, this.age_1, this.days_1, this.apply_1, this.file_selected_1, this.all_1, this.holiday_calendars_1, this.holiday_calendars_desc_1, this.sel_question_set_1, this.sel_question_set_desc_1, this.users_1, this.nomination_1, this.active_1, this.class_id_1, this.gender_literal_1, this.country_1, this.connectivity_1, this.home_internet_access_1, this.mobile_internet_access_1, this.connectivity_limited_1, this.connectivity_full_1, this.prefer_not_to_say_1, this.sel_question_set_to_use_1, this.search_1, this.attendance_percentage_1, this.filter_1, this.over_key_1, this.sync_1, this.not_recorded_1, this.groups_1, this.group_setting_desc_1, this.roles_1, this.role_1, this.add_a_new_role_1, this.edit_role_1, this.rols_assignment_1, this.role_assignment_setting_desc_1, this.locations_1, this.locations_setting_desc_1, this.audit_log_1, this.audit_log_setting_desc_1, this.entry_key_1, this.permission_key_1, this.permissions_1, this.role_name_1, this.members_key_1, this.member_key_1, this.role_assignment_1, this.scope_by_1, this.assign_to_1, this.person_1, this.add_a_new_person_1, this.edit_person_1, this.permission_person_select_1, this.permission_person_insert_1, this.permission_person_update_1, this.permission_person_picture_select_1, this.permission_person_picture_insert_1, this.permission_person_picture_update_1, this.permission_clazz_select_1, this.permission_clazz_insert_1, this.permission_clazz_update_1, this.permission_clazz_add_teacher_1, this.permission_clazz_add_student_1, this.permission_attendance_select_1, this.permission_attendance_insert_1, this.permission_attendance_update_1, this.permission_activity_select_1, this.permission_activity_insert_1, this.permission_activity_update_1, this.permission_sel_question_select_1, this.permission_sel_question_insert_1, this.permission_sel_question_update_1, this.permission_sel_select_1, this.permission_sel_update_1, this.custom_fields_1, this.custom_field_1, this.custom_fields_desc_1, this.field_type_1, this.text_1, this.dropdown_1, this.options_1, this.option_value_1, this.errors_1, this.shake_feedback_1, this.feedback_hint_1, this.send_feedback_1, this.feedback_thanks_1, this.start_date_1, this.end_date_1, this.last_active_1, this.save_1, this.change_password_1, this.current_password_1, this.password_unchanged_1, this.timezone_1, this.users_settings_desc_1, this.add_1, this.refresh_1, this.school_1, this.add_a_new_school_1, this.edit_school_1, this.join_existing_school_1, this.schools_1, this.assignments_1, this.assignment_1, this.none_key_1, this.instructions_for_students_1, this.not_started_1, this.percentage_complete_1, this.percentage_score_1, this.started_date_1, this.started_1, this.mixed_1, this.store_title_1, this.store_description_short_1, this.store_description_full_1, this.due_date_1, this.content_1, this.add_new_content_1, this.add_content_1, this.student_progress_1, this.status_1, this.use_device_language_1, this.select_item_1, this.from_to_date_1, this.num_items_with_name_1, this.num_items_with_name_with_comma_1, this.add_to_1, this.remove_from_1, this.change_photo_1, this.remove_picture_1, this.take_new_photo_from_camera_1, this.select_picture_from_gallery_1, this.select_file_1, this.permission_clazz_assignment_view_1, this.permission_clazz_asignment_edit_1, this.overview_1, this.add_new_1, this.staff_1, this.x_teachers_y_students_1, this.call_1, this.organization_id_1, this.student_1, this.contact_details_1, this.untitled_1, this.present_late_absent_1, this.marked_cap_1, this.submitted_cap_1, this.not_submitted_cap_1, this.submitliteral_1, this.x_percent_attended_1, this.answer_1, this.of_content_1, this.nothing_here_1, this.not_answered_1, this.clazz_work_1, this.add_a_new_clazzwork_1, this.edit_clazzwork_1, this.clazz_assignment_1, this.new_assignment_1, this.edit_assignment_1, this.total_score_1, this.late_submission_1, this.mark_penalty_1, this.late_submission_penalty_1, this.end_of_grace_period_1, this.allow_class_comments_1, this.after_deadline_date_error_1, this.points_1, this.minimum_score_1, this.automatic_1, this.student_marks_content_1, this.completion_criteria_1, this.mark_complete_1, this.late_penalty_1, this.marked_key_1, this.submitted_key_1, this.not_submitted_1, this.visible_from_date_1, this.submission_type_1, this.no_submission_required_1, this.short_text_1, this.attachment_1, this.quiz_1, this.allow_private_comments_from_students_1, this.deadline_1, this.class_timezone_1, this.maximum_score_1, this.quiz_questions_1, this.time_1, this.submission_1, this.public_comments_1, this.private_comments_1, this.submit_your_answer_1, this.add_class_comment_1, this.add_private_comment_1, this.class_comments_1, this.submit_1, this.three_num_items_with_name_with_comma_1, this.marking_1, this.return_and_mark_next_1, this.return_only_1, this.workspace_1, this.organisation_1, this.use_public_library_site_1, this.create_site_1, this.connect_as_guest_1, this.create_account_1, this.my_1, this.add_another_1, this.logged_in_as_1, this.person_exists_1, this.username_too_short_1, this.username_too_long_1, this.username_starts_with_number_1, this.invalid_username_1, this.incorrect_current_password_1, this.sel_question_type_free_text_1, this.sel_question_type_multiple_choice_1, this.question_text_1, this.question_type_1, this.add_option_1, this.roles_and_permissions_1, this.add_role_permission_1, this.scope_1, this.scope_description_1, this.role_description_1, this.assign_role_1, this.more_information_1, this.pending_requests_1, this.pending_1, this.please_wait_for_approval_1, this.reject_1, this.ask_your_teacher_for_code_1, this.copied_to_clipboard_1, this.invite_link_desc_1, this.copy_link_1, this.copy_code_1, this.share_link_1, this.invite_with_link_1, this.role_not_selected_error_1, this.permission_person_delegate_1, this.this_field_is_mandatory_1, this.permission_role_select_1, this.permission_role_insert_1, this.permission_school_select_1, this.permission_school_insert_1, this.permission_school_update_1, this.add_student_to_school_1, this.add_staff_to_school_1, this.permission_password_reset_1, this.school_code_1, this.invite_code_1, this.entity_code_1, this.join_code_instructions_1, this.record_for_student_1, this.moved_x_entries_1, this.end_is_before_start_error_1, this.record_attendance_for_most_recent_occurrence_1, this.add_a_new_occurrence_1, this.active_classes_1, this.terms_and_policies_1, this.manage_site_settings_1, this.guest_login_enabled_1, this.registration_allowed_1, this.yes_1, this.no_1, this.edit_site_1, this.site_1, this.site_link_1, this.please_enter_the_linK_1, this.or_1, this.connect_1, this.terms_and_policies_text_1, this.edit_terms_and_policies_1, this.strings_not_allowed_1, this.undo_1, this.video_1, this.content_editor_create_new_category_1, this.content_pieces_completed_1, this.content_usage_duration_1, this.manage_download_1, this.powered_by_1, this.invalid_email_1, this.select_account_1, this.opening_link_1, this.select_account_to_continue_1, this.you_are_already_in_class_1, this.you_are_already_in_school_1, this.join_class_1, this.join_school_1, this.what_is_your_date_of_birth_1, this.parents_email_address_1, this.we_sent_a_message_to_your_parent_1, this.toggle_visibility_1, this.parental_consent_1, this.parent_child_register_message_subject_1, this.parent_child_register_message_1, this.parent_consent_explanation_1, this.relationship_1, this.i_consent_1, this.i_do_not_consent_1, this.revoke_consent_1, this.restore_consent_1, this.status_consent_granted_1, this.status_consent_denied_1, this.other_legal_guardian_1, this.manage_parental_consent_1, this.view_class_content_1, this.edit_class_content_1, this.view_class_learning_records_1, this.view_contact_details_of_members_1, this.edit_contact_details_of_members_1, this.view_socioeconomic_details_of_members_1, this.edit_socioeconomic_details_of_members_1, this.add_person_or_group_1, this.lets_get_started_1, this.looks_like_installed_app_from_link_1, this.continue_using_link_recommended_1, this.continue_using_the_link_1, this.start_from_scratch_1, this.ignore_the_link_1, this.add_permission_for_a_person_1, this.add_permission_for_a_group_1, this.add_using_link_1, this.add_using_a_web_link_then_1, this.add_from_gallery_1, this.add_video_or_audio_from_the_device_gallery_1, this.add_file_1, this.add_folder_1, this.importing_1, this.downloading_content_1, this.deleting_content_1, this.add_folder_description_1, this.add_educational_content_using_supported_formats_eg_pdf_xapi_h5p_1, this.current_status_consent_granted_1, this.select_country_1, this.enter_link_1, this.add_subject_1, this.share_via_1, this.share_apk_file_1, this.recommended_for_advanced_users_1, this.nearby_share_1, this.recommended_for_offline_installation_1, this.app_store_link_1, this.everything_works_offline_1, this.swipe_to_next_1, this.content_entries_completed_1, this.content_usage_time_1, this.all_permissions_1, this.folder_1, this.create_a_new_learning_env_1, this.add_educational_content_to_new_learning_env_1, this.connect_to_an_existing_learning_environment_1, this.does_your_class_already_have_learning_env_1, this.use_the_public_lib_env_1, this.just_want_to_browse_1, this.revoking_consent_will_1, this.you_must_comply_with_license_1, this.you_can_copypaste_a_link_1, this.see_supported_sites_1, this.class_setup_1, this.anyone_with_this_can_join_school_1, this.this_class_1, this.from_my_classes_1, this.my_content_1, this.learning_environment_1, this.grades_class_age_1, this.add_remove_and_modify_grades_1, this.subjects_1, this.add_remove_and_modify_subjects_1, this.create_my_account_1, this.recommend_it_1, this.edit_permissions_1, this.add_from_contacts_1, this.almost_done_1, this.your_username_1, this.select_content_1, this.search_in_1, this.type_1, this.please_download_the_app_1, this.alternatively_you_can_download_the_apk_1, this.full_i_can_download_as_much_as_i_like_1, this.limited_i_avoid_downloading_too_much_1, this.oops_1, this.sorry_something_went_wrong_1, this.incident_id_1, this.error_code_1, this.take_me_home_1, this.view_clazz_1, this.view_clazzes_1, this.enrol_and_unenrol_students_1, this.enrol_and_unenrol_teachers_1, this.view_assignments_1, this.add_or_edit_assignment_1, this.view_basic_profile_of_members_1, this.edit_basic_profile_of_members_1, this.view_school_1, this.edit_clazzes_1, this.add_new_clazz_to_school_1, this.added_to_class_content_1, this.content_already_added_to_class_1, this.your_account_needs_approved_1, this.adult_account_required_1, this.blank_report_1, this.attendance_over_time_by_class_1, this.percentage_of_students_attending_over_time_1, this.content_completion_1, this.number_of_students_completed_time_1, this.content_usage_by_class_1, this.total_content_usage_duration_class_1, this.content_usage_over_time_1, this.total_content_duration_gender_1, this.unique_content_users_over_time_1, this.number_of_active_users_over_time_1, this.parent_1, this.upload_1, this.selected_file_summary_1, this.drag_and_drop_or_click_to_add_file_1, this.extra_active_tab_warning_1, this.saved_1, this.individual_1, this.group_1, this.dont_show_before_1, this.group_submission_1, this.require_file_submission_1, this.require_text_submission_1, this.maximum_1, this.size_limit_1, this.size_limit_error_1, this.limit_1, this.number_of_files_1, this.edit_after_submission_1, this.allowed_till_deadline_1, this.allowed_till_grace_1, this.not_allowed_1, this.marked_by_1, this.peers_1, this.peers_to_review_1, this.file_type_1, this.file_type_chosen_1, this.file_type_any_1, this.file_document_1, this.file_image_1, this.submit_grade_1, this.submit_grade_and_mark_next_1, this.graded_1, this.score_greater_than_zero_1, this.words_1, this.characters_1, this.class_timezone_set_1, this.maximum_points_1, this.penalty_label_1, this.submissions_1, this.add_text_1, this.course_blocks_1, this.add_block_1, this.edit_block_1, this.module_1, this.course_module_1, this.formatted_text_to_show_to_course_participants_1, this.add_course_block_content_desc_1, this.add_assignment_block_content_desc_1, this.discussion_board_1, this.add_discussion_board_desc_1, this.new_module_1, this.edit_module_1, this.indent_1, this.unindent_1, this.institution_1, this.student_enrolment_policy_1, this.teacher_enrolment_policy_1, this.open_enrolment_1, this.enrolment_requests_must_be_approved_1, this.accept_enrolment_requests_automatically_1, this.visibility_1, this.hidden_enrolment_via_links_code_or_invitation_1, this.visible_for_all_1, this.terminology_1, this.select_terminology_1, this.add_new_terminology_1, this.edit_terminology_1, this.your_words_for_1, this.course_setup_1, this.number_of_groups_1, this.assign_to_random_groups_1, this.add_new_groups_1, this.edit_groups_1, this.num_replies_1, this.topics_1, this.add_topic_1, this.add_a_reply_1, this.messages_1, this.message_1, this.library_1, this.courses_1, this.course_1, this.reports_and_analytics_1, this.course_comments_1, this.currently_enroled_1, this.past_enrolments_1, this.standard_1, this.group_number_1, this.add_group_1, this.edit_group_1, this.new_group_set_1, this.edit_text_1, this.add_module_1, this.add_a_new_course_1, this.join_existing_course_1, this.edit_course_1, this.currently_enrolled_1, this.past_enrollments_1, this.unread_1, this.new_chat_1, this.new_group_1, this.chat_1, this.you_1, this.edit_topic_1, this.posts_1, this.post_1, this.individual_submission_1, this.unassigned_1, this.error_too_long_text_1, this.managed_enrolment_1, this.text_file_submission_error_1, this.submit_all_at_once_submission_policy_1, this.multiple_submission_allowed_submission_policy_1, this.enrolment_policy_1, this.submission_policy_1, this.submission_already_made_1, this.grade_out_of_range_1, this.update_grade_1, this.update_grade_and_mark_next_1, this.add_discussion_1, this.edit_discussion_1, this.type_here_1, this.deadline_has_passed_1, this.already_submitted_1, this.exceeds_word_limit_1, this.exceeds_char_limit_1, this.unassigned_error_1, this.enabled_1, this.disabled_1, this.from_my_courses_1, this.assign_reviewers_1, this.reviews_per_user_group_1, this.assign_random_reviewers_1, this.reviewer_1, this.app_language_1, this.pdf_1, this.panic_button_app_1, this.actions_to_be_taken_in_case_of_emergency_1, this.exit_app_1, this.delete_app_data_from_device_1, this.more_options_1, this.num_holidays_1, this.hide_app_1, this.panic_button_explanation_1, this.hide_app_explanation_1, this.most_recent_1, this.comment_1, this.grant_app_permission_1, this.this_app_will_receive_1, this.my_profile_1, this.add_another_account_1, this.end_is_before_start_1, this.select_person_1, this.your_submission_1, this.edit_content_1, this.edit_folder_1, this.add_new_post_1, this.grades_scoring_1, this.mark_comment_1, this.mark_1, this.too_high_1, this.required_1, this.expand_1, this.collapse_1, this.remove_1, this.table_of_contents_1, this.select_date_1, this.link_1, this.time_submitted_1, this.group_assignment_1, this.menu_1, this.restarting_1, this.terms_required_if_registration_enabled_1, this.drop_files_to_import_1, this.compose_post_1, this.password_updated_1, this.html5_content_display_engine_1, this.chrome_recommended_1, this.chrome_recommended_info_1, this.internal_webview_1, this.internal_webview_info_1, this.content_not_ready_try_later_1, this.version_1, this.licenses_1, this.cannot_record_attendance_for_future_date_time_1, this.could_not_load_vlc_1, this.selected_1, this.clear_selection_1, this.move_entries_to_this_folder_1, this.cannot_move_to_subfolder_of_self_1, this.cannot_move_already_in_same_folder_1, this.move_to_1, this.restore_1, this.delete_permanently_1, this.deleted_items_1, this.delete_or_restore_items_1, this.yesterday_1, this.request_to_enrol_already_pending_1, this.request_submitted_1, this.canceled_enrolment_request_1, this.enroled_into_name_1, this.declined_request_from_name_1, this.view_course_1, this.moderate_1, this.manage_student_enrolments_1, this.manage_teacher_enrolments_1, this.view_learning_records_1, this.edit_learning_records_1, this.view_members_1, this.copy_invite_code_1, this.direct_enrol_users_onto_courses_1, this.could_not_restart_1, this.close_now_1, this.view_all_courses_1, this.edit_all_courses_1, this.moderate_all_courses_1, this.manage_student_enrolments_for_all_courses_1, this.manage_teacher_enrolments_for_all_courses_1, this.view_attendance_records_for_all_courses_1, this.edit_attendance_records_for_all_courses_1, this.add_new_users_1, this.view_all_users_1, this.edit_all_users_1, this.view_learning_records_for_all_courses_1, this.edit_learning_records_for_all_courses_1, this.add_new_courses_1, this.manage_user_permissions_1, this.reset_passwords_1, this.upload_failed_1, this.opening_name_1, this.invalid_invite_code_1, this.bulk_import_1, this.import_key_1, this.imported_1, this.you_can_import_users_using_a_csv_file_1, this.get_template_1, this.line_number_1, this.selected_content_1, this.edit_content_block_1, this.compression_1, this.compression_highest_1, this.compression_high_1, this.compression_medium_1, this.compression_low_1, this.compression_lowest_1, this.compression_none_1, this.size_compressed_was_1, this.size_1, this.import_error_1, this.upload_error_1, this.offline_items_storage_1, this.space_available_1, this.grant_permission_1, this.gradebook_1, this.full_screen_1, this.exit_full_screen_1, this.increase_text_size_1, this.decrease_text_size_1, this.nothing_here_yet_1, this.signup_with_passkey_1, this.other_options_1, this.i_am_teacher_1, this.i_am_parent_1, this.select_picture_from_files_1, this.your_date_of_birth_1, this.add_child_profiles_1, this.child_profile_1, this.finish_1, this.scan_badge_qr_code_1, this.new_user_1, this.existing_user_1, this.personal_account_1, this.signup_1, this.access_educational_content_download_offline_1, this.join_learning_space_1, this.learning_space_1, this.eg_for_your_school_organization_1, this.new_learning_space_1, this.full_name_1, this.which_profile_do_you_want_to_start_1, this.create_passkey_for_faster_and_easier_signin_1, this.create_username_and_password_1, this.create_local_account_1, this.with_passkeys_no_complex_passwords_needed_1, this.enter_link_manually_1, this.registration_not_allowed_1, this.add_subtitles_1, this.edit_subtitles_1, this.subtitles_1, this.progress_key_1, this.response_1, this.true_key_1, this.false_key_1, this.copy_1, this.copy_course_1, this.copy_of_1, this.invite_via_contact_1, this.invite_to_course_1, this.use_email_1, this.use_phone_number_1, this.add_username_email_phone_1, this.no_valid_contact_found_1, this.no_contact_found_1, this.decline_1, this.do_you_want_to_join_this_course_1, this.invite_has_been_used_1, this.pending_invites_1, this.expires_1, this.reminder_1, this.resend_1, this.revoke_1, this.invite_code_redeemed_1, this.invite_code_invalid_1, this.invite_declined_1, this.invite_code_already_redeemed_1, this.invite_code_expired_1, this.invitation_is_revoked_1, this.security_1, this.manage_account_1, this.passkeys_1, this.manage_1, this.created_1, this.create_passkey_1, this.last_updated_1, this.delete_this_passkey_1, this.loss_access_passkey_dialog_1, this.sign_in_faster_next_time_1, this.secure_passkey_detail_text_1, this.invitations_sent_1, this.invitation_sent_1]);
  };
  var strings_instance;
  function strings_getInstance() {
    if (strings_instance == null)
      new strings();
    return strings_instance;
  }
  function plurals() {
    plurals_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_pluralsJson.json');
    tmp.stringsFallbackFileUrl_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_pluralsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_pluralsJson_ne.json');
    var tmp_5 = new SupportedLocale('ne', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_pluralsJson_ar.json');
    var tmp_7 = new SupportedLocale('ar', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_pluralsJson_bn.json');
    var tmp_9 = new SupportedLocale('bn', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_pluralsJson_fr.json');
    var tmp_11 = new SupportedLocale('fr', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_pluralsJson_fa.json');
    var tmp_13 = new SupportedLocale('fa', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_pluralsJson_nb-NO.json');
    var tmp_15 = new SupportedLocale('nb-NO', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_pluralsJson_it.json');
    var tmp_17 = new SupportedLocale('it', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_pluralsJson_my.json');
    var tmp_19 = new SupportedLocale('my', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_pluralsJson_ps.json');
    var tmp_21 = new SupportedLocale('ps', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_pluralsJson_tg.json');
    var tmp_23 = new SupportedLocale('tg', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_pluralsJson_ru.json');
    tmp_1.supportedLocales_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, new SupportedLocale('ru', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE())]));
    this.stringsLoader_1 = new Impl(this.supportedLocales_1, this.stringsFallbackFileUrl_1);
    this.number_of_attempts_1 = new PluralsResource('number_of_attempts', this.stringsLoader_1);
    this.duration_hours_1 = new PluralsResource('duration_hours', this.stringsLoader_1);
    this.duration_minutes_1 = new PluralsResource('duration_minutes', this.stringsLoader_1);
    this.duration_seconds_1 = new PluralsResource('duration_seconds', this.stringsLoader_1);
    this.items_selected_1 = new PluralsResource('items_selected', this.stringsLoader_1);
    this.items_deleted_1 = new PluralsResource('items_deleted', this.stringsLoader_1);
    this.items_restored_1 = new PluralsResource('items_restored', this.stringsLoader_1);
    this.are_you_sure_you_want_to_permanently_delete_1 = new PluralsResource('are_you_sure_you_want_to_permanently_delete', this.stringsLoader_1);
  }
  protoOf(plurals).get_stringsLoader_6aatx0_k$ = function () {
    return this.stringsLoader_1;
  };
  protoOf(plurals).get_number_of_attempts_ptp9a9_k$ = function () {
    return this.number_of_attempts_1;
  };
  protoOf(plurals).get_duration_hours_y98ii5_k$ = function () {
    return this.duration_hours_1;
  };
  protoOf(plurals).get_duration_minutes_wnxmgt_k$ = function () {
    return this.duration_minutes_1;
  };
  protoOf(plurals).get_duration_seconds_ne8yn7_k$ = function () {
    return this.duration_seconds_1;
  };
  protoOf(plurals).get_items_selected_okkgcd_k$ = function () {
    return this.items_selected_1;
  };
  protoOf(plurals).get_items_deleted_us0hvz_k$ = function () {
    return this.items_deleted_1;
  };
  protoOf(plurals).get_items_restored_l6p0la_k$ = function () {
    return this.items_restored_1;
  };
  protoOf(plurals).get_are_you_sure_you_want_to_permanently_delete_96xihy_k$ = function () {
    return this.are_you_sure_you_want_to_permanently_delete_1;
  };
  protoOf(plurals).values_dmh61q_k$ = function () {
    return listOf([this.number_of_attempts_1, this.duration_hours_1, this.duration_minutes_1, this.duration_seconds_1, this.items_selected_1, this.items_deleted_1, this.items_restored_1, this.are_you_sure_you_want_to_permanently_delete_1]);
  };
  var plurals_instance;
  function plurals_getInstance() {
    if (plurals_instance == null)
      new plurals();
    return plurals_instance;
  }
  function images() {
    images_instance = this;
    var tmp = this;
    var tmp_0 = require('images/illustration_connect.svg');
    var tmp0_fileUrl = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    tmp.illustration_connect_1 = new ImageResource('illustration_connect.svg', tmp0_fileUrl);
    var tmp_1 = this;
    var tmp_2 = require('images/ustad_logo.svg');
    var tmp0_fileUrl_0 = (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE();
    tmp_1.ustad_logo_1 = new ImageResource('ustad_logo.svg', tmp0_fileUrl_0);
  }
  protoOf(images).get_illustration_connect_czu664_k$ = function () {
    return this.illustration_connect_1;
  };
  protoOf(images).get_ustad_logo_gdxxmu_k$ = function () {
    return this.ustad_logo_1;
  };
  protoOf(images).values_dmh61q_k$ = function () {
    return listOf([this.illustration_connect_1, this.ustad_logo_1]);
  };
  var images_instance;
  function images_getInstance() {
    if (images_instance == null)
      new images();
    return images_instance;
  }
  function fonts() {
    fonts_instance = this;
  }
  protoOf(fonts).values_dmh61q_k$ = function () {
    // Inline function 'kotlin.collections.listOf' call
    return emptyList();
  };
  var fonts_instance;
  function fonts_getInstance() {
    if (fonts_instance == null)
      new fonts();
    return fonts_instance;
  }
  function files() {
    files_instance = this;
  }
  protoOf(files).values_dmh61q_k$ = function () {
    // Inline function 'kotlin.collections.listOf' call
    return emptyList();
  };
  var files_instance;
  function files_getInstance() {
    if (files_instance == null)
      new files();
    return files_instance;
  }
  function colors() {
    colors_instance = this;
    this.success_1 = new ColorResource(Color_init_$Create$(new Long(1286557951, 0)), Color_init_$Create$(new Long(1286557951, 0)));
  }
  protoOf(colors).get_success_tm3zdy_k$ = function () {
    return this.success_1;
  };
  protoOf(colors).values_dmh61q_k$ = function () {
    return listOf_0(this.success_1);
  };
  var colors_instance;
  function colors_getInstance() {
    if (colors_instance == null)
      new colors();
    return colors_instance;
  }
  function assets() {
    assets_instance = this;
  }
  protoOf(assets).values_dmh61q_k$ = function () {
    // Inline function 'kotlin.collections.listOf' call
    return emptyList();
  };
  var assets_instance;
  function assets_getInstance() {
    if (assets_instance == null)
      new assets();
    return assets_instance;
  }
  function MR() {
    MR_instance = this;
    this.contentHash_1 = '8db22420a0e0262ed4f034463e770475';
    this.stringsLoader_1 = strings_getInstance().stringsLoader_1.plus_tu7pk7_k$(plurals_getInstance().stringsLoader_1);
  }
  protoOf(MR).get_stringsLoader_6aatx0_k$ = function () {
    return this.stringsLoader_1;
  };
  var MR_instance;
  function MR_getInstance() {
    if (MR_instance == null)
      new MR();
    return MR_instance;
  }
  function AccountRegisterOptions(makeAccountActive, parentJoin) {
    makeAccountActive = makeAccountActive === VOID ? true : makeAccountActive;
    parentJoin = parentJoin === VOID ? null : parentJoin;
    this.makeAccountActive_1 = makeAccountActive;
    this.parentJoin_1 = parentJoin;
  }
  protoOf(AccountRegisterOptions).set_makeAccountActive_c5g3sd_k$ = function (_set____db54di) {
    this.makeAccountActive_1 = _set____db54di;
  };
  protoOf(AccountRegisterOptions).get_makeAccountActive_4ijl9g_k$ = function () {
    return this.makeAccountActive_1;
  };
  protoOf(AccountRegisterOptions).set_parentJoin_j4ptis_k$ = function (_set____db54di) {
    this.parentJoin_1 = _set____db54di;
  };
  protoOf(AccountRegisterOptions).get_parentJoin_o83rlv_k$ = function () {
    return this.parentJoin_1;
  };
  protoOf(AccountRegisterOptions).component1_7eebsc_k$ = function () {
    return this.makeAccountActive_1;
  };
  protoOf(AccountRegisterOptions).component2_7eebsb_k$ = function () {
    return this.parentJoin_1;
  };
  protoOf(AccountRegisterOptions).copy_op0fet_k$ = function (makeAccountActive, parentJoin) {
    return new AccountRegisterOptions(makeAccountActive, parentJoin);
  };
  protoOf(AccountRegisterOptions).copy$default_xbpsft_k$ = function (makeAccountActive, parentJoin, $super) {
    makeAccountActive = makeAccountActive === VOID ? this.makeAccountActive_1 : makeAccountActive;
    parentJoin = parentJoin === VOID ? this.parentJoin_1 : parentJoin;
    return $super === VOID ? this.copy_op0fet_k$(makeAccountActive, parentJoin) : $super.copy_op0fet_k$.call(this, makeAccountActive, parentJoin);
  };
  protoOf(AccountRegisterOptions).toString = function () {
    return 'AccountRegisterOptions(makeAccountActive=' + this.makeAccountActive_1 + ', parentJoin=' + this.parentJoin_1 + ')';
  };
  protoOf(AccountRegisterOptions).hashCode = function () {
    var result = getBooleanHashCode(this.makeAccountActive_1);
    result = imul(result, 31) + (this.parentJoin_1 == null ? 0 : this.parentJoin_1.hashCode()) | 0;
    return result;
  };
  protoOf(AccountRegisterOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountRegisterOptions))
      return false;
    var tmp0_other_with_cast = other instanceof AccountRegisterOptions ? other : THROW_CCE();
    if (!(this.makeAccountActive_1 === tmp0_other_with_cast.makeAccountActive_1))
      return false;
    if (!equals(this.parentJoin_1, tmp0_other_with_cast.parentJoin_1))
      return false;
    return true;
  };
  function AdultAccountRequiredException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, AdultAccountRequiredException);
  }
  function _get_dataLayer__43yv12($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dataLayer$delegate_1;
    dataLayer$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function $authenticateCOROUTINE$0(_this__u8e3s4, username, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.username_1 = username;
    this.password_1 = password;
  }
  protoOf($authenticateCOROUTINE$0).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(1);
            suspendResult = doublePbkdf2Hash(this._this__u8e3s4__1, this.password_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.passwordDoubleHashed0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = _get_dataLayer__43yv12(this._this__u8e3s4__1).get_repositoryOrLocalDb_ys0nkj_k$().personAuth2Dao_ep6mu5_k$().findByUsername_n7x67o_k$(this.username_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.personAuth21__1 = suspendResult;
            var tmp_0 = this;
            var tmp0_safe_receiver = this.personAuth21__1;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_pauthAuth_mqpdfb_k$();
            tmp_0.authMatch2__1 = contentEquals(tmp1_safe_receiver == null ? null : base64StringToByteArray(tmp1_safe_receiver), this.passwordDoubleHashed0__1);
            if (this.authMatch2__1) {
              this.set_state_rjd8d0_k$(3);
              var tmp_1 = _get_dataLayer__43yv12(this._this__u8e3s4__1).get_localDb_6v18ps_k$().personDao_e3y77h_k$();
              var tmp2_safe_receiver = this.personAuth21__1;
              var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_pauthUid_aq0lcv_k$();
              suspendResult = tmp_1.findByUidAsync_uxf6ac_k$(tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.WHEN_RESULT3__1 = null;
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            this.WHEN_RESULT3__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.authorizedPerson4__1 = this.WHEN_RESULT3__1;
            if (!(this.authorizedPerson4__1 == null) ? isDateOfBirthAMinor(Companion_getInstance().fromEpochMilliseconds_e2resj_k$(this.authorizedPerson4__1.get_dateOfBirth_7hv8kx_k$())) : false) {
              this.set_state_rjd8d0_k$(5);
              suspendResult = _get_dataLayer__43yv12(this._this__u8e3s4__1).get_localDb_6v18ps_k$().personParentJoinDao_gvpro7_k$().findByMinorPersonUid_nke4j_k$(this.authorizedPerson4__1.get_personUid_mmhd76_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            }

          case 5:
            var parentJoins = suspendResult;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_3;
              if (isInterface(parentJoins, Collection)) {
                tmp_3 = parentJoins.isEmpty_y1axqb_k$();
              } else {
                tmp_3 = false;
              }
              if (tmp_3) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = parentJoins.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                if (element.get_ppjStatus_5x2g19_k$() === Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$()) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            if (!tmp$ret$0) {
              return new AuthResult(null, false, Companion_getInstance_60().get_REASON_NEEDS_CONSENT_uun70a_k$());
            }

            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 6:
            return new AuthResult(this.authorizedPerson4__1, !(this.authorizedPerson4__1 == null));
          case 7:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 7) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $setAuthCOROUTINE$1(_this__u8e3s4, personUid, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.personUid_1 = personUid;
    this.password_1 = password;
  }
  protoOf($setAuthCOROUTINE$1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = doublePbkdf2HashAsBase64(this._this__u8e3s4__1, this.password_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.encryptedPass0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = _get_dataLayer__43yv12(this._this__u8e3s4__1).get_repositoryOrLocalDb_ys0nkj_k$().personAuth2Dao_ep6mu5_k$();
            var this_0 = new PersonAuth2();
            this_0.set_pauthUid_pp9js9_k$(this.personUid_1);
            this_0.set_pauthMechanism_kcxz95_k$(Companion_getInstance_1().get_AUTH_MECH_PBKDF2_DOUBLE_iqjeed_k$());
            this_0.set_pauthAuth_nuofak_k$(this.encryptedPass0__1);
            suspendResult = tmp_0.insertAsync_46pi3g_k$(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function AuthManager(learningSpace, di) {
    this.learningSpace_1 = learningSpace;
    this.di_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.learningSpace_1;
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.invoke_4wgfc3_k$(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.dataLayer$delegate_1 = Instance(this_0, tmp$ret$3, null).provideDelegate_o2qlc1_k$(this, dataLayer$factory());
  }
  protoOf(AuthManager).get_learningSpace_sz4skh_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(AuthManager).get_di_knto1e_k$ = function () {
    return this.di_1;
  };
  protoOf(AuthManager).authenticate_m5ck6z_k$ = function (username, password, $completion) {
    var tmp = new $authenticateCOROUTINE$0(this, username, password, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AuthManager).setAuth_shl5y9_k$ = function (personUid, password, $completion) {
    var tmp = new $setAuthCOROUTINE$1(this, personUid, password, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function dataLayer$factory() {
    return getPropertyCallableRef('dataLayer', 1, KProperty1, function (receiver) {
      return _get_dataLayer__43yv12(receiver);
    }, null);
  }
  function dataLayer$factory_0() {
    return getPropertyCallableRef('dataLayer', 1, KProperty1, function (receiver) {
      return _get_dataLayer__43yv12(receiver);
    }, null);
  }
  function Companion() {
    Companion_instance = this;
    this.REASON_NEEDS_CONSENT_1 = 1;
  }
  protoOf(Companion).get_REASON_NEEDS_CONSENT_uun70a_k$ = function () {
    return this.REASON_NEEDS_CONSENT_1;
  };
  protoOf(Companion).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_9();
  };
  var Companion_instance;
  function Companion_getInstance_60() {
    if (Companion_instance == null)
      new Companion();
    return Companion_instance;
  }
  function $serializer() {
    $serializer_instance = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.AuthResult', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('authenticatedPerson', true);
    tmp0_serialDesc.addElement_5pzumi_k$('success', true);
    tmp0_serialDesc.addElement_5pzumi_k$('reason', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance()), BooleanSerializer_getInstance(), IntSerializer_getInstance()];
  };
  protoOf($serializer).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = false;
    var tmp6_local2 = 0;
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeIntElement_941u6a_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeIntElement_941u6a_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return AuthResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer).serialize_fwtjlc_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.authenticatedPerson_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, $serializer_getInstance(), value.authenticatedPerson_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.success_1 === false)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 1, value.success_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.reason_1 === 0)) {
      tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 2, value.reason_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_fwtjlc_k$(encoder, value instanceof AuthResult ? value : THROW_CCE());
  };
  var $serializer_instance;
  function $serializer_getInstance_9() {
    if ($serializer_instance == null)
      new $serializer();
    return $serializer_instance;
  }
  function AuthResult_init_$Init$(seen1, authenticatedPerson, success, reason, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_9().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.authenticatedPerson_1 = null;
    else
      $this.authenticatedPerson_1 = authenticatedPerson;
    if (0 === (seen1 & 2))
      $this.success_1 = false;
    else
      $this.success_1 = success;
    if (0 === (seen1 & 4))
      $this.reason_1 = 0;
    else
      $this.reason_1 = reason;
    return $this;
  }
  function AuthResult_init_$Create$(seen1, authenticatedPerson, success, reason, serializationConstructorMarker) {
    return AuthResult_init_$Init$(seen1, authenticatedPerson, success, reason, serializationConstructorMarker, objectCreate(protoOf(AuthResult)));
  }
  function AuthResult(authenticatedPerson, success, reason) {
    Companion_getInstance_60();
    authenticatedPerson = authenticatedPerson === VOID ? null : authenticatedPerson;
    success = success === VOID ? false : success;
    reason = reason === VOID ? 0 : reason;
    this.authenticatedPerson_1 = authenticatedPerson;
    this.success_1 = success;
    this.reason_1 = reason;
  }
  protoOf(AuthResult).get_authenticatedPerson_dlo9ad_k$ = function () {
    return this.authenticatedPerson_1;
  };
  protoOf(AuthResult).get_success_tm3zdy_k$ = function () {
    return this.success_1;
  };
  protoOf(AuthResult).get_reason_iy4m6l_k$ = function () {
    return this.reason_1;
  };
  protoOf(AuthResult).component1_7eebsc_k$ = function () {
    return this.authenticatedPerson_1;
  };
  protoOf(AuthResult).component2_7eebsb_k$ = function () {
    return this.success_1;
  };
  protoOf(AuthResult).component3_7eebsa_k$ = function () {
    return this.reason_1;
  };
  protoOf(AuthResult).copy_cbmum7_k$ = function (authenticatedPerson, success, reason) {
    return new AuthResult(authenticatedPerson, success, reason);
  };
  protoOf(AuthResult).copy$default_6fdkxh_k$ = function (authenticatedPerson, success, reason, $super) {
    authenticatedPerson = authenticatedPerson === VOID ? this.authenticatedPerson_1 : authenticatedPerson;
    success = success === VOID ? this.success_1 : success;
    reason = reason === VOID ? this.reason_1 : reason;
    return $super === VOID ? this.copy_cbmum7_k$(authenticatedPerson, success, reason) : $super.copy_cbmum7_k$.call(this, authenticatedPerson, success, reason);
  };
  protoOf(AuthResult).toString = function () {
    return 'AuthResult(authenticatedPerson=' + this.authenticatedPerson_1 + ', success=' + this.success_1 + ', reason=' + this.reason_1 + ')';
  };
  protoOf(AuthResult).hashCode = function () {
    var result = this.authenticatedPerson_1 == null ? 0 : this.authenticatedPerson_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.success_1) | 0;
    result = imul(result, 31) + this.reason_1 | 0;
    return result;
  };
  protoOf(AuthResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthResult))
      return false;
    var tmp0_other_with_cast = other instanceof AuthResult ? other : THROW_CCE();
    if (!equals(this.authenticatedPerson_1, tmp0_other_with_cast.authenticatedPerson_1))
      return false;
    if (!(this.success_1 === tmp0_other_with_cast.success_1))
      return false;
    if (!(this.reason_1 === tmp0_other_with_cast.reason_1))
      return false;
    return true;
  };
  function ConsentNotGrantedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, ConsentNotGrantedException);
  }
  function Companion_0() {
    Companion_instance_0 = this;
  }
  protoOf(Companion_0).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_10();
  };
  var Companion_instance_0;
  function Companion_getInstance_61() {
    if (Companion_instance_0 == null)
      new Companion_0();
    return Companion_instance_0;
  }
  function $serializer_0() {
    $serializer_instance_0 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.LearningSpace', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('url', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_0).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_0).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_0).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return LearningSpace_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_0).serialize_1h19ef_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.url_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_0).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_1h19ef_k$(encoder, value instanceof LearningSpace ? value : THROW_CCE());
  };
  var $serializer_instance_0;
  function $serializer_getInstance_10() {
    if ($serializer_instance_0 == null)
      new $serializer_0();
    return $serializer_instance_0;
  }
  function LearningSpace_init_$Init$(seen1, url, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_10().descriptor_1);
    }
    $this.url_1 = url;
    var tmp = $this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.isLocal$delegate_1 = lazy(tmp_0, LearningSpace$_init_$lambda_beny7x($this));
    return $this;
  }
  function LearningSpace_init_$Create$(seen1, url, serializationConstructorMarker) {
    return LearningSpace_init_$Init$(seen1, url, serializationConstructorMarker, objectCreate(protoOf(LearningSpace)));
  }
  function LearningSpace$isLocal$delegate$lambda(this$0) {
    return function () {
      return endsWith(Url(this$0.url_1).get_host_wonf8x_k$(), '.local');
    };
  }
  function LearningSpace$_init_$lambda_beny7x(this$0) {
    return function () {
      return endsWith(Url(this$0.url_1).get_host_wonf8x_k$(), '.local');
    };
  }
  function LearningSpace(url) {
    Companion_getInstance_61();
    this.url_1 = url;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.isLocal$delegate_1 = lazy(tmp_0, LearningSpace$isLocal$delegate$lambda(this));
  }
  protoOf(LearningSpace).get_url_18iuii_k$ = function () {
    return this.url_1;
  };
  protoOf(LearningSpace).get_isLocal_zeqfso_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.isLocal$delegate_1;
    isLocal$factory();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(LearningSpace).component1_7eebsc_k$ = function () {
    return this.url_1;
  };
  protoOf(LearningSpace).copy_a35qlh_k$ = function (url) {
    return new LearningSpace(url);
  };
  protoOf(LearningSpace).copy$default_4644gs_k$ = function (url, $super) {
    url = url === VOID ? this.url_1 : url;
    return $super === VOID ? this.copy_a35qlh_k$(url) : $super.copy_a35qlh_k$.call(this, url);
  };
  protoOf(LearningSpace).toString = function () {
    return 'LearningSpace(url=' + this.url_1 + ')';
  };
  protoOf(LearningSpace).hashCode = function () {
    return getStringHashCode(this.url_1);
  };
  protoOf(LearningSpace).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpace))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpace ? other : THROW_CCE();
    if (!(this.url_1 === tmp0_other_with_cast.url_1))
      return false;
    return true;
  };
  function isLocal$factory() {
    return getPropertyCallableRef('isLocal', 1, KProperty1, function (receiver) {
      return receiver.get_isLocal_zeqfso_k$();
    }, null);
  }
  function Companion_1() {
    Companion_instance_1 = this;
  }
  protoOf(Companion_1).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_11();
  };
  var Companion_instance_1;
  function Companion_getInstance_62() {
    if (Companion_instance_1 == null)
      new Companion_1();
    return Companion_instance_1;
  }
  function $serializer_1() {
    $serializer_instance_1 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.RegisterRequest', this, 5);
    tmp0_serialDesc.addElement_5pzumi_k$('person', false);
    tmp0_serialDesc.addElement_5pzumi_k$('newPassword', false);
    tmp0_serialDesc.addElement_5pzumi_k$('parent', false);
    tmp0_serialDesc.addElement_5pzumi_k$('learningSpaceUrl', false);
    tmp0_serialDesc.addElement_5pzumi_k$('langCode', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_1).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_1).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance(), StringSerializer_getInstance(), get_nullable($serializer_getInstance_0()), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_1).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp9_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.endStructure_1xqz0n_k$(tmp0_desc);
    return RegisterRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_1).serialize_p2u2m3_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, $serializer_getInstance(), value.person_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.newPassword_1);
    tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, $serializer_getInstance_0(), value.parent_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 3, value.learningSpaceUrl_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.langCode_1 === 'en')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 4, value.langCode_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_1).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_p2u2m3_k$(encoder, value instanceof RegisterRequest ? value : THROW_CCE());
  };
  var $serializer_instance_1;
  function $serializer_getInstance_11() {
    if ($serializer_instance_1 == null)
      new $serializer_1();
    return $serializer_instance_1;
  }
  function RegisterRequest_init_$Init$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_11().descriptor_1);
    }
    $this.person_1 = person;
    $this.newPassword_1 = newPassword;
    $this.parent_1 = parent;
    $this.learningSpaceUrl_1 = learningSpaceUrl;
    if (0 === (seen1 & 16))
      $this.langCode_1 = 'en';
    else
      $this.langCode_1 = langCode;
    return $this;
  }
  function RegisterRequest_init_$Create$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker) {
    return RegisterRequest_init_$Init$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker, objectCreate(protoOf(RegisterRequest)));
  }
  function RegisterRequest(person, newPassword, parent, learningSpaceUrl, langCode) {
    Companion_getInstance_62();
    langCode = langCode === VOID ? 'en' : langCode;
    this.person_1 = person;
    this.newPassword_1 = newPassword;
    this.parent_1 = parent;
    this.learningSpaceUrl_1 = learningSpaceUrl;
    this.langCode_1 = langCode;
  }
  protoOf(RegisterRequest).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(RegisterRequest).get_newPassword_g8455a_k$ = function () {
    return this.newPassword_1;
  };
  protoOf(RegisterRequest).get_parent_hy4reb_k$ = function () {
    return this.parent_1;
  };
  protoOf(RegisterRequest).get_learningSpaceUrl_gy3afk_k$ = function () {
    return this.learningSpaceUrl_1;
  };
  protoOf(RegisterRequest).get_langCode_ciluis_k$ = function () {
    return this.langCode_1;
  };
  protoOf(RegisterRequest).component1_7eebsc_k$ = function () {
    return this.person_1;
  };
  protoOf(RegisterRequest).component2_7eebsb_k$ = function () {
    return this.newPassword_1;
  };
  protoOf(RegisterRequest).component3_7eebsa_k$ = function () {
    return this.parent_1;
  };
  protoOf(RegisterRequest).component4_7eebs9_k$ = function () {
    return this.learningSpaceUrl_1;
  };
  protoOf(RegisterRequest).component5_7eebs8_k$ = function () {
    return this.langCode_1;
  };
  protoOf(RegisterRequest).copy_ov52ae_k$ = function (person, newPassword, parent, learningSpaceUrl, langCode) {
    return new RegisterRequest(person, newPassword, parent, learningSpaceUrl, langCode);
  };
  protoOf(RegisterRequest).copy$default_hlz3pb_k$ = function (person, newPassword, parent, learningSpaceUrl, langCode, $super) {
    person = person === VOID ? this.person_1 : person;
    newPassword = newPassword === VOID ? this.newPassword_1 : newPassword;
    parent = parent === VOID ? this.parent_1 : parent;
    learningSpaceUrl = learningSpaceUrl === VOID ? this.learningSpaceUrl_1 : learningSpaceUrl;
    langCode = langCode === VOID ? this.langCode_1 : langCode;
    return $super === VOID ? this.copy_ov52ae_k$(person, newPassword, parent, learningSpaceUrl, langCode) : $super.copy_ov52ae_k$.call(this, person, newPassword, parent, learningSpaceUrl, langCode);
  };
  protoOf(RegisterRequest).toString = function () {
    return 'RegisterRequest(person=' + this.person_1 + ', newPassword=' + this.newPassword_1 + ', parent=' + this.parent_1 + ', learningSpaceUrl=' + this.learningSpaceUrl_1 + ', langCode=' + this.langCode_1 + ')';
  };
  protoOf(RegisterRequest).hashCode = function () {
    var result = this.person_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.newPassword_1) | 0;
    result = imul(result, 31) + (this.parent_1 == null ? 0 : this.parent_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.learningSpaceUrl_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.langCode_1) | 0;
    return result;
  };
  protoOf(RegisterRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterRequest))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterRequest ? other : THROW_CCE();
    if (!this.person_1.equals(tmp0_other_with_cast.person_1))
      return false;
    if (!(this.newPassword_1 === tmp0_other_with_cast.newPassword_1))
      return false;
    if (!equals(this.parent_1, tmp0_other_with_cast.parent_1))
      return false;
    if (!(this.learningSpaceUrl_1 === tmp0_other_with_cast.learningSpaceUrl_1))
      return false;
    if (!(this.langCode_1 === tmp0_other_with_cast.langCode_1))
      return false;
    return true;
  };
  function UnauthorizedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, UnauthorizedException);
  }
  function Companion_2() {
    Companion_instance_2 = this;
  }
  protoOf(Companion_2).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_12();
  };
  var Companion_instance_2;
  function Companion_getInstance_63() {
    if (Companion_instance_2 == null)
      new Companion_2();
    return Companion_instance_2;
  }
  function $serializer_2() {
    $serializer_instance_2 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.UserSessionWithPersonAndLearningSpace', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('userSession', false);
    tmp0_serialDesc.addElement_5pzumi_k$('person', false);
    tmp0_serialDesc.addElement_5pzumi_k$('learningSpace', false);
    tmp0_serialDesc.addElement_5pzumi_k$('personPicture', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_2).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_2).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_1(), $serializer_getInstance(), $serializer_getInstance_10(), get_nullable($serializer_getInstance_2())];
  };
  protoOf($serializer_2).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_10(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_10(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return UserSessionWithPersonAndLearningSpace_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_2).serialize_x76fqe_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, $serializer_getInstance_1(), value.userSession_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, $serializer_getInstance(), value.person_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, $serializer_getInstance_10(), value.learningSpace_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.personPicture_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, $serializer_getInstance_2(), value.personPicture_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_2).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_x76fqe_k$(encoder, value instanceof UserSessionWithPersonAndLearningSpace ? value : THROW_CCE());
  };
  var $serializer_instance_2;
  function $serializer_getInstance_12() {
    if ($serializer_instance_2 == null)
      new $serializer_2();
    return $serializer_instance_2;
  }
  function UserSessionWithPersonAndLearningSpace_init_$Init$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_12().descriptor_1);
    }
    $this.userSession_1 = userSession;
    $this.person_1 = person;
    $this.learningSpace_1 = learningSpace;
    if (0 === (seen1 & 8))
      $this.personPicture_1 = null;
    else
      $this.personPicture_1 = personPicture;
    return $this;
  }
  function UserSessionWithPersonAndLearningSpace_init_$Create$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker) {
    return UserSessionWithPersonAndLearningSpace_init_$Init$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker, objectCreate(protoOf(UserSessionWithPersonAndLearningSpace)));
  }
  function UserSessionWithPersonAndLearningSpace(userSession, person, learningSpace, personPicture) {
    Companion_getInstance_63();
    personPicture = personPicture === VOID ? null : personPicture;
    this.userSession_1 = userSession;
    this.person_1 = person;
    this.learningSpace_1 = learningSpace;
    this.personPicture_1 = personPicture;
  }
  protoOf(UserSessionWithPersonAndLearningSpace).get_userSession_tatogu_k$ = function () {
    return this.userSession_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).get_learningSpace_sz4skh_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).get_personPicture_te1agw_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).get_displayName_sscnb0_k$ = function () {
    var displayUrl = removeSuffix(removePrefix(removePrefix(this.learningSpace_1.get_url_18iuii_k$(), 'http://'), 'https://'), '/');
    return '' + this.person_1.get_username_ytz5i7_k$() + '@' + displayUrl;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).toUmAccount_2qplmu_k$ = function () {
    return toUmAccount(this.person_1, this.learningSpace_1.get_url_18iuii_k$());
  };
  protoOf(UserSessionWithPersonAndLearningSpace).toXapiAgent_u8wxq0_k$ = function () {
    var tmp = this.learningSpace_1.get_url_18iuii_k$();
    var tmp0_elvis_lhs = this.person_1.get_username_ytz5i7_k$();
    return new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(tmp, tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs));
  };
  protoOf(UserSessionWithPersonAndLearningSpace).component1_7eebsc_k$ = function () {
    return this.userSession_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).component2_7eebsb_k$ = function () {
    return this.person_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).component3_7eebsa_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).component4_7eebs9_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).copy_9pkm9u_k$ = function (userSession, person, learningSpace, personPicture) {
    return new UserSessionWithPersonAndLearningSpace(userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).copy$default_5s04gr_k$ = function (userSession, person, learningSpace, personPicture, $super) {
    userSession = userSession === VOID ? this.userSession_1 : userSession;
    person = person === VOID ? this.person_1 : person;
    learningSpace = learningSpace === VOID ? this.learningSpace_1 : learningSpace;
    personPicture = personPicture === VOID ? this.personPicture_1 : personPicture;
    return $super === VOID ? this.copy_9pkm9u_k$(userSession, person, learningSpace, personPicture) : $super.copy_9pkm9u_k$.call(this, userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).toString = function () {
    return 'UserSessionWithPersonAndLearningSpace(userSession=' + this.userSession_1 + ', person=' + this.person_1 + ', learningSpace=' + this.learningSpace_1 + ', personPicture=' + this.personPicture_1 + ')';
  };
  protoOf(UserSessionWithPersonAndLearningSpace).hashCode = function () {
    var result = hashCode(this.userSession_1);
    result = imul(result, 31) + this.person_1.hashCode() | 0;
    result = imul(result, 31) + this.learningSpace_1.hashCode() | 0;
    result = imul(result, 31) + (this.personPicture_1 == null ? 0 : this.personPicture_1.hashCode()) | 0;
    return result;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UserSessionWithPersonAndLearningSpace))
      return false;
    var tmp0_other_with_cast = other instanceof UserSessionWithPersonAndLearningSpace ? other : THROW_CCE();
    if (!equals(this.userSession_1, tmp0_other_with_cast.userSession_1))
      return false;
    if (!this.person_1.equals(tmp0_other_with_cast.person_1))
      return false;
    if (!this.learningSpace_1.equals(tmp0_other_with_cast.learningSpace_1))
      return false;
    if (!equals(this.personPicture_1, tmp0_other_with_cast.personPicture_1))
      return false;
    return true;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.get_displayName_sscnb0_k$();
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.get_displayName_sscnb0_k$();
    return compareValues(tmp, tmp$ret$1);
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.this$0__1 = this$0;
    this.$learningSpace_1 = $learningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).invoke_godaxx_k$ = function (learningSpaceSessions, $completion) {
    var tmp = this.create_zhogn_k$(learningSpaceSessions, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_godaxx_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._activeUserSessions_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = prevValue.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                if (!element.get_learningSpace_sz4skh_k$().equals(this.$learningSpace_1)) {
                  destination.add_utx5q5_k$(element);
                }
              }
              var this_1 = this.learningSpaceSessions_1;
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
              var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
              while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                var item = tmp0_iterator_0.next_20eer_k$();
                var tmp0_elvis_lhs = item.get_userSession_tatogu_k$();
                var tmp_0 = tmp0_elvis_lhs == null ? new UserSession() : tmp0_elvis_lhs;
                var tmp1_elvis_lhs = item.get_person_i0c866_k$();
                destination_0.add_utx5q5_k$(new UserSessionWithPersonAndLearningSpace(tmp_0, tmp1_elvis_lhs == null ? new Person() : tmp1_elvis_lhs, this.$learningSpace_1, item.get_personPicture_te1agw_k$()));
              }
              var tmp_1 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda;
              var nextValue = plus(destination, sortedWith(destination_0, new sam$kotlin_Comparator$0(tmp_1)));
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).create_zhogn_k$ = function (learningSpaceSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this.this$0__1, this.$learningSpace_1, completion);
    i.learningSpaceSessions_1 = learningSpaceSessions;
    return i;
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_zhogn_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this$0, $learningSpace, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation);
    var l = function (learningSpaceSessions, $completion) {
      return i.invoke_godaxx_k$(learningSpaceSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.this$0__1 = this$0;
    this.$learningSpace_1 = $learningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var this_0 = this.this$0__1.di_1;
            var context = this.$learningSpace_1;
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var this_1 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger));
            var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
            var tmp_3 = this_1.get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.endpointDb0__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), tag);
            this.set_state_rjd8d0_k$(1);
            var tmp_5 = this.endpointDb0__1.userSessionDao_v2hqyh_k$().findAllLocalSessionsLive_oahd04_k$();
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, this.$learningSpace_1, null);
            suspendResult = tmp_5.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this.this$0__1, this.$learningSpace_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_0(this$0, $learningSpace, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda).invoke_gsljal_k$ = function (learningSpacesWithSessions, $completion) {
    var tmp = this.create_g5y0x5_k$(learningSpacesWithSessions, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_gsljal_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_iterator = this.learningSpacesWithSessions_1.iterator_jk1svi_k$();
          while (tmp0_iterator.hasNext_bitz1p_k$()) {
            var element = tmp0_iterator.next_20eer_k$();
            launch(this.this$0__1.scope_1, VOID, VOID, UstadAccountManager$slambda$slambda$slambda$slambda_0(this.this$0__1, element, null));
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).create_g5y0x5_k$ = function (learningSpacesWithSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this.this$0__1, completion);
    i.learningSpacesWithSessions_1 = learningSpacesWithSessions;
    return i;
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_g5y0x5_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (learningSpacesWithSessions, $completion) {
      return i.invoke_gsljal_k$(learningSpacesWithSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = collectLatest(this.this$0__1._learningSpacesWithActiveSessions_1, UstadAccountManager$slambda$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new UstadAccountManager$slambda$slambda(this.this$0__1, completion);
  };
  function UstadAccountManager$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$lambda($personAndPictureFromDb) {
    return function ($this$shallowCopy) {
      var tmp0_safe_receiver = $personAndPictureFromDb;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
      $this$shallowCopy.set_firstNames_audc9u_k$(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_firstNames_n3o3y7_k$());
      var tmp2_safe_receiver = $personAndPictureFromDb;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_person_i0c866_k$();
      $this$shallowCopy.set_lastName_6ukpbb_k$(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_lastName_f360wa_k$());
      return Unit_getInstance();
    };
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation) {
    this.$session_1 = $session;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).invoke_mniuxe_k$ = function (personAndPictureFromDb, $completion) {
    var tmp = this.create_g1zhxq_k$(personAndPictureFromDb, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_mniuxe_k$((p1 == null ? true : p1 instanceof PersonAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_safe_receiver = this.personAndPictureFromDb_1;
          var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
          var nameChanged = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fullName_m0cs6y_k$()) === this.$session_1.get_person_i0c866_k$().fullName_m0cs6y_k$());
          var tmp2_safe_receiver = this.personAndPictureFromDb_1;
          var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_picture_8af27f_k$();
          var tmp_0 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_personPictureThumbnailUri_sx3gg_k$();
          var tmp4_safe_receiver = this.$session_1.get_personPicture_te1agw_k$();
          var pictureUriChanged = !(tmp_0 == (tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_personPictureThumbnailUri_sx3gg_k$()));
          if (nameChanged ? true : pictureUriChanged) {
            var tmp_1;
            if (nameChanged) {
              var tmp_2 = this.$session_1.get_person_i0c866_k$();
              tmp_1 = shallowCopy(tmp_2, UstadAccountManager$slambda$slambda$slambda$slambda$lambda(this.personAndPictureFromDb_1));
            } else {
              tmp_1 = this.$session_1.get_person_i0c866_k$();
            }
            var tmp_3 = tmp_1;
            var tmp_4;
            if (pictureUriChanged) {
              var tmp5_safe_receiver = this.personAndPictureFromDb_1;
              tmp_4 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.get_picture_8af27f_k$();
            } else {
              tmp_4 = this.$session_1.get_personPicture_te1agw_k$();
            }
            this.this$0__1.set_currentUserSession_3cktus_k$(this.$session_1.copy$default_5s04gr_k$(VOID, tmp_3, VOID, tmp_4));
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).create_g1zhxq_k$ = function (personAndPictureFromDb, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1(this.$session_1, this.this$0__1, completion);
    i.personAndPictureFromDb_1 = personAndPictureFromDb;
    return i;
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_g1zhxq_k$((value == null ? true : value instanceof PersonAndPicture) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_2($session, this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation);
    var l = function (personAndPictureFromDb, $completion) {
      return i.invoke_mniuxe_k$(personAndPictureFromDb, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).invoke_708t0e_k$ = function (session, $completion) {
    var tmp = this.create_wsu6fq_k$(session, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_708t0e_k$(p1 instanceof UserSessionWithPersonAndLearningSpace ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var this_0 = this.this$0__1.di_1;
            var context = this.session_1.get_learningSpace_sz4skh_k$();
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var this_1 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger));
            var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
            var tmp_3 = this_1.get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.learningSpaceDb0__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), tag);
            this.set_state_rjd8d0_k$(1);
            var tmp_5 = this.learningSpaceDb0__1.personDao_e3y77h_k$().findByUidWithPictureAsFlow_n0b42e_k$(this.session_1.get_userSession_tatogu_k$().get_usPersonUid_p037ak_k$());
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda_2(this.session_1, this.this$0__1, null);
            suspendResult = tmp_5.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).create_wsu6fq_k$ = function (session, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.session_1 = session;
    return i;
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_wsu6fq_k$(value instanceof UserSessionWithPersonAndLearningSpace ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (session, $completion) {
      return i.invoke_708t0e_k$(session, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda_1).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = collectLatest(this.this$0__1._currentUserSession_1, UstadAccountManager$slambda$slambda$slambda_2(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new UstadAccountManager$slambda$slambda_1(this.this$0__1, completion);
  };
  function UstadAccountManager$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadAccountManager$registerWithPasskey$slambda$slambda($repo, $person, resultContinuation) {
    this.$repo_1 = $repo;
    this.$person_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$repo_1.personDao_e3y77h_k$().findByUidAsync_uxf6ac_k$(this.$person_1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT0__1 = suspendResult;
            if (this.ARGUMENT0__1 == null) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$repo_1.personDao_e3y77h_k$().insertAsync(this.$person_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda$slambda(this.$repo_1, this.$person_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$registerWithPasskey$slambda$slambda_0($repo, $person, resultContinuation) {
    var i = new UstadAccountManager$registerWithPasskey$slambda$slambda($repo, $person, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda).invoke_j2l7qc_k$ = function (response, $completion) {
    var tmp = this.create_bkvwgl_k$(response, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$register$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_j2l7qc_k$(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (this.response_1.get_status_jnf6d7_k$().get_value_j01efc_k$() === 200) {
              var tmp_0 = this;
              tmp_0.this1__1 = _get_json__d8whur(this.this$0__1);
              this.set_state_rjd8d0_k$(1);
              suspendResult = bodyAsText(this.response_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.WHEN_RESULT0__1 = new Pair(null, this.response_1.get_status_jnf6d7_k$().get_value_j01efc_k$());
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            var string = suspendResult;
            var this_0 = this.this1__1.get_serializersModule_piitvg_k$();
            var this_1 = serializer(this_0, createKType(getKClass(Person), arrayOf([]), false));
            var ARGUMENT = this.this1__1.decodeFromString_jwu9sq_k$(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
            this.WHEN_RESULT0__1 = new Pair(ARGUMENT, 200);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT0__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).create_bkvwgl_k$ = function (response, completion) {
    var i = new UstadAccountManager$register$slambda$slambda(this.this$0__1, completion);
    i.response_1 = response;
    return i;
  };
  protoOf(UstadAccountManager$register$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_bkvwgl_k$(value instanceof HttpResponse ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$register$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda(this$0, resultContinuation);
    var l = function (response, $completion) {
      return i.invoke_j2l7qc_k$(response, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation) {
    this.$db_1 = $db;
    this.$registeredPerson_1 = $registeredPerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda_1).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$db_1.personDao_e3y77h_k$().findByUidAsync_uxf6ac_k$(this.$registeredPerson_1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT0__1 = suspendResult;
            if (this.ARGUMENT0__1 == null) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$db_1.personDao_e3y77h_k$().insertAsync(this.$registeredPerson_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).create_9q7izm_k$ = function (it, completion) {
    var i = new UstadAccountManager$register$slambda$slambda_1(this.$db_1, this.$registeredPerson_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$register$slambda$slambda_2($db, $registeredPerson, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$loginWithPasskey$slambda$lambda($loginResponse) {
    return function () {
      return 'passkeyres : ' + $loginResponse;
    };
  }
  function _get_settings__lbkut4($this) {
    return $this.settings_1;
  }
  function _get__currentUserSession__k1gb28($this) {
    return $this._currentUserSession_1;
  }
  function _get__learningSpacesWithActiveSessions__ra8qn2($this) {
    return $this._learningSpacesWithActiveSessions_1;
  }
  function _get__activeUserSessions__7bijfo($this) {
    return $this._activeUserSessions_1;
  }
  function _get_createNewLocalAccountUseCase__gbdxzu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.createNewLocalAccountUseCase$delegate_1;
    createNewLocalAccountUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function EndpointFilter() {
  }
  function _get_httpClient__2ty1zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.httpClient$delegate_1;
    httpClient$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_json__d8whur($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.json$delegate_1;
    json$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_apiUrlConfig__mldllg($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_closed__iwkfs1($this) {
    return $this.closed_1;
  }
  function _get_scope__bi2zur($this) {
    return $this.scope_1;
  }
  function makeNewTempGuestSession($this, learningSpaceUrl, currentDb) {
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.apply' call
    var this_0 = new UserSession();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    this_0.set_usUid_uz0ydl_k$(get_doorPrimaryKeyManager(currentDb).nextId_8yjjmy_k$(Companion_getInstance_4().get_TABLE_ID_xo2mej_k$()));
    this_0.set_usClientNodeId_ydzvad_k$(get_doorWrapperNodeId(currentDb));
    this_0.set_usStartTime_u7c7u2_k$(systemTimeInMillis());
    this_0.set_usSessionType_diqz59_k$(Companion_getInstance_4().get_TYPE_TEMP_LOCAL_1rarok_k$() | Companion_getInstance_4().get_TYPE_GUEST_f1ls78_k$());
    this_0.set_usStatus_1hwltn_k$(Companion_getInstance_4().get_STATUS_ACTIVE_f4k4s6_k$());
    var this_1 = new UserSessionWithPersonAndLearningSpace(this_0, Companion_getInstance_64().GUEST_PERSON_1, new LearningSpace(learningSpaceUrl));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    launch($this.scope_1, VOID, VOID, UstadAccountManager$makeNewTempGuestSession$slambda_0(currentDb, this_1, null));
    return this_1;
  }
  function assertNotClosed($this) {
    if ($this.closed_1.get_kotlinx$atomicfu$value_vi2am5_k$())
      throw IllegalStateException_init_$Create$('UstadAccountManager is closed');
  }
  function addActiveLearningSpace($this, learningSpace, commit, $completion) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this._learningSpacesWithActiveSessions_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.addActiveLearningSpace.<anonymous>' call
        var nextValue = plus(prevValue, listOf_0(learningSpace));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
    return Unit_getInstance();
  }
  function addActiveLearningSpace$default($this, learningSpace, commit, $completion, $super) {
    commit = commit === VOID ? true : commit;
    return addActiveLearningSpace($this, learningSpace, commit, $completion);
  }
  function removeActiveLearningSpace($this, learningSpace, commit) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this._learningSpacesWithActiveSessions_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveLearningSpace.<anonymous>' call
        // Inline function 'kotlin.collections.filter' call
        // Inline function 'kotlin.collections.filterTo' call
        var destination = ArrayList_init_$Create$();
        var tmp0_iterator = prevValue.iterator_jk1svi_k$();
        while (tmp0_iterator.hasNext_bitz1p_k$()) {
          var element = tmp0_iterator.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveLearningSpace.<anonymous>.<anonymous>' call
          if (!element.equals(learningSpace)) {
            destination.add_utx5q5_k$(element);
          }
        }
        var nextValue = destination;
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
  }
  function removeActiveLearningSpace$default($this, learningSpace, commit, $super) {
    commit = commit === VOID ? true : commit;
    return removeActiveLearningSpace($this, learningSpace, commit);
  }
  function commitActiveEndpointsToPref($this) {
    var tmp = Default_getInstance();
    var tmp_0 = ListSerializer(serializer_0(StringCompanionObject_getInstance()));
    // Inline function 'kotlin.collections.map' call
    var this_0 = toSet($this._learningSpacesWithActiveSessions_1.get_value_j01efc_k$());
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.commitActiveEndpointsToPref.<anonymous>' call
      var tmp$ret$0 = item.get_url_18iuii_k$();
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    var json = tmp.encodeToString_k0apqx_k$(tmp_0, toList(destination));
    // Inline function 'com.russhwolf.settings.set' call
    var this_1 = $this.settings_1;
    var key = 'accountmgr.endpointswithsessions';
    this_1.putString_q7x3bk_k$(key, json);
  }
  function getSiteFromDbOrLoadFromHttp($this, repo, $completion) {
    var tmp = new $getSiteFromDbOrLoadFromHttpCOROUTINE$7($this, repo, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function Companion_3() {
    Companion_instance_3 = this;
    var tmp = this;
    // Inline function 'kotlin.apply' call
    var this_0 = new Person();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.Companion.GUEST_PERSON.<anonymous>' call
    this_0.set_personUid_j3idds_k$(new Long(0, 0));
    this_0.set_firstNames_audc9u_k$('Guest');
    this_0.set_lastName_6ukpbb_k$('User');
    tmp.GUEST_PERSON_1 = this_0;
    this.ACCOUNTS_ACTIVE_SESSION_PREFKEY_1 = 'accountmgr.activesession';
    this.ACCOUNTS_ACTIVE_ENDPOINT_PREFKEY_1 = 'accountmgr.activeendpoint';
    this.ACCOUNTS_ENDPOINTS_WITH_ACTIVE_SESSION_1 = 'accountmgr.endpointswithsessions';
    this.MANIFEST_URL_FALLBACK_1 = 'http://localhost/';
    this.ACCOUNT_TYPE_1 = 'com.ustadmobile';
    this.ACTION_GET_AUTH_TOKEN_1 = 'com.ustadmobile.AUTH_GET_TOKEN';
  }
  protoOf(Companion_3).get_GUEST_PERSON_d7zldn_k$ = function () {
    return this.GUEST_PERSON_1;
  };
  protoOf(Companion_3).get_ACCOUNTS_ACTIVE_SESSION_PREFKEY_2v0shi_k$ = function () {
    return this.ACCOUNTS_ACTIVE_SESSION_PREFKEY_1;
  };
  protoOf(Companion_3).get_ACCOUNTS_ACTIVE_ENDPOINT_PREFKEY_qod2at_k$ = function () {
    return this.ACCOUNTS_ACTIVE_ENDPOINT_PREFKEY_1;
  };
  protoOf(Companion_3).get_ACCOUNTS_ENDPOINTS_WITH_ACTIVE_SESSION_dkp2xn_k$ = function () {
    return this.ACCOUNTS_ENDPOINTS_WITH_ACTIVE_SESSION_1;
  };
  protoOf(Companion_3).get_MANIFEST_URL_FALLBACK_g8iri1_k$ = function () {
    return this.MANIFEST_URL_FALLBACK_1;
  };
  protoOf(Companion_3).get_ACCOUNT_TYPE_9mhl6z_k$ = function () {
    return this.ACCOUNT_TYPE_1;
  };
  protoOf(Companion_3).get_ACTION_GET_AUTH_TOKEN_3lxh63_k$ = function () {
    return this.ACTION_GET_AUTH_TOKEN_1;
  };
  var Companion_instance_3;
  function Companion_getInstance_64() {
    if (Companion_instance_3 == null)
      new Companion_3();
    return Companion_instance_3;
  }
  function sam$kotlin_Comparator$0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0).compare_bczr_k$ = function (a, b) {
    return this.function_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
    return this.compare_bczr_k$(a, b);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0).filterEndpoint_9pizal_k$ = function (endpointUrl) {
    return this.function_1(endpointUrl);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0).filterEndpoint_9pizal_k$ = function (endpointUrl) {
    return this.function_1(endpointUrl);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1).filterEndpoint_9pizal_k$ = function (endpointUrl) {
    return this.function_1(endpointUrl);
  };
  function UstadAccountManager$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._activeUserSessions_1, UstadAccountManager$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(UstadAccountManager$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._currentUserSession_1, UstadAccountManager$slambda$slambda_2(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(UstadAccountManager$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation) {
    this.$currentDb_1 = $currentDb;
    this.$it_1 = $it;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$currentDb_1.userSessionDao_v2hqyh_k$().insertSession_qt18s4_k$(this.$it_1.get_userSession_tatogu_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda(this.$currentDb_1, this.$it_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$makeNewTempGuestSession$slambda_0($currentDb, $it, resultContinuation) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$activeSessionsList$lambda(it) {
    return true;
  }
  function UstadAccountManager$activeSessionCount$lambda(it) {
    return true;
  }
  function UstadAccountManager$registerWithPasskey$slambda($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation) {
    this.$learningSpaceUrl_1 = $learningSpaceUrl;
    this.this$0__1 = this$0;
    this.$passkeyResult_1 = $passkeyResult;
    this.$person_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$registerWithPasskey$slambda).invoke_d9fzmj_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.learningSpace0__1 = new LearningSpace(this.$learningSpaceUrl_1);
            var tmp_0 = this;
            var this_0 = this.this$0__1.di_1;
            var context = this.learningSpace0__1;
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(SavePersonPasskeyUseCase), arrayOf([]), false));
            tmp_0.savePassKeyUseCase1__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.savePassKeyUseCase1__1.invoke_xtawvv_k$(this.$passkeyResult_1, this.$person_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_5 = this;
            var this_1 = this.this$0__1.di_1;
            var context_0 = this.learningSpace0__1;
            var trigger_0 = this_1.get_diTrigger_fb5jcm_k$();
            var tmp_6 = Companion_getInstance_2();
            var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.invoke_4wgfc3_k$(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).get_directDI_rqg7bd_k$();
            var tmp_9 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_5.repo2__1 = tmp_8.Instance_vwdrk9_k$(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null).requireRepository$default_mgkaoa_k$();
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.addSession_vs2s5g_k$(this.$person_1, this.$learningSpaceUrl_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.session3__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            suspendResult = withDoorTransactionAsync(this.repo2__1, VOID, UstadAccountManager$registerWithPasskey$slambda$slambda_0(this.repo2__1, this.$person_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var this_2 = this.this$0__1.di_1;
            var context_1 = this.learningSpace0__1;
            var trigger_1 = this_2.get_diTrigger_fb5jcm_k$();
            var tmp_10 = Companion_getInstance_2();
            var tmp_11 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var this_3 = get_direct(On(this_2, tmp_10.invoke_4wgfc3_k$(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), context_1), trigger_1));
            var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
            var tmp_12 = this_3.get_directDI_rqg7bd_k$();
            var tmp_13 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_12.Instance_vwdrk9_k$(isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE(), tag);
            this.this$0__1.set_currentUserSession_3cktus_k$(this.session3__1);
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda(this.$learningSpaceUrl_1, this.this$0__1, this.$passkeyResult_1, this.$person_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$registerWithPasskey$slambda_0($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation) {
    var i = new UstadAccountManager$registerWithPasskey$slambda($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_d9fzmj_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    this.this$0__1 = this$0;
    this.$learningSpaceUrl_1 = $learningSpaceUrl;
    this.$accountRegisterOptions_1 = $accountRegisterOptions;
    this.$person_1 = $person;
    this.$password_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda).invoke_rlq9cl_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$register$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_rlq9cl_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            assertNotClosed(this.this$0__1);
            this.learningSpace0__1 = new LearningSpace(this.$learningSpaceUrl_1);
            this.parentVal1__1 = this.$accountRegisterOptions_1.get_parentJoin_o83rlv_k$();
            var tmp_0 = this;
            var this_0 = _get_httpClient__2ty1zc(this.this$0__1);
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.$learningSpaceUrl_1, '/') + '/auth/register');
            contentType(this_1, Application_getInstance().get_Json_wo4ci9_k$());
            setBodyJson(this_1, _get_json__d8whur(this.this$0__1), Companion_getInstance_62().serializer_9w0wvi_k$(), new RegisterRequest(this.$person_1, this.$password_1, this.parentVal1__1, this.$learningSpaceUrl_1));
            this_1.set_method_hoo95u_k$(Companion_getInstance_5().get_Post_wo83k9_k$());
            tmp_0.httpStmt2__1 = new HttpStatement(this_1, this_0);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.httpStmt2__1.execute_dr84pm_k$(UstadAccountManager$register$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_container3__1 = suspendResult;
            this.registeredPerson4__1 = this.tmp0_container3__1.component1_7eebsc_k$();
            this.status5__1 = this.tmp0_container3__1.component2_7eebsb_k$();
            if (this.status5__1 === 200 ? !(this.registeredPerson4__1 == null) : false) {
              var tmp_1 = this;
              var this_2 = this.this$0__1.di_1;
              var context = this.learningSpace0__1;
              var trigger = this_2.get_diTrigger_fb5jcm_k$();
              var tmp_2 = Companion_getInstance_2();
              var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_4 = get_direct(On(this_2, tmp_2.invoke_4wgfc3_k$(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
              var tmp_5 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
              tmp_1.repo7__1 = tmp_4.Instance_vwdrk9_k$(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null).requireRepository$default_mgkaoa_k$();
              this.set_state_rjd8d0_k$(2);
              suspendResult = getSiteFromDbOrLoadFromHttp(this.this$0__1, this.repo7__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.status5__1 === 409) {
                var tmp_6 = this;
                throw IllegalStateException_init_$Create$('Conflict: username already taken');
              } else {
                var tmp_7 = this;
                throw Exception_init_$Create$('register request: non-OK status code: ' + this.status5__1);
              }
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.this$0__1.addSession_vs2s5g_k$(this.registeredPerson4__1, this.$learningSpaceUrl_1, this.$password_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.session8__1 = suspendResult;
            var tmp_8 = this;
            var this_3 = this.this$0__1.di_1;
            var context_0 = this.learningSpace0__1;
            var trigger_0 = this_3.get_diTrigger_fb5jcm_k$();
            var tmp_9 = Companion_getInstance_2();
            var tmp_10 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var this_4 = get_direct(On(this_3, tmp_9.invoke_4wgfc3_k$(isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE(), context_0), trigger_0));
            var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
            var tmp_11 = this_4.get_directDI_rqg7bd_k$();
            var tmp_12 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_8.db9__1 = tmp_11.Instance_vwdrk9_k$(isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE(), tag);
            this.set_state_rjd8d0_k$(4);
            suspendResult = withDoorTransactionAsync(this.db9__1, VOID, UstadAccountManager$register$slambda$slambda_2(this.db9__1, this.registeredPerson4__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            if (this.$accountRegisterOptions_1.get_makeAccountActive_4ijl9g_k$()) {
              this.this$0__1.set_currentUserSession_3cktus_k$(this.session8__1);
            }

            this.WHEN_RESULT6__1 = this.registeredPerson4__1;
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            return this.WHEN_RESULT6__1;
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new UstadAccountManager$register$slambda(this.this$0__1, this.$learningSpaceUrl_1, this.$accountRegisterOptions_1, this.$person_1, this.$password_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(UstadAccountManager$register$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$register$slambda_0(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    var i = new UstadAccountManager$register$slambda(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_rlq9cl_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$addSession$slambda(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation) {
    this.this$0__1 = this$0;
    this.$learningSpace_1 = $learningSpace;
    this.$person_1 = $person;
    this.$password_1 = $password;
    this.$authManager_1 = $authManager;
    this.$dataLayer_1 = $dataLayer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$addSession$slambda).invoke_fferbl_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$addSession$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_fferbl_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$addSession$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            var tmp_0 = this;
            var this_0 = this.this$0__1.di_1;
            var context = this.$learningSpace_1;
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
            tmp_0.nodeId0__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).get_nodeId_h7ho7a_k$();
            var tmp_5 = this;
            tmp_5.this1__1 = new UserSession();
            var tmp_6 = this;
            tmp_6.$this$apply2__1 = this.this1__1;
            this.$this$apply2__1.set_usClientNodeId_ydzvad_k$(this.nodeId0__1);
            this.$this$apply2__1.set_usPersonUid_tlsji_k$(this.$person_1.get_personUid_mmhd76_k$());
            this.$this$apply2__1.set_usStartTime_u7c7u2_k$(systemTimeInMillis());
            this.$this$apply2__1.set_usSessionType_diqz59_k$(Companion_getInstance_4().get_TYPE_STANDARD_e68pvr_k$());
            this.$this$apply2__1.set_usStatus_1hwltn_k$(Companion_getInstance_4().get_STATUS_ACTIVE_f4k4s6_k$());
            this.tmp0_safe_receiver3__1 = this.$password_1;
            if (this.tmp0_safe_receiver3__1 == null) {
              this.WHEN_RESULT4__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.this5__1 = this.tmp0_safe_receiver3__1;
              var tmp_8 = this;
              tmp_8.it6__1 = this.this5__1;
              this.set_state_rjd8d0_k$(1);
              suspendResult = encryptPbkdf2(this.$authManager_1, this.it6__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ARGUMENT7__1 = suspendResult;
            this.WHEN_RESULT4__1 = toHexString(this.ARGUMENT7__1);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.ARGUMENT8__1 = this.WHEN_RESULT4__1;
            this.$this$apply2__1.set_usAuth_u14j5g_k$(this.ARGUMENT8__1);
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.$dataLayer_1.get_repositoryOrLocalDb_ys0nkj_k$().userSessionDao_v2hqyh_k$().insertSession_qt18s4_k$(this.$this$apply2__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.ARGUMENT9__1 = suspendResult;
            this.$this$apply2__1.set_usUid_uz0ydl_k$(this.ARGUMENT9__1);
            this.userSession10__1 = this.this1__1;
            this.set_state_rjd8d0_k$(4);
            suspendResult = this.$dataLayer_1.get_localDb_6v18ps_k$().personPictureDao_jnjrvt_k$().findByPersonUidAsync_3igx1d_k$(this.$person_1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var personPicture = suspendResult;
            return to(this.userSession10__1, personPicture);
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$addSession$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new UstadAccountManager$addSession$slambda(this.this$0__1, this.$learningSpace_1, this.$person_1, this.$password_1, this.$authManager_1, this.$dataLayer_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(UstadAccountManager$addSession$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$addSession$slambda_0(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation) {
    var i = new UstadAccountManager$addSession$slambda(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_fferbl_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$endSession$lambda($session) {
    return function (it) {
      return it === $session.get_learningSpace_sz4skh_k$().get_url_18iuii_k$();
    };
  }
  function UstadAccountManager$loginWithPasskey$slambda(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation) {
    this.this$0__1 = this$0;
    this.$currentServerUrl_1 = $currentServerUrl;
    this.$passkeyWebAuthNResponse_1 = $passkeyWebAuthNResponse;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$loginWithPasskey$slambda).invoke_9ypyxr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$loginWithPasskey$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9ypyxr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$loginWithPasskey$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            assertNotClosed(this.this$0__1);
            var tmp_0 = this;
            tmp_0.this0__1 = _get_httpClient__2ty1zc(this.this$0__1);
            var tmp_1 = this;
            tmp_1.this1__1 = this.this0__1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this.$currentServerUrl_1, '/') + '/api/passkey/verifypasskey');
            setBodyJson(this_0, _get_json__d8whur(this.this$0__1), Companion_getInstance_107().serializer_9w0wvi_k$(), this.$passkeyWebAuthNResponse_1);
            parameter(this_0, 'rpId', Url(_get_apiUrlConfig__mldllg(this.this$0__1).get_systemBaseUrl_qu6zd2_k$()).get_host_wonf8x_k$());
            tmp_2.builder2__1 = this_0;
            this.builder2__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Post_wo83k9_k$());
            var tmp_3 = this;
            tmp_3.this3__1 = this.this1__1;
            var tmp_4 = this;
            tmp_4.builder4__1 = this.builder2__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder4__1, this.this3__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT5__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsText(this.ARGUMENT5__1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.loginResponse6__1 = suspendResult;
            var tmp_5 = Napier_getInstance();
            tmp_5.d$default_iccotn_k$(VOID, VOID, UstadAccountManager$loginWithPasskey$slambda$lambda(this.loginResponse6__1));
            var tmp_6 = this;
            var this_1 = _get_json__d8whur(this.this$0__1);
            var string = this.loginResponse6__1;
            var this_2 = this_1.get_serializersModule_piitvg_k$();
            var this_3 = serializer(this_2, createKType(getKClass(PasskeyVerifyResult), arrayOf([]), false));
            tmp_6.passkeyVerifyResult7__1 = this_1.decodeFromString_jwu9sq_k$(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            if (!this.passkeyVerifyResult7__1.get_isVerified_4r5vob_k$()) {
              throw new UnauthorizedException('Account not found');
            }

            this.responseAccount8__1 = new UmAccount(this.passkeyVerifyResult7__1.get_personUid_mmhd76_k$());
            this.responseAccount8__1.set_endpointUrl_p5lj8z_k$(this.$currentServerUrl_1);
            var tmp_7 = this;
            var this_4 = this.this$0__1.di_1;
            var context = new LearningSpace(this.$currentServerUrl_1);
            var trigger = this_4.get_diTrigger_fb5jcm_k$();
            var tmp_8 = Companion_getInstance_2();
            var tmp_9 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_10 = get_direct(On(this_4, tmp_8.invoke_4wgfc3_k$(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_11 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_7.repo9__1 = tmp_10.Instance_vwdrk9_k$(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), null).requireRepository$default_mgkaoa_k$();
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.repo9__1.personDao_e3y77h_k$().findByUidWithPicture_cwvofg_k$(this.passkeyVerifyResult7__1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.tmp0_elvis_lhs10__1 = suspendResult;
            var tmp_12 = this;
            var tmp_13;
            if (this.tmp0_elvis_lhs10__1 == null) {
              throw IllegalStateException_init_$Create$('Cannot find person in repo/db');
            } else {
              tmp_13 = this.tmp0_elvis_lhs10__1;
            }

            tmp_12.personAndPicture11__1 = tmp_13;
            this.personInDb12__1 = ensureNotNull(this.personAndPicture11__1.get_person_i0c866_k$());
            this.responseAccount8__1.set_isPersonalAccount_8960vj_k$(this.personInDb12__1.get_isPersonalAccount_yq673a_k$());
            this.set_state_rjd8d0_k$(4);
            suspendResult = getSiteFromDbOrLoadFromHttp(this.this$0__1, this.repo9__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(5);
            suspendResult = this.this$0__1.addSession_vs2s5g_k$(this.personInDb12__1, this.$currentServerUrl_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            this.this$0__1.set_currentUserSession_3cktus_k$(newSession);
            return this.responseAccount8__1;
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$loginWithPasskey$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new UstadAccountManager$loginWithPasskey$slambda(this.this$0__1, this.$currentServerUrl_1, this.$passkeyWebAuthNResponse_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(UstadAccountManager$loginWithPasskey$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$loginWithPasskey$slambda_0(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation) {
    var i = new UstadAccountManager$loginWithPasskey$slambda(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_9ypyxr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    this.this$0__1 = this$0;
    this.$endpointUrl_1 = $endpointUrl;
    this.$username_1 = $username;
    this.$password_1 = $password;
    this.$maxDateOfBirth_1 = $maxDateOfBirth;
    this.$dontSetCurrentSession_1 = $dontSetCurrentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$login$slambda).invoke_9ypyxr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager$login$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9ypyxr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$login$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            assertNotClosed(this.this$0__1);
            var tmp_0 = this;
            var this_0 = get_direct(this.this$0__1.di_1);
            var context = new LearningSpace(this.$endpointUrl_1);
            var tmp_1 = this_0.get_directDI_rqg7bd_k$();
            var tmp_2 = Companion_getInstance_2();
            var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_4 = tmp_1.On_r75fd9_k$(tmp_2.invoke_4wgfc3_k$(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context)).get_directDI_rqg7bd_k$();
            var tmp_5 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.dataLayer0__1 = tmp_4.Instance_vwdrk9_k$(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null);
            var tmp_6 = this;
            var tmp_7 = this.dataLayer0__1.get_repository_c37cur_k$();
            var tmp0_safe_receiver = (!(tmp_7 == null) ? isInterface(tmp_7, DoorDatabaseRepository) : false) ? tmp_7 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_config_c0698r_k$();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_nodeId_h7ho7a_k$();
            var tmp_8;
            if (tmp2_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not open repo for endpoint ' + this.$endpointUrl_1);
            } else {
              tmp_8 = tmp2_elvis_lhs;
            }

            tmp_6.nodeId1__1 = tmp_8;
            var tmp_9 = this;
            tmp_9.this2__1 = _get_httpClient__2ty1zc(this.this$0__1);
            var tmp_10 = this;
            tmp_10.this3__1 = this.this2__1;
            var tmp_11 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.$endpointUrl_1, '/') + '/auth/login');
            parameter(this_1, 'username', this.$username_1);
            parameter(this_1, 'password', this.$password_1);
            parameter(this_1, 'maxDateOfBirth', this.$maxDateOfBirth_1);
            header(this_1, 'X-nid', this.nodeId1__1);
            set_expectSuccess(this_1, false);
            tmp_11.builder4__1 = this_1;
            this.builder4__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Post_wo83k9_k$());
            var tmp_12 = this;
            tmp_12.this5__1 = this.this3__1;
            var tmp_13 = this;
            tmp_13.builder6__1 = this.builder4__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder6__1, this.this5__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.loginResponse7__1 = suspendResult;
            if (this.loginResponse7__1.get_status_jnf6d7_k$().get_value_j01efc_k$() === 403) {
              throw new UnauthorizedException('Access denied');
            } else if (this.loginResponse7__1.get_status_jnf6d7_k$().equals(Companion_getInstance_6().get_FailedDependency_zsdkf_k$())) {
              throw new ConsentNotGrantedException('Parental consent required but not granted');
            } else if (this.loginResponse7__1.get_status_jnf6d7_k$().equals(Companion_getInstance_6().get_Conflict_upbf7f_k$())) {
              throw new AdultAccountRequiredException('Adult account required, credentials for child account');
            } else if (!(this.loginResponse7__1.get_status_jnf6d7_k$().get_value_j01efc_k$() === 200)) {
              throw IllegalStateException_init_$Create$('Server error - response ' + this.loginResponse7__1.get_status_jnf6d7_k$().get_value_j01efc_k$());
            }

            var tmp_14 = this;
            tmp_14.this8__1 = _get_json__d8whur(this.this$0__1);
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsText(this.loginResponse7__1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.string9__1 = suspendResult;
            var tmp_15 = this;
            var this_2 = this.this8__1.get_serializersModule_piitvg_k$();
            var this_3 = serializer(this_2, createKType(getKClass(UmAccount), arrayOf([]), false));
            tmp_15.responseAccount10__1 = this.this8__1.decodeFromString_jwu9sq_k$(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.string9__1);
            this.responseAccount10__1.set_endpointUrl_p5lj8z_k$(this.$endpointUrl_1);
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.dataLayer0__1.get_repositoryOrLocalDb_ys0nkj_k$().personDao_e3y77h_k$().findByUidWithPicture_cwvofg_k$(this.responseAccount10__1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.tmp3_elvis_lhs11__1 = suspendResult;
            var tmp_16 = this;
            var tmp_17;
            if (this.tmp3_elvis_lhs11__1 == null) {
              throw IllegalStateException_init_$Create$('Cannot find person in repo/db');
            } else {
              tmp_17 = this.tmp3_elvis_lhs11__1;
            }

            tmp_16.personAndPicture12__1 = tmp_17;
            this.personInDb13__1 = ensureNotNull(this.personAndPicture12__1.get_person_i0c866_k$());
            this.responseAccount10__1.set_isPersonalAccount_8960vj_k$(this.personInDb13__1.get_isPersonalAccount_yq673a_k$());
            this.set_state_rjd8d0_k$(4);
            suspendResult = getSiteFromDbOrLoadFromHttp(this.this$0__1, this.dataLayer0__1.get_repositoryOrLocalDb_ys0nkj_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(5);
            suspendResult = this.this$0__1.addSession_vs2s5g_k$(this.personInDb13__1, this.$endpointUrl_1, this.$password_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            if (!this.$dontSetCurrentSession_1) {
              this.this$0__1.set_currentUserSession_3cktus_k$(newSession);
            }

            return this.responseAccount10__1;
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$login$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new UstadAccountManager$login$slambda(this.this$0__1, this.$endpointUrl_1, this.$username_1, this.$password_1, this.$maxDateOfBirth_1, this.$dontSetCurrentSession_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(UstadAccountManager$login$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadAccountManager$login$slambda_0(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    var i = new UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_9ypyxr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $activeSessionsListCOROUTINE$2(_this__u8e3s4, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.endpointFilter_1 = endpointFilter;
  }
  protoOf($activeSessionsListCOROUTINE$2).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var this_0 = this._this__u8e3s4__1._learningSpacesWithActiveSessions_1.get_value_j01efc_k$();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              if (this.endpointFilter_1.filterEndpoint_9pizal_k$(element.get_url_18iuii_k$())) {
                destination.add_utx5q5_k$(element);
              }
            }

            tmp_0.this0__1 = destination;
            var tmp_1 = this;
            tmp_1.this1__1 = this.this0__1;
            var tmp_2 = this;
            tmp_2.destination2__1 = ArrayList_init_$Create$();
            this.tmp0_iterator3__1 = this.this1__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            if (!this.tmp0_iterator3__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

            this.element4__1 = this.tmp0_iterator3__1.next_20eer_k$();
            var tmp_3 = this;
            tmp_3.endpoint5__1 = this.element4__1;
            var tmp_4 = this;
            var this_1 = this._this__u8e3s4__1.di_1;
            var context = this.endpoint5__1;
            var trigger = this_1.get_diTrigger_fb5jcm_k$();
            var tmp_5 = Companion_getInstance_2();
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var this_2 = get_direct(On(this_1, tmp_5.invoke_4wgfc3_k$(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger));
            var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
            var tmp_7 = this_2.get_directDI_rqg7bd_k$();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.db6__1 = tmp_7.Instance_vwdrk9_k$(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), tag);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.db6__1.userSessionDao_v2hqyh_k$().findAllLocalSessionsAsync_cfwi87_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_3 = suspendResult;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
            var tmp0_iterator_0 = this_3.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator_0.next_20eer_k$();
              destination_0.add_utx5q5_k$(withLearningSpace(item, this.endpoint5__1));
            }

            var list = destination_0;
            addAll(this.destination2__1, list);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 3:
            return this.destination2__1;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $activeSessionCountCOROUTINE$3(_this__u8e3s4, maxDateOfBirth, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.maxDateOfBirth_1 = maxDateOfBirth;
    this.endpointFilter_1 = endpointFilter;
  }
  protoOf($activeSessionCountCOROUTINE$3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var this_0 = this._this__u8e3s4__1._learningSpacesWithActiveSessions_1.get_value_j01efc_k$();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              if (this.endpointFilter_1.filterEndpoint_9pizal_k$(element.get_url_18iuii_k$())) {
                destination.add_utx5q5_k$(element);
              }
            }

            tmp_0.this0__1 = destination;
            var tmp_1 = this;
            tmp_1.initial1__1 = 0;
            this.accumulator2__1 = this.initial1__1;
            this.tmp0_iterator3__1 = this.this0__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            if (!this.tmp0_iterator3__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

            this.element4__1 = this.tmp0_iterator3__1.next_20eer_k$();
            var tmp_2 = this;
            tmp_2.total5__1 = this.accumulator2__1;
            var tmp_3 = this;
            tmp_3.endpoint6__1 = this.element4__1;
            var tmp_4 = this;
            var this_1 = this._this__u8e3s4__1.di_1;
            var context = this.endpoint6__1;
            var trigger = this_1.get_diTrigger_fb5jcm_k$();
            var tmp_5 = Companion_getInstance_2();
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var this_2 = get_direct(On(this_1, tmp_5.invoke_4wgfc3_k$(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger));
            var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
            var tmp_7 = this_2.get_directDI_rqg7bd_k$();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.db7__1 = tmp_7.Instance_vwdrk9_k$(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), tag);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.db7__1.userSessionDao_v2hqyh_k$().countAllLocalSessionsAsync_ffg7ox_k$(this.maxDateOfBirth_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            this.accumulator2__1 = this.total5__1 + ARGUMENT | 0;
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 3:
            return this.accumulator2__1;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $addSessionCOROUTINE$4(_this__u8e3s4, person, learningSpaceUrl, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.person_1 = person;
    this.learningSpaceUrl_1 = learningSpaceUrl;
    this.password_1 = password;
  }
  protoOf($addSessionCOROUTINE$4).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            assertNotClosed(this._this__u8e3s4__1);
            this.learningSpace0__1 = new LearningSpace(this.learningSpaceUrl_1);
            var tmp_0 = this;
            var this_0 = this._this__u8e3s4__1.di_1;
            var context = this.learningSpace0__1;
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.dataLayer1__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            if (!this._this__u8e3s4__1._learningSpacesWithActiveSessions_1.get_value_j01efc_k$().contains_aljjnj_k$(this.learningSpace0__1)) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = addActiveLearningSpace(this._this__u8e3s4__1, this.learningSpace0__1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            commitActiveEndpointsToPref(this._this__u8e3s4__1);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var tmp_5 = this;
            var this_1 = this._this__u8e3s4__1.di_1;
            var context_0 = this.learningSpace0__1;
            var trigger_0 = this_1.get_diTrigger_fb5jcm_k$();
            var tmp_6 = Companion_getInstance_2();
            var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.invoke_4wgfc3_k$(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).get_directDI_rqg7bd_k$();
            var tmp_9 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
            tmp_5.authManager2__1 = tmp_8.Instance_vwdrk9_k$(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null);
            this.set_state_rjd8d0_k$(3);
            var tmp_10 = this.dataLayer1__1.get_repositoryOrLocalDb_ys0nkj_k$();
            suspendResult = withDoorTransactionAsync(tmp_10, VOID, UstadAccountManager$addSession$slambda_0(this._this__u8e3s4__1, this.learningSpace0__1, this.person_1, this.password_1, this.authManager2__1, this.dataLayer1__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp0_container = suspendResult;
            var userSession = tmp0_container.component1_7eebsc_k$();
            var personPicture = tmp0_container.component2_7eebsb_k$();
            return new UserSessionWithPersonAndLearningSpace(userSession, this.person_1, this.learningSpace0__1, personPicture);
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $onIncomingMessageReceivedCOROUTINE$5(_this__u8e3s4, message, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.message_1 = message;
  }
  protoOf($onIncomingMessageReceivedCOROUTINE$5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.message_1.get_replications_s2xb3k_k$().iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                var tmp_1;
                var tmp_2;
                if (element.get_tableId_of07s0_k$() === Companion_getInstance_4().get_TABLE_ID_xo2mej_k$()) {
                  var tmp0_safe_receiver = element.get_entity_cxtlv0_k$().get_6bo4tg_k$('usUid');
                  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
                  tmp_2 = equals(tmp1_safe_receiver == null ? null : get_longOrNull(tmp1_safe_receiver), this._this__u8e3s4__1.get_currentUserSession_tk77tx_k$().get_userSession_tatogu_k$().get_usUid_izsm95_k$());
                } else {
                  tmp_2 = false;
                }
                if (tmp_2) {
                  var tmp2_safe_receiver = element.get_entity_cxtlv0_k$().get_6bo4tg_k$('usStatus');
                  var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : get_jsonPrimitive(tmp2_safe_receiver);
                  tmp_1 = !((tmp3_safe_receiver == null ? null : get_intOrNull(tmp3_safe_receiver)) === Companion_getInstance_4().get_STATUS_ACTIVE_f4k4s6_k$());
                } else {
                  tmp_1 = false;
                }
                if (tmp_1) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            tmp_0.deactivatedCurrentSession0__1 = tmp$ret$0;
            if (!(this.deactivatedCurrentSession0__1 == null)) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this._this__u8e3s4__1.startGuestSession_2uklfe_k$(this._this__u8e3s4__1.get_currentUserSession_tk77tx_k$().get_learningSpace_sz4skh_k$().get_url_18iuii_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $endSessionCOROUTINE$6(_this__u8e3s4, session, endStatus, endReason, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.session_1 = session;
    this.endStatus_1 = endStatus;
    this.endReason_1 = endReason;
  }
  protoOf($endSessionCOROUTINE$6).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var this_0 = this._this__u8e3s4__1.di_1;
            var context = this.session_1.get_learningSpace_sz4skh_k$();
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.dataLayer0__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.dataLayer0__1.get_repositoryOrLocalDb_ys0nkj_k$().userSessionDao_v2hqyh_k$().endSession_dg3idg_k$(this.session_1.get_userSession_tatogu_k$().get_usUid_izsm95_k$(), this.endStatus_1, this.endReason_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (this._this__u8e3s4__1.get_currentUserSession_tk77tx_k$().get_userSession_tatogu_k$().get_usUid_izsm95_k$().equals(this.session_1.get_userSession_tatogu_k$().get_usUid_izsm95_k$()) ? this._this__u8e3s4__1.get_currentUserSession_tk77tx_k$().get_learningSpace_sz4skh_k$().equals(this.session_1.get_learningSpace_sz4skh_k$()) : false) {
              this._this__u8e3s4__1.set_currentUserSession_3cktus_k$(makeNewTempGuestSession(this._this__u8e3s4__1, this.session_1.get_learningSpace_sz4skh_k$().get_url_18iuii_k$(), this.dataLayer0__1.get_repositoryOrLocalDb_ys0nkj_k$()));
            }

            this.set_state_rjd8d0_k$(2);
            var tmp_5 = UstadAccountManager$endSession$lambda(this.session_1);
            suspendResult = this._this__u8e3s4__1.activeSessionsList_fx72nd_k$(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            if (ARGUMENT.isEmpty_y1axqb_k$()) {
              removeActiveLearningSpace$default(this._this__u8e3s4__1, this.session_1.get_learningSpace_sz4skh_k$());
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $getSiteFromDbOrLoadFromHttpCOROUTINE$7(_this__u8e3s4, repo, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.repo_1 = repo;
  }
  protoOf($getSiteFromDbOrLoadFromHttpCOROUTINE$7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp_1 = this.repo_1;
            var tmp_2 = (isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : THROW_CCE()).get_db_knto1l_k$();
            tmp_0.db0__1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : THROW_CCE();
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db0__1.siteDao_yq9qyz_k$().getSiteAsync_wzkaej_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.siteInDb1__1 = suspendResult;
            if (this.siteInDb1__1 == null) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.repo_1.siteDao_yq9qyz_k$().getSiteAsync_wzkaej_k$(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            if (suspendResult == null)
              throw IllegalStateException_init_$Create$('Internal error: no Site in database and could not fetch it from server');
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $createLocalAccountCOROUTINE$8(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
  }
  protoOf($createLocalAccountCOROUTINE$8).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_createNewLocalAccountUseCase__gbdxzu(this._this__u8e3s4__1).invoke_bbhaqk_k$(new Person(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.localAccountResult0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.addSession_vs2s5g_k$(this.localAccountResult0__1.get_person_i0c866_k$(), this.localAccountResult0__1.get_learningSpace_sz4skh_k$().get_url_18iuii_k$(), null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_0 = suspendResult;
            this._this__u8e3s4__1.set_currentUserSession_3cktus_k$(this_0);
            return this_0;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $startGuestSessionCOROUTINE$9(_this__u8e3s4, learningSpaceUrl, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.learningSpaceUrl_1 = learningSpaceUrl;
  }
  protoOf($startGuestSessionCOROUTINE$9).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var this_0 = this._this__u8e3s4__1.di_1;
            var context = new LearningSpace(this.learningSpaceUrl_1);
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.dataLayer0__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.set_state_rjd8d0_k$(1);
            var tmp_5 = this.dataLayer0__1.get_repositoryOrLocalDb_ys0nkj_k$();
            var this_1 = new Person();
            this_1.set_username_tgnlmk_k$(null);
            this_1.set_firstNames_audc9u_k$('Guest');
            this_1.set_lastName_6ukpbb_k$('User');
            this_1.set_personType_przf38_k$(Companion_getInstance_7().get_TYPE_GUEST_f1ls78_k$());
            suspendResult = insertPersonAndGroup(tmp_5, this_1, Companion_getInstance_8().get_PERSONGROUP_FLAG_PERSONGROUP_elfg4r_k$() | Companion_getInstance_8().get_PERSONGROUP_FLAG_GUESTPERSON_ohq648_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.guestPerson1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = getSiteFromDbOrLoadFromHttp(this._this__u8e3s4__1, this.dataLayer0__1.get_repositoryOrLocalDb_ys0nkj_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.set_state_rjd8d0_k$(3);
            suspendResult = this._this__u8e3s4__1.addSession_vs2s5g_k$(this.guestPerson1__1, this.learningSpaceUrl_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var guestSession = suspendResult;
            this._this__u8e3s4__1.set_currentUserSession_3cktus_k$(guestSession);
            return guestSession;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function UstadAccountManager(settings, di) {
    Companion_getInstance_64();
    this.settings_1 = settings;
    this.di_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = this.di_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(CreateNewLocalAccountUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.createNewLocalAccountUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, createNewLocalAccountUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = this.di_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.httpClient$delegate_1 = Instance(this_1, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, httpClient$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = this.di_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.json$delegate_1 = Instance(this_2, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, json$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = this.di_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.apiUrlConfig$delegate_1 = Instance(this_3, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory());
    this.closed_1 = atomic$boolean$1(false);
    this.scope_1 = CoroutineScope_0(Dispatchers_getInstance().get_Main_wo5vz6_k$().plus_s13ygv_k$(Job()));
    var tmp0_elvis_lhs = this.settings_1.getStringOrNull_w9a5ex_k$('accountmgr.activeendpoint');
    var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg(this).get_presetLearningSpaceUrl_nzw9pt_k$() : tmp0_elvis_lhs;
    var currentEndpointStr = tmp1_elvis_lhs == null ? 'http://localhost/' : tmp1_elvis_lhs;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_4 = get_direct(this.di_1);
    var context = new LearningSpace(currentEndpointStr);
    var tmp_7 = this_4.get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_8 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$9 = tmp_8.invoke_4wgfc3_k$(tmp$ret$8, context);
    var this_5 = tmp_7.On_r75fd9_k$(tmp$ret$9);
    var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
    var tmp_10 = this_5.get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$11 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    var currentDb = tmp_10.Instance_vwdrk9_k$(tmp$ret$11, tag);
    var tmp2_safe_receiver = this.settings_1.getStringOrNull_w9a5ex_k$('accountmgr.activesession');
    var tmp_12;
    if (tmp2_safe_receiver == null) {
      tmp_12 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_6 = _get_json__d8whur(this);
      // Inline function 'kotlinx.serialization.serializer' call
      var this_7 = this_6.get_serializersModule_piitvg_k$();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_8 = serializer(this_7, createKType(getKClass(UserSessionWithPersonAndLearningSpace), arrayOf([]), true));
      var tmp$ret$14 = isInterface(this_8, KSerializer) ? this_8 : THROW_CCE();
      tmp_12 = this_6.decodeFromString_jwu9sq_k$(tmp$ret$14, tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp_12;
    var initUserSession = tmp3_elvis_lhs == null ? makeNewTempGuestSession(this, currentEndpointStr, currentDb) : tmp3_elvis_lhs;
    this._currentUserSession_1 = MutableStateFlow(initUserSession);
    var tmp4_safe_receiver = this.settings_1.getStringOrNull_w9a5ex_k$('accountmgr.endpointswithsessions');
    var tmp_13;
    if (tmp4_safe_receiver == null) {
      tmp_13 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      tmp_13 = _get_json__d8whur(this).decodeFromString_jwu9sq_k$(ListSerializer(serializer_0(StringCompanionObject_getInstance())), tmp4_safe_receiver);
    }
    var tmp5_elvis_lhs = tmp_13;
    var initEndpoints = tmp5_elvis_lhs == null ? listOf_0(currentEndpointStr) : tmp5_elvis_lhs;
    var tmp_14 = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(initEndpoints, 10));
    var tmp0_iterator = initEndpoints.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      var tmp$ret$20 = new LearningSpace(item);
      destination.add_utx5q5_k$(tmp$ret$20);
    }
    tmp_14._learningSpacesWithActiveSessions_1 = MutableStateFlow(destination);
    this._activeUserSessions_1 = MutableStateFlow(listOf_0(initUserSession));
    launch(this.scope_1, VOID, VOID, UstadAccountManager$slambda_0(this, null));
    launch(this.scope_1, VOID, VOID, UstadAccountManager$slambda_2(this, null));
  }
  protoOf(UstadAccountManager).get_di_knto1e_k$ = function () {
    return this.di_1;
  };
  protoOf(UstadAccountManager).set_currentUserSession_3cktus_k$ = function (value) {
    this._currentUserSession_1.set_value_v1vabv_k$(value);
    // Inline function 'kotlinx.serialization.encodeToString' call
    var this_0 = _get_json__d8whur(this);
    // Inline function 'kotlinx.serialization.serializer' call
    var this_1 = this_0.get_serializersModule_piitvg_k$();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(UserSessionWithPersonAndLearningSpace), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var activeAccountJson = this_0.encodeToString_k0apqx_k$(tmp$ret$1, value);
    // Inline function 'com.russhwolf.settings.set' call
    var this_3 = this.settings_1;
    var key = 'accountmgr.activesession';
    this_3.putString_q7x3bk_k$(key, activeAccountJson);
    // Inline function 'com.russhwolf.settings.set' call
    var this_4 = this.settings_1;
    var key_0 = 'accountmgr.activeendpoint';
    var value_0 = value.get_learningSpace_sz4skh_k$().get_url_18iuii_k$();
    this_4.putString_q7x3bk_k$(key_0, value_0);
  };
  protoOf(UstadAccountManager).get_currentUserSession_tk77tx_k$ = function () {
    return this._currentUserSession_1.get_value_j01efc_k$();
  };
  protoOf(UstadAccountManager).get_currentUserSessionFlow_glv447_k$ = function () {
    return asStateFlow(this._currentUserSession_1);
  };
  protoOf(UstadAccountManager).get_currentAccount_cejnur_k$ = function () {
    return this._currentUserSession_1.get_value_j01efc_k$().toUmAccount_2qplmu_k$();
  };
  protoOf(UstadAccountManager).get_activeUserSessionsFlow_n4f46z_k$ = function () {
    return asStateFlow(this._activeUserSessions_1);
  };
  protoOf(UstadAccountManager).get_activeLearningSpace_4z58w7_k$ = function () {
    return this._currentUserSession_1.get_value_j01efc_k$().get_learningSpace_sz4skh_k$();
  };
  protoOf(UstadAccountManager).get_activeLearningSpaces_c7ajom_k$ = function () {
    return this._learningSpacesWithActiveSessions_1.get_value_j01efc_k$();
  };
  protoOf(UstadAccountManager).activeSessionsList_fx72nd_k$ = function (endpointFilter, $completion) {
    var tmp = new $activeSessionsListCOROUTINE$2(this, endpointFilter, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager).activeSessionsList$default_soth1v_k$ = function (endpointFilter, $completion, $super) {
    var tmp;
    if (endpointFilter === VOID) {
      var tmp_0 = UstadAccountManager$activeSessionsList$lambda;
      tmp = new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(tmp_0);
    } else {
      tmp = endpointFilter;
    }
    endpointFilter = tmp;
    return $super === VOID ? this.activeSessionsList_fx72nd_k$(endpointFilter, $completion) : $super.activeSessionsList_fx72nd_k$.call(this, endpointFilter, $completion);
  };
  protoOf(UstadAccountManager).activeSessionCount_ew8bqw_k$ = function (maxDateOfBirth, endpointFilter, $completion) {
    var tmp = new $activeSessionCountCOROUTINE$3(this, maxDateOfBirth, endpointFilter, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager).activeSessionCount$default_wx5dbr_k$ = function (maxDateOfBirth, endpointFilter, $completion, $super) {
    maxDateOfBirth = maxDateOfBirth === VOID ? new Long(0, 0) : maxDateOfBirth;
    var tmp;
    if (endpointFilter === VOID) {
      var tmp_0 = UstadAccountManager$activeSessionCount$lambda;
      tmp = new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(tmp_0);
    } else {
      tmp = endpointFilter;
    }
    endpointFilter = tmp;
    return $super === VOID ? this.activeSessionCount_ew8bqw_k$(maxDateOfBirth, endpointFilter, $completion) : $super.activeSessionCount_ew8bqw_k$.call(this, maxDateOfBirth, endpointFilter, $completion);
  };
  protoOf(UstadAccountManager).registerWithPasskey_a5qkol_k$ = function (learningSpaceUrl, passkeyResult, person, personPicture, $completion) {
    var tmp = Dispatchers_getInstance().get_Default_goqax4_k$();
    return withContext(tmp, UstadAccountManager$registerWithPasskey$slambda_0(learningSpaceUrl, this, passkeyResult, person, null), $completion);
  };
  protoOf(UstadAccountManager).register_271sla_k$ = function (person, password, learningSpaceUrl, accountRegisterOptions, $completion) {
    var tmp = Dispatchers_getInstance().get_Default_goqax4_k$();
    return withContext(tmp, UstadAccountManager$register$slambda_0(this, learningSpaceUrl, accountRegisterOptions, person, password, null), $completion);
  };
  protoOf(UstadAccountManager).register$default_8sto9k_k$ = function (person, password, learningSpaceUrl, accountRegisterOptions, $completion, $super) {
    accountRegisterOptions = accountRegisterOptions === VOID ? new AccountRegisterOptions() : accountRegisterOptions;
    return $super === VOID ? this.register_271sla_k$(person, password, learningSpaceUrl, accountRegisterOptions, $completion) : $super.register_271sla_k$.call(this, person, password, learningSpaceUrl, accountRegisterOptions, $completion);
  };
  protoOf(UstadAccountManager).addSession_vs2s5g_k$ = function (person, learningSpaceUrl, password, $completion) {
    var tmp = new $addSessionCOROUTINE$4(this, person, learningSpaceUrl, password, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager).onIncomingMessageReceived_3v60w2_k$ = function (message, $completion) {
    var tmp = new $onIncomingMessageReceivedCOROUTINE$5(this, message, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager).endSession_mounk1_k$ = function (session, endStatus, endReason, $completion) {
    var tmp = new $endSessionCOROUTINE$6(this, session, endStatus, endReason, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager).endSession$default_nok288_k$ = function (session, endStatus, endReason, $completion, $super) {
    endStatus = endStatus === VOID ? Companion_getInstance_4().get_STATUS_LOGGED_OUT_9pijbf_k$() : endStatus;
    endReason = endReason === VOID ? Companion_getInstance_4().get_REASON_LOGGED_OUT_kp8ov1_k$() : endReason;
    return $super === VOID ? this.endSession_mounk1_k$(session, endStatus, endReason, $completion) : $super.endSession_mounk1_k$.call(this, session, endStatus, endReason, $completion);
  };
  protoOf(UstadAccountManager).loginWithPasskey_m4qfem_k$ = function (passkeyWebAuthNResponse, currentServerUrl, $completion) {
    var tmp = Dispatchers_getInstance().get_Default_goqax4_k$();
    return withContext(tmp, UstadAccountManager$loginWithPasskey$slambda_0(this, currentServerUrl, passkeyWebAuthNResponse, null), $completion);
  };
  protoOf(UstadAccountManager).login_jicr3d_k$ = function (username, password, endpointUrl, maxDateOfBirth, dontSetCurrentSession, $completion) {
    var tmp = Dispatchers_getInstance().get_Default_goqax4_k$();
    return withContext(tmp, UstadAccountManager$login$slambda_0(this, endpointUrl, username, password, maxDateOfBirth, dontSetCurrentSession, null), $completion);
  };
  protoOf(UstadAccountManager).login$default_r5vi0q_k$ = function (username, password, endpointUrl, maxDateOfBirth, dontSetCurrentSession, $completion, $super) {
    maxDateOfBirth = maxDateOfBirth === VOID ? new Long(0, 0) : maxDateOfBirth;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    return $super === VOID ? this.login_jicr3d_k$(username, password, endpointUrl, maxDateOfBirth, dontSetCurrentSession, $completion) : $super.login_jicr3d_k$.call(this, username, password, endpointUrl, maxDateOfBirth, dontSetCurrentSession, $completion);
  };
  protoOf(UstadAccountManager).createLocalAccount_pjlbbe_k$ = function ($completion) {
    var tmp = new $createLocalAccountCOROUTINE$8(this, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager).startGuestSession_2uklfe_k$ = function (learningSpaceUrl, $completion) {
    var tmp = new $startGuestSessionCOROUTINE$9(this, learningSpaceUrl, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadAccountManager).close_yn9xrc_k$ = function () {
    if (!this.closed_1.atomicfu$getAndSet(true)) {
      cancel(this.scope_1);
    }
  };
  function createNewLocalAccountUseCase$factory() {
    return getPropertyCallableRef('createNewLocalAccountUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewLocalAccountUseCase__gbdxzu(receiver);
    }, null);
  }
  function httpClient$factory() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function createNewLocalAccountUseCase$factory_0() {
    return getPropertyCallableRef('createNewLocalAccountUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewLocalAccountUseCase__gbdxzu(receiver);
    }, null);
  }
  function httpClient$factory_0() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory_0() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory_0() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function ContentImportProgressListener() {
  }
  function Companion_4() {
    Companion_instance_4 = this;
    this.VIDEO_IMPORTER_PLUGIN_ID_1 = 101;
  }
  protoOf(Companion_4).get_VIDEO_IMPORTER_PLUGIN_ID_4v1es9_k$ = function () {
    return this.VIDEO_IMPORTER_PLUGIN_ID_1;
  };
  var Companion_instance_4;
  function Companion_getInstance_65() {
    if (Companion_instance_4 == null)
      new Companion_4();
    return Companion_instance_4;
  }
  function ContentImporter(learningSpace) {
    Companion_getInstance_65();
    this.learningSpace_1 = learningSpace;
  }
  protoOf(ContentImporter).get_learningSpace_sz4skh_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(ContentImporter).createContentUrlPrefix_b7shzq_k$ = function (contentEntryVersionUid) {
    return this.learningSpace_1.get_url_18iuii_k$() + Companion_getInstance_9().get_PATH_POSTFIX_hdvv5o_k$() + contentEntryVersionUid.toString() + '/';
  };
  function Companion_5() {
    Companion_instance_5 = this;
  }
  protoOf(Companion_5).serializer_9w0wvi_k$ = function () {
    return AnchorSerializer_getInstance();
  };
  var Companion_instance_5;
  function Companion_getInstance_66() {
    if (Companion_instance_5 == null)
      new Companion_5();
    return Companion_instance_5;
  }
  function Anchor(content, href) {
    Companion_getInstance_66();
    content = content === VOID ? '' : content;
    href = href === VOID ? '' : href;
    this.content_1 = content;
    this.href_1 = href;
  }
  protoOf(Anchor).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  protoOf(Anchor).get_href_wonh4k_k$ = function () {
    return this.href_1;
  };
  function deserializeDynamic($this, reader) {
    var href = reader.getAttributeValue_8yb7e2_k$(null, 'href');
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Anchor(text, href == null ? '' : href);
  }
  function AnchorSerializer() {
    AnchorSerializer_instance = this;
    this.descriptor_1 = buildClassSerialDescriptor('a', []);
  }
  protoOf(AnchorSerializer).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf(AnchorSerializer).deserialize_sy6x50_k$ = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic(this, decoder.get_input_it4gip_k$());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.descriptor_1;
      var composite = decoder.beginStructure_yljocp_k$(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.AnchorSerializer.deserialize.<anonymous>' call
      var result = composite.decodeSerializableElement$default_j0zaoi_k$(AnchorSerializer_getInstance().descriptor_1, 0, Companion_getInstance_66().serializer_9w0wvi_k$());
      composite.endStructure_1xqz0n_k$(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(AnchorSerializer).serialize_us13f_k$ = function (encoder, value) {
    encoder.encodeSerializableValue_3uuzip_k$(Companion_getInstance_66().serializer_9w0wvi_k$(), value);
  };
  protoOf(AnchorSerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_us13f_k$(encoder, value instanceof Anchor ? value : THROW_CCE());
  };
  var AnchorSerializer_instance;
  function AnchorSerializer_getInstance() {
    if (AnchorSerializer_instance == null)
      new AnchorSerializer();
    return AnchorSerializer_instance;
  }
  function Companion_6() {
    Companion_instance_6 = this;
  }
  protoOf(Companion_6).serializer_9w0wvi_k$ = function () {
    return BodySerializer_getInstance();
  };
  var Companion_instance_6;
  function Companion_getInstance_67() {
    if (Companion_instance_6 == null)
      new Companion_6();
    return Companion_instance_6;
  }
  function Body(navigationElements) {
    Companion_getInstance_67();
    this.navigationElements_1 = navigationElements;
  }
  protoOf(Body).get_navigationElements_mtbvik_k$ = function () {
    return this.navigationElements_1;
  };
  function BodySerializer() {
    BodySerializer_instance = this;
  }
  protoOf(BodySerializer).get_descriptor_wjt6a0_k$ = function () {
    return buildClassSerialDescriptor('body', []);
  };
  protoOf(BodySerializer).deserialize_sy6x50_k$ = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = this.deserializeDynamic_3y7ke1_k$(decoder, decoder.get_input_it4gip_k$());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.get_descriptor_wjt6a0_k$();
      var composite = decoder.beginStructure_yljocp_k$(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.BodySerializer.deserialize.<anonymous>' call
      var result = composite.decodeSerializableElement$default_j0zaoi_k$(BodySerializer_getInstance().get_descriptor_wjt6a0_k$(), 0, Companion_getInstance_67().serializer_9w0wvi_k$());
      composite.endStructure_1xqz0n_k$(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(BodySerializer).deserializeDynamic_3y7ke1_k$ = function (decoder, reader) {
    var xml = this.delegateFormat_hr2b33_k$(decoder);
    // Inline function 'kotlin.collections.mutableListOf' call
    var navElementList = ArrayList_init_$Create$();
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = this.get_descriptor_wjt6a0_k$();
    var composite = decoder.beginStructure_yljocp_k$(descriptor);
    while (!(reader.next_20eer_k$().equals(EventType_END_ELEMENT_getInstance()) ? reader.get_name_woqyms_k$().getLocalPart_k3cdyw_k$() === 'body' : false)) {
      if (reader.get_eventType_918hfv_k$().equals(EventType_START_ELEMENT_getInstance()) ? reader.get_localName_bf4zrn_k$() === 'nav' : false) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = xml.decodeFromReader$default_hoidq8_k$(Companion_getInstance_69().serializer_9w0wvi_k$(), reader);
        navElementList.add_utx5q5_k$(element);
      }
    }
    var result = Unit_getInstance();
    composite.endStructure_1xqz0n_k$(descriptor);
    return new Body(toList(navElementList));
  };
  protoOf(BodySerializer).serialize_i24k76_k$ = function (encoder, value) {
    encoder.encodeSerializableValue_3uuzip_k$(Companion_getInstance_67().serializer_9w0wvi_k$(), value);
  };
  protoOf(BodySerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_i24k76_k$(encoder, value instanceof Body ? value : THROW_CCE());
  };
  protoOf(BodySerializer).delegateFormat_hr2b33_k$ = function (decoder) {
    return (isInterface(decoder, XmlInput) ? decoder : THROW_CCE()).delegateFormat_ffjb30_k$();
  };
  var BodySerializer_instance;
  function BodySerializer_getInstance() {
    if (BodySerializer_instance == null)
      new BodySerializer();
    return BodySerializer_instance;
  }
  function Companion_7() {
    Companion_instance_7 = this;
  }
  protoOf(Companion_7).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_13();
  };
  var Companion_instance_7;
  function Companion_getInstance_68() {
    if (Companion_instance_7 == null)
      new Companion_7();
    return Companion_instance_7;
  }
  function $serializer_3() {
    $serializer_instance_3 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.ListItem', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('anchor', true);
    tmp0_serialDesc.addElement_5pzumi_k$('span', true);
    tmp0_serialDesc.addElement_5pzumi_k$('orderedList', true);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('li', 'http://www.w3.org/1999/xhtml'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_3).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_3).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(AnchorSerializer_getInstance()), get_nullable(SpanSerializer_getInstance()), get_nullable($serializer_getInstance_16())];
  };
  protoOf($serializer_3).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_16(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_16(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ListItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_3).serialize_85q0tr_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.anchor_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, AnchorSerializer_getInstance(), value.anchor_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.span_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, SpanSerializer_getInstance(), value.span_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.orderedList_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, $serializer_getInstance_16(), value.orderedList_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_3).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_85q0tr_k$(encoder, value instanceof ListItem ? value : THROW_CCE());
  };
  var $serializer_instance_3;
  function $serializer_getInstance_13() {
    if ($serializer_instance_3 == null)
      new $serializer_3();
    return $serializer_instance_3;
  }
  function ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_13().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.anchor_1 = null;
    else
      $this.anchor_1 = anchor;
    if (0 === (seen1 & 2))
      $this.span_1 = null;
    else
      $this.span_1 = span;
    if (0 === (seen1 & 4))
      $this.orderedList_1 = null;
    else
      $this.orderedList_1 = orderedList;
    return $this;
  }
  function ListItem_init_$Create$(seen1, anchor, span, orderedList, serializationConstructorMarker) {
    return ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, objectCreate(protoOf(ListItem)));
  }
  function ListItem(anchor, span, orderedList) {
    Companion_getInstance_68();
    anchor = anchor === VOID ? null : anchor;
    span = span === VOID ? null : span;
    orderedList = orderedList === VOID ? null : orderedList;
    this.anchor_1 = anchor;
    this.span_1 = span;
    this.orderedList_1 = orderedList;
  }
  protoOf(ListItem).get_anchor_b1c8n2_k$ = function () {
    return this.anchor_1;
  };
  protoOf(ListItem).get_span_wouger_k$ = function () {
    return this.span_1;
  };
  protoOf(ListItem).get_orderedList_lwrnpa_k$ = function () {
    return this.orderedList_1;
  };
  function Companion_8() {
    Companion_instance_8 = this;
  }
  protoOf(Companion_8).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_14();
  };
  var Companion_instance_8;
  function Companion_getInstance_69() {
    if (Companion_instance_8 == null)
      new Companion_8();
    return Companion_instance_8;
  }
  function $serializer_4() {
    $serializer_instance_4 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavElement', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('epubType', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlSerialName('type', 'http://www.idpf.org/2007/ops'));
    tmp0_serialDesc.addElement_5pzumi_k$('orderedList', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('nav', 'http://www.w3.org/1999/xhtml'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_4).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_4).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), $serializer_getInstance_16()];
  };
  protoOf($serializer_4).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance_16(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance_16(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return NavElement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_4).serialize_349x5l_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.epubType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.epubType_1);
    }
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, $serializer_getInstance_16(), value.orderedList_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_4).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_349x5l_k$(encoder, value instanceof NavElement ? value : THROW_CCE());
  };
  var $serializer_instance_4;
  function $serializer_getInstance_14() {
    if ($serializer_instance_4 == null)
      new $serializer_4();
    return $serializer_instance_4;
  }
  function NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_14().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.epubType_1 = null;
    else
      $this.epubType_1 = epubType;
    $this.orderedList_1 = orderedList;
    return $this;
  }
  function NavElement_init_$Create$(seen1, epubType, orderedList, serializationConstructorMarker) {
    return NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, objectCreate(protoOf(NavElement)));
  }
  function NavElement(epubType, orderedList) {
    Companion_getInstance_69();
    epubType = epubType === VOID ? null : epubType;
    this.epubType_1 = epubType;
    this.orderedList_1 = orderedList;
  }
  protoOf(NavElement).get_epubType_y628pn_k$ = function () {
    return this.epubType_1;
  };
  protoOf(NavElement).get_orderedList_lwrnpa_k$ = function () {
    return this.orderedList_1;
  };
  function Companion_9() {
    Companion_instance_9 = this;
    this.NAMESPACE_XHTML_1 = 'http://www.w3.org/1999/xhtml';
    this.NAMESPACE_OPS_1 = 'http://www.idpf.org/2007/ops';
  }
  protoOf(Companion_9).get_NAMESPACE_XHTML_wiu32u_k$ = function () {
    return this.NAMESPACE_XHTML_1;
  };
  protoOf(Companion_9).get_NAMESPACE_OPS_nzkp7f_k$ = function () {
    return this.NAMESPACE_OPS_1;
  };
  protoOf(Companion_9).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_15();
  };
  var Companion_instance_9;
  function Companion_getInstance_70() {
    if (Companion_instance_9 == null)
      new Companion_9();
    return Companion_instance_9;
  }
  function $serializer_5() {
    $serializer_instance_5 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavigationDocument', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('bodyElement', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('html', 'http://www.w3.org/1999/xhtml'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_5).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_5).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BodySerializer_getInstance()];
  };
  protoOf($serializer_5).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, BodySerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, BodySerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return NavigationDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_5).serialize_xp4e9d_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, BodySerializer_getInstance(), value.bodyElement_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_5).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_xp4e9d_k$(encoder, value instanceof NavigationDocument ? value : THROW_CCE());
  };
  var $serializer_instance_5;
  function $serializer_getInstance_15() {
    if ($serializer_instance_5 == null)
      new $serializer_5();
    return $serializer_instance_5;
  }
  function NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_15().descriptor_1);
    }
    $this.bodyElement_1 = bodyElement;
    return $this;
  }
  function NavigationDocument_init_$Create$(seen1, bodyElement, serializationConstructorMarker) {
    return NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, objectCreate(protoOf(NavigationDocument)));
  }
  function NavigationDocument(bodyElement) {
    Companion_getInstance_70();
    this.bodyElement_1 = bodyElement;
  }
  protoOf(NavigationDocument).get_bodyElement_9d0lu9_k$ = function () {
    return this.bodyElement_1;
  };
  function _get_$childSerializers__r2zwns($this) {
    return $this.$childSerializers_1;
  }
  function Companion_10() {
    Companion_instance_10 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_13())];
  }
  protoOf(Companion_10).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_16();
  };
  var Companion_instance_10;
  function Companion_getInstance_71() {
    if (Companion_instance_10 == null)
      new Companion_10();
    return Companion_instance_10;
  }
  function $serializer_6() {
    $serializer_instance_6 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.OrderedList', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('listItems', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('ol', 'http://www.w3.org/1999/xhtml'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_6).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_6).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_71().$childSerializers_1[0]];
  };
  protoOf($serializer_6).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp6_cached = Companion_getInstance_71().$childSerializers_1;
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return OrderedList_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_6).serialize_20qe79_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_71().$childSerializers_1;
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.listItems_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_6).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_20qe79_k$(encoder, value instanceof OrderedList ? value : THROW_CCE());
  };
  var $serializer_instance_6;
  function $serializer_getInstance_16() {
    if ($serializer_instance_6 == null)
      new $serializer_6();
    return $serializer_instance_6;
  }
  function OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_16().descriptor_1);
    }
    $this.listItems_1 = listItems;
    return $this;
  }
  function OrderedList_init_$Create$(seen1, listItems, serializationConstructorMarker) {
    return OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, objectCreate(protoOf(OrderedList)));
  }
  function OrderedList(listItems) {
    Companion_getInstance_71();
    this.listItems_1 = listItems;
  }
  protoOf(OrderedList).get_listItems_c2czc7_k$ = function () {
    return this.listItems_1;
  };
  function Companion_11() {
    Companion_instance_11 = this;
  }
  protoOf(Companion_11).serializer_9w0wvi_k$ = function () {
    return SpanSerializer_getInstance();
  };
  var Companion_instance_11;
  function Companion_getInstance_72() {
    if (Companion_instance_11 == null)
      new Companion_11();
    return Companion_instance_11;
  }
  function Span(content) {
    Companion_getInstance_72();
    content = content === VOID ? '' : content;
    this.content_1 = content;
  }
  protoOf(Span).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function deserializeDynamic_0($this, reader) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Span(text);
  }
  function SpanSerializer() {
    SpanSerializer_instance = this;
    this.descriptor_1 = buildClassSerialDescriptor('span', []);
  }
  protoOf(SpanSerializer).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf(SpanSerializer).deserialize_sy6x50_k$ = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic_0(this, decoder.get_input_it4gip_k$());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = AnchorSerializer_getInstance().get_descriptor_wjt6a0_k$();
      var composite = decoder.beginStructure_yljocp_k$(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.SpanSerializer.deserialize.<anonymous>' call
      var result = composite.decodeSerializableElement$default_j0zaoi_k$(AnchorSerializer_getInstance().get_descriptor_wjt6a0_k$(), 0, Companion_getInstance_72().serializer_9w0wvi_k$());
      composite.endStructure_1xqz0n_k$(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(SpanSerializer).serialize_loelg6_k$ = function (encoder, value) {
    encoder.encodeSerializableValue_3uuzip_k$(Companion_getInstance_72().serializer_9w0wvi_k$(), value);
  };
  protoOf(SpanSerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_loelg6_k$(encoder, value instanceof Span ? value : THROW_CCE());
  };
  var SpanSerializer_instance;
  function SpanSerializer_getInstance() {
    if (SpanSerializer_instance == null)
      new SpanSerializer();
    return SpanSerializer_instance;
  }
  function Companion_12() {
    Companion_instance_12 = this;
  }
  protoOf(Companion_12).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_17();
  };
  var Companion_instance_12;
  function Companion_getInstance_73() {
    if (Companion_instance_12 == null)
      new Companion_12();
    return Companion_instance_12;
  }
  function $serializer_7() {
    $serializer_instance_7 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Content', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('id', true);
    tmp0_serialDesc.addElement_5pzumi_k$('src', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('content', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_7).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_7).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_7).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Content_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_7).serialize_75zjv1_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.id_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.id_1);
    }
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.src_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_7).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_75zjv1_k$(encoder, value instanceof Content ? value : THROW_CCE());
  };
  var $serializer_instance_7;
  function $serializer_getInstance_17() {
    if ($serializer_instance_7 == null)
      new $serializer_7();
    return $serializer_instance_7;
  }
  function Content_init_$Init$(seen1, id, src, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_17().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.id_1 = null;
    else
      $this.id_1 = id;
    $this.src_1 = src;
    return $this;
  }
  function Content_init_$Create$(seen1, id, src, serializationConstructorMarker) {
    return Content_init_$Init$(seen1, id, src, serializationConstructorMarker, objectCreate(protoOf(Content)));
  }
  function Content(id, src) {
    Companion_getInstance_73();
    id = id === VOID ? null : id;
    this.id_1 = id;
    this.src_1 = src;
  }
  protoOf(Content).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(Content).get_src_18iw05_k$ = function () {
    return this.src_1;
  };
  function _get_$childSerializers__r2zwns_0($this) {
    return $this.$childSerializers_1;
  }
  function Companion_13() {
    Companion_instance_13 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_24())];
  }
  protoOf(Companion_13).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_18();
  };
  var Companion_instance_13;
  function Companion_getInstance_74() {
    if (Companion_instance_13 == null)
      new Companion_13();
    return Companion_instance_13;
  }
  function $serializer_8() {
    $serializer_instance_8 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.DocTitle', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('texts', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('docTitle', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_8).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_8).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_74().$childSerializers_1[0]];
  };
  protoOf($serializer_8).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp6_cached = Companion_getInstance_74().$childSerializers_1;
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return DocTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_8).serialize_u338gw_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_74().$childSerializers_1;
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.texts_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_8).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_u338gw_k$(encoder, value instanceof DocTitle ? value : THROW_CCE());
  };
  var $serializer_instance_8;
  function $serializer_getInstance_18() {
    if ($serializer_instance_8 == null)
      new $serializer_8();
    return $serializer_instance_8;
  }
  function DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_18().descriptor_1);
    }
    $this.texts_1 = texts;
    return $this;
  }
  function DocTitle_init_$Create$(seen1, texts, serializationConstructorMarker) {
    return DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, objectCreate(protoOf(DocTitle)));
  }
  function DocTitle(texts) {
    Companion_getInstance_74();
    this.texts_1 = texts;
  }
  protoOf(DocTitle).get_texts_iz0m2l_k$ = function () {
    return this.texts_1;
  };
  function _get_$childSerializers__r2zwns_1($this) {
    return $this.$childSerializers_1;
  }
  function Companion_14() {
    Companion_instance_14 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_34())];
  }
  protoOf(Companion_14).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_19();
  };
  var Companion_instance_14;
  function Companion_getInstance_75() {
    if (Companion_instance_14 == null)
      new Companion_14();
    return Companion_instance_14;
  }
  function $serializer_9() {
    $serializer_instance_9 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Head', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('metadata', true);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('head', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_9).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_9).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_75().$childSerializers_1[0]];
  };
  protoOf($serializer_9).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp6_cached = Companion_getInstance_75().$childSerializers_1;
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Head_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_9).serialize_uni8sg_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_75().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !equals(value.metadata_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.metadata_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_9).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_uni8sg_k$(encoder, value instanceof Head ? value : THROW_CCE());
  };
  var $serializer_instance_9;
  function $serializer_getInstance_19() {
    if ($serializer_instance_9 == null)
      new $serializer_9();
    return $serializer_instance_9;
  }
  function Head_init_$Init$(seen1, metadata, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_19().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.metadata_1 = emptyList();
    else
      $this.metadata_1 = metadata;
    return $this;
  }
  function Head_init_$Create$(seen1, metadata, serializationConstructorMarker) {
    return Head_init_$Init$(seen1, metadata, serializationConstructorMarker, objectCreate(protoOf(Head)));
  }
  function Head(metadata) {
    Companion_getInstance_75();
    metadata = metadata === VOID ? emptyList() : metadata;
    this.metadata_1 = metadata;
  }
  protoOf(Head).get_metadata_vs95vc_k$ = function () {
    return this.metadata_1;
  };
  function Companion_15() {
    Companion_instance_15 = this;
  }
  protoOf(Companion_15).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_20();
  };
  var Companion_instance_15;
  function Companion_getInstance_76() {
    if (Companion_instance_15 == null)
      new Companion_15();
    return Companion_instance_15;
  }
  function $serializer_10() {
    $serializer_instance_10 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavLabel', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('text', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('navLabel', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_10).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_10).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_24()];
  };
  protoOf($serializer_10).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_24(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_24(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return NavLabel_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_10).serialize_6cx2y7_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, $serializer_getInstance_24(), value.text_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_10).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_6cx2y7_k$(encoder, value instanceof NavLabel ? value : THROW_CCE());
  };
  var $serializer_instance_10;
  function $serializer_getInstance_20() {
    if ($serializer_instance_10 == null)
      new $serializer_10();
    return $serializer_instance_10;
  }
  function NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_20().descriptor_1);
    }
    $this.text_1 = text;
    return $this;
  }
  function NavLabel_init_$Create$(seen1, text, serializationConstructorMarker) {
    return NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, objectCreate(protoOf(NavLabel)));
  }
  function NavLabel(text) {
    Companion_getInstance_76();
    this.text_1 = text;
  }
  protoOf(NavLabel).get_text_wouvsm_k$ = function () {
    return this.text_1;
  };
  function _get_$childSerializers__r2zwns_2($this) {
    return $this.$childSerializers_1;
  }
  function Companion_16() {
    Companion_instance_16 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_22())];
  }
  protoOf(Companion_16).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_21();
  };
  var Companion_instance_16;
  function Companion_getInstance_77() {
    if (Companion_instance_16 == null)
      new Companion_16();
    return Companion_instance_16;
  }
  function $serializer_11() {
    $serializer_instance_11 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavMap', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('navPoints', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('navMap', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_11).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_11).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_77().$childSerializers_1[0]];
  };
  protoOf($serializer_11).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp6_cached = Companion_getInstance_77().$childSerializers_1;
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return NavMap_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_11).serialize_wsap89_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_77().$childSerializers_1;
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.navPoints_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_11).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_wsap89_k$(encoder, value instanceof NavMap ? value : THROW_CCE());
  };
  var $serializer_instance_11;
  function $serializer_getInstance_21() {
    if ($serializer_instance_11 == null)
      new $serializer_11();
    return $serializer_instance_11;
  }
  function NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_21().descriptor_1);
    }
    $this.navPoints_1 = navPoints;
    return $this;
  }
  function NavMap_init_$Create$(seen1, navPoints, serializationConstructorMarker) {
    return NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, objectCreate(protoOf(NavMap)));
  }
  function NavMap(navPoints) {
    Companion_getInstance_77();
    this.navPoints_1 = navPoints;
  }
  protoOf(NavMap).get_navPoints_9957i5_k$ = function () {
    return this.navPoints_1;
  };
  function _get_$childSerializers__r2zwns_3($this) {
    return $this.$childSerializers_1;
  }
  function Companion_17() {
    Companion_instance_17 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_20()), null, null, null];
  }
  protoOf(Companion_17).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_22();
  };
  var Companion_instance_17;
  function Companion_getInstance_78() {
    if (Companion_instance_17 == null)
      new Companion_17();
    return Companion_instance_17;
  }
  function $serializer_12() {
    $serializer_instance_12 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavPoint', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('navLabels', false);
    tmp0_serialDesc.addElement_5pzumi_k$('content', false);
    tmp0_serialDesc.addElement_5pzumi_k$('id', false);
    tmp0_serialDesc.addElement_5pzumi_k$('childPoints', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('navPoint', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_12).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_12).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_78().$childSerializers_1[0], $serializer_getInstance_17(), StringSerializer_getInstance(), new ArrayListSerializer($serializer_getInstance_22())];
  };
  protoOf($serializer_12).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp9_cached = Companion_getInstance_78().$childSerializers_1;
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_22()), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_22()), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return NavPoint_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_12).serialize_pdlzpv_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_78().$childSerializers_1;
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.navLabels_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, $serializer_getInstance_17(), value.content_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 2, value.id_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_22()), value.childPoints_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_12).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_pdlzpv_k$(encoder, value instanceof NavPoint ? value : THROW_CCE());
  };
  var $serializer_instance_12;
  function $serializer_getInstance_22() {
    if ($serializer_instance_12 == null)
      new $serializer_12();
    return $serializer_instance_12;
  }
  function NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_22().descriptor_1);
    }
    $this.navLabels_1 = navLabels;
    $this.content_1 = content;
    $this.id_1 = id;
    $this.childPoints_1 = childPoints;
    return $this;
  }
  function NavPoint_init_$Create$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker) {
    return NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, objectCreate(protoOf(NavPoint)));
  }
  function NavPoint(navLabels, content, id, childPoints) {
    Companion_getInstance_78();
    this.navLabels_1 = navLabels;
    this.content_1 = content;
    this.id_1 = id;
    this.childPoints_1 = childPoints;
  }
  protoOf(NavPoint).get_navLabels_754xuh_k$ = function () {
    return this.navLabels_1;
  };
  protoOf(NavPoint).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  protoOf(NavPoint).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(NavPoint).get_childPoints_8txs96_k$ = function () {
    return this.childPoints_1;
  };
  function Companion_18() {
    Companion_instance_18 = this;
    this.NAMESPACE_NCX_1 = 'http://www.daisy.org/z3986/2005/ncx/';
    this.MIMETYPE_NCX_1 = 'application/x-dtbncx+xml';
  }
  protoOf(Companion_18).get_NAMESPACE_NCX_nzkq96_k$ = function () {
    return this.NAMESPACE_NCX_1;
  };
  protoOf(Companion_18).get_MIMETYPE_NCX_lctyrf_k$ = function () {
    return this.MIMETYPE_NCX_1;
  };
  protoOf(Companion_18).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_23();
  };
  var Companion_instance_18;
  function Companion_getInstance_79() {
    if (Companion_instance_18 == null)
      new Companion_18();
    return Companion_instance_18;
  }
  function $serializer_13() {
    $serializer_instance_13 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NcxDocument', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('head', false);
    tmp0_serialDesc.addElement_5pzumi_k$('docTitle', false);
    tmp0_serialDesc.addElement_5pzumi_k$('navMap', false);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('ncx', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_13).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_13).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_19(), $serializer_getInstance_18(), $serializer_getInstance_21()];
  };
  protoOf($serializer_13).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_19(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_21(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_19(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_21(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return NcxDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_13).serialize_iuna14_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, $serializer_getInstance_19(), value.head_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, $serializer_getInstance_18(), value.docTitle_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, $serializer_getInstance_21(), value.navMap_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_13).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_iuna14_k$(encoder, value instanceof NcxDocument ? value : THROW_CCE());
  };
  var $serializer_instance_13;
  function $serializer_getInstance_23() {
    if ($serializer_instance_13 == null)
      new $serializer_13();
    return $serializer_instance_13;
  }
  function NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_23().descriptor_1);
    }
    $this.head_1 = head;
    $this.docTitle_1 = docTitle;
    $this.navMap_1 = navMap;
    return $this;
  }
  function NcxDocument_init_$Create$(seen1, head, docTitle, navMap, serializationConstructorMarker) {
    return NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, objectCreate(protoOf(NcxDocument)));
  }
  function NcxDocument(head, docTitle, navMap) {
    Companion_getInstance_79();
    this.head_1 = head;
    this.docTitle_1 = docTitle;
    this.navMap_1 = navMap;
  }
  protoOf(NcxDocument).get_head_won7e1_k$ = function () {
    return this.head_1;
  };
  protoOf(NcxDocument).get_docTitle_i23j1z_k$ = function () {
    return this.docTitle_1;
  };
  protoOf(NcxDocument).get_navMap_h03kg2_k$ = function () {
    return this.navMap_1;
  };
  function Companion_19() {
    Companion_instance_19 = this;
  }
  protoOf(Companion_19).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_24();
  };
  var Companion_instance_19;
  function Companion_getInstance_80() {
    if (Companion_instance_19 == null)
      new Companion_19();
    return Companion_instance_19;
  }
  function $serializer_14() {
    $serializer_instance_14 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Text', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('content', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlValue());
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('text', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_14).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_14).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_14).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Text_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_14).serialize_cdscr7_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.content_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.content_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_14).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_cdscr7_k$(encoder, value instanceof Text ? value : THROW_CCE());
  };
  var $serializer_instance_14;
  function $serializer_getInstance_24() {
    if ($serializer_instance_14 == null)
      new $serializer_14();
    return $serializer_instance_14;
  }
  function Text_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_24().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.content_1 = '';
    else
      $this.content_1 = content;
    return $this;
  }
  function Text_init_$Create$(seen1, content, serializationConstructorMarker) {
    return Text_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(Text)));
  }
  function Text(content) {
    Companion_getInstance_80();
    content = content === VOID ? '' : content;
    this.content_1 = content;
  }
  protoOf(Text).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function Companion_20() {
    Companion_instance_20 = this;
  }
  protoOf(Companion_20).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_25();
  };
  var Companion_instance_20;
  function Companion_getInstance_81() {
    if (Companion_instance_20 == null)
      new Companion_20();
    return Companion_instance_20;
  }
  function $serializer_15() {
    $serializer_instance_15 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcCreator', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('id', true);
    tmp0_serialDesc.addElement_5pzumi_k$('content', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlValue());
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('creator', 'http://purl.org/dc/elements/1.1/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_15).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_15).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_15).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return DcCreator_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_15).serialize_xeqok7_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.id_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.id_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.content_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.content_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_15).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_xeqok7_k$(encoder, value instanceof DcCreator ? value : THROW_CCE());
  };
  var $serializer_instance_15;
  function $serializer_getInstance_25() {
    if ($serializer_instance_15 == null)
      new $serializer_15();
    return $serializer_instance_15;
  }
  function DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_25().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.id_1 = null;
    else
      $this.id_1 = id;
    if (0 === (seen1 & 2))
      $this.content_1 = '';
    else
      $this.content_1 = content;
    return $this;
  }
  function DcCreator_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcCreator)));
  }
  function DcCreator(id, content) {
    Companion_getInstance_81();
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.id_1 = id;
    this.content_1 = content;
  }
  protoOf(DcCreator).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(DcCreator).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function Companion_21() {
    Companion_instance_21 = this;
  }
  protoOf(Companion_21).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_26();
  };
  var Companion_instance_21;
  function Companion_getInstance_82() {
    if (Companion_instance_21 == null)
      new Companion_21();
    return Companion_instance_21;
  }
  function $serializer_16() {
    $serializer_instance_16 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcDescription', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('lang', true);
    tmp0_serialDesc.addElement_5pzumi_k$('content', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlValue());
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('description', 'http://purl.org/dc/elements/1.1/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_16).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_16).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_16).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return DcDescription_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_16).serialize_wxllvr_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.lang_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.lang_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.content_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.content_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_16).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_wxllvr_k$(encoder, value instanceof DcDescription ? value : THROW_CCE());
  };
  var $serializer_instance_16;
  function $serializer_getInstance_26() {
    if ($serializer_instance_16 == null)
      new $serializer_16();
    return $serializer_instance_16;
  }
  function DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_26().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.lang_1 = null;
    else
      $this.lang_1 = lang;
    if (0 === (seen1 & 2))
      $this.content_1 = '';
    else
      $this.content_1 = content;
    return $this;
  }
  function DcDescription_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcDescription)));
  }
  function DcDescription(lang, content) {
    Companion_getInstance_82();
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.lang_1 = lang;
    this.content_1 = content;
  }
  protoOf(DcDescription).get_lang_wopoon_k$ = function () {
    return this.lang_1;
  };
  protoOf(DcDescription).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function Companion_22() {
    Companion_instance_22 = this;
  }
  protoOf(Companion_22).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_27();
  };
  var Companion_instance_22;
  function Companion_getInstance_83() {
    if (Companion_instance_22 == null)
      new Companion_22();
    return Companion_instance_22;
  }
  function $serializer_17() {
    $serializer_instance_17 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcIdentifier', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('id', true);
    tmp0_serialDesc.addElement_5pzumi_k$('content', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlValue());
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('identifier', 'http://purl.org/dc/elements/1.1/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_17).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_17).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_17).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return DcIdentifier_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_17).serialize_1uty06_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.id_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.id_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.content_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.content_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_17).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_1uty06_k$(encoder, value instanceof DcIdentifier ? value : THROW_CCE());
  };
  var $serializer_instance_17;
  function $serializer_getInstance_27() {
    if ($serializer_instance_17 == null)
      new $serializer_17();
    return $serializer_instance_17;
  }
  function DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_27().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.id_1 = null;
    else
      $this.id_1 = id;
    if (0 === (seen1 & 2))
      $this.content_1 = '';
    else
      $this.content_1 = content;
    return $this;
  }
  function DcIdentifier_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcIdentifier)));
  }
  function DcIdentifier(id, content) {
    Companion_getInstance_83();
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.id_1 = id;
    this.content_1 = content;
  }
  protoOf(DcIdentifier).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(DcIdentifier).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function Companion_23() {
    Companion_instance_23 = this;
  }
  protoOf(Companion_23).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_28();
  };
  var Companion_instance_23;
  function Companion_getInstance_84() {
    if (Companion_instance_23 == null)
      new Companion_23();
    return Companion_instance_23;
  }
  function $serializer_18() {
    $serializer_instance_18 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcLanguage', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('content', false);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlValue());
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('language', 'http://purl.org/dc/elements/1.1/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_18).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_18).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_18).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return DcLanguage_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_18).serialize_vy2z63_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.content_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_18).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_vy2z63_k$(encoder, value instanceof DcLanguage ? value : THROW_CCE());
  };
  var $serializer_instance_18;
  function $serializer_getInstance_28() {
    if ($serializer_instance_18 == null)
      new $serializer_18();
    return $serializer_instance_18;
  }
  function DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_28().descriptor_1);
    }
    $this.content_1 = content;
    return $this;
  }
  function DcLanguage_init_$Create$(seen1, content, serializationConstructorMarker) {
    return DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(DcLanguage)));
  }
  function DcLanguage(content) {
    Companion_getInstance_84();
    this.content_1 = content;
  }
  protoOf(DcLanguage).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function Companion_24() {
    Companion_instance_24 = this;
  }
  protoOf(Companion_24).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_29();
  };
  var Companion_instance_24;
  function Companion_getInstance_85() {
    if (Companion_instance_24 == null)
      new Companion_24();
    return Companion_instance_24;
  }
  function $serializer_19() {
    $serializer_instance_19 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcTitle', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('lang', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlSerialName(VOID, VOID, 'xml'));
    tmp0_serialDesc.addElement_5pzumi_k$('content', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlValue());
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('title', 'http://purl.org/dc/elements/1.1/'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_19).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_19).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_19).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return DcTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_19).serialize_xysq1h_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.lang_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.lang_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.content_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.content_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_19).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_xysq1h_k$(encoder, value instanceof DcTitle ? value : THROW_CCE());
  };
  var $serializer_instance_19;
  function $serializer_getInstance_29() {
    if ($serializer_instance_19 == null)
      new $serializer_19();
    return $serializer_instance_19;
  }
  function DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_29().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.lang_1 = null;
    else
      $this.lang_1 = lang;
    if (0 === (seen1 & 2))
      $this.content_1 = '';
    else
      $this.content_1 = content;
    return $this;
  }
  function DcTitle_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcTitle)));
  }
  function DcTitle(lang, content) {
    Companion_getInstance_85();
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.lang_1 = lang;
    this.content_1 = content;
  }
  protoOf(DcTitle).get_lang_wopoon_k$ = function () {
    return this.lang_1;
  };
  protoOf(DcTitle).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function Companion_25() {
    Companion_instance_25 = this;
  }
  protoOf(Companion_25).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_30();
  };
  var Companion_instance_25;
  function Companion_getInstance_86() {
    if (Companion_instance_25 == null)
      new Companion_25();
    return Companion_instance_25;
  }
  function $serializer_20() {
    $serializer_instance_20 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Item', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('id', false);
    tmp0_serialDesc.addElement_5pzumi_k$('href', false);
    tmp0_serialDesc.addElement_5pzumi_k$('properties', true);
    tmp0_serialDesc.addElement_5pzumi_k$('mediaType', false);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlSerialName('media-type'));
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('item', 'http://www.idpf.org/2007/opf'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_20).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_20).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_20).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Item_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_20).serialize_muyxin_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.id_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.href_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.properties_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.properties_1);
    }
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 3, value.mediaType_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_20).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_muyxin_k$(encoder, value instanceof Item ? value : THROW_CCE());
  };
  var $serializer_instance_20;
  function $serializer_getInstance_30() {
    if ($serializer_instance_20 == null)
      new $serializer_20();
    return $serializer_instance_20;
  }
  function Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, $this) {
    if (!(11 === (11 & seen1))) {
      throwMissingFieldException(seen1, 11, $serializer_getInstance_30().descriptor_1);
    }
    $this.id_1 = id;
    $this.href_1 = href;
    if (0 === (seen1 & 4))
      $this.properties_1 = null;
    else
      $this.properties_1 = properties;
    $this.mediaType_1 = mediaType;
    return $this;
  }
  function Item_init_$Create$(seen1, id, href, properties, mediaType, serializationConstructorMarker) {
    return Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, objectCreate(protoOf(Item)));
  }
  function Item(id, href, properties, mediaType) {
    Companion_getInstance_86();
    properties = properties === VOID ? null : properties;
    this.id_1 = id;
    this.href_1 = href;
    this.properties_1 = properties;
    this.mediaType_1 = mediaType;
  }
  protoOf(Item).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(Item).get_href_wonh4k_k$ = function () {
    return this.href_1;
  };
  protoOf(Item).get_properties_zhllqc_k$ = function () {
    return this.properties_1;
  };
  protoOf(Item).get_mediaType_r47omj_k$ = function () {
    return this.mediaType_1;
  };
  function Companion_26() {
    Companion_instance_26 = this;
  }
  protoOf(Companion_26).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_31();
  };
  var Companion_instance_26;
  function Companion_getInstance_87() {
    if (Companion_instance_26 == null)
      new Companion_26();
    return Companion_instance_26;
  }
  function $serializer_21() {
    $serializer_instance_21 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.ItemRef', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('idRef', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlSerialName('idref'));
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('itemref', 'http://www.idpf.org/2007/opf'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_21).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_21).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_21).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ItemRef_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_21).serialize_bo7t5w_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.idRef_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.idRef_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_21).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_bo7t5w_k$(encoder, value instanceof ItemRef ? value : THROW_CCE());
  };
  var $serializer_instance_21;
  function $serializer_getInstance_31() {
    if ($serializer_instance_21 == null)
      new $serializer_21();
    return $serializer_instance_21;
  }
  function ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_31().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.idRef_1 = '';
    else
      $this.idRef_1 = idRef;
    return $this;
  }
  function ItemRef_init_$Create$(seen1, idRef, serializationConstructorMarker) {
    return ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, objectCreate(protoOf(ItemRef)));
  }
  function ItemRef(idRef) {
    Companion_getInstance_87();
    idRef = idRef === VOID ? '' : idRef;
    this.idRef_1 = idRef;
  }
  protoOf(ItemRef).get_idRef_isxg0f_k$ = function () {
    return this.idRef_1;
  };
  function _get_$childSerializers__r2zwns_4($this) {
    return $this.$childSerializers_1;
  }
  function Companion_27() {
    Companion_instance_27 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_30())];
  }
  protoOf(Companion_27).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_32();
  };
  var Companion_instance_27;
  function Companion_getInstance_88() {
    if (Companion_instance_27 == null)
      new Companion_27();
    return Companion_instance_27;
  }
  function $serializer_22() {
    $serializer_instance_22 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Manifest', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('items', true);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('manifest', 'http://www.idpf.org/2007/opf'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_22).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_22).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_88().$childSerializers_1[0]];
  };
  protoOf($serializer_22).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp6_cached = Companion_getInstance_88().$childSerializers_1;
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Manifest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_22).serialize_j8kfl9_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_88().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !equals(value.items_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.items_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_22).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_j8kfl9_k$(encoder, value instanceof Manifest ? value : THROW_CCE());
  };
  var $serializer_instance_22;
  function $serializer_getInstance_32() {
    if ($serializer_instance_22 == null)
      new $serializer_22();
    return $serializer_instance_22;
  }
  function Manifest_init_$Init$(seen1, items, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_32().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.items_1 = emptyList();
    else
      $this.items_1 = items;
    return $this;
  }
  function Manifest_init_$Create$(seen1, items, serializationConstructorMarker) {
    return Manifest_init_$Init$(seen1, items, serializationConstructorMarker, objectCreate(protoOf(Manifest)));
  }
  function Manifest(items) {
    Companion_getInstance_88();
    items = items === VOID ? emptyList() : items;
    this.items_1 = items;
  }
  protoOf(Manifest).get_items_it823b_k$ = function () {
    return this.items_1;
  };
  function Companion_28() {
    Companion_instance_28 = this;
  }
  protoOf(Companion_28).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_33();
  };
  var Companion_instance_28;
  function Companion_getInstance_89() {
    if (Companion_instance_28 == null)
      new Companion_28();
    return Companion_instance_28;
  }
  function $serializer_23() {
    $serializer_instance_23 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Meta', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('name', true);
    tmp0_serialDesc.addElement_5pzumi_k$('content', true);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('meta', 'http://www.idpf.org/2007/opf'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_23).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_23).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_23).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Meta_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_23).serialize_idbq4j_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.name_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.name_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.content_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, StringSerializer_getInstance(), value.content_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_23).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_idbq4j_k$(encoder, value instanceof Meta ? value : THROW_CCE());
  };
  var $serializer_instance_23;
  function $serializer_getInstance_33() {
    if ($serializer_instance_23 == null)
      new $serializer_23();
    return $serializer_instance_23;
  }
  function Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_33().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.name_1 = null;
    else
      $this.name_1 = name;
    if (0 === (seen1 & 2))
      $this.content_1 = null;
    else
      $this.content_1 = content;
    return $this;
  }
  function Meta_init_$Create$(seen1, name, content, serializationConstructorMarker) {
    return Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, objectCreate(protoOf(Meta)));
  }
  function Meta(name, content) {
    Companion_getInstance_89();
    name = name === VOID ? null : name;
    content = content === VOID ? null : content;
    this.name_1 = name;
    this.content_1 = content;
  }
  protoOf(Meta).get_name_woqyms_k$ = function () {
    return this.name_1;
  };
  protoOf(Meta).get_content_h02jrk_k$ = function () {
    return this.content_1;
  };
  function _get_$childSerializers__r2zwns_5($this) {
    return $this.$childSerializers_1;
  }
  function Companion_29() {
    Companion_instance_29 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_29()), new ArrayListSerializer($serializer_getInstance_25()), new ArrayListSerializer($serializer_getInstance_28()), new ArrayListSerializer($serializer_getInstance_26()), new ArrayListSerializer($serializer_getInstance_27()), new ArrayListSerializer($serializer_getInstance_33())];
  }
  protoOf(Companion_29).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_34();
  };
  var Companion_instance_29;
  function Companion_getInstance_90() {
    if (Companion_instance_29 == null)
      new Companion_29();
    return Companion_instance_29;
  }
  function $serializer_24() {
    $serializer_instance_24 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Metadata', this, 6);
    tmp0_serialDesc.addElement_5pzumi_k$('titles', true);
    tmp0_serialDesc.addElement_5pzumi_k$('creators', true);
    tmp0_serialDesc.addElement_5pzumi_k$('languages', true);
    tmp0_serialDesc.addElement_5pzumi_k$('descriptions', true);
    tmp0_serialDesc.addElement_5pzumi_k$('identifiers', true);
    tmp0_serialDesc.addElement_5pzumi_k$('metas', true);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('metadata', 'http://www.idpf.org/2007/opf'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_24).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_24).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_90().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [tmp0_cached[0], tmp0_cached[1], tmp0_cached[2], tmp0_cached[3], tmp0_cached[4], tmp0_cached[5]];
  };
  protoOf($serializer_24).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp11_cached = Companion_getInstance_90().$childSerializers_1;
    if (tmp10_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Metadata_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_24).serialize_yyhs7n_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_90().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !equals(value.titles_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.titles_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !equals(value.creators_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, tmp2_cached[1], value.creators_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !equals(value.languages_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, tmp2_cached[2], value.languages_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !equals(value.descriptions_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 3, tmp2_cached[3], value.descriptions_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !equals(value.identifiers_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 4, tmp2_cached[4], value.identifiers_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !equals(value.metas_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 5, tmp2_cached[5], value.metas_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_24).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_yyhs7n_k$(encoder, value instanceof Metadata ? value : THROW_CCE());
  };
  var $serializer_instance_24;
  function $serializer_getInstance_34() {
    if ($serializer_instance_24 == null)
      new $serializer_24();
    return $serializer_instance_24;
  }
  function Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_34().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.titles_1 = emptyList();
    else
      $this.titles_1 = titles;
    if (0 === (seen1 & 2))
      $this.creators_1 = emptyList();
    else
      $this.creators_1 = creators;
    if (0 === (seen1 & 4))
      $this.languages_1 = emptyList();
    else
      $this.languages_1 = languages;
    if (0 === (seen1 & 8))
      $this.descriptions_1 = emptyList();
    else
      $this.descriptions_1 = descriptions;
    if (0 === (seen1 & 16))
      $this.identifiers_1 = emptyList();
    else
      $this.identifiers_1 = identifiers;
    if (0 === (seen1 & 32))
      $this.metas_1 = emptyList();
    else
      $this.metas_1 = metas;
    return $this;
  }
  function Metadata_init_$Create$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker) {
    return Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, objectCreate(protoOf(Metadata)));
  }
  function Metadata(titles, creators, languages, descriptions, identifiers, metas) {
    Companion_getInstance_90();
    titles = titles === VOID ? emptyList() : titles;
    creators = creators === VOID ? emptyList() : creators;
    languages = languages === VOID ? emptyList() : languages;
    descriptions = descriptions === VOID ? emptyList() : descriptions;
    identifiers = identifiers === VOID ? emptyList() : identifiers;
    metas = metas === VOID ? emptyList() : metas;
    this.titles_1 = titles;
    this.creators_1 = creators;
    this.languages_1 = languages;
    this.descriptions_1 = descriptions;
    this.identifiers_1 = identifiers;
    this.metas_1 = metas;
  }
  protoOf(Metadata).get_titles_jyr0o4_k$ = function () {
    return this.titles_1;
  };
  protoOf(Metadata).get_creators_1p3nn4_k$ = function () {
    return this.creators_1;
  };
  protoOf(Metadata).get_languages_xmhugi_k$ = function () {
    return this.languages_1;
  };
  protoOf(Metadata).get_descriptions_r8c98g_k$ = function () {
    return this.descriptions_1;
  };
  protoOf(Metadata).get_identifiers_yibrlr_k$ = function () {
    return this.identifiers_1;
  };
  protoOf(Metadata).get_metas_iv5yhx_k$ = function () {
    return this.metas_1;
  };
  function Companion_30() {
    Companion_instance_30 = this;
    this.NS_OPF_1 = 'http://www.idpf.org/2007/opf';
    this.NS_DC_1 = 'http://purl.org/dc/elements/1.1/';
  }
  protoOf(Companion_30).get_NS_OPF_1mjvv8_k$ = function () {
    return this.NS_OPF_1;
  };
  protoOf(Companion_30).get_NS_DC_idse1c_k$ = function () {
    return this.NS_DC_1;
  };
  protoOf(Companion_30).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_35();
  };
  var Companion_instance_30;
  function Companion_getInstance_91() {
    if (Companion_instance_30 == null)
      new Companion_30();
    return Companion_instance_30;
  }
  function $serializer_25() {
    $serializer_instance_25 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.PackageDocument', this, 5);
    tmp0_serialDesc.addElement_5pzumi_k$('version', true);
    tmp0_serialDesc.addElement_5pzumi_k$('uniqueIdentifier', true);
    tmp0_serialDesc.pushAnnotation_fm15ho_k$(new XmlSerialName('unique-identifier'));
    tmp0_serialDesc.addElement_5pzumi_k$('metadata', true);
    tmp0_serialDesc.addElement_5pzumi_k$('manifest', true);
    tmp0_serialDesc.addElement_5pzumi_k$('spine', true);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('package', 'http://www.idpf.org/2007/opf'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_25).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_25).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), $serializer_getInstance_34(), $serializer_getInstance_32(), $serializer_getInstance_36()];
  };
  protoOf($serializer_25).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp9_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp9_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_34(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, $serializer_getInstance_32(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 4, $serializer_getInstance_36(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_34(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, $serializer_getInstance_32(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 4, $serializer_getInstance_36(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.endStructure_1xqz0n_k$(tmp0_desc);
    return PackageDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_25).serialize_trrhod_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.version_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.version_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.uniqueIdentifier_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.uniqueIdentifier_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !equals(value.metadata_1, new Metadata())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, $serializer_getInstance_34(), value.metadata_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !equals(value.manifest_1, new Manifest())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 3, $serializer_getInstance_32(), value.manifest_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !equals(value.spine_1, new Spine())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 4, $serializer_getInstance_36(), value.spine_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_25).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_trrhod_k$(encoder, value instanceof PackageDocument ? value : THROW_CCE());
  };
  var $serializer_instance_25;
  function $serializer_getInstance_35() {
    if ($serializer_instance_25 == null)
      new $serializer_25();
    return $serializer_instance_25;
  }
  function PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_35().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.version_1 = null;
    else
      $this.version_1 = version;
    if (0 === (seen1 & 2))
      $this.uniqueIdentifier_1 = '';
    else
      $this.uniqueIdentifier_1 = uniqueIdentifier;
    if (0 === (seen1 & 4))
      $this.metadata_1 = new Metadata();
    else
      $this.metadata_1 = metadata;
    if (0 === (seen1 & 8))
      $this.manifest_1 = new Manifest();
    else
      $this.manifest_1 = manifest;
    if (0 === (seen1 & 16))
      $this.spine_1 = new Spine();
    else
      $this.spine_1 = spine;
    return $this;
  }
  function PackageDocument_init_$Create$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker) {
    return PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, objectCreate(protoOf(PackageDocument)));
  }
  function PackageDocument(version, uniqueIdentifier, metadata, manifest, spine) {
    Companion_getInstance_91();
    version = version === VOID ? null : version;
    uniqueIdentifier = uniqueIdentifier === VOID ? '' : uniqueIdentifier;
    metadata = metadata === VOID ? new Metadata() : metadata;
    manifest = manifest === VOID ? new Manifest() : manifest;
    spine = spine === VOID ? new Spine() : spine;
    this.version_1 = version;
    this.uniqueIdentifier_1 = uniqueIdentifier;
    this.metadata_1 = metadata;
    this.manifest_1 = manifest;
    this.spine_1 = spine;
  }
  protoOf(PackageDocument).get_version_72w4j3_k$ = function () {
    return this.version_1;
  };
  protoOf(PackageDocument).get_uniqueIdentifier_m720bn_k$ = function () {
    return this.uniqueIdentifier_1;
  };
  protoOf(PackageDocument).get_metadata_vs95vc_k$ = function () {
    return this.metadata_1;
  };
  protoOf(PackageDocument).get_manifest_tn5zpk_k$ = function () {
    return this.manifest_1;
  };
  protoOf(PackageDocument).get_spine_iynj22_k$ = function () {
    return this.spine_1;
  };
  protoOf(PackageDocument).uniqueIdentifierContent_srtiv3_k$ = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.metadata_1.get_identifiers_yibrlr_k$().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.uniqueIdentifierContent.<anonymous>' call
        if (element.get_id_kntnx8_k$() === this.uniqueIdentifier_1) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_content_h02jrk_k$();
  };
  protoOf(PackageDocument).coverItem_wqhune_k$ = function () {
    var whitespaceRegex = Regex_init_$Create$('\\s+');
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.manifest_1.get_items_it823b_k$().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp0_safe_receiver = element.get_properties_zhllqc_k$();
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          // Inline function 'kotlin.text.split' call
          tmp = whitespaceRegex.split_p7ck23_k$(tmp0_safe_receiver, 0);
        }
        var tmp1_safe_receiver = tmp;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.contains_aljjnj_k$('cover-image');
        if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$2;
    var tmp_0;
    if (tmp2_elvis_lhs_0 == null) {
      var tmp$ret$4;
      $l$block_0: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.metadata_1.get_metas_iv5yhx_k$().iterator_jk1svi_k$();
        while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
          var element_0 = tmp0_iterator_0.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
          if (element_0.get_name_woqyms_k$() === 'cover') {
            tmp$ret$4 = element_0;
            break $l$block_0;
          }
        }
        tmp$ret$4 = null;
      }
      var tmp0_safe_receiver_0 = tmp$ret$4;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_content_h02jrk_k$();
      var tmp_1;
      if (tmp1_safe_receiver_0 == null) {
        tmp_1 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp$ret$6;
        $l$block_1: {
          // Inline function 'kotlin.collections.firstOrNull' call
          var tmp0_iterator_1 = this.manifest_1.get_items_it823b_k$().iterator_jk1svi_k$();
          while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
            var element_1 = tmp0_iterator_1.next_20eer_k$();
            // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>.<anonymous>' call
            if (element_1.get_id_kntnx8_k$() === tmp1_safe_receiver_0) {
              tmp$ret$6 = element_1;
              break $l$block_1;
            }
          }
          tmp$ret$6 = null;
        }
        tmp_1 = tmp$ret$6;
      }
      tmp_0 = tmp_1;
    } else {
      tmp_0 = tmp2_elvis_lhs_0;
    }
    return tmp_0;
  };
  protoOf(PackageDocument).tableOfContentItem_201g7t_k$ = function () {
    var whiteSpaceRegex = Regex_init_$Create$('\\s+');
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.manifest_1.get_items_it823b_k$();
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp0_safe_receiver = element.get_properties_zhllqc_k$();
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.text.split' call
        tmp = whiteSpaceRegex.split_p7ck23_k$(tmp0_safe_receiver, 0);
      }
      var tmp1_safe_receiver = tmp;
      var tmp_0;
      if (tmp1_safe_receiver == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_0 = tmp1_safe_receiver.contains_aljjnj_k$('toc') ? true : tmp1_safe_receiver.contains_aljjnj_k$('nav');
      }
      var tmp2_elvis_lhs = tmp_0;
      if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
        destination.add_utx5q5_k$(element);
      }
    }
    var tocCandidates = destination;
    var tmp0_safe_receiver_0 = this.spine_1.get_toc_18ivc1_k$();
    var tmp_1;
    if (tmp0_safe_receiver_0 == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp$ret$7;
      $l$block: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.manifest_1.get_items_it823b_k$().iterator_jk1svi_k$();
        while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
          var element_0 = tmp0_iterator_0.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
          if (element_0.get_id_kntnx8_k$() === tmp0_safe_receiver_0) {
            tmp$ret$7 = element_0;
            break $l$block;
          }
        }
        tmp$ret$7 = null;
      }
      var tmp0_safe_receiver_1 = tmp$ret$7;
      var tmp_2;
      if (tmp0_safe_receiver_1 == null) {
        tmp_2 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_2 = listOf_0(tmp0_safe_receiver_1);
      }
      var tmp1_elvis_lhs = tmp_2;
      tmp_1 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    }
    var tmp1_elvis_lhs_0 = tmp_1;
    var spineNcxCandidate = tmp1_elvis_lhs_0 == null ? emptyList() : tmp1_elvis_lhs_0;
    var allTocCandidates = plus(tocCandidates, spineNcxCandidate);
    var tmp$ret$13;
    $l$block_0: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_1 = allTocCandidates.iterator_jk1svi_k$();
      while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
        var element_1 = tmp0_iterator_1.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
        var tmp0_safe_receiver_2 = element_1.get_properties_zhllqc_k$();
        var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : contains(tmp0_safe_receiver_2, 'nav');
        if (tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1) {
          tmp$ret$13 = element_1;
          break $l$block_0;
        }
      }
      tmp$ret$13 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$13;
    return tmp2_elvis_lhs_0 == null ? firstOrNull(allTocCandidates) : tmp2_elvis_lhs_0;
  };
  function _get_$childSerializers__r2zwns_6($this) {
    return $this.$childSerializers_1;
  }
  function Companion_31() {
    Companion_instance_31 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_31()), null];
  }
  protoOf(Companion_31).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_36();
  };
  var Companion_instance_31;
  function Companion_getInstance_92() {
    if (Companion_instance_31 == null)
      new Companion_31();
    return Companion_instance_31;
  }
  function $serializer_26() {
    $serializer_instance_26 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Spine', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('itemRefs', true);
    tmp0_serialDesc.addElement_5pzumi_k$('toc', true);
    tmp0_serialDesc.pushClassAnnotation_xtmllk_k$(new XmlSerialName('spine', 'http://www.idpf.org/2007/opf'));
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_26).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_26).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_92().$childSerializers_1[0], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_26).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp7_cached = Companion_getInstance_92().$childSerializers_1;
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Spine_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_26).serialize_unkwtb_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_92().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !equals(value.itemRefs_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.itemRefs_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.toc_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, StringSerializer_getInstance(), value.toc_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_26).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_unkwtb_k$(encoder, value instanceof Spine ? value : THROW_CCE());
  };
  var $serializer_instance_26;
  function $serializer_getInstance_36() {
    if ($serializer_instance_26 == null)
      new $serializer_26();
    return $serializer_instance_26;
  }
  function Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_36().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.itemRefs_1 = emptyList();
    else
      $this.itemRefs_1 = itemRefs;
    if (0 === (seen1 & 2))
      $this.toc_1 = null;
    else
      $this.toc_1 = toc;
    return $this;
  }
  function Spine_init_$Create$(seen1, itemRefs, toc, serializationConstructorMarker) {
    return Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, objectCreate(protoOf(Spine)));
  }
  function Spine(itemRefs, toc) {
    Companion_getInstance_92();
    itemRefs = itemRefs === VOID ? emptyList() : itemRefs;
    toc = toc === VOID ? null : toc;
    this.itemRefs_1 = itemRefs;
    this.toc_1 = toc;
  }
  protoOf(Spine).get_itemRefs_cbwsw4_k$ = function () {
    return this.itemRefs_1;
  };
  protoOf(Spine).get_toc_18ivc1_k$ = function () {
    return this.toc_1;
  };
  function _get_$childSerializers__r2zwns_7($this) {
    return $this.$childSerializers_1;
  }
  function Companion_32() {
    Companion_instance_32 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_38())];
  }
  protoOf(Companion_32).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_37();
  };
  var Companion_instance_32;
  function Companion_getInstance_93() {
    if (Companion_instance_32 == null)
      new Companion_32();
    return Companion_instance_32;
  }
  function $serializer_27() {
    $serializer_instance_27 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifest', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('version', false);
    tmp0_serialDesc.addElement_5pzumi_k$('metadata', false);
    tmp0_serialDesc.addElement_5pzumi_k$('entries', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_27).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_27).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_93().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), tmp0_cached[1], tmp0_cached[2]];
  };
  protoOf($serializer_27).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp8_cached = Companion_getInstance_93().$childSerializers_1;
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ContentManifest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_27).serialize_8ai50b_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_93().$childSerializers_1;
    tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 0, value.version_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, tmp2_cached[1], value.metadata_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, tmp2_cached[2], value.entries_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_27).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_8ai50b_k$(encoder, value instanceof ContentManifest ? value : THROW_CCE());
  };
  var $serializer_instance_27;
  function $serializer_getInstance_37() {
    if ($serializer_instance_27 == null)
      new $serializer_27();
    return $serializer_instance_27;
  }
  function ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_37().descriptor_1);
    }
    $this.version_1 = version;
    $this.metadata_1 = metadata;
    $this.entries_1 = entries;
    return $this;
  }
  function ContentManifest_init_$Create$(seen1, version, metadata, entries, serializationConstructorMarker) {
    return ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, objectCreate(protoOf(ContentManifest)));
  }
  function ContentManifest(version, metadata, entries) {
    Companion_getInstance_93();
    this.version_1 = version;
    this.metadata_1 = metadata;
    this.entries_1 = entries;
  }
  protoOf(ContentManifest).get_version_72w4j3_k$ = function () {
    return this.version_1;
  };
  protoOf(ContentManifest).get_metadata_vs95vc_k$ = function () {
    return this.metadata_1;
  };
  protoOf(ContentManifest).get_entries_p20ztl_k$ = function () {
    return this.entries_1;
  };
  protoOf(ContentManifest).component1_7eebsc_k$ = function () {
    return this.version_1;
  };
  protoOf(ContentManifest).component2_7eebsb_k$ = function () {
    return this.metadata_1;
  };
  protoOf(ContentManifest).component3_7eebsa_k$ = function () {
    return this.entries_1;
  };
  protoOf(ContentManifest).copy_hx6qb9_k$ = function (version, metadata, entries) {
    return new ContentManifest(version, metadata, entries);
  };
  protoOf(ContentManifest).copy$default_y6ssg2_k$ = function (version, metadata, entries, $super) {
    version = version === VOID ? this.version_1 : version;
    metadata = metadata === VOID ? this.metadata_1 : metadata;
    entries = entries === VOID ? this.entries_1 : entries;
    return $super === VOID ? this.copy_hx6qb9_k$(version, metadata, entries) : $super.copy_hx6qb9_k$.call(this, version, metadata, entries);
  };
  protoOf(ContentManifest).toString = function () {
    return 'ContentManifest(version=' + this.version_1 + ', metadata=' + this.metadata_1 + ', entries=' + this.entries_1 + ')';
  };
  protoOf(ContentManifest).hashCode = function () {
    var result = this.version_1;
    result = imul(result, 31) + hashCode(this.metadata_1) | 0;
    result = imul(result, 31) + hashCode(this.entries_1) | 0;
    return result;
  };
  protoOf(ContentManifest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentManifest))
      return false;
    var tmp0_other_with_cast = other instanceof ContentManifest ? other : THROW_CCE();
    if (!(this.version_1 === tmp0_other_with_cast.version_1))
      return false;
    if (!equals(this.metadata_1, tmp0_other_with_cast.metadata_1))
      return false;
    if (!equals(this.entries_1, tmp0_other_with_cast.entries_1))
      return false;
    return true;
  };
  function _get_$childSerializers__r2zwns_8($this) {
    return $this.$childSerializers_1;
  }
  function Companion_33() {
    Companion_instance_33 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, null, null, null, null, new StringValuesSerializer(), new StringValuesSerializer(), null];
  }
  protoOf(Companion_33).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_38();
  };
  var Companion_instance_33;
  function Companion_getInstance_94() {
    if (Companion_instance_33 == null)
      new Companion_33();
    return Companion_instance_33;
  }
  function $serializer_28() {
    $serializer_instance_28 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifestEntry', this, 9);
    tmp0_serialDesc.addElement_5pzumi_k$('uri', false);
    tmp0_serialDesc.addElement_5pzumi_k$('storageSize', false);
    tmp0_serialDesc.addElement_5pzumi_k$('ignoreQueryParams', true);
    tmp0_serialDesc.addElement_5pzumi_k$('status', true);
    tmp0_serialDesc.addElement_5pzumi_k$('method', true);
    tmp0_serialDesc.addElement_5pzumi_k$('integrity', false);
    tmp0_serialDesc.addElement_5pzumi_k$('requestHeaders', true);
    tmp0_serialDesc.addElement_5pzumi_k$('responseHeaders', false);
    tmp0_serialDesc.addElement_5pzumi_k$('bodyDataUrl', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_28).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_28).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_94().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), LongSerializer_getInstance(), BooleanSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[6], tmp0_cached[7], StringSerializer_getInstance()];
  };
  protoOf($serializer_28).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = false;
    var tmp7_local3 = 0;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp14_cached = Companion_getInstance_94().$childSerializers_1;
    if (tmp13_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.decodeIntElement_941u6a_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.decodeIntElement_941u6a_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.decodeStringElement_3oenpg_k$(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ContentManifestEntry_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_28).serialize_70kwef_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_94().$childSerializers_1;
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.uri_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 1, value.storageSize_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.ignoreQueryParams_1 === true)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 2, value.ignoreQueryParams_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.status_1 === 200)) {
      tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 3, value.status_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.method_1 === 'GET')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 4, value.method_1);
    }
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 5, value.integrity_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !equals(value.requestHeaders_1, emptyStringValues())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 6, tmp2_cached[6], value.requestHeaders_1);
    }
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 7, tmp2_cached[7], value.responseHeaders_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 8, value.bodyDataUrl_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_28).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_70kwef_k$(encoder, value instanceof ContentManifestEntry ? value : THROW_CCE());
  };
  var $serializer_instance_28;
  function $serializer_getInstance_38() {
    if ($serializer_instance_28 == null)
      new $serializer_28();
    return $serializer_instance_28;
  }
  function ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, $this) {
    if (!(419 === (419 & seen1))) {
      throwMissingFieldException(seen1, 419, $serializer_getInstance_38().descriptor_1);
    }
    $this.uri_1 = uri;
    $this.storageSize_1 = storageSize;
    if (0 === (seen1 & 4))
      $this.ignoreQueryParams_1 = true;
    else
      $this.ignoreQueryParams_1 = ignoreQueryParams;
    if (0 === (seen1 & 8))
      $this.status_1 = 200;
    else
      $this.status_1 = status;
    if (0 === (seen1 & 16))
      $this.method_1 = 'GET';
    else
      $this.method_1 = method;
    $this.integrity_1 = integrity;
    if (0 === (seen1 & 64))
      $this.requestHeaders_1 = emptyStringValues();
    else
      $this.requestHeaders_1 = requestHeaders;
    $this.responseHeaders_1 = responseHeaders;
    $this.bodyDataUrl_1 = bodyDataUrl;
    return $this;
  }
  function ContentManifestEntry_init_$Create$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker) {
    return ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, objectCreate(protoOf(ContentManifestEntry)));
  }
  function ContentManifestEntry(uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl) {
    Companion_getInstance_94();
    ignoreQueryParams = ignoreQueryParams === VOID ? true : ignoreQueryParams;
    status = status === VOID ? 200 : status;
    method = method === VOID ? 'GET' : method;
    requestHeaders = requestHeaders === VOID ? emptyStringValues() : requestHeaders;
    this.uri_1 = uri;
    this.storageSize_1 = storageSize;
    this.ignoreQueryParams_1 = ignoreQueryParams;
    this.status_1 = status;
    this.method_1 = method;
    this.integrity_1 = integrity;
    this.requestHeaders_1 = requestHeaders;
    this.responseHeaders_1 = responseHeaders;
    this.bodyDataUrl_1 = bodyDataUrl;
  }
  protoOf(ContentManifestEntry).get_uri_18iuil_k$ = function () {
    return this.uri_1;
  };
  protoOf(ContentManifestEntry).get_storageSize_579o6r_k$ = function () {
    return this.storageSize_1;
  };
  protoOf(ContentManifestEntry).get_ignoreQueryParams_l3ov4j_k$ = function () {
    return this.ignoreQueryParams_1;
  };
  protoOf(ContentManifestEntry).get_status_jnf6d7_k$ = function () {
    return this.status_1;
  };
  protoOf(ContentManifestEntry).get_method_gl8esq_k$ = function () {
    return this.method_1;
  };
  protoOf(ContentManifestEntry).get_integrity_gnxvok_k$ = function () {
    return this.integrity_1;
  };
  protoOf(ContentManifestEntry).get_requestHeaders_ftdgjk_k$ = function () {
    return this.requestHeaders_1;
  };
  protoOf(ContentManifestEntry).get_responseHeaders_8cfgtg_k$ = function () {
    return this.responseHeaders_1;
  };
  protoOf(ContentManifestEntry).get_bodyDataUrl_aaulfq_k$ = function () {
    return this.bodyDataUrl_1;
  };
  function Companion_34() {
    Companion_instance_34 = this;
  }
  protoOf(Companion_34).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_39();
  };
  var Companion_instance_34;
  function Companion_getInstance_95() {
    if (Companion_instance_34 == null)
      new Companion_34();
    return Companion_instance_34;
  }
  function $serializer_29() {
    $serializer_instance_29 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.SubtitleTrack', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('uri', false);
    tmp0_serialDesc.addElement_5pzumi_k$('mimeType', false);
    tmp0_serialDesc.addElement_5pzumi_k$('langCode', false);
    tmp0_serialDesc.addElement_5pzumi_k$('title', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_29).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_29).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_29).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return SubtitleTrack_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_29).serialize_bf3vid_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.uri_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.mimeType_1);
    tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.langCode_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 3, value.title_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_29).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_bf3vid_k$(encoder, value instanceof SubtitleTrack ? value : THROW_CCE());
  };
  var $serializer_instance_29;
  function $serializer_getInstance_39() {
    if ($serializer_instance_29 == null)
      new $serializer_29();
    return $serializer_instance_29;
  }
  function SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_39().descriptor_1);
    }
    $this.uri_1 = uri;
    $this.mimeType_1 = mimeType;
    $this.langCode_1 = langCode;
    $this.title_1 = title;
    return $this;
  }
  function SubtitleTrack_init_$Create$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker) {
    return SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, objectCreate(protoOf(SubtitleTrack)));
  }
  function SubtitleTrack(uri, mimeType, langCode, title) {
    Companion_getInstance_95();
    this.uri_1 = uri;
    this.mimeType_1 = mimeType;
    this.langCode_1 = langCode;
    this.title_1 = title;
  }
  protoOf(SubtitleTrack).get_uri_18iuil_k$ = function () {
    return this.uri_1;
  };
  protoOf(SubtitleTrack).get_mimeType_g7ccbb_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(SubtitleTrack).get_langCode_ciluis_k$ = function () {
    return this.langCode_1;
  };
  protoOf(SubtitleTrack).get_title_iz32un_k$ = function () {
    return this.title_1;
  };
  protoOf(SubtitleTrack).component1_7eebsc_k$ = function () {
    return this.uri_1;
  };
  protoOf(SubtitleTrack).component2_7eebsb_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(SubtitleTrack).component3_7eebsa_k$ = function () {
    return this.langCode_1;
  };
  protoOf(SubtitleTrack).component4_7eebs9_k$ = function () {
    return this.title_1;
  };
  protoOf(SubtitleTrack).copy_ejfscs_k$ = function (uri, mimeType, langCode, title) {
    return new SubtitleTrack(uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).copy$default_x58nby_k$ = function (uri, mimeType, langCode, title, $super) {
    uri = uri === VOID ? this.uri_1 : uri;
    mimeType = mimeType === VOID ? this.mimeType_1 : mimeType;
    langCode = langCode === VOID ? this.langCode_1 : langCode;
    title = title === VOID ? this.title_1 : title;
    return $super === VOID ? this.copy_ejfscs_k$(uri, mimeType, langCode, title) : $super.copy_ejfscs_k$.call(this, uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).toString = function () {
    return 'SubtitleTrack(uri=' + this.uri_1 + ', mimeType=' + this.mimeType_1 + ', langCode=' + this.langCode_1 + ', title=' + this.title_1 + ')';
  };
  protoOf(SubtitleTrack).hashCode = function () {
    var result = getStringHashCode(this.uri_1);
    result = imul(result, 31) + getStringHashCode(this.mimeType_1) | 0;
    result = imul(result, 31) + (this.langCode_1 == null ? 0 : getStringHashCode(this.langCode_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.title_1) | 0;
    return result;
  };
  protoOf(SubtitleTrack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleTrack))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleTrack ? other : THROW_CCE();
    if (!(this.uri_1 === tmp0_other_with_cast.uri_1))
      return false;
    if (!(this.mimeType_1 === tmp0_other_with_cast.mimeType_1))
      return false;
    if (!(this.langCode_1 == tmp0_other_with_cast.langCode_1))
      return false;
    if (!(this.title_1 === tmp0_other_with_cast.title_1))
      return false;
    return true;
  };
  function InvalidContentException(message, cause) {
    cause = cause === VOID ? null : cause;
    IllegalArgumentException_init_$Init$(message, cause, this);
    captureStack(this, InvalidContentException);
  }
  function Companion_35() {
    Companion_instance_35 = this;
    this.UPLOAD_TMP_PROTO_NAME_1 = 'upload-tmp';
    this.UPLOAD_TMP_LOCATOR_PREFIX_1 = 'upload-tmp:///';
  }
  protoOf(Companion_35).get_UPLOAD_TMP_PROTO_NAME_y57q2n_k$ = function () {
    return this.UPLOAD_TMP_PROTO_NAME_1;
  };
  protoOf(Companion_35).get_UPLOAD_TMP_LOCATOR_PREFIX_2yu9k8_k$ = function () {
    return this.UPLOAD_TMP_LOCATOR_PREFIX_1;
  };
  protoOf(Companion_35).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_40();
  };
  var Companion_instance_35;
  function Companion_getInstance_96() {
    if (Companion_instance_35 == null)
      new Companion_35();
    return Companion_instance_35;
  }
  function $serializer_30() {
    $serializer_instance_30 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentjob.MetadataResult', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('entry', false);
    tmp0_serialDesc.addElement_5pzumi_k$('importerId', false);
    tmp0_serialDesc.addElement_5pzumi_k$('originalFilename', true);
    tmp0_serialDesc.addElement_5pzumi_k$('picture', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_30).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_30).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_3(), IntSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_4())];
  };
  protoOf($serializer_30).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeIntElement_941u6a_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeIntElement_941u6a_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return MetadataResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_30).serialize_prtjlk_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, $serializer_getInstance_3(), value.entry_1);
    tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 1, value.importerId_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.originalFilename_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.originalFilename_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.picture_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, $serializer_getInstance_4(), value.picture_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_30).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_prtjlk_k$(encoder, value instanceof MetadataResult ? value : THROW_CCE());
  };
  var $serializer_instance_30;
  function $serializer_getInstance_40() {
    if ($serializer_instance_30 == null)
      new $serializer_30();
    return $serializer_instance_30;
  }
  function MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_40().descriptor_1);
    }
    $this.entry_1 = entry;
    $this.importerId_1 = importerId;
    if (0 === (seen1 & 4))
      $this.originalFilename_1 = null;
    else
      $this.originalFilename_1 = originalFilename;
    if (0 === (seen1 & 8))
      $this.picture_1 = null;
    else
      $this.picture_1 = picture;
    return $this;
  }
  function MetadataResult_init_$Create$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker) {
    return MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, objectCreate(protoOf(MetadataResult)));
  }
  function MetadataResult(entry, importerId, originalFilename, picture) {
    Companion_getInstance_96();
    originalFilename = originalFilename === VOID ? null : originalFilename;
    picture = picture === VOID ? null : picture;
    this.entry_1 = entry;
    this.importerId_1 = importerId;
    this.originalFilename_1 = originalFilename;
    this.picture_1 = picture;
  }
  protoOf(MetadataResult).get_entry_iqxd1l_k$ = function () {
    return this.entry_1;
  };
  protoOf(MetadataResult).get_importerId_ezdm52_k$ = function () {
    return this.importerId_1;
  };
  protoOf(MetadataResult).get_originalFilename_a9k85b_k$ = function () {
    return this.originalFilename_1;
  };
  protoOf(MetadataResult).get_picture_8af27f_k$ = function () {
    return this.picture_1;
  };
  protoOf(MetadataResult).component1_7eebsc_k$ = function () {
    return this.entry_1;
  };
  protoOf(MetadataResult).component2_7eebsb_k$ = function () {
    return this.importerId_1;
  };
  protoOf(MetadataResult).component3_7eebsa_k$ = function () {
    return this.originalFilename_1;
  };
  protoOf(MetadataResult).component4_7eebs9_k$ = function () {
    return this.picture_1;
  };
  protoOf(MetadataResult).copy_xi3if8_k$ = function (entry, importerId, originalFilename, picture) {
    return new MetadataResult(entry, importerId, originalFilename, picture);
  };
  protoOf(MetadataResult).copy$default_1vomj1_k$ = function (entry, importerId, originalFilename, picture, $super) {
    entry = entry === VOID ? this.entry_1 : entry;
    importerId = importerId === VOID ? this.importerId_1 : importerId;
    originalFilename = originalFilename === VOID ? this.originalFilename_1 : originalFilename;
    picture = picture === VOID ? this.picture_1 : picture;
    return $super === VOID ? this.copy_xi3if8_k$(entry, importerId, originalFilename, picture) : $super.copy_xi3if8_k$.call(this, entry, importerId, originalFilename, picture);
  };
  protoOf(MetadataResult).toString = function () {
    return 'MetadataResult(entry=' + this.entry_1 + ', importerId=' + this.importerId_1 + ', originalFilename=' + this.originalFilename_1 + ', picture=' + this.picture_1 + ')';
  };
  protoOf(MetadataResult).hashCode = function () {
    var result = this.entry_1.hashCode();
    result = imul(result, 31) + this.importerId_1 | 0;
    result = imul(result, 31) + (this.originalFilename_1 == null ? 0 : getStringHashCode(this.originalFilename_1)) | 0;
    result = imul(result, 31) + (this.picture_1 == null ? 0 : this.picture_1.hashCode()) | 0;
    return result;
  };
  protoOf(MetadataResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MetadataResult))
      return false;
    var tmp0_other_with_cast = other instanceof MetadataResult ? other : THROW_CCE();
    if (!this.entry_1.equals(tmp0_other_with_cast.entry_1))
      return false;
    if (!(this.importerId_1 === tmp0_other_with_cast.importerId_1))
      return false;
    if (!(this.originalFilename_1 == tmp0_other_with_cast.originalFilename_1))
      return false;
    if (!equals(this.picture_1, tmp0_other_with_cast.picture_1))
      return false;
    return true;
  };
  function TerminologyKeys() {
    TerminologyKeys_instance = this;
    this.TEACHER_KEY_1 = 'Teacher';
    this.STUDENT_KEY_1 = 'Student';
    this.TEACHERS_KEY_1 = 'Teachers';
    this.STUDENTS_KEY_1 = 'Students';
    this.ADD_TEACHER_KEY_1 = 'AddTeacher';
    this.ADD_STUDENT_KEY_1 = 'AddStudent';
    this.TERMINOLOGY_ENTRY_MESSAGE_ID_1 = mapOf([to('Teacher', strings_getInstance().get_teacher_mjj6rr_k$()), to('Student', strings_getInstance().get_student_tt8o8e_k$()), to('Teachers', strings_getInstance().get_teachers_literal_n9taeu_k$()), to('Students', strings_getInstance().get_students_s05gf_k$()), to('AddTeacher', strings_getInstance().get_add_a_teacher_ujexqb_k$()), to('AddStudent', strings_getInstance().get_add_a_student_x7zms6_k$())]);
  }
  protoOf(TerminologyKeys).get_TEACHER_KEY_5xsyxl_k$ = function () {
    return this.TEACHER_KEY_1;
  };
  protoOf(TerminologyKeys).get_STUDENT_KEY_hfe8qa_k$ = function () {
    return this.STUDENT_KEY_1;
  };
  protoOf(TerminologyKeys).get_TEACHERS_KEY_t5mqcm_k$ = function () {
    return this.TEACHERS_KEY_1;
  };
  protoOf(TerminologyKeys).get_STUDENTS_KEY_s5vkin_k$ = function () {
    return this.STUDENTS_KEY_1;
  };
  protoOf(TerminologyKeys).get_ADD_TEACHER_KEY_x9in4r_k$ = function () {
    return this.ADD_TEACHER_KEY_1;
  };
  protoOf(TerminologyKeys).get_ADD_STUDENT_KEY_qa051o_k$ = function () {
    return this.ADD_STUDENT_KEY_1;
  };
  protoOf(TerminologyKeys).get_TERMINOLOGY_ENTRY_MESSAGE_ID_oku5f9_k$ = function () {
    return this.TERMINOLOGY_ENTRY_MESSAGE_ID_1;
  };
  var TerminologyKeys_instance;
  function TerminologyKeys_getInstance() {
    if (TerminologyKeys_instance == null)
      new TerminologyKeys();
    return TerminologyKeys_instance;
  }
  function ValidateUsernameUseCase() {
  }
  protoOf(ValidateUsernameUseCase).invoke_lt562m_k$ = function (username) {
    var isValid = true;
    // Inline function 'kotlin.text.isEmpty' call
    if (charSequenceLength(username) === 0) {
      isValid = false;
    }
    if (isValid) {
      if (contains(username, ' ')) {
        isValid = false;
      }
    }
    if (isValid) {
      var usernameChars = toCharArray(username);
      var inductionVariable = 1;
      // Inline function 'kotlin.collections.count' call
      var last = usernameChars.length;
      if (inductionVariable < last)
        do {
          var i = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          if (isUpperCase(usernameChars[i])) {
            isValid = false;
          }
        }
         while (inductionVariable < last);
    }
    return isValid;
  };
  function _get_dataLayer__43yv12_0($this) {
    return $this.dataLayer_1;
  }
  function $invokeCOROUTINE$10(_this__u8e3s4, destUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.destUri_1 = destUri;
  }
  protoOf($invokeCOROUTINE$10).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.dataLayer_1.get_localDb_6v18ps_k$().siteDao_yq9qyz_k$().getSiteAsync_wzkaej_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.localDbSiteEntity0__1 = suspendResult;
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp0_safe_receiver = this._this__u8e3s4__1.dataLayer_1.get_repository_c37cur_k$();
            tmp_0.tmp1_safe_receiver2__1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.siteDao_yq9qyz_k$();
            if (this.tmp1_safe_receiver2__1 == null) {
              this.WHEN_RESULT3__1 = null;
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.tmp1_safe_receiver2__1.getSiteAsync_wzkaej_k$(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.WHEN_RESULT3__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            var tmp2_safe_receiver = this.WHEN_RESULT3__1;
            this.TRY_RESULT1__1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_registrationAllowed_lhz77q_k$();
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_1 = this.get_exception_x0n6w6_k$();
            if (tmp_1 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_2 = this;
              Napier_getInstance().d$default_a5agxr_k$('GetRegistrationAllowedUseCase: Error occurred: ' + e.message, e);
              var tmp3_safe_receiver = this.localDbSiteEntity0__1;
              tmp_2.TRY_RESULT1__1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_registrationAllowed_lhz77q_k$();
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 5:
            this.set_exceptionState_fex74n_k$(6);
            return this.TRY_RESULT1__1;
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  function CheckRegistrationAllowedUseCase(dataLayer) {
    this.dataLayer_1 = dataLayer;
  }
  protoOf(CheckRegistrationAllowedUseCase).invoke_wdlpwn_k$ = function (destUri, $completion) {
    var tmp = new $invokeCOROUTINE$10(this, destUri, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function CreateNewLocalAccountUseCase$invoke$slambda$lambda() {
    return 'Local';
  }
  function CreateNewLocalAccountUseCase$invoke$slambda$lambda_0() {
    return 'User';
  }
  function _get_di__ndbzja($this) {
    return $this.di_1;
  }
  function NewLocalAccountResult(learningSpace, person) {
    this.learningSpace_1 = learningSpace;
    this.person_1 = person;
  }
  protoOf(NewLocalAccountResult).get_learningSpace_sz4skh_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(NewLocalAccountResult).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(NewLocalAccountResult).component1_7eebsc_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(NewLocalAccountResult).component2_7eebsb_k$ = function () {
    return this.person_1;
  };
  protoOf(NewLocalAccountResult).copy_g9jhjt_k$ = function (learningSpace, person) {
    return new NewLocalAccountResult(learningSpace, person);
  };
  protoOf(NewLocalAccountResult).copy$default_bbybcc_k$ = function (learningSpace, person, $super) {
    learningSpace = learningSpace === VOID ? this.learningSpace_1 : learningSpace;
    person = person === VOID ? this.person_1 : person;
    return $super === VOID ? this.copy_g9jhjt_k$(learningSpace, person) : $super.copy_g9jhjt_k$.call(this, learningSpace, person);
  };
  protoOf(NewLocalAccountResult).toString = function () {
    return 'NewLocalAccountResult(learningSpace=' + this.learningSpace_1 + ', person=' + this.person_1 + ')';
  };
  protoOf(NewLocalAccountResult).hashCode = function () {
    var result = this.learningSpace_1.hashCode();
    result = imul(result, 31) + this.person_1.hashCode() | 0;
    return result;
  };
  protoOf(NewLocalAccountResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NewLocalAccountResult))
      return false;
    var tmp0_other_with_cast = other instanceof NewLocalAccountResult ? other : THROW_CCE();
    if (!this.learningSpace_1.equals(tmp0_other_with_cast.learningSpace_1))
      return false;
    if (!this.person_1.equals(tmp0_other_with_cast.person_1))
      return false;
    return true;
  };
  function CreateNewLocalAccountUseCase$invoke$slambda($dataLayer, $person, $addNewPersonUseCase, $localLearningSpace, resultContinuation) {
    this.$dataLayer_1 = $dataLayer;
    this.$person_1 = $person;
    this.$addNewPersonUseCase_1 = $addNewPersonUseCase;
    this.$localLearningSpace_1 = $localLearningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CreateNewLocalAccountUseCase$invoke$slambda).invoke_zi7ttx_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CreateNewLocalAccountUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_zi7ttx_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CreateNewLocalAccountUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = new Site();
            this_0.set_siteName_c1yqeg_k$('Local Site');
            this_0.set_authSalt_nuc2o4_k$('local_' + randomString(10));
            tmp_0.newSite0__1 = this_0;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$dataLayer_1.get_localDb_6v18ps_k$().siteDao_yq9qyz_k$().insertAsync_nsnxyg_k$(this.newSite0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp0_elvis_lhs = this.$person_1.get_username_ytz5i7_k$();
            var tmp_2 = tmp0_elvis_lhs == null ? 'localuser' : tmp0_elvis_lhs;
            var tmp1_safe_receiver = this.$person_1.get_firstNames_n3o3y7_k$();
            var tmp_3;
            if (tmp1_safe_receiver == null) {
              tmp_3 = null;
            } else {
              tmp_3 = ifNullOrBlank(tmp1_safe_receiver, CreateNewLocalAccountUseCase$invoke$slambda$lambda);
            }

            var tmp_4 = tmp_3;
            var tmp2_safe_receiver = this.$person_1.get_lastName_f360wa_k$();
            var tmp_5;
            if (tmp2_safe_receiver == null) {
              tmp_5 = null;
            } else {
              tmp_5 = ifNullOrBlank(tmp2_safe_receiver, CreateNewLocalAccountUseCase$invoke$slambda$lambda_0);
            }

            tmp_1.newPerson1__1 = this.$person_1.copy$default_dax7qe_k$(VOID, tmp_2, tmp_4, tmp_5, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_getInstance_7().get_TYPE_NORMAL_PERSON_mzt6gh_k$());
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.$addNewPersonUseCase_1.invoke$default_4vs5qw_k$(this.newPerson1__1, VOID, VOID, PermissionFlags_getInstance().get_ALL_18jy08_k$(), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var personUid = suspendResult;
            return new NewLocalAccountResult(this.$localLearningSpace_1, this.newPerson1__1.copy$default_dax7qe_k$(personUid));
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CreateNewLocalAccountUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new CreateNewLocalAccountUseCase$invoke$slambda(this.$dataLayer_1, this.$person_1, this.$addNewPersonUseCase_1, this.$localLearningSpace_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CreateNewLocalAccountUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CreateNewLocalAccountUseCase$invoke$slambda_0($dataLayer, $person, $addNewPersonUseCase, $localLearningSpace, resultContinuation) {
    var i = new CreateNewLocalAccountUseCase$invoke$slambda($dataLayer, $person, $addNewPersonUseCase, $localLearningSpace, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_zi7ttx_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CreateNewLocalAccountUseCase(di) {
    this.di_1 = di;
  }
  protoOf(CreateNewLocalAccountUseCase).invoke_bbhaqk_k$ = function (person, $completion) {
    var localLearningSpace = new LearningSpace('http://' + uuid4() + '.local/');
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_0 = this.di_1;
    var trigger = this_0.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.invoke_4wgfc3_k$(tmp$ret$0, localLearningSpace);
    var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
    var tmp_1 = get_direct(tmp$ret$2).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var dataLayer = tmp_1.Instance_vwdrk9_k$(tmp$ret$3, null);
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_1 = this.di_1;
    var trigger_0 = this_1.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_3 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$6 = tmp_3.invoke_4wgfc3_k$(tmp$ret$5, localLearningSpace);
    var tmp$ret$7 = On(this_1, tmp$ret$6, trigger_0);
    var tmp_5 = get_direct(tmp$ret$7).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var addNewPersonUseCase = tmp_5.Instance_vwdrk9_k$(tmp$ret$8, null);
    var tmp_7 = dataLayer.get_localDb_6v18ps_k$();
    return withDoorTransactionAsync(tmp_7, VOID, CreateNewLocalAccountUseCase$invoke$slambda_0(dataLayer, person, addNewPersonUseCase, localLearningSpace, null), $completion);
  };
  function SetPasswordUseCase() {
  }
  function AccountIsNotSubmitterException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AccountIsNotSubmitterException);
  }
  function AssignmentAlreadySubmittedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentAlreadySubmittedException);
  }
  function AssignmentDeadlinePassedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentDeadlinePassedException);
  }
  function AssignmentTextTooLongException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentTextTooLongException);
  }
  function AssignmentSubmissionException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, AssignmentSubmissionException);
  }
  function _get_systemImpl__e3uvek($this) {
    return $this.systemImpl_1;
  }
  function SubmitAssignmentResult(submission) {
    this.submission_1 = submission;
  }
  protoOf(SubmitAssignmentResult).get_submission_gidiad_k$ = function () {
    return this.submission_1;
  };
  protoOf(SubmitAssignmentResult).component1_7eebsc_k$ = function () {
    return this.submission_1;
  };
  protoOf(SubmitAssignmentResult).copy_ixe4zv_k$ = function (submission) {
    return new SubmitAssignmentResult(submission);
  };
  protoOf(SubmitAssignmentResult).copy$default_fgimnp_k$ = function (submission, $super) {
    submission = submission === VOID ? this.submission_1 : submission;
    return $super === VOID ? this.copy_ixe4zv_k$(submission) : $super.copy_ixe4zv_k$.call(this, submission);
  };
  protoOf(SubmitAssignmentResult).toString = function () {
    return 'SubmitAssignmentResult(submission=' + this.submission_1 + ')';
  };
  protoOf(SubmitAssignmentResult).hashCode = function () {
    return this.submission_1 == null ? 0 : this.submission_1.hashCode();
  };
  protoOf(SubmitAssignmentResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubmitAssignmentResult))
      return false;
    var tmp0_other_with_cast = other instanceof SubmitAssignmentResult ? other : THROW_CCE();
    if (!equals(this.submission_1, tmp0_other_with_cast.submission_1))
      return false;
    return true;
  };
  function SubmitAssignmentUseCase$invoke$lambda($assignmentUid, $submitterUid, $accountPersonUid, $assignment) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_casAssignmentUid_munb2r_k$($assignmentUid);
      $this$shallowCopy.set_casSubmitterUid_oas9nj_k$($submitterUid);
      $this$shallowCopy.set_casSubmitterPersonUid_ow553o_k$($accountPersonUid);
      $this$shallowCopy.set_casTimestamp_rwaz4w_k$(systemTimeInMillis());
      $this$shallowCopy.set_casClazzUid_apjj5a_k$($assignment.get_caClazzUid_wf7rj5_k$());
      return Unit_getInstance();
    };
  }
  function $invokeCOROUTINE$11(_this__u8e3s4, repo, submitterUid, assignmentUid, accountPersonUid, submission, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.repo_1 = repo;
    this.submitterUid_1 = submitterUid;
    this.assignmentUid_1 = assignmentUid;
    this.accountPersonUid_1 = accountPersonUid;
    this.submission_1 = submission;
  }
  protoOf($invokeCOROUTINE$11).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            if (this.submitterUid_1.equals(new Long(0, 0)))
              throw new AccountIsNotSubmitterException('Not a valid submitter');
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.repo_1.clazzAssignmentDao_ta4cfn_k$().findByUidWithBlockAsync_naj0zk_k$(this.assignmentUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_elvis_lhs0__1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.tmp0_elvis_lhs0__1 == null) {
              throw IllegalArgumentException_init_$Create$('Could not find assignment uid ' + this.assignmentUid_1.toString());
            } else {
              tmp_1 = this.tmp0_elvis_lhs0__1;
            }

            tmp_0.assignmentAndBlock1__1 = tmp_1;
            var tmp_2 = this;
            var tmp1_elvis_lhs = this.assignmentAndBlock1__1.get_block_ip8l7o_k$();
            var tmp_3;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('Could not load courseblock');
            } else {
              tmp_3 = tmp1_elvis_lhs;
            }

            tmp_2.courseBlock2__1 = tmp_3;
            var tmp_4 = this;
            var tmp2_elvis_lhs = this.assignmentAndBlock1__1.get_assignment_378p7u_k$();
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('assignment cannot be null');
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_4.assignment3__1 = tmp_5;
            if (this.assignment3__1.get_caSubmissionPolicy_6vp9k5_k$() === Companion_getInstance_10().get_SUBMISSION_POLICY_SUBMIT_ALL_AT_ONCE_iohkb_k$()) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.repo_1.courseAssignmentSubmissionDao_y3yq7y_k$().doesUserHaveSubmissions_taptgb_k$(this.accountPersonUid_1, this.assignmentUid_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT4__1 = false;
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.WHEN_RESULT4__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            if (this.WHEN_RESULT4__1) {
              throw new AssignmentAlreadySubmittedException(this._this__u8e3s4__1.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_already_submitted_4pnd1x_k$()));
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 4:
            if (lastPossibleSubmissionTime(this.courseBlock2__1).compareTo_9jj042_k$(systemTimeInMillis()) < 0) {
              throw new AssignmentDeadlinePassedException(this._this__u8e3s4__1.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_deadline_has_passed_2edwml_k$()));
            }

            if (this.assignment3__1.get_caRequireTextSubmission_bngh2v_k$()) {
              if (this.assignment3__1.get_caTextLimitType_w5xj27_k$() === Companion_getInstance_10().get_TEXT_WORD_LIMIT_v2fc7j_k$()) {
                var tmp3_safe_receiver = this.submission_1.get_casText_afmdvd_k$();
                var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : htmlToPlainText(tmp3_safe_receiver);
                var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : countWords(tmp4_safe_receiver);
                var wordCount = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
                if (wordCount > this.assignment3__1.get_caTextLimit_vdw8ex_k$()) {
                  throw new AssignmentTextTooLongException(this._this__u8e3s4__1.systemImpl_1.formatString_qr9zmw_k$(strings_getInstance().get_exceeds_word_limit_bsm4oh_k$(), [wordCount.toString(), this.assignment3__1.get_caTextLimit_vdw8ex_k$().toString()]));
                }
              } else if (this.assignment3__1.get_caTextLimitType_w5xj27_k$() === Companion_getInstance_10().get_TEXT_CHAR_LIMIT_kt4qmz_k$()) {
                var tmp6_safe_receiver = this.submission_1.get_casText_afmdvd_k$();
                var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : htmlToPlainText(tmp6_safe_receiver);
                var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.length;
                var charCount = tmp8_elvis_lhs == null ? 0 : tmp8_elvis_lhs;
                if (charCount > this.assignment3__1.get_caTextLimit_vdw8ex_k$()) {
                  throw new AssignmentTextTooLongException(this._this__u8e3s4__1.systemImpl_1.formatString_qr9zmw_k$(strings_getInstance().get_exceeds_char_limit_m1wq91_k$(), [charCount.toString(), this.assignment3__1.get_caTextLimit_vdw8ex_k$().toString()]));
                }
              }
            }

            var tmp_6 = this;
            tmp_6.submissionToSave5__1 = shallowCopy_0(this.submission_1, SubmitAssignmentUseCase$invoke$lambda(this.assignmentUid_1, this.submitterUid_1, this.accountPersonUid_1, this.assignment3__1));
            Napier_getInstance().d$default_a5agxr_k$('SubmitAssignmentUseCase: save to repo for submitterUid=' + this.submitterUid_1.toString() + ' assignmentUid=' + this.assignmentUid_1.toString());
            this.set_state_rjd8d0_k$(5);
            suspendResult = this.repo_1.courseAssignmentSubmissionDao_y3yq7y_k$().insertAsync(this.submissionToSave5__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return new SubmitAssignmentResult(this.submissionToSave5__1);
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function SubmitAssignmentUseCase(systemImpl) {
    this.systemImpl_1 = systemImpl;
  }
  protoOf(SubmitAssignmentUseCase).invoke_fjkoiw_k$ = function (repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion) {
    var tmp = new $invokeCOROUTINE$11(this, repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function _get_repo__dd1xjt($this) {
    return $this.repo_1;
  }
  function _get_learningSpace__h4keh($this) {
    return $this.learningSpace_1;
  }
  function _get_createXapiGroupUseCase__hpejv9($this) {
    return $this.createXapiGroupUseCase_1;
  }
  function _get_xapiStatementResource__4vzu96($this) {
    return $this.xapiStatementResource_1;
  }
  function _get_xxStringHasher__b5lnen($this) {
    return $this.xxStringHasher_1;
  }
  function _get_json__d8whur_0($this) {
    return $this.json_1;
  }
  function SubmitMarkUseCase$invoke$lambda($assignment, $submitterUid, $activeUserSubmitterUid, $activeUserPerson, $courseBlock, $clazzUid, $applyPenalty) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_camAssignmentUid_j3ay0j_k$($assignment.get_caUid_ipktt5_k$());
      $this$shallowCopy.set_camSubmitterUid_kl6od7_k$($submitterUid);
      $this$shallowCopy.set_camMarkerSubmitterUid_eboa5x_k$($activeUserSubmitterUid);
      $this$shallowCopy.set_camMarkerPersonUid_xbe3hr_k$($activeUserPerson.get_personUid_mmhd76_k$());
      var tmp0_elvis_lhs = $courseBlock.get_cbMaxPoints_s83kbl_k$();
      $this$shallowCopy.set_camMaxMark_ahvi6h_k$(tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
      $this$shallowCopy.set_camClazzUid_408elw_k$($clazzUid);
      var tmp;
      if ($applyPenalty) {
        $this$shallowCopy.set_camPenalty_f53gbz_k$(roundTo($this$shallowCopy.get_camMark_ac72ab_k$() * ($courseBlock.get_cbLateSubmissionPenalty_1lsxv5_k$() / 100.0), 2));
        $this$shallowCopy.set_camMark_87svl5_k$($this$shallowCopy.get_camMark_ac72ab_k$() - $this$shallowCopy.get_camPenalty_ch6xtp_k$());
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    this.this$0__1 = this$0;
    this.$stmt_1 = $stmt;
    this.$activeUserPerson_1 = $activeUserPerson;
    this.$courseBlock_1 = $courseBlock;
    this.$instructorActorToPersonUidMap_1 = $instructorActorToPersonUidMap;
    this.$actorToPersonUidMap_1 = $actorToPersonUidMap;
    this.$clazzUid_1 = $clazzUid;
    this.$activityId_1 = $activityId;
    this.$markToRecord_1 = $markToRecord;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubmitMarkUseCase$invoke$slambda).invoke_3n1s9y_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_3n1s9y_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.registrationUuid0__1 = uuid4();
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = listOf_0(this.$stmt_1);
            var tmp0_xseAccountPersonUid = this.$activeUserPerson_1.get_personUid_mmhd76_k$();
            var tmp1_xseAccountUsername = ensureNotNull(this.$activeUserPerson_1.get_username_ytz5i7_k$());
            var tmp2_xseCbUid = this.$courseBlock_1.get_cbUid_iplgso_k$();
            var tmp3_xseRegistrationHi = this.registrationUuid0__1.get_mostSignificantBits_50ugdp_k$();
            var tmp4_xseRegistrationLo = this.registrationUuid0__1.get_leastSignificantBits_mmkdbt_k$();
            var tmp5_knownActorUidToPersonUids = this.this$0__1.json_1.encodeToString_k0apqx_k$(MapSerializer(serializer_1(Companion_getInstance_11()), serializer_1(Companion_getInstance_11())), plus_0(this.$instructorActorToPersonUidMap_1, this.$actorToPersonUidMap_1));
            suspendResult = this.this$0__1.xapiStatementResource_1.post_c9pbaj_k$(tmp_0, new XapiSessionEntity(VOID, VOID, tmp3_xseRegistrationHi, tmp4_xseRegistrationLo, VOID, tmp0_xseAccountPersonUid, VOID, tmp1_xseAccountUsername, this.$clazzUid_1, tmp2_xseCbUid, VOID, VOID, this.$activityId_1, VOID, VOID, VOID, VOID, VOID, tmp5_knownActorUidToPersonUids), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.repo_1.courseAssignmentMarkDao_6irrq5_k$().insertAsync(this.$markToRecord_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new SubmitMarkUseCase$invoke$slambda(this.this$0__1, this.$stmt_1, this.$activeUserPerson_1, this.$courseBlock_1, this.$instructorActorToPersonUidMap_1, this.$actorToPersonUidMap_1, this.$clazzUid_1, this.$activityId_1, this.$markToRecord_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SubmitMarkUseCase$invoke$slambda_0(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    var i = new SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_3n1s9y_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$12(_this__u8e3s4, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.activeUserPerson_1 = activeUserPerson;
    this.assignment_1 = assignment;
    this.clazzUid_1 = clazzUid;
    this.submitterUid_1 = submitterUid;
    this.draftMark_1 = draftMark;
    this.submissions_1 = submissions;
    this.courseBlock_1 = courseBlock;
  }
  protoOf($invokeCOROUTINE$12).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(8);
            var tmp_0 = this;
            var tmp_1;
            if (!this.submissions_1.isEmpty_y1axqb_k$()) {
              var iterator = this.submissions_1.iterator_jk1svi_k$();
              if (!iterator.hasNext_bitz1p_k$())
                throw NoSuchElementException_init_$Create$();
              var maxValue = iterator.next_20eer_k$().get_casTimestamp_n6jb3q_k$();
              while (iterator.hasNext_bitz1p_k$()) {
                var v = iterator.next_20eer_k$().get_casTimestamp_n6jb3q_k$();
                if (compareTo(maxValue, v) < 0) {
                  maxValue = v;
                }
              }
              tmp_1 = maxValue.compareTo_9jj042_k$(this.courseBlock_1.get_cbDeadlineDate_nvh1aq_k$()) > 0;
            } else {
              tmp_1 = false;
            }

            tmp_0.applyPenalty0__1 = tmp_1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.repo_1.clazzAssignmentDao_ta4cfn_k$().getSubmitterUid_tp5cym_k$(this.assignment_1.get_caUid_ipktt5_k$(), this.clazzUid_1, this.activeUserPerson_1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.activeUserSubmitterUid1__1 = suspendResult;
            if (this.assignment_1.get_caGroupUid_zf52s8_k$().equals(new Long(0, 0)) ? true : this.assignment_1.get_caMarkingType_qumoa0_k$() === Companion_getInstance_10().get_MARKED_BY_COURSE_LEADER_54s4gf_k$()) {
              var tmp_2 = this;
              var activeUserPersonXapiAgent = toXapiAgent(this.activeUserPerson_1, this._this__u8e3s4__1.learningSpace_1);
              tmp_2.WHEN_RESULT2__1 = to(activeUserPersonXapiAgent, mapOf_0(to(identifierHash(activeUserPersonXapiAgent, this._this__u8e3s4__1.xxStringHasher_1), this.activeUserPerson_1.get_personUid_mmhd76_k$())));
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this._this__u8e3s4__1.createXapiGroupUseCase_1.invoke_s9aiv8_k$(this.assignment_1.get_caGroupUid_zf52s8_k$(), this.activeUserSubmitterUid1__1.toInt_1tsl84_k$(), this.assignment_1.get_caClazzUid_wf7rj5_k$(), this.assignment_1.get_caUid_ipktt5_k$(), this.activeUserPerson_1.get_personUid_mmhd76_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.this3__1 = suspendResult;
            var tmp_3 = this;
            var it = this.this3__1;
            tmp_3.WHEN_RESULT2__1 = to(it.get_group_is3eja_k$(), it.get_actorUidToPersonUidMap_2t0lds_k$());
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.tmp0_container4__1 = this.WHEN_RESULT2__1;
            this.instructorActor5__1 = this.tmp0_container4__1.component1_7eebsc_k$();
            this.instructorActorToPersonUidMap6__1 = this.tmp0_container4__1.component2_7eebsb_k$();
            if (this.assignment_1.get_caGroupUid_zf52s8_k$().equals(new Long(0, 0))) {
              this.set_state_rjd8d0_k$(5);
              suspendResult = this._this__u8e3s4__1.repo_1.personDao_e3y77h_k$().findByUidAsync_uxf6ac_k$(this.submitterUid_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              suspendResult = this._this__u8e3s4__1.createXapiGroupUseCase_1.invoke_s9aiv8_k$(this.assignment_1.get_caGroupUid_zf52s8_k$(), this.submitterUid_1.toInt_1tsl84_k$(), this.assignment_1.get_caClazzUid_wf7rj5_k$(), this.assignment_1.get_caUid_ipktt5_k$(), this.activeUserPerson_1.get_personUid_mmhd76_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.this8__1 = suspendResult;
            var tmp_4 = this;
            var it_0 = this.this8__1;
            tmp_4.WHEN_RESULT7__1 = to(it_0.get_group_is3eja_k$(), it_0.get_actorUidToPersonUidMap_2t0lds_k$());
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 5:
            this.tmp1_safe_receiver9__1 = suspendResult;
            this.tmp2_elvis_lhs10__1 = this.tmp1_safe_receiver9__1 == null ? null : toXapiAgent(this.tmp1_safe_receiver9__1, this._this__u8e3s4__1.learningSpace_1);
            var tmp_5 = this;
            var tmp_6;
            if (this.tmp2_elvis_lhs10__1 == null) {
              throw IllegalStateException_init_$Create$('Could not find person for ' + this.submitterUid_1.toString());
            } else {
              tmp_6 = this.tmp2_elvis_lhs10__1;
            }

            tmp_5.stmtActor11__1 = tmp_6;
            this.WHEN_RESULT7__1 = to(this.stmtActor11__1, mapOf_0(to(identifierHash(this.stmtActor11__1, this._this__u8e3s4__1.xxStringHasher_1), this.submitterUid_1)));
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 6:
            this.tmp3_container12__1 = this.WHEN_RESULT7__1;
            this.statementActor13__1 = this.tmp3_container12__1.component1_7eebsc_k$();
            this.actorToPersonUidMap14__1 = this.tmp3_container12__1.component2_7eebsb_k$();
            var tmp_7 = this;
            tmp_7.markToRecord15__1 = shallowCopy_1(this.draftMark_1, SubmitMarkUseCase$invoke$lambda(this.assignment_1, this.submitterUid_1, this.activeUserSubmitterUid1__1, this.activeUserPerson_1, this.courseBlock_1, this.clazzUid_1, this.applyPenalty0__1));
            var tmp_8 = this;
            var tmp4_viewName = Companion_getInstance_181().get_DEST_NAME_gmgk7z_k$();
            var tmp5_learningSpace = this._this__u8e3s4__1.learningSpace_1.get_url_18iuii_k$();
            var tmp6_queryString = toQueryString(mapOf([to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString()), to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), this.assignment_1.get_caUid_ipktt5_k$().toString())]));
            tmp_8.activityId16__1 = (new UstadUrlComponents(tmp5_learningSpace, tmp4_viewName, tmp6_queryString)).fullUrl$default_i1ngok_k$();
            var tmp_9 = this;
            var tmp7_verb = new XapiVerb(get_VERB_COMPLETED());
            var tmp8_object = new XapiActivityStatementObject(XapiObjectType_Activity_getInstance(), this.activityId16__1);
            var tmp9_context = new XapiContext(this.instructorActor5__1);
            var tmp10_result = new XapiResult(true, true, new Score(this.markToRecord15__1.get_camMark_ac72ab_k$() / this.markToRecord15__1.get_camMaxMark_cropvv_k$(), this.markToRecord15__1.get_camMark_ac72ab_k$(), 0.0, this.markToRecord15__1.get_camMaxMark_cropvv_k$()));
            tmp_9.stmt17__1 = new XapiStatement(VOID, this.statementActor13__1, tmp7_verb, tmp8_object, tmp10_result, tmp9_context);
            this.set_state_rjd8d0_k$(7);
            suspendResult = withDoorTransactionAsync(this._this__u8e3s4__1.repo_1, VOID, SubmitMarkUseCase$invoke$slambda_0(this._this__u8e3s4__1, this.stmt17__1, this.activeUserPerson_1, this.courseBlock_1, this.instructorActorToPersonUidMap6__1, this.actorToPersonUidMap14__1, this.clazzUid_1, this.activityId16__1, this.markToRecord15__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            return Unit_getInstance();
          case 8:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 8) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function SubmitMarkUseCase(repo, learningSpace, createXapiGroupUseCase, xapiStatementResource, xxStringHasher, json) {
    this.repo_1 = repo;
    this.learningSpace_1 = learningSpace;
    this.createXapiGroupUseCase_1 = createXapiGroupUseCase;
    this.xapiStatementResource_1 = xapiStatementResource;
    this.xxStringHasher_1 = xxStringHasher;
    this.json_1 = json;
  }
  protoOf(SubmitMarkUseCase).invoke_91peif_k$ = function (activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion) {
    var tmp = new $invokeCOROUTINE$12(this, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).invoke_np0iit_k$ = function (value, $completion) {
    var tmp = this.create_2tir2f_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_np0iit_k$((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform1__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value2__1 = this.value_1;
            var tmp0_safe_receiver = this.value2__1;
            if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_firstNames_n3o3y7_k$()) == null)) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = this.$this$unsafeTransform1__1.emit_t92u1f_k$(this.value2__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 2:
            if (false) {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 3:
            this.tmp$ret$00__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).create_2tir2f_k$ = function (value, completion) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_2tir2f_k$((value == null ? true : value instanceof PersonNames) ? value : THROW_CCE(), completion);
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_np0iit_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$14(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$14).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_0(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function _get_repo__dd1xjt_0($this) {
    return $this.repo_1;
  }
  function _get_systemImpl__e3uvek_0($this) {
    return $this.systemImpl_1;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function _no_name_provided__qut3iv($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv).collect_oipv2n_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$14(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_oipv2n_k$(collector, $completion);
  };
  function $invokeCOROUTINE$13(_this__u8e3s4, submitterUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.submitterUid_1 = submitterUid;
  }
  protoOf($invokeCOROUTINE$13).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (this.submitterUid_1.compareTo_9jj042_k$(toLong(Companion_getInstance_12().get_MIN_SUBMITTER_UID_FOR_PERSON_uk2rru_k$())) < 0) {
              var tmp_0 = this;
              tmp_0.WHEN_RESULT0__1 = this._this__u8e3s4__1.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_group_is3eja_k$()) + ' ' + this.submitterUid_1.toString();
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              var this_0 = this._this__u8e3s4__1.repo_1.personDao_e3y77h_k$().getNamesByUid_owsdl3_k$(this.submitterUid_1);
              suspendResult = first(new _no_name_provided__qut3iv(this_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            var it = suspendResult;
            var tmp_2 = it == null ? null : it.get_firstNames_n3o3y7_k$();
            tmp_1.WHEN_RESULT0__1 = '' + tmp_2 + ' ' + (it == null ? null : it.get_lastName_f360wa_k$());
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT0__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function GetAssignmentSubmitterNameUseCase(repo, systemImpl) {
    this.repo_1 = repo;
    this.systemImpl_1 = systemImpl;
  }
  protoOf(GetAssignmentSubmitterNameUseCase).invoke_3dl2hf_k$ = function (submitterUid, $completion) {
    var tmp = new $invokeCOROUTINE$13(this, submitterUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function CancelDownloadUseCase() {
  }
  function EnqueueContentManifestDownloadUseCase() {
  }
  function _get_repo__dd1xjt_1($this) {
    return $this.repo_1;
  }
  function _get_nodeIdAndAuth__l0lh1t($this) {
    return $this.nodeIdAndAuth_1;
  }
  function _get_enqueueContentManifestDownloadUseCase__eopi9u($this) {
    return $this.enqueueContentManifestDownloadUseCase_1;
  }
  function MakeContentEntryAvailableOfflineUseCase$invoke$slambda(this$0, $contentEntryUid, $latestContentEntryVersion, resultContinuation) {
    this.this$0__1 = this$0;
    this.$contentEntryUid_1 = $contentEntryUid;
    this.$latestContentEntryVersion_1 = $latestContentEntryVersion;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MakeContentEntryAvailableOfflineUseCase$invoke$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(MakeContentEntryAvailableOfflineUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MakeContentEntryAvailableOfflineUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.repo_1.offlineItemDao_rdbxlw_k$().insertAsync_ylto1p_k$(new OfflineItem(VOID, this.this$0__1.nodeIdAndAuth_1.get_nodeId_h7ho7a_k$(), VOID, VOID, this.$contentEntryUid_1, true), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.offlineItemUid0__1 = suspendResult;
            if (!(this.$latestContentEntryVersion_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.enqueueContentManifestDownloadUseCase_1.invoke_vbh80v_k$(this.$latestContentEntryVersion_1.get_cevUid_but2lh_k$(), this.offlineItemUid0__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(MakeContentEntryAvailableOfflineUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new MakeContentEntryAvailableOfflineUseCase$invoke$slambda(this.this$0__1, this.$contentEntryUid_1, this.$latestContentEntryVersion_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(MakeContentEntryAvailableOfflineUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function MakeContentEntryAvailableOfflineUseCase$invoke$slambda_0(this$0, $contentEntryUid, $latestContentEntryVersion, resultContinuation) {
    var i = new MakeContentEntryAvailableOfflineUseCase$invoke$slambda(this$0, $contentEntryUid, $latestContentEntryVersion, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$15(_this__u8e3s4, contentEntryUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.contentEntryUid_1 = contentEntryUid;
  }
  protoOf($invokeCOROUTINE$15).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.repo_1.contentEntryVersionDao_66n0fn_k$().findLatestVersionUidByContentEntryUidEntity_a61tgv_k$(this.contentEntryUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.latestContentEntryVersion0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = withDoorTransactionAsync(this._this__u8e3s4__1.repo_1, VOID, MakeContentEntryAvailableOfflineUseCase$invoke$slambda_0(this._this__u8e3s4__1, this.contentEntryUid_1, this.latestContentEntryVersion0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function MakeContentEntryAvailableOfflineUseCase(repo, nodeIdAndAuth, enqueueContentManifestDownloadUseCase) {
    this.repo_1 = repo;
    this.nodeIdAndAuth_1 = nodeIdAndAuth;
    this.enqueueContentManifestDownloadUseCase_1 = enqueueContentManifestDownloadUseCase;
  }
  protoOf(MakeContentEntryAvailableOfflineUseCase).invoke_gc8owv_k$ = function (contentEntryUid, $completion) {
    var tmp = new $invokeCOROUTINE$15(this, contentEntryUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function OpenBlobItem(uri, mimeType, fileName, fileSize) {
    this.uri_1 = uri;
    this.mimeType_1 = mimeType;
    this.fileName_1 = fileName;
    this.fileSize_1 = fileSize;
  }
  protoOf(OpenBlobItem).get_uri_18iuil_k$ = function () {
    return this.uri_1;
  };
  protoOf(OpenBlobItem).get_mimeType_g7ccbb_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(OpenBlobItem).get_fileName_r258mo_k$ = function () {
    return this.fileName_1;
  };
  protoOf(OpenBlobItem).get_fileSize_r28lt2_k$ = function () {
    return this.fileSize_1;
  };
  protoOf(OpenBlobItem).component1_7eebsc_k$ = function () {
    return this.uri_1;
  };
  protoOf(OpenBlobItem).component2_7eebsb_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(OpenBlobItem).component3_7eebsa_k$ = function () {
    return this.fileName_1;
  };
  protoOf(OpenBlobItem).component4_7eebs9_k$ = function () {
    return this.fileSize_1;
  };
  protoOf(OpenBlobItem).copy_rkanc9_k$ = function (uri, mimeType, fileName, fileSize) {
    return new OpenBlobItem(uri, mimeType, fileName, fileSize);
  };
  protoOf(OpenBlobItem).copy$default_3r12ou_k$ = function (uri, mimeType, fileName, fileSize, $super) {
    uri = uri === VOID ? this.uri_1 : uri;
    mimeType = mimeType === VOID ? this.mimeType_1 : mimeType;
    fileName = fileName === VOID ? this.fileName_1 : fileName;
    fileSize = fileSize === VOID ? this.fileSize_1 : fileSize;
    return $super === VOID ? this.copy_rkanc9_k$(uri, mimeType, fileName, fileSize) : $super.copy_rkanc9_k$.call(this, uri, mimeType, fileName, fileSize);
  };
  protoOf(OpenBlobItem).toString = function () {
    return 'OpenBlobItem(uri=' + this.uri_1 + ', mimeType=' + this.mimeType_1 + ', fileName=' + this.fileName_1 + ', fileSize=' + this.fileSize_1.toString() + ')';
  };
  protoOf(OpenBlobItem).hashCode = function () {
    var result = getStringHashCode(this.uri_1);
    result = imul(result, 31) + getStringHashCode(this.mimeType_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.fileName_1) | 0;
    result = imul(result, 31) + this.fileSize_1.hashCode() | 0;
    return result;
  };
  protoOf(OpenBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpenBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof OpenBlobItem ? other : THROW_CCE();
    if (!(this.uri_1 === tmp0_other_with_cast.uri_1))
      return false;
    if (!(this.mimeType_1 === tmp0_other_with_cast.mimeType_1))
      return false;
    if (!(this.fileName_1 === tmp0_other_with_cast.fileName_1))
      return false;
    if (!this.fileSize_1.equals(tmp0_other_with_cast.fileSize_1))
      return false;
    return true;
  };
  function _get_systemImpl__e3uvek_1($this) {
    return $this.systemImpl_1;
  }
  function OpenBlobUiUseCase$invoke$lambda($onUiUpdate, $openItem) {
    return function (transferred, total) {
      $onUiUpdate(new OpeningBlobState($openItem, transferred, total));
      return Unit_getInstance();
    };
  }
  function $invokeCOROUTINE$16(_this__u8e3s4, openItem, onUiUpdate, intent, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.openItem_1 = openItem;
    this.onUiUpdate_1 = onUiUpdate;
    this.intent_1 = intent;
  }
  protoOf($invokeCOROUTINE$16).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.onUiUpdate_1(new OpeningBlobState(this.openItem_1, new Long(0, 0), new Long(0, 0)));
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.openBlobUseCase_1.invoke_euk202_k$(this.openItem_1, OpenBlobUiUseCase$invoke$lambda(this.onUiUpdate_1, this.openItem_1), this.intent_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.onUiUpdate_1(null);
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              Napier_getInstance().w$default_p42du4_k$('OpenBlobUiCase: could not open ' + this.openItem_1, e);
              if (!(e instanceof CancellationException)) {
                var tmp_1 = new Long(0, 0);
                var tmp_2 = new Long(0, 0);
                var tmp0_elvis_lhs = e.message;
                this.onUiUpdate_1(new OpeningBlobState(this.openItem_1, tmp_1, tmp_2, tmp0_elvis_lhs == null ? this._this__u8e3s4__1.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) : tmp0_elvis_lhs));
              }
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            this.set_exceptionState_fex74n_k$(4);
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  function OpenBlobUiUseCase(openBlobUseCase, systemImpl) {
    this.openBlobUseCase_1 = openBlobUseCase;
    this.systemImpl_1 = systemImpl;
  }
  protoOf(OpenBlobUiUseCase).get_openBlobUseCase_soy3yx_k$ = function () {
    return this.openBlobUseCase_1;
  };
  protoOf(OpenBlobUiUseCase).invoke_thxto7_k$ = function (openItem, onUiUpdate, intent, $completion) {
    var tmp = new $invokeCOROUTINE$16(this, openItem, onUiUpdate, intent, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(OpenBlobUiUseCase).invoke$default_bkm375_k$ = function (openItem, onUiUpdate, intent, $completion, $super) {
    intent = intent === VOID ? OpenBlobIntent_VIEW_getInstance() : intent;
    return $super === VOID ? this.invoke_thxto7_k$(openItem, onUiUpdate, intent, $completion) : $super.invoke_thxto7_k$.call(this, openItem, onUiUpdate, intent, $completion);
  };
  var OpenBlobIntent_VIEW_instance;
  var OpenBlobIntent_SEND_instance;
  function values_0() {
    return [OpenBlobIntent_VIEW_getInstance(), OpenBlobIntent_SEND_getInstance()];
  }
  function valueOf(value) {
    switch (value) {
      case 'VIEW':
        return OpenBlobIntent_VIEW_getInstance();
      case 'SEND':
        return OpenBlobIntent_SEND_getInstance();
      default:
        OpenBlobIntent_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries() {
    if ($ENTRIES == null)
      $ENTRIES = enumEntries(values_0());
    return $ENTRIES;
  }
  var OpenBlobIntent_entriesInitialized;
  function OpenBlobIntent_initEntries() {
    if (OpenBlobIntent_entriesInitialized)
      return Unit_getInstance();
    OpenBlobIntent_entriesInitialized = true;
    OpenBlobIntent_VIEW_instance = new OpenBlobIntent('VIEW', 0);
    OpenBlobIntent_SEND_instance = new OpenBlobIntent('SEND', 1);
  }
  var $ENTRIES;
  function OpenBlobIntent(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function OpenBlobUseCase$invoke$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_getInstance();
  }
  function OpenBlobIntent_VIEW_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_VIEW_instance;
  }
  function OpenBlobIntent_SEND_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_SEND_instance;
  }
  function OpenBlobUseCase() {
  }
  function OpeningBlobState(item, bytesReady, totalBytes, error) {
    error = error === VOID ? null : error;
    this.item_1 = item;
    this.bytesReady_1 = bytesReady;
    this.totalBytes_1 = totalBytes;
    this.error_1 = error;
  }
  protoOf(OpeningBlobState).get_item_woo5lo_k$ = function () {
    return this.item_1;
  };
  protoOf(OpeningBlobState).get_bytesReady_2ngqdd_k$ = function () {
    return this.bytesReady_1;
  };
  protoOf(OpeningBlobState).get_totalBytes_wa2n74_k$ = function () {
    return this.totalBytes_1;
  };
  protoOf(OpeningBlobState).get_error_iqzvfj_k$ = function () {
    return this.error_1;
  };
  protoOf(OpeningBlobState).get_progress_mo5qeu_k$ = function () {
    return this.bytesReady_1.toFloat_jhbgwv_k$() / this.totalBytes_1.toFloat_jhbgwv_k$();
  };
  protoOf(OpeningBlobState).component1_7eebsc_k$ = function () {
    return this.item_1;
  };
  protoOf(OpeningBlobState).component2_7eebsb_k$ = function () {
    return this.bytesReady_1;
  };
  protoOf(OpeningBlobState).component3_7eebsa_k$ = function () {
    return this.totalBytes_1;
  };
  protoOf(OpeningBlobState).component4_7eebs9_k$ = function () {
    return this.error_1;
  };
  protoOf(OpeningBlobState).copy_6rw8ud_k$ = function (item, bytesReady, totalBytes, error) {
    return new OpeningBlobState(item, bytesReady, totalBytes, error);
  };
  protoOf(OpeningBlobState).copy$default_d0xzp8_k$ = function (item, bytesReady, totalBytes, error, $super) {
    item = item === VOID ? this.item_1 : item;
    bytesReady = bytesReady === VOID ? this.bytesReady_1 : bytesReady;
    totalBytes = totalBytes === VOID ? this.totalBytes_1 : totalBytes;
    error = error === VOID ? this.error_1 : error;
    return $super === VOID ? this.copy_6rw8ud_k$(item, bytesReady, totalBytes, error) : $super.copy_6rw8ud_k$.call(this, item, bytesReady, totalBytes, error);
  };
  protoOf(OpeningBlobState).toString = function () {
    return 'OpeningBlobState(item=' + this.item_1 + ', bytesReady=' + this.bytesReady_1.toString() + ', totalBytes=' + this.totalBytes_1.toString() + ', error=' + this.error_1 + ')';
  };
  protoOf(OpeningBlobState).hashCode = function () {
    var result = this.item_1.hashCode();
    result = imul(result, 31) + this.bytesReady_1.hashCode() | 0;
    result = imul(result, 31) + this.totalBytes_1.hashCode() | 0;
    result = imul(result, 31) + (this.error_1 == null ? 0 : getStringHashCode(this.error_1)) | 0;
    return result;
  };
  protoOf(OpeningBlobState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpeningBlobState))
      return false;
    var tmp0_other_with_cast = other instanceof OpeningBlobState ? other : THROW_CCE();
    if (!this.item_1.equals(tmp0_other_with_cast.item_1))
      return false;
    if (!this.bytesReady_1.equals(tmp0_other_with_cast.bytesReady_1))
      return false;
    if (!this.totalBytes_1.equals(tmp0_other_with_cast.totalBytes_1))
      return false;
    if (!(this.error_1 == tmp0_other_with_cast.error_1))
      return false;
    return true;
  };
  function _get_saveLocalUrisAsBlobsUseCase__r7r6tl($this) {
    return $this.saveLocalUrisAsBlobsUseCase_1;
  }
  function _get_enqueueBlobUploadClientUseCase__o832kb($this) {
    return $this.enqueueBlobUploadClientUseCase_1;
  }
  function _get_activeDb__rvz9k7($this) {
    return $this.activeDb_1;
  }
  function _get_activeRepo__m8pofn($this) {
    return $this.activeRepo_1;
  }
  function updateUris(_this__u8e3s4, $this, blobs, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(_this__u8e3s4, VOID, SaveAndUploadLocalUrisUseCase$updateUris$slambda_0(blobs, _this__u8e3s4, timeNow, null), $completion);
  }
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation) {
    this.$blobs_1 = $blobs;
    this.$this_updateUris_1 = $this_updateUris;
    this.$timeNow_1 = $timeNow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).invoke_g82kyq_k$ = function (_anonymous_parameter_0__qggqh8, $completion) {
    var tmp = this.create_9q7izm_k$(_anonymous_parameter_0__qggqh8, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            var tmp_0 = this;
            tmp_0.this0__1 = this.$blobs_1;
            this.tmp0_iterator1__1 = this.this0__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            if (!this.tmp0_iterator1__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

            this.element2__1 = this.tmp0_iterator1__1.next_20eer_k$();
            var tmp_1 = this;
            tmp_1.it3__1 = this.element2__1;
            this.tmp0_subject4__1 = this.it3__1.get_tableId_of07s0_k$();
            if (this.tmp0_subject4__1 === Companion_getInstance_13().get_TABLE_ID_xo2mej_k$()) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_updateUris_1.courseAssignmentSubmissionFileDao_spskde_k$().updateUri_d6wgvc_k$(this.it3__1.get_entityUid_3qea0s_k$(), this.it3__1.get_blobUrl_wrdex_k$(), this.$timeNow_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).create_9q7izm_k$ = function (_anonymous_parameter_0__qggqh8, completion) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda(this.$blobs_1, this.$this_updateUris_1, this.$timeNow_1, completion);
    i._anonymous_parameter_0__qggqh8__1 = _anonymous_parameter_0__qggqh8;
    return i;
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda_0($blobs, $this_updateUris, $timeNow, resultContinuation) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation);
    var l = function (_anonymous_parameter_0__qggqh8, $completion) {
      return i.invoke_g82kyq_k$(_anonymous_parameter_0__qggqh8, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$17(_this__u8e3s4, localUrisToSave, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.localUrisToSave_1 = localUrisToSave;
  }
  protoOf($invokeCOROUTINE$17).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.saveLocalUrisAsBlobsUseCase_1.invoke$default_vgqkhw_k$(this.localUrisToSave_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.blobs0__1 = suspendResult;
            this.enqueueBlobUploadClientUseCaseVal1__1 = this._this__u8e3s4__1.enqueueBlobUploadClientUseCase_1;
            if (!(this.enqueueBlobUploadClientUseCaseVal1__1 == null)) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = updateUris(this._this__u8e3s4__1.activeDb_1, this._this__u8e3s4__1, this.blobs0__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              var tmp0_elvis_lhs = this._this__u8e3s4__1.activeRepo_1;
              suspendResult = updateUris(tmp0_elvis_lhs == null ? this._this__u8e3s4__1.activeDb_1 : tmp0_elvis_lhs, this._this__u8e3s4__1, this.blobs0__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(4);
            var this_0 = this.blobs0__1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              var tmp0_blobUrl = item.get_blobUrl_wrdex_k$();
              var tmp1_entityUid = item.get_entityUid_3qea0s_k$();
              var tmp2_tableId = item.get_tableId_of07s0_k$();
              var tmp3_retentionLockIdToRelease = item.get_retentionLockId_tofpfp_k$();
              destination.add_utx5q5_k$(new EnqueueBlobUploadItem(tmp0_blobUrl, tmp2_tableId, tmp1_entityUid, tmp3_retentionLockIdToRelease));
            }

            suspendResult = this.enqueueBlobUploadClientUseCaseVal1__1.invoke$default_t2aglu_k$(destination, randomUuidAsString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            return Unit_getInstance();
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function SaveAndUploadLocalUrisUseCase(saveLocalUrisAsBlobsUseCase, enqueueBlobUploadClientUseCase, activeDb, activeRepo) {
    this.saveLocalUrisAsBlobsUseCase_1 = saveLocalUrisAsBlobsUseCase;
    this.enqueueBlobUploadClientUseCase_1 = enqueueBlobUploadClientUseCase;
    this.activeDb_1 = activeDb;
    this.activeRepo_1 = activeRepo;
  }
  protoOf(SaveAndUploadLocalUrisUseCase).invoke_dc98oa_k$ = function (localUrisToSave, $completion) {
    var tmp = new $invokeCOROUTINE$17(this, localUrisToSave, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function Companion_36() {
    Companion_instance_36 = this;
  }
  protoOf(Companion_36).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_41();
  };
  var Companion_instance_36;
  function Companion_getInstance_97() {
    if (Companion_instance_36 == null)
      new Companion_36();
    return Companion_instance_36;
  }
  function $serializer_31() {
    $serializer_instance_31 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.blob.savelocaluris.SaveLocalUrisAsBlobsUseCase.SavedBlob', this, 8);
    tmp0_serialDesc.addElement_5pzumi_k$('entityUid', false);
    tmp0_serialDesc.addElement_5pzumi_k$('tableId', false);
    tmp0_serialDesc.addElement_5pzumi_k$('localUri', false);
    tmp0_serialDesc.addElement_5pzumi_k$('blobUrl', false);
    tmp0_serialDesc.addElement_5pzumi_k$('retentionLockId', true);
    tmp0_serialDesc.addElement_5pzumi_k$('integrity', false);
    tmp0_serialDesc.addElement_5pzumi_k$('mimeType', false);
    tmp0_serialDesc.addElement_5pzumi_k$('storageSize', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_31).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_31).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_31).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = new Long(0, 0);
    var tmp12_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp12_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp12_input.decodeLongElement_994anb_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.decodeIntElement_941u6a_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.decodeLongElement_994anb_k$(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.decodeLongElement_994anb_k$(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.decodeLongElement_994anb_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.decodeIntElement_941u6a_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.decodeLongElement_994anb_k$(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.decodeLongElement_994anb_k$(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.endStructure_1xqz0n_k$(tmp0_desc);
    return SavedBlob_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_31).serialize_k4i2gi_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 0, value.entityUid_1);
    tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 1, value.tableId_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 2, value.localUri_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 3, value.blobUrl_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !value.retentionLockId_1.equals(new Long(0, 0))) {
      tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 4, value.retentionLockId_1);
    }
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 5, value.integrity_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 6, value.mimeType_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 7, value.storageSize_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_31).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_k4i2gi_k$(encoder, value instanceof SavedBlob ? value : THROW_CCE());
  };
  var $serializer_instance_31;
  function $serializer_getInstance_41() {
    if ($serializer_instance_31 == null)
      new $serializer_31();
    return $serializer_instance_31;
  }
  function SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, $this) {
    if (!(239 === (239 & seen1))) {
      throwMissingFieldException(seen1, 239, $serializer_getInstance_41().descriptor_1);
    }
    $this.entityUid_1 = entityUid;
    $this.tableId_1 = tableId;
    $this.localUri_1 = localUri;
    $this.blobUrl_1 = blobUrl;
    if (0 === (seen1 & 16))
      $this.retentionLockId_1 = new Long(0, 0);
    else
      $this.retentionLockId_1 = retentionLockId;
    $this.integrity_1 = integrity;
    $this.mimeType_1 = mimeType;
    $this.storageSize_1 = storageSize;
    return $this;
  }
  function SavedBlob_init_$Create$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker) {
    return SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, objectCreate(protoOf(SavedBlob)));
  }
  function SaveLocalUriAsBlobItem(localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders) {
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    tableId = tableId === VOID ? 0 : tableId;
    mimeType = mimeType === VOID ? null : mimeType;
    deleteLocalUriAfterSave = deleteLocalUriAfterSave === VOID ? false : deleteLocalUriAfterSave;
    createRetentionLock = createRetentionLock === VOID ? false : createRetentionLock;
    extraHeaders = extraHeaders === VOID ? Companion_getInstance_153().empty_1lj7f1_k$() : extraHeaders;
    this.localUri_1 = localUri;
    this.entityUid_1 = entityUid;
    this.tableId_1 = tableId;
    this.mimeType_1 = mimeType;
    this.deleteLocalUriAfterSave_1 = deleteLocalUriAfterSave;
    this.createRetentionLock_1 = createRetentionLock;
    this.extraHeaders_1 = extraHeaders;
  }
  protoOf(SaveLocalUriAsBlobItem).get_localUri_d9anq_k$ = function () {
    return this.localUri_1;
  };
  protoOf(SaveLocalUriAsBlobItem).get_entityUid_3qea0s_k$ = function () {
    return this.entityUid_1;
  };
  protoOf(SaveLocalUriAsBlobItem).get_tableId_of07s0_k$ = function () {
    return this.tableId_1;
  };
  protoOf(SaveLocalUriAsBlobItem).get_mimeType_g7ccbb_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(SaveLocalUriAsBlobItem).get_deleteLocalUriAfterSave_c8bh9g_k$ = function () {
    return this.deleteLocalUriAfterSave_1;
  };
  protoOf(SaveLocalUriAsBlobItem).get_createRetentionLock_lfzxic_k$ = function () {
    return this.createRetentionLock_1;
  };
  protoOf(SaveLocalUriAsBlobItem).get_extraHeaders_wd299d_k$ = function () {
    return this.extraHeaders_1;
  };
  protoOf(SaveLocalUriAsBlobItem).component1_7eebsc_k$ = function () {
    return this.localUri_1;
  };
  protoOf(SaveLocalUriAsBlobItem).component2_7eebsb_k$ = function () {
    return this.entityUid_1;
  };
  protoOf(SaveLocalUriAsBlobItem).component3_7eebsa_k$ = function () {
    return this.tableId_1;
  };
  protoOf(SaveLocalUriAsBlobItem).component4_7eebs9_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(SaveLocalUriAsBlobItem).component5_7eebs8_k$ = function () {
    return this.deleteLocalUriAfterSave_1;
  };
  protoOf(SaveLocalUriAsBlobItem).component6_7eebs7_k$ = function () {
    return this.createRetentionLock_1;
  };
  protoOf(SaveLocalUriAsBlobItem).component7_7eebs6_k$ = function () {
    return this.extraHeaders_1;
  };
  protoOf(SaveLocalUriAsBlobItem).copy_4i3j8t_k$ = function (localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders) {
    return new SaveLocalUriAsBlobItem(localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders);
  };
  protoOf(SaveLocalUriAsBlobItem).copy$default_8dl2o9_k$ = function (localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders, $super) {
    localUri = localUri === VOID ? this.localUri_1 : localUri;
    entityUid = entityUid === VOID ? this.entityUid_1 : entityUid;
    tableId = tableId === VOID ? this.tableId_1 : tableId;
    mimeType = mimeType === VOID ? this.mimeType_1 : mimeType;
    deleteLocalUriAfterSave = deleteLocalUriAfterSave === VOID ? this.deleteLocalUriAfterSave_1 : deleteLocalUriAfterSave;
    createRetentionLock = createRetentionLock === VOID ? this.createRetentionLock_1 : createRetentionLock;
    extraHeaders = extraHeaders === VOID ? this.extraHeaders_1 : extraHeaders;
    return $super === VOID ? this.copy_4i3j8t_k$(localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders) : $super.copy_4i3j8t_k$.call(this, localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders);
  };
  protoOf(SaveLocalUriAsBlobItem).toString = function () {
    return 'SaveLocalUriAsBlobItem(localUri=' + this.localUri_1 + ', entityUid=' + this.entityUid_1.toString() + ', tableId=' + this.tableId_1 + ', mimeType=' + this.mimeType_1 + ', deleteLocalUriAfterSave=' + this.deleteLocalUriAfterSave_1 + ', createRetentionLock=' + this.createRetentionLock_1 + ', extraHeaders=' + this.extraHeaders_1 + ')';
  };
  protoOf(SaveLocalUriAsBlobItem).hashCode = function () {
    var result = getStringHashCode(this.localUri_1);
    result = imul(result, 31) + this.entityUid_1.hashCode() | 0;
    result = imul(result, 31) + this.tableId_1 | 0;
    result = imul(result, 31) + (this.mimeType_1 == null ? 0 : getStringHashCode(this.mimeType_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.deleteLocalUriAfterSave_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.createRetentionLock_1) | 0;
    result = imul(result, 31) + hashCode(this.extraHeaders_1) | 0;
    return result;
  };
  protoOf(SaveLocalUriAsBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SaveLocalUriAsBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof SaveLocalUriAsBlobItem ? other : THROW_CCE();
    if (!(this.localUri_1 === tmp0_other_with_cast.localUri_1))
      return false;
    if (!this.entityUid_1.equals(tmp0_other_with_cast.entityUid_1))
      return false;
    if (!(this.tableId_1 === tmp0_other_with_cast.tableId_1))
      return false;
    if (!(this.mimeType_1 == tmp0_other_with_cast.mimeType_1))
      return false;
    if (!(this.deleteLocalUriAfterSave_1 === tmp0_other_with_cast.deleteLocalUriAfterSave_1))
      return false;
    if (!(this.createRetentionLock_1 === tmp0_other_with_cast.createRetentionLock_1))
      return false;
    if (!equals(this.extraHeaders_1, tmp0_other_with_cast.extraHeaders_1))
      return false;
    return true;
  };
  function SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    Companion_getInstance_97();
    retentionLockId = retentionLockId === VOID ? new Long(0, 0) : retentionLockId;
    this.entityUid_1 = entityUid;
    this.tableId_1 = tableId;
    this.localUri_1 = localUri;
    this.blobUrl_1 = blobUrl;
    this.retentionLockId_1 = retentionLockId;
    this.integrity_1 = integrity;
    this.mimeType_1 = mimeType;
    this.storageSize_1 = storageSize;
  }
  protoOf(SavedBlob).get_entityUid_3qea0s_k$ = function () {
    return this.entityUid_1;
  };
  protoOf(SavedBlob).get_tableId_of07s0_k$ = function () {
    return this.tableId_1;
  };
  protoOf(SavedBlob).get_localUri_d9anq_k$ = function () {
    return this.localUri_1;
  };
  protoOf(SavedBlob).get_blobUrl_wrdex_k$ = function () {
    return this.blobUrl_1;
  };
  protoOf(SavedBlob).get_retentionLockId_tofpfp_k$ = function () {
    return this.retentionLockId_1;
  };
  protoOf(SavedBlob).get_integrity_gnxvok_k$ = function () {
    return this.integrity_1;
  };
  protoOf(SavedBlob).get_mimeType_g7ccbb_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(SavedBlob).get_storageSize_579o6r_k$ = function () {
    return this.storageSize_1;
  };
  protoOf(SavedBlob).component1_7eebsc_k$ = function () {
    return this.entityUid_1;
  };
  protoOf(SavedBlob).component2_7eebsb_k$ = function () {
    return this.tableId_1;
  };
  protoOf(SavedBlob).component3_7eebsa_k$ = function () {
    return this.localUri_1;
  };
  protoOf(SavedBlob).component4_7eebs9_k$ = function () {
    return this.blobUrl_1;
  };
  protoOf(SavedBlob).component5_7eebs8_k$ = function () {
    return this.retentionLockId_1;
  };
  protoOf(SavedBlob).component6_7eebs7_k$ = function () {
    return this.integrity_1;
  };
  protoOf(SavedBlob).component7_7eebs6_k$ = function () {
    return this.mimeType_1;
  };
  protoOf(SavedBlob).component8_7eebs5_k$ = function () {
    return this.storageSize_1;
  };
  protoOf(SavedBlob).copy_f2ljoh_k$ = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    return new SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).copy$default_z2ap9u_k$ = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, $super) {
    entityUid = entityUid === VOID ? this.entityUid_1 : entityUid;
    tableId = tableId === VOID ? this.tableId_1 : tableId;
    localUri = localUri === VOID ? this.localUri_1 : localUri;
    blobUrl = blobUrl === VOID ? this.blobUrl_1 : blobUrl;
    retentionLockId = retentionLockId === VOID ? this.retentionLockId_1 : retentionLockId;
    integrity = integrity === VOID ? this.integrity_1 : integrity;
    mimeType = mimeType === VOID ? this.mimeType_1 : mimeType;
    storageSize = storageSize === VOID ? this.storageSize_1 : storageSize;
    return $super === VOID ? this.copy_f2ljoh_k$(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) : $super.copy_f2ljoh_k$.call(this, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).toString = function () {
    return 'SavedBlob(entityUid=' + this.entityUid_1.toString() + ', tableId=' + this.tableId_1 + ', localUri=' + this.localUri_1 + ', blobUrl=' + this.blobUrl_1 + ', retentionLockId=' + this.retentionLockId_1.toString() + ', integrity=' + this.integrity_1 + ', mimeType=' + this.mimeType_1 + ', storageSize=' + this.storageSize_1.toString() + ')';
  };
  protoOf(SavedBlob).hashCode = function () {
    var result = this.entityUid_1.hashCode();
    result = imul(result, 31) + this.tableId_1 | 0;
    result = imul(result, 31) + getStringHashCode(this.localUri_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.blobUrl_1) | 0;
    result = imul(result, 31) + this.retentionLockId_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.integrity_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.mimeType_1) | 0;
    result = imul(result, 31) + this.storageSize_1.hashCode() | 0;
    return result;
  };
  protoOf(SavedBlob).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SavedBlob))
      return false;
    var tmp0_other_with_cast = other instanceof SavedBlob ? other : THROW_CCE();
    if (!this.entityUid_1.equals(tmp0_other_with_cast.entityUid_1))
      return false;
    if (!(this.tableId_1 === tmp0_other_with_cast.tableId_1))
      return false;
    if (!(this.localUri_1 === tmp0_other_with_cast.localUri_1))
      return false;
    if (!(this.blobUrl_1 === tmp0_other_with_cast.blobUrl_1))
      return false;
    if (!this.retentionLockId_1.equals(tmp0_other_with_cast.retentionLockId_1))
      return false;
    if (!(this.integrity_1 === tmp0_other_with_cast.integrity_1))
      return false;
    if (!(this.mimeType_1 === tmp0_other_with_cast.mimeType_1))
      return false;
    if (!this.storageSize_1.equals(tmp0_other_with_cast.storageSize_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobsUseCase$invoke$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_getInstance();
  }
  function SaveLocalUrisAsBlobsUseCase() {
  }
  function Companion_37() {
    Companion_instance_37 = this;
    this.DATA_LEARNINGSPACE_1 = 'endpoint';
    this.DATA_TABLE_ID_1 = 'tableId';
    this.DATA_ENTITY_UID_1 = 'entityUid';
    this.DATA_LOCAL_URI_1 = 'localUri';
  }
  protoOf(Companion_37).get_DATA_LEARNINGSPACE_4525a4_k$ = function () {
    return this.DATA_LEARNINGSPACE_1;
  };
  protoOf(Companion_37).get_DATA_TABLE_ID_bwfwns_k$ = function () {
    return this.DATA_TABLE_ID_1;
  };
  protoOf(Companion_37).get_DATA_ENTITY_UID_xmt9c_k$ = function () {
    return this.DATA_ENTITY_UID_1;
  };
  protoOf(Companion_37).get_DATA_LOCAL_URI_qqifbg_k$ = function () {
    return this.DATA_LOCAL_URI_1;
  };
  var Companion_instance_37;
  function Companion_getInstance_98() {
    if (Companion_instance_37 == null)
      new Companion_37();
    return Companion_instance_37;
  }
  function EnqueueSavePictureUseCase() {
  }
  function CancelBlobUploadClientUseCase() {
  }
  function EnqueueBlobUploadItem(blobUrl, tableId, entityUid, retentionLockIdToRelease) {
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    retentionLockIdToRelease = retentionLockIdToRelease === VOID ? new Long(0, 0) : retentionLockIdToRelease;
    this.blobUrl_1 = blobUrl;
    this.tableId_1 = tableId;
    this.entityUid_1 = entityUid;
    this.retentionLockIdToRelease_1 = retentionLockIdToRelease;
  }
  protoOf(EnqueueBlobUploadItem).get_blobUrl_wrdex_k$ = function () {
    return this.blobUrl_1;
  };
  protoOf(EnqueueBlobUploadItem).get_tableId_of07s0_k$ = function () {
    return this.tableId_1;
  };
  protoOf(EnqueueBlobUploadItem).get_entityUid_3qea0s_k$ = function () {
    return this.entityUid_1;
  };
  protoOf(EnqueueBlobUploadItem).get_retentionLockIdToRelease_o5fd8x_k$ = function () {
    return this.retentionLockIdToRelease_1;
  };
  protoOf(EnqueueBlobUploadItem).component1_7eebsc_k$ = function () {
    return this.blobUrl_1;
  };
  protoOf(EnqueueBlobUploadItem).component2_7eebsb_k$ = function () {
    return this.tableId_1;
  };
  protoOf(EnqueueBlobUploadItem).component3_7eebsa_k$ = function () {
    return this.entityUid_1;
  };
  protoOf(EnqueueBlobUploadItem).component4_7eebs9_k$ = function () {
    return this.retentionLockIdToRelease_1;
  };
  protoOf(EnqueueBlobUploadItem).copy_3kj4ml_k$ = function (blobUrl, tableId, entityUid, retentionLockIdToRelease) {
    return new EnqueueBlobUploadItem(blobUrl, tableId, entityUid, retentionLockIdToRelease);
  };
  protoOf(EnqueueBlobUploadItem).copy$default_vtmtqr_k$ = function (blobUrl, tableId, entityUid, retentionLockIdToRelease, $super) {
    blobUrl = blobUrl === VOID ? this.blobUrl_1 : blobUrl;
    tableId = tableId === VOID ? this.tableId_1 : tableId;
    entityUid = entityUid === VOID ? this.entityUid_1 : entityUid;
    retentionLockIdToRelease = retentionLockIdToRelease === VOID ? this.retentionLockIdToRelease_1 : retentionLockIdToRelease;
    return $super === VOID ? this.copy_3kj4ml_k$(blobUrl, tableId, entityUid, retentionLockIdToRelease) : $super.copy_3kj4ml_k$.call(this, blobUrl, tableId, entityUid, retentionLockIdToRelease);
  };
  protoOf(EnqueueBlobUploadItem).toString = function () {
    return 'EnqueueBlobUploadItem(blobUrl=' + this.blobUrl_1 + ', tableId=' + this.tableId_1 + ', entityUid=' + this.entityUid_1.toString() + ', retentionLockIdToRelease=' + this.retentionLockIdToRelease_1.toString() + ')';
  };
  protoOf(EnqueueBlobUploadItem).hashCode = function () {
    var result = getStringHashCode(this.blobUrl_1);
    result = imul(result, 31) + this.tableId_1 | 0;
    result = imul(result, 31) + this.entityUid_1.hashCode() | 0;
    result = imul(result, 31) + this.retentionLockIdToRelease_1.hashCode() | 0;
    return result;
  };
  protoOf(EnqueueBlobUploadItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EnqueueBlobUploadItem))
      return false;
    var tmp0_other_with_cast = other instanceof EnqueueBlobUploadItem ? other : THROW_CCE();
    if (!(this.blobUrl_1 === tmp0_other_with_cast.blobUrl_1))
      return false;
    if (!(this.tableId_1 === tmp0_other_with_cast.tableId_1))
      return false;
    if (!this.entityUid_1.equals(tmp0_other_with_cast.entityUid_1))
      return false;
    if (!this.retentionLockIdToRelease_1.equals(tmp0_other_with_cast.retentionLockIdToRelease_1))
      return false;
    return true;
  };
  function EnqueueBlobUploadClientUseCase() {
  }
  function _get_repoOrDb__i4l594($this) {
    return $this.repoOrDb_1;
  }
  function CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation) {
    this.$clazz_1 = $clazz;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CreateNewClazzUseCase$invoke$slambda).invoke_3n1s9y_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_3n1s9y_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var this_0 = this.$clazz_1;
            var tmp_0;
            if (this_0.get_clazzCode_brm18c_k$() == null) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver != null) {
              tmp0_safe_receiver.set_clazzCode_xzrrf3_k$(randomString(Companion_getInstance_14().get_CLAZZ_CODE_DEFAULT_LENGTH_c26xga_k$()));
            }

            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.repoOrDb_1.clazzDao_bk7qje_k$().insertAsync(this.$clazz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.clazzUid0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.repoOrDb_1.coursePermissionDao_t5l7mw_k$().upsertAsync_hy84ux_k$(new CoursePermission(VOID, VOID, this.$clazz_1.get_clazzUid_k8pnbz_k$(), Companion_getInstance_15().get_ROLE_TEACHER_obiog2_k$(), VOID, VOID, Companion_getInstance_16().get_TEACHER_DEFAULT_PERMISSIONS_tozqow_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.this$0__1.repoOrDb_1.coursePermissionDao_t5l7mw_k$().upsertAsync_hy84ux_k$(new CoursePermission(VOID, VOID, this.$clazz_1.get_clazzUid_k8pnbz_k$(), Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$(), VOID, VOID, Companion_getInstance_16().get_STUDENT_DEFAULT_PERMISSIONS_udg1tz_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return this.clazzUid0__1;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new CreateNewClazzUseCase$invoke$slambda(this.$clazz_1, this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CreateNewClazzUseCase$invoke$slambda_0($clazz, this$0, resultContinuation) {
    var i = new CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_3n1s9y_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CreateNewClazzUseCase(repoOrDb) {
    this.repoOrDb_1 = repoOrDb;
  }
  protoOf(CreateNewClazzUseCase).invoke_w16jsk_k$ = function (clazz, $completion) {
    return withDoorTransactionAsync(this.repoOrDb_1, VOID, CreateNewClazzUseCase$invoke$slambda_0(clazz, this, null), $completion);
  };
  function AlreadyEnroledInClassException() {
    Exception_init_$Init$_0(this);
    captureStack(this, AlreadyEnroledInClassException);
  }
  function AlreadyHasPendingRequestException() {
    IllegalStateException_init_$Init$_0(this);
    captureStack(this, AlreadyHasPendingRequestException);
  }
  function _get_db__ndbzd9($this) {
    return $this.db_1;
  }
  function _get_repo__dd1xjt_2($this) {
    return $this.repo_1;
  }
  function EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation) {
    this.$effectiveDb_1 = $effectiveDb;
    this.$enrolment_1 = $enrolment;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).invoke_3n1s9y_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_3n1s9y_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$effectiveDb_1.clazzEnrolmentDao_8oyet6_k$().insertAsync(this.$enrolment_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda(this.$effectiveDb_1, this.$enrolment_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function EnrolIntoCourseUseCase$invoke$slambda_0($effectiveDb, $enrolment, resultContinuation) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_3n1s9y_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$18(_this__u8e3s4, enrolment, timeZoneId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.enrolment_1 = enrolment;
    this.timeZoneId_1 = timeZoneId;
  }
  protoOf($invokeCOROUTINE$18).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            var tmp0_elvis_lhs = this._this__u8e3s4__1.repo_1;
            suspendResult = (tmp0_elvis_lhs == null ? this._this__u8e3s4__1.db_1 : tmp0_elvis_lhs).clazzEnrolmentDao_8oyet6_k$().getAllEnrolmentsAtTimeByClazzAndPerson_ya0633_k$(this.enrolment_1.get_clazzEnrolmentClazzUid_5dtar_k$(), this.enrolment_1.get_clazzEnrolmentPersonUid_67nqh2_k$(), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.currentEnrolment0__1 = suspendResult;
            if (!this.currentEnrolment0__1.isEmpty_y1axqb_k$()) {
              throw new AlreadyEnroledInClassException();
            }

            this.enrolment_1.set_clazzEnrolmentDateJoined_miq3em_k$(toLocalMidnight(Companion_getInstance().fromEpochMilliseconds_e2resj_k$(this.enrolment_1.get_clazzEnrolmentDateJoined_r9j21g_k$()), this.timeZoneId_1).toEpochMilliseconds_82cfls_k$());
            if (this.enrolment_1.get_clazzEnrolmentDateLeft_hxlqp6_k$().compareTo_9jj042_k$(get_UNSET_DISTANT_FUTURE()) < 0) {
              this.enrolment_1.set_clazzEnrolmentDateLeft_8szytc_k$(toLocalEndOfDay(Companion_getInstance().fromEpochMilliseconds_e2resj_k$(this.enrolment_1.get_clazzEnrolmentDateLeft_hxlqp6_k$()), this.timeZoneId_1).toEpochMilliseconds_82cfls_k$());
            }

            var tmp_0 = this;
            var tmp1_elvis_lhs = this._this__u8e3s4__1.repo_1;
            tmp_0.effectiveDb1__1 = tmp1_elvis_lhs == null ? this._this__u8e3s4__1.db_1 : tmp1_elvis_lhs;
            this.set_state_rjd8d0_k$(2);
            suspendResult = withDoorTransactionAsync(this.effectiveDb1__1, VOID, EnrolIntoCourseUseCase$invoke$slambda_0(this.effectiveDb1__1, this.enrolment_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function EnrolIntoCourseUseCase(db, repo) {
    this.db_1 = db;
    this.repo_1 = repo;
  }
  protoOf(EnrolIntoCourseUseCase).invoke_fu5zz0_k$ = function (enrolment, timeZoneId, $completion) {
    var tmp = new $invokeCOROUTINE$18(this, enrolment, timeZoneId, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function IApproveOrDeclinePendingEnrolmentRequestUseCase() {
  }
  function _get_activeRepo__m8pofn_0($this) {
    return $this.activeRepo_1;
  }
  function $invokeCOROUTINE$19(_this__u8e3s4, clazzCode, person, roleId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.clazzCode_1 = clazzCode;
    this.person_1 = person;
    this.roleId_1 = roleId;
  }
  protoOf($invokeCOROUTINE$19).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.activeRepo_1.clazzDao_bk7qje_k$().findByClazzCode_8057ie_k$(this.clazzCode_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_elvis_lhs0__1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.tmp0_elvis_lhs0__1 == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_1 = this.tmp0_elvis_lhs0__1;
            }

            tmp_0.clazz1__1 = tmp_1;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.activeRepo_1.enrolmentRequestDao_hchxfd_k$().hasPendingRequests_anv16n_k$(this.person_1.get_personUid_mmhd76_k$(), this.clazz1__1.get_clazzUid_k8pnbz_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (suspendResult) {
              throw new AlreadyHasPendingRequestException();
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 3:
            this.set_state_rjd8d0_k$(4);
            suspendResult = this._this__u8e3s4__1.activeRepo_1.clazzEnrolmentDao_8oyet6_k$().getAllEnrolmentsAtTimeByClazzAndPerson_ya0633_k$(this.clazz1__1.get_clazzUid_k8pnbz_k$(), this.person_1.get_personUid_mmhd76_k$(), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.this2__1 = suspendResult;
            if (!this.this2__1.isEmpty_y1axqb_k$()) {
              throw new AlreadyEnroledInClassException();
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 5:
            this.set_state_rjd8d0_k$(6);
            suspendResult = this._this__u8e3s4__1.activeRepo_1.enrolmentRequestDao_hchxfd_k$().insert_hl95ea_k$(new EnrolmentRequest(VOID, this.clazz1__1.get_clazzUid_k8pnbz_k$(), this.clazz1__1.get_clazzName_brsrx6_k$(), this.person_1.get_personUid_mmhd76_k$(), this.person_1.fullName_m0cs6y_k$(), VOID, this.person_1.get_username_ytz5i7_k$(), this.roleId_1, systemTimeInMillis(), Companion_getInstance_17().get_STATUS_PENDING_ytco25_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            return Unit_getInstance();
          case 7:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 7) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function RequestEnrolmentUseCase(activeRepo) {
    this.activeRepo_1 = activeRepo;
  }
  protoOf(RequestEnrolmentUseCase).invoke_wzar5l_k$ = function (clazzCode, person, roleId, $completion) {
    var tmp = new $invokeCOROUTINE$19(this, clazzCode, person, roleId, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function SetClipboardStringUseCase() {
  }
  function _get_$cachedSerializer__te6jhj($this) {
    return $this.$cachedSerializer$delegate_1.get_value_j01efc_k$();
  }
  function CompressionLevel$Companion$_anonymous__cmsj0x() {
    return CompressionLevelSerializer_getInstance();
  }
  var CompressionLevel_NONE_instance;
  var CompressionLevel_LOWEST_instance;
  var CompressionLevel_LOW_instance;
  var CompressionLevel_MEDIUM_instance;
  var CompressionLevel_HIGH_instance;
  var CompressionLevel_HIGHEST_instance;
  function Companion_38() {
    Companion_instance_38 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.$cachedSerializer$delegate_1 = lazy(tmp_0, CompressionLevel$Companion$_anonymous__cmsj0x);
  }
  protoOf(Companion_38).forValue_us0frk_k$ = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = get_entries_0().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.compress.Companion.forValue.<anonymous>' call
        if (element.value_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(Companion_38).serializer_9w0wvi_k$ = function () {
    return _get_$cachedSerializer__te6jhj(this);
  };
  protoOf(Companion_38).serializer_nv39qc_k$ = function (typeParamsSerializers) {
    return this.serializer_9w0wvi_k$();
  };
  var Companion_instance_38;
  function Companion_getInstance_99() {
    CompressionLevel_initEntries();
    if (Companion_instance_38 == null)
      new Companion_38();
    return Companion_instance_38;
  }
  function values_1() {
    return [CompressionLevel_NONE_getInstance(), CompressionLevel_LOWEST_getInstance(), CompressionLevel_LOW_getInstance(), CompressionLevel_MEDIUM_getInstance(), CompressionLevel_HIGH_getInstance(), CompressionLevel_HIGHEST_getInstance()];
  }
  function valueOf_0(value) {
    switch (value) {
      case 'NONE':
        return CompressionLevel_NONE_getInstance();
      case 'LOWEST':
        return CompressionLevel_LOWEST_getInstance();
      case 'LOW':
        return CompressionLevel_LOW_getInstance();
      case 'MEDIUM':
        return CompressionLevel_MEDIUM_getInstance();
      case 'HIGH':
        return CompressionLevel_HIGH_getInstance();
      case 'HIGHEST':
        return CompressionLevel_HIGHEST_getInstance();
      default:
        CompressionLevel_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_0() {
    if ($ENTRIES_0 == null)
      $ENTRIES_0 = enumEntries(values_1());
    return $ENTRIES_0;
  }
  var CompressionLevel_entriesInitialized;
  function CompressionLevel_initEntries() {
    if (CompressionLevel_entriesInitialized)
      return Unit_getInstance();
    CompressionLevel_entriesInitialized = true;
    CompressionLevel_NONE_instance = new CompressionLevel('NONE', 0, 0);
    CompressionLevel_LOWEST_instance = new CompressionLevel('LOWEST', 1, 1);
    CompressionLevel_LOW_instance = new CompressionLevel('LOW', 2, 2);
    CompressionLevel_MEDIUM_instance = new CompressionLevel('MEDIUM', 3, 3);
    CompressionLevel_HIGH_instance = new CompressionLevel('HIGH', 4, 4);
    CompressionLevel_HIGHEST_instance = new CompressionLevel('HIGHEST', 5, 5);
    Companion_getInstance_99();
  }
  var $ENTRIES_0;
  function CompressionLevel(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.value_1 = value;
  }
  protoOf(CompressionLevel).get_value_j01efc_k$ = function () {
    return this.value_1;
  };
  function CompressionLevel_NONE_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_NONE_instance;
  }
  function CompressionLevel_LOWEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOWEST_instance;
  }
  function CompressionLevel_LOW_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOW_instance;
  }
  function CompressionLevel_MEDIUM_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_MEDIUM_instance;
  }
  function CompressionLevel_HIGH_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGH_instance;
  }
  function CompressionLevel_HIGHEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGHEST_instance;
  }
  function CompressionLevelSerializer() {
    CompressionLevelSerializer_instance = this;
    this.descriptor_1 = PrimitiveSerialDescriptor('CompressionLevel', INT_getInstance());
  }
  protoOf(CompressionLevelSerializer).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf(CompressionLevelSerializer).deserialize_sy6x50_k$ = function (decoder) {
    return Companion_getInstance_99().forValue_us0frk_k$(decoder.decodeInt_8iq8f5_k$());
  };
  protoOf(CompressionLevelSerializer).serialize_vylgvf_k$ = function (encoder, value) {
    encoder.encodeInt_y5zi3z_k$(value.get_value_j01efc_k$());
  };
  protoOf(CompressionLevelSerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_vylgvf_k$(encoder, value instanceof CompressionLevel ? value : THROW_CCE());
  };
  var CompressionLevelSerializer_instance;
  function CompressionLevelSerializer_getInstance() {
    if (CompressionLevelSerializer_instance == null)
      new CompressionLevelSerializer();
    return CompressionLevelSerializer_instance;
  }
  function _get_repoOrDb__i4l594_0($this) {
    return $this.repoOrDb_1;
  }
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entries_1 = $entries;
    this.$timeNow_1 = $timeNow;
    this.$activeUserPersonUid_1 = $activeUserPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.repoOrDb_1.contentEntryParentChildJoinDao_7l71wv_k$();
            var this_0 = this.$entries_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              destination.add_utx5q5_k$(item.get_contentEntryParentChildJoinUid_cwji6i_k$());
            }

            suspendResult = tmp_0.setEntriesDeleted_jml36v_k$(destination, true, this.$timeNow_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            tmp_1.this0__1 = this.$entries_1;
            this.tmp0_iterator1__1 = this.this0__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (!this.tmp0_iterator1__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

            this.element2__1 = this.tmp0_iterator1__1.next_20eer_k$();
            var tmp_2 = this;
            tmp_2.it3__1 = this.element2__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.this$0__1.repoOrDb_1.deletedItemDao_2gyh22_k$().insertDeletedItemForContentEntryParentChildJoin_hkseye_k$(this.it3__1.get_contentEntryParentChildJoinUid_cwji6i_k$(), this.$timeNow_1, this.$activeUserPersonUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this.this$0__1, this.$entries_1, this.$timeNow_1, this.$activeUserPersonUid_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeleteContentEntryParentChildJoinUseCase(repoOrDb) {
    this.repoOrDb_1 = repoOrDb;
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase).invoke_hz2azg_k$ = function (entries, activeUserPersonUid, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.repoOrDb_1, VOID, DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this, entries, timeNow, activeUserPersonUid, null), $completion);
  };
  function Companion_39() {
    Companion_instance_39 = this;
    this.HEADER_ORIGINAL_FILENAME_1 = 'upload-original-filename';
  }
  protoOf(Companion_39).get_HEADER_ORIGINAL_FILENAME_b3wwng_k$ = function () {
    return this.HEADER_ORIGINAL_FILENAME_1;
  };
  var Companion_instance_39;
  function Companion_getInstance_100() {
    if (Companion_instance_39 == null)
      new Companion_39();
    return Companion_instance_39;
  }
  function ContentEntryGetMetaDataFromUriUseCase() {
  }
  function ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes) {
    indeterminate = indeterminate === VOID ? true : indeterminate;
    error = error === VOID ? null : error;
    processedBytes = processedBytes === VOID ? new Long(0, 0) : processedBytes;
    totalBytes = totalBytes === VOID ? new Long(0, 0) : totalBytes;
    this.indeterminate_1 = indeterminate;
    this.error_1 = error;
    this.processedBytes_1 = processedBytes;
    this.totalBytes_1 = totalBytes;
  }
  protoOf(ContentEntryGetMetadataStatus).get_indeterminate_997h5e_k$ = function () {
    return this.indeterminate_1;
  };
  protoOf(ContentEntryGetMetadataStatus).get_error_iqzvfj_k$ = function () {
    return this.error_1;
  };
  protoOf(ContentEntryGetMetadataStatus).get_processedBytes_re2rlm_k$ = function () {
    return this.processedBytes_1;
  };
  protoOf(ContentEntryGetMetadataStatus).get_totalBytes_wa2n74_k$ = function () {
    return this.totalBytes_1;
  };
  protoOf(ContentEntryGetMetadataStatus).get_progress_mo5qeu_k$ = function () {
    var tmp;
    if (!this.totalBytes_1.equals(new Long(0, 0))) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.processedBytes_1.times_nfzjiw_k$(toLong(100)).div_jun7gj_k$(this.totalBytes_1).toInt_1tsl84_k$();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(ContentEntryGetMetadataStatus).component1_7eebsc_k$ = function () {
    return this.indeterminate_1;
  };
  protoOf(ContentEntryGetMetadataStatus).component2_7eebsb_k$ = function () {
    return this.error_1;
  };
  protoOf(ContentEntryGetMetadataStatus).component3_7eebsa_k$ = function () {
    return this.processedBytes_1;
  };
  protoOf(ContentEntryGetMetadataStatus).component4_7eebs9_k$ = function () {
    return this.totalBytes_1;
  };
  protoOf(ContentEntryGetMetadataStatus).copy_b8xkjb_k$ = function (indeterminate, error, processedBytes, totalBytes) {
    return new ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).copy$default_3bs9ie_k$ = function (indeterminate, error, processedBytes, totalBytes, $super) {
    indeterminate = indeterminate === VOID ? this.indeterminate_1 : indeterminate;
    error = error === VOID ? this.error_1 : error;
    processedBytes = processedBytes === VOID ? this.processedBytes_1 : processedBytes;
    totalBytes = totalBytes === VOID ? this.totalBytes_1 : totalBytes;
    return $super === VOID ? this.copy_b8xkjb_k$(indeterminate, error, processedBytes, totalBytes) : $super.copy_b8xkjb_k$.call(this, indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).toString = function () {
    return 'ContentEntryGetMetadataStatus(indeterminate=' + this.indeterminate_1 + ', error=' + this.error_1 + ', processedBytes=' + this.processedBytes_1.toString() + ', totalBytes=' + this.totalBytes_1.toString() + ')';
  };
  protoOf(ContentEntryGetMetadataStatus).hashCode = function () {
    var result = getBooleanHashCode(this.indeterminate_1);
    result = imul(result, 31) + (this.error_1 == null ? 0 : getStringHashCode(this.error_1)) | 0;
    result = imul(result, 31) + this.processedBytes_1.hashCode() | 0;
    result = imul(result, 31) + this.totalBytes_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryGetMetadataStatus).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataStatus))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataStatus ? other : THROW_CCE();
    if (!(this.indeterminate_1 === tmp0_other_with_cast.indeterminate_1))
      return false;
    if (!(this.error_1 == tmp0_other_with_cast.error_1))
      return false;
    if (!this.processedBytes_1.equals(tmp0_other_with_cast.processedBytes_1))
      return false;
    if (!this.totalBytes_1.equals(tmp0_other_with_cast.totalBytes_1))
      return false;
    return true;
  };
  function UnsupportedContentException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, UnsupportedContentException);
  }
  function Companion_40() {
    Companion_instance_40 = this;
    this.VTT_MIME_TYPE_1 = 'text/vtt';
    this.PARAM_TRACK_FILENAME_1 = 'filename';
    this.PARAM_LOCALE_1 = 'locale';
    this.VTT_HEADER_LINE_1 = 'WEBVTT';
  }
  protoOf(Companion_40).get_VTT_MIME_TYPE_hncs4t_k$ = function () {
    return this.VTT_MIME_TYPE_1;
  };
  protoOf(Companion_40).get_PARAM_TRACK_FILENAME_uin4sq_k$ = function () {
    return this.PARAM_TRACK_FILENAME_1;
  };
  protoOf(Companion_40).get_PARAM_LOCALE_uqwzt7_k$ = function () {
    return this.PARAM_LOCALE_1;
  };
  protoOf(Companion_40).get_VTT_HEADER_LINE_h4o3xo_k$ = function () {
    return this.VTT_HEADER_LINE_1;
  };
  var Companion_instance_40;
  function Companion_getInstance_101() {
    if (Companion_instance_40 == null)
      new Companion_40();
    return Companion_instance_40;
  }
  function GetSubtitleTrackFromUriUseCase() {
  }
  function CancelImportContentEntryUseCase() {
  }
  function _get_learningSpace__h4keh_0($this) {
    return $this.learningSpace_1;
  }
  function _get_httpClient__2ty1zc_0($this) {
    return $this.httpClient_1;
  }
  function _get_repo__dd1xjt_3($this) {
    return $this.repo_1;
  }
  function $invokeCOROUTINE$20(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.cjiUid_1 = cjiUid;
    this.activeUserPersonUid_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$20).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1 = this._this__u8e3s4__1.repo_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.repoVal0__1 = tmp_2;
            var tmp_3 = this;
            tmp_3.this1__1 = this._this__u8e3s4__1.httpClient_1;
            var tmp_4 = this;
            tmp_4.urlString2__1 = this._this__u8e3s4__1.learningSpace_1.get_url_18iuii_k$() + 'api/contententryimportjob/cancel';
            var tmp_5 = this;
            tmp_5.this3__1 = this.this1__1;
            var tmp_6 = this;
            tmp_6.this4__1 = this.this3__1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString2__1);
            parameter(this_0, 'jobUid', this.cjiUid_1);
            doorNodeIdHeader(this_0, this.repoVal0__1);
            parameter(this_0, 'accountPersonUid', this.activeUserPersonUid_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.builder5__1 = this_0;
            this.builder5__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_8 = this;
            tmp_8.this6__1 = this.this4__1;
            var tmp_9 = this;
            tmp_9.builder7__1 = this.builder5__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder7__1, this.this6__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function CancelRemoteContentEntryImportUseCase(learningSpace, httpClient, repo) {
    this.learningSpace_1 = learningSpace;
    this.httpClient_1 = httpClient;
    this.repo_1 = repo;
  }
  protoOf(CancelRemoteContentEntryImportUseCase).invoke_vbh80v_k$ = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$20(this, cjiUid, activeUserPersonUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function _get_httpClient__2ty1zc_1($this) {
    return $this.httpClient_1;
  }
  function _get_learningSpace__h4keh_1($this) {
    return $this.learningSpace_1;
  }
  function _get_repo__dd1xjt_4($this) {
    return $this.repo_1;
  }
  function $invokeCOROUTINE$21(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.cjiUid_1 = cjiUid;
    this.activeUserPersonUid_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$21).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1 = this._this__u8e3s4__1.repo_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('no repo');
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.repoVal0__1 = tmp_2;
            var tmp_3 = this;
            tmp_3.this1__1 = this._this__u8e3s4__1.httpClient_1;
            var tmp_4 = this;
            tmp_4.urlString2__1 = this._this__u8e3s4__1.learningSpace_1.get_url_18iuii_k$() + 'api/contententryimportjob/dismissError';
            var tmp_5 = this;
            tmp_5.this3__1 = this.this1__1;
            var tmp_6 = this;
            tmp_6.this4__1 = this.this3__1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString2__1);
            parameter(this_0, 'jobUid', this.cjiUid_1);
            doorNodeIdHeader(this_0, this.repoVal0__1);
            parameter(this_0, 'accountPersonUid', this.activeUserPersonUid_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.builder5__1 = this_0;
            this.builder5__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_8 = this;
            tmp_8.this6__1 = this.this4__1;
            var tmp_9 = this;
            tmp_9.builder7__1 = this.builder5__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder7__1, this.this6__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function DismissRemoteContentEntryImportErrorUseCase(httpClient, learningSpace, repo) {
    this.httpClient_1 = httpClient;
    this.learningSpace_1 = learningSpace;
    this.repo_1 = repo;
  }
  protoOf(DismissRemoteContentEntryImportErrorUseCase).invoke_vbh80v_k$ = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$21(this, cjiUid, activeUserPersonUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function Companion_41() {
    Companion_instance_41 = this;
    this.DATA_LEARNINGSPACE_1 = 'endpoint';
    this.DATA_JOB_UID_1 = 'jobUid';
  }
  protoOf(Companion_41).get_DATA_LEARNINGSPACE_4525a4_k$ = function () {
    return this.DATA_LEARNINGSPACE_1;
  };
  protoOf(Companion_41).get_DATA_JOB_UID_6w12ki_k$ = function () {
    return this.DATA_JOB_UID_1;
  };
  protoOf(Companion_41).uniqueNameFor_nx111_k$ = function (learningSpace, uid) {
    return 'import-content-entry-' + learningSpace.get_url_18iuii_k$() + '-' + uid.toString();
  };
  var Companion_instance_41;
  function Companion_getInstance_102() {
    if (Companion_instance_41 == null)
      new Companion_41();
    return Companion_instance_41;
  }
  function EnqueueContentEntryImportUseCase() {
  }
  function LaunchResult(message) {
    message = message === VOID ? null : message;
    this.message_1 = message;
  }
  protoOf(LaunchResult).get_message_h23axq_k$ = function () {
    return this.message_1;
  };
  protoOf(LaunchResult).component1_7eebsc_k$ = function () {
    return this.message_1;
  };
  protoOf(LaunchResult).copy_q202ni_k$ = function (message) {
    return new LaunchResult(message);
  };
  protoOf(LaunchResult).copy$default_ld32tc_k$ = function (message, $super) {
    message = message === VOID ? this.message_1 : message;
    return $super === VOID ? this.copy_q202ni_k$(message) : $super.copy_q202ni_k$.call(this, message);
  };
  protoOf(LaunchResult).toString = function () {
    return 'LaunchResult(message=' + this.message_1 + ')';
  };
  protoOf(LaunchResult).hashCode = function () {
    return this.message_1 == null ? 0 : getStringHashCode(this.message_1);
  };
  protoOf(LaunchResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LaunchResult))
      return false;
    var tmp0_other_with_cast = other instanceof LaunchResult ? other : THROW_CCE();
    if (!(this.message_1 == tmp0_other_with_cast.message_1))
      return false;
    return true;
  };
  function LaunchContentEntryVersionUseCase() {
  }
  function LaunchEpubUseCase() {
  }
  function LaunchXapiUseCase() {
  }
  function _get_repo__dd1xjt_5($this) {
    return $this.repo_1;
  }
  function _get_systemImpl__e3uvek_2($this) {
    return $this.systemImpl_1;
  }
  function MoveContentEntriesUseCase(repo, systemImpl) {
    this.repo_1 = repo;
    this.systemImpl_1 = systemImpl;
  }
  protoOf(MoveContentEntriesUseCase).invoke_v7rmhy_k$ = function (destContentEntry, selectedEntriesToMove, $completion) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp = selectedEntriesToMove.isEmpty_y1axqb_k$();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = selectedEntriesToMove.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element.get_contentEntryUid_pu6bbm_k$().equals(destContentEntry.get_contentEntryUid_pu6bbm_k$())) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      throw IllegalArgumentException_init_$Create$(this.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_cannot_move_to_subfolder_of_self_biv0ka_k$()));
    }
    var tmp$ret$2;
    $l$block_2: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp_0 = selectedEntriesToMove.isEmpty_y1axqb_k$();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$2 = false;
        break $l$block_2;
      }
      var tmp0_iterator_0 = selectedEntriesToMove.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var element_0 = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element_0.get_parentContentEntryUid_k0n1lw_k$().equals(destContentEntry.get_contentEntryUid_pu6bbm_k$())) {
          tmp$ret$2 = true;
          break $l$block_2;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2) {
      throw IllegalArgumentException_init_$Create$(this.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_cannot_move_already_in_same_folder_w6qwlr_k$()));
    }
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(selectedEntriesToMove, 10));
    var tmp0_iterator_1 = selectedEntriesToMove.iterator_jk1svi_k$();
    while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator_1.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
      var tmp$ret$4 = item.get_contentEntryParentChildJoinUid_cwji6i_k$();
      destination.add_utx5q5_k$(tmp$ret$4);
    }
    var uidsToMove = destination;
    if (uidsToMove.isEmpty_y1axqb_k$())
      return Unit_getInstance();
    return this.repo_1.contentEntryParentChildJoinDao_7l71wv_k$().moveListOfEntriesToNewParent_226j44_k$(destContentEntry.get_contentEntryUid_pu6bbm_k$(), uidsToMove, systemTimeInMillis(), $completion);
  };
  function SaveContentEntryUseCase$invoke$slambda$lambda($picture) {
    return function () {
      return 'SavePictureUseCase: ContentEntry Set picture upsert uri = ' + $picture.get_cepPictureUri_z88ker_k$() + ' uid=' + $picture.get_cepUid_bup8ob_k$().toString();
    };
  }
  function _get_db__ndbzd9_0($this) {
    return $this.db_1;
  }
  function _get_repo__dd1xjt_6($this) {
    return $this.repo_1;
  }
  function _get_enqueueSavePictureUseCase__rl1s31($this) {
    return $this.enqueueSavePictureUseCase_1;
  }
  function SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    this.$effectiveDb_1 = $effectiveDb;
    this.$contentEntry_1 = $contentEntry;
    this.$picture_1 = $picture;
    this.$initPictureUri_1 = $initPictureUri;
    this.this$0__1 = this$0;
    this.$joinToParentUid_1 = $joinToParentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveContentEntryUseCase$invoke$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$effectiveDb_1.contentEntryDao_5ggc49_k$().upsertAsync_29lw1k_k$(this.$contentEntry_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$picture_1 == null) ? !(this.$picture_1.get_cepPictureUri_z88ker_k$() == this.$initPictureUri_1) : false) {
              var tmp_0 = Napier_getInstance();
              tmp_0.v$default_i2q2w7_k$(VOID, VOID, SaveContentEntryUseCase$invoke$slambda$lambda(this.$picture_1));
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.db_1.contentEntryPicture2Dao_h7azt1_k$().upsertListAsync_gpq206_k$(listOf_0(this.$picture_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            if (!(this.$joinToParentUid_1 == null)) {
              this.set_state_rjd8d0_k$(4);
              suspendResult = this.$effectiveDb_1.contentEntryParentChildJoinDao_7l71wv_k$().insertAsync(new ContentEntryParentChildJoin(this.$joinToParentUid_1, this.$contentEntry_1.get_contentEntryUid_pu6bbm_k$()), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 4:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            return Unit_getInstance();
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new SaveContentEntryUseCase$invoke$slambda(this.$effectiveDb_1, this.$contentEntry_1, this.$picture_1, this.$initPictureUri_1, this.this$0__1, this.$joinToParentUid_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SaveContentEntryUseCase$invoke$slambda_0($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    var i = new SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$22(_this__u8e3s4, contentEntry, joinToParentUid, picture, initPictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.contentEntry_1 = contentEntry;
    this.joinToParentUid_1 = joinToParentUid;
    this.picture_1 = picture;
    this.initPictureUri_1 = initPictureUri;
  }
  protoOf($invokeCOROUTINE$22).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp0_elvis_lhs = this._this__u8e3s4__1.repo_1;
            tmp_0.effectiveDb0__1 = tmp0_elvis_lhs == null ? this._this__u8e3s4__1.db_1 : tmp0_elvis_lhs;
            this.set_state_rjd8d0_k$(1);
            suspendResult = withDoorTransactionAsync(this.effectiveDb0__1, VOID, SaveContentEntryUseCase$invoke$slambda_0(this.effectiveDb0__1, this.contentEntry_1, this.picture_1, this.initPictureUri_1, this._this__u8e3s4__1, this.joinToParentUid_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.picture_1 == null) ? !(this.picture_1.get_cepPictureUri_z88ker_k$() == this.initPictureUri_1) : false) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this._this__u8e3s4__1.enqueueSavePictureUseCase_1.invoke_xmwesk_k$(this.picture_1.get_cepUid_bup8ob_k$(), Companion_getInstance_18().get_TABLE_ID_xo2mej_k$(), this.picture_1.get_cepPictureUri_z88ker_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function SaveContentEntryUseCase(db, repo, enqueueSavePictureUseCase) {
    this.db_1 = db;
    this.repo_1 = repo;
    this.enqueueSavePictureUseCase_1 = enqueueSavePictureUseCase;
  }
  protoOf(SaveContentEntryUseCase).invoke_mh83ng_k$ = function (contentEntry, joinToParentUid, picture, initPictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$22(this, contentEntry, joinToParentUid, picture, initPictureUri, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function AddOrUpdateCourseBlockUseCase() {
  }
  protoOf(AddOrUpdateCourseBlockUseCase).invoke_6n2684_k$ = function (currentList, clazzUid, addOrUpdateBlock) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = currentList.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
        if (item.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$().equals(addOrUpdateBlock.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$())) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var currentIndex = tmp$ret$1;
    var courseBlockMutableList = toMutableList(currentList);
    var tmp;
    if (currentIndex >= 0) {
      // Inline function 'kotlin.apply' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
      courseBlockMutableList.set_82063s_k$(currentIndex, addOrUpdateBlock);
      tmp = courseBlockMutableList;
    } else {
      courseBlockMutableList.add_utx5q5_k$(addOrUpdateBlock.copy$default_8ye1e3_k$(addOrUpdateBlock.get_courseBlock_c2ojbd_k$().copy$default_rhvmtp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, clazzUid)));
      tmp = updateParentModuleUidsAndIndex(autoIndent(courseBlockMutableList, courseBlockMutableList.get_size_woubt6_k$() - 1 | 0));
    }
    var newCourseBlockList = tmp;
    return toList(newCourseBlockList);
  };
  function updateParentModuleUidsAndIndex(_this__u8e3s4) {
    // Inline function 'kotlin.collections.mapIndexed' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.collections.mapIndexedTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var index = 0;
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.updateParentModuleUidsAndIndex.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var index_0 = checkIndexOverflow(tmp1);
      var parentModUid = findParentModule(_this__u8e3s4, item);
      var tmp;
      if (!item.get_courseBlock_c2ojbd_k$().get_cbModuleParentBlockUid_kgmwbj_k$().equals(parentModUid) ? true : !(item.get_courseBlock_c2ojbd_k$().get_cbIndex_aa17t6_k$() === index_0)) {
        tmp = item.copy$default_8ye1e3_k$(item.get_courseBlock_c2ojbd_k$().copy$default_rhvmtp_k$(VOID, VOID, VOID, parentModUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, index_0));
      } else {
        tmp = item;
      }
      var tmp$ret$0 = tmp;
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    return toList(destination);
  }
  function autoIndent(_this__u8e3s4, index) {
    var block = _this__u8e3s4.get_c1px32_k$(index).get_courseBlock_c2ojbd_k$();
    if (block.get_cbType_bskq4i_k$() === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$())
      return _this__u8e3s4;
    var tmp0_safe_receiver = getOrNull(_this__u8e3s4, index - 1 | 0);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
    var tmp;
    if (tmp1_elvis_lhs == null) {
      return _this__u8e3s4;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var prevBlock = tmp;
    var tmp_0;
    if (prevBlock.get_cbType_bskq4i_k$() === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$()) {
      tmp_0 = 1;
    } else {
      tmp_0 = prevBlock.get_cbIndentLevel_ss1m8_k$();
    }
    var autoIndent = tmp_0;
    var tmp_1;
    if (!(block.get_cbIndentLevel_ss1m8_k$() === autoIndent)) {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.autoIndent.<anonymous>' call
      this_0.set_82063s_k$(index, this_0.get_c1px32_k$(index).copy$default_8ye1e3_k$(this_0.get_c1px32_k$(index).get_courseBlock_c2ojbd_k$().copy$default_rhvmtp_k$(VOID, VOID, autoIndent)));
      tmp_1 = toList(this_0);
    } else {
      tmp_1 = _this__u8e3s4;
    }
    return tmp_1;
  }
  function findParentModule(_this__u8e3s4, forBlock) {
    if (forBlock.get_courseBlock_c2ojbd_k$().get_cbType_bskq4i_k$() === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$())
      return new Long(0, 0);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.findParentModule.<anonymous>' call
        if (item.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$().equals(forBlock.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$())) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var index_0 = tmp$ret$1;
    var tmp0_elvis_lhs = getOrNull(_this__u8e3s4, index_0 - 1 | 0);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return new Long(0, 0);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var prevBlock = tmp;
    return prevBlock.get_courseBlock_c2ojbd_k$().get_cbType_bskq4i_k$() === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$() ? prevBlock.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$() : prevBlock.get_courseBlock_c2ojbd_k$().get_cbIndentLevel_ss1m8_k$() >= 1 ? prevBlock.get_courseBlock_c2ojbd_k$().get_cbModuleParentBlockUid_kgmwbj_k$() : new Long(0, 0);
  }
  function UpdateCourseBlocksOnReorderOrCommitUseCase() {
  }
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).invoke_w5qiew_k$ = function (currentList, autoIndentIndex) {
    var tmp;
    if (autoIndentIndex >= 0) {
      tmp = autoIndent(currentList, autoIndentIndex);
    } else {
      tmp = currentList;
    }
    var listIndented = tmp;
    return updateParentModuleUidsAndIndex(listIndented);
  };
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).invoke$default_uggsyz_k$ = function (currentList, autoIndentIndex, $super) {
    autoIndentIndex = autoIndentIndex === VOID ? -1 : autoIndentIndex;
    return $super === VOID ? this.invoke_w5qiew_k$(currentList, autoIndentIndex) : $super.invoke_w5qiew_k$.call(this, currentList, autoIndentIndex);
  };
  function CreatePasskeyUseCase() {
  }
  function CredentialResult() {
  }
  function PasswordCredentialResult(credentialUsername, password) {
    CredentialResult.call(this);
    this.credentialUsername_1 = credentialUsername;
    this.password_1 = password;
  }
  protoOf(PasswordCredentialResult).get_credentialUsername_qohbu2_k$ = function () {
    return this.credentialUsername_1;
  };
  protoOf(PasswordCredentialResult).get_password_bodifw_k$ = function () {
    return this.password_1;
  };
  protoOf(PasswordCredentialResult).component1_7eebsc_k$ = function () {
    return this.credentialUsername_1;
  };
  protoOf(PasswordCredentialResult).component2_7eebsb_k$ = function () {
    return this.password_1;
  };
  protoOf(PasswordCredentialResult).copy_plwnsl_k$ = function (credentialUsername, password) {
    return new PasswordCredentialResult(credentialUsername, password);
  };
  protoOf(PasswordCredentialResult).copy$default_g4jnk3_k$ = function (credentialUsername, password, $super) {
    credentialUsername = credentialUsername === VOID ? this.credentialUsername_1 : credentialUsername;
    password = password === VOID ? this.password_1 : password;
    return $super === VOID ? this.copy_plwnsl_k$(credentialUsername, password) : $super.copy_plwnsl_k$.call(this, credentialUsername, password);
  };
  protoOf(PasswordCredentialResult).toString = function () {
    return 'PasswordCredentialResult(credentialUsername=' + this.credentialUsername_1 + ', password=' + this.password_1 + ')';
  };
  protoOf(PasswordCredentialResult).hashCode = function () {
    var result = getStringHashCode(this.credentialUsername_1);
    result = imul(result, 31) + getStringHashCode(this.password_1) | 0;
    return result;
  };
  protoOf(PasswordCredentialResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PasswordCredentialResult))
      return false;
    var tmp0_other_with_cast = other instanceof PasswordCredentialResult ? other : THROW_CCE();
    if (!(this.credentialUsername_1 === tmp0_other_with_cast.credentialUsername_1))
      return false;
    if (!(this.password_1 === tmp0_other_with_cast.password_1))
      return false;
    return true;
  };
  function PasskeyCredentialResult(passkeyWebAuthNResponse) {
    CredentialResult.call(this);
    this.passkeyWebAuthNResponse_1 = passkeyWebAuthNResponse;
  }
  protoOf(PasskeyCredentialResult).get_passkeyWebAuthNResponse_wr4mig_k$ = function () {
    return this.passkeyWebAuthNResponse_1;
  };
  protoOf(PasskeyCredentialResult).component1_7eebsc_k$ = function () {
    return this.passkeyWebAuthNResponse_1;
  };
  protoOf(PasskeyCredentialResult).copy_55tn5t_k$ = function (passkeyWebAuthNResponse) {
    return new PasskeyCredentialResult(passkeyWebAuthNResponse);
  };
  protoOf(PasskeyCredentialResult).copy$default_xbwxjr_k$ = function (passkeyWebAuthNResponse, $super) {
    passkeyWebAuthNResponse = passkeyWebAuthNResponse === VOID ? this.passkeyWebAuthNResponse_1 : passkeyWebAuthNResponse;
    return $super === VOID ? this.copy_55tn5t_k$(passkeyWebAuthNResponse) : $super.copy_55tn5t_k$.call(this, passkeyWebAuthNResponse);
  };
  protoOf(PasskeyCredentialResult).toString = function () {
    return 'PasskeyCredentialResult(passkeyWebAuthNResponse=' + this.passkeyWebAuthNResponse_1 + ')';
  };
  protoOf(PasskeyCredentialResult).hashCode = function () {
    return this.passkeyWebAuthNResponse_1.hashCode();
  };
  protoOf(PasskeyCredentialResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PasskeyCredentialResult))
      return false;
    var tmp0_other_with_cast = other instanceof PasskeyCredentialResult ? other : THROW_CCE();
    if (!this.passkeyWebAuthNResponse_1.equals(tmp0_other_with_cast.passkeyWebAuthNResponse_1))
      return false;
    return true;
  };
  function NoCredentialAvailableResult() {
    CredentialResult.call(this);
  }
  protoOf(NoCredentialAvailableResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NoCredentialAvailableResult))
      return false;
    return true;
  };
  protoOf(NoCredentialAvailableResult).hashCode = function () {
    return getKClassFromExpression(this).hashCode();
  };
  function Error_1(message) {
    CredentialResult.call(this);
    this.message_1 = message;
  }
  protoOf(Error_1).get_message_h23axq_k$ = function () {
    return this.message_1;
  };
  protoOf(Error_1).component1_7eebsc_k$ = function () {
    return this.message_1;
  };
  protoOf(Error_1).copy_q202ni_k$ = function (message) {
    return new Error_1(message);
  };
  protoOf(Error_1).copy$default_ewck0s_k$ = function (message, $super) {
    message = message === VOID ? this.message_1 : message;
    return $super === VOID ? this.copy_q202ni_k$(message) : $super.copy_q202ni_k$.call(this, message);
  };
  protoOf(Error_1).toString = function () {
    return 'Error(message=' + this.message_1 + ')';
  };
  protoOf(Error_1).hashCode = function () {
    return this.message_1 == null ? 0 : getStringHashCode(this.message_1);
  };
  protoOf(Error_1).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Error_1))
      return false;
    var tmp0_other_with_cast = other instanceof Error_1 ? other : THROW_CCE();
    if (!(this.message_1 == tmp0_other_with_cast.message_1))
      return false;
    return true;
  };
  function GetCredentialUseCase() {
  }
  function Companion_42() {
    Companion_instance_42 = this;
  }
  protoOf(Companion_42).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_42();
  };
  var Companion_instance_42;
  function Companion_getInstance_103() {
    if (Companion_instance_42 == null)
      new Companion_42();
    return Companion_instance_42;
  }
  function $serializer_32() {
    $serializer_instance_32 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.PasskeyVerifyResult', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('isVerified', false);
    tmp0_serialDesc.addElement_5pzumi_k$('personUid', false);
    tmp0_serialDesc.addElement_5pzumi_k$('firstName', true);
    tmp0_serialDesc.addElement_5pzumi_k$('lastName', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_32).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_32).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), LongSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_32).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return PasskeyVerifyResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_32).serialize_dbsei9_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 0, value.isVerified_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 1, value.personUid_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.firstName_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.firstName_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.lastName_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.lastName_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_32).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_dbsei9_k$(encoder, value instanceof PasskeyVerifyResult ? value : THROW_CCE());
  };
  var $serializer_instance_32;
  function $serializer_getInstance_42() {
    if ($serializer_instance_32 == null)
      new $serializer_32();
    return $serializer_instance_32;
  }
  function PasskeyVerifyResult_init_$Init$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_42().descriptor_1);
    }
    $this.isVerified_1 = isVerified;
    $this.personUid_1 = personUid;
    if (0 === (seen1 & 4))
      $this.firstName_1 = null;
    else
      $this.firstName_1 = firstName;
    if (0 === (seen1 & 8))
      $this.lastName_1 = null;
    else
      $this.lastName_1 = lastName;
    return $this;
  }
  function PasskeyVerifyResult_init_$Create$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker) {
    return PasskeyVerifyResult_init_$Init$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker, objectCreate(protoOf(PasskeyVerifyResult)));
  }
  function PasskeyVerifyResult(isVerified, personUid, firstName, lastName) {
    Companion_getInstance_103();
    firstName = firstName === VOID ? null : firstName;
    lastName = lastName === VOID ? null : lastName;
    this.isVerified_1 = isVerified;
    this.personUid_1 = personUid;
    this.firstName_1 = firstName;
    this.lastName_1 = lastName;
  }
  protoOf(PasskeyVerifyResult).get_isVerified_4r5vob_k$ = function () {
    return this.isVerified_1;
  };
  protoOf(PasskeyVerifyResult).get_personUid_mmhd76_k$ = function () {
    return this.personUid_1;
  };
  protoOf(PasskeyVerifyResult).set_firstName_1gvsrr_k$ = function (_set____db54di) {
    this.firstName_1 = _set____db54di;
  };
  protoOf(PasskeyVerifyResult).get_firstName_aplxv6_k$ = function () {
    return this.firstName_1;
  };
  protoOf(PasskeyVerifyResult).set_lastName_6ukpbb_k$ = function (_set____db54di) {
    this.lastName_1 = _set____db54di;
  };
  protoOf(PasskeyVerifyResult).get_lastName_f360wa_k$ = function () {
    return this.lastName_1;
  };
  protoOf(PasskeyVerifyResult).component1_7eebsc_k$ = function () {
    return this.isVerified_1;
  };
  protoOf(PasskeyVerifyResult).component2_7eebsb_k$ = function () {
    return this.personUid_1;
  };
  protoOf(PasskeyVerifyResult).component3_7eebsa_k$ = function () {
    return this.firstName_1;
  };
  protoOf(PasskeyVerifyResult).component4_7eebs9_k$ = function () {
    return this.lastName_1;
  };
  protoOf(PasskeyVerifyResult).copy_rpvvyo_k$ = function (isVerified, personUid, firstName, lastName) {
    return new PasskeyVerifyResult(isVerified, personUid, firstName, lastName);
  };
  protoOf(PasskeyVerifyResult).copy$default_bsqqtm_k$ = function (isVerified, personUid, firstName, lastName, $super) {
    isVerified = isVerified === VOID ? this.isVerified_1 : isVerified;
    personUid = personUid === VOID ? this.personUid_1 : personUid;
    firstName = firstName === VOID ? this.firstName_1 : firstName;
    lastName = lastName === VOID ? this.lastName_1 : lastName;
    return $super === VOID ? this.copy_rpvvyo_k$(isVerified, personUid, firstName, lastName) : $super.copy_rpvvyo_k$.call(this, isVerified, personUid, firstName, lastName);
  };
  protoOf(PasskeyVerifyResult).toString = function () {
    return 'PasskeyVerifyResult(isVerified=' + this.isVerified_1 + ', personUid=' + this.personUid_1.toString() + ', firstName=' + this.firstName_1 + ', lastName=' + this.lastName_1 + ')';
  };
  protoOf(PasskeyVerifyResult).hashCode = function () {
    var result = getBooleanHashCode(this.isVerified_1);
    result = imul(result, 31) + this.personUid_1.hashCode() | 0;
    result = imul(result, 31) + (this.firstName_1 == null ? 0 : getStringHashCode(this.firstName_1)) | 0;
    result = imul(result, 31) + (this.lastName_1 == null ? 0 : getStringHashCode(this.lastName_1)) | 0;
    return result;
  };
  protoOf(PasskeyVerifyResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PasskeyVerifyResult))
      return false;
    var tmp0_other_with_cast = other instanceof PasskeyVerifyResult ? other : THROW_CCE();
    if (!(this.isVerified_1 === tmp0_other_with_cast.isVerified_1))
      return false;
    if (!this.personUid_1.equals(tmp0_other_with_cast.personUid_1))
      return false;
    if (!(this.firstName_1 == tmp0_other_with_cast.firstName_1))
      return false;
    if (!(this.lastName_1 == tmp0_other_with_cast.lastName_1))
      return false;
    return true;
  };
  function _get_db__ndbzd9_1($this) {
    return $this.db_1;
  }
  function _get_repo__dd1xjt_7($this) {
    return $this.repo_1;
  }
  function _get_json__d8whur_1($this) {
    return $this.json_1;
  }
  function SavePersonPasskeyUseCase(db, repo, json) {
    this.db_1 = db;
    this.repo_1 = repo;
    this.json_1 = json;
  }
  protoOf(SavePersonPasskeyUseCase).invoke_xtawvv_k$ = function (passkeyResult, person, $completion) {
    var tmp0_elvis_lhs = this.repo_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.db_1 : tmp0_elvis_lhs;
    var clientDataJSONBase64 = passkeyResult.get_response_xlk07e_k$().get_clientDataJSON_5ppmka_k$();
    var decodedBytes = decodeBase64Bytes(clientDataJSONBase64);
    // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
    var this_0 = this.json_1;
    var string = decodeToString(decodedBytes);
    // Inline function 'kotlinx.serialization.serializer' call
    var this_1 = this_0.get_serializersModule_piitvg_k$();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(ClientDataJSON), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var clientDataJson = this_0.decodeFromString_jwu9sq_k$(tmp$ret$1, string);
    var personPasskey = new PersonPasskey(VOID, person.get_personUid_mmhd76_k$(), passkeyResult.get_response_xlk07e_k$().get_attestationObject_4u4o7a_k$(), passkeyResult.get_response_xlk07e_k$().get_clientDataJSON_5ppmka_k$(), clientDataJson.get_origin_hq9xkf_k$(), passkeyResult.get_id_kntnx8_k$(), clientDataJson.get_challenge_vpm3zu_k$(), passkeyResult.get_response_xlk07e_k$().get_publicKey_wfyw0d_k$());
    return effectiveDb.personPasskeyDao_9yc2pz_k$().insertAsync_lmyg00_k$(personPasskey, $completion);
  };
  function Companion_43() {
    Companion_instance_43 = this;
  }
  protoOf(Companion_43).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_43();
  };
  var Companion_instance_43;
  function Companion_getInstance_104() {
    if (Companion_instance_43 == null)
      new Companion_43();
    return Companion_instance_43;
  }
  function $serializer_33() {
    $serializer_instance_33 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.UserPasskeyChallenge', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('username', false);
    tmp0_serialDesc.addElement_5pzumi_k$('personUid', false);
    tmp0_serialDesc.addElement_5pzumi_k$('doorNodeId', false);
    tmp0_serialDesc.addElement_5pzumi_k$('usStartTime', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_33).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_33).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_33).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = new Long(0, 0);
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return UserPasskeyChallenge_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_33).serialize_dcj9lb_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.username_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.personUid_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 2, value.doorNodeId_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 3, value.usStartTime_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_33).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_dcj9lb_k$(encoder, value instanceof UserPasskeyChallenge ? value : THROW_CCE());
  };
  var $serializer_instance_33;
  function $serializer_getInstance_43() {
    if ($serializer_instance_33 == null)
      new $serializer_33();
    return $serializer_instance_33;
  }
  function UserPasskeyChallenge_init_$Init$(seen1, username, personUid, doorNodeId, usStartTime, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_43().descriptor_1);
    }
    $this.username_1 = username;
    $this.personUid_1 = personUid;
    $this.doorNodeId_1 = doorNodeId;
    $this.usStartTime_1 = usStartTime;
    return $this;
  }
  function UserPasskeyChallenge_init_$Create$(seen1, username, personUid, doorNodeId, usStartTime, serializationConstructorMarker) {
    return UserPasskeyChallenge_init_$Init$(seen1, username, personUid, doorNodeId, usStartTime, serializationConstructorMarker, objectCreate(protoOf(UserPasskeyChallenge)));
  }
  function UserPasskeyChallenge(username, personUid, doorNodeId, usStartTime) {
    Companion_getInstance_104();
    this.username_1 = username;
    this.personUid_1 = personUid;
    this.doorNodeId_1 = doorNodeId;
    this.usStartTime_1 = usStartTime;
  }
  protoOf(UserPasskeyChallenge).get_username_ytz5i7_k$ = function () {
    return this.username_1;
  };
  protoOf(UserPasskeyChallenge).get_personUid_mmhd76_k$ = function () {
    return this.personUid_1;
  };
  protoOf(UserPasskeyChallenge).get_doorNodeId_ugohnw_k$ = function () {
    return this.doorNodeId_1;
  };
  protoOf(UserPasskeyChallenge).get_usStartTime_3anvo8_k$ = function () {
    return this.usStartTime_1;
  };
  protoOf(UserPasskeyChallenge).component1_7eebsc_k$ = function () {
    return this.username_1;
  };
  protoOf(UserPasskeyChallenge).component2_7eebsb_k$ = function () {
    return this.personUid_1;
  };
  protoOf(UserPasskeyChallenge).component3_7eebsa_k$ = function () {
    return this.doorNodeId_1;
  };
  protoOf(UserPasskeyChallenge).component4_7eebs9_k$ = function () {
    return this.usStartTime_1;
  };
  protoOf(UserPasskeyChallenge).copy_rkanc9_k$ = function (username, personUid, doorNodeId, usStartTime) {
    return new UserPasskeyChallenge(username, personUid, doorNodeId, usStartTime);
  };
  protoOf(UserPasskeyChallenge).copy$default_5bqnoh_k$ = function (username, personUid, doorNodeId, usStartTime, $super) {
    username = username === VOID ? this.username_1 : username;
    personUid = personUid === VOID ? this.personUid_1 : personUid;
    doorNodeId = doorNodeId === VOID ? this.doorNodeId_1 : doorNodeId;
    usStartTime = usStartTime === VOID ? this.usStartTime_1 : usStartTime;
    return $super === VOID ? this.copy_rkanc9_k$(username, personUid, doorNodeId, usStartTime) : $super.copy_rkanc9_k$.call(this, username, personUid, doorNodeId, usStartTime);
  };
  protoOf(UserPasskeyChallenge).toString = function () {
    return 'UserPasskeyChallenge(username=' + this.username_1 + ', personUid=' + this.personUid_1 + ', doorNodeId=' + this.doorNodeId_1 + ', usStartTime=' + this.usStartTime_1.toString() + ')';
  };
  protoOf(UserPasskeyChallenge).hashCode = function () {
    var result = getStringHashCode(this.username_1);
    result = imul(result, 31) + getStringHashCode(this.personUid_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.doorNodeId_1) | 0;
    result = imul(result, 31) + this.usStartTime_1.hashCode() | 0;
    return result;
  };
  protoOf(UserPasskeyChallenge).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UserPasskeyChallenge))
      return false;
    var tmp0_other_with_cast = other instanceof UserPasskeyChallenge ? other : THROW_CCE();
    if (!(this.username_1 === tmp0_other_with_cast.username_1))
      return false;
    if (!(this.personUid_1 === tmp0_other_with_cast.personUid_1))
      return false;
    if (!(this.doorNodeId_1 === tmp0_other_with_cast.doorNodeId_1))
      return false;
    if (!this.usStartTime_1.equals(tmp0_other_with_cast.usStartTime_1))
      return false;
    return true;
  };
  function DecodeUserHandleUseCase() {
  }
  function Companion_44() {
    Companion_instance_44 = this;
  }
  protoOf(Companion_44).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_44();
  };
  var Companion_instance_44;
  function Companion_getInstance_105() {
    if (Companion_instance_44 == null)
      new Companion_44();
    return Companion_instance_44;
  }
  function $serializer_34() {
    $serializer_instance_34 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationExtensionsClientOutputsJSON', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('prf', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_34).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_34).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_45())];
  };
  protoOf($serializer_34).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, $serializer_getInstance_45(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, $serializer_getInstance_45(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return AuthenticationExtensionsClientOutputsJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_34).serialize_phdaqh_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.prf_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, $serializer_getInstance_45(), value.prf_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_34).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_phdaqh_k$(encoder, value instanceof AuthenticationExtensionsClientOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_34;
  function $serializer_getInstance_44() {
    if ($serializer_instance_34 == null)
      new $serializer_34();
    return $serializer_instance_34;
  }
  function AuthenticationExtensionsClientOutputsJSON_init_$Init$(seen1, prf, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_44().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.prf_1 = null;
    else
      $this.prf_1 = prf;
    return $this;
  }
  function AuthenticationExtensionsClientOutputsJSON_init_$Create$(seen1, prf, serializationConstructorMarker) {
    return AuthenticationExtensionsClientOutputsJSON_init_$Init$(seen1, prf, serializationConstructorMarker, objectCreate(protoOf(AuthenticationExtensionsClientOutputsJSON)));
  }
  function AuthenticationExtensionsClientOutputsJSON(prf) {
    Companion_getInstance_105();
    prf = prf === VOID ? null : prf;
    this.prf_1 = prf;
  }
  protoOf(AuthenticationExtensionsClientOutputsJSON).get_prf_18iy85_k$ = function () {
    return this.prf_1;
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).component1_7eebsc_k$ = function () {
    return this.prf_1;
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).copy_v85gux_k$ = function (prf) {
    return new AuthenticationExtensionsClientOutputsJSON(prf);
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).copy$default_3vec06_k$ = function (prf, $super) {
    prf = prf === VOID ? this.prf_1 : prf;
    return $super === VOID ? this.copy_v85gux_k$(prf) : $super.copy_v85gux_k$.call(this, prf);
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsClientOutputsJSON(prf=' + this.prf_1 + ')';
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).hashCode = function () {
    return this.prf_1 == null ? 0 : this.prf_1.hashCode();
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationExtensionsClientOutputsJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationExtensionsClientOutputsJSON ? other : THROW_CCE();
    if (!equals(this.prf_1, tmp0_other_with_cast.prf_1))
      return false;
    return true;
  };
  function Companion_45() {
    Companion_instance_45 = this;
  }
  protoOf(Companion_45).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_45();
  };
  var Companion_instance_45;
  function Companion_getInstance_106() {
    if (Companion_instance_45 == null)
      new Companion_45();
    return Companion_instance_45;
  }
  function $serializer_35() {
    $serializer_instance_35 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationExtensionsPRFOutputsJSON', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('enabled', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_35).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_35).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(BooleanSerializer_getInstance())];
  };
  protoOf($serializer_35).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return AuthenticationExtensionsPRFOutputsJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_35).serialize_fte1aw_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.enabled_1 === false)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, BooleanSerializer_getInstance(), value.enabled_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_35).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_fte1aw_k$(encoder, value instanceof AuthenticationExtensionsPRFOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_35;
  function $serializer_getInstance_45() {
    if ($serializer_instance_35 == null)
      new $serializer_35();
    return $serializer_instance_35;
  }
  function AuthenticationExtensionsPRFOutputsJSON_init_$Init$(seen1, enabled, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_45().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.enabled_1 = false;
    else
      $this.enabled_1 = enabled;
    return $this;
  }
  function AuthenticationExtensionsPRFOutputsJSON_init_$Create$(seen1, enabled, serializationConstructorMarker) {
    return AuthenticationExtensionsPRFOutputsJSON_init_$Init$(seen1, enabled, serializationConstructorMarker, objectCreate(protoOf(AuthenticationExtensionsPRFOutputsJSON)));
  }
  function AuthenticationExtensionsPRFOutputsJSON(enabled) {
    Companion_getInstance_106();
    enabled = enabled === VOID ? false : enabled;
    this.enabled_1 = enabled;
  }
  protoOf(AuthenticationExtensionsPRFOutputsJSON).get_enabled_pcr8o8_k$ = function () {
    return this.enabled_1;
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).component1_7eebsc_k$ = function () {
    return this.enabled_1;
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).copy_vho6cl_k$ = function (enabled) {
    return new AuthenticationExtensionsPRFOutputsJSON(enabled);
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).copy$default_kz3hgh_k$ = function (enabled, $super) {
    enabled = enabled === VOID ? this.enabled_1 : enabled;
    return $super === VOID ? this.copy_vho6cl_k$(enabled) : $super.copy_vho6cl_k$.call(this, enabled);
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsPRFOutputsJSON(enabled=' + this.enabled_1 + ')';
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).hashCode = function () {
    return this.enabled_1 == null ? 0 : getBooleanHashCode(this.enabled_1);
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationExtensionsPRFOutputsJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationExtensionsPRFOutputsJSON ? other : THROW_CCE();
    if (!(this.enabled_1 == tmp0_other_with_cast.enabled_1))
      return false;
    return true;
  };
  function Companion_46() {
    Companion_instance_46 = this;
  }
  protoOf(Companion_46).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_46();
  };
  var Companion_instance_46;
  function Companion_getInstance_107() {
    if (Companion_instance_46 == null)
      new Companion_46();
    return Companion_instance_46;
  }
  function $serializer_36() {
    $serializer_instance_36 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationResponseJSON', this, 6);
    tmp0_serialDesc.addElement_5pzumi_k$('id', false);
    tmp0_serialDesc.addElement_5pzumi_k$('rawId', false);
    tmp0_serialDesc.addElement_5pzumi_k$('response', false);
    tmp0_serialDesc.addElement_5pzumi_k$('authenticatorAttachment', true);
    tmp0_serialDesc.addElement_5pzumi_k$('clientExtensionResults', false);
    tmp0_serialDesc.addElement_5pzumi_k$('type', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_36).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_36).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), $serializer_getInstance_47(), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_44(), StringSerializer_getInstance()];
  };
  protoOf($serializer_36).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp10_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_47(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 4, $serializer_getInstance_44(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_47(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 4, $serializer_getInstance_44(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.endStructure_1xqz0n_k$(tmp0_desc);
    return AuthenticationResponseJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_36).serialize_4eaqix_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.id_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.rawId_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, $serializer_getInstance_47(), value.response_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.authenticatorAttachment_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.authenticatorAttachment_1);
    }
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 4, $serializer_getInstance_44(), value.clientExtensionResults_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 5, value.type_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_36).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_4eaqix_k$(encoder, value instanceof AuthenticationResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_36;
  function $serializer_getInstance_46() {
    if ($serializer_instance_36 == null)
      new $serializer_36();
    return $serializer_instance_36;
  }
  function AuthenticationResponseJSON_init_$Init$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker, $this) {
    if (!(55 === (55 & seen1))) {
      throwMissingFieldException(seen1, 55, $serializer_getInstance_46().descriptor_1);
    }
    $this.id_1 = id;
    $this.rawId_1 = rawId;
    $this.response_1 = response;
    if (0 === (seen1 & 8))
      $this.authenticatorAttachment_1 = null;
    else
      $this.authenticatorAttachment_1 = authenticatorAttachment;
    $this.clientExtensionResults_1 = clientExtensionResults;
    $this.type_1 = type;
    return $this;
  }
  function AuthenticationResponseJSON_init_$Create$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker) {
    return AuthenticationResponseJSON_init_$Init$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker, objectCreate(protoOf(AuthenticationResponseJSON)));
  }
  function AuthenticationResponseJSON(id, rawId, response, authenticatorAttachment, clientExtensionResults, type) {
    Companion_getInstance_107();
    authenticatorAttachment = authenticatorAttachment === VOID ? null : authenticatorAttachment;
    this.id_1 = id;
    this.rawId_1 = rawId;
    this.response_1 = response;
    this.authenticatorAttachment_1 = authenticatorAttachment;
    this.clientExtensionResults_1 = clientExtensionResults;
    this.type_1 = type;
  }
  protoOf(AuthenticationResponseJSON).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(AuthenticationResponseJSON).get_rawId_ixuf5m_k$ = function () {
    return this.rawId_1;
  };
  protoOf(AuthenticationResponseJSON).get_response_xlk07e_k$ = function () {
    return this.response_1;
  };
  protoOf(AuthenticationResponseJSON).get_authenticatorAttachment_nz3qq5_k$ = function () {
    return this.authenticatorAttachment_1;
  };
  protoOf(AuthenticationResponseJSON).get_clientExtensionResults_uzyq3v_k$ = function () {
    return this.clientExtensionResults_1;
  };
  protoOf(AuthenticationResponseJSON).get_type_wovaf7_k$ = function () {
    return this.type_1;
  };
  protoOf(AuthenticationResponseJSON).component1_7eebsc_k$ = function () {
    return this.id_1;
  };
  protoOf(AuthenticationResponseJSON).component2_7eebsb_k$ = function () {
    return this.rawId_1;
  };
  protoOf(AuthenticationResponseJSON).component3_7eebsa_k$ = function () {
    return this.response_1;
  };
  protoOf(AuthenticationResponseJSON).component4_7eebs9_k$ = function () {
    return this.authenticatorAttachment_1;
  };
  protoOf(AuthenticationResponseJSON).component5_7eebs8_k$ = function () {
    return this.clientExtensionResults_1;
  };
  protoOf(AuthenticationResponseJSON).component6_7eebs7_k$ = function () {
    return this.type_1;
  };
  protoOf(AuthenticationResponseJSON).copy_5f8h7r_k$ = function (id, rawId, response, authenticatorAttachment, clientExtensionResults, type) {
    return new AuthenticationResponseJSON(id, rawId, response, authenticatorAttachment, clientExtensionResults, type);
  };
  protoOf(AuthenticationResponseJSON).copy$default_x7ubcb_k$ = function (id, rawId, response, authenticatorAttachment, clientExtensionResults, type, $super) {
    id = id === VOID ? this.id_1 : id;
    rawId = rawId === VOID ? this.rawId_1 : rawId;
    response = response === VOID ? this.response_1 : response;
    authenticatorAttachment = authenticatorAttachment === VOID ? this.authenticatorAttachment_1 : authenticatorAttachment;
    clientExtensionResults = clientExtensionResults === VOID ? this.clientExtensionResults_1 : clientExtensionResults;
    type = type === VOID ? this.type_1 : type;
    return $super === VOID ? this.copy_5f8h7r_k$(id, rawId, response, authenticatorAttachment, clientExtensionResults, type) : $super.copy_5f8h7r_k$.call(this, id, rawId, response, authenticatorAttachment, clientExtensionResults, type);
  };
  protoOf(AuthenticationResponseJSON).toString = function () {
    return 'AuthenticationResponseJSON(id=' + this.id_1 + ', rawId=' + this.rawId_1 + ', response=' + this.response_1 + ', authenticatorAttachment=' + this.authenticatorAttachment_1 + ', clientExtensionResults=' + this.clientExtensionResults_1 + ', type=' + this.type_1 + ')';
  };
  protoOf(AuthenticationResponseJSON).hashCode = function () {
    var result = getStringHashCode(this.id_1);
    result = imul(result, 31) + getStringHashCode(this.rawId_1) | 0;
    result = imul(result, 31) + this.response_1.hashCode() | 0;
    result = imul(result, 31) + (this.authenticatorAttachment_1 == null ? 0 : getStringHashCode(this.authenticatorAttachment_1)) | 0;
    result = imul(result, 31) + this.clientExtensionResults_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.type_1) | 0;
    return result;
  };
  protoOf(AuthenticationResponseJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationResponseJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationResponseJSON ? other : THROW_CCE();
    if (!(this.id_1 === tmp0_other_with_cast.id_1))
      return false;
    if (!(this.rawId_1 === tmp0_other_with_cast.rawId_1))
      return false;
    if (!this.response_1.equals(tmp0_other_with_cast.response_1))
      return false;
    if (!(this.authenticatorAttachment_1 == tmp0_other_with_cast.authenticatorAttachment_1))
      return false;
    if (!this.clientExtensionResults_1.equals(tmp0_other_with_cast.clientExtensionResults_1))
      return false;
    if (!(this.type_1 === tmp0_other_with_cast.type_1))
      return false;
    return true;
  };
  function Companion_47() {
    Companion_instance_47 = this;
  }
  protoOf(Companion_47).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_47();
  };
  var Companion_instance_47;
  function Companion_getInstance_108() {
    if (Companion_instance_47 == null)
      new Companion_47();
    return Companion_instance_47;
  }
  function $serializer_37() {
    $serializer_instance_37 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticatorAssertionResponseJSON', this, 6);
    tmp0_serialDesc.addElement_5pzumi_k$('attestationObject', true);
    tmp0_serialDesc.addElement_5pzumi_k$('authenticatorData', false);
    tmp0_serialDesc.addElement_5pzumi_k$('clientDataJSON', false);
    tmp0_serialDesc.addElement_5pzumi_k$('publicKey', true);
    tmp0_serialDesc.addElement_5pzumi_k$('userHandle', true);
    tmp0_serialDesc.addElement_5pzumi_k$('signature', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_37).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_37).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_37).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp10_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.endStructure_1xqz0n_k$(tmp0_desc);
    return AuthenticatorAssertionResponseJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_37).serialize_u62ycu_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.attestationObject_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.attestationObject_1);
    }
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.authenticatorData_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 2, value.clientDataJSON_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.publicKey_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.publicKey_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.userHandle_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, StringSerializer_getInstance(), value.userHandle_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.signature_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, StringSerializer_getInstance(), value.signature_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_37).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_u62ycu_k$(encoder, value instanceof AuthenticatorAssertionResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_37;
  function $serializer_getInstance_47() {
    if ($serializer_instance_37 == null)
      new $serializer_37();
    return $serializer_instance_37;
  }
  function AuthenticatorAssertionResponseJSON_init_$Init$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker, $this) {
    if (!(6 === (6 & seen1))) {
      throwMissingFieldException(seen1, 6, $serializer_getInstance_47().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.attestationObject_1 = null;
    else
      $this.attestationObject_1 = attestationObject;
    $this.authenticatorData_1 = authenticatorData;
    $this.clientDataJSON_1 = clientDataJSON;
    if (0 === (seen1 & 8))
      $this.publicKey_1 = null;
    else
      $this.publicKey_1 = publicKey;
    if (0 === (seen1 & 16))
      $this.userHandle_1 = null;
    else
      $this.userHandle_1 = userHandle;
    if (0 === (seen1 & 32))
      $this.signature_1 = null;
    else
      $this.signature_1 = signature;
    return $this;
  }
  function AuthenticatorAssertionResponseJSON_init_$Create$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker) {
    return AuthenticatorAssertionResponseJSON_init_$Init$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker, objectCreate(protoOf(AuthenticatorAssertionResponseJSON)));
  }
  function AuthenticatorAssertionResponseJSON(attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature) {
    Companion_getInstance_108();
    attestationObject = attestationObject === VOID ? null : attestationObject;
    publicKey = publicKey === VOID ? null : publicKey;
    userHandle = userHandle === VOID ? null : userHandle;
    signature = signature === VOID ? null : signature;
    this.attestationObject_1 = attestationObject;
    this.authenticatorData_1 = authenticatorData;
    this.clientDataJSON_1 = clientDataJSON;
    this.publicKey_1 = publicKey;
    this.userHandle_1 = userHandle;
    this.signature_1 = signature;
  }
  protoOf(AuthenticatorAssertionResponseJSON).get_attestationObject_4u4o7a_k$ = function () {
    return this.attestationObject_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).get_authenticatorData_g37u38_k$ = function () {
    return this.authenticatorData_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).get_clientDataJSON_5ppmka_k$ = function () {
    return this.clientDataJSON_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).get_publicKey_wfyw0d_k$ = function () {
    return this.publicKey_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).get_userHandle_nn68s_k$ = function () {
    return this.userHandle_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).get_signature_q9pg5r_k$ = function () {
    return this.signature_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).component1_7eebsc_k$ = function () {
    return this.attestationObject_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).component2_7eebsb_k$ = function () {
    return this.authenticatorData_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).component3_7eebsa_k$ = function () {
    return this.clientDataJSON_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).component4_7eebs9_k$ = function () {
    return this.publicKey_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).component5_7eebs8_k$ = function () {
    return this.userHandle_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).component6_7eebs7_k$ = function () {
    return this.signature_1;
  };
  protoOf(AuthenticatorAssertionResponseJSON).copy_k58hnr_k$ = function (attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature) {
    return new AuthenticatorAssertionResponseJSON(attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature);
  };
  protoOf(AuthenticatorAssertionResponseJSON).copy$default_zel0mu_k$ = function (attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, $super) {
    attestationObject = attestationObject === VOID ? this.attestationObject_1 : attestationObject;
    authenticatorData = authenticatorData === VOID ? this.authenticatorData_1 : authenticatorData;
    clientDataJSON = clientDataJSON === VOID ? this.clientDataJSON_1 : clientDataJSON;
    publicKey = publicKey === VOID ? this.publicKey_1 : publicKey;
    userHandle = userHandle === VOID ? this.userHandle_1 : userHandle;
    signature = signature === VOID ? this.signature_1 : signature;
    return $super === VOID ? this.copy_k58hnr_k$(attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature) : $super.copy_k58hnr_k$.call(this, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature);
  };
  protoOf(AuthenticatorAssertionResponseJSON).toString = function () {
    return 'AuthenticatorAssertionResponseJSON(attestationObject=' + this.attestationObject_1 + ', authenticatorData=' + this.authenticatorData_1 + ', clientDataJSON=' + this.clientDataJSON_1 + ', publicKey=' + this.publicKey_1 + ', userHandle=' + this.userHandle_1 + ', signature=' + this.signature_1 + ')';
  };
  protoOf(AuthenticatorAssertionResponseJSON).hashCode = function () {
    var result = this.attestationObject_1 == null ? 0 : getStringHashCode(this.attestationObject_1);
    result = imul(result, 31) + getStringHashCode(this.authenticatorData_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.clientDataJSON_1) | 0;
    result = imul(result, 31) + (this.publicKey_1 == null ? 0 : getStringHashCode(this.publicKey_1)) | 0;
    result = imul(result, 31) + (this.userHandle_1 == null ? 0 : getStringHashCode(this.userHandle_1)) | 0;
    result = imul(result, 31) + (this.signature_1 == null ? 0 : getStringHashCode(this.signature_1)) | 0;
    return result;
  };
  protoOf(AuthenticatorAssertionResponseJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticatorAssertionResponseJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticatorAssertionResponseJSON ? other : THROW_CCE();
    if (!(this.attestationObject_1 == tmp0_other_with_cast.attestationObject_1))
      return false;
    if (!(this.authenticatorData_1 === tmp0_other_with_cast.authenticatorData_1))
      return false;
    if (!(this.clientDataJSON_1 === tmp0_other_with_cast.clientDataJSON_1))
      return false;
    if (!(this.publicKey_1 == tmp0_other_with_cast.publicKey_1))
      return false;
    if (!(this.userHandle_1 == tmp0_other_with_cast.userHandle_1))
      return false;
    if (!(this.signature_1 == tmp0_other_with_cast.signature_1))
      return false;
    return true;
  };
  function Companion_48() {
    Companion_instance_48 = this;
  }
  protoOf(Companion_48).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_48();
  };
  var Companion_instance_48;
  function Companion_getInstance_109() {
    if (Companion_instance_48 == null)
      new Companion_48();
    return Companion_instance_48;
  }
  function $serializer_38() {
    $serializer_instance_38 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.ClientDataJSON', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('type', false);
    tmp0_serialDesc.addElement_5pzumi_k$('challenge', false);
    tmp0_serialDesc.addElement_5pzumi_k$('origin', false);
    tmp0_serialDesc.addElement_5pzumi_k$('crossOrigin', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_38).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_38).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(BooleanSerializer_getInstance())];
  };
  protoOf($serializer_38).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ClientDataJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_38).serialize_5rksy5_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.type_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.challenge_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 2, value.origin_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.crossOrigin_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, BooleanSerializer_getInstance(), value.crossOrigin_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_38).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_5rksy5_k$(encoder, value instanceof ClientDataJSON ? value : THROW_CCE());
  };
  var $serializer_instance_38;
  function $serializer_getInstance_48() {
    if ($serializer_instance_38 == null)
      new $serializer_38();
    return $serializer_instance_38;
  }
  function ClientDataJSON_init_$Init$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_48().descriptor_1);
    }
    $this.type_1 = type;
    $this.challenge_1 = challenge;
    $this.origin_1 = origin;
    if (0 === (seen1 & 8))
      $this.crossOrigin_1 = null;
    else
      $this.crossOrigin_1 = crossOrigin;
    return $this;
  }
  function ClientDataJSON_init_$Create$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker) {
    return ClientDataJSON_init_$Init$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker, objectCreate(protoOf(ClientDataJSON)));
  }
  function ClientDataJSON(type, challenge, origin, crossOrigin) {
    Companion_getInstance_109();
    crossOrigin = crossOrigin === VOID ? null : crossOrigin;
    this.type_1 = type;
    this.challenge_1 = challenge;
    this.origin_1 = origin;
    this.crossOrigin_1 = crossOrigin;
  }
  protoOf(ClientDataJSON).get_type_wovaf7_k$ = function () {
    return this.type_1;
  };
  protoOf(ClientDataJSON).get_challenge_vpm3zu_k$ = function () {
    return this.challenge_1;
  };
  protoOf(ClientDataJSON).get_origin_hq9xkf_k$ = function () {
    return this.origin_1;
  };
  protoOf(ClientDataJSON).get_crossOrigin_ca0k4j_k$ = function () {
    return this.crossOrigin_1;
  };
  protoOf(ClientDataJSON).component1_7eebsc_k$ = function () {
    return this.type_1;
  };
  protoOf(ClientDataJSON).component2_7eebsb_k$ = function () {
    return this.challenge_1;
  };
  protoOf(ClientDataJSON).component3_7eebsa_k$ = function () {
    return this.origin_1;
  };
  protoOf(ClientDataJSON).component4_7eebs9_k$ = function () {
    return this.crossOrigin_1;
  };
  protoOf(ClientDataJSON).copy_x7toyd_k$ = function (type, challenge, origin, crossOrigin) {
    return new ClientDataJSON(type, challenge, origin, crossOrigin);
  };
  protoOf(ClientDataJSON).copy$default_d801zr_k$ = function (type, challenge, origin, crossOrigin, $super) {
    type = type === VOID ? this.type_1 : type;
    challenge = challenge === VOID ? this.challenge_1 : challenge;
    origin = origin === VOID ? this.origin_1 : origin;
    crossOrigin = crossOrigin === VOID ? this.crossOrigin_1 : crossOrigin;
    return $super === VOID ? this.copy_x7toyd_k$(type, challenge, origin, crossOrigin) : $super.copy_x7toyd_k$.call(this, type, challenge, origin, crossOrigin);
  };
  protoOf(ClientDataJSON).toString = function () {
    return 'ClientDataJSON(type=' + this.type_1 + ', challenge=' + this.challenge_1 + ', origin=' + this.origin_1 + ', crossOrigin=' + this.crossOrigin_1 + ')';
  };
  protoOf(ClientDataJSON).hashCode = function () {
    var result = getStringHashCode(this.type_1);
    result = imul(result, 31) + getStringHashCode(this.challenge_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.origin_1) | 0;
    result = imul(result, 31) + (this.crossOrigin_1 == null ? 0 : getBooleanHashCode(this.crossOrigin_1)) | 0;
    return result;
  };
  protoOf(ClientDataJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClientDataJSON))
      return false;
    var tmp0_other_with_cast = other instanceof ClientDataJSON ? other : THROW_CCE();
    if (!(this.type_1 === tmp0_other_with_cast.type_1))
      return false;
    if (!(this.challenge_1 === tmp0_other_with_cast.challenge_1))
      return false;
    if (!(this.origin_1 === tmp0_other_with_cast.origin_1))
      return false;
    if (!(this.crossOrigin_1 == tmp0_other_with_cast.crossOrigin_1))
      return false;
    return true;
  };
  function SavePasswordUseCase() {
  }
  function ParseCredentialUsernameUseCase() {
  }
  protoOf(ParseCredentialUsernameUseCase).invoke_lt562m_k$ = function (credentialUsername) {
    var tmp0_container = split(credentialUsername, ['@'], VOID, 2);
    // Inline function 'kotlin.collections.component1' call
    var username = tmp0_container.get_c1px32_k$(0);
    // Inline function 'kotlin.collections.component2' call
    var learningSpacePart = tmp0_container.get_c1px32_k$(1);
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var learningSpacePartLower = learningSpacePart.toLowerCase();
    var tmp;
    if (startsWith(learningSpacePartLower, 'http://')) {
      tmp = new Pair(new LearningSpace(learningSpacePart), username);
    } else {
      tmp = new Pair(new LearningSpace(requirePostfix('https://' + learningSpacePart, '/')), username);
    }
    return tmp;
  };
  function _get_tocItemAtomicIds__hfdtq1($this) {
    return $this.tocItemAtomicIds_1;
  }
  function toEpubTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.tocItemAtomicIds_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_1(parentUids, uid);
    var tmp8_uid = $this.tocItemAtomicIds_1.atomicfu$incrementAndGet();
    var tmp0_safe_receiver = _this__u8e3s4.get_anchor_b1c8n2_k$();
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_content_h02jrk_k$();
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.get_span_wouger_k$();
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_content_h02jrk_k$();
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var tmp3_elvis_lhs = tmp;
    var tmp9_label = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.get_anchor_b1c8n2_k$();
    var tmp10_href = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_href_wonh4k_k$();
    var tmp5_safe_receiver = _this__u8e3s4.get_orderedList_lwrnpa_k$();
    var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.get_listItems_c2czc7_k$();
    var tmp_0;
    if (tmp6_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp6_safe_receiver, 10));
      var tmp0_iterator = tmp6_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toEpubTocItem.<anonymous>' call
        var tmp$ret$0 = toEpubTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
        destination.add_utx5q5_k$(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp7_elvis_lhs = tmp_0;
    var tmp11_children = tmp7_elvis_lhs == null ? emptyList() : tmp7_elvis_lhs;
    return new EpubTocItem(tmp8_uid, tmp9_label, tmp10_href, tmp11_children, parentUids, indentLevel);
  }
  function toTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.tocItemAtomicIds_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_1(parentUids, uid);
    var tmp0_safe_receiver = firstOrNull(_this__u8e3s4.get_navLabels_754xuh_k$());
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_text_wouvsm_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_content_h02jrk_k$();
    var tmp3_label = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
    var tmp4_href = _this__u8e3s4.get_content_h02jrk_k$().get_src_18iw05_k$();
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.get_childPoints_8txs96_k$();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toTocItem.<anonymous>' call
      var tmp$ret$0 = toTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    return new EpubTocItem(uid, tmp3_label, tmp4_href, destination, parentUids, indentLevel);
  }
  function $invokeCOROUTINE$23(_this__u8e3s4, opfPackage, readItemText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.opfPackage_1 = opfPackage;
    this.readItemText_1 = readItemText;
  }
  protoOf($invokeCOROUTINE$23).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.tocToUse0__1 = this.opfPackage_1.tableOfContentItem_201g7t_k$();
            if (!(this.tocToUse0__1 == null) ? startsWith(this.tocToUse0__1.get_mediaType_r47omj_k$(), 'application/xhtml') : false) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.readItemText_1(this.tocToUse0__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (!(this.tocToUse0__1 == null) ? this.tocToUse0__1.get_mediaType_r47omj_k$() === Companion_getInstance_79().get_MIMETYPE_NCX_lctyrf_k$() : false) {
                this.set_state_rjd8d0_k$(1);
                suspendResult = this.readItemText_1(this.tocToUse0__1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_0 = this;
                tmp_0.WHEN_RESULT1__1 = null;
                this.set_state_rjd8d0_k$(3);
                continue $sm;
              }
            }

          case 1:
            var docStr = suspendResult;
            var this_0 = this._this__u8e3s4__1.xml_1;
            var this_1 = this_0.get_serializersModule_piitvg_k$();
            var this_2 = serializer(this_1, createKType(getKClass(NcxDocument), arrayOf([]), false));
            var ncxDoc = this_0.decodeFromString_jwu9sq_k$(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), docStr);
            var tmp_1 = this;
            var this_3 = ncxDoc.get_navMap_h03kg2_k$().get_navPoints_9957i5_k$();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_3.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              var it = toTocItem(element, this._this__u8e3s4__1, 0, emptySet());
              var list = plus(listOf_0(it), it.get_children_4cwbp4_k$());
              addAll(destination, list);
            }

            tmp_1.WHEN_RESULT1__1 = destination;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 2:
            var docStr_0 = suspendResult;
            var this_4 = this._this__u8e3s4__1.xml_1;
            var this_5 = this_4.get_serializersModule_piitvg_k$();
            var this_6 = serializer(this_5, createKType(getKClass(NavigationDocument), arrayOf([]), false));
            var navDoc = this_4.decodeFromString_jwu9sq_k$(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), docStr_0);
            var tmp_2 = this;
            var this_7 = first_0(navDoc.get_bodyElement_9d0lu9_k$().get_navigationElements_mtbvik_k$()).get_orderedList_lwrnpa_k$().get_listItems_c2czc7_k$();
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_7.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_0.next_20eer_k$();
              var it_0 = toEpubTocItem(element_0, this._this__u8e3s4__1, 0, emptySet());
              var list_0 = plus(listOf_0(it_0), it_0.get_children_4cwbp4_k$());
              addAll(destination_0, list_0);
            }

            tmp_2.WHEN_RESULT1__1 = destination_0;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return this.WHEN_RESULT1__1;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function GetEpubTableOfContentsUseCase(xml) {
    this.xml_1 = xml;
    this.tocItemAtomicIds_1 = atomic$int$1(0);
  }
  protoOf(GetEpubTableOfContentsUseCase).get_xml_18iseq_k$ = function () {
    return this.xml_1;
  };
  protoOf(GetEpubTableOfContentsUseCase).invoke_lx5xpf_k$ = function (opfPackage, readItemText, $completion) {
    var tmp = new $invokeCOROUTINE$23(this, opfPackage, readItemText, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function _get_VALID_USERNAME_SPECIAL_CHARS__ockiwq($this) {
    return $this.VALID_USERNAME_SPECIAL_CHARS_1;
  }
  function Companion_49() {
    Companion_instance_49 = this;
    this.VALID_USERNAME_SPECIAL_CHARS_1 = Companion_getInstance_120().get_ALLOWED_SPECIAL_m8wwsn_k$();
  }
  var Companion_instance_49;
  function Companion_getInstance_110() {
    if (Companion_instance_49 == null)
      new Companion_49();
    return Companion_instance_49;
  }
  function FilterUsernameUseCase() {
    Companion_getInstance_110();
  }
  protoOf(FilterUsernameUseCase).invoke_h1q7yg_k$ = function (username, invalidCharReplacement) {
    // Inline function 'kotlin.text.map' call
    // Inline function 'kotlin.text.mapTo' call
    var destination = ArrayList_init_$Create$_0(charSequenceLength(username));
    var inductionVariable = 0;
    while (inductionVariable < charSequenceLength(username)) {
      var item = charSequenceGet(username, inductionVariable);
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.domain.filterusername.FilterUsernameUseCase.invoke.<anonymous>' call
      var tmp;
      if (isLetter(item)) {
        // Inline function 'kotlin.text.lowercase' call
        // Inline function 'kotlin.js.unsafeCast' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = toString_0(item).toLowerCase();
      } else if (isDigit(item)) {
        tmp = new Char(item);
      } else if (Companion_getInstance_110().VALID_USERNAME_SPECIAL_CHARS_1.contains_aljjnj_k$(new Char(item))) {
        tmp = new Char(item);
      } else {
        tmp = invalidCharReplacement;
      }
      var tmp$ret$3 = tmp;
      destination.add_utx5q5_k$(tmp$ret$3);
    }
    return joinToString(destination, '');
  };
  function VersionInfo(versionString, buildTime) {
    this.versionString_1 = versionString;
    this.buildTime_1 = buildTime;
  }
  protoOf(VersionInfo).get_versionString_blgteo_k$ = function () {
    return this.versionString_1;
  };
  protoOf(VersionInfo).get_buildTime_enl6j2_k$ = function () {
    return this.buildTime_1;
  };
  protoOf(VersionInfo).component1_7eebsc_k$ = function () {
    return this.versionString_1;
  };
  protoOf(VersionInfo).component2_7eebsb_k$ = function () {
    return this.buildTime_1;
  };
  protoOf(VersionInfo).copy_7qnn3d_k$ = function (versionString, buildTime) {
    return new VersionInfo(versionString, buildTime);
  };
  protoOf(VersionInfo).copy$default_rgksh4_k$ = function (versionString, buildTime, $super) {
    versionString = versionString === VOID ? this.versionString_1 : versionString;
    buildTime = buildTime === VOID ? this.buildTime_1 : buildTime;
    return $super === VOID ? this.copy_7qnn3d_k$(versionString, buildTime) : $super.copy_7qnn3d_k$.call(this, versionString, buildTime);
  };
  protoOf(VersionInfo).toString = function () {
    return 'VersionInfo(versionString=' + this.versionString_1 + ', buildTime=' + this.buildTime_1.toString() + ')';
  };
  protoOf(VersionInfo).hashCode = function () {
    var result = getStringHashCode(this.versionString_1);
    result = imul(result, 31) + this.buildTime_1.hashCode() | 0;
    return result;
  };
  protoOf(VersionInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VersionInfo))
      return false;
    var tmp0_other_with_cast = other instanceof VersionInfo ? other : THROW_CCE();
    if (!(this.versionString_1 === tmp0_other_with_cast.versionString_1))
      return false;
    if (!this.buildTime_1.equals(tmp0_other_with_cast.buildTime_1))
      return false;
    return true;
  };
  function GetVersionUseCase() {
  }
  function HideKeyboardUseCase() {
  }
  function ClazzInviteRedeemException(message, stringResource) {
    Exception_init_$Init$(message, this);
    captureStack(this, ClazzInviteRedeemException);
    this.stringResource_1 = stringResource;
  }
  protoOf(ClazzInviteRedeemException).get_stringResource_4df0w8_k$ = function () {
    return this.stringResource_1;
  };
  function _get_enrolIntoCourseUseCase__jh2n4b($this) {
    return $this.enrolIntoCourseUseCase_1;
  }
  function _get_db__ndbzd9_2($this) {
    return $this.db_1;
  }
  function _get_repo__dd1xjt_8($this) {
    return $this.repo_1;
  }
  function _get_systemImpl__e3uvek_3($this) {
    return $this.systemImpl_1;
  }
  function ClazzInviteRedeemUseCase$invoke$slambda($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation) {
    this.$effectiveDb_1 = $effectiveDb;
    this.$clazzInvite_1 = $clazzInvite;
    this.$enrolmentUid_1 = $enrolmentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$effectiveDb_1.clazzEnrolmentDao_8oyet6_k$().updateClazzEnrolmentInviteUid_hizj8b_k$(this.$clazzInvite_1.get_ciUid_ippxpd_k$(), this.$enrolmentUid_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.$effectiveDb_1.clazzInviteDao_k3zs5t_k$().updateInviteStatus_ltc471_k$(Companion_getInstance_20().get_STATUS_ACCEPTED_gilcvf_k$(), this.$clazzInvite_1.get_ciUid_ippxpd_k$(), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzInviteRedeemUseCase$invoke$slambda(this.$effectiveDb_1, this.$clazzInvite_1, this.$enrolmentUid_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzInviteRedeemUseCase$invoke$slambda_0($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation) {
    var i = new ClazzInviteRedeemUseCase$invoke$slambda($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$24(_this__u8e3s4, inviteCode, isAccepting, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.inviteCode_1 = inviteCode;
    this.isAccepting_1 = isAccepting;
    this.personUid_1 = personUid;
  }
  protoOf($invokeCOROUTINE$24).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            var tmp_0 = this;
            var tmp0_elvis_lhs = this._this__u8e3s4__1.repo_1;
            tmp_0.effectiveDb0__1 = tmp0_elvis_lhs == null ? this._this__u8e3s4__1.db_1 : tmp0_elvis_lhs;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.effectiveDb0__1.clazzInviteDao_k3zs5t_k$().findClazzInviteEntityForInviteToken_6d8jo6_k$(this.inviteCode_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.clazzInviteWithTimeZone1__1 = suspendResult;
            var tmp_1 = this;
            var tmp1_safe_receiver = this.clazzInviteWithTimeZone1__1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_clazzInvite_h0bqqg_k$();
            var tmp_2;
            if (tmp2_elvis_lhs == null) {
              throw new ClazzInviteRedeemException('Invite not found', strings_getInstance().get_invalid_invite_code_k16xma_k$());
            } else {
              tmp_2 = tmp2_elvis_lhs;
            }

            tmp_1.clazzInvite2__1 = tmp_2;
            if (this.clazzInvite2__1.get_inviteStatus_9aj6p0_k$() === Companion_getInstance_20().get_STATUS_REVOKED_5byoqu_k$()) {
              throw new ClazzInviteRedeemException('Invite code is revoked', strings_getInstance().get_invitation_is_revoked_g7pubq_k$());
            }

            if (!(this.clazzInvite2__1.get_inviteStatus_9aj6p0_k$() === Companion_getInstance_20().get_STATUS_PENDING_ytco25_k$())) {
              throw new ClazzInviteRedeemException('Invite already used', strings_getInstance().get_invite_has_been_used_v6znqa_k$());
            }

            if (this.clazzInvite2__1.get_inviteExpire_2qd041_k$().compareTo_9jj042_k$(systemTimeInMillis()) < 0) {
              throw new ClazzInviteRedeemException('Invite code is expired', strings_getInstance().get_invite_code_expired_adjkyo_k$());
            }

            if (this.isAccepting_1) {
              this.set_state_rjd8d0_k$(3);
              var tmp_3 = ClazzEnrolment_init_$Create$(this.clazzInvite2__1.get_ciClazzUid_ckca1z_k$(), this.personUid_1, this.clazzInvite2__1.get_ciRoleId_ir56o_k$().toInt_1tsl84_k$());
              var tmp3_elvis_lhs = this.clazzInviteWithTimeZone1__1.get_timeZone_4vh49u_k$();
              suspendResult = this._this__u8e3s4__1.enrolIntoCourseUseCase_1.invoke_fu5zz0_k$(tmp_3, tmp3_elvis_lhs == null ? 'UTC' : tmp3_elvis_lhs, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.effectiveDb0__1.clazzInviteDao_k3zs5t_k$().updateInviteStatus_ltc471_k$(Companion_getInstance_20().get_STATUS_DECLINED_9m8sni_k$(), this.clazzInvite2__1.get_ciUid_ippxpd_k$(), systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            return new ClazzRedeemResult(this._this__u8e3s4__1.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_invite_declined_v6gx8l_k$()));
          case 3:
            this.enrolmentUid3__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            suspendResult = withDoorTransactionAsync(this.effectiveDb0__1, VOID, ClazzInviteRedeemUseCase$invoke$slambda_0(this.effectiveDb0__1, this.clazzInvite2__1, this.enrolmentUid3__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return new ClazzRedeemResult(this._this__u8e3s4__1.systemImpl_1.getString_a9yhoi_k$(strings_getInstance().get_invite_code_redeemed_eg7acg_k$()));
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzInviteRedeemUseCase(enrolIntoCourseUseCase, db, repo, systemImpl) {
    this.enrolIntoCourseUseCase_1 = enrolIntoCourseUseCase;
    this.db_1 = db;
    this.repo_1 = repo;
    this.systemImpl_1 = systemImpl;
  }
  protoOf(ClazzInviteRedeemUseCase).invoke_idrooo_k$ = function (inviteCode, isAccepting, personUid, $completion) {
    var tmp = new $invokeCOROUTINE$24(this, inviteCode, isAccepting, personUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function ClazzRedeemResult(message) {
    this.message_1 = message;
  }
  protoOf(ClazzRedeemResult).get_message_h23axq_k$ = function () {
    return this.message_1;
  };
  protoOf(ClazzRedeemResult).component1_7eebsc_k$ = function () {
    return this.message_1;
  };
  protoOf(ClazzRedeemResult).copy_a35qlh_k$ = function (message) {
    return new ClazzRedeemResult(message);
  };
  protoOf(ClazzRedeemResult).copy$default_fabzhw_k$ = function (message, $super) {
    message = message === VOID ? this.message_1 : message;
    return $super === VOID ? this.copy_a35qlh_k$(message) : $super.copy_a35qlh_k$.call(this, message);
  };
  protoOf(ClazzRedeemResult).toString = function () {
    return 'ClazzRedeemResult(message=' + this.message_1 + ')';
  };
  protoOf(ClazzRedeemResult).hashCode = function () {
    return getStringHashCode(this.message_1);
  };
  protoOf(ClazzRedeemResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzRedeemResult))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzRedeemResult ? other : THROW_CCE();
    if (!(this.message_1 === tmp0_other_with_cast.message_1))
      return false;
    return true;
  };
  function _get_clazzInviteRedeemUseCase__c3cagh($this) {
    return $this.clazzInviteRedeemUseCase_1;
  }
  function $invokeCOROUTINE$25(_this__u8e3s4, viewUri, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.viewUri_1 = viewUri;
    this.personUid_1 = personUid;
  }
  protoOf($invokeCOROUTINE$25).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.questionIndex0__1 = indexOf(this.viewUri_1, _Char___init__impl__6a9atx(63));
            var tmp_0 = this;
            var tmp_1;
            if (this.questionIndex0__1 > 0) {
              var tmp_2 = UMFileUtil_getInstance();
              var this_0 = this.viewUri_1;
              var startIndex = this.questionIndex0__1;
              tmp_1 = tmp_2.parseURLQueryString(this_0.substring(startIndex));
            } else {
              tmp_1 = emptyMap();
            }

            tmp_0.args1__1 = tmp_1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.clazzInviteRedeemUseCase_1.invoke_idrooo_k$(first_1(this.args1__1.get_values_ksazhn_k$()), true, this.personUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function EnrollToCourseFromInviteCodeUseCase(clazzInviteRedeemUseCase) {
    this.clazzInviteRedeemUseCase_1 = clazzInviteRedeemUseCase;
  }
  protoOf(EnrollToCourseFromInviteCodeUseCase).invoke_5rp4yz_k$ = function (viewUri, personUid, $completion) {
    var tmp = new $invokeCOROUTINE$25(this, viewUri, personUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function _get_phoneNumValidatorUseCase__4guu7i($this) {
    return $this.phoneNumValidatorUseCase_1;
  }
  function _get_validateEmailUseCase__i0n3za($this) {
    return $this.validateEmailUseCase_1;
  }
  function isValidUserName($this, username) {
    return startsWith(username, '@');
  }
  function ParseInviteUseCase(phoneNumValidatorUseCase, validateEmailUseCase) {
    this.phoneNumValidatorUseCase_1 = phoneNumValidatorUseCase;
    this.validateEmailUseCase_1 = validateEmailUseCase;
  }
  protoOf(ParseInviteUseCase).invoke_lt562m_k$ = function (text) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.text.split' call
    var this_0 = Regex_init_$Create$('\\s+|,|;').split_p7ck23_k$(text, 0);
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      // Inline function 'kotlin.text.trim' call
      var tmp$ret$2 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
      destination.add_utx5q5_k$(tmp$ret$2);
    }
    // Inline function 'kotlin.collections.filterTo' call
    var destination_0 = ArrayList_init_$Create$();
    var tmp0_iterator_0 = destination.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator_0.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      // Inline function 'kotlin.text.isNotEmpty' call
      if (charSequenceLength(element) > 0) {
        destination_0.add_utx5q5_k$(element);
      }
    }
    var parts = distinct(destination_0);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(parts, 10));
    var tmp0_iterator_1 = parts.iterator_jk1svi_k$();
    while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
      var item_0 = tmp0_iterator_1.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      var tmp;
      if (!(this.validateEmailUseCase_1.invoke_lt562m_k$(item_0) == null)) {
        tmp = new InviteViaContactChip(item_0, true, Companion_getInstance_20().get_EMAIL_i8psnn_k$());
      } else if (this.phoneNumValidatorUseCase_1.isValid_lc9qh4_k$(item_0)) {
        tmp = new InviteViaContactChip(item_0, true, Companion_getInstance_20().get_PHONE_ieomqt_k$());
      } else if (isValidUserName(this, item_0)) {
        tmp = new InviteViaContactChip(item_0, true, Companion_getInstance_20().get_INTERNAL_MESSAGE_hzlxym_k$());
      } else {
        tmp = new InviteViaContactChip(item_0, false, 0);
      }
      var tmp$ret$9 = tmp;
      destination_1.add_utx5q5_k$(tmp$ret$9);
    }
    return destination_1;
  };
  function _get_$childSerializers__r2zwns_9($this) {
    return $this.$childSerializers_1;
  }
  function Companion_50() {
    Companion_instance_50 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer(StringSerializer_getInstance()), null, null, null];
  }
  protoOf(Companion_50).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_49();
  };
  var Companion_instance_50;
  function Companion_getInstance_111() {
    if (Companion_instance_50 == null)
      new Companion_50();
    return Companion_instance_50;
  }
  function $serializer_39() {
    $serializer_instance_39 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.invite.SendClazzInvitesUseCase.SendClazzInvitesRequest', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('contacts', false);
    tmp0_serialDesc.addElement_5pzumi_k$('clazzUid', false);
    tmp0_serialDesc.addElement_5pzumi_k$('role', false);
    tmp0_serialDesc.addElement_5pzumi_k$('personUid', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_39).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_39).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_111().$childSerializers_1[0], LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_39).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = new Long(0, 0);
    var tmp7_local3 = new Long(0, 0);
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp9_cached = Companion_getInstance_111().$childSerializers_1;
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeLongElement_994anb_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return SendClazzInvitesRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_39).serialize_n2e7kq_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_111().$childSerializers_1;
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, tmp2_cached[0], value.contacts_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 1, value.clazzUid_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 2, value.role_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 3, value.personUid_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_39).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_n2e7kq_k$(encoder, value instanceof SendClazzInvitesRequest ? value : THROW_CCE());
  };
  var $serializer_instance_39;
  function $serializer_getInstance_49() {
    if ($serializer_instance_39 == null)
      new $serializer_39();
    return $serializer_instance_39;
  }
  function SendClazzInvitesRequest_init_$Init$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_49().descriptor_1);
    }
    $this.contacts_1 = contacts;
    $this.clazzUid_1 = clazzUid;
    $this.role_1 = role;
    $this.personUid_1 = personUid;
    return $this;
  }
  function SendClazzInvitesRequest_init_$Create$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker) {
    return SendClazzInvitesRequest_init_$Init$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker, objectCreate(protoOf(SendClazzInvitesRequest)));
  }
  function SendClazzInvitesRequest(contacts, clazzUid, role, personUid) {
    Companion_getInstance_111();
    this.contacts_1 = contacts;
    this.clazzUid_1 = clazzUid;
    this.role_1 = role;
    this.personUid_1 = personUid;
  }
  protoOf(SendClazzInvitesRequest).get_contacts_tubuvw_k$ = function () {
    return this.contacts_1;
  };
  protoOf(SendClazzInvitesRequest).get_clazzUid_k8pnbz_k$ = function () {
    return this.clazzUid_1;
  };
  protoOf(SendClazzInvitesRequest).get_role_wotsxr_k$ = function () {
    return this.role_1;
  };
  protoOf(SendClazzInvitesRequest).get_personUid_mmhd76_k$ = function () {
    return this.personUid_1;
  };
  protoOf(SendClazzInvitesRequest).component1_7eebsc_k$ = function () {
    return this.contacts_1;
  };
  protoOf(SendClazzInvitesRequest).component2_7eebsb_k$ = function () {
    return this.clazzUid_1;
  };
  protoOf(SendClazzInvitesRequest).component3_7eebsa_k$ = function () {
    return this.role_1;
  };
  protoOf(SendClazzInvitesRequest).component4_7eebs9_k$ = function () {
    return this.personUid_1;
  };
  protoOf(SendClazzInvitesRequest).copy_smrtph_k$ = function (contacts, clazzUid, role, personUid) {
    return new SendClazzInvitesRequest(contacts, clazzUid, role, personUid);
  };
  protoOf(SendClazzInvitesRequest).copy$default_6ssvh8_k$ = function (contacts, clazzUid, role, personUid, $super) {
    contacts = contacts === VOID ? this.contacts_1 : contacts;
    clazzUid = clazzUid === VOID ? this.clazzUid_1 : clazzUid;
    role = role === VOID ? this.role_1 : role;
    personUid = personUid === VOID ? this.personUid_1 : personUid;
    return $super === VOID ? this.copy_smrtph_k$(contacts, clazzUid, role, personUid) : $super.copy_smrtph_k$.call(this, contacts, clazzUid, role, personUid);
  };
  protoOf(SendClazzInvitesRequest).toString = function () {
    return 'SendClazzInvitesRequest(contacts=' + this.contacts_1 + ', clazzUid=' + this.clazzUid_1.toString() + ', role=' + this.role_1.toString() + ', personUid=' + this.personUid_1.toString() + ')';
  };
  protoOf(SendClazzInvitesRequest).hashCode = function () {
    var result = hashCode(this.contacts_1);
    result = imul(result, 31) + this.clazzUid_1.hashCode() | 0;
    result = imul(result, 31) + this.role_1.hashCode() | 0;
    result = imul(result, 31) + this.personUid_1.hashCode() | 0;
    return result;
  };
  protoOf(SendClazzInvitesRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SendClazzInvitesRequest))
      return false;
    var tmp0_other_with_cast = other instanceof SendClazzInvitesRequest ? other : THROW_CCE();
    if (!equals(this.contacts_1, tmp0_other_with_cast.contacts_1))
      return false;
    if (!this.clazzUid_1.equals(tmp0_other_with_cast.clazzUid_1))
      return false;
    if (!this.role_1.equals(tmp0_other_with_cast.role_1))
      return false;
    if (!this.personUid_1.equals(tmp0_other_with_cast.personUid_1))
      return false;
    return true;
  };
  function SendClazzInvitesUseCase() {
  }
  function SetLangResult(waitForRestart) {
    this.waitForRestart_1 = waitForRestart;
  }
  protoOf(SetLangResult).get_waitForRestart_vo16qs_k$ = function () {
    return this.waitForRestart_1;
  };
  protoOf(SetLangResult).component1_7eebsc_k$ = function () {
    return this.waitForRestart_1;
  };
  protoOf(SetLangResult).copy_o18wmo_k$ = function (waitForRestart) {
    return new SetLangResult(waitForRestart);
  };
  protoOf(SetLangResult).copy$default_d69q4n_k$ = function (waitForRestart, $super) {
    waitForRestart = waitForRestart === VOID ? this.waitForRestart_1 : waitForRestart;
    return $super === VOID ? this.copy_o18wmo_k$(waitForRestart) : $super.copy_o18wmo_k$.call(this, waitForRestart);
  };
  protoOf(SetLangResult).toString = function () {
    return 'SetLangResult(waitForRestart=' + this.waitForRestart_1 + ')';
  };
  protoOf(SetLangResult).hashCode = function () {
    return getBooleanHashCode(this.waitForRestart_1);
  };
  protoOf(SetLangResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SetLangResult))
      return false;
    var tmp0_other_with_cast = other instanceof SetLangResult ? other : THROW_CCE();
    if (!(this.waitForRestart_1 === tmp0_other_with_cast.waitForRestart_1))
      return false;
    return true;
  };
  function SetLanguageUseCase() {
  }
  function LaunchOpenLicensesUseCase() {
  }
  function GoToLearningSpaceUseCase() {
  }
  function _get_localAccountsSupported__bp901a($this) {
    return $this.localAccountsSupported_1;
  }
  function GetLocalAccountsSupportedUseCase(localAccountsSupported) {
    this.localAccountsSupported_1 = localAccountsSupported;
  }
  protoOf(GetLocalAccountsSupportedUseCase).invoke_jkqnwo_k$ = function () {
    return this.localAccountsSupported_1;
  };
  function _get_learningSpace__h4keh_2($this) {
    return $this.learningSpace_1;
  }
  function MakeLinkUseCase(learningSpace) {
    this.learningSpace_1 = learningSpace;
  }
  protoOf(MakeLinkUseCase).invoke_owu7o6_k$ = function (destName, args) {
    return appendQueryArgs_0(UMFileUtil_getInstance().joinPaths_ysd08s_k$([this.learningSpace_1.get_url_18iuii_k$(), Companion_getInstance_144().get_LINK_ENDPOINT_VIEWNAME_DIVIDER_ggr3u0_k$()]) + destName, toQueryString(args));
  };
  function _get_systemUrlConfig__8fiuvl($this) {
    return $this.systemUrlConfig_1;
  }
  function _get_learningSpace__h4keh_3($this) {
    return $this.learningSpace_1;
  }
  function GetDefaultDestinationUseCase(systemUrlConfig, learningSpace) {
    this.systemUrlConfig_1 = systemUrlConfig;
    this.learningSpace_1 = learningSpace;
  }
  protoOf(GetDefaultDestinationUseCase).invoke_jkqnwo_k$ = function () {
    var tmp;
    if (this.learningSpace_1.get_url_18iuii_k$() === this.systemUrlConfig_1.get_systemBaseUrl_qu6zd2_k$() ? true : this.learningSpace_1.get_isLocal_zeqfso_k$()) {
      tmp = Companion_getInstance_204().get_DEST_NAME_HOME_lftflt_k$();
    } else {
      tmp = Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$();
    }
    return tmp;
  };
  function _get_navController__5xcbrm($this) {
    return $this.navController_1;
  }
  function _get_accountManager__5euyz($this) {
    return $this.accountManager_1;
  }
  function _get_openExternalLinkUseCase__ku5z07($this) {
    return $this.openExternalLinkUseCase_1;
  }
  function _get_userCanSelectServer__z1svf1($this) {
    return $this.userCanSelectServer_1;
  }
  function OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, $this) {
    OnClickLinkUseCase.call($this, navController, accountManager, openExternalLinkUseCase, apiUrlConfig.get_canSelectServer_81keje_k$());
    return $this;
  }
  function OnClickLinkUseCase_init_$Create$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig) {
    return OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, objectCreate(protoOf(OnClickLinkUseCase)));
  }
  function OnClickLinkUseCase(navController, accountManager, openExternalLinkUseCase, userCanSelectServer) {
    this.navController_1 = navController;
    this.accountManager_1 = accountManager;
    this.openExternalLinkUseCase_1 = openExternalLinkUseCase;
    this.userCanSelectServer_1 = userCanSelectServer;
  }
  protoOf(OnClickLinkUseCase).invoke_ts1gt6_k$ = function (link, target) {
    navigateToLink(this.navController_1, link, this.accountManager_1, this.openExternalLinkUseCase_1, VOID, VOID, this.userCanSelectServer_1, VOID, VOID, target);
  };
  var LinkTarget_BLANK_instance;
  var LinkTarget_TOP_instance;
  var LinkTarget_SELF_instance;
  var LinkTarget_DEFAULT_instance;
  function Companion_51() {
    Companion_instance_51 = this;
  }
  protoOf(Companion_51).of_5gnbr7_k$ = function (targetAttr) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    switch (targetAttr.toLowerCase()) {
      case '_top':
        return LinkTarget_TOP_getInstance();
      case '_blank':
        return LinkTarget_BLANK_getInstance();
      case '_self':
        return LinkTarget_SELF_getInstance();
      default:
        return LinkTarget_DEFAULT_getInstance();
    }
  };
  var Companion_instance_51;
  function Companion_getInstance_112() {
    LinkTarget_initEntries();
    if (Companion_instance_51 == null)
      new Companion_51();
    return Companion_instance_51;
  }
  function values_2() {
    return [LinkTarget_BLANK_getInstance(), LinkTarget_TOP_getInstance(), LinkTarget_SELF_getInstance(), LinkTarget_DEFAULT_getInstance()];
  }
  function valueOf_1(value) {
    switch (value) {
      case 'BLANK':
        return LinkTarget_BLANK_getInstance();
      case 'TOP':
        return LinkTarget_TOP_getInstance();
      case 'SELF':
        return LinkTarget_SELF_getInstance();
      case 'DEFAULT':
        return LinkTarget_DEFAULT_getInstance();
      default:
        LinkTarget_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_1() {
    if ($ENTRIES_1 == null)
      $ENTRIES_1 = enumEntries(values_2());
    return $ENTRIES_1;
  }
  var LinkTarget_entriesInitialized;
  function LinkTarget_initEntries() {
    if (LinkTarget_entriesInitialized)
      return Unit_getInstance();
    LinkTarget_entriesInitialized = true;
    LinkTarget_BLANK_instance = new LinkTarget('BLANK', 0);
    LinkTarget_TOP_instance = new LinkTarget('TOP', 1);
    LinkTarget_SELF_instance = new LinkTarget('SELF', 2);
    LinkTarget_DEFAULT_instance = new LinkTarget('DEFAULT', 3);
    Companion_getInstance_112();
  }
  var $ENTRIES_1;
  function LinkTarget(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function LinkTarget_BLANK_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_BLANK_instance;
  }
  function LinkTarget_TOP_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_TOP_instance;
  }
  function LinkTarget_SELF_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_SELF_instance;
  }
  function LinkTarget_DEFAULT_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_DEFAULT_instance;
  }
  function Companion_52() {
    Companion_instance_52 = this;
  }
  var Companion_instance_52;
  function Companion_getInstance_113() {
    if (Companion_instance_52 == null)
      new Companion_52();
    return Companion_instance_52;
  }
  function OpenExternalLinkUseCase() {
  }
  function _get_db__ndbzd9_3($this) {
    return $this.db_1;
  }
  function _get_systemImpl__e3uvek_4($this) {
    return $this.systemImpl_1;
  }
  function UpdatePeerReviewAllocationUseCase$invoke$lambda($selectedMarkerUid) {
    return function ($this$shallowCopy) {
      var tmp0_elvis_lhs = $selectedMarkerUid;
      $this$shallowCopy.set_praMarkerSubmitterUid_plw6dh_k$(tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs);
      return Unit_getInstance();
    };
  }
  function $invokeCOROUTINE$26(_this__u8e3s4, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.existingAllocations_1 = existingAllocations;
    this.groupUid_1 = groupUid;
    this.clazzUid_1 = clazzUid;
    this.assignmentUid_1 = assignmentUid;
    this.numReviewsPerSubmission_1 = numReviewsPerSubmission;
    this.allocateRemaining_1 = allocateRemaining;
    this.resetAllocations_1 = resetAllocations;
  }
  protoOf($invokeCOROUTINE$26).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(8);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.db_1.clazzAssignmentDao_ta4cfn_k$().getSubmitterUidsByClazzOrGroupSetUid_9clzlq_k$(this.clazzUid_1, this.groupUid_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.submitterUids0__1 = suspendResult;
            var tmp_0 = this;
            tmp_0.this1__1 = this.submitterUids0__1;
            var tmp_1 = this;
            tmp_1.this2__1 = this.this1__1;
            var tmp_2 = this;
            tmp_2.destination3__1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.this1__1, 10));
            this.tmp0_iterator4__1 = this.this2__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (!this.tmp0_iterator4__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

            this.item5__1 = this.tmp0_iterator4__1.next_20eer_k$();
            var tmp_3 = this;
            tmp_3.submitterToMarkUid6__1 = this.item5__1;
            var tmp_4 = this;
            tmp_4.this7__1 = this._this__u8e3s4__1;
            var tmp_5 = this;
            var this_0 = this.existingAllocations_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              if (element.get_praToMarkerSubmitterUid_7d07wy_k$().equals(this.submitterToMarkUid6__1)) {
                destination.add_utx5q5_k$(element);
              }
            }

            tmp_5.this8__1 = this._this__u8e3s4__1.truncate_ga92v8_k$(destination, this.numReviewsPerSubmission_1);
            var tmp_6 = this;
            tmp_6.minSize9__1 = this.numReviewsPerSubmission_1;
            if (this.this8__1.get_size_woubt6_k$() >= this.minSize9__1) {
              this.WHEN_RESULT10__1 = this.this8__1;
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.this11__1 = until(0, this.minSize9__1 - this.this8__1.get_size_woubt6_k$() | 0);
              var tmp_8 = this;
              tmp_8.this12__1 = this.this11__1;
              var tmp_9 = this;
              tmp_9.destination13__1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.this11__1, 10));
              this.tmp0_iterator14__1 = this.this12__1.iterator_jk1svi_k$();
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 3:
            if (!this.tmp0_iterator14__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

            this.item15__1 = this.tmp0_iterator14__1.next_20eer_k$();
            var tmp_10 = this;
            tmp_10.it16__1 = this.item15__1;
            var tmp_11 = this;
            tmp_11.this17__1 = new PeerReviewerAllocation();
            var tmp_12 = this;
            tmp_12.$this$apply18__1 = this.this17__1;
            this.set_state_rjd8d0_k$(4);
            suspendResult = get_doorPrimaryKeyManager(this._this__u8e3s4__1.db_1).nextIdAsync_kh60wr_k$(Companion_getInstance_21().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var ARGUMENT = suspendResult;
            this.$this$apply18__1.set_praUid_dkb29c_k$(ARGUMENT);
            this.$this$apply18__1.set_praToMarkerSubmitterUid_n8lf7k_k$(this.submitterToMarkUid6__1);
            this.$this$apply18__1.set_praAssignmentUid_60pp0j_k$(this.assignmentUid_1);
            var ARGUMENT_0 = this.this17__1;
            this.destination13__1.add_utx5q5_k$(ARGUMENT_0);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 5:
            var ARGUMENT_1 = this.destination13__1;
            this.WHEN_RESULT10__1 = plus(this.this8__1, ARGUMENT_1);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 6:
            var existingAllocationsForSubmitter = this.WHEN_RESULT10__1;
            var ARGUMENT_2 = to(this.submitterToMarkUid6__1, existingAllocationsForSubmitter);
            this.destination3__1.add_utx5q5_k$(ARGUMENT_2);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 7:
            var ARGUMENT_3 = this.destination3__1;
            var allocationsForEachSubmitter = toMap(ARGUMENT_3);
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = allocationsForEachSubmitter.get_entries_p20ztl_k$().iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_0.next_20eer_k$();
              var list = element_0.get_value_j01efc_k$();
              addAll(destination_0, list);
            }

            var allocationList = toMutableList(destination_0);
            if (this.resetAllocations_1) {
              var inductionVariable = 0;
              var last = allocationList.get_size_woubt6_k$() - 1 | 0;
              if (inductionVariable <= last)
                do {
                  var index = inductionVariable;
                  inductionVariable = inductionVariable + 1 | 0;
                  allocationList.set_82063s_k$(index, allocationList.get_c1px32_k$(index).copy$default_3df7bi_k$(VOID, new Long(0, 0)));
                }
                 while (inductionVariable <= last);
            }

            if (this.allocateRemaining_1) {
              var this_1 = this.submitterUids0__1;
              var destination_1 = ArrayList_init_$Create$();
              var tmp0_iterator_1 = this_1.iterator_jk1svi_k$();
              while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
                var element_1 = tmp0_iterator_1.next_20eer_k$();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp_13;
                  if (isInterface(allocationList, Collection)) {
                    tmp_13 = allocationList.isEmpty_y1axqb_k$();
                  } else {
                    tmp_13 = false;
                  }
                  if (tmp_13) {
                    tmp$ret$0 = 0;
                    break l$ret$1;
                  }
                  var count = 0;
                  var tmp0_iterator_2 = allocationList.iterator_jk1svi_k$();
                  while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
                    var element_2 = tmp0_iterator_2.next_20eer_k$();
                    if (element_2.get_praMarkerSubmitterUid_mj8ypj_k$().equals(element_1)) {
                      count = count + 1 | 0;
                      checkCountOverflow(count);
                    }
                  }
                  tmp$ret$0 = count;
                }
                 while (false);
                var numToMarkAlreadyAssignedToSubmitter = tmp$ret$0;
                var this_2 = until(0, this.numReviewsPerSubmission_1 - numToMarkAlreadyAssignedToSubmitter | 0);
                var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_3 = this_2.iterator_jk1svi_k$();
                while (tmp0_iterator_3.hasNext_bitz1p_k$()) {
                  var item = tmp0_iterator_3.next_20eer_k$();
                  destination_2.add_utx5q5_k$(element_1);
                }
                var list_0 = destination_2;
                addAll(destination_1, list_0);
              }
              var fromBucket = toMutableList(shuffled(destination_1));
              var inductionVariable_0 = 0;
              var last_0 = allocationList.get_size_woubt6_k$() - 1 | 0;
              if (inductionVariable_0 <= last_0)
                do {
                  var index_0 = inductionVariable_0;
                  inductionVariable_0 = inductionVariable_0 + 1 | 0;
                  var allocation = allocationList.get_c1px32_k$(index_0);
                  if (allocation.get_praMarkerSubmitterUid_mj8ypj_k$().equals(new Long(0, 0))) {
                    var destination_3 = ArrayList_init_$Create$();
                    var tmp0_iterator_4 = allocationList.iterator_jk1svi_k$();
                    while (tmp0_iterator_4.hasNext_bitz1p_k$()) {
                      var element_3 = tmp0_iterator_4.next_20eer_k$();
                      if (element_3.get_praToMarkerSubmitterUid_7d07wy_k$().equals(allocation.get_praToMarkerSubmitterUid_7d07wy_k$())) {
                        destination_3.add_utx5q5_k$(element_3);
                      }
                    }
                    var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_3, 10));
                    var tmp0_iterator_5 = destination_3.iterator_jk1svi_k$();
                    while (tmp0_iterator_5.hasNext_bitz1p_k$()) {
                      var item_0 = tmp0_iterator_5.next_20eer_k$();
                      destination_4.add_utx5q5_k$(item_0.get_praMarkerSubmitterUid_mj8ypj_k$());
                    }
                    var destination_5 = ArrayList_init_$Create$();
                    var tmp0_iterator_6 = destination_4.iterator_jk1svi_k$();
                    while (tmp0_iterator_6.hasNext_bitz1p_k$()) {
                      var element_4 = tmp0_iterator_6.next_20eer_k$();
                      if (!element_4.equals(new Long(0, 0))) {
                        destination_5.add_utx5q5_k$(element_4);
                      }
                    }
                    var otherMarkersForThisSubmitter = destination_5;
                    var tmp$ret$2;
                    l$ret$3: do {
                      var tmp0_iterator_7 = fromBucket.iterator_jk1svi_k$();
                      while (tmp0_iterator_7.hasNext_bitz1p_k$()) {
                        var element_5 = tmp0_iterator_7.next_20eer_k$();
                        if (!element_5.equals(allocation.get_praToMarkerSubmitterUid_7d07wy_k$()) ? !otherMarkersForThisSubmitter.contains_aljjnj_k$(element_5) : false) {
                          tmp$ret$2 = element_5;
                          break l$ret$3;
                        }
                      }
                      tmp$ret$2 = null;
                    }
                     while (false);
                    var tmp2_safe_receiver = tmp$ret$2;
                    var tmp_14;
                    if (tmp2_safe_receiver == null) {
                      tmp_14 = null;
                    } else {
                      fromBucket.remove_cedx0m_k$(tmp2_safe_receiver);
                      tmp_14 = tmp2_safe_receiver;
                    }
                    var selectedMarkerUid = tmp_14;
                    allocationList.set_82063s_k$(index_0, shallowCopy_2(allocation, UpdatePeerReviewAllocationUseCase$invoke$lambda(selectedMarkerUid)));
                  }
                }
                 while (inductionVariable_0 <= last_0);
            }

            return allocationList;
          case 8:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 8) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function UpdatePeerReviewAllocationUseCase(db, systemImpl) {
    this.db_1 = db;
    this.systemImpl_1 = systemImpl;
  }
  protoOf(UpdatePeerReviewAllocationUseCase).truncate_ga92v8_k$ = function (_this__u8e3s4, maxSize) {
    return _this__u8e3s4.get_size_woubt6_k$() <= maxSize ? _this__u8e3s4 : _this__u8e3s4.subList_xle3r2_k$(0, maxSize);
  };
  protoOf(UpdatePeerReviewAllocationUseCase).padEnd_6mon99_k$ = function (_this__u8e3s4, minSize, element) {
    var tmp;
    if (_this__u8e3s4.get_size_woubt6_k$() >= minSize) {
      tmp = _this__u8e3s4;
    } else {
      // Inline function 'kotlin.collections.map' call
      var this_0 = until(0, minSize - _this__u8e3s4.get_size_woubt6_k$() | 0);
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        destination.add_utx5q5_k$(element(item));
      }
      tmp = plus(_this__u8e3s4, destination);
    }
    return tmp;
  };
  protoOf(UpdatePeerReviewAllocationUseCase).invoke_i55ofl_k$ = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) {
    var tmp = new $invokeCOROUTINE$26(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UpdatePeerReviewAllocationUseCase).invoke$default_2sne0i_k$ = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion, $super) {
    resetAllocations = resetAllocations === VOID ? false : resetAllocations;
    return $super === VOID ? this.invoke_i55ofl_k$(existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) : $super.invoke_i55ofl_k$.call(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
  };
  function _get_db__ndbzd9_4($this) {
    return $this.db_1;
  }
  function _get_repo__dd1xjt_9($this) {
    return $this.repo_1;
  }
  function AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation) {
    this.$effectiveDb_1 = $effectiveDb;
    this.$person_1 = $person;
    this.$systemPermissions_1 = $systemPermissions;
    this.$createPersonParentApprovalIfMinor_1 = $createPersonParentApprovalIfMinor;
    this.$addedByPersonUid_1 = $addedByPersonUid;
    this.$relationship_1 = $relationship;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddNewPersonUseCase$invoke$slambda).invoke_3n1s9y_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_3n1s9y_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$effectiveDb_1.personDao_e3y77h_k$().insertAsync(this.$person_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.insertedUid0__1 = suspendResult;
            this.personUid1__1 = this.$person_1.get_personUid_mmhd76_k$().equals(new Long(0, 0)) ? this.insertedUid0__1 : this.$person_1.get_personUid_mmhd76_k$();
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.$effectiveDb_1.systemPermissionDao_fl20r8_k$().upsertAsync_5qjk9f_k$(new SystemPermission(VOID, this.personUid1__1, VOID, this.$systemPermissions_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (isDateOfBirthAMinor(Companion_getInstance().fromEpochMilliseconds_e2resj_k$(this.$person_1.get_dateOfBirth_7hv8kx_k$())) ? this.$createPersonParentApprovalIfMinor_1 : false) {
              this.set_state_rjd8d0_k$(3);
              var tmp_0 = this.$effectiveDb_1.personParentJoinDao_gvpro7_k$();
              var tmp0_ppjStatus = Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$();
              var tmp1_ppjApprovalTiemstamp = systemTimeInMillis();
              suspendResult = tmp_0.upsertAsync_5b8ymo_k$(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, this.$addedByPersonUid_1, this.personUid1__1, this.$relationship_1, VOID, VOID, VOID, tmp0_ppjStatus, tmp1_ppjApprovalTiemstamp), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            return this.personUid1__1;
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new AddNewPersonUseCase$invoke$slambda(this.$effectiveDb_1, this.$person_1, this.$systemPermissions_1, this.$createPersonParentApprovalIfMinor_1, this.$addedByPersonUid_1, this.$relationship_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function AddNewPersonUseCase$invoke$slambda_0($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation) {
    var i = new AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_3n1s9y_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddNewPersonUseCase(db, repo) {
    this.db_1 = db;
    this.repo_1 = repo;
  }
  protoOf(AddNewPersonUseCase).invoke_xus240_k$ = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) {
    var tmp0_elvis_lhs = this.repo_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.db_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, AddNewPersonUseCase$invoke$slambda_0(effectiveDb, person, systemPermissions, createPersonParentApprovalIfMinor, addedByPersonUid, relationship, null), $completion);
  };
  protoOf(AddNewPersonUseCase).invoke$default_4vs5qw_k$ = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion, $super) {
    addedByPersonUid = addedByPersonUid === VOID ? new Long(0, 0) : addedByPersonUid;
    createPersonParentApprovalIfMinor = createPersonParentApprovalIfMinor === VOID ? true : createPersonParentApprovalIfMinor;
    systemPermissions = systemPermissions === VOID ? Companion_getInstance_22().get_PERSON_DEFAULT_PERMISSIONS_2jt5wb_k$() : systemPermissions;
    relationship = relationship === VOID ? Companion_getInstance_0().get_RELATIONSHIP_OTHER_uptpyq_k$() : relationship;
    return $super === VOID ? this.invoke_xus240_k$(person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) : $super.invoke_xus240_k$.call(this, person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion);
  };
  function BulkAddPersonException(message, errors) {
    message = message === VOID ? null : message;
    IllegalArgumentException_init_$Init$_0(message, this);
    captureStack(this, BulkAddPersonException);
    this.errors_1 = errors;
  }
  protoOf(BulkAddPersonException).get_errors_czzmno_k$ = function () {
    return this.errors_1;
  };
  protoOf(BulkAddPersonException).toString = function () {
    var tmp0_elvis_lhs = this.message;
    return (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs) + ' ' + joinToString(this.errors_1);
  };
  function Companion_53() {
    Companion_instance_53 = this;
  }
  protoOf(Companion_53).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_50();
  };
  var Companion_instance_53;
  function Companion_getInstance_114() {
    if (Companion_instance_53 == null)
      new Companion_53();
    return Companion_instance_53;
  }
  function $serializer_40() {
    $serializer_instance_40 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsDataError', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('lineNum', false);
    tmp0_serialDesc.addElement_5pzumi_k$('colName', false);
    tmp0_serialDesc.addElement_5pzumi_k$('invalidValue', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_40).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_40).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_40).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return BulkAddPersonsDataError_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_40).serialize_qoevgx_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 0, value.lineNum_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.colName_1);
    tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.invalidValue_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_40).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_qoevgx_k$(encoder, value instanceof BulkAddPersonsDataError ? value : THROW_CCE());
  };
  var $serializer_instance_40;
  function $serializer_getInstance_50() {
    if ($serializer_instance_40 == null)
      new $serializer_40();
    return $serializer_instance_40;
  }
  function BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_50().descriptor_1);
    }
    $this.lineNum_1 = lineNum;
    $this.colName_1 = colName;
    $this.invalidValue_1 = invalidValue;
    return $this;
  }
  function BulkAddPersonsDataError_init_$Create$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker) {
    return BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonsDataError)));
  }
  function BulkAddPersonsDataError(lineNum, colName, invalidValue) {
    Companion_getInstance_114();
    this.lineNum_1 = lineNum;
    this.colName_1 = colName;
    this.invalidValue_1 = invalidValue;
  }
  protoOf(BulkAddPersonsDataError).get_lineNum_46v7rd_k$ = function () {
    return this.lineNum_1;
  };
  protoOf(BulkAddPersonsDataError).get_colName_gyam2q_k$ = function () {
    return this.colName_1;
  };
  protoOf(BulkAddPersonsDataError).get_invalidValue_d468eb_k$ = function () {
    return this.invalidValue_1;
  };
  protoOf(BulkAddPersonsDataError).component1_7eebsc_k$ = function () {
    return this.lineNum_1;
  };
  protoOf(BulkAddPersonsDataError).component2_7eebsb_k$ = function () {
    return this.colName_1;
  };
  protoOf(BulkAddPersonsDataError).component3_7eebsa_k$ = function () {
    return this.invalidValue_1;
  };
  protoOf(BulkAddPersonsDataError).copy_f51phs_k$ = function (lineNum, colName, invalidValue) {
    return new BulkAddPersonsDataError(lineNum, colName, invalidValue);
  };
  protoOf(BulkAddPersonsDataError).copy$default_e03z0z_k$ = function (lineNum, colName, invalidValue, $super) {
    lineNum = lineNum === VOID ? this.lineNum_1 : lineNum;
    colName = colName === VOID ? this.colName_1 : colName;
    invalidValue = invalidValue === VOID ? this.invalidValue_1 : invalidValue;
    return $super === VOID ? this.copy_f51phs_k$(lineNum, colName, invalidValue) : $super.copy_f51phs_k$.call(this, lineNum, colName, invalidValue);
  };
  protoOf(BulkAddPersonsDataError).toString = function () {
    return 'BulkAddPersonsDataError(lineNum=' + this.lineNum_1 + ', colName=' + this.colName_1 + ', invalidValue=' + this.invalidValue_1 + ')';
  };
  protoOf(BulkAddPersonsDataError).hashCode = function () {
    var result = this.lineNum_1;
    result = imul(result, 31) + getStringHashCode(this.colName_1) | 0;
    result = imul(result, 31) + (this.invalidValue_1 == null ? 0 : getStringHashCode(this.invalidValue_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonsDataError).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonsDataError))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonsDataError ? other : THROW_CCE();
    if (!(this.lineNum_1 === tmp0_other_with_cast.lineNum_1))
      return false;
    if (!(this.colName_1 === tmp0_other_with_cast.colName_1))
      return false;
    if (!(this.invalidValue_1 == tmp0_other_with_cast.invalidValue_1))
      return false;
    return true;
  };
  function BulkAddPersonsFromLocalUriUseCase() {
  }
  function Companion_54() {
    Companion_instance_54 = this;
  }
  protoOf(Companion_54).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_51();
  };
  var Companion_instance_54;
  function Companion_getInstance_115() {
    if (Companion_instance_54 == null)
      new Companion_54();
    return Companion_instance_54;
  }
  function $serializer_41() {
    $serializer_instance_41 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsUseCase.BulkAddUsersResult', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('numImported', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_41).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_41).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance()];
  };
  protoOf($serializer_41).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return BulkAddUsersResult_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_41).serialize_xyo1p0_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 0, value.numImported_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_41).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_xyo1p0_k$(encoder, value instanceof BulkAddUsersResult ? value : THROW_CCE());
  };
  var $serializer_instance_41;
  function $serializer_getInstance_51() {
    if ($serializer_instance_41 == null)
      new $serializer_41();
    return $serializer_instance_41;
  }
  function BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_51().descriptor_1);
    }
    $this.numImported_1 = numImported;
    return $this;
  }
  function BulkAddUsersResult_init_$Create$(seen1, numImported, serializationConstructorMarker) {
    return BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, objectCreate(protoOf(BulkAddUsersResult)));
  }
  function BulkAddUsersResult(numImported) {
    Companion_getInstance_115();
    this.numImported_1 = numImported;
  }
  protoOf(BulkAddUsersResult).get_numImported_9iclof_k$ = function () {
    return this.numImported_1;
  };
  protoOf(BulkAddUsersResult).component1_7eebsc_k$ = function () {
    return this.numImported_1;
  };
  protoOf(BulkAddUsersResult).copy_ns6qmb_k$ = function (numImported) {
    return new BulkAddUsersResult(numImported);
  };
  protoOf(BulkAddUsersResult).copy$default_nx4ua1_k$ = function (numImported, $super) {
    numImported = numImported === VOID ? this.numImported_1 : numImported;
    return $super === VOID ? this.copy_ns6qmb_k$(numImported) : $super.copy_ns6qmb_k$.call(this, numImported);
  };
  protoOf(BulkAddUsersResult).toString = function () {
    return 'BulkAddUsersResult(numImported=' + this.numImported_1 + ')';
  };
  protoOf(BulkAddUsersResult).hashCode = function () {
    return this.numImported_1;
  };
  protoOf(BulkAddUsersResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddUsersResult))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddUsersResult ? other : THROW_CCE();
    if (!(this.numImported_1 === tmp0_other_with_cast.numImported_1))
      return false;
    return true;
  };
  function BulkAddOnProgress() {
  }
  function BulkAddPersonsUseCase() {
  }
  function IAsYouTypeFormatter() {
  }
  function IPhoneNumber() {
  }
  function IPhoneNumberUtil() {
  }
  function formatInternationalOrNull(_this__u8e3s4, number) {
    var tmp;
    try {
      tmp = _this__u8e3s4.formatInternational_ogf61k_k$(_this__u8e3s4.parse_k6akgw_k$(number, 'US'));
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var e = $p;
        tmp_0 = null;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function OnClickPhoneNumUseCase() {
  }
  function PhoneNumValidatorUseCase() {
  }
  function OnClickEmailUseCase() {
  }
  function ShareAppUseCase() {
  }
  function ShareTextUseCase() {
  }
  function _get_showPoweredBy__slqzt9($this) {
    return $this.showPoweredBy_1;
  }
  function GetShowPoweredByUseCase(showPoweredBy) {
    this.showPoweredBy_1 = showPoweredBy;
  }
  protoOf(GetShowPoweredByUseCase).invoke_jkqnwo_k$ = function () {
    return this.showPoweredBy_1;
  };
  function _get_supportedLangConfig__llzj1v($this) {
    return $this.supportedLangConfig_1;
  }
  function _get_repo__dd1xjt_10($this) {
    return $this.repo_1;
  }
  function Companion_55() {
    Companion_instance_55 = this;
    this.FALLBACK_1 = 'en';
  }
  protoOf(Companion_55).get_FALLBACK_69r8t1_k$ = function () {
    return this.FALLBACK_1;
  };
  var Companion_instance_55;
  function Companion_getInstance_116() {
    if (Companion_instance_55 == null)
      new Companion_55();
    return Companion_instance_55;
  }
  function $invokeCOROUTINE$27(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
  }
  protoOf($invokeCOROUTINE$27).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.preferredLocales0__1 = plus(listOf_0(this._this__u8e3s4__1.supportedLangConfig_1.get_displayedLocale_vlg2wi_k$()), this._this__u8e3s4__1.supportedLangConfig_1.get_systemLocales_x3efi7_k$());
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.repo_1.siteTermsDao_wa3vn6_k$().findAvailableSiteTermLanguages_tjerik_k$(1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            var availableLocales = filterNotNull(ARGUMENT);
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.preferredLocales0__1.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                if (availableLocales.contains_aljjnj_k$(element)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp0_elvis_lhs = tmp$ret$0;
            return tmp0_elvis_lhs == null ? 'en' : tmp0_elvis_lhs;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function GetLocaleForSiteTermsUseCase(supportedLangConfig, repo) {
    Companion_getInstance_116();
    this.supportedLangConfig_1 = supportedLangConfig;
    this.repo_1 = repo;
  }
  protoOf(GetLocaleForSiteTermsUseCase).invoke_5dq5ij_k$ = function ($completion) {
    var tmp = new $invokeCOROUTINE$27(this, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function OnClickSendSmsUseCase() {
  }
  function _get_SOCIAL_WARNING_DISMISSED_PREFIX__x6py9g($this) {
    return $this.SOCIAL_WARNING_DISMISSED_PREFIX_1;
  }
  function _get_settings__lbkut4_0($this) {
    return $this.settings_1;
  }
  function Companion_56() {
    Companion_instance_56 = this;
    this.SOCIAL_WARNING_DISMISSED_PREFIX_1 = 'dismissed-social-warning-';
  }
  var Companion_instance_56;
  function Companion_getInstance_117() {
    if (Companion_instance_56 == null)
      new Companion_56();
    return Companion_instance_56;
  }
  function DismissSocialWarningUseCase(settings) {
    Companion_getInstance_117();
    this.settings_1 = settings;
  }
  protoOf(DismissSocialWarningUseCase).invoke_nokysy_k$ = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    // Inline function 'com.russhwolf.settings.set' call
    this.settings_1.putBoolean_wwpo7g_k$(key, true);
  };
  function _get_SOCIAL_WARNING_DISMISSED_PREFIX__x6py9g_0($this) {
    return $this.SOCIAL_WARNING_DISMISSED_PREFIX_1;
  }
  function _get_settings__lbkut4_1($this) {
    return $this.settings_1;
  }
  function Companion_57() {
    Companion_instance_57 = this;
    this.SOCIAL_WARNING_DISMISSED_PREFIX_1 = 'dismissed-social-warning-';
    this.SOCIAL_WARNING_WEB_URL_1 = 'https://beinternetawesome.withgoogle.com';
  }
  protoOf(Companion_57).get_SOCIAL_WARNING_WEB_URL_soql6w_k$ = function () {
    return this.SOCIAL_WARNING_WEB_URL_1;
  };
  var Companion_instance_57;
  function Companion_getInstance_118() {
    if (Companion_instance_57 == null)
      new Companion_57();
    return Companion_instance_57;
  }
  function ShowSocialWarningUseCase(settings) {
    Companion_getInstance_118();
    this.settings_1 = settings;
  }
  protoOf(ShowSocialWarningUseCase).invoke_lt562m_k$ = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    return !this.settings_1.getBoolean_95o09p_k$(key, false);
  };
  function _get_chunkInfo__nu1bzq($this) {
    return $this.chunkInfo_1;
  }
  function _set_index__fyfqnn($this, _set____db54di) {
    $this.index_1 = _set____db54di;
  }
  function _get_index__g2optt($this) {
    return $this.index_1;
  }
  function ChunkIterator(chunkInfo) {
    this.chunkInfo_1 = chunkInfo;
    this.index_1 = 0;
  }
  protoOf(ChunkIterator).hasNext_bitz1p_k$ = function () {
    return this.index_1 < this.chunkInfo_1.numChunks_1;
  };
  protoOf(ChunkIterator).next_20eer_k$ = function () {
    // Inline function 'kotlin.also' call
    var this_0 = this.chunkInfo_1.get_c1px32_k$(this.index_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkIterator.next.<anonymous>' call
    this.index_1 = this.index_1 + 1 | 0;
    return this_0;
  };
  function Chunk(start, end, isLastChunk, size) {
    size = size === VOID ? end.minus_mfbszm_k$(start).toInt_1tsl84_k$() : size;
    this.start_1 = start;
    this.end_1 = end;
    this.isLastChunk_1 = isLastChunk;
    this.size_1 = size;
  }
  protoOf(Chunk).get_start_iypx6h_k$ = function () {
    return this.start_1;
  };
  protoOf(Chunk).get_end_18j6ha_k$ = function () {
    return this.end_1;
  };
  protoOf(Chunk).get_isLastChunk_4s8nb0_k$ = function () {
    return this.isLastChunk_1;
  };
  protoOf(Chunk).get_size_woubt6_k$ = function () {
    return this.size_1;
  };
  protoOf(Chunk).component1_7eebsc_k$ = function () {
    return this.start_1;
  };
  protoOf(Chunk).component2_7eebsb_k$ = function () {
    return this.end_1;
  };
  protoOf(Chunk).component3_7eebsa_k$ = function () {
    return this.isLastChunk_1;
  };
  protoOf(Chunk).component4_7eebs9_k$ = function () {
    return this.size_1;
  };
  protoOf(Chunk).copy_vej5rs_k$ = function (start, end, isLastChunk, size) {
    return new Chunk(start, end, isLastChunk, size);
  };
  protoOf(Chunk).copy$default_x5xs09_k$ = function (start, end, isLastChunk, size, $super) {
    start = start === VOID ? this.start_1 : start;
    end = end === VOID ? this.end_1 : end;
    isLastChunk = isLastChunk === VOID ? this.isLastChunk_1 : isLastChunk;
    size = size === VOID ? this.size_1 : size;
    return $super === VOID ? this.copy_vej5rs_k$(start, end, isLastChunk, size) : $super.copy_vej5rs_k$.call(this, start, end, isLastChunk, size);
  };
  protoOf(Chunk).toString = function () {
    return 'Chunk(start=' + this.start_1.toString() + ', end=' + this.end_1.toString() + ', isLastChunk=' + this.isLastChunk_1 + ', size=' + this.size_1 + ')';
  };
  protoOf(Chunk).hashCode = function () {
    var result = this.start_1.hashCode();
    result = imul(result, 31) + this.end_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isLastChunk_1) | 0;
    result = imul(result, 31) + this.size_1 | 0;
    return result;
  };
  protoOf(Chunk).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Chunk))
      return false;
    var tmp0_other_with_cast = other instanceof Chunk ? other : THROW_CCE();
    if (!this.start_1.equals(tmp0_other_with_cast.start_1))
      return false;
    if (!this.end_1.equals(tmp0_other_with_cast.end_1))
      return false;
    if (!(this.isLastChunk_1 === tmp0_other_with_cast.isLastChunk_1))
      return false;
    if (!(this.size_1 === tmp0_other_with_cast.size_1))
      return false;
    return true;
  };
  function _get_chunksTotalSize__rla7wy($this) {
    return $this.chunksTotalSize_1;
  }
  function ChunkInfo(totalSize, chunkSize, fromByte) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    this.totalSize_1 = totalSize;
    this.chunkSize_1 = chunkSize;
    this.fromByte_1 = fromByte;
    this.chunksTotalSize_1 = this.totalSize_1.minus_mfbszm_k$(this.fromByte_1);
    var tmp = this;
    // Inline function 'kotlin.comparisons.maxOf' call
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.Long.div' call
    var this_0 = this.chunksTotalSize_1;
    var other = this.chunkSize_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkInfo.numChunks.<anonymous>' call
    var it = this_0.div_jun7gj_k$(toLong(other));
    var tmp_0;
    // Inline function 'kotlin.mod' call
    var this_1 = this.chunksTotalSize_1;
    var other_0 = this.chunkSize_1;
    // Inline function 'kotlin.mod' call
    var other_1 = toLong(other_0);
    var r = this_1.rem_bsnl9o_k$(other_1);
    if (!(r.plus_r93sks_k$(other_1.and_4spn93_k$(r.xor_qzz94j_k$(other_1).and_4spn93_k$(r.or_v7fvkl_k$(r.unaryMinus_6uz0qp_k$())).shr_9fl3wl_k$(63))).toInt_1tsl84_k$() === 0)) {
      // Inline function 'kotlin.Long.plus' call
      tmp_0 = it.plus_r93sks_k$(toLong(1));
    } else {
      tmp_0 = it;
    }
    var a = tmp_0.toInt_1tsl84_k$();
    tmp.numChunks_1 = Math.max(a, 1);
  }
  protoOf(ChunkInfo).get_totalSize_116z44_k$ = function () {
    return this.totalSize_1;
  };
  protoOf(ChunkInfo).get_chunkSize_sysm8r_k$ = function () {
    return this.chunkSize_1;
  };
  protoOf(ChunkInfo).get_fromByte_imtqqj_k$ = function () {
    return this.fromByte_1;
  };
  protoOf(ChunkInfo).get_numChunks_l65t7n_k$ = function () {
    return this.numChunks_1;
  };
  protoOf(ChunkInfo).iterator_jk1svi_k$ = function () {
    return new ChunkIterator(this);
  };
  protoOf(ChunkInfo).get_c1px32_k$ = function (index) {
    var start = numberToLong(index).times_nfzjiw_k$(toLong(this.chunkSize_1)).plus_r93sks_k$(this.fromByte_1);
    // Inline function 'kotlin.math.min' call
    // Inline function 'kotlin.Long.plus' call
    var other = this.chunkSize_1;
    var a = start.plus_r93sks_k$(toLong(other));
    var b = this.totalSize_1;
    var end = a.compareTo_9jj042_k$(b) <= 0 ? a : b;
    var isLastChunk = index === (this.numChunks_1 - 1 | 0);
    return new Chunk(start, end, isLastChunk);
  };
  function UploadChunkGetter() {
  }
  function ChunkedUploadClientChunkGetterUseCase$invoke$lambda(it) {
    return Unit_getInstance();
  }
  function ChunkedUploadClientChunkGetterUseCase$invoke$lambda_0(it) {
    return Unit_getInstance();
  }
  function ChunkedUploadClientChunkGetterUseCase() {
  }
  function UploadProgress(bytesTransferred, totalBytes) {
    this.bytesTransferred_1 = bytesTransferred;
    this.totalBytes_1 = totalBytes;
  }
  protoOf(UploadProgress).get_bytesTransferred_x053w_k$ = function () {
    return this.bytesTransferred_1;
  };
  protoOf(UploadProgress).get_totalBytes_wa2n74_k$ = function () {
    return this.totalBytes_1;
  };
  protoOf(UploadProgress).component1_7eebsc_k$ = function () {
    return this.bytesTransferred_1;
  };
  protoOf(UploadProgress).component2_7eebsb_k$ = function () {
    return this.totalBytes_1;
  };
  protoOf(UploadProgress).copy_cwfd3f_k$ = function (bytesTransferred, totalBytes) {
    return new UploadProgress(bytesTransferred, totalBytes);
  };
  protoOf(UploadProgress).copy$default_rfdwbg_k$ = function (bytesTransferred, totalBytes, $super) {
    bytesTransferred = bytesTransferred === VOID ? this.bytesTransferred_1 : bytesTransferred;
    totalBytes = totalBytes === VOID ? this.totalBytes_1 : totalBytes;
    return $super === VOID ? this.copy_cwfd3f_k$(bytesTransferred, totalBytes) : $super.copy_cwfd3f_k$.call(this, bytesTransferred, totalBytes);
  };
  protoOf(UploadProgress).toString = function () {
    return 'UploadProgress(bytesTransferred=' + this.bytesTransferred_1.toString() + ', totalBytes=' + this.totalBytes_1.toString() + ')';
  };
  protoOf(UploadProgress).hashCode = function () {
    var result = this.bytesTransferred_1.hashCode();
    result = imul(result, 31) + this.totalBytes_1.hashCode() | 0;
    return result;
  };
  protoOf(UploadProgress).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UploadProgress))
      return false;
    var tmp0_other_with_cast = other instanceof UploadProgress ? other : THROW_CCE();
    if (!this.bytesTransferred_1.equals(tmp0_other_with_cast.bytesTransferred_1))
      return false;
    if (!this.totalBytes_1.equals(tmp0_other_with_cast.totalBytes_1))
      return false;
    return true;
  };
  function LastChunkResponse(body, statusCode, headers) {
    this.body_1 = body;
    this.statusCode_1 = statusCode;
    this.headers_1 = headers;
  }
  protoOf(LastChunkResponse).get_body_wojkyz_k$ = function () {
    return this.body_1;
  };
  protoOf(LastChunkResponse).get_statusCode_g2w4u0_k$ = function () {
    return this.statusCode_1;
  };
  protoOf(LastChunkResponse).get_headers_ef25jx_k$ = function () {
    return this.headers_1;
  };
  protoOf(LastChunkResponse).component1_7eebsc_k$ = function () {
    return this.body_1;
  };
  protoOf(LastChunkResponse).component2_7eebsb_k$ = function () {
    return this.statusCode_1;
  };
  protoOf(LastChunkResponse).component3_7eebsa_k$ = function () {
    return this.headers_1;
  };
  protoOf(LastChunkResponse).copy_1pi4hb_k$ = function (body, statusCode, headers) {
    return new LastChunkResponse(body, statusCode, headers);
  };
  protoOf(LastChunkResponse).copy$default_1djwwz_k$ = function (body, statusCode, headers, $super) {
    body = body === VOID ? this.body_1 : body;
    statusCode = statusCode === VOID ? this.statusCode_1 : statusCode;
    headers = headers === VOID ? this.headers_1 : headers;
    return $super === VOID ? this.copy_1pi4hb_k$(body, statusCode, headers) : $super.copy_1pi4hb_k$.call(this, body, statusCode, headers);
  };
  protoOf(LastChunkResponse).toString = function () {
    return 'LastChunkResponse(body=' + this.body_1 + ', statusCode=' + this.statusCode_1 + ', headers=' + this.headers_1 + ')';
  };
  protoOf(LastChunkResponse).hashCode = function () {
    var result = this.body_1 == null ? 0 : getStringHashCode(this.body_1);
    result = imul(result, 31) + this.statusCode_1 | 0;
    result = imul(result, 31) + hashCode(this.headers_1) | 0;
    return result;
  };
  protoOf(LastChunkResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LastChunkResponse))
      return false;
    var tmp0_other_with_cast = other instanceof LastChunkResponse ? other : THROW_CCE();
    if (!(this.body_1 == tmp0_other_with_cast.body_1))
      return false;
    if (!(this.statusCode_1 === tmp0_other_with_cast.statusCode_1))
      return false;
    if (!equals(this.headers_1, tmp0_other_with_cast.headers_1))
      return false;
    return true;
  };
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda(it) {
    return Unit_getInstance();
  }
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda_0(it) {
    return Unit_getInstance();
  }
  function ChunkedUploadClientLocalUriUseCase() {
  }
  function _get_localUri__4kpv56($this) {
    return $this.localUri_1;
  }
  function _get_uriHelper__vzpi21($this) {
    return $this.uriHelper_1;
  }
  function _get_finalHeaders__1yui91($this) {
    return $this.finalHeaders_1;
  }
  function $invokeCOROUTINE$28(_this__u8e3s4, chunk, buffer, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.chunk_1 = chunk;
    this.buffer_1 = buffer;
  }
  protoOf($invokeCOROUTINE$28).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(10);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.uriHelper_1.openSource_nv7fh5_k$(this._this__u8e3s4__1.localUri_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_0 = suspendResult;
            var exception = null;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(6);
            this.set_exceptionState_fex74n_k$(5);
            var it = this_0;
            it.skip_bgd4sf_k$(this.chunk_1.get_start_iypx6h_k$());
            readTo(it, this.buffer_1, 0, this.chunk_1.get_size_woubt6_k$());
            this.set_exceptionState_fex74n_k$(10);
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 5:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              exception = e;
              throw e;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 6:
            this.set_exceptionState_fex74n_k$(10);
            var t = this.get_exception_x0n6w6_k$();
            closeFinally(this_0, exception);
            throw t;
          case 7:
            this.set_exceptionState_fex74n_k$(10);
            var tmp_1 = this;
            closeFinally(this_0, exception);
            tmp_1.tmp$ret$40__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 8:
            this.set_exceptionState_fex74n_k$(10);
            closeFinally(this_0, exception);
            if (false) {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            var tmp_2;
            if (this.chunk_1.get_isLastChunk_4s8nb0_k$() ? !(this._this__u8e3s4__1.finalHeaders_1 == null) : false) {
              tmp_2 = new ChunkResponseInfo(toMap_1(this._this__u8e3s4__1.finalHeaders_1));
            } else {
              tmp_2 = null;
            }

            return tmp_2;
          case 10:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 10) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  function _get_httpClient__2ty1zc_2($this) {
    return $this.httpClient_1;
  }
  function _get_uriHelper__vzpi21_0($this) {
    return $this.uriHelper_1;
  }
  function ChunkResponseInfo(extraHeaders) {
    extraHeaders = extraHeaders === VOID ? emptyMap() : extraHeaders;
    this.extraHeaders_1 = extraHeaders;
  }
  protoOf(ChunkResponseInfo).get_extraHeaders_wd299d_k$ = function () {
    return this.extraHeaders_1;
  };
  protoOf(ChunkResponseInfo).component1_7eebsc_k$ = function () {
    return this.extraHeaders_1;
  };
  protoOf(ChunkResponseInfo).copy_664jrt_k$ = function (extraHeaders) {
    return new ChunkResponseInfo(extraHeaders);
  };
  protoOf(ChunkResponseInfo).copy$default_24ypu2_k$ = function (extraHeaders, $super) {
    extraHeaders = extraHeaders === VOID ? this.extraHeaders_1 : extraHeaders;
    return $super === VOID ? this.copy_664jrt_k$(extraHeaders) : $super.copy_664jrt_k$.call(this, extraHeaders);
  };
  protoOf(ChunkResponseInfo).toString = function () {
    return 'ChunkResponseInfo(extraHeaders=' + this.extraHeaders_1 + ')';
  };
  protoOf(ChunkResponseInfo).hashCode = function () {
    return hashCode(this.extraHeaders_1);
  };
  protoOf(ChunkResponseInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ChunkResponseInfo))
      return false;
    var tmp0_other_with_cast = other instanceof ChunkResponseInfo ? other : THROW_CCE();
    if (!equals(this.extraHeaders_1, tmp0_other_with_cast.extraHeaders_1))
      return false;
    return true;
  };
  function LocalUriChunkGetter(localUri, uriHelper, finalHeaders) {
    finalHeaders = finalHeaders === VOID ? null : finalHeaders;
    this.localUri_1 = localUri;
    this.uriHelper_1 = uriHelper;
    this.finalHeaders_1 = finalHeaders;
  }
  protoOf(LocalUriChunkGetter).invoke_u0knh_k$ = function (chunk, buffer, $completion) {
    var tmp = new $invokeCOROUTINE$28(this, chunk, buffer, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function Companion_58() {
    Companion_instance_58 = this;
    this.DEFAULT_CHUNK_SIZE_1 = 524288;
  }
  protoOf(Companion_58).get_DEFAULT_CHUNK_SIZE_c0dc7u_k$ = function () {
    return this.DEFAULT_CHUNK_SIZE_1;
  };
  var Companion_instance_58;
  function Companion_getInstance_119() {
    if (Companion_instance_58 == null)
      new Companion_58();
    return Companion_instance_58;
  }
  function ChunkedUploadClientUseCaseKtorImpl$invoke$lambda($onProgress, $totalSize) {
    return function (it) {
      $onProgress(new UploadProgress(it, $totalSize));
      return Unit_getInstance();
    };
  }
  function ChunkedUploadClientUseCaseKtorImpl$invoke$lambda_0($uploadUuid, $totalSize, $chunkInfo, $remoteUrl, $fromByte) {
    return function () {
      return 'ChunkedUploadClientUseCase(' + $uploadUuid + '): Uploading ' + $totalSize.toString() + ' bytes in ' + ('' + $chunkInfo.get_numChunks_l65t7n_k$() + ' chunks to ' + $remoteUrl + ' starting from byte=' + $fromByte.toString());
    };
  }
  function ChunkedUploadClientUseCaseKtorImpl$invoke$lambda_1($uploadUuid, $totalSize, $chunkInfo, $remoteUrl) {
    return function () {
      return 'ChunkedUploadClientUseCase(' + $uploadUuid + '): Upload complete of ' + $totalSize.toString() + ' bytes in ' + ('' + $chunkInfo.get_numChunks_l65t7n_k$() + ' chunks to ' + $remoteUrl);
    };
  }
  function $invokeCOROUTINE$29(_this__u8e3s4, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.uploadUuid_1 = uploadUuid;
    this.localUri_1 = localUri;
    this.remoteUrl_1 = remoteUrl;
    this.fromByte_1 = fromByte;
    this.chunkSize_1 = chunkSize;
    this.onProgress_1 = onProgress;
    this.onStatusChange_1 = onStatusChange;
    this.lastChunkHeaders_1 = lastChunkHeaders;
  }
  protoOf($invokeCOROUTINE$29).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.uriHelper_1.getSize_r31mtv_k$(this.localUri_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.totalSize0__1 = suspendResult;
            this.tmp0_getChunk1__1 = new LocalUriChunkGetter(this.localUri_1, this._this__u8e3s4__1.uriHelper_1);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.invoke_ghx818_k$(this.uploadUuid_1, this.totalSize0__1, this.tmp0_getChunk1__1, this.remoteUrl_1, this.fromByte_1, this.chunkSize_1, ChunkedUploadClientUseCaseKtorImpl$invoke$lambda(this.onProgress_1, this.totalSize0__1), this.onStatusChange_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $invokeCOROUTINE$30(_this__u8e3s4, uploadUuid, totalSize, getChunk, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.uploadUuid_1 = uploadUuid;
    this.totalSize_1 = totalSize;
    this.getChunk_1 = getChunk;
    this.remoteUrl_1 = remoteUrl;
    this.fromByte_1 = fromByte;
    this.chunkSize_1 = chunkSize;
    this.onProgress_1 = onProgress;
    this.onStatusChange_1 = onStatusChange;
  }
  protoOf($invokeCOROUTINE$30).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(10);
            if (this.totalSize_1.compareTo_9jj042_k$(new Long(0, 0)) < 0)
              throw IllegalArgumentException_init_$Create$('Upload size < 0');
            this.chunkInfo0__1 = new ChunkInfo(this.totalSize_1, this.chunkSize_1, this.fromByte_1);
            var tmp_0 = Napier_getInstance();
            tmp_0.d$default_iccotn_k$(VOID, VOID, ChunkedUploadClientUseCaseKtorImpl$invoke$lambda_0(this.uploadUuid_1, this.totalSize_1, this.chunkInfo0__1, this.remoteUrl_1, this.fromByte_1));
            this.set_exceptionState_fex74n_k$(8);
            this.buffer1__1 = new Int8Array(this.chunkSize_1);
            this.onStatusChange_1(TransferJobItemStatus_IN_PROGRESS_getInstance());
            var tmp_1 = this;
            tmp_1.this2__1 = this.chunkInfo0__1;
            this.tmp0_iterator3__1 = this.this2__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            if (!this.tmp0_iterator3__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

            this.element4__1 = this.tmp0_iterator3__1.next_20eer_k$();
            var tmp_2 = this;
            tmp_2.chunk5__1 = this.element4__1;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.getChunk_1.invoke_u0knh_k$(this.chunk5__1, this.buffer1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.chunkResponseInfo6__1 = suspendResult;
            var tmp_3 = this;
            tmp_3.this7__1 = this._this__u8e3s4__1.httpClient_1;
            var tmp_4 = this;
            tmp_4.urlString8__1 = this.remoteUrl_1;
            var tmp_5 = this;
            tmp_5.this9__1 = this.this7__1;
            var tmp_6 = this;
            tmp_6.this10__1 = this.this9__1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString8__1);
            header(this_0, get_HEADER_UPLOAD_UUID(), this.uploadUuid_1);
            header(this_0, get_HEADER_IS_FINAL_CHUNK(), this.chunk5__1.get_isLastChunk_4s8nb0_k$().toString());
            header(this_0, get_HEADER_UPLOAD_START_BYTE(), this.chunk5__1.get_start_iypx6h_k$().toString());
            var tmp0_safe_receiver = this.chunkResponseInfo6__1;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.extraHeaders_1;
            if (tmp1_safe_receiver == null)
              null;
            else {
              var tmp0_iterator = tmp1_safe_receiver.get_entries_p20ztl_k$().iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                var tmp0_iterator_0 = element.get_value_j01efc_k$().iterator_jk1svi_k$();
                while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                  var element_0 = tmp0_iterator_0.next_20eer_k$();
                  header(this_0, element.get_key_18j28a_k$(), element_0);
                }
              }
            }

            set_expectSuccess(this_0, true);
            var body = ByteReadChannel(this.buffer1__1, 0, this.chunk5__1.get_size_woubt6_k$());
            if (body == null) {
              this_0.set_body_slfhxt_k$(NullBody_getInstance());
              var tmp_8 = JsType_getInstance();
              var tmp_9 = getKClass(ByteReadChannel_0);
              var tmp_10;
              try {
                tmp_10 = createKType(getKClass(ByteReadChannel_0), arrayOf([]), false);
              } catch ($p) {
                var tmp_11;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_11 = null;
                } else {
                  throw $p;
                }
                tmp_10 = tmp_11;
              }
              this_0.set_bodyType_8pgqkl_k$(typeInfoImpl(tmp_8, tmp_9, tmp_10));
            } else {
              if (body instanceof OutgoingContent) {
                this_0.set_body_slfhxt_k$(body);
                this_0.set_bodyType_8pgqkl_k$(null);
              } else {
                this_0.set_body_slfhxt_k$(body);
                var tmp_12 = JsType_getInstance();
                var tmp_13 = getKClass(ByteReadChannel_0);
                var tmp_14;
                try {
                  tmp_14 = createKType(getKClass(ByteReadChannel_0), arrayOf([]), false);
                } catch ($p) {
                  var tmp_15;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_15 = null;
                  } else {
                    throw $p;
                  }
                  tmp_14 = tmp_15;
                }
                this_0.set_bodyType_8pgqkl_k$(typeInfoImpl(tmp_12, tmp_13, tmp_14));
              }
            }

            tmp_7.builder11__1 = this_0;
            this.builder11__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Post_wo83k9_k$());
            var tmp_16 = this;
            tmp_16.this12__1 = this.this10__1;
            var tmp_17 = this;
            tmp_17.builder13__1 = this.builder11__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = (new HttpStatement(this.builder13__1, this.this12__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.response14__1 = suspendResult;
            var this_1 = this.chunk5__1.get_start_iypx6h_k$();
            var other = this.chunk5__1.get_size_woubt6_k$();
            this.onProgress_1(this_1.plus_r93sks_k$(toLong(other)));
            if (this.chunk5__1.get_isLastChunk_4s8nb0_k$()) {
              var tmp_18 = Napier_getInstance();
              tmp_18.d$default_iccotn_k$(VOID, VOID, ChunkedUploadClientUseCaseKtorImpl$invoke$lambda_1(this.uploadUuid_1, this.totalSize_1, this.chunkInfo0__1, this.remoteUrl_1));
              this.onStatusChange_1(TransferJobItemStatus_COMPLETE_getInstance());
              if (this.response14__1.get_status_jnf6d7_k$().equals(Companion_getInstance_6().get_OK_kntokb_k$())) {
                this.set_state_rjd8d0_k$(5);
                suspendResult = bodyAsText(this.response14__1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_19 = this;
                tmp_19.WHEN_RESULT15__1 = null;
                this.set_state_rjd8d0_k$(6);
                continue $sm;
              }
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 4:
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 5:
            this.WHEN_RESULT15__1 = suspendResult;
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 6:
            var ARGUMENT = this.WHEN_RESULT15__1;
            return new LastChunkResponse(ARGUMENT, this.response14__1.get_status_jnf6d7_k$().get_value_j01efc_k$(), asIStringValues(this.response14__1.get_headers_ef25jx_k$()));
          case 7:
            throw IllegalStateException_init_$Create$('Should have returned after lastChunk');
          case 8:
            this.set_exceptionState_fex74n_k$(10);
            var tmp_20 = this.get_exception_x0n6w6_k$();
            if (tmp_20 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              Napier_getInstance().e$default_pvzj32_k$('ChunkedUploadClientUseCase(' + this.uploadUuid_1 + '): Exception uploading', e);
              throw e;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 9:
            this.set_exceptionState_fex74n_k$(10);
            return Unit_getInstance();
          case 10:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 10) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  function ChunkedUploadClientUseCaseKtorImpl(httpClient, uriHelper) {
    Companion_getInstance_119();
    this.httpClient_1 = httpClient;
    this.uriHelper_1 = uriHelper;
  }
  protoOf(ChunkedUploadClientUseCaseKtorImpl).invoke_yh6k1z_k$ = function (uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) {
    var tmp = new $invokeCOROUTINE$29(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ChunkedUploadClientUseCaseKtorImpl).invoke_ghx818_k$ = function (uploadUuid, totalSize, getChunk, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, $completion) {
    var tmp = new $invokeCOROUTINE$30(this, uploadUuid, totalSize, getChunk, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function get_HEADER_UPLOAD_UUID() {
    return HEADER_UPLOAD_UUID;
  }
  var HEADER_UPLOAD_UUID;
  function get_HEADER_IS_FINAL_CHUNK() {
    return HEADER_IS_FINAL_CHUNK;
  }
  var HEADER_IS_FINAL_CHUNK;
  function get_HEADER_UPLOAD_START_BYTE() {
    return HEADER_UPLOAD_START_BYTE;
  }
  var HEADER_UPLOAD_START_BYTE;
  function get_DEFAULT_CHUNK_SIZE() {
    return DEFAULT_CHUNK_SIZE;
  }
  var DEFAULT_CHUNK_SIZE;
  function _get_httpClient__2ty1zc_3($this) {
    return $this.httpClient_1;
  }
  function _get_learningSpace__h4keh_4($this) {
    return $this.learningSpace_1;
  }
  function GetUsernameSuggestionUseCase$invoke$lambda($usernameSuggestion) {
    return function () {
      return 'GetUsernameSuggestionUseCase:  ' + $usernameSuggestion;
    };
  }
  function GetUsernameSuggestionUseCase$invoke$lambda_0($e) {
    return function () {
      return 'GetUsernameSuggestionUseCase:-  exception ' + $e;
    };
  }
  function $invokeCOROUTINE$31(_this__u8e3s4, name, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.name_1 = name;
  }
  protoOf($invokeCOROUTINE$31).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            tmp_0.this0__1 = this._this__u8e3s4__1.httpClient_1;
            var tmp_1 = this;
            tmp_1.this1__1 = this.this0__1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this._this__u8e3s4__1.learningSpace_1.get_url_18iuii_k$(), '/') + '/api/username/getsuggestion');
            parameter(this_0, 'name', this.name_1);
            tmp_2.builder2__1 = this_0;
            this.builder2__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Post_wo83k9_k$());
            var tmp_3 = this;
            tmp_3.this3__1 = this.this1__1;
            var tmp_4 = this;
            tmp_4.builder4__1 = this.builder2__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder4__1, this.this3__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT5__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsText(this.ARGUMENT5__1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var usernameSuggestion = suspendResult;
            var tmp_5 = Napier_getInstance();
            tmp_5.d$default_iccotn_k$(VOID, VOID, GetUsernameSuggestionUseCase$invoke$lambda(usernameSuggestion));
            return usernameSuggestion;
          case 3:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_6 = this.get_exception_x0n6w6_k$();
            if (tmp_6 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_7 = Napier_getInstance();
              tmp_7.d$default_iccotn_k$(VOID, VOID, GetUsernameSuggestionUseCase$invoke$lambda_0(e));
              throw e;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 4:
            throw this.get_exception_x0n6w6_k$();
          case 5:
            this.set_exceptionState_fex74n_k$(4);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  function GetUsernameSuggestionUseCase(httpClient, learningSpace) {
    this.httpClient_1 = httpClient;
    this.learningSpace_1 = learningSpace;
  }
  protoOf(GetUsernameSuggestionUseCase).invoke_7h204h_k$ = function (name, $completion) {
    var tmp = new $invokeCOROUTINE$31(this, name, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function _get_accountManager__5euyz_0($this) {
    return $this.accountManager_1;
  }
  function StartUserSessionUseCase(accountManager) {
    this.accountManager_1 = accountManager;
  }
  protoOf(StartUserSessionUseCase).invoke_bwdojy_k$ = function (session, nextDest, navController, goOptions, dontSetCurrentSession) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.accountManager_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.domain.usersession.StartUserSessionUseCase.invoke.<anonymous>' call
    if (!dontSetCurrentSession) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver != null) {
      tmp0_safe_receiver.set_currentUserSession_3cktus_k$(session);
    }
    navigateToViewUri(navController, appendSelectedAccount(nextDest, session.get_person_i0c866_k$().get_personUid_mmhd76_k$(), session.get_learningSpace_sz4skh_k$()), goOptions);
  };
  protoOf(StartUserSessionUseCase).invoke$default_pefs6_k$ = function (session, nextDest, navController, goOptions, dontSetCurrentSession, $super) {
    nextDest = nextDest === VOID ? Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$() : nextDest;
    goOptions = goOptions === VOID ? new UstadGoOptions(VOID, VOID, true) : goOptions;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    var tmp;
    if ($super === VOID) {
      this.invoke_bwdojy_k$(session, nextDest, navController, goOptions, dontSetCurrentSession);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.invoke_bwdojy_k$.call(this, session, nextDest, navController, goOptions, dontSetCurrentSession);
    }
    return tmp;
  };
  function ValidateEmailUseCase() {
  }
  protoOf(ValidateEmailUseCase).invoke_lt562m_k$ = function (email) {
    // Inline function 'kotlin.text.trim' call
    var trimmed = toString(trim(isCharSequence(email) ? email : THROW_CCE()));
    var atPos = indexOf(trimmed, _Char___init__impl__6a9atx(64));
    if (atPos === -1)
      return null;
    if (indexOf(trimmed, _Char___init__impl__6a9atx(46), atPos) === -1)
      return null;
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.text.any' call
      var inductionVariable = 0;
      while (inductionVariable < charSequenceLength(trimmed)) {
        var element = charSequenceGet(trimmed, inductionVariable);
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.domain.validateemail.ValidateEmailUseCase.invoke.<anonymous>' call
        if (((isWhitespace(element) ? true : element === _Char___init__impl__6a9atx(91)) ? true : element === _Char___init__impl__6a9atx(93)) ? true : element === _Char___init__impl__6a9atx(92)) {
          tmp$ret$2 = true;
          break $l$block;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2)
      return null;
    return trimmed;
  };
  function _get_MIN_LENGTH__6bgi3s($this) {
    return $this.MIN_LENGTH_1;
  }
  function _get_MAX_LENGTH__4vv88a($this) {
    return $this.MAX_LENGTH_1;
  }
  function Companion_59() {
    Companion_instance_59 = this;
    this.MIN_LENGTH_1 = 3;
    this.MAX_LENGTH_1 = 30;
    this.ALLOWED_SPECIAL_1 = setOf([new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95))]);
  }
  protoOf(Companion_59).get_ALLOWED_SPECIAL_m8wwsn_k$ = function () {
    return this.ALLOWED_SPECIAL_1;
  };
  protoOf(Companion_59).isValidUsernameChar_sxoukv_k$ = function (character) {
    return isLetter(character) ? true : isDigit(character) ? true : this.ALLOWED_SPECIAL_1.contains_aljjnj_k$(new Char(character)) ? true : false;
  };
  var Companion_instance_59;
  function Companion_getInstance_120() {
    if (Companion_instance_59 == null)
      new Companion_59();
    return Companion_instance_59;
  }
  function ValidateUsernameUseCase_0() {
    Companion_getInstance_120();
  }
  protoOf(ValidateUsernameUseCase_0).invoke_lt562m_k$ = function (username) {
    var tmp;
    if (username.length < 3) {
      tmp = Companion_getInstance_121().TooShort_1;
    } else {
      if (username.length > 30) {
        tmp = Companion_getInstance_121().TooLong_1;
      } else {
        var tmp0_safe_receiver = firstOrNull_0(username);
        var tmp_0;
        var tmp_1 = tmp0_safe_receiver;
        if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
          tmp_0 = null;
        } else {
          tmp_0 = isDigit(tmp0_safe_receiver);
        }
        if (tmp_0 === true) {
          tmp = Companion_getInstance_121().StartsWithNumber_1;
        } else {
          var tmp$ret$1;
          $l$block: {
            // Inline function 'kotlin.text.all' call
            var inductionVariable = 0;
            while (inductionVariable < charSequenceLength(username)) {
              var element = charSequenceGet(username, inductionVariable);
              inductionVariable = inductionVariable + 1 | 0;
              // Inline function 'com.ustadmobile.core.domain.validateusername.ValidateUsernameUseCase.invoke.<anonymous>' call
              if (!Companion_getInstance_120().isValidUsernameChar_sxoukv_k$(element)) {
                tmp$ret$1 = false;
                break $l$block;
              }
            }
            tmp$ret$1 = true;
          }
          if (!tmp$ret$1) {
            tmp = Companion_getInstance_121().InvalidCharacters_1;
          } else {
            tmp = Companion_getInstance_121().Valid_1;
          }
        }
      }
    }
    return tmp;
  };
  function Companion_60() {
    Companion_instance_60 = this;
    this.Valid_1 = new ValidationResult();
    this.TooShort_1 = new ValidationResult(strings_getInstance().get_username_too_short_qo42ep_k$());
    this.TooLong_1 = new ValidationResult(strings_getInstance().get_username_too_long_f6k7h5_k$());
    this.StartsWithNumber_1 = new ValidationResult(strings_getInstance().get_username_starts_with_number_3fjrl8_k$());
    this.InvalidCharacters_1 = new ValidationResult(strings_getInstance().get_invalid_username_okhbfd_k$());
  }
  protoOf(Companion_60).get_Valid_iifz5f_k$ = function () {
    return this.Valid_1;
  };
  protoOf(Companion_60).get_TooShort_nno7e9_k$ = function () {
    return this.TooShort_1;
  };
  protoOf(Companion_60).get_TooLong_9xawvb_k$ = function () {
    return this.TooLong_1;
  };
  protoOf(Companion_60).get_StartsWithNumber_l4iwg9_k$ = function () {
    return this.StartsWithNumber_1;
  };
  protoOf(Companion_60).get_InvalidCharacters_f4vf94_k$ = function () {
    return this.InvalidCharacters_1;
  };
  var Companion_instance_60;
  function Companion_getInstance_121() {
    if (Companion_instance_60 == null)
      new Companion_60();
    return Companion_instance_60;
  }
  function ValidationResult(errorMessage) {
    Companion_getInstance_121();
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.errorMessage_1 = errorMessage;
  }
  protoOf(ValidationResult).get_errorMessage_ofxtm0_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(ValidationResult).component1_7eebsc_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(ValidationResult).copy_cuqiib_k$ = function (errorMessage) {
    return new ValidationResult(errorMessage);
  };
  protoOf(ValidationResult).copy$default_z929hs_k$ = function (errorMessage, $super) {
    errorMessage = errorMessage === VOID ? this.errorMessage_1 : errorMessage;
    return $super === VOID ? this.copy_cuqiib_k$(errorMessage) : $super.copy_cuqiib_k$.call(this, errorMessage);
  };
  protoOf(ValidationResult).toString = function () {
    return 'ValidationResult(errorMessage=' + this.errorMessage_1 + ')';
  };
  protoOf(ValidationResult).hashCode = function () {
    return this.errorMessage_1 == null ? 0 : this.errorMessage_1.hashCode();
  };
  protoOf(ValidationResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ValidationResult))
      return false;
    var tmp0_other_with_cast = other instanceof ValidationResult ? other : THROW_CCE();
    if (!equals(this.errorMessage_1, tmp0_other_with_cast.errorMessage_1))
      return false;
    return true;
  };
  function isAnonymous(_this__u8e3s4) {
    return ((_this__u8e3s4.get_actorOpenid_tjemdt_k$() == null ? _this__u8e3s4.get_actorMbox_enx2y2_k$() == null : false) ? _this__u8e3s4.get_actorAccountName_o5fzl8_k$() == null : false) ? _this__u8e3s4.get_actorMbox_sha1sum_wa7f5_k$() == null : false;
  }
  function _get_db__ndbzd9_5($this) {
    return $this.db_1;
  }
  function _get_dbOrRepo__9azms8($this) {
    return $this.dbOrRepo_1;
  }
  function _get_isIdOnly__t0wrie(_this__u8e3s4, $this) {
    return ((_this__u8e3s4.get_actType_hyiqkd_k$() == null ? _this__u8e3s4.get_actMoreInfo_gclkvg_k$() == null : false) ? _this__u8e3s4.get_actInteractionType_fg57ul_k$() === Companion_getInstance_23().get_TYPE_UNSET_eu0ur7_k$() : false) ? _this__u8e3s4.get_actCorrectResponsePatterns_vnfhy3_k$() == null : false;
  }
  function StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation) {
    this.$activityEntities_1 = $activityEntities;
    this.$timeNow_1 = $timeNow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(StoreActivitiesUseCase$invoke$slambda).invoke_ilfkvo_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_ilfkvo_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(18);
            var tmp_0 = this;
            var this_0 = this.$activityEntities_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              destination.add_utx5q5_k$(item.get_activityEntity_d1963p_k$().copy$default_o7j060_k$(VOID, VOID, VOID, VOID, VOID, VOID, this.$timeNow_1));
            }

            tmp_0.activities0__1 = destination;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.dbOrRepo_1.activityEntityDao_xla99c_k$().insertOrIgnoreAsync_r8ju3x_k$(this.activities0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var this_1 = this.activities0__1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator_0.next_20eer_k$();
              if (!_get_isIdOnly__t0wrie(element, this.this$0__1)) {
                destination_0.add_utx5q5_k$(element);
              }
            }

            tmp_1.this1__1 = destination_0;
            this.tmp0_iterator2__1 = this.this1__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (!this.tmp0_iterator2__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

            this.element3__1 = this.tmp0_iterator2__1.next_20eer_k$();
            var tmp_2 = this;
            tmp_2.it4__1 = this.element3__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.this$0__1.dbOrRepo_1.activityEntityDao_xla99c_k$().updateIfMoreInfoChanged_dtrbgl_k$(this.it4__1.get_actUid_avkynb_k$(), this.it4__1.get_actMoreInfo_gclkvg_k$(), this.$timeNow_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(4);
            suspendResult = this.this$0__1.dbOrRepo_1.activityEntityDao_xla99c_k$().updateIfNotYetDefined_9uboiw_k$(this.it4__1.get_actUid_avkynb_k$(), this.it4__1.get_actType_hyiqkd_k$(), this.it4__1.get_actMoreInfo_gclkvg_k$(), this.it4__1.get_actInteractionType_fg57ul_k$(), this.it4__1.get_actCorrectResponsePatterns_vnfhy3_k$(), this.$timeNow_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 5:
            var tmp_3 = this;
            var this_2 = this.$activityEntities_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.iterator_jk1svi_k$();
            while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_1.next_20eer_k$();
              var list = element_0.get_activityLangMapEntries_6cto86_k$();
              addAll(destination_1, list);
            }

            tmp_3.allLangMapEntries5__1 = destination_1;
            var tmp_4 = this;
            var this_3 = this.$activityEntities_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.iterator_jk1svi_k$();
            while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
              var element_1 = tmp0_iterator_2.next_20eer_k$();
              var list_0 = element_1.get_activityInteractionEntities_fpz5dn_k$();
              addAll(destination_2, list_0);
            }

            tmp_4.activityInteractionEntities6__1 = destination_2;
            this.set_state_rjd8d0_k$(6);
            var tmp_5 = this.this$0__1.db_1.activityInteractionDao_ya39jj_k$();
            var this_4 = this.activityInteractionEntities6__1;
            var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.iterator_jk1svi_k$();
            while (tmp0_iterator_3.hasNext_bitz1p_k$()) {
              var item_0 = tmp0_iterator_3.next_20eer_k$();
              destination_3.add_utx5q5_k$(item_0.get_aieActivityUid_6c3d59_k$());
            }

            suspendResult = tmp_5.findActivityUidsWithInteractionEntitiesAsync_orucml_k$(toList(distinct(destination_3)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.ARGUMENT7__1 = suspendResult;
            this.activityUidsWithExistingInteractions8__1 = toSet(this.ARGUMENT7__1);
            this.set_state_rjd8d0_k$(7);
            var tmp_6 = this.this$0__1.dbOrRepo_1.activityInteractionDao_ya39jj_k$();
            var this_5 = this.activityInteractionEntities6__1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_5.iterator_jk1svi_k$();
            while (tmp0_iterator_4.hasNext_bitz1p_k$()) {
              var element_2 = tmp0_iterator_4.next_20eer_k$();
              if (!this.activityUidsWithExistingInteractions8__1.contains_aljjnj_k$(element_2.get_aieActivityUid_6c3d59_k$())) {
                destination_4.add_utx5q5_k$(element_2);
              }
            }

            suspendResult = tmp_6.insertOrIgnoreAsync_djqrwn_k$(destination_4, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var tmp_7 = this;
            var this_6 = this.allLangMapEntries5__1;
            var first = ArrayList_init_$Create$();
            var second = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_6.iterator_jk1svi_k$();
            while (tmp0_iterator_5.hasNext_bitz1p_k$()) {
              var element_3 = tmp0_iterator_5.next_20eer_k$();
              if (element_3.get_almeAieHash_4fnbb5_k$().equals(new Long(0, 0))) {
                first.add_utx5q5_k$(element_3);
              } else {
                second.add_utx5q5_k$(element_3);
              }
            }

            tmp_7.tmp0_container9__1 = new Pair(first, second);
            this.nameAndDescriptionLangMapEntities10__1 = this.tmp0_container9__1.component1_7eebsc_k$();
            this.interactionLangMapEntities11__1 = this.tmp0_container9__1.component2_7eebsb_k$();
            this.set_state_rjd8d0_k$(8);
            suspendResult = this.this$0__1.dbOrRepo_1.activityLangMapEntryDao_1efc67_k$().upsertList_q16n8z_k$(this.nameAndDescriptionLangMapEntities10__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            var tmp_8 = this;
            tmp_8.this12__1 = this.interactionLangMapEntities11__1;
            this.tmp0_iterator13__1 = this.this12__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            if (!this.tmp0_iterator13__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(11);
              continue $sm;
            }

            this.element14__1 = this.tmp0_iterator13__1.next_20eer_k$();
            var tmp_9 = this;
            tmp_9.it15__1 = this.element14__1;
            this.tmp0_$this16__1 = this.this$0__1.dbOrRepo_1.activityLangMapEntryDao_1efc67_k$();
            this.tmp1_almeActivityUid17__1 = this.it15__1.get_almeActivityUid_o9qzhn_k$();
            this.tmp2_almeAieHash18__1 = this.it15__1.get_almeAieHash_4fnbb5_k$();
            this.tmp3_almePropName19__1 = this.it15__1.get_almePropName_64a396_k$();
            this.tmp4_almeValue20__1 = this.it15__1.get_almeValue_o41rph_k$();
            this.tmp5_almeLangCode21__1 = this.it15__1.get_almeLangCode_45kvbt_k$();
            this.tmp6_almeHash22__1 = this.it15__1.get_almeHash_1iqfeu_k$();
            this.set_state_rjd8d0_k$(10);
            suspendResult = this.tmp0_$this16__1.upsertIfInteractionEntityExists_34ld2f_k$(this.tmp1_almeActivityUid17__1, this.tmp6_almeHash22__1, this.tmp3_almePropName19__1, this.tmp5_almeLangCode21__1, this.tmp4_almeValue20__1, this.tmp2_almeAieHash18__1, this.$timeNow_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 11:
            var tmp_10 = this;
            tmp_10.this23__1 = this.allLangMapEntries5__1;
            this.tmp0_iterator24__1 = this.this23__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(12);
            continue $sm;
          case 12:
            if (!this.tmp0_iterator24__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(14);
              continue $sm;
            }

            this.element25__1 = this.tmp0_iterator24__1.next_20eer_k$();
            var tmp_11 = this;
            tmp_11.it26__1 = this.element25__1;
            this.set_state_rjd8d0_k$(13);
            suspendResult = this.this$0__1.dbOrRepo_1.activityLangMapEntryDao_1efc67_k$().updateIfChanged_9r6tow_k$(this.it26__1.get_almeActivityUid_o9qzhn_k$(), this.it26__1.get_almeHash_1iqfeu_k$(), this.it26__1.get_almeValue_o41rph_k$(), this.$timeNow_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.set_state_rjd8d0_k$(12);
            continue $sm;
          case 14:
            this.set_state_rjd8d0_k$(15);
            var tmp_12 = this.this$0__1.dbOrRepo_1.activityExtensionDao_w9zywu_k$();
            var this_7 = this.$activityEntities_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = this_7.iterator_jk1svi_k$();
            while (tmp0_iterator_6.hasNext_bitz1p_k$()) {
              var element_4 = tmp0_iterator_6.next_20eer_k$();
              var list_1 = element_4.get_activityExtensionEntities_uivjc_k$();
              addAll(destination_5, list_1);
            }

            suspendResult = tmp_12.upsertListAsync_9ba3gt_k$(destination_5, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            var tmp_13 = this;
            var this_8 = this.$activityEntities_1;
            var destination_6 = ArrayList_init_$Create$();
            var tmp0_iterator_7 = this_8.iterator_jk1svi_k$();
            while (tmp0_iterator_7.hasNext_bitz1p_k$()) {
              var element_5 = tmp0_iterator_7.next_20eer_k$();
              var tmp0_safe_receiver = element_5.get_statementContextActivityJoin_pqgkfy_k$();
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_6.add_utx5q5_k$(tmp0_safe_receiver);
              }
            }

            var tmp_14;
            if (!destination_6.isEmpty_y1axqb_k$()) {
              tmp_14 = destination_6;
            } else {
              tmp_14 = null;
            }

            tmp_13.tmp1_safe_receiver27__1 = tmp_14;
            if (this.tmp1_safe_receiver27__1 == null) {
              this.WHEN_RESULT28__1 = null;
              this.set_state_rjd8d0_k$(17);
              continue $sm;
            } else {
              var tmp_15 = this;
              tmp_15.this29__1 = this.tmp1_safe_receiver27__1;
              var tmp_16 = this;
              tmp_16.it30__1 = this.this29__1;
              this.set_state_rjd8d0_k$(16);
              suspendResult = this.this$0__1.dbOrRepo_1.statementContextActivityJoinDao_w1mheh_k$().insertOrIgnoreListAsync_gq420m_k$(this.it30__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            this.WHEN_RESULT28__1 = this.this29__1;
            this.set_state_rjd8d0_k$(17);
            continue $sm;
          case 17:
            return this.WHEN_RESULT28__1;
          case 18:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 18) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new StoreActivitiesUseCase$invoke$slambda(this.$activityEntities_1, this.$timeNow_1, this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function StoreActivitiesUseCase$invoke$slambda_0($activityEntities, $timeNow, this$0, resultContinuation) {
    var i = new StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_ilfkvo_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$32(_this__u8e3s4, activityEntities, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.activityEntities_1 = activityEntities;
  }
  protoOf($invokeCOROUTINE$32).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.timeNow0__1 = systemTimeInMillis();
            this.set_state_rjd8d0_k$(1);
            suspendResult = withDoorTransactionAsync(this._this__u8e3s4__1.dbOrRepo_1, VOID, StoreActivitiesUseCase$invoke$slambda_0(this.activityEntities_1, this.timeNow0__1, this._this__u8e3s4__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function StoreActivitiesUseCase(db, repo) {
    this.db_1 = db;
    var tmp = this;
    tmp.dbOrRepo_1 = repo == null ? this.db_1 : repo;
  }
  protoOf(StoreActivitiesUseCase).invoke_2ack55_k$ = function (activityEntities, $completion) {
    var tmp = new $invokeCOROUTINE$32(this, activityEntities, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function XapiException(responseCode, message, cause) {
    cause = cause === VOID ? null : cause;
    Exception_init_$Init$_1(message, cause, this);
    captureStack(this, XapiException);
    this.responseCode_1 = responseCode;
  }
  protoOf(XapiException).get_responseCode_sc54wn_k$ = function () {
    return this.responseCode_1;
  };
  function XapiJson$_init_$lambda_lhwgtd($this$Json) {
    $this$Json.set_encodeDefaults_c5evsg_k$(false);
    $this$Json.set_ignoreUnknownKeys_pzvtne_k$(true);
    return Unit_getInstance();
  }
  function XapiJson(json) {
    var tmp;
    if (json === VOID) {
      tmp = Json_0(VOID, XapiJson$_init_$lambda_lhwgtd);
    } else {
      tmp = json;
    }
    json = tmp;
    this.json_1 = json;
  }
  protoOf(XapiJson).get_json_woos35_k$ = function () {
    return this.json_1;
  };
  protoOf(XapiJson).component1_7eebsc_k$ = function () {
    return this.json_1;
  };
  protoOf(XapiJson).copy_67e705_k$ = function (json) {
    return new XapiJson(json);
  };
  protoOf(XapiJson).copy$default_mvlmje_k$ = function (json, $super) {
    json = json === VOID ? this.json_1 : json;
    return $super === VOID ? this.copy_67e705_k$(json) : $super.copy_67e705_k$.call(this, json);
  };
  protoOf(XapiJson).toString = function () {
    return 'XapiJson(json=' + this.json_1 + ')';
  };
  protoOf(XapiJson).hashCode = function () {
    return hashCode(this.json_1);
  };
  protoOf(XapiJson).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiJson))
      return false;
    var tmp0_other_with_cast = other instanceof XapiJson ? other : THROW_CCE();
    if (!equals(this.json_1, tmp0_other_with_cast.json_1))
      return false;
    return true;
  };
  function xapiRequireValidUuidOrNullAsString(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      if (!(uuid == null)) {
        uuidFrom(uuid);
      }
      return uuid;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidUuidOrNull(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      var tmp;
      if (uuid == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireValidUuidOrNull.<anonymous>' call
        tmp = uuidFrom(uuid);
      }
      return tmp;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRI(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid iri' : errorMessage;
    if (iri == null)
      throw new XapiException(400, errorMessage + ': iri is null');
    xapiRequireValidIRIOrNull(iri);
    return iri;
  }
  function xapiRequireDurationOrNullAsLong(duration) {
    var tmp;
    if (duration == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireDurationOrNullAsLong.<anonymous>' call
      var tmp_0;
      try {
        tmp_0 = _Duration___get_inWholeMilliseconds__impl__msfiry(Companion_getInstance_24().parseIsoString_2c2d83_k$(duration));
      } catch ($p) {
        var tmp_1;
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, 'Invalid duration: ' + e.message, e);
        } else {
          throw $p;
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function xapiRequireTimestampAsLong(timestampStr) {
    try {
      return Companion_getInstance().parse_pc1q8p_k$(timestampStr).toEpochMilliseconds_82cfls_k$();
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, 'Invalid timestamp: ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRIOrNull(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid IRI:' : errorMessage;
    if (!(iri == null)) {
      try {
        Companion_getInstance_25().parse_pc1q8p_k$(iri);
      } catch ($p) {
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, errorMessage + ': ' + e.message, e);
        } else {
          throw $p;
        }
      }
    }
    return iri;
  }
  var Format_EXACT_instance;
  var Format_IDS_instance;
  var Format_CANONICAL_instance;
  function values_3() {
    return [Format_EXACT_getInstance(), Format_IDS_getInstance(), Format_CANONICAL_getInstance()];
  }
  function valueOf_2(value) {
    switch (value) {
      case 'EXACT':
        return Format_EXACT_getInstance();
      case 'IDS':
        return Format_IDS_getInstance();
      case 'CANONICAL':
        return Format_CANONICAL_getInstance();
      default:
        Format_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_2() {
    if ($ENTRIES_2 == null)
      $ENTRIES_2 = enumEntries(values_3());
    return $ENTRIES_2;
  }
  var Format_entriesInitialized;
  function Format_initEntries() {
    if (Format_entriesInitialized)
      return Unit_getInstance();
    Format_entriesInitialized = true;
    Format_EXACT_instance = new Format('EXACT', 0);
    Format_IDS_instance = new Format('IDS', 1);
    Format_CANONICAL_instance = new Format('CANONICAL', 2);
  }
  var $ENTRIES_2;
  function _get_db__ndbzd9_6($this) {
    return $this.db_1;
  }
  function _get_xxHasher__6b90i8($this) {
    return $this.xxHasher_1;
  }
  function _get_learningSpace__h4keh_5($this) {
    return $this.learningSpace_1;
  }
  function _get_hasherFactory__ipptpa($this) {
    return $this.hasherFactory_1;
  }
  function _get_storeActivitiesUseCase__3xxy76($this) {
    return $this.storeActivitiesUseCase_1;
  }
  function _get_repoOrDb__i4l594_1($this) {
    return $this.repoOrDb_1;
  }
  function _get_json__d8whur_2($this) {
    return $this.json_1;
  }
  function Format(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function StatementStoreResult(statementUuids) {
    this.statementUuids_1 = statementUuids;
  }
  protoOf(StatementStoreResult).get_statementUuids_str56a_k$ = function () {
    return this.statementUuids_1;
  };
  protoOf(StatementStoreResult).component1_7eebsc_k$ = function () {
    return this.statementUuids_1;
  };
  protoOf(StatementStoreResult).copy_zg02zp_k$ = function (statementUuids) {
    return new StatementStoreResult(statementUuids);
  };
  protoOf(StatementStoreResult).copy$default_87k7yw_k$ = function (statementUuids, $super) {
    statementUuids = statementUuids === VOID ? this.statementUuids_1 : statementUuids;
    return $super === VOID ? this.copy_zg02zp_k$(statementUuids) : $super.copy_zg02zp_k$.call(this, statementUuids);
  };
  protoOf(StatementStoreResult).toString = function () {
    return 'StatementStoreResult(statementUuids=' + this.statementUuids_1 + ')';
  };
  protoOf(StatementStoreResult).hashCode = function () {
    return hashCode(this.statementUuids_1);
  };
  protoOf(StatementStoreResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementStoreResult))
      return false;
    var tmp0_other_with_cast = other instanceof StatementStoreResult ? other : THROW_CCE();
    if (!equals(this.statementUuids_1, tmp0_other_with_cast.statementUuids_1))
      return false;
    return true;
  };
  function storeStatements($this, statements, xapiSession, $completion) {
    var tmp = new $storeStatementsCOROUTINE$33($this, statements, xapiSession, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation) {
    this.$statementEntities_1 = $statementEntities;
    this.this$0__1 = this$0;
    this.$xapiSession_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiStatementResource$storeStatements$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(XapiStatementResource$storeStatements$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(18);
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.$statementEntities_1;
              var tmp_0;
              if (isInterface(this_0, Collection)) {
                tmp_0 = this_0.isEmpty_y1axqb_k$();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = this_0.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                var tmp0_safe_receiver = element.get_statementEntity_xknex5_k$();
                var tmp_1;
                if (tmp0_safe_receiver == null) {
                  tmp_1 = null;
                } else {
                  tmp_1 = tmp0_safe_receiver.get_completionOrProgress_n546lx_k$() ? tmp0_safe_receiver.get_resultCompletion_gquu72_k$() === true : false;
                }
                if (tmp_1 === true) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            if (tmp$ret$0) {
              this.tmp0_$this0__1 = this.this$0__1.repoOrDb_1.xapiSessionEntityDao_h5sw3p_k$();
              this.tmp1_xseUid1__1 = this.$xapiSession_1.get_xseUid_m05een_k$();
              this.tmp2_time2__1 = systemTimeInMillis();
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_$this0__1.updateLatestAsComplete_zgqvwz_k$(true, this.tmp2_time2__1, this.tmp1_xseUid1__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_state_rjd8d0_k$(3);
            var tmp_2 = this.this$0__1.repoOrDb_1.statementDao_8y5avx_k$();
            var this_1 = this.$statementEntities_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_0.next_20eer_k$();
              var tmp0_safe_receiver_0 = element_0.get_statementEntity_xknex5_k$();
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination.add_utx5q5_k$(tmp0_safe_receiver_0);
              }
            }

            suspendResult = tmp_2.insertOrIgnoreListAsync_9xzgy7_k$(destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(4);
            var tmp_3 = this.this$0__1.repoOrDb_1.statementEntityJsonDao_us6vig_k$();
            var this_2 = this.$statementEntities_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.iterator_jk1svi_k$();
            while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
              var element_1 = tmp0_iterator_1.next_20eer_k$();
              var tmp0_safe_receiver_1 = element_1.get_statementEntityJson_v56z0x_k$();
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_0.add_utx5q5_k$(tmp0_safe_receiver_1);
              }
            }

            suspendResult = tmp_3.insertOrIgnoreListAsync_362yvb_k$(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_4 = this;
            var this_3 = this.$statementEntities_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.iterator_jk1svi_k$();
            while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
              var element_2 = tmp0_iterator_2.next_20eer_k$();
              var tmp0_elvis_lhs = element_2.get_actorEntities_j9x38t_k$();
              var list = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
              addAll(destination_1, list);
            }

            tmp_4.actorEntities3__1 = destination_1;
            var tmp_5 = this;
            var this_4 = this.actorEntities3__1;
            var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.iterator_jk1svi_k$();
            while (tmp0_iterator_3.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator_3.next_20eer_k$();
              destination_2.add_utx5q5_k$(item.get_actor_ioj5qk_k$());
            }

            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = destination_2.iterator_jk1svi_k$();
            while (tmp0_iterator_4.hasNext_bitz1p_k$()) {
              var element_3 = tmp0_iterator_4.next_20eer_k$();
              if (element_3.get_actorObjectType_r4jksl_k$() === XapiEntityObjectTypeFlags_getInstance().get_AGENT_i6evgc_k$()) {
                destination_3.add_utx5q5_k$(element_3);
              }
            }

            var tmp_6;
            if (!destination_3.isEmpty_y1axqb_k$()) {
              tmp_6 = destination_3;
            } else {
              tmp_6 = null;
            }

            tmp_5.tmp3_safe_receiver4__1 = tmp_6;
            if (this.tmp3_safe_receiver4__1 == null) {
              this.WHEN_RESULT5__1 = null;
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.this6__1 = this.tmp3_safe_receiver4__1;
              var tmp_8 = this;
              tmp_8.agents7__1 = this.this6__1;
              this.set_state_rjd8d0_k$(5);
              suspendResult = insertOrUpdateActorsIfNameChanged(this.this$0__1.repoOrDb_1.actorDao_rapokj_k$(), this.agents7__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 5:
            this.WHEN_RESULT5__1 = this.this6__1;
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 6:
            var tmp_9 = this;
            var this_5 = this.actorEntities3__1;
            var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_5, 10));
            var tmp0_iterator_5 = this_5.iterator_jk1svi_k$();
            while (tmp0_iterator_5.hasNext_bitz1p_k$()) {
              var item_0 = tmp0_iterator_5.next_20eer_k$();
              destination_4.add_utx5q5_k$(item_0.get_actor_ioj5qk_k$());
            }

            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = destination_4.iterator_jk1svi_k$();
            while (tmp0_iterator_6.hasNext_bitz1p_k$()) {
              var element_4 = tmp0_iterator_6.next_20eer_k$();
              if (element_4.get_actorObjectType_r4jksl_k$() === XapiEntityObjectTypeFlags_getInstance().get_GROUP_i9wvg6_k$()) {
                destination_5.add_utx5q5_k$(element_4);
              }
            }

            tmp_9.groupEntities8__1 = destination_5;
            this.set_state_rjd8d0_k$(7);
            var tmp_10 = this.this$0__1.db_1.actorDao_rapokj_k$();
            var this_6 = this.groupEntities8__1;
            var destination_6 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_6, 10));
            var tmp0_iterator_7 = this_6.iterator_jk1svi_k$();
            while (tmp0_iterator_7.hasNext_bitz1p_k$()) {
              var item_1 = tmp0_iterator_7.next_20eer_k$();
              destination_6.add_utx5q5_k$(item_1.get_actorUid_bxgzj8_k$());
            }

            suspendResult = tmp_10.findUidAndEtagByListAsync_ye0fym_k$(destination_6, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.existingGroupActorHashes9__1 = suspendResult;
            var tmp_11 = this;
            var this_7 = this.actorEntities3__1;
            var destination_7 = ArrayList_init_$Create$();
            var tmp0_iterator_8 = this_7.iterator_jk1svi_k$();
            while (tmp0_iterator_8.hasNext_bitz1p_k$()) {
              var element_5 = tmp0_iterator_8.next_20eer_k$();
              var list_0 = element_5.get_groupMemberAgents_9ycpqa_k$();
              addAll(destination_7, list_0);
            }

            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_7, 10)), 16);
            var destination_8 = LinkedHashMap_init_$Create$(capacity);
            var tmp0_iterator_9 = destination_7.iterator_jk1svi_k$();
            while (tmp0_iterator_9.hasNext_bitz1p_k$()) {
              var element_6 = tmp0_iterator_9.next_20eer_k$();
              destination_8.put_4fpzoq_k$(element_6.get_actorUid_bxgzj8_k$(), element_6);
            }

            tmp_11.allGroupMemberAgents10__1 = destination_8;
            var tmp_12 = this;
            tmp_12.this11__1 = this.groupEntities8__1;
            this.tmp0_iterator12__1 = this.this11__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 8:
            if (!this.tmp0_iterator12__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(14);
              continue $sm;
            }

            this.element13__1 = this.tmp0_iterator12__1.next_20eer_k$();
            var tmp_13 = this;
            tmp_13.groupActorEntity14__1 = this.element13__1;
            var tmp_14 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_10 = this.existingGroupActorHashes9__1.iterator_jk1svi_k$();
              while (tmp0_iterator_10.hasNext_bitz1p_k$()) {
                var element_7 = tmp0_iterator_10.next_20eer_k$();
                if (element_7.get_actorUid_bxgzj8_k$().equals(this.groupActorEntity14__1.get_actorUid_bxgzj8_k$())) {
                  tmp$ret$2 = element_7;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            tmp_14.existingEtagAndLct15__1 = tmp$ret$2;
            var tmp_15 = this;
            var tmp_16;
            if (!isAnonymous(this.groupActorEntity14__1)) {
              var tmp_17 = this.groupActorEntity14__1.get_actorEtag_ensc1t_k$();
              var tmp0_safe_receiver_2 = this.existingEtagAndLct15__1;
              tmp_16 = !tmp_17.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_actorEtag_ensc1t_k$());
            } else {
              tmp_16 = true;
            }

            tmp_15.groupIsNewOrUpdated16__1 = tmp_16;
            var tmp_18 = this;
            var this_8 = this.actorEntities3__1;
            var destination_9 = ArrayList_init_$Create$();
            var tmp0_iterator_11 = this_8.iterator_jk1svi_k$();
            while (tmp0_iterator_11.hasNext_bitz1p_k$()) {
              var element_8 = tmp0_iterator_11.next_20eer_k$();
              var list_1 = element_8.get_groupMemberJoins_8zhdy1_k$();
              addAll(destination_9, list_1);
            }

            var destination_10 = ArrayList_init_$Create$();
            var tmp0_iterator_12 = destination_9.iterator_jk1svi_k$();
            while (tmp0_iterator_12.hasNext_bitz1p_k$()) {
              var element_9 = tmp0_iterator_12.next_20eer_k$();
              if (element_9.get_gmajGroupActorUid_48ehxa_k$().equals(this.groupActorEntity14__1.get_actorUid_bxgzj8_k$())) {
                destination_10.add_utx5q5_k$(element_9);
              }
            }

            tmp_18.groupMemberJoins17__1 = destination_10;
            var tmp_19 = this;
            var this_9 = this.groupMemberJoins17__1;
            var destination_11 = ArrayList_init_$Create$();
            var tmp0_iterator_13 = this_9.iterator_jk1svi_k$();
            while (tmp0_iterator_13.hasNext_bitz1p_k$()) {
              var element_10 = tmp0_iterator_13.next_20eer_k$();
              var tmp0_safe_receiver_3 = this.allGroupMemberAgents10__1.get_wei43m_k$(element_10.get_gmajMemberActorUid_c3ucz7_k$());
              if (tmp0_safe_receiver_3 == null)
                null;
              else {
                destination_11.add_utx5q5_k$(tmp0_safe_receiver_3);
              }
            }

            tmp_19.groupMemberActors18__1 = destination_11;
            this.set_state_rjd8d0_k$(9);
            suspendResult = insertOrUpdateActorsIfNameChanged(this.this$0__1.repoOrDb_1.actorDao_rapokj_k$(), this.groupMemberActors18__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            if (!this.groupIsNewOrUpdated16__1 ? !(this.existingEtagAndLct15__1 == null) : false) {
              this.set_state_rjd8d0_k$(12);
              var tmp_20 = this.this$0__1.repoOrDb_1.groupMemberActorJoinDao_sbul1w_k$();
              var this_10 = this.groupMemberJoins17__1;
              var destination_12 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_10, 10));
              var tmp0_iterator_14 = this_10.iterator_jk1svi_k$();
              while (tmp0_iterator_14.hasNext_bitz1p_k$()) {
                var item_2 = tmp0_iterator_14.next_20eer_k$();
                destination_12.add_utx5q5_k$(item_2.copy$default_edkswc_k$(VOID, VOID, this.existingEtagAndLct15__1.get_actorLct_bxgsq9_k$()));
              }
              suspendResult = insertOrUpdateIfLastModChanged(tmp_20, destination_12, this.existingEtagAndLct15__1.get_actorLct_bxgsq9_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(10);
              suspendResult = this.this$0__1.repoOrDb_1.actorDao_rapokj_k$().upsertListAsync_gg74o8_k$(listOf_0(this.groupActorEntity14__1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 10:
            this.set_state_rjd8d0_k$(11);
            suspendResult = this.this$0__1.repoOrDb_1.groupMemberActorJoinDao_sbul1w_k$().upsertListAsync_2yfwma_k$(this.groupMemberJoins17__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            this.set_state_rjd8d0_k$(13);
            continue $sm;
          case 12:
            this.set_state_rjd8d0_k$(13);
            continue $sm;
          case 13:
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 14:
            this.set_state_rjd8d0_k$(15);
            var tmp_21 = this.this$0__1.repoOrDb_1.verbDao_5t0jxv_k$();
            var this_11 = this.$statementEntities_1;
            var destination_13 = ArrayList_init_$Create$();
            var tmp0_iterator_15 = this_11.iterator_jk1svi_k$();
            while (tmp0_iterator_15.hasNext_bitz1p_k$()) {
              var element_11 = tmp0_iterator_15.next_20eer_k$();
              var tmp0_safe_receiver_4 = element_11.get_verbEntities_ty8u2x_k$();
              var tmp0_safe_receiver_5 = tmp0_safe_receiver_4 == null ? null : tmp0_safe_receiver_4.get_verbEntity_dpswph_k$();
              if (tmp0_safe_receiver_5 == null)
                null;
              else {
                destination_13.add_utx5q5_k$(tmp0_safe_receiver_5);
              }
            }

            suspendResult = tmp_21.insertOrIgnoreAsync_zcwo5f_k$(destination_13, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            this.set_state_rjd8d0_k$(16);
            var tmp_22 = this.this$0__1.repoOrDb_1.verbLangMapEntryDao_egt3yn_k$();
            var this_12 = this.$statementEntities_1;
            var destination_14 = ArrayList_init_$Create$();
            var tmp0_iterator_16 = this_12.iterator_jk1svi_k$();
            while (tmp0_iterator_16.hasNext_bitz1p_k$()) {
              var element_12 = tmp0_iterator_16.next_20eer_k$();
              var tmp0_safe_receiver_6 = element_12.get_verbEntities_ty8u2x_k$();
              var tmp1_elvis_lhs = tmp0_safe_receiver_6 == null ? null : tmp0_safe_receiver_6.get_verbLangMapEntries_tbbmp6_k$();
              var list_2 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
              addAll(destination_14, list_2);
            }

            suspendResult = tmp_22.upsertList_a2brh9_k$(destination_14, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.set_state_rjd8d0_k$(17);
            var this_13 = this.$statementEntities_1;
            var destination_15 = ArrayList_init_$Create$();
            var tmp0_iterator_17 = this_13.iterator_jk1svi_k$();
            while (tmp0_iterator_17.hasNext_bitz1p_k$()) {
              var element_13 = tmp0_iterator_17.next_20eer_k$();
              var tmp0_elvis_lhs_0 = element_13.get_activityEntities_p1yibr_k$();
              var list_3 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
              addAll(destination_15, list_3);
            }

            suspendResult = this.this$0__1.storeActivitiesUseCase_1.invoke_2ack55_k$(destination_15, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 17:
            return Unit_getInstance();
          case 18:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 18) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new XapiStatementResource$storeStatements$slambda(this.$statementEntities_1, this.this$0__1, this.$xapiSession_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(XapiStatementResource$storeStatements$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function XapiStatementResource$storeStatements$slambda_0($statementEntities, this$0, $xapiSession, resultContinuation) {
    var i = new XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Format_EXACT_getInstance() {
    Format_initEntries();
    return Format_EXACT_instance;
  }
  function Format_IDS_getInstance() {
    Format_initEntries();
    return Format_IDS_instance;
  }
  function Format_CANONICAL_getInstance() {
    Format_initEntries();
    return Format_CANONICAL_instance;
  }
  function $storeStatementsCOROUTINE$33(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.statements_1 = statements;
    this.xapiSession_1 = xapiSession;
  }
  protoOf($storeStatementsCOROUTINE$33).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.sessionActorUid0__1 = identifierHash(agent(this.xapiSession_1, this._this__u8e3s4__1.learningSpace_1), this._this__u8e3s4__1.xxHasher_1);
            var tmp_0 = this;
            var it = knownActorUidToPersonUidsMap(this.xapiSession_1, this._this__u8e3s4__1.json_1);
            var tmp_1;
            if (!it.containsKey_aw81wo_k$(this.sessionActorUid0__1)) {
              tmp_1 = plus_2(it, to(this.sessionActorUid0__1, this.xapiSession_1.get_xseAccountPersonUid_gx93sh_k$()));
            } else {
              tmp_1 = it;
            }

            tmp_0.knownActorUidToPersonUidMap1__1 = tmp_1;
            var tmp_2 = this;
            var this_0 = this.statements_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              var timeNowStr = System_getInstance().now_2cba_k$().toString();
              var tmp1_elvis_lhs = element.get_timestamp_9fccx9_k$();
              var tmp4_timestamp = tmp1_elvis_lhs == null ? timeNowStr : tmp1_elvis_lhs;
              var tmp0_elvis_lhs = xapiRequireValidUuidOrNullAsString(element.get_id_kntnx8_k$());
              var tmp5_id = tmp0_elvis_lhs == null ? randomUuidAsString() : tmp0_elvis_lhs;
              var tmp2_name = this.xapiSession_1.get_xseAccountUsername_q0miri_k$();
              var tmp3_homePage = this._this__u8e3s4__1.learningSpace_1.get_url_18iuii_k$();
              var tmp6_authority = new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(tmp3_homePage, tmp2_name));
              var exactStatement = element.copy$default_dlizxq_k$(tmp5_id, VOID, VOID, VOID, VOID, VOID, tmp4_timestamp, timeNowStr, tmp6_authority);
              var tmp7_stringHasher = this._this__u8e3s4__1.xxHasher_1;
              var tmp8_exactJson = this._this__u8e3s4__1.json_1.encodeToString_k0apqx_k$(Companion_getInstance_137().serializer_9w0wvi_k$(), exactStatement);
              var tmp9_primaryKeyManager = get_doorPrimaryKeyManager(this._this__u8e3s4__1.db_1);
              var tmp10_hasherFactory = this._this__u8e3s4__1.hasherFactory_1;
              var tmp11_json = this._this__u8e3s4__1.json_1;
              var tmp12_learningSpace = this._this__u8e3s4__1.learningSpace_1;
              var list = toEntities_3(exactStatement, tmp7_stringHasher, tmp9_primaryKeyManager, tmp10_hasherFactory, tmp11_json, this.xapiSession_1, this.knownActorUidToPersonUidMap1__1, tmp8_exactJson, false, tmp12_learningSpace);
              addAll(destination, list);
            }

            tmp_2.statementEntities2__1 = destination;
            this.set_state_rjd8d0_k$(1);
            suspendResult = withDoorTransactionAsync(this._this__u8e3s4__1.repoOrDb_1, VOID, XapiStatementResource$storeStatements$slambda_0(this.statementEntities2__1, this._this__u8e3s4__1, this.xapiSession_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_1 = this.statementEntities2__1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_0.next_20eer_k$();
              var tmp0_safe_receiver = element_0.get_statementEntity_xknex5_k$();
              var tmp_3;
              if (tmp0_safe_receiver == null) {
                tmp_3 = null;
              } else {
                tmp_3 = Uuid_init_$Create$(tmp0_safe_receiver.get_statementIdHi_5i876q_k$(), tmp0_safe_receiver.get_statementIdLo_5i87ac_k$());
              }
              var tmp0_safe_receiver_0 = tmp_3;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.add_utx5q5_k$(tmp0_safe_receiver_0);
              }
            }

            return new StatementStoreResult(destination_0);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $putCOROUTINE$34(_this__u8e3s4, statement, statementIdParam, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.statement_1 = statement;
    this.statementIdParam_1 = statementIdParam;
    this.xapiSession_1 = xapiSession;
  }
  protoOf($putCOROUTINE$34).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = storeStatements(this._this__u8e3s4__1, listOf_0(this.statement_1.copy$default_dlizxq_k$(this.statementIdParam_1)), this.xapiSession_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var storeResult = suspendResult;
            return first_0(storeResult.statementUuids_1).toString();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $postCOROUTINE$35(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.statements_1 = statements;
    this.xapiSession_1 = xapiSession;
  }
  protoOf($postCOROUTINE$35).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = storeStatements(this._this__u8e3s4__1, this.statements_1, this.xapiSession_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return ARGUMENT.statementUuids_1;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $getCOROUTINE$36(_this__u8e3s4, xapiSession, statementId, format, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.xapiSession_1 = xapiSession;
    this.statementId_1 = statementId;
    this.format_1 = format;
  }
  protoOf($getCOROUTINE$36).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1;
            if (!(this.statementId_1 == null)) {
              var uuid = uuidFrom(this.statementId_1);
              tmp_1 = new Pair(uuid.get_mostSignificantBits_50ugdp_k$(), uuid.get_leastSignificantBits_mmkdbt_k$());
            } else {
              tmp_1 = new Pair(new Long(0, 0), new Long(0, 0));
            }

            tmp_0.tmp0_container0__1 = tmp_1;
            this.statementIdHi1__1 = this.tmp0_container0__1.component1_7eebsc_k$();
            this.statementIdLo2__1 = this.tmp0_container0__1.component2_7eebsb_k$();
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.repoOrDb_1.statementEntityJsonDao_us6vig_k$().getStatements_yg8cil_k$(this.statementIdHi1__1, this.statementIdLo2__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var statements = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = statements.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              var tmp0_safe_receiver = element.get_fullStatement_rdb5o7_k$();
              var tmp_2;
              if (tmp0_safe_receiver == null) {
                tmp_2 = null;
              } else {
                tmp_2 = this._this__u8e3s4__1.json_1.decodeFromString_jwu9sq_k$(Companion_getInstance_26().serializer_9w0wvi_k$(), tmp0_safe_receiver);
              }
              var tmp0_safe_receiver_0 = tmp_2;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination.add_utx5q5_k$(tmp0_safe_receiver_0);
              }
            }

            return destination;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function XapiStatementResource(db, repo, xxHasher, learningSpace, xapiJson, hasherFactory, storeActivitiesUseCase) {
    this.db_1 = db;
    this.xxHasher_1 = xxHasher;
    this.learningSpace_1 = learningSpace;
    this.hasherFactory_1 = hasherFactory;
    this.storeActivitiesUseCase_1 = storeActivitiesUseCase;
    var tmp = this;
    tmp.repoOrDb_1 = repo == null ? this.db_1 : repo;
    this.json_1 = xapiJson.get_json_woos35_k$();
  }
  protoOf(XapiStatementResource).put_ayov6z_k$ = function (statement, statementIdParam, xapiSession, $completion) {
    var tmp = new $putCOROUTINE$34(this, statement, statementIdParam, xapiSession, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(XapiStatementResource).post_c9pbaj_k$ = function (statements, xapiSession, $completion) {
    var tmp = new $postCOROUTINE$35(this, statements, xapiSession, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(XapiStatementResource).get_nebrd0_k$ = function (xapiSession, statementId, format, $completion) {
    var tmp = new $getCOROUTINE$36(this, xapiSession, statementId, format, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(XapiStatementResource).get$default_v57s9i_k$ = function (xapiSession, statementId, format, $completion, $super) {
    format = format === VOID ? Format_EXACT_getInstance() : format;
    return $super === VOID ? this.get_nebrd0_k$(xapiSession, statementId, format, $completion) : $super.get_nebrd0_k$.call(this, xapiSession, statementId, format, $completion);
  };
  function _get_repo__dd1xjt_11($this) {
    return $this.repo_1;
  }
  function _get_learningSpace__h4keh_6($this) {
    return $this.learningSpace_1;
  }
  function _get_stringHasher__8rs65b($this) {
    return $this.stringHasher_1;
  }
  function XapiGroupAndPersonUidMap(group, actorUidToPersonUidMap) {
    this.group_1 = group;
    this.actorUidToPersonUidMap_1 = actorUidToPersonUidMap;
  }
  protoOf(XapiGroupAndPersonUidMap).get_group_is3eja_k$ = function () {
    return this.group_1;
  };
  protoOf(XapiGroupAndPersonUidMap).get_actorUidToPersonUidMap_2t0lds_k$ = function () {
    return this.actorUidToPersonUidMap_1;
  };
  protoOf(XapiGroupAndPersonUidMap).component1_7eebsc_k$ = function () {
    return this.group_1;
  };
  protoOf(XapiGroupAndPersonUidMap).component2_7eebsb_k$ = function () {
    return this.actorUidToPersonUidMap_1;
  };
  protoOf(XapiGroupAndPersonUidMap).copy_yphz96_k$ = function (group, actorUidToPersonUidMap) {
    return new XapiGroupAndPersonUidMap(group, actorUidToPersonUidMap);
  };
  protoOf(XapiGroupAndPersonUidMap).copy$default_q0xyy1_k$ = function (group, actorUidToPersonUidMap, $super) {
    group = group === VOID ? this.group_1 : group;
    actorUidToPersonUidMap = actorUidToPersonUidMap === VOID ? this.actorUidToPersonUidMap_1 : actorUidToPersonUidMap;
    return $super === VOID ? this.copy_yphz96_k$(group, actorUidToPersonUidMap) : $super.copy_yphz96_k$.call(this, group, actorUidToPersonUidMap);
  };
  protoOf(XapiGroupAndPersonUidMap).toString = function () {
    return 'XapiGroupAndPersonUidMap(group=' + this.group_1 + ', actorUidToPersonUidMap=' + this.actorUidToPersonUidMap_1 + ')';
  };
  protoOf(XapiGroupAndPersonUidMap).hashCode = function () {
    var result = this.group_1.hashCode();
    result = imul(result, 31) + hashCode(this.actorUidToPersonUidMap_1) | 0;
    return result;
  };
  protoOf(XapiGroupAndPersonUidMap).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroupAndPersonUidMap))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroupAndPersonUidMap ? other : THROW_CCE();
    if (!this.group_1.equals(tmp0_other_with_cast.group_1))
      return false;
    if (!equals(this.actorUidToPersonUidMap_1, tmp0_other_with_cast.actorUidToPersonUidMap_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$37(_this__u8e3s4, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.groupSetUid_1 = groupSetUid;
    this.groupNum_1 = groupNum;
    this.clazzUid_1 = clazzUid;
    this.assignmentUid_1 = assignmentUid;
    this.accountPersonUid_1 = accountPersonUid;
  }
  protoOf($invokeCOROUTINE$37).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.repo_1.courseGroupMemberDao_da0s0k_k$().findByCourseGroupSetAndGroupNumAsync_fmld87_k$(this.groupSetUid_1, this.groupNum_1, this.clazzUid_1, this.assignmentUid_1, this.accountPersonUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var groupMembers = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = groupMembers.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              var tmp0_safe_receiver = element.get_person_i0c866_k$();
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toXapiAgent(tmp0_safe_receiver, this._this__u8e3s4__1.learningSpace_1);
              var tmp_0;
              if (tmp1_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = element.get_courseGroupMember_43922z_k$();
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_cgmPersonUid_qqbtdx_k$();
                tmp_0 = new Pair(tmp1_safe_receiver, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
              }
              var tmp0_safe_receiver_1 = tmp_0;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.add_utx5q5_k$(tmp0_safe_receiver_1);
              }
            }

            var membersAndPersonUids = destination;
            var tmp_1 = new XapiAccount(this._this__u8e3s4__1.learningSpace_1.get_url_18iuii_k$(), 'cgs-' + this.groupSetUid_1.toString() + '-' + this.groupNum_1);
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(membersAndPersonUids, 10));
            var tmp0_iterator_0 = membersAndPersonUids.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator_0.next_20eer_k$();
              destination_0.add_utx5q5_k$(item.get_first_irdx8n_k$());
            }

            var tmp_2 = new XapiGroup(VOID, VOID, VOID, VOID, VOID, tmp_1, destination_0);
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(membersAndPersonUids, 10)), 16);
            var destination_1 = LinkedHashMap_init_$Create$(capacity);
            var tmp0_iterator_1 = membersAndPersonUids.iterator_jk1svi_k$();
            while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_1.next_20eer_k$();
              var pair = to(identifierHash(element_0.get_first_irdx8n_k$(), this._this__u8e3s4__1.stringHasher_1), element_0.get_second_jf7fjx_k$());
              destination_1.put_4fpzoq_k$(pair.get_first_irdx8n_k$(), pair.get_second_jf7fjx_k$());
            }

            return new XapiGroupAndPersonUidMap(tmp_2, destination_1);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function CreateXapiGroupForCourseGroupUseCase(repo, learningSpace, stringHasher) {
    this.repo_1 = repo;
    this.learningSpace_1 = learningSpace;
    this.stringHasher_1 = stringHasher;
  }
  protoOf(CreateXapiGroupForCourseGroupUseCase).invoke_s9aiv8_k$ = function (groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$37(this, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function insertOrUpdateActorsIfNameChanged(_this__u8e3s4, actors, $completion) {
    var tmp = new $insertOrUpdateActorsIfNameChangedCOROUTINE$38(_this__u8e3s4, actors, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function $insertOrUpdateActorsIfNameChangedCOROUTINE$38(_this__u8e3s4, actors, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.actors_1 = actors;
  }
  protoOf($insertOrUpdateActorsIfNameChangedCOROUTINE$38).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.insertOrIgnoreListAsync_yi1xvt_k$(this.actors_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.timeNow0__1 = systemTimeInMillis();
            var tmp_0 = this;
            tmp_0.this1__1 = this.actors_1;
            this.tmp0_iterator2__1 = this.this1__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (!this.tmp0_iterator2__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

            this.element3__1 = this.tmp0_iterator2__1.next_20eer_k$();
            var tmp_1 = this;
            tmp_1.it4__1 = this.element3__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this._this__u8e3s4__1.updateIfNameChanged_rzegtp_k$(this.it4__1.get_actorUid_bxgzj8_k$(), this.it4__1.get_actorName_enxp4n_k$(), this.timeNow0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function insertOrUpdateIfLastModChanged(_this__u8e3s4, memberJoins, lastModTime, $completion) {
    var tmp = new $insertOrUpdateIfLastModChangedCOROUTINE$39(_this__u8e3s4, memberJoins, lastModTime, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function $insertOrUpdateIfLastModChangedCOROUTINE$39(_this__u8e3s4, memberJoins, lastModTime, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.memberJoins_1 = memberJoins;
    this.lastModTime_1 = lastModTime;
  }
  protoOf($insertOrUpdateIfLastModChangedCOROUTINE$39).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.insertOrIgnoreListAsync_6rsnc3_k$(this.memberJoins_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.this0__1 = this.memberJoins_1;
            this.tmp0_iterator1__1 = this.this0__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (!this.tmp0_iterator1__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

            this.element2__1 = this.tmp0_iterator1__1.next_20eer_k$();
            var tmp_1 = this;
            tmp_1.it3__1 = this.element2__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this._this__u8e3s4__1.updateLastModifiedTimeIfNeededAsync_xmt3em_k$(this.it3__1.get_gmajGroupActorUid_48ehxa_k$(), this.it3__1.get_gmajMemberActorUid_c3ucz7_k$(), this.lastModTime_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function agent(_this__u8e3s4, learningSpace) {
    var tmp0_account = new XapiAccount(learningSpace.get_url_18iuii_k$(), _this__u8e3s4.get_xseAccountUsername_q0miri_k$());
    var tmp1_objectType = XapiObjectType_Agent_getInstance();
    return new XapiAgent(VOID, VOID, VOID, VOID, tmp1_objectType, tmp0_account);
  }
  function knownActorUidToPersonUidsMap(_this__u8e3s4, json) {
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    var this_0 = _this__u8e3s4.get_knownActorUidToPersonUids_9ca7s8_k$();
    if (charSequenceLength(this_0) > 0) {
      tmp = json.decodeFromString_jwu9sq_k$(MapSerializer(serializer_1(Companion_getInstance_11()), serializer_1(Companion_getInstance_11())), _this__u8e3s4.get_knownActorUidToPersonUids_9ca7s8_k$());
    } else {
      tmp = emptyMap();
    }
    return tmp;
  }
  function get_resultProgressExtension(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.get_result_iyg5d2_k$();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_extensions_kxksyl_k$();
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>' call
      var tmp$ret$1;
      $l$block: {
        // Inline function 'kotlin.collections.firstNotNullOfOrNull' call
        var tmp0_iterator = get_XAPI_PROGRESSED_EXTENSIONS().iterator_jk1svi_k$();
        while (tmp0_iterator.hasNext_bitz1p_k$()) {
          var element = tmp0_iterator.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver_0 = tmp1_safe_receiver.get_wei43m_k$(element);
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : get_jsonPrimitive(tmp0_safe_receiver_0);
          var result = tmp1_safe_receiver_0 == null ? null : get_intOrNull(tmp1_safe_receiver_0);
          if (!(result == null)) {
            tmp$ret$1 = result;
            break $l$block;
          }
        }
        tmp$ret$1 = null;
      }
      tmp = tmp$ret$1;
    }
    return tmp;
  }
  function _get_db__ndbzd9_7($this) {
    return $this.db_1;
  }
  function _get_repo__dd1xjt_12($this) {
    return $this.repo_1;
  }
  function FormattedStatementResponse(string, stringResource) {
    stringResource = stringResource === VOID ? null : stringResource;
    this.string_1 = string;
    this.stringResource_1 = stringResource;
  }
  protoOf(FormattedStatementResponse).get_string_jnpst6_k$ = function () {
    return this.string_1;
  };
  protoOf(FormattedStatementResponse).get_stringResource_4df0w8_k$ = function () {
    return this.stringResource_1;
  };
  protoOf(FormattedStatementResponse).get_hasResponse_f85isu_k$ = function () {
    return !(this.string_1 == null) ? true : !(this.stringResource_1 == null);
  };
  protoOf(FormattedStatementResponse).component1_7eebsc_k$ = function () {
    return this.string_1;
  };
  protoOf(FormattedStatementResponse).component2_7eebsb_k$ = function () {
    return this.stringResource_1;
  };
  protoOf(FormattedStatementResponse).copy_k9w2c_k$ = function (string, stringResource) {
    return new FormattedStatementResponse(string, stringResource);
  };
  protoOf(FormattedStatementResponse).copy$default_e3tbbj_k$ = function (string, stringResource, $super) {
    string = string === VOID ? this.string_1 : string;
    stringResource = stringResource === VOID ? this.stringResource_1 : stringResource;
    return $super === VOID ? this.copy_k9w2c_k$(string, stringResource) : $super.copy_k9w2c_k$.call(this, string, stringResource);
  };
  protoOf(FormattedStatementResponse).toString = function () {
    return 'FormattedStatementResponse(string=' + this.string_1 + ', stringResource=' + this.stringResource_1 + ')';
  };
  protoOf(FormattedStatementResponse).hashCode = function () {
    var result = this.string_1 == null ? 0 : getStringHashCode(this.string_1);
    result = imul(result, 31) + (this.stringResource_1 == null ? 0 : this.stringResource_1.hashCode()) | 0;
    return result;
  };
  protoOf(FormattedStatementResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof FormattedStatementResponse))
      return false;
    var tmp0_other_with_cast = other instanceof FormattedStatementResponse ? other : THROW_CCE();
    if (!(this.string_1 == tmp0_other_with_cast.string_1))
      return false;
    if (!equals(this.stringResource_1, tmp0_other_with_cast.stringResource_1))
      return false;
    return true;
  };
  function Companion_61() {
    Companion_instance_61 = this;
    this.INTERACTION_TYPES_WITH_IDS_1 = listOf([Companion_getInstance_23().get_TYPE_CHOICE_sqvgf1_k$(), Companion_getInstance_23().get_TYPE_SEQUENCING_z7frly_k$(), Companion_getInstance_23().get_TYPE_LIKERT_x0r80l_k$(), Companion_getInstance_23().get_TYPE_MATCHING_uyytvr_k$(), Companion_getInstance_23().get_TYPE_PERFORMANCE_xx60d0_k$()]);
  }
  protoOf(Companion_61).get_INTERACTION_TYPES_WITH_IDS_r1oeyt_k$ = function () {
    return this.INTERACTION_TYPES_WITH_IDS_1;
  };
  var Companion_instance_61;
  function Companion_getInstance_122() {
    if (Companion_instance_61 == null)
      new Companion_61();
    return Companion_instance_61;
  }
  function FormatStatementResponseUseCase$invoke$slambda($activityEntity, $statement, this$0, resultContinuation) {
    this.$activityEntity_1 = $activityEntity;
    this.$statement_1 = $statement;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(FormatStatementResponseUseCase$invoke$slambda).invoke_pbonr2_k$ = function ($this$flow, $completion) {
    var tmp = this.create_ed52a6_k$($this$flow, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pbonr2_k$((!(p1 == null) ? isInterface(p1, FlowCollector) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(11);
            var tmp_0 = this;
            var tmp0_safe_receiver = this.$activityEntity_1;
            tmp_0.interactionType0__1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_actInteractionType_fg57ul_k$();
            this.response1__1 = this.$statement_1.get_resultResponse_brrjw9_k$();
            if ((this.response1__1 == null ? true : this.interactionType0__1 == null) ? true : this.interactionType0__1 === Companion_getInstance_23().get_TYPE_UNSET_eu0ur7_k$()) {
              this.set_state_rjd8d0_k$(10);
              var tmp1_safe_receiver = this.response1__1;
              var tmp_1;
              if (tmp1_safe_receiver == null) {
                tmp_1 = null;
              } else {
                tmp_1 = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
              }
              suspendResult = this.$this$flow_1.emit_t92u1f_k$(new FormattedStatementResponse(tmp_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

          case 1:
            this.tmp2_subject2__1 = this.interactionType0__1;
            if (Companion_getInstance_122().INTERACTION_TYPES_WITH_IDS_1.contains_aljjnj_k$(this.tmp2_subject2__1)) {
              var tmp_2 = this;
              tmp_2.this3__1 = listOfNotNull([this.this$0__1.db_1, this.this$0__1.repo_1]);
              this.tmp0_iterator4__1 = this.this3__1.iterator_jk1svi_k$();
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              if (this.tmp2_subject2__1 === Companion_getInstance_23().get_TYPE_TRUE_FALSE_xtwdou_k$()) {
                this.responseBoolVal5__1 = toBooleanStrictOrNull(this.response1__1);
                this.set_state_rjd8d0_k$(4);
                var tmp_3;
                if (this.responseBoolVal5__1 === true) {
                  tmp_3 = strings_getInstance().get_true_key_1aqcqx_k$();
                } else if (this.responseBoolVal5__1 === false) {
                  tmp_3 = strings_getInstance().get_false_key_o196xy_k$();
                } else {
                  tmp_3 = null;
                }
                suspendResult = this.$this$flow_1.emit_t92u1f_k$(new FormattedStatementResponse(null, tmp_3), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                if (this.tmp2_subject2__1 === Companion_getInstance_23().get_TYPE_FILL_IN_c7a0f9_k$() ? true : this.tmp2_subject2__1 === Companion_getInstance_23().get_TYPE_LONG_FILL_IN_htkb8a_k$()) {
                  this.set_state_rjd8d0_k$(3);
                  var this_0 = htmlToPlainText(replace(this.response1__1, '[,]', ', '));
                  suspendResult = this.$this$flow_1.emit_t92u1f_k$(new FormattedStatementResponse(toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()))), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.set_state_rjd8d0_k$(2);
                  var this_1 = htmlToPlainText(this.response1__1);
                  suspendResult = this.$this$flow_1.emit_t92u1f_k$(new FormattedStatementResponse(toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()))), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 2:
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 5:
            if (!this.tmp0_iterator4__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            }

            this.element6__1 = this.tmp0_iterator4__1.next_20eer_k$();
            var tmp_4 = this;
            tmp_4.dataSource7__1 = this.element6__1;
            this.set_state_rjd8d0_k$(6);
            suspendResult = this.dataSource7__1.activityLangMapEntryDao_1efc67_k$().findAllByActivityUid_d92euq_k$(this.$statement_1.get_statementObjectUid1_2adyjq_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.langMapEntries8__1 = suspendResult;
            var tmp_5 = this;
            var tmp0_subject = this.interactionType0__1;
            var tmp_6;
            if ((tmp0_subject === Companion_getInstance_23().get_TYPE_CHOICE_sqvgf1_k$() ? true : tmp0_subject === Companion_getInstance_23().get_TYPE_SEQUENCING_z7frly_k$()) ? true : tmp0_subject === Companion_getInstance_23().get_TYPE_LIKERT_x0r80l_k$()) {
              var tmp_7;
              if (this.interactionType0__1 === Companion_getInstance_23().get_TYPE_LIKERT_x0r80l_k$()) {
                tmp_7 = 'scale';
              } else {
                tmp_7 = 'choices';
              }
              var propPrefix = tmp_7;
              var responseIds = split(this.response1__1, ['[,]']);
              var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(responseIds, 10));
              var tmp0_iterator = responseIds.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var item = tmp0_iterator.next_20eer_k$();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp0_iterator_0 = this.langMapEntries8__1.iterator_jk1svi_k$();
                  while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                    var element = tmp0_iterator_0.next_20eer_k$();
                    if (element.get_almePropName_64a396_k$() === propPrefix + '-' + item) {
                      tmp$ret$0 = element;
                      break l$ret$1;
                    }
                  }
                  tmp$ret$0 = null;
                }
                 while (false);
                var tmp0_safe_receiver_0 = tmp$ret$0;
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_almeValue_o41rph_k$();
                destination.add_utx5q5_k$(tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs);
              }
              tmp_6 = joinToString(destination, ', ');
            } else if (tmp0_subject === Companion_getInstance_23().get_TYPE_MATCHING_uyytvr_k$()) {
              var this_2 = split(this.response1__1, ['[,]']);
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
              var tmp0_iterator_1 = this_2.iterator_jk1svi_k$();
              while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
                var item_0 = tmp0_iterator_1.next_20eer_k$();
                var pairStrList = split(item_0, ['[.]'], VOID, 2);
                var sourceId = first_0(pairStrList);
                var targetId = getOrNull(pairStrList, 1);
                var tmp$ret$2;
                l$ret$3: do {
                  var tmp0_iterator_2 = this.langMapEntries8__1.iterator_jk1svi_k$();
                  while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
                    var element_0 = tmp0_iterator_2.next_20eer_k$();
                    if (element_0.get_almePropName_64a396_k$() === 'source-' + sourceId) {
                      tmp$ret$2 = element_0;
                      break l$ret$3;
                    }
                  }
                  tmp$ret$2 = null;
                }
                 while (false);
                var tmp0_safe_receiver_1 = tmp$ret$2;
                var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.get_almeValue_o41rph_k$();
                var sourceText = tmp1_elvis_lhs_0 == null ? sourceId : tmp1_elvis_lhs_0;
                var tmp$ret$4;
                l$ret$5: do {
                  var tmp0_iterator_3 = this.langMapEntries8__1.iterator_jk1svi_k$();
                  while (tmp0_iterator_3.hasNext_bitz1p_k$()) {
                    var element_1 = tmp0_iterator_3.next_20eer_k$();
                    if (element_1.get_almePropName_64a396_k$() === 'target-' + targetId) {
                      tmp$ret$4 = element_1;
                      break l$ret$5;
                    }
                  }
                  tmp$ret$4 = null;
                }
                 while (false);
                var tmp2_safe_receiver = tmp$ret$4;
                var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_almeValue_o41rph_k$();
                var targetText = tmp3_elvis_lhs == null ? targetId : tmp3_elvis_lhs;
                destination_0.add_utx5q5_k$(sourceText + ' - ' + targetText);
              }
              tmp_6 = joinToString(destination_0, ', ');
            } else if (tmp0_subject === Companion_getInstance_23().get_TYPE_PERFORMANCE_xx60d0_k$()) {
              var this_3 = split(this.response1__1, ['[,]']);
              var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
              var tmp0_iterator_4 = this_3.iterator_jk1svi_k$();
              while (tmp0_iterator_4.hasNext_bitz1p_k$()) {
                var item_1 = tmp0_iterator_4.next_20eer_k$();
                var stepStrList = split(item_1, ['[.]'], VOID, 2);
                var stepId = first_0(stepStrList);
                var stepResponse = getOrNull(stepStrList, 1);
                var tmp$ret$6;
                l$ret$7: do {
                  var tmp0_iterator_5 = this.langMapEntries8__1.iterator_jk1svi_k$();
                  while (tmp0_iterator_5.hasNext_bitz1p_k$()) {
                    var element_2 = tmp0_iterator_5.next_20eer_k$();
                    if (element_2.get_almePropName_64a396_k$() === 'steps-' + stepId) {
                      tmp$ret$6 = element_2;
                      break l$ret$7;
                    }
                  }
                  tmp$ret$6 = null;
                }
                 while (false);
                var tmp0_safe_receiver_2 = tmp$ret$6;
                var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_almeValue_o41rph_k$();
                var stepText = tmp1_elvis_lhs_1 == null ? stepId : tmp1_elvis_lhs_1;
                destination_1.add_utx5q5_k$(stepText + ': ' + (stepResponse == null ? '' : stepResponse));
              }
              tmp_6 = joinToString(destination_1, ', ');
            } else {
              tmp_6 = null;
            }

            tmp_5.responseStr9__1 = tmp_6;
            this.set_state_rjd8d0_k$(7);
            var tmp1_elvis_lhs_2 = this.responseStr9__1;
            var this_4 = htmlToPlainText(tmp1_elvis_lhs_2 == null ? this.response1__1 : tmp1_elvis_lhs_2);
            suspendResult = this.$this$flow_1.emit_t92u1f_k$(new FormattedStatementResponse(toString(trim(isCharSequence(this_4) ? this_4 : THROW_CCE()))), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 8:
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            return Unit_getInstance();
          case 10:
            return Unit_getInstance();
          case 11:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 11) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).create_ed52a6_k$ = function ($this$flow, completion) {
    var i = new FormatStatementResponseUseCase$invoke$slambda(this.$activityEntity_1, this.$statement_1, this.this$0__1, completion);
    i.$this$flow_1 = $this$flow;
    return i;
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_ed52a6_k$((!(value == null) ? isInterface(value, FlowCollector) : false) ? value : THROW_CCE(), completion);
  };
  function FormatStatementResponseUseCase$invoke$slambda_0($activityEntity, $statement, this$0, resultContinuation) {
    var i = new FormatStatementResponseUseCase$invoke$slambda($activityEntity, $statement, this$0, resultContinuation);
    var l = function ($this$flow, $completion) {
      return i.invoke_pbonr2_k$($this$flow, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function FormatStatementResponseUseCase(db, repo) {
    Companion_getInstance_122();
    this.db_1 = db;
    this.repo_1 = repo;
  }
  protoOf(FormatStatementResponseUseCase).invoke_93cvjr_k$ = function (statement, activityEntity) {
    return flow(FormatStatementResponseUseCase$invoke$slambda_0(activityEntity, statement, this, null));
  };
  function _get_$childSerializers__r2zwns_10($this) {
    return $this.$childSerializers_1;
  }
  function Companion_62() {
    Companion_instance_62 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, null, null];
  }
  protoOf(Companion_62).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_52();
  };
  var Companion_instance_62;
  function Companion_getInstance_123() {
    if (Companion_instance_62 == null)
      new Companion_62();
    return Companion_instance_62;
  }
  function $serializer_42() {
    $serializer_instance_42 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.Attachment', this, 6);
    tmp0_serialDesc.addElement_5pzumi_k$('usageType', true);
    tmp0_serialDesc.addElement_5pzumi_k$('display', true);
    tmp0_serialDesc.addElement_5pzumi_k$('description', true);
    tmp0_serialDesc.addElement_5pzumi_k$('contentType', true);
    tmp0_serialDesc.addElement_5pzumi_k$('length', true);
    tmp0_serialDesc.addElement_5pzumi_k$('sha2', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_42).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_42).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_123().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(StringSerializer_getInstance()), LongSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_42).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp11_cached = Companion_getInstance_123().$childSerializers_1;
    if (tmp10_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.decodeLongElement_994anb_k$(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.decodeLongElement_994anb_k$(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Attachment_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_42).serialize_siihyk_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_123().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.usageType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.usageType_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.display_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, tmp2_cached[1], value.display_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.description_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, tmp2_cached[2], value.description_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.contentType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.contentType_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !value.length_1.equals(new Long(0, 0))) {
      tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 4, value.length_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.sha2__1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, StringSerializer_getInstance(), value.sha2__1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_42).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_siihyk_k$(encoder, value instanceof Attachment ? value : THROW_CCE());
  };
  var $serializer_instance_42;
  function $serializer_getInstance_52() {
    if ($serializer_instance_42 == null)
      new $serializer_42();
    return $serializer_instance_42;
  }
  function Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_52().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.usageType_1 = null;
    else
      $this.usageType_1 = usageType;
    if (0 === (seen1 & 2))
      $this.display_1 = null;
    else
      $this.display_1 = display;
    if (0 === (seen1 & 4))
      $this.description_1 = null;
    else
      $this.description_1 = description;
    if (0 === (seen1 & 8))
      $this.contentType_1 = null;
    else
      $this.contentType_1 = contentType;
    if (0 === (seen1 & 16))
      $this.length_1 = new Long(0, 0);
    else
      $this.length_1 = length;
    if (0 === (seen1 & 32))
      $this.sha2__1 = null;
    else
      $this.sha2__1 = sha2;
    return $this;
  }
  function Attachment_init_$Create$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker) {
    return Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, objectCreate(protoOf(Attachment)));
  }
  function Attachment(usageType, display, description, contentType, length, sha2) {
    Companion_getInstance_123();
    usageType = usageType === VOID ? null : usageType;
    display = display === VOID ? null : display;
    description = description === VOID ? null : description;
    contentType = contentType === VOID ? null : contentType;
    length = length === VOID ? new Long(0, 0) : length;
    sha2 = sha2 === VOID ? null : sha2;
    this.usageType_1 = usageType;
    this.display_1 = display;
    this.description_1 = description;
    this.contentType_1 = contentType;
    this.length_1 = length;
    this.sha2__1 = sha2;
  }
  protoOf(Attachment).set_usageType_yy5y87_k$ = function (_set____db54di) {
    this.usageType_1 = _set____db54di;
  };
  protoOf(Attachment).get_usageType_lbfsuq_k$ = function () {
    return this.usageType_1;
  };
  protoOf(Attachment).set_display_sdsoai_k$ = function (_set____db54di) {
    this.display_1 = _set____db54di;
  };
  protoOf(Attachment).get_display_swvnix_k$ = function () {
    return this.display_1;
  };
  protoOf(Attachment).set_description_d3b4xg_k$ = function (_set____db54di) {
    this.description_1 = _set____db54di;
  };
  protoOf(Attachment).get_description_emjre5_k$ = function () {
    return this.description_1;
  };
  protoOf(Attachment).set_contentType_7wbb1b_k$ = function (_set____db54di) {
    this.contentType_1 = _set____db54di;
  };
  protoOf(Attachment).get_contentType_7git4a_k$ = function () {
    return this.contentType_1;
  };
  protoOf(Attachment).set_length_9b2h3v_k$ = function (_set____db54di) {
    this.length_1 = _set____db54di;
  };
  protoOf(Attachment).get_length_g42xv3_k$ = function () {
    return this.length_1;
  };
  protoOf(Attachment).set_sha2_zan564_k$ = function (_set____db54di) {
    this.sha2__1 = _set____db54di;
  };
  protoOf(Attachment).get_sha2_wouafj_k$ = function () {
    return this.sha2__1;
  };
  protoOf(Attachment).component1_7eebsc_k$ = function () {
    return this.usageType_1;
  };
  protoOf(Attachment).component2_7eebsb_k$ = function () {
    return this.display_1;
  };
  protoOf(Attachment).component3_7eebsa_k$ = function () {
    return this.description_1;
  };
  protoOf(Attachment).component4_7eebs9_k$ = function () {
    return this.contentType_1;
  };
  protoOf(Attachment).component5_7eebs8_k$ = function () {
    return this.length_1;
  };
  protoOf(Attachment).component6_7eebs7_k$ = function () {
    return this.sha2__1;
  };
  protoOf(Attachment).copy_a15wly_k$ = function (usageType, display, description, contentType, length, sha2) {
    return new Attachment(usageType, display, description, contentType, length, sha2);
  };
  protoOf(Attachment).copy$default_i4n4bj_k$ = function (usageType, display, description, contentType, length, sha2, $super) {
    usageType = usageType === VOID ? this.usageType_1 : usageType;
    display = display === VOID ? this.display_1 : display;
    description = description === VOID ? this.description_1 : description;
    contentType = contentType === VOID ? this.contentType_1 : contentType;
    length = length === VOID ? this.length_1 : length;
    sha2 = sha2 === VOID ? this.sha2__1 : sha2;
    return $super === VOID ? this.copy_a15wly_k$(usageType, display, description, contentType, length, sha2) : $super.copy_a15wly_k$.call(this, usageType, display, description, contentType, length, sha2);
  };
  protoOf(Attachment).toString = function () {
    return 'Attachment(usageType=' + this.usageType_1 + ', display=' + this.display_1 + ', description=' + this.description_1 + ', contentType=' + this.contentType_1 + ', length=' + this.length_1.toString() + ', sha2=' + this.sha2__1 + ')';
  };
  protoOf(Attachment).hashCode = function () {
    var result = this.usageType_1 == null ? 0 : getStringHashCode(this.usageType_1);
    result = imul(result, 31) + (this.display_1 == null ? 0 : hashCode(this.display_1)) | 0;
    result = imul(result, 31) + (this.description_1 == null ? 0 : hashCode(this.description_1)) | 0;
    result = imul(result, 31) + (this.contentType_1 == null ? 0 : getStringHashCode(this.contentType_1)) | 0;
    result = imul(result, 31) + this.length_1.hashCode() | 0;
    result = imul(result, 31) + (this.sha2__1 == null ? 0 : getStringHashCode(this.sha2__1)) | 0;
    return result;
  };
  protoOf(Attachment).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Attachment))
      return false;
    var tmp0_other_with_cast = other instanceof Attachment ? other : THROW_CCE();
    if (!(this.usageType_1 == tmp0_other_with_cast.usageType_1))
      return false;
    if (!equals(this.display_1, tmp0_other_with_cast.display_1))
      return false;
    if (!equals(this.description_1, tmp0_other_with_cast.description_1))
      return false;
    if (!(this.contentType_1 == tmp0_other_with_cast.contentType_1))
      return false;
    if (!this.length_1.equals(tmp0_other_with_cast.length_1))
      return false;
    if (!(this.sha2__1 == tmp0_other_with_cast.sha2__1))
      return false;
    return true;
  };
  function Companion_63() {
    Companion_instance_63 = this;
  }
  protoOf(Companion_63).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_53();
  };
  var Companion_instance_63;
  function Companion_getInstance_124() {
    if (Companion_instance_63 == null)
      new Companion_63();
    return Companion_instance_63;
  }
  function $serializer_43() {
    $serializer_instance_43 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAccount', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('homePage', false);
    tmp0_serialDesc.addElement_5pzumi_k$('name', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_43).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_43).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_43).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiAccount_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_43).serialize_px4o0k_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.homePage_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.name_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_43).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_px4o0k_k$(encoder, value instanceof XapiAccount ? value : THROW_CCE());
  };
  var $serializer_instance_43;
  function $serializer_getInstance_53() {
    if ($serializer_instance_43 == null)
      new $serializer_43();
    return $serializer_instance_43;
  }
  function XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_53().descriptor_1);
    }
    $this.homePage_1 = homePage;
    $this.name_1 = name;
    return $this;
  }
  function XapiAccount_init_$Create$(seen1, homePage, name, serializationConstructorMarker) {
    return XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, objectCreate(protoOf(XapiAccount)));
  }
  function XapiAccount(homePage, name) {
    Companion_getInstance_124();
    this.homePage_1 = homePage;
    this.name_1 = name;
  }
  protoOf(XapiAccount).get_homePage_v6mod3_k$ = function () {
    return this.homePage_1;
  };
  protoOf(XapiAccount).get_name_woqyms_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiAccount).component1_7eebsc_k$ = function () {
    return this.homePage_1;
  };
  protoOf(XapiAccount).component2_7eebsb_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiAccount).copy_plwnsl_k$ = function (homePage, name) {
    return new XapiAccount(homePage, name);
  };
  protoOf(XapiAccount).copy$default_oeqhy4_k$ = function (homePage, name, $super) {
    homePage = homePage === VOID ? this.homePage_1 : homePage;
    name = name === VOID ? this.name_1 : name;
    return $super === VOID ? this.copy_plwnsl_k$(homePage, name) : $super.copy_plwnsl_k$.call(this, homePage, name);
  };
  protoOf(XapiAccount).toString = function () {
    return 'XapiAccount(homePage=' + this.homePage_1 + ', name=' + this.name_1 + ')';
  };
  protoOf(XapiAccount).hashCode = function () {
    var result = getStringHashCode(this.homePage_1);
    result = imul(result, 31) + getStringHashCode(this.name_1) | 0;
    return result;
  };
  protoOf(XapiAccount).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAccount))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAccount ? other : THROW_CCE();
    if (!(this.homePage_1 === tmp0_other_with_cast.homePage_1))
      return false;
    if (!(this.name_1 === tmp0_other_with_cast.name_1))
      return false;
    return true;
  };
  function _get_$childSerializers__r2zwns_11($this) {
    return $this.$childSerializers_1;
  }
  function Companion_64() {
    Companion_instance_64 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  protoOf(Companion_64).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_54();
  };
  var Companion_instance_64;
  function Companion_getInstance_125() {
    if (Companion_instance_64 == null)
      new Companion_64();
    return Companion_instance_64;
  }
  function $serializer_44() {
    $serializer_instance_44 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivity.Interaction', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('id', true);
    tmp0_serialDesc.addElement_5pzumi_k$('description', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_44).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_44).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_125().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_44).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp7_cached = Companion_getInstance_125().$childSerializers_1;
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Interaction_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_44).serialize_yw91qe_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_125().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.id_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.id_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.description_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, tmp2_cached[1], value.description_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_44).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_yw91qe_k$(encoder, value instanceof Interaction ? value : THROW_CCE());
  };
  var $serializer_instance_44;
  function $serializer_getInstance_54() {
    if ($serializer_instance_44 == null)
      new $serializer_44();
    return $serializer_instance_44;
  }
  function Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_54().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.id_1 = null;
    else
      $this.id_1 = id;
    if (0 === (seen1 & 2))
      $this.description_1 = null;
    else
      $this.description_1 = description;
    return $this;
  }
  function Interaction_init_$Create$(seen1, id, description, serializationConstructorMarker) {
    return Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, objectCreate(protoOf(Interaction)));
  }
  function _get_$childSerializers__r2zwns_12($this) {
    return $this.$childSerializers_1;
  }
  function Interaction(id, description) {
    Companion_getInstance_125();
    id = id === VOID ? null : id;
    description = description === VOID ? null : description;
    this.id_1 = id;
    this.description_1 = description;
  }
  protoOf(Interaction).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(Interaction).get_description_emjre5_k$ = function () {
    return this.description_1;
  };
  protoOf(Interaction).component1_7eebsc_k$ = function () {
    return this.id_1;
  };
  protoOf(Interaction).component2_7eebsb_k$ = function () {
    return this.description_1;
  };
  protoOf(Interaction).copy_9kdw3_k$ = function (id, description) {
    return new Interaction(id, description);
  };
  protoOf(Interaction).copy$default_ln7avq_k$ = function (id, description, $super) {
    id = id === VOID ? this.id_1 : id;
    description = description === VOID ? this.description_1 : description;
    return $super === VOID ? this.copy_9kdw3_k$(id, description) : $super.copy_9kdw3_k$.call(this, id, description);
  };
  protoOf(Interaction).toString = function () {
    return 'Interaction(id=' + this.id_1 + ', description=' + this.description_1 + ')';
  };
  protoOf(Interaction).hashCode = function () {
    var result = this.id_1 == null ? 0 : getStringHashCode(this.id_1);
    result = imul(result, 31) + (this.description_1 == null ? 0 : hashCode(this.description_1)) | 0;
    return result;
  };
  protoOf(Interaction).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Interaction))
      return false;
    var tmp0_other_with_cast = other instanceof Interaction ? other : THROW_CCE();
    if (!(this.id_1 == tmp0_other_with_cast.id_1))
      return false;
    if (!equals(this.description_1, tmp0_other_with_cast.description_1))
      return false;
    return true;
  };
  function Companion_65() {
    Companion_instance_65 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance()), null, null, new ArrayListSerializer(StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_54()), new ArrayListSerializer($serializer_getInstance_54()), new ArrayListSerializer($serializer_getInstance_54()), new ArrayListSerializer($serializer_getInstance_54()), new ArrayListSerializer($serializer_getInstance_54())];
  }
  protoOf(Companion_65).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_55();
  };
  var Companion_instance_65;
  function Companion_getInstance_126() {
    if (Companion_instance_65 == null)
      new Companion_65();
    return Companion_instance_65;
  }
  function $serializer_45() {
    $serializer_instance_45 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('Activity', this, 12);
    tmp0_serialDesc.addElement_5pzumi_k$('name', true);
    tmp0_serialDesc.addElement_5pzumi_k$('description', true);
    tmp0_serialDesc.addElement_5pzumi_k$('type', true);
    tmp0_serialDesc.addElement_5pzumi_k$('extensions', true);
    tmp0_serialDesc.addElement_5pzumi_k$('moreInfo', true);
    tmp0_serialDesc.addElement_5pzumi_k$('interactionType', true);
    tmp0_serialDesc.addElement_5pzumi_k$('correctResponsePattern', true);
    tmp0_serialDesc.addElement_5pzumi_k$('choices', true);
    tmp0_serialDesc.addElement_5pzumi_k$('scale', true);
    tmp0_serialDesc.addElement_5pzumi_k$('source', true);
    tmp0_serialDesc.addElement_5pzumi_k$('target', true);
    tmp0_serialDesc.addElement_5pzumi_k$('steps', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_45).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_45).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_126().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[3]), get_nullable(StringSerializer_getInstance()), get_nullable(XapiInteractionTypeSerializer_getInstance()), get_nullable(tmp0_cached[6]), get_nullable(tmp0_cached[7]), get_nullable(tmp0_cached[8]), get_nullable(tmp0_cached[9]), get_nullable(tmp0_cached[10]), get_nullable(tmp0_cached[11])];
  };
  protoOf($serializer_45).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp17_cached = Companion_getInstance_126().$childSerializers_1;
    if (tmp16_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, XapiInteractionTypeSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, XapiInteractionTypeSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiActivity_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_45).serialize_bg6ry6_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_126().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.name_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, tmp2_cached[0], value.name_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.description_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, tmp2_cached[1], value.description_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.type_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.type_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.extensions_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, tmp2_cached[3], value.extensions_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.moreInfo_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, StringSerializer_getInstance(), value.moreInfo_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.interactionType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, XapiInteractionTypeSerializer_getInstance(), value.interactionType_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !(value.correctResponsePattern_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 6, tmp2_cached[6], value.correctResponsePattern_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 7) ? true : !(value.choices_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 7, tmp2_cached[7], value.choices_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 8) ? true : !(value.scale_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 8, tmp2_cached[8], value.scale_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 9) ? true : !(value.source_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 9, tmp2_cached[9], value.source_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 10) ? true : !(value.target_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 10, tmp2_cached[10], value.target_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 11) ? true : !(value.steps_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 11, tmp2_cached[11], value.steps_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_45).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_bg6ry6_k$(encoder, value instanceof XapiActivity ? value : THROW_CCE());
  };
  var $serializer_instance_45;
  function $serializer_getInstance_55() {
    if ($serializer_instance_45 == null)
      new $serializer_45();
    return $serializer_instance_45;
  }
  function XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_55().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.name_1 = null;
    else
      $this.name_1 = name;
    if (0 === (seen1 & 2))
      $this.description_1 = null;
    else
      $this.description_1 = description;
    if (0 === (seen1 & 4))
      $this.type_1 = null;
    else
      $this.type_1 = type;
    if (0 === (seen1 & 8))
      $this.extensions_1 = null;
    else
      $this.extensions_1 = extensions;
    if (0 === (seen1 & 16))
      $this.moreInfo_1 = null;
    else
      $this.moreInfo_1 = moreInfo;
    if (0 === (seen1 & 32))
      $this.interactionType_1 = null;
    else
      $this.interactionType_1 = interactionType;
    if (0 === (seen1 & 64))
      $this.correctResponsePattern_1 = null;
    else
      $this.correctResponsePattern_1 = correctResponsePattern;
    if (0 === (seen1 & 128))
      $this.choices_1 = null;
    else
      $this.choices_1 = choices;
    if (0 === (seen1 & 256))
      $this.scale_1 = null;
    else
      $this.scale_1 = scale;
    if (0 === (seen1 & 512))
      $this.source_1 = null;
    else
      $this.source_1 = source;
    if (0 === (seen1 & 1024))
      $this.target_1 = null;
    else
      $this.target_1 = target;
    if (0 === (seen1 & 2048))
      $this.steps_1 = null;
    else
      $this.steps_1 = steps;
    return $this;
  }
  function XapiActivity_init_$Create$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker) {
    return XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, objectCreate(protoOf(XapiActivity)));
  }
  function XapiActivity(name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps) {
    Companion_getInstance_126();
    name = name === VOID ? null : name;
    description = description === VOID ? null : description;
    type = type === VOID ? null : type;
    extensions = extensions === VOID ? null : extensions;
    moreInfo = moreInfo === VOID ? null : moreInfo;
    interactionType = interactionType === VOID ? null : interactionType;
    correctResponsePattern = correctResponsePattern === VOID ? null : correctResponsePattern;
    choices = choices === VOID ? null : choices;
    scale = scale === VOID ? null : scale;
    source = source === VOID ? null : source;
    target = target === VOID ? null : target;
    steps = steps === VOID ? null : steps;
    this.name_1 = name;
    this.description_1 = description;
    this.type_1 = type;
    this.extensions_1 = extensions;
    this.moreInfo_1 = moreInfo;
    this.interactionType_1 = interactionType;
    this.correctResponsePattern_1 = correctResponsePattern;
    this.choices_1 = choices;
    this.scale_1 = scale;
    this.source_1 = source;
    this.target_1 = target;
    this.steps_1 = steps;
  }
  protoOf(XapiActivity).get_name_woqyms_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiActivity).get_description_emjre5_k$ = function () {
    return this.description_1;
  };
  protoOf(XapiActivity).get_type_wovaf7_k$ = function () {
    return this.type_1;
  };
  protoOf(XapiActivity).get_extensions_kxksyl_k$ = function () {
    return this.extensions_1;
  };
  protoOf(XapiActivity).get_moreInfo_zfh7kk_k$ = function () {
    return this.moreInfo_1;
  };
  protoOf(XapiActivity).get_interactionType_m8xgg3_k$ = function () {
    return this.interactionType_1;
  };
  protoOf(XapiActivity).get_correctResponsePattern_y80p0y_k$ = function () {
    return this.correctResponsePattern_1;
  };
  protoOf(XapiActivity).get_choices_dp3x1l_k$ = function () {
    return this.choices_1;
  };
  protoOf(XapiActivity).get_scale_iyf28x_k$ = function () {
    return this.scale_1;
  };
  protoOf(XapiActivity).get_source_jl0x7o_k$ = function () {
    return this.source_1;
  };
  protoOf(XapiActivity).get_target_juba8q_k$ = function () {
    return this.target_1;
  };
  protoOf(XapiActivity).get_steps_iyq03i_k$ = function () {
    return this.steps_1;
  };
  protoOf(XapiActivity).component1_7eebsc_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiActivity).component2_7eebsb_k$ = function () {
    return this.description_1;
  };
  protoOf(XapiActivity).component3_7eebsa_k$ = function () {
    return this.type_1;
  };
  protoOf(XapiActivity).component4_7eebs9_k$ = function () {
    return this.extensions_1;
  };
  protoOf(XapiActivity).component5_7eebs8_k$ = function () {
    return this.moreInfo_1;
  };
  protoOf(XapiActivity).component6_7eebs7_k$ = function () {
    return this.interactionType_1;
  };
  protoOf(XapiActivity).component7_7eebs6_k$ = function () {
    return this.correctResponsePattern_1;
  };
  protoOf(XapiActivity).component8_7eebs5_k$ = function () {
    return this.choices_1;
  };
  protoOf(XapiActivity).component9_7eebs4_k$ = function () {
    return this.scale_1;
  };
  protoOf(XapiActivity).component10_gazzfo_k$ = function () {
    return this.source_1;
  };
  protoOf(XapiActivity).component11_gazzfn_k$ = function () {
    return this.target_1;
  };
  protoOf(XapiActivity).component12_gazzfm_k$ = function () {
    return this.steps_1;
  };
  protoOf(XapiActivity).copy_hkmrmu_k$ = function (name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps) {
    return new XapiActivity(name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps);
  };
  protoOf(XapiActivity).copy$default_pd2i3v_k$ = function (name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, $super) {
    name = name === VOID ? this.name_1 : name;
    description = description === VOID ? this.description_1 : description;
    type = type === VOID ? this.type_1 : type;
    extensions = extensions === VOID ? this.extensions_1 : extensions;
    moreInfo = moreInfo === VOID ? this.moreInfo_1 : moreInfo;
    interactionType = interactionType === VOID ? this.interactionType_1 : interactionType;
    correctResponsePattern = correctResponsePattern === VOID ? this.correctResponsePattern_1 : correctResponsePattern;
    choices = choices === VOID ? this.choices_1 : choices;
    scale = scale === VOID ? this.scale_1 : scale;
    source = source === VOID ? this.source_1 : source;
    target = target === VOID ? this.target_1 : target;
    steps = steps === VOID ? this.steps_1 : steps;
    return $super === VOID ? this.copy_hkmrmu_k$(name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps) : $super.copy_hkmrmu_k$.call(this, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps);
  };
  protoOf(XapiActivity).toString = function () {
    return 'XapiActivity(name=' + this.name_1 + ', description=' + this.description_1 + ', type=' + this.type_1 + ', extensions=' + this.extensions_1 + ', moreInfo=' + this.moreInfo_1 + ', interactionType=' + this.interactionType_1 + ', correctResponsePattern=' + this.correctResponsePattern_1 + ', choices=' + this.choices_1 + ', scale=' + this.scale_1 + ', source=' + this.source_1 + ', target=' + this.target_1 + ', steps=' + this.steps_1 + ')';
  };
  protoOf(XapiActivity).hashCode = function () {
    var result = this.name_1 == null ? 0 : hashCode(this.name_1);
    result = imul(result, 31) + (this.description_1 == null ? 0 : hashCode(this.description_1)) | 0;
    result = imul(result, 31) + (this.type_1 == null ? 0 : getStringHashCode(this.type_1)) | 0;
    result = imul(result, 31) + (this.extensions_1 == null ? 0 : hashCode(this.extensions_1)) | 0;
    result = imul(result, 31) + (this.moreInfo_1 == null ? 0 : getStringHashCode(this.moreInfo_1)) | 0;
    result = imul(result, 31) + (this.interactionType_1 == null ? 0 : this.interactionType_1.hashCode()) | 0;
    result = imul(result, 31) + (this.correctResponsePattern_1 == null ? 0 : hashCode(this.correctResponsePattern_1)) | 0;
    result = imul(result, 31) + (this.choices_1 == null ? 0 : hashCode(this.choices_1)) | 0;
    result = imul(result, 31) + (this.scale_1 == null ? 0 : hashCode(this.scale_1)) | 0;
    result = imul(result, 31) + (this.source_1 == null ? 0 : hashCode(this.source_1)) | 0;
    result = imul(result, 31) + (this.target_1 == null ? 0 : hashCode(this.target_1)) | 0;
    result = imul(result, 31) + (this.steps_1 == null ? 0 : hashCode(this.steps_1)) | 0;
    return result;
  };
  protoOf(XapiActivity).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivity))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivity ? other : THROW_CCE();
    if (!equals(this.name_1, tmp0_other_with_cast.name_1))
      return false;
    if (!equals(this.description_1, tmp0_other_with_cast.description_1))
      return false;
    if (!(this.type_1 == tmp0_other_with_cast.type_1))
      return false;
    if (!equals(this.extensions_1, tmp0_other_with_cast.extensions_1))
      return false;
    if (!(this.moreInfo_1 == tmp0_other_with_cast.moreInfo_1))
      return false;
    if (!equals(this.interactionType_1, tmp0_other_with_cast.interactionType_1))
      return false;
    if (!equals(this.correctResponsePattern_1, tmp0_other_with_cast.correctResponsePattern_1))
      return false;
    if (!equals(this.choices_1, tmp0_other_with_cast.choices_1))
      return false;
    if (!equals(this.scale_1, tmp0_other_with_cast.scale_1))
      return false;
    if (!equals(this.source_1, tmp0_other_with_cast.source_1))
      return false;
    if (!equals(this.target_1, tmp0_other_with_cast.target_1))
      return false;
    if (!equals(this.steps_1, tmp0_other_with_cast.steps_1))
      return false;
    return true;
  };
  function ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    activityLangMapEntries = activityLangMapEntries === VOID ? emptyList() : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? emptyList() : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? emptyList() : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? null : statementContextActivityJoin;
    this.activityEntity_1 = activityEntity;
    this.activityLangMapEntries_1 = activityLangMapEntries;
    this.activityInteractionEntities_1 = activityInteractionEntities;
    this.activityExtensionEntities_1 = activityExtensionEntities;
    this.statementContextActivityJoin_1 = statementContextActivityJoin;
  }
  protoOf(ActivityEntities).get_activityEntity_d1963p_k$ = function () {
    return this.activityEntity_1;
  };
  protoOf(ActivityEntities).get_activityLangMapEntries_6cto86_k$ = function () {
    return this.activityLangMapEntries_1;
  };
  protoOf(ActivityEntities).get_activityInteractionEntities_fpz5dn_k$ = function () {
    return this.activityInteractionEntities_1;
  };
  protoOf(ActivityEntities).get_activityExtensionEntities_uivjc_k$ = function () {
    return this.activityExtensionEntities_1;
  };
  protoOf(ActivityEntities).get_statementContextActivityJoin_pqgkfy_k$ = function () {
    return this.statementContextActivityJoin_1;
  };
  protoOf(ActivityEntities).component1_7eebsc_k$ = function () {
    return this.activityEntity_1;
  };
  protoOf(ActivityEntities).component2_7eebsb_k$ = function () {
    return this.activityLangMapEntries_1;
  };
  protoOf(ActivityEntities).component3_7eebsa_k$ = function () {
    return this.activityInteractionEntities_1;
  };
  protoOf(ActivityEntities).component4_7eebs9_k$ = function () {
    return this.activityExtensionEntities_1;
  };
  protoOf(ActivityEntities).component5_7eebs8_k$ = function () {
    return this.statementContextActivityJoin_1;
  };
  protoOf(ActivityEntities).copy_yf6dml_k$ = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    return new ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).copy$default_azuvnw_k$ = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin, $super) {
    activityEntity = activityEntity === VOID ? this.activityEntity_1 : activityEntity;
    activityLangMapEntries = activityLangMapEntries === VOID ? this.activityLangMapEntries_1 : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? this.activityInteractionEntities_1 : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? this.activityExtensionEntities_1 : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? this.statementContextActivityJoin_1 : statementContextActivityJoin;
    return $super === VOID ? this.copy_yf6dml_k$(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) : $super.copy_yf6dml_k$.call(this, activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).toString = function () {
    return 'ActivityEntities(activityEntity=' + this.activityEntity_1 + ', activityLangMapEntries=' + this.activityLangMapEntries_1 + ', activityInteractionEntities=' + this.activityInteractionEntities_1 + ', activityExtensionEntities=' + this.activityExtensionEntities_1 + ', statementContextActivityJoin=' + this.statementContextActivityJoin_1 + ')';
  };
  protoOf(ActivityEntities).hashCode = function () {
    var result = this.activityEntity_1.hashCode();
    result = imul(result, 31) + hashCode(this.activityLangMapEntries_1) | 0;
    result = imul(result, 31) + hashCode(this.activityInteractionEntities_1) | 0;
    result = imul(result, 31) + hashCode(this.activityExtensionEntities_1) | 0;
    result = imul(result, 31) + (this.statementContextActivityJoin_1 == null ? 0 : this.statementContextActivityJoin_1.hashCode()) | 0;
    return result;
  };
  protoOf(ActivityEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActivityEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActivityEntities ? other : THROW_CCE();
    if (!this.activityEntity_1.equals(tmp0_other_with_cast.activityEntity_1))
      return false;
    if (!equals(this.activityLangMapEntries_1, tmp0_other_with_cast.activityLangMapEntries_1))
      return false;
    if (!equals(this.activityInteractionEntities_1, tmp0_other_with_cast.activityInteractionEntities_1))
      return false;
    if (!equals(this.activityExtensionEntities_1, tmp0_other_with_cast.activityExtensionEntities_1))
      return false;
    if (!equals(this.statementContextActivityJoin_1, tmp0_other_with_cast.statementContextActivityJoin_1))
      return false;
    return true;
  };
  function toEntities(_this__u8e3s4, activityId, stringHasher, json) {
    xapiRequireValidIRI(activityId, 'Activity ID is not a valid IRI: ' + activityId);
    var activityUid = stringHasher.hash_6htf84_k$(activityId);
    var tmp9_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.choices_1;
    var tmp;
    if (tmp9_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp9_safe_receiver, 10));
      var tmp0_iterator = tmp9_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$0 = toEntities$toEntities(item, stringHasher, activityUid, Companion_getInstance_27().get_PROP_CHOICES_g9s69t_k$(), 'choices');
        destination.add_utx5q5_k$(tmp$ret$0);
      }
      tmp = destination;
    }
    var tmp_0 = toEmptyIfNull(tmp);
    var tmp7_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.scale_1;
    var tmp_1;
    if (tmp7_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp7_safe_receiver, 10));
      var tmp0_iterator_0 = tmp7_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var item_0 = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$3 = toEntities$toEntities(item_0, stringHasher, activityUid, Companion_getInstance_27().get_PROP_SCALE_f5dfs9_k$(), 'scale');
        destination_0.add_utx5q5_k$(tmp$ret$3);
      }
      tmp_1 = destination_0;
    }
    var tmp_2 = plus(tmp_0, toEmptyIfNull(tmp_1));
    var tmp5_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.source_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_safe_receiver, 10));
      var tmp0_iterator_1 = tmp5_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
        var item_1 = tmp0_iterator_1.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$6 = toEntities$toEntities(item_1, stringHasher, activityUid, Companion_getInstance_27().get_PROP_SOURCE_rs67ta_k$(), 'source');
        destination_1.add_utx5q5_k$(tmp$ret$6);
      }
      tmp_3 = destination_1;
    }
    var tmp_4 = plus(tmp_2, toEmptyIfNull(tmp_3));
    var tmp3_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.target_1;
    var tmp_5;
    if (tmp3_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp3_safe_receiver, 10));
      var tmp0_iterator_2 = tmp3_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
        var item_2 = tmp0_iterator_2.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$9 = toEntities$toEntities(item_2, stringHasher, activityUid, Companion_getInstance_27().get_PROP_TARGET_s1gkuc_k$(), 'target');
        destination_2.add_utx5q5_k$(tmp$ret$9);
      }
      tmp_5 = destination_2;
    }
    var tmp_6 = plus(tmp_4, toEmptyIfNull(tmp_5));
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.steps_1;
    var tmp_7;
    if (tmp1_safe_receiver == null) {
      tmp_7 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator_3 = tmp1_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator_3.hasNext_bitz1p_k$()) {
        var item_3 = tmp0_iterator_3.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$12 = toEntities$toEntities(item_3, stringHasher, activityUid, Companion_getInstance_27().get_PROP_STEPS_f52hxo_k$(), 'steps');
        destination_3.add_utx5q5_k$(tmp$ret$12);
      }
      tmp_7 = destination_3;
    }
    var interactionEntitiesAndLangMaps = plus(tmp_6, toEmptyIfNull(tmp_7));
    var tmp_8 = _this__u8e3s4 == null ? null : _this__u8e3s4.type_1;
    var tmp_9 = _this__u8e3s4 == null ? null : _this__u8e3s4.moreInfo_1;
    var tmp13_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.interactionType_1;
    var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.get_dbFlag_c9d4pf_k$();
    var tmp_10 = tmp14_elvis_lhs == null ? Companion_getInstance_23().get_TYPE_UNSET_eu0ur7_k$() : tmp14_elvis_lhs;
    var tmp16_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.correctResponsePattern_1;
    var tmp_11;
    if (tmp16_safe_receiver == null) {
      tmp_11 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      // Inline function 'kotlinx.serialization.encodeToString' call
      // Inline function 'kotlinx.serialization.serializer' call
      var this_0 = json.get_serializersModule_piitvg_k$();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_1 = serializer(this_0, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().get_stringClass_bik2gy_k$(), arrayOf([]), false))]), false));
      var tmp$ret$16 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
      tmp_11 = json.encodeToString_k0apqx_k$(tmp$ret$16, tmp16_safe_receiver);
    }
    var tmp_12 = new ActivityEntity(activityUid, activityId, tmp_8, tmp_9, tmp_10, tmp_11);
    var tmp20_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.name_1;
    var tmp_13 = toEmptyIfNull(tmp20_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp20_safe_receiver, activityUid, stringHasher, Companion_getInstance_28().get_PROPNAME_NAME_f37mvn_k$()));
    var tmp18_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.description_1;
    var tmp_14 = plus(tmp_13, toEmptyIfNull(tmp18_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp18_safe_receiver, activityUid, stringHasher, Companion_getInstance_28().get_PROPNAME_DESCRIPTION_ae0f6c_k$())));
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_4 = ArrayList_init_$Create$();
    var tmp0_iterator_4 = interactionEntitiesAndLangMaps.iterator_jk1svi_k$();
    while (tmp0_iterator_4.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator_4.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var list = element.get_second_jf7fjx_k$();
      addAll(destination_4, list);
    }
    var tmp_15 = plus(tmp_14, destination_4);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_5 = ArrayList_init_$Create$_0(collectionSizeOrDefault(interactionEntitiesAndLangMaps, 10));
    var tmp0_iterator_5 = interactionEntitiesAndLangMaps.iterator_jk1svi_k$();
    while (tmp0_iterator_5.hasNext_bitz1p_k$()) {
      var item_4 = tmp0_iterator_5.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var tmp$ret$23 = item_4.get_first_irdx8n_k$();
      destination_5.add_utx5q5_k$(tmp$ret$23);
    }
    var tmp_16 = destination_5;
    var tmp22_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.extensions_1;
    var tmp_17;
    if (tmp22_safe_receiver == null) {
      tmp_17 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_6 = ArrayList_init_$Create$_0(tmp22_safe_receiver.get_size_woubt6_k$());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator_6 = tmp22_safe_receiver.get_entries_p20ztl_k$().iterator_jk1svi_k$();
      while (tmp0_iterator_6.hasNext_bitz1p_k$()) {
        var item_5 = tmp0_iterator_6.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        // Inline function 'kotlin.collections.component1' call
        var key = item_5.get_key_18j28a_k$();
        // Inline function 'kotlin.collections.component2' call
        var value = item_5.get_value_j01efc_k$();
        var tmp$ret$29 = new ActivityExtensionEntity(activityUid, stringHasher.hash_6htf84_k$(key), xapiRequireValidIRI(key, activityId + ' extension ' + key + ' is not a valid IRI'), json.encodeToString_k0apqx_k$(Companion_getInstance_29().serializer_9w0wvi_k$(), value));
        destination_6.add_utx5q5_k$(tmp$ret$29);
      }
      tmp_17 = destination_6;
    }
    var tmp23_elvis_lhs = tmp_17;
    return new ActivityEntities(tmp_12, tmp_15, tmp_16, tmp23_elvis_lhs == null ? emptyList() : tmp23_elvis_lhs);
  }
  function toEntities$toLangMapEntries(_this__u8e3s4, activityUid, $stringHasher, propName, almeAieHash) {
    almeAieHash = almeAieHash === VOID ? new Long(0, 0) : almeAieHash;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.get_entries_p20ztl_k$();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.toLangMapEntries.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var lang = item.get_key_18j28a_k$();
      // Inline function 'kotlin.collections.component2' call
      var text = item.get_value_j01efc_k$();
      var tmp$ret$2 = new ActivityLangMapEntry(activityUid, $stringHasher.hash_6htf84_k$(propName + '-' + lang), lang, propName, text, almeAieHash);
      destination.add_utx5q5_k$(tmp$ret$2);
    }
    return destination;
  }
  function toEntities$toEntities(_this__u8e3s4, $stringHasher, activityUid, propId, propName) {
    var aieHash = $stringHasher.hash_6htf84_k$('' + propId + _this__u8e3s4.id_1);
    var tmp = new ActivityInteractionEntity(activityUid, aieHash, propId, _this__u8e3s4.id_1);
    var tmp0_safe_receiver = _this__u8e3s4.description_1;
    return to(tmp, toEmptyIfNull(tmp0_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp0_safe_receiver, activityUid, $stringHasher, propName + '-' + _this__u8e3s4.id_1, aieHash)));
  }
  function Companion_66() {
    Companion_instance_66 = this;
  }
  protoOf(Companion_66).serializer_9w0wvi_k$ = function () {
    return XapiActorSerializer_getInstance();
  };
  protoOf(Companion_66).serializer_nv39qc_k$ = function (typeParamsSerializers) {
    return this.serializer_9w0wvi_k$();
  };
  var Companion_instance_66;
  function Companion_getInstance_127() {
    if (Companion_instance_66 == null)
      new Companion_66();
    return Companion_instance_66;
  }
  function XapiActor() {
  }
  function XapiActorSerializer() {
    XapiActorSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiActor));
  }
  protoOf(XapiActorSerializer).selectDeserializer_70cedr_k$ = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).get_6bo4tg_k$('type');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_content_h02jrk_k$();
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiActorSerializer.selectDeserializer.<anonymous>' call
      tmp = valueOf_4(tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var objectType = tmp3_elvis_lhs == null ? XapiObjectType_Agent_getInstance() : tmp3_elvis_lhs;
    var tmp_0;
    switch (objectType.get_ordinal_ip24qg_k$()) {
      case 3:
        tmp_0 = Companion_getInstance_128().serializer_9w0wvi_k$();
        break;
      case 4:
        tmp_0 = Companion_getInstance_132().serializer_9w0wvi_k$();
        break;
      default:
        throw new XapiException(400, 'Invalid object type for actor: must be Agent or Group');
    }
    return tmp_0;
  };
  var XapiActorSerializer_instance;
  function XapiActorSerializer_getInstance() {
    if (XapiActorSerializer_instance == null)
      new XapiActorSerializer();
    return XapiActorSerializer_instance;
  }
  function identifierHash(_this__u8e3s4, xxHasher) {
    var tmp;
    if (!(_this__u8e3s4.get_account_i7e30c_k$() == null)) {
      var tmp0_safe_receiver = _this__u8e3s4.get_account_i7e30c_k$();
      var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_name_woqyms_k$();
      var tmp1_safe_receiver = _this__u8e3s4.get_account_i7e30c_k$();
      tmp = '' + tmp_0 + '@' + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_homePage_v6mod3_k$());
    } else if (!(_this__u8e3s4.get_mbox_woqcg7_k$() == null)) {
      tmp = _this__u8e3s4.get_mbox_woqcg7_k$();
    } else if (!(_this__u8e3s4.get_mbox_sha1sum_f5o42a_k$() == null)) {
      tmp = _this__u8e3s4.get_mbox_sha1sum_f5o42a_k$();
    } else if (!(_this__u8e3s4.get_openid_hp3xm6_k$() == null)) {
      tmp = _this__u8e3s4.get_openid_hp3xm6_k$();
    } else {
      tmp = null;
    }
    var idStr = tmp;
    var tmp_1;
    if (idStr == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.identifierHash.<anonymous>' call
      tmp_1 = xxHasher.hash_6htf84_k$(idStr);
    }
    var tmp3_elvis_lhs = tmp_1;
    return tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
  }
  function ActorEntities(actor, groupMemberAgents, groupMemberJoins) {
    groupMemberAgents = groupMemberAgents === VOID ? emptyList() : groupMemberAgents;
    groupMemberJoins = groupMemberJoins === VOID ? emptyList() : groupMemberJoins;
    this.actor_1 = actor;
    this.groupMemberAgents_1 = groupMemberAgents;
    this.groupMemberJoins_1 = groupMemberJoins;
  }
  protoOf(ActorEntities).get_actor_ioj5qk_k$ = function () {
    return this.actor_1;
  };
  protoOf(ActorEntities).get_groupMemberAgents_9ycpqa_k$ = function () {
    return this.groupMemberAgents_1;
  };
  protoOf(ActorEntities).get_groupMemberJoins_8zhdy1_k$ = function () {
    return this.groupMemberJoins_1;
  };
  protoOf(ActorEntities).component1_7eebsc_k$ = function () {
    return this.actor_1;
  };
  protoOf(ActorEntities).component2_7eebsb_k$ = function () {
    return this.groupMemberAgents_1;
  };
  protoOf(ActorEntities).component3_7eebsa_k$ = function () {
    return this.groupMemberJoins_1;
  };
  protoOf(ActorEntities).copy_ebxtib_k$ = function (actor, groupMemberAgents, groupMemberJoins) {
    return new ActorEntities(actor, groupMemberAgents, groupMemberJoins);
  };
  protoOf(ActorEntities).copy$default_jhe0mk_k$ = function (actor, groupMemberAgents, groupMemberJoins, $super) {
    actor = actor === VOID ? this.actor_1 : actor;
    groupMemberAgents = groupMemberAgents === VOID ? this.groupMemberAgents_1 : groupMemberAgents;
    groupMemberJoins = groupMemberJoins === VOID ? this.groupMemberJoins_1 : groupMemberJoins;
    return $super === VOID ? this.copy_ebxtib_k$(actor, groupMemberAgents, groupMemberJoins) : $super.copy_ebxtib_k$.call(this, actor, groupMemberAgents, groupMemberJoins);
  };
  protoOf(ActorEntities).toString = function () {
    return 'ActorEntities(actor=' + this.actor_1 + ', groupMemberAgents=' + this.groupMemberAgents_1 + ', groupMemberJoins=' + this.groupMemberJoins_1 + ')';
  };
  protoOf(ActorEntities).hashCode = function () {
    var result = this.actor_1.hashCode();
    result = imul(result, 31) + hashCode(this.groupMemberAgents_1) | 0;
    result = imul(result, 31) + hashCode(this.groupMemberJoins_1) | 0;
    return result;
  };
  protoOf(ActorEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActorEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActorEntities ? other : THROW_CCE();
    if (!this.actor_1.equals(tmp0_other_with_cast.actor_1))
      return false;
    if (!equals(this.groupMemberAgents_1, tmp0_other_with_cast.groupMemberAgents_1))
      return false;
    if (!equals(this.groupMemberJoins_1, tmp0_other_with_cast.groupMemberJoins_1))
      return false;
    return true;
  };
  function toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var tmp;
    if (_this__u8e3s4 instanceof XapiAgent) {
      tmp = new ActorEntities(toActorEntity(_this__u8e3s4, stringHasher, knownActorUidToPersonUidMap));
    } else {
      if (_this__u8e3s4 instanceof XapiGroup) {
        tmp = toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
      } else {
        noWhenBranchMatchedException();
      }
    }
    return tmp;
  }
  function Companion_67() {
    Companion_instance_67 = this;
  }
  protoOf(Companion_67).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_56();
  };
  var Companion_instance_67;
  function Companion_getInstance_128() {
    if (Companion_instance_67 == null)
      new Companion_67();
    return Companion_instance_67;
  }
  function $serializer_46() {
    $serializer_instance_46 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAgent', this, 6);
    tmp0_serialDesc.addElement_5pzumi_k$('name', true);
    tmp0_serialDesc.addElement_5pzumi_k$('mbox', true);
    tmp0_serialDesc.addElement_5pzumi_k$('mbox_sha1sum', true);
    tmp0_serialDesc.addElement_5pzumi_k$('openid', true);
    tmp0_serialDesc.addElement_5pzumi_k$('objectType', true);
    tmp0_serialDesc.addElement_5pzumi_k$('account', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_46).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_46).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_getInstance()), get_nullable($serializer_getInstance_53())];
  };
  protoOf($serializer_46).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp10_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, XapiObjectTypeSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, $serializer_getInstance_53(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, XapiObjectTypeSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, $serializer_getInstance_53(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiAgent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_46).serialize_r3ntaw_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.name_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.name_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.mbox_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, StringSerializer_getInstance(), value.mbox_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.mbox_sha1sum_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.mbox_sha1sum_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.openid_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.openid_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.objectType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, XapiObjectTypeSerializer_getInstance(), value.objectType_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.account_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, $serializer_getInstance_53(), value.account_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_46).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_r3ntaw_k$(encoder, value instanceof XapiAgent ? value : THROW_CCE());
  };
  var $serializer_instance_46;
  function $serializer_getInstance_56() {
    if ($serializer_instance_46 == null)
      new $serializer_46();
    return $serializer_instance_46;
  }
  function XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_56().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.name_1 = null;
    else
      $this.name_1 = name;
    if (0 === (seen1 & 2))
      $this.mbox_1 = null;
    else
      $this.mbox_1 = mbox;
    if (0 === (seen1 & 4))
      $this.mbox_sha1sum_1 = null;
    else
      $this.mbox_sha1sum_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.openid_1 = null;
    else
      $this.openid_1 = openid;
    if (0 === (seen1 & 16))
      $this.objectType_1 = null;
    else
      $this.objectType_1 = objectType;
    if (0 === (seen1 & 32))
      $this.account_1 = null;
    else
      $this.account_1 = account;
    return $this;
  }
  function XapiAgent_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker) {
    return XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, objectCreate(protoOf(XapiAgent)));
  }
  function XapiAgent(name, mbox, mbox_sha1sum, openid, objectType, account) {
    Companion_getInstance_128();
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    this.name_1 = name;
    this.mbox_1 = mbox;
    this.mbox_sha1sum_1 = mbox_sha1sum;
    this.openid_1 = openid;
    this.objectType_1 = objectType;
    this.account_1 = account;
  }
  protoOf(XapiAgent).get_name_woqyms_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiAgent).get_mbox_woqcg7_k$ = function () {
    return this.mbox_1;
  };
  protoOf(XapiAgent).get_mbox_sha1sum_f5o42a_k$ = function () {
    return this.mbox_sha1sum_1;
  };
  protoOf(XapiAgent).get_openid_hp3xm6_k$ = function () {
    return this.openid_1;
  };
  protoOf(XapiAgent).get_objectType_2j2n32_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiAgent).get_account_i7e30c_k$ = function () {
    return this.account_1;
  };
  protoOf(XapiAgent).component1_7eebsc_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiAgent).component2_7eebsb_k$ = function () {
    return this.mbox_1;
  };
  protoOf(XapiAgent).component3_7eebsa_k$ = function () {
    return this.mbox_sha1sum_1;
  };
  protoOf(XapiAgent).component4_7eebs9_k$ = function () {
    return this.openid_1;
  };
  protoOf(XapiAgent).component5_7eebs8_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiAgent).component6_7eebs7_k$ = function () {
    return this.account_1;
  };
  protoOf(XapiAgent).copy_uq9oi6_k$ = function (name, mbox, mbox_sha1sum, openid, objectType, account) {
    return new XapiAgent(name, mbox, mbox_sha1sum, openid, objectType, account);
  };
  protoOf(XapiAgent).copy$default_fglf0v_k$ = function (name, mbox, mbox_sha1sum, openid, objectType, account, $super) {
    name = name === VOID ? this.name_1 : name;
    mbox = mbox === VOID ? this.mbox_1 : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? this.mbox_sha1sum_1 : mbox_sha1sum;
    openid = openid === VOID ? this.openid_1 : openid;
    objectType = objectType === VOID ? this.objectType_1 : objectType;
    account = account === VOID ? this.account_1 : account;
    return $super === VOID ? this.copy_uq9oi6_k$(name, mbox, mbox_sha1sum, openid, objectType, account) : $super.copy_uq9oi6_k$.call(this, name, mbox, mbox_sha1sum, openid, objectType, account);
  };
  protoOf(XapiAgent).toString = function () {
    return 'XapiAgent(name=' + this.name_1 + ', mbox=' + this.mbox_1 + ', mbox_sha1sum=' + this.mbox_sha1sum_1 + ', openid=' + this.openid_1 + ', objectType=' + this.objectType_1 + ', account=' + this.account_1 + ')';
  };
  protoOf(XapiAgent).hashCode = function () {
    var result = this.name_1 == null ? 0 : getStringHashCode(this.name_1);
    result = imul(result, 31) + (this.mbox_1 == null ? 0 : getStringHashCode(this.mbox_1)) | 0;
    result = imul(result, 31) + (this.mbox_sha1sum_1 == null ? 0 : getStringHashCode(this.mbox_sha1sum_1)) | 0;
    result = imul(result, 31) + (this.openid_1 == null ? 0 : getStringHashCode(this.openid_1)) | 0;
    result = imul(result, 31) + (this.objectType_1 == null ? 0 : this.objectType_1.hashCode()) | 0;
    result = imul(result, 31) + (this.account_1 == null ? 0 : this.account_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiAgent).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAgent))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAgent ? other : THROW_CCE();
    if (!(this.name_1 == tmp0_other_with_cast.name_1))
      return false;
    if (!(this.mbox_1 == tmp0_other_with_cast.mbox_1))
      return false;
    if (!(this.mbox_sha1sum_1 == tmp0_other_with_cast.mbox_sha1sum_1))
      return false;
    if (!(this.openid_1 == tmp0_other_with_cast.openid_1))
      return false;
    if (!equals(this.objectType_1, tmp0_other_with_cast.objectType_1))
      return false;
    if (!equals(this.account_1, tmp0_other_with_cast.account_1))
      return false;
    return true;
  };
  function toActorEntity(_this__u8e3s4, xxHasher, knownActorUidToPersonUidMap, lastModifiedTime) {
    lastModifiedTime = lastModifiedTime === VOID ? systemTimeInMillis() : lastModifiedTime;
    var uid = identifierHash(_this__u8e3s4, xxHasher);
    var tmp0_elvis_lhs = knownActorUidToPersonUidMap.get_wei43m_k$(uid);
    var tmp5_actorPersonUid = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
    var tmp6_actorMbox = _this__u8e3s4.mbox_1;
    var tmp7_actorMbox_sha1sum = _this__u8e3s4.mbox_sha1sum_1;
    var tmp8_actorOpenid = _this__u8e3s4.openid_1;
    var tmp1_safe_receiver = _this__u8e3s4.account_1;
    var tmp9_actorAccountName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_name_woqyms_k$();
    var tmp2_safe_receiver = _this__u8e3s4.account_1;
    var tmp10_actorAccountHomePage = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_homePage_v6mod3_k$();
    var tmp3_safe_receiver = _this__u8e3s4.name_1;
    var tmp;
    if (tmp3_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toActorEntity.<anonymous>' call
      tmp = xxHasher.hash_6htf84_k$(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp;
    var tmp11_actorEtag = tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs;
    var tmp12_actorObjectType = XapiEntityObjectTypeFlags_getInstance().get_AGENT_i6evgc_k$();
    return new ActorEntity(uid, tmp5_actorPersonUid, VOID, tmp6_actorMbox, tmp7_actorMbox_sha1sum, tmp8_actorOpenid, tmp9_actorAccountName, tmp10_actorAccountHomePage, tmp11_actorEtag, lastModifiedTime, tmp12_actorObjectType);
  }
  function _get_$childSerializers__r2zwns_13($this) {
    return $this.$childSerializers_1;
  }
  function Companion_68() {
    Companion_instance_68 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  protoOf(Companion_68).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_57();
  };
  var Companion_instance_68;
  function Companion_getInstance_129() {
    if (Companion_instance_68 == null)
      new Companion_68();
    return Companion_instance_68;
  }
  function $serializer_47() {
    $serializer_instance_47 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiContext', this, 9);
    tmp0_serialDesc.addElement_5pzumi_k$('instructor', true);
    tmp0_serialDesc.addElement_5pzumi_k$('registration', true);
    tmp0_serialDesc.addElement_5pzumi_k$('language', true);
    tmp0_serialDesc.addElement_5pzumi_k$('platform', true);
    tmp0_serialDesc.addElement_5pzumi_k$('revision', true);
    tmp0_serialDesc.addElement_5pzumi_k$('team', true);
    tmp0_serialDesc.addElement_5pzumi_k$('statement', true);
    tmp0_serialDesc.addElement_5pzumi_k$('contextActivities', true);
    tmp0_serialDesc.addElement_5pzumi_k$('extensions', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_47).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_47).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_129().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable($serializer_getInstance_63()), get_nullable(XapiContextActivitiesSerializer_getInstance()), get_nullable(tmp0_cached[8])];
  };
  protoOf($serializer_47).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp14_cached = Companion_getInstance_129().$childSerializers_1;
    if (tmp13_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, $serializer_getInstance_63(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, $serializer_getInstance_63(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiContext_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_47).serialize_b4mxqu_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_129().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.instructor_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, XapiActorSerializer_getInstance(), value.instructor_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.registration_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, StringSerializer_getInstance(), value.registration_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.language_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.language_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.platform_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.platform_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.revision_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, StringSerializer_getInstance(), value.revision_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.team_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, XapiActorSerializer_getInstance(), value.team_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !(value.statement_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 6, $serializer_getInstance_63(), value.statement_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 7) ? true : !(value.contextActivities_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), value.contextActivities_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 8) ? true : !(value.extensions_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 8, tmp2_cached[8], value.extensions_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_47).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_b4mxqu_k$(encoder, value instanceof XapiContext ? value : THROW_CCE());
  };
  var $serializer_instance_47;
  function $serializer_getInstance_57() {
    if ($serializer_instance_47 == null)
      new $serializer_47();
    return $serializer_instance_47;
  }
  function XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_57().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.instructor_1 = null;
    else
      $this.instructor_1 = instructor;
    if (0 === (seen1 & 2))
      $this.registration_1 = null;
    else
      $this.registration_1 = registration;
    if (0 === (seen1 & 4))
      $this.language_1 = null;
    else
      $this.language_1 = language;
    if (0 === (seen1 & 8))
      $this.platform_1 = null;
    else
      $this.platform_1 = platform;
    if (0 === (seen1 & 16))
      $this.revision_1 = null;
    else
      $this.revision_1 = revision;
    if (0 === (seen1 & 32))
      $this.team_1 = null;
    else
      $this.team_1 = team;
    if (0 === (seen1 & 64))
      $this.statement_1 = null;
    else
      $this.statement_1 = statement;
    if (0 === (seen1 & 128))
      $this.contextActivities_1 = null;
    else
      $this.contextActivities_1 = contextActivities;
    if (0 === (seen1 & 256))
      $this.extensions_1 = null;
    else
      $this.extensions_1 = extensions;
    return $this;
  }
  function XapiContext_init_$Create$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker) {
    return XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiContext)));
  }
  function XapiContext(instructor, registration, language, platform, revision, team, statement, contextActivities, extensions) {
    Companion_getInstance_129();
    instructor = instructor === VOID ? null : instructor;
    registration = registration === VOID ? null : registration;
    language = language === VOID ? null : language;
    platform = platform === VOID ? null : platform;
    revision = revision === VOID ? null : revision;
    team = team === VOID ? null : team;
    statement = statement === VOID ? null : statement;
    contextActivities = contextActivities === VOID ? null : contextActivities;
    extensions = extensions === VOID ? null : extensions;
    this.instructor_1 = instructor;
    this.registration_1 = registration;
    this.language_1 = language;
    this.platform_1 = platform;
    this.revision_1 = revision;
    this.team_1 = team;
    this.statement_1 = statement;
    this.contextActivities_1 = contextActivities;
    this.extensions_1 = extensions;
  }
  protoOf(XapiContext).set_instructor_t0psfe_k$ = function (_set____db54di) {
    this.instructor_1 = _set____db54di;
  };
  protoOf(XapiContext).get_instructor_2wewpy_k$ = function () {
    return this.instructor_1;
  };
  protoOf(XapiContext).set_registration_9n9uch_k$ = function (_set____db54di) {
    this.registration_1 = _set____db54di;
  };
  protoOf(XapiContext).get_registration_hsdiwu_k$ = function () {
    return this.registration_1;
  };
  protoOf(XapiContext).set_language_xxs476_k$ = function (_set____db54di) {
    this.language_1 = _set____db54di;
  };
  protoOf(XapiContext).get_language_cjhhk1_k$ = function () {
    return this.language_1;
  };
  protoOf(XapiContext).set_platform_2oc2mx_k$ = function (_set____db54di) {
    this.platform_1 = _set____db54di;
  };
  protoOf(XapiContext).get_platform_ssr7o_k$ = function () {
    return this.platform_1;
  };
  protoOf(XapiContext).set_revision_z5kn9d_k$ = function (_set____db54di) {
    this.revision_1 = _set____db54di;
  };
  protoOf(XapiContext).get_revision_ywwrdw_k$ = function () {
    return this.revision_1;
  };
  protoOf(XapiContext).set_team_i6tu8m_k$ = function (_set____db54di) {
    this.team_1 = _set____db54di;
  };
  protoOf(XapiContext).get_team_wouv8m_k$ = function () {
    return this.team_1;
  };
  protoOf(XapiContext).set_statement_yneo81_k$ = function (_set____db54di) {
    this.statement_1 = _set____db54di;
  };
  protoOf(XapiContext).get_statement_pyx5iy_k$ = function () {
    return this.statement_1;
  };
  protoOf(XapiContext).set_contextActivities_e7udvc_k$ = function (_set____db54di) {
    this.contextActivities_1 = _set____db54di;
  };
  protoOf(XapiContext).get_contextActivities_nvcl9p_k$ = function () {
    return this.contextActivities_1;
  };
  protoOf(XapiContext).set_extensions_he993a_k$ = function (_set____db54di) {
    this.extensions_1 = _set____db54di;
  };
  protoOf(XapiContext).get_extensions_kxksyl_k$ = function () {
    return this.extensions_1;
  };
  protoOf(XapiContext).component1_7eebsc_k$ = function () {
    return this.instructor_1;
  };
  protoOf(XapiContext).component2_7eebsb_k$ = function () {
    return this.registration_1;
  };
  protoOf(XapiContext).component3_7eebsa_k$ = function () {
    return this.language_1;
  };
  protoOf(XapiContext).component4_7eebs9_k$ = function () {
    return this.platform_1;
  };
  protoOf(XapiContext).component5_7eebs8_k$ = function () {
    return this.revision_1;
  };
  protoOf(XapiContext).component6_7eebs7_k$ = function () {
    return this.team_1;
  };
  protoOf(XapiContext).component7_7eebs6_k$ = function () {
    return this.statement_1;
  };
  protoOf(XapiContext).component8_7eebs5_k$ = function () {
    return this.contextActivities_1;
  };
  protoOf(XapiContext).component9_7eebs4_k$ = function () {
    return this.extensions_1;
  };
  protoOf(XapiContext).copy_je2440_k$ = function (instructor, registration, language, platform, revision, team, statement, contextActivities, extensions) {
    return new XapiContext(instructor, registration, language, platform, revision, team, statement, contextActivities, extensions);
  };
  protoOf(XapiContext).copy$default_8oxwx0_k$ = function (instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, $super) {
    instructor = instructor === VOID ? this.instructor_1 : instructor;
    registration = registration === VOID ? this.registration_1 : registration;
    language = language === VOID ? this.language_1 : language;
    platform = platform === VOID ? this.platform_1 : platform;
    revision = revision === VOID ? this.revision_1 : revision;
    team = team === VOID ? this.team_1 : team;
    statement = statement === VOID ? this.statement_1 : statement;
    contextActivities = contextActivities === VOID ? this.contextActivities_1 : contextActivities;
    extensions = extensions === VOID ? this.extensions_1 : extensions;
    return $super === VOID ? this.copy_je2440_k$(instructor, registration, language, platform, revision, team, statement, contextActivities, extensions) : $super.copy_je2440_k$.call(this, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions);
  };
  protoOf(XapiContext).toString = function () {
    return 'XapiContext(instructor=' + this.instructor_1 + ', registration=' + this.registration_1 + ', language=' + this.language_1 + ', platform=' + this.platform_1 + ', revision=' + this.revision_1 + ', team=' + this.team_1 + ', statement=' + this.statement_1 + ', contextActivities=' + this.contextActivities_1 + ', extensions=' + this.extensions_1 + ')';
  };
  protoOf(XapiContext).hashCode = function () {
    var result = this.instructor_1 == null ? 0 : hashCode(this.instructor_1);
    result = imul(result, 31) + (this.registration_1 == null ? 0 : getStringHashCode(this.registration_1)) | 0;
    result = imul(result, 31) + (this.language_1 == null ? 0 : getStringHashCode(this.language_1)) | 0;
    result = imul(result, 31) + (this.platform_1 == null ? 0 : getStringHashCode(this.platform_1)) | 0;
    result = imul(result, 31) + (this.revision_1 == null ? 0 : getStringHashCode(this.revision_1)) | 0;
    result = imul(result, 31) + (this.team_1 == null ? 0 : hashCode(this.team_1)) | 0;
    result = imul(result, 31) + (this.statement_1 == null ? 0 : this.statement_1.hashCode()) | 0;
    result = imul(result, 31) + (this.contextActivities_1 == null ? 0 : this.contextActivities_1.hashCode()) | 0;
    result = imul(result, 31) + (this.extensions_1 == null ? 0 : hashCode(this.extensions_1)) | 0;
    return result;
  };
  protoOf(XapiContext).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContext))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContext ? other : THROW_CCE();
    if (!equals(this.instructor_1, tmp0_other_with_cast.instructor_1))
      return false;
    if (!(this.registration_1 == tmp0_other_with_cast.registration_1))
      return false;
    if (!(this.language_1 == tmp0_other_with_cast.language_1))
      return false;
    if (!(this.platform_1 == tmp0_other_with_cast.platform_1))
      return false;
    if (!(this.revision_1 == tmp0_other_with_cast.revision_1))
      return false;
    if (!equals(this.team_1, tmp0_other_with_cast.team_1))
      return false;
    if (!equals(this.statement_1, tmp0_other_with_cast.statement_1))
      return false;
    if (!equals(this.contextActivities_1, tmp0_other_with_cast.contextActivities_1))
      return false;
    if (!equals(this.extensions_1, tmp0_other_with_cast.extensions_1))
      return false;
    return true;
  };
  function Companion_69() {
    Companion_instance_69 = this;
  }
  protoOf(Companion_69).serializer_9w0wvi_k$ = function () {
    return XapiContextActivitiesSerializer_getInstance();
  };
  var Companion_instance_69;
  function Companion_getInstance_130() {
    if (Companion_instance_69 == null)
      new Companion_69();
    return Companion_instance_69;
  }
  function XapiContextActivities(parent, grouping, category, other) {
    Companion_getInstance_130();
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.parent_1 = parent;
    this.grouping_1 = grouping;
    this.category_1 = category;
    this.other_1 = other;
  }
  protoOf(XapiContextActivities).get_parent_hy4reb_k$ = function () {
    return this.parent_1;
  };
  protoOf(XapiContextActivities).get_grouping_nfgg1g_k$ = function () {
    return this.grouping_1;
  };
  protoOf(XapiContextActivities).get_category_uyv41l_k$ = function () {
    return this.category_1;
  };
  protoOf(XapiContextActivities).get_other_iwivon_k$ = function () {
    return this.other_1;
  };
  protoOf(XapiContextActivities).component1_7eebsc_k$ = function () {
    return this.parent_1;
  };
  protoOf(XapiContextActivities).component2_7eebsb_k$ = function () {
    return this.grouping_1;
  };
  protoOf(XapiContextActivities).component3_7eebsa_k$ = function () {
    return this.category_1;
  };
  protoOf(XapiContextActivities).component4_7eebs9_k$ = function () {
    return this.other_1;
  };
  protoOf(XapiContextActivities).copy_swqeph_k$ = function (parent, grouping, category, other) {
    return new XapiContextActivities(parent, grouping, category, other);
  };
  protoOf(XapiContextActivities).copy$default_cy1szv_k$ = function (parent, grouping, category, other, $super) {
    parent = parent === VOID ? this.parent_1 : parent;
    grouping = grouping === VOID ? this.grouping_1 : grouping;
    category = category === VOID ? this.category_1 : category;
    other = other === VOID ? this.other_1 : other;
    return $super === VOID ? this.copy_swqeph_k$(parent, grouping, category, other) : $super.copy_swqeph_k$.call(this, parent, grouping, category, other);
  };
  protoOf(XapiContextActivities).toString = function () {
    return 'XapiContextActivities(parent=' + this.parent_1 + ', grouping=' + this.grouping_1 + ', category=' + this.category_1 + ', other=' + this.other_1 + ')';
  };
  protoOf(XapiContextActivities).hashCode = function () {
    var result = this.parent_1 == null ? 0 : hashCode(this.parent_1);
    result = imul(result, 31) + (this.grouping_1 == null ? 0 : hashCode(this.grouping_1)) | 0;
    result = imul(result, 31) + (this.category_1 == null ? 0 : hashCode(this.category_1)) | 0;
    result = imul(result, 31) + (this.other_1 == null ? 0 : hashCode(this.other_1)) | 0;
    return result;
  };
  protoOf(XapiContextActivities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContextActivities))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContextActivities ? other : THROW_CCE();
    if (!equals(this.parent_1, tmp0_other_with_cast.parent_1))
      return false;
    if (!equals(this.grouping_1, tmp0_other_with_cast.grouping_1))
      return false;
    if (!equals(this.category_1, tmp0_other_with_cast.category_1))
      return false;
    if (!equals(this.other_1, tmp0_other_with_cast.other_1))
      return false;
    return true;
  };
  function deserialize$propertyToObjectList(jsonObject, jsonDecoder, propName) {
    var jsonElement = jsonObject.get_6bo4tg_k$(propName);
    var tmp;
    if (!(jsonElement == null)) {
      tmp = decodeListOrSingleObjectAsList(jsonDecoder.get_json_woos35_k$(), Companion_getInstance_139().serializer_9w0wvi_k$(), jsonElement);
    } else {
      tmp = null;
    }
    return tmp;
  }
  function XapiContextActivitiesSerializer() {
    XapiContextActivitiesSerializer_instance = this;
    this.descriptor_1 = Companion_getInstance_131().serializer_9w0wvi_k$().get_descriptor_wjt6a0_k$();
  }
  protoOf(XapiContextActivitiesSerializer).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf(XapiContextActivitiesSerializer).serialize_vdc3er_k$ = function (encoder, value) {
    encoder.encodeSerializableValue_3uuzip_k$(Companion_getInstance_131().serializer_9w0wvi_k$(), toSurrogate(value));
  };
  protoOf(XapiContextActivitiesSerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_vdc3er_k$(encoder, value instanceof XapiContextActivities ? value : THROW_CCE());
  };
  protoOf(XapiContextActivitiesSerializer).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_elvis_lhs = isInterface(decoder, JsonDecoder) ? decoder : null;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$_0();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var jsonDecoder = tmp;
    var tmp_0 = jsonDecoder.decodeJsonElement_6lz9ye_k$();
    var jsonObject = tmp_0 instanceof JsonObject ? tmp_0 : THROW_CCE();
    return new XapiContextActivities(deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'parent'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'grouping'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'category'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'other'));
  };
  var XapiContextActivitiesSerializer_instance;
  function XapiContextActivitiesSerializer_getInstance() {
    if (XapiContextActivitiesSerializer_instance == null)
      new XapiContextActivitiesSerializer();
    return XapiContextActivitiesSerializer_instance;
  }
  function _get_$childSerializers__r2zwns_14($this) {
    return $this.$childSerializers_1;
  }
  function Companion_70() {
    Companion_instance_70 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [new ArrayListSerializer($serializer_getInstance_63()), new ArrayListSerializer($serializer_getInstance_63()), new ArrayListSerializer($serializer_getInstance_63()), new ArrayListSerializer($serializer_getInstance_63())];
  }
  protoOf(Companion_70).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_58();
  };
  var Companion_instance_70;
  function Companion_getInstance_131() {
    if (Companion_instance_70 == null)
      new Companion_70();
    return Companion_instance_70;
  }
  function $serializer_48() {
    $serializer_instance_48 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('XapiContextActivities', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('parent', true);
    tmp0_serialDesc.addElement_5pzumi_k$('grouping', true);
    tmp0_serialDesc.addElement_5pzumi_k$('category', true);
    tmp0_serialDesc.addElement_5pzumi_k$('other', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_48).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_48).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_131().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(tmp0_cached[3])];
  };
  protoOf($serializer_48).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp9_cached = Companion_getInstance_131().$childSerializers_1;
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiContextActivitiesSurrogate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_48).serialize_sm5xov_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_131().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.parent_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, tmp2_cached[0], value.parent_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.grouping_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, tmp2_cached[1], value.grouping_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.category_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, tmp2_cached[2], value.category_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.other_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, tmp2_cached[3], value.other_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_48).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_sm5xov_k$(encoder, value instanceof XapiContextActivitiesSurrogate ? value : THROW_CCE());
  };
  var $serializer_instance_48;
  function $serializer_getInstance_58() {
    if ($serializer_instance_48 == null)
      new $serializer_48();
    return $serializer_instance_48;
  }
  function XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_58().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.parent_1 = null;
    else
      $this.parent_1 = parent;
    if (0 === (seen1 & 2))
      $this.grouping_1 = null;
    else
      $this.grouping_1 = grouping;
    if (0 === (seen1 & 4))
      $this.category_1 = null;
    else
      $this.category_1 = category;
    if (0 === (seen1 & 8))
      $this.other_1 = null;
    else
      $this.other_1 = other;
    return $this;
  }
  function XapiContextActivitiesSurrogate_init_$Create$(seen1, parent, grouping, category, other, serializationConstructorMarker) {
    return XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, objectCreate(protoOf(XapiContextActivitiesSurrogate)));
  }
  function XapiContextActivitiesSurrogate(parent, grouping, category, other) {
    Companion_getInstance_131();
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.parent_1 = parent;
    this.grouping_1 = grouping;
    this.category_1 = category;
    this.other_1 = other;
  }
  protoOf(XapiContextActivitiesSurrogate).get_parent_hy4reb_k$ = function () {
    return this.parent_1;
  };
  protoOf(XapiContextActivitiesSurrogate).get_grouping_nfgg1g_k$ = function () {
    return this.grouping_1;
  };
  protoOf(XapiContextActivitiesSurrogate).get_category_uyv41l_k$ = function () {
    return this.category_1;
  };
  protoOf(XapiContextActivitiesSurrogate).get_other_iwivon_k$ = function () {
    return this.other_1;
  };
  function toSurrogate(_this__u8e3s4) {
    return new XapiContextActivitiesSurrogate(_this__u8e3s4.parent_1, _this__u8e3s4.grouping_1, _this__u8e3s4.category_1, _this__u8e3s4.other_1);
  }
  function toEntities_1(_this__u8e3s4, stringHasher, json, statementUuid) {
    return plus(plus(plus(toEntities$toEntitiesInternal(_this__u8e3s4.parent_1, stringHasher, json, statementUuid, Companion_getInstance_30().get_TYPE_PARENT_ysntnq_k$()), toEntities$toEntitiesInternal(_this__u8e3s4.grouping_1, stringHasher, json, statementUuid, Companion_getInstance_30().get_TYPE_GROUPING_ri9ltt_k$())), toEntities$toEntitiesInternal(_this__u8e3s4.category_1, stringHasher, json, statementUuid, Companion_getInstance_30().get_TYPE_CATEGORY_z1o9ty_k$())), toEntities$toEntitiesInternal(_this__u8e3s4.other_1, stringHasher, json, statementUuid, Companion_getInstance_30().get_TYPE_OTHER_ex80jw_k$()));
  }
  function toEntities_2(_this__u8e3s4, stringHasher, json, statementUuid, contextType) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var activityUid = stringHasher.hash_6htf84_k$(item.get_id_kntnx8_k$());
      var scajToHash = stringHasher.hash_6htf84_k$('' + contextType + '-' + item.get_id_kntnx8_k$());
      var statementContextActivityJoin = new StatementContextActivityJoin(statementUuid.get_mostSignificantBits_50ugdp_k$(), statementUuid.get_leastSignificantBits_mmkdbt_k$(), scajToHash, contextType, activityUid, item.get_id_kntnx8_k$());
      var tmp0_safe_receiver = item.get_definition_y2whcs_k$();
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toEntities(tmp0_safe_receiver, item.get_id_kntnx8_k$(), stringHasher, json);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.copy$default_azuvnw_k$(VOID, VOID, VOID, VOID, statementContextActivityJoin);
      var tmp$ret$0 = tmp2_elvis_lhs == null ? new ActivityEntities(new ActivityEntity(activityUid, item.get_id_kntnx8_k$()), VOID, VOID, VOID, statementContextActivityJoin) : tmp2_elvis_lhs;
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    return destination;
  }
  function toEntities$toEntitiesInternal(_this__u8e3s4, $stringHasher, $json, $statementUuid, type) {
    return toEmptyIfNull(_this__u8e3s4 == null ? null : toEntities_2(_this__u8e3s4, $stringHasher, $json, $statementUuid, type));
  }
  function _get_$childSerializers__r2zwns_15($this) {
    return $this.$childSerializers_1;
  }
  function Companion_71() {
    Companion_instance_71 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_56())];
  }
  protoOf(Companion_71).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_59();
  };
  var Companion_instance_71;
  function Companion_getInstance_132() {
    if (Companion_instance_71 == null)
      new Companion_71();
    return Companion_instance_71;
  }
  function $serializer_49() {
    $serializer_instance_49 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiGroup', this, 7);
    tmp0_serialDesc.addElement_5pzumi_k$('name', true);
    tmp0_serialDesc.addElement_5pzumi_k$('mbox', true);
    tmp0_serialDesc.addElement_5pzumi_k$('mbox_sha1sum', true);
    tmp0_serialDesc.addElement_5pzumi_k$('openid', true);
    tmp0_serialDesc.addElement_5pzumi_k$('objectType', true);
    tmp0_serialDesc.addElement_5pzumi_k$('account', true);
    tmp0_serialDesc.addElement_5pzumi_k$('member', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_49).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_49).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_132().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_getInstance()), get_nullable($serializer_getInstance_53()), tmp0_cached[6]];
  };
  protoOf($serializer_49).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp12_cached = Companion_getInstance_132().$childSerializers_1;
    if (tmp11_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, XapiObjectTypeSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, $serializer_getInstance_53(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp11_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp11_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, XapiObjectTypeSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp11_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, $serializer_getInstance_53(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp11_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp11_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiGroup_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
  };
  protoOf($serializer_49).serialize_mp210e_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_132().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.name_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.name_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.mbox_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, StringSerializer_getInstance(), value.mbox_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.mbox_sha1sum_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.mbox_sha1sum_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.openid_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.openid_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.objectType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, XapiObjectTypeSerializer_getInstance(), value.objectType_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.account_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, $serializer_getInstance_53(), value.account_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !equals(value.member_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 6, tmp2_cached[6], value.member_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_49).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_mp210e_k$(encoder, value instanceof XapiGroup ? value : THROW_CCE());
  };
  var $serializer_instance_49;
  function $serializer_getInstance_59() {
    if ($serializer_instance_49 == null)
      new $serializer_49();
    return $serializer_instance_49;
  }
  function XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_59().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.name_1 = null;
    else
      $this.name_1 = name;
    if (0 === (seen1 & 2))
      $this.mbox_1 = null;
    else
      $this.mbox_1 = mbox;
    if (0 === (seen1 & 4))
      $this.mbox_sha1sum_1 = null;
    else
      $this.mbox_sha1sum_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.openid_1 = null;
    else
      $this.openid_1 = openid;
    if (0 === (seen1 & 16))
      $this.objectType_1 = null;
    else
      $this.objectType_1 = objectType;
    if (0 === (seen1 & 32))
      $this.account_1 = null;
    else
      $this.account_1 = account;
    if (0 === (seen1 & 64))
      $this.member_1 = emptyList();
    else
      $this.member_1 = member;
    return $this;
  }
  function XapiGroup_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker) {
    return XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, objectCreate(protoOf(XapiGroup)));
  }
  function XapiGroup(name, mbox, mbox_sha1sum, openid, objectType, account, member) {
    Companion_getInstance_132();
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    member = member === VOID ? emptyList() : member;
    this.name_1 = name;
    this.mbox_1 = mbox;
    this.mbox_sha1sum_1 = mbox_sha1sum;
    this.openid_1 = openid;
    this.objectType_1 = objectType;
    this.account_1 = account;
    this.member_1 = member;
  }
  protoOf(XapiGroup).get_name_woqyms_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiGroup).get_mbox_woqcg7_k$ = function () {
    return this.mbox_1;
  };
  protoOf(XapiGroup).get_mbox_sha1sum_f5o42a_k$ = function () {
    return this.mbox_sha1sum_1;
  };
  protoOf(XapiGroup).get_openid_hp3xm6_k$ = function () {
    return this.openid_1;
  };
  protoOf(XapiGroup).get_objectType_2j2n32_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiGroup).get_account_i7e30c_k$ = function () {
    return this.account_1;
  };
  protoOf(XapiGroup).get_member_gl3t7n_k$ = function () {
    return this.member_1;
  };
  protoOf(XapiGroup).component1_7eebsc_k$ = function () {
    return this.name_1;
  };
  protoOf(XapiGroup).component2_7eebsb_k$ = function () {
    return this.mbox_1;
  };
  protoOf(XapiGroup).component3_7eebsa_k$ = function () {
    return this.mbox_sha1sum_1;
  };
  protoOf(XapiGroup).component4_7eebs9_k$ = function () {
    return this.openid_1;
  };
  protoOf(XapiGroup).component5_7eebs8_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiGroup).component6_7eebs7_k$ = function () {
    return this.account_1;
  };
  protoOf(XapiGroup).component7_7eebs6_k$ = function () {
    return this.member_1;
  };
  protoOf(XapiGroup).copy_3uvqyf_k$ = function (name, mbox, mbox_sha1sum, openid, objectType, account, member) {
    return new XapiGroup(name, mbox, mbox_sha1sum, openid, objectType, account, member);
  };
  protoOf(XapiGroup).copy$default_shg4il_k$ = function (name, mbox, mbox_sha1sum, openid, objectType, account, member, $super) {
    name = name === VOID ? this.name_1 : name;
    mbox = mbox === VOID ? this.mbox_1 : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? this.mbox_sha1sum_1 : mbox_sha1sum;
    openid = openid === VOID ? this.openid_1 : openid;
    objectType = objectType === VOID ? this.objectType_1 : objectType;
    account = account === VOID ? this.account_1 : account;
    member = member === VOID ? this.member_1 : member;
    return $super === VOID ? this.copy_3uvqyf_k$(name, mbox, mbox_sha1sum, openid, objectType, account, member) : $super.copy_3uvqyf_k$.call(this, name, mbox, mbox_sha1sum, openid, objectType, account, member);
  };
  protoOf(XapiGroup).toString = function () {
    return 'XapiGroup(name=' + this.name_1 + ', mbox=' + this.mbox_1 + ', mbox_sha1sum=' + this.mbox_sha1sum_1 + ', openid=' + this.openid_1 + ', objectType=' + this.objectType_1 + ', account=' + this.account_1 + ', member=' + this.member_1 + ')';
  };
  protoOf(XapiGroup).hashCode = function () {
    var result = this.name_1 == null ? 0 : getStringHashCode(this.name_1);
    result = imul(result, 31) + (this.mbox_1 == null ? 0 : getStringHashCode(this.mbox_1)) | 0;
    result = imul(result, 31) + (this.mbox_sha1sum_1 == null ? 0 : getStringHashCode(this.mbox_sha1sum_1)) | 0;
    result = imul(result, 31) + (this.openid_1 == null ? 0 : getStringHashCode(this.openid_1)) | 0;
    result = imul(result, 31) + (this.objectType_1 == null ? 0 : this.objectType_1.hashCode()) | 0;
    result = imul(result, 31) + (this.account_1 == null ? 0 : this.account_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.member_1) | 0;
    return result;
  };
  protoOf(XapiGroup).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroup))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroup ? other : THROW_CCE();
    if (!(this.name_1 == tmp0_other_with_cast.name_1))
      return false;
    if (!(this.mbox_1 == tmp0_other_with_cast.mbox_1))
      return false;
    if (!(this.mbox_sha1sum_1 == tmp0_other_with_cast.mbox_sha1sum_1))
      return false;
    if (!(this.openid_1 == tmp0_other_with_cast.openid_1))
      return false;
    if (!equals(this.objectType_1, tmp0_other_with_cast.objectType_1))
      return false;
    if (!equals(this.account_1, tmp0_other_with_cast.account_1))
      return false;
    if (!equals(this.member_1, tmp0_other_with_cast.member_1))
      return false;
    return true;
  };
  function toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var modTime = systemTimeInMillis();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.member_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$0 = to(identifierHash(item, stringHasher), toActorEntity(item, stringHasher, knownActorUidToPersonUidMap));
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = toGroupEntities$lambda;
    var tmp$ret$3 = new sam$kotlin_Comparator$0_0(tmp);
    var memberActors = sortedWith(destination, tmp$ret$3);
    var hasher = hasherFactory.newHasher_bylh2l_k$(new Long(0, 0));
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator_0 = memberActors.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator_0.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      hasher.update_abaron_k$(toByteArray(element.get_first_irdx8n_k$()));
    }
    var memberHash = hasher.digest_m0ziv0_k$();
    var tmp_0;
    if (get_isAnonymous(_this__u8e3s4)) {
      tmp_0 = primaryKeyManager.nextId_8yjjmy_k$(Companion_getInstance_31().get_TABLE_ID_xo2mej_k$());
    } else {
      tmp_0 = identifierHash(_this__u8e3s4, stringHasher);
    }
    var tmp2_actorUid = tmp_0;
    var tmp3_actorObjectType = XapiEntityObjectTypeFlags_getInstance().get_GROUP_i9wvg6_k$();
    var tmp4_actorName = _this__u8e3s4.name_1;
    var tmp5_actorMbox = _this__u8e3s4.mbox_1;
    var tmp6_actorMbox_sha1sum = _this__u8e3s4.mbox_sha1sum_1;
    var tmp7_actorOpenid = _this__u8e3s4.openid_1;
    var tmp0_safe_receiver = _this__u8e3s4.account_1;
    var tmp8_actorAccountName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_name_woqyms_k$();
    var tmp1_safe_receiver = _this__u8e3s4.account_1;
    var tmp9_actorAccountHomePage = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_homePage_v6mod3_k$();
    var groupActor = new ActorEntity(tmp2_actorUid, VOID, tmp4_actorName, tmp5_actorMbox, tmp6_actorMbox_sha1sum, tmp7_actorOpenid, tmp8_actorAccountName, tmp9_actorAccountHomePage, memberHash, modTime, tmp3_actorObjectType);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_1 = memberActors.iterator_jk1svi_k$();
    while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
      var item_0 = tmp0_iterator_1.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$5 = item_0.get_second_jf7fjx_k$();
      destination_0.add_utx5q5_k$(tmp$ret$5);
    }
    var tmp_1 = destination_0;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_2 = memberActors.iterator_jk1svi_k$();
    while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
      var item_1 = tmp0_iterator_2.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$8 = new GroupMemberActorJoin(groupActor.get_actorUid_bxgzj8_k$(), item_1.get_second_jf7fjx_k$().get_actorUid_bxgzj8_k$(), modTime);
      destination_1.add_utx5q5_k$(tmp$ret$8);
    }
    return new ActorEntities(groupActor, tmp_1, destination_1);
  }
  function get_isAnonymous(_this__u8e3s4) {
    return (_this__u8e3s4.mbox_1 == null ? _this__u8e3s4.openid_1 == null : false) ? _this__u8e3s4.account_1 == null : false;
  }
  function sam$kotlin_Comparator$0_0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_0).compare_bczr_k$ = function (a, b) {
    return this.function_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
    return this.compare_bczr_k$(a, b);
  };
  function toGroupEntities$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp = a.get_first_irdx8n_k$();
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp$ret$1 = b.get_first_irdx8n_k$();
    return compareValues(tmp, tmp$ret$1);
  }
  function _get_$cachedSerializer__te6jhj_0($this) {
    return $this.$cachedSerializer$delegate_1.get_value_j01efc_k$();
  }
  function XapiInteractionType$Companion$_anonymous__3zafad() {
    return XapiInteractionTypeSerializer_getInstance();
  }
  var XapiInteractionType_TrueFalse_instance;
  var XapiInteractionType_Choice_instance;
  var XapiInteractionType_FillIn_instance;
  var XapiInteractionType_LongFillIn_instance;
  var XapiInteractionType_Matching_instance;
  var XapiInteractionType_Performance_instance;
  var XapiInteractionType_Sequencing_instance;
  var XapiInteractionType_Likert_instance;
  var XapiInteractionType_Numeric_instance;
  var XapiInteractionType_Other_instance;
  function Companion_72() {
    Companion_instance_72 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.$cachedSerializer$delegate_1 = lazy(tmp_0, XapiInteractionType$Companion$_anonymous__3zafad);
  }
  protoOf(Companion_72).fromJsonFieldValue_926s5r_k$ = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = get_entries_3().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.Companion.fromJsonFieldValue.<anonymous>' call
        if (element.jsonFieldValue_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? XapiInteractionType_Other_getInstance() : tmp0_elvis_lhs;
  };
  protoOf(Companion_72).fromDbFlag_mfkmtg_k$ = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = get_entries_3().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.Companion.fromDbFlag.<anonymous>' call
        if (element.dbFlag_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  };
  protoOf(Companion_72).serializer_9w0wvi_k$ = function () {
    return _get_$cachedSerializer__te6jhj_0(this);
  };
  protoOf(Companion_72).serializer_nv39qc_k$ = function (typeParamsSerializers) {
    return this.serializer_9w0wvi_k$();
  };
  var Companion_instance_72;
  function Companion_getInstance_133() {
    XapiInteractionType_initEntries();
    if (Companion_instance_72 == null)
      new Companion_72();
    return Companion_instance_72;
  }
  function values_4() {
    return [XapiInteractionType_TrueFalse_getInstance(), XapiInteractionType_Choice_getInstance(), XapiInteractionType_FillIn_getInstance(), XapiInteractionType_LongFillIn_getInstance(), XapiInteractionType_Matching_getInstance(), XapiInteractionType_Performance_getInstance(), XapiInteractionType_Sequencing_getInstance(), XapiInteractionType_Likert_getInstance(), XapiInteractionType_Numeric_getInstance(), XapiInteractionType_Other_getInstance()];
  }
  function valueOf_3(value) {
    switch (value) {
      case 'TrueFalse':
        return XapiInteractionType_TrueFalse_getInstance();
      case 'Choice':
        return XapiInteractionType_Choice_getInstance();
      case 'FillIn':
        return XapiInteractionType_FillIn_getInstance();
      case 'LongFillIn':
        return XapiInteractionType_LongFillIn_getInstance();
      case 'Matching':
        return XapiInteractionType_Matching_getInstance();
      case 'Performance':
        return XapiInteractionType_Performance_getInstance();
      case 'Sequencing':
        return XapiInteractionType_Sequencing_getInstance();
      case 'Likert':
        return XapiInteractionType_Likert_getInstance();
      case 'Numeric':
        return XapiInteractionType_Numeric_getInstance();
      case 'Other':
        return XapiInteractionType_Other_getInstance();
      default:
        XapiInteractionType_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_3() {
    if ($ENTRIES_3 == null)
      $ENTRIES_3 = enumEntries(values_4());
    return $ENTRIES_3;
  }
  var XapiInteractionType_entriesInitialized;
  function XapiInteractionType_initEntries() {
    if (XapiInteractionType_entriesInitialized)
      return Unit_getInstance();
    XapiInteractionType_entriesInitialized = true;
    XapiInteractionType_TrueFalse_instance = new XapiInteractionType('TrueFalse', 0, 'true-false', Companion_getInstance_23().get_TYPE_TRUE_FALSE_xtwdou_k$());
    XapiInteractionType_Choice_instance = new XapiInteractionType('Choice', 1, 'choice', Companion_getInstance_23().get_TYPE_CHOICE_sqvgf1_k$());
    XapiInteractionType_FillIn_instance = new XapiInteractionType('FillIn', 2, 'fill-in', Companion_getInstance_23().get_TYPE_FILL_IN_c7a0f9_k$());
    XapiInteractionType_LongFillIn_instance = new XapiInteractionType('LongFillIn', 3, 'long-fill-in', Companion_getInstance_23().get_TYPE_LONG_FILL_IN_htkb8a_k$());
    XapiInteractionType_Matching_instance = new XapiInteractionType('Matching', 4, 'matching', Companion_getInstance_23().get_TYPE_MATCHING_uyytvr_k$());
    XapiInteractionType_Performance_instance = new XapiInteractionType('Performance', 5, 'performance', Companion_getInstance_23().get_TYPE_PERFORMANCE_xx60d0_k$());
    XapiInteractionType_Sequencing_instance = new XapiInteractionType('Sequencing', 6, 'sequencing', Companion_getInstance_23().get_TYPE_SEQUENCING_z7frly_k$());
    XapiInteractionType_Likert_instance = new XapiInteractionType('Likert', 7, 'likert', Companion_getInstance_23().get_TYPE_LIKERT_x0r80l_k$());
    XapiInteractionType_Numeric_instance = new XapiInteractionType('Numeric', 8, 'numeric', Companion_getInstance_23().get_TYPE_NUMERIC_6qtaz3_k$());
    XapiInteractionType_Other_instance = new XapiInteractionType('Other', 9, 'other', Companion_getInstance_23().get_TYPE_OTHER_ex80jw_k$());
    Companion_getInstance_133();
  }
  var $ENTRIES_3;
  function XapiInteractionType(name, ordinal, jsonFieldValue, dbFlag) {
    Enum.call(this, name, ordinal);
    this.jsonFieldValue_1 = jsonFieldValue;
    this.dbFlag_1 = dbFlag;
  }
  protoOf(XapiInteractionType).get_jsonFieldValue_3at02w_k$ = function () {
    return this.jsonFieldValue_1;
  };
  protoOf(XapiInteractionType).get_dbFlag_c9d4pf_k$ = function () {
    return this.dbFlag_1;
  };
  function XapiInteractionTypeSerializer() {
    XapiInteractionTypeSerializer_instance = this;
  }
  protoOf(XapiInteractionTypeSerializer).get_descriptor_wjt6a0_k$ = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().get_stringClass_bik2gy_k$(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).get_descriptor_wjt6a0_k$();
  };
  protoOf(XapiInteractionTypeSerializer).deserialize_sy6x50_k$ = function (decoder) {
    return Companion_getInstance_133().fromJsonFieldValue_926s5r_k$(decoder.decodeString_x3hxsx_k$());
  };
  protoOf(XapiInteractionTypeSerializer).serialize_kka5qp_k$ = function (encoder, value) {
    encoder.encodeString_424b5v_k$(value.jsonFieldValue_1);
  };
  protoOf(XapiInteractionTypeSerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_kka5qp_k$(encoder, value instanceof XapiInteractionType ? value : THROW_CCE());
  };
  var XapiInteractionTypeSerializer_instance;
  function XapiInteractionTypeSerializer_getInstance() {
    if (XapiInteractionTypeSerializer_instance == null)
      new XapiInteractionTypeSerializer();
    return XapiInteractionTypeSerializer_instance;
  }
  function XapiInteractionType_TrueFalse_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_TrueFalse_instance;
  }
  function XapiInteractionType_Choice_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Choice_instance;
  }
  function XapiInteractionType_FillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_FillIn_instance;
  }
  function XapiInteractionType_LongFillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_LongFillIn_instance;
  }
  function XapiInteractionType_Matching_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Matching_instance;
  }
  function XapiInteractionType_Performance_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Performance_instance;
  }
  function XapiInteractionType_Sequencing_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Sequencing_instance;
  }
  function XapiInteractionType_Likert_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Likert_instance;
  }
  function XapiInteractionType_Numeric_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Numeric_instance;
  }
  function XapiInteractionType_Other_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Other_instance;
  }
  function _get_$cachedSerializer__te6jhj_1($this) {
    return $this.$cachedSerializer$delegate_1.get_value_j01efc_k$();
  }
  function XapiObjectType$Companion$_anonymous__v4av7w() {
    return XapiObjectTypeSerializer_getInstance();
  }
  var XapiObjectType_StatementRef_instance;
  var XapiObjectType_SubStatement_instance;
  var XapiObjectType_Activity_instance;
  var XapiObjectType_Agent_instance;
  var XapiObjectType_Group_instance;
  var XapiObjectType_Statement_instance;
  function Companion_73() {
    Companion_instance_73 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.$cachedSerializer$delegate_1 = lazy(tmp_0, XapiObjectType$Companion$_anonymous__v4av7w);
  }
  protoOf(Companion_73).serializer_9w0wvi_k$ = function () {
    return _get_$cachedSerializer__te6jhj_1(this);
  };
  protoOf(Companion_73).serializer_nv39qc_k$ = function (typeParamsSerializers) {
    return this.serializer_9w0wvi_k$();
  };
  var Companion_instance_73;
  function Companion_getInstance_134() {
    XapiObjectType_initEntries();
    if (Companion_instance_73 == null)
      new Companion_73();
    return Companion_instance_73;
  }
  function values_5() {
    return [XapiObjectType_StatementRef_getInstance(), XapiObjectType_SubStatement_getInstance(), XapiObjectType_Activity_getInstance(), XapiObjectType_Agent_getInstance(), XapiObjectType_Group_getInstance(), XapiObjectType_Statement_getInstance()];
  }
  function valueOf_4(value) {
    switch (value) {
      case 'StatementRef':
        return XapiObjectType_StatementRef_getInstance();
      case 'SubStatement':
        return XapiObjectType_SubStatement_getInstance();
      case 'Activity':
        return XapiObjectType_Activity_getInstance();
      case 'Agent':
        return XapiObjectType_Agent_getInstance();
      case 'Group':
        return XapiObjectType_Group_getInstance();
      case 'Statement':
        return XapiObjectType_Statement_getInstance();
      default:
        XapiObjectType_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_4() {
    if ($ENTRIES_4 == null)
      $ENTRIES_4 = enumEntries(values_5());
    return $ENTRIES_4;
  }
  var XapiObjectType_entriesInitialized;
  function XapiObjectType_initEntries() {
    if (XapiObjectType_entriesInitialized)
      return Unit_getInstance();
    XapiObjectType_entriesInitialized = true;
    XapiObjectType_StatementRef_instance = new XapiObjectType('StatementRef', 0);
    XapiObjectType_SubStatement_instance = new XapiObjectType('SubStatement', 1);
    XapiObjectType_Activity_instance = new XapiObjectType('Activity', 2);
    XapiObjectType_Agent_instance = new XapiObjectType('Agent', 3);
    XapiObjectType_Group_instance = new XapiObjectType('Group', 4);
    XapiObjectType_Statement_instance = new XapiObjectType('Statement', 5);
    Companion_getInstance_134();
  }
  var $ENTRIES_4;
  function XapiObjectType(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function XapiObjectTypeSerializer() {
    XapiObjectTypeSerializer_instance = this;
  }
  protoOf(XapiObjectTypeSerializer).get_descriptor_wjt6a0_k$ = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().get_stringClass_bik2gy_k$(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).get_descriptor_wjt6a0_k$();
  };
  protoOf(XapiObjectTypeSerializer).deserialize_sy6x50_k$ = function (decoder) {
    var strValue = decoder.decodeString_x3hxsx_k$();
    return valueOf_4(strValue);
  };
  protoOf(XapiObjectTypeSerializer).serialize_vfgdlb_k$ = function (encoder, value) {
    encoder.encodeString_424b5v_k$(value.toString());
  };
  protoOf(XapiObjectTypeSerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_vfgdlb_k$(encoder, value instanceof XapiObjectType ? value : THROW_CCE());
  };
  var XapiObjectTypeSerializer_instance;
  function XapiObjectTypeSerializer_getInstance() {
    if (XapiObjectTypeSerializer_instance == null)
      new XapiObjectTypeSerializer();
    return XapiObjectTypeSerializer_instance;
  }
  function get_typeFlag(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.get_ordinal_ip24qg_k$()) {
      case 0:
        tmp = XapiEntityObjectTypeFlags_getInstance().get_STATEMENT_REF_dyl606_k$();
        break;
      case 1:
        tmp = XapiEntityObjectTypeFlags_getInstance().get_SUBSTATEMENT_9w3erc_k$();
        break;
      case 2:
        tmp = XapiEntityObjectTypeFlags_getInstance().get_ACTIVITY_os7lqw_k$();
        break;
      case 3:
        tmp = XapiEntityObjectTypeFlags_getInstance().get_AGENT_i6evgc_k$();
        break;
      case 4:
        tmp = XapiEntityObjectTypeFlags_getInstance().get_GROUP_i9wvg6_k$();
        break;
      case 5:
        tmp = XapiEntityObjectTypeFlags_getInstance().get_STATEMENT_k458rq_k$();
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function XapiObjectType_StatementRef_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_StatementRef_instance;
  }
  function XapiObjectType_SubStatement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_SubStatement_instance;
  }
  function XapiObjectType_Activity_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Activity_instance;
  }
  function XapiObjectType_Agent_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Agent_instance;
  }
  function XapiObjectType_Group_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Group_instance;
  }
  function XapiObjectType_Statement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Statement_instance;
  }
  function Companion_74() {
    Companion_instance_74 = this;
  }
  protoOf(Companion_74).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_60();
  };
  var Companion_instance_74;
  function Companion_getInstance_135() {
    if (Companion_instance_74 == null)
      new Companion_74();
    return Companion_instance_74;
  }
  function $serializer_50() {
    $serializer_instance_50 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult.Score', this, 4);
    tmp0_serialDesc.addElement_5pzumi_k$('scaled', true);
    tmp0_serialDesc.addElement_5pzumi_k$('raw', true);
    tmp0_serialDesc.addElement_5pzumi_k$('min', true);
    tmp0_serialDesc.addElement_5pzumi_k$('max', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_50).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_50).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance())];
  };
  protoOf($serializer_50).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp8_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.endStructure_1xqz0n_k$(tmp0_desc);
    return Score_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_50).serialize_f67o8c_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.scaled_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, FloatSerializer_getInstance(), value.scaled_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.raw_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, FloatSerializer_getInstance(), value.raw_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.min_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, FloatSerializer_getInstance(), value.min_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.max_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, FloatSerializer_getInstance(), value.max_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_50).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_f67o8c_k$(encoder, value instanceof Score ? value : THROW_CCE());
  };
  var $serializer_instance_50;
  function $serializer_getInstance_60() {
    if ($serializer_instance_50 == null)
      new $serializer_50();
    return $serializer_instance_50;
  }
  function Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_60().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.scaled_1 = null;
    else
      $this.scaled_1 = scaled;
    if (0 === (seen1 & 2))
      $this.raw_1 = null;
    else
      $this.raw_1 = raw;
    if (0 === (seen1 & 4))
      $this.min_1 = null;
    else
      $this.min_1 = min;
    if (0 === (seen1 & 8))
      $this.max_1 = null;
    else
      $this.max_1 = max;
    return $this;
  }
  function Score_init_$Create$(seen1, scaled, raw, min, max, serializationConstructorMarker) {
    return Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, objectCreate(protoOf(Score)));
  }
  function _get_$childSerializers__r2zwns_16($this) {
    return $this.$childSerializers_1;
  }
  function Score(scaled, raw, min, max) {
    Companion_getInstance_135();
    scaled = scaled === VOID ? null : scaled;
    raw = raw === VOID ? null : raw;
    min = min === VOID ? null : min;
    max = max === VOID ? null : max;
    this.scaled_1 = scaled;
    this.raw_1 = raw;
    this.min_1 = min;
    this.max_1 = max;
  }
  protoOf(Score).set_scaled_zb3wny_k$ = function (_set____db54di) {
    this.scaled_1 = _set____db54di;
  };
  protoOf(Score).get_scaled_je2hyb_k$ = function () {
    return this.scaled_1;
  };
  protoOf(Score).set_raw_u1q5uy_k$ = function (_set____db54di) {
    this.raw_1 = _set____db54di;
  };
  protoOf(Score).get_raw_18ix4x_k$ = function () {
    return this.raw_1;
  };
  protoOf(Score).set_min_dic0zk_k$ = function (_set____db54di) {
    this.min_1 = _set____db54di;
  };
  protoOf(Score).get_min_18j0nr_k$ = function () {
    return this.min_1;
  };
  protoOf(Score).set_max_v9v0nm_k$ = function (_set____db54di) {
    this.max_1 = _set____db54di;
  };
  protoOf(Score).get_max_18j0ud_k$ = function () {
    return this.max_1;
  };
  protoOf(Score).component1_7eebsc_k$ = function () {
    return this.scaled_1;
  };
  protoOf(Score).component2_7eebsb_k$ = function () {
    return this.raw_1;
  };
  protoOf(Score).component3_7eebsa_k$ = function () {
    return this.min_1;
  };
  protoOf(Score).component4_7eebs9_k$ = function () {
    return this.max_1;
  };
  protoOf(Score).copy_yx6ajl_k$ = function (scaled, raw, min, max) {
    return new Score(scaled, raw, min, max);
  };
  protoOf(Score).copy$default_i9qus0_k$ = function (scaled, raw, min, max, $super) {
    scaled = scaled === VOID ? this.scaled_1 : scaled;
    raw = raw === VOID ? this.raw_1 : raw;
    min = min === VOID ? this.min_1 : min;
    max = max === VOID ? this.max_1 : max;
    return $super === VOID ? this.copy_yx6ajl_k$(scaled, raw, min, max) : $super.copy_yx6ajl_k$.call(this, scaled, raw, min, max);
  };
  protoOf(Score).toString = function () {
    return 'Score(scaled=' + this.scaled_1 + ', raw=' + this.raw_1 + ', min=' + this.min_1 + ', max=' + this.max_1 + ')';
  };
  protoOf(Score).hashCode = function () {
    var result = this.scaled_1 == null ? 0 : getNumberHashCode(this.scaled_1);
    result = imul(result, 31) + (this.raw_1 == null ? 0 : getNumberHashCode(this.raw_1)) | 0;
    result = imul(result, 31) + (this.min_1 == null ? 0 : getNumberHashCode(this.min_1)) | 0;
    result = imul(result, 31) + (this.max_1 == null ? 0 : getNumberHashCode(this.max_1)) | 0;
    return result;
  };
  protoOf(Score).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Score))
      return false;
    var tmp0_other_with_cast = other instanceof Score ? other : THROW_CCE();
    if (!equals(this.scaled_1, tmp0_other_with_cast.scaled_1))
      return false;
    if (!equals(this.raw_1, tmp0_other_with_cast.raw_1))
      return false;
    if (!equals(this.min_1, tmp0_other_with_cast.min_1))
      return false;
    if (!equals(this.max_1, tmp0_other_with_cast.max_1))
      return false;
    return true;
  };
  function Companion_75() {
    Companion_instance_75 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  protoOf(Companion_75).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_61();
  };
  var Companion_instance_75;
  function Companion_getInstance_136() {
    if (Companion_instance_75 == null)
      new Companion_75();
    return Companion_instance_75;
  }
  function $serializer_51() {
    $serializer_instance_51 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult', this, 6);
    tmp0_serialDesc.addElement_5pzumi_k$('completion', true);
    tmp0_serialDesc.addElement_5pzumi_k$('success', true);
    tmp0_serialDesc.addElement_5pzumi_k$('score', true);
    tmp0_serialDesc.addElement_5pzumi_k$('duration', true);
    tmp0_serialDesc.addElement_5pzumi_k$('response', true);
    tmp0_serialDesc.addElement_5pzumi_k$('extensions', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_51).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_51).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_136().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_60()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[5])];
  };
  protoOf($serializer_51).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp11_cached = Companion_getInstance_136().$childSerializers_1;
    if (tmp10_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_60(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_60(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_51).serialize_72mj00_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_136().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.completion_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, BooleanSerializer_getInstance(), value.completion_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.success_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, BooleanSerializer_getInstance(), value.success_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.score_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, $serializer_getInstance_60(), value.score_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.duration_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.duration_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.response_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, StringSerializer_getInstance(), value.response_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.extensions_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, tmp2_cached[5], value.extensions_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_51).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_72mj00_k$(encoder, value instanceof XapiResult ? value : THROW_CCE());
  };
  var $serializer_instance_51;
  function $serializer_getInstance_61() {
    if ($serializer_instance_51 == null)
      new $serializer_51();
    return $serializer_instance_51;
  }
  function XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_61().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.completion_1 = null;
    else
      $this.completion_1 = completion;
    if (0 === (seen1 & 2))
      $this.success_1 = null;
    else
      $this.success_1 = success;
    if (0 === (seen1 & 4))
      $this.score_1 = null;
    else
      $this.score_1 = score;
    if (0 === (seen1 & 8))
      $this.duration_1 = null;
    else
      $this.duration_1 = duration;
    if (0 === (seen1 & 16))
      $this.response_1 = null;
    else
      $this.response_1 = response;
    if (0 === (seen1 & 32))
      $this.extensions_1 = null;
    else
      $this.extensions_1 = extensions;
    return $this;
  }
  function XapiResult_init_$Create$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker) {
    return XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiResult)));
  }
  function XapiResult(completion, success, score, duration, response, extensions) {
    Companion_getInstance_136();
    completion = completion === VOID ? null : completion;
    success = success === VOID ? null : success;
    score = score === VOID ? null : score;
    duration = duration === VOID ? null : duration;
    response = response === VOID ? null : response;
    extensions = extensions === VOID ? null : extensions;
    this.completion_1 = completion;
    this.success_1 = success;
    this.score_1 = score;
    this.duration_1 = duration;
    this.response_1 = response;
    this.extensions_1 = extensions;
  }
  protoOf(XapiResult).set_completion_y13wl5_k$ = function (_set____db54di) {
    this.completion_1 = _set____db54di;
  };
  protoOf(XapiResult).get_completion_t4gxwb_k$ = function () {
    return this.completion_1;
  };
  protoOf(XapiResult).set_success_6cew92_k$ = function (_set____db54di) {
    this.success_1 = _set____db54di;
  };
  protoOf(XapiResult).get_success_tm3zdy_k$ = function () {
    return this.success_1;
  };
  protoOf(XapiResult).set_score_cnpi8t_k$ = function (_set____db54di) {
    this.score_1 = _set____db54di;
  };
  protoOf(XapiResult).get_score_iyfcrt_k$ = function () {
    return this.score_1;
  };
  protoOf(XapiResult).set_duration_azjr3u_k$ = function (_set____db54di) {
    this.duration_1 = _set____db54di;
  };
  protoOf(XapiResult).get_duration_6a6kpp_k$ = function () {
    return this.duration_1;
  };
  protoOf(XapiResult).set_response_wbt9nr_k$ = function (_set____db54di) {
    this.response_1 = _set____db54di;
  };
  protoOf(XapiResult).get_response_xlk07e_k$ = function () {
    return this.response_1;
  };
  protoOf(XapiResult).set_extensions_he993a_k$ = function (_set____db54di) {
    this.extensions_1 = _set____db54di;
  };
  protoOf(XapiResult).get_extensions_kxksyl_k$ = function () {
    return this.extensions_1;
  };
  protoOf(XapiResult).component1_7eebsc_k$ = function () {
    return this.completion_1;
  };
  protoOf(XapiResult).component2_7eebsb_k$ = function () {
    return this.success_1;
  };
  protoOf(XapiResult).component3_7eebsa_k$ = function () {
    return this.score_1;
  };
  protoOf(XapiResult).component4_7eebs9_k$ = function () {
    return this.duration_1;
  };
  protoOf(XapiResult).component5_7eebs8_k$ = function () {
    return this.response_1;
  };
  protoOf(XapiResult).component6_7eebs7_k$ = function () {
    return this.extensions_1;
  };
  protoOf(XapiResult).copy_b3vnoi_k$ = function (completion, success, score, duration, response, extensions) {
    return new XapiResult(completion, success, score, duration, response, extensions);
  };
  protoOf(XapiResult).copy$default_kct31d_k$ = function (completion, success, score, duration, response, extensions, $super) {
    completion = completion === VOID ? this.completion_1 : completion;
    success = success === VOID ? this.success_1 : success;
    score = score === VOID ? this.score_1 : score;
    duration = duration === VOID ? this.duration_1 : duration;
    response = response === VOID ? this.response_1 : response;
    extensions = extensions === VOID ? this.extensions_1 : extensions;
    return $super === VOID ? this.copy_b3vnoi_k$(completion, success, score, duration, response, extensions) : $super.copy_b3vnoi_k$.call(this, completion, success, score, duration, response, extensions);
  };
  protoOf(XapiResult).toString = function () {
    return 'XapiResult(completion=' + this.completion_1 + ', success=' + this.success_1 + ', score=' + this.score_1 + ', duration=' + this.duration_1 + ', response=' + this.response_1 + ', extensions=' + this.extensions_1 + ')';
  };
  protoOf(XapiResult).hashCode = function () {
    var result = this.completion_1 == null ? 0 : getBooleanHashCode(this.completion_1);
    result = imul(result, 31) + (this.success_1 == null ? 0 : getBooleanHashCode(this.success_1)) | 0;
    result = imul(result, 31) + (this.score_1 == null ? 0 : this.score_1.hashCode()) | 0;
    result = imul(result, 31) + (this.duration_1 == null ? 0 : getStringHashCode(this.duration_1)) | 0;
    result = imul(result, 31) + (this.response_1 == null ? 0 : getStringHashCode(this.response_1)) | 0;
    result = imul(result, 31) + (this.extensions_1 == null ? 0 : hashCode(this.extensions_1)) | 0;
    return result;
  };
  protoOf(XapiResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiResult))
      return false;
    var tmp0_other_with_cast = other instanceof XapiResult ? other : THROW_CCE();
    if (!(this.completion_1 == tmp0_other_with_cast.completion_1))
      return false;
    if (!(this.success_1 == tmp0_other_with_cast.success_1))
      return false;
    if (!equals(this.score_1, tmp0_other_with_cast.score_1))
      return false;
    if (!(this.duration_1 == tmp0_other_with_cast.duration_1))
      return false;
    if (!(this.response_1 == tmp0_other_with_cast.response_1))
      return false;
    if (!equals(this.extensions_1, tmp0_other_with_cast.extensions_1))
      return false;
    return true;
  };
  function get_XAPI_PROGRESSED_EXTENSIONS() {
    _init_properties_XapiStatement_kt__raho1n();
    return XAPI_PROGRESSED_EXTENSIONS;
  }
  var XAPI_PROGRESSED_EXTENSIONS;
  function get_XAPI_RESULT_EXTENSION_PROGRESS() {
    return XAPI_RESULT_EXTENSION_PROGRESS;
  }
  var XAPI_RESULT_EXTENSION_PROGRESS;
  function get_XAPI_RESULT_EXTENSION_PROGRESS_NON_HTTPS() {
    return XAPI_RESULT_EXTENSION_PROGRESS_NON_HTTPS;
  }
  var XAPI_RESULT_EXTENSION_PROGRESS_NON_HTTPS;
  function _get_$childSerializers__r2zwns_17($this) {
    return $this.$childSerializers_1;
  }
  function Companion_76() {
    Companion_instance_76 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, null, null, null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_52()), null];
  }
  protoOf(Companion_76).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_62();
  };
  var Companion_instance_76;
  function Companion_getInstance_137() {
    if (Companion_instance_76 == null)
      new Companion_76();
    return Companion_instance_76;
  }
  function $serializer_52() {
    $serializer_instance_52 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatement', this, 12);
    tmp0_serialDesc.addElement_5pzumi_k$('id', true);
    tmp0_serialDesc.addElement_5pzumi_k$('actor', false);
    tmp0_serialDesc.addElement_5pzumi_k$('verb', false);
    tmp0_serialDesc.addElement_5pzumi_k$('object', false);
    tmp0_serialDesc.addElement_5pzumi_k$('result', true);
    tmp0_serialDesc.addElement_5pzumi_k$('context', true);
    tmp0_serialDesc.addElement_5pzumi_k$('timestamp', true);
    tmp0_serialDesc.addElement_5pzumi_k$('stored', true);
    tmp0_serialDesc.addElement_5pzumi_k$('authority', true);
    tmp0_serialDesc.addElement_5pzumi_k$('version', true);
    tmp0_serialDesc.addElement_5pzumi_k$('attachments', true);
    tmp0_serialDesc.addElement_5pzumi_k$('objectType', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_52).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_52).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_137().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), XapiActorSerializer_getInstance(), $serializer_getInstance_65(), XapiStatementObjectSerializer_getInstance(), get_nullable($serializer_getInstance_61()), get_nullable($serializer_getInstance_57()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[10]), get_nullable(XapiObjectTypeSerializer_getInstance())];
  };
  protoOf($serializer_52).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp17_cached = Companion_getInstance_137().$childSerializers_1;
    if (tmp16_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_65(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, $serializer_getInstance_61(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 11, XapiObjectTypeSerializer_getInstance(), tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, $serializer_getInstance_65(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, $serializer_getInstance_61(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 11, XapiObjectTypeSerializer_getInstance(), tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiStatement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_52).serialize_7r0wv5_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_137().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.id_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.id_1);
    }
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, XapiActorSerializer_getInstance(), value.actor_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, $serializer_getInstance_65(), value.verb_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), value.object_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.result_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, $serializer_getInstance_61(), value.result_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.context_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, $serializer_getInstance_57(), value.context_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !(value.timestamp_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 6, StringSerializer_getInstance(), value.timestamp_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 7) ? true : !(value.stored_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 7, StringSerializer_getInstance(), value.stored_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 8) ? true : !(value.authority_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 8, XapiActorSerializer_getInstance(), value.authority_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 9) ? true : !(value.version_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 9, StringSerializer_getInstance(), value.version_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 10) ? true : !(value.attachments_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 10, tmp2_cached[10], value.attachments_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 11) ? true : !(value.objectType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 11, XapiObjectTypeSerializer_getInstance(), value.objectType_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_52).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_7r0wv5_k$(encoder, value instanceof XapiStatement ? value : THROW_CCE());
  };
  var $serializer_instance_52;
  function $serializer_getInstance_62() {
    if ($serializer_instance_52 == null)
      new $serializer_52();
    return $serializer_instance_52;
  }
  function XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, $this) {
    if (!(14 === (14 & seen1))) {
      throwMissingFieldException(seen1, 14, $serializer_getInstance_62().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.id_1 = null;
    else
      $this.id_1 = id;
    $this.actor_1 = actor;
    $this.verb_1 = verb;
    $this.object_1 = object;
    if (0 === (seen1 & 16))
      $this.result_1 = null;
    else
      $this.result_1 = result;
    if (0 === (seen1 & 32))
      $this.context_1 = null;
    else
      $this.context_1 = context;
    if (0 === (seen1 & 64))
      $this.timestamp_1 = null;
    else
      $this.timestamp_1 = timestamp;
    if (0 === (seen1 & 128))
      $this.stored_1 = null;
    else
      $this.stored_1 = stored;
    if (0 === (seen1 & 256))
      $this.authority_1 = null;
    else
      $this.authority_1 = authority;
    if (0 === (seen1 & 512))
      $this.version_1 = null;
    else
      $this.version_1 = version;
    if (0 === (seen1 & 1024))
      $this.attachments_1 = null;
    else
      $this.attachments_1 = attachments;
    if (0 === (seen1 & 2048))
      $this.objectType_1 = null;
    else
      $this.objectType_1 = objectType;
    return $this;
  }
  function XapiStatement_init_$Create$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker) {
    return XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, objectCreate(protoOf(XapiStatement)));
  }
  function XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    Companion_getInstance_137();
    id = id === VOID ? null : id;
    result = result === VOID ? null : result;
    context = context === VOID ? null : context;
    timestamp = timestamp === VOID ? null : timestamp;
    stored = stored === VOID ? null : stored;
    authority = authority === VOID ? null : authority;
    version = version === VOID ? null : version;
    attachments = attachments === VOID ? null : attachments;
    objectType = objectType === VOID ? null : objectType;
    this.id_1 = id;
    this.actor_1 = actor;
    this.verb_1 = verb;
    this.object_1 = object;
    this.result_1 = result;
    this.context_1 = context;
    this.timestamp_1 = timestamp;
    this.stored_1 = stored;
    this.authority_1 = authority;
    this.version_1 = version;
    this.attachments_1 = attachments;
    this.objectType_1 = objectType;
  }
  protoOf(XapiStatement).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiStatement).get_actor_ioj5qk_k$ = function () {
    return this.actor_1;
  };
  protoOf(XapiStatement).get_verb_wow5m0_k$ = function () {
    return this.verb_1;
  };
  protoOf(XapiStatement).get_object_hhhtfs_k$ = function () {
    return this.object_1;
  };
  protoOf(XapiStatement).get_result_iyg5d2_k$ = function () {
    return this.result_1;
  };
  protoOf(XapiStatement).get_context_h02k06_k$ = function () {
    return this.context_1;
  };
  protoOf(XapiStatement).get_timestamp_9fccx9_k$ = function () {
    return this.timestamp_1;
  };
  protoOf(XapiStatement).get_stored_jno2b0_k$ = function () {
    return this.stored_1;
  };
  protoOf(XapiStatement).get_authority_wx29i2_k$ = function () {
    return this.authority_1;
  };
  protoOf(XapiStatement).get_version_72w4j3_k$ = function () {
    return this.version_1;
  };
  protoOf(XapiStatement).get_attachments_1o7yvb_k$ = function () {
    return this.attachments_1;
  };
  protoOf(XapiStatement).get_objectType_2j2n32_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiStatement).component1_7eebsc_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiStatement).component2_7eebsb_k$ = function () {
    return this.actor_1;
  };
  protoOf(XapiStatement).component3_7eebsa_k$ = function () {
    return this.verb_1;
  };
  protoOf(XapiStatement).component4_7eebs9_k$ = function () {
    return this.object_1;
  };
  protoOf(XapiStatement).component5_7eebs8_k$ = function () {
    return this.result_1;
  };
  protoOf(XapiStatement).component6_7eebs7_k$ = function () {
    return this.context_1;
  };
  protoOf(XapiStatement).component7_7eebs6_k$ = function () {
    return this.timestamp_1;
  };
  protoOf(XapiStatement).component8_7eebs5_k$ = function () {
    return this.stored_1;
  };
  protoOf(XapiStatement).component9_7eebs4_k$ = function () {
    return this.authority_1;
  };
  protoOf(XapiStatement).component10_gazzfo_k$ = function () {
    return this.version_1;
  };
  protoOf(XapiStatement).component11_gazzfn_k$ = function () {
    return this.attachments_1;
  };
  protoOf(XapiStatement).component12_gazzfm_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiStatement).copy_o7k0wg_k$ = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    return new XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).copy$default_dlizxq_k$ = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, $super) {
    id = id === VOID ? this.id_1 : id;
    actor = actor === VOID ? this.actor_1 : actor;
    verb = verb === VOID ? this.verb_1 : verb;
    object = object === VOID ? this.object_1 : object;
    result = result === VOID ? this.result_1 : result;
    context = context === VOID ? this.context_1 : context;
    timestamp = timestamp === VOID ? this.timestamp_1 : timestamp;
    stored = stored === VOID ? this.stored_1 : stored;
    authority = authority === VOID ? this.authority_1 : authority;
    version = version === VOID ? this.version_1 : version;
    attachments = attachments === VOID ? this.attachments_1 : attachments;
    objectType = objectType === VOID ? this.objectType_1 : objectType;
    return $super === VOID ? this.copy_o7k0wg_k$(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) : $super.copy_o7k0wg_k$.call(this, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).toString = function () {
    return 'XapiStatement(id=' + this.id_1 + ', actor=' + this.actor_1 + ', verb=' + this.verb_1 + ', object=' + this.object_1 + ', result=' + this.result_1 + ', context=' + this.context_1 + ', timestamp=' + this.timestamp_1 + ', stored=' + this.stored_1 + ', authority=' + this.authority_1 + ', version=' + this.version_1 + ', attachments=' + this.attachments_1 + ', objectType=' + this.objectType_1 + ')';
  };
  protoOf(XapiStatement).hashCode = function () {
    var result = this.id_1 == null ? 0 : getStringHashCode(this.id_1);
    result = imul(result, 31) + hashCode(this.actor_1) | 0;
    result = imul(result, 31) + this.verb_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.object_1) | 0;
    result = imul(result, 31) + (this.result_1 == null ? 0 : this.result_1.hashCode()) | 0;
    result = imul(result, 31) + (this.context_1 == null ? 0 : this.context_1.hashCode()) | 0;
    result = imul(result, 31) + (this.timestamp_1 == null ? 0 : getStringHashCode(this.timestamp_1)) | 0;
    result = imul(result, 31) + (this.stored_1 == null ? 0 : getStringHashCode(this.stored_1)) | 0;
    result = imul(result, 31) + (this.authority_1 == null ? 0 : hashCode(this.authority_1)) | 0;
    result = imul(result, 31) + (this.version_1 == null ? 0 : getStringHashCode(this.version_1)) | 0;
    result = imul(result, 31) + (this.attachments_1 == null ? 0 : hashCode(this.attachments_1)) | 0;
    result = imul(result, 31) + (this.objectType_1 == null ? 0 : this.objectType_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiStatement).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatement))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatement ? other : THROW_CCE();
    if (!(this.id_1 == tmp0_other_with_cast.id_1))
      return false;
    if (!equals(this.actor_1, tmp0_other_with_cast.actor_1))
      return false;
    if (!this.verb_1.equals(tmp0_other_with_cast.verb_1))
      return false;
    if (!equals(this.object_1, tmp0_other_with_cast.object_1))
      return false;
    if (!equals(this.result_1, tmp0_other_with_cast.result_1))
      return false;
    if (!equals(this.context_1, tmp0_other_with_cast.context_1))
      return false;
    if (!(this.timestamp_1 == tmp0_other_with_cast.timestamp_1))
      return false;
    if (!(this.stored_1 == tmp0_other_with_cast.stored_1))
      return false;
    if (!equals(this.authority_1, tmp0_other_with_cast.authority_1))
      return false;
    if (!(this.version_1 == tmp0_other_with_cast.version_1))
      return false;
    if (!equals(this.attachments_1, tmp0_other_with_cast.attachments_1))
      return false;
    if (!equals(this.objectType_1, tmp0_other_with_cast.objectType_1))
      return false;
    return true;
  };
  function StatementEntities(statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities) {
    statementEntity = statementEntity === VOID ? null : statementEntity;
    statementEntityJson = statementEntityJson === VOID ? null : statementEntityJson;
    actorEntities = actorEntities === VOID ? null : actorEntities;
    verbEntities = verbEntities === VOID ? null : verbEntities;
    activityEntities = activityEntities === VOID ? null : activityEntities;
    this.statementEntity_1 = statementEntity;
    this.statementEntityJson_1 = statementEntityJson;
    this.actorEntities_1 = actorEntities;
    this.verbEntities_1 = verbEntities;
    this.activityEntities_1 = activityEntities;
  }
  protoOf(StatementEntities).get_statementEntity_xknex5_k$ = function () {
    return this.statementEntity_1;
  };
  protoOf(StatementEntities).get_statementEntityJson_v56z0x_k$ = function () {
    return this.statementEntityJson_1;
  };
  protoOf(StatementEntities).get_actorEntities_j9x38t_k$ = function () {
    return this.actorEntities_1;
  };
  protoOf(StatementEntities).get_verbEntities_ty8u2x_k$ = function () {
    return this.verbEntities_1;
  };
  protoOf(StatementEntities).get_activityEntities_p1yibr_k$ = function () {
    return this.activityEntities_1;
  };
  protoOf(StatementEntities).component1_7eebsc_k$ = function () {
    return this.statementEntity_1;
  };
  protoOf(StatementEntities).component2_7eebsb_k$ = function () {
    return this.statementEntityJson_1;
  };
  protoOf(StatementEntities).component3_7eebsa_k$ = function () {
    return this.actorEntities_1;
  };
  protoOf(StatementEntities).component4_7eebs9_k$ = function () {
    return this.verbEntities_1;
  };
  protoOf(StatementEntities).component5_7eebs8_k$ = function () {
    return this.activityEntities_1;
  };
  protoOf(StatementEntities).copy_9kfrdy_k$ = function (statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities) {
    return new StatementEntities(statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities);
  };
  protoOf(StatementEntities).copy$default_cxu229_k$ = function (statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities, $super) {
    statementEntity = statementEntity === VOID ? this.statementEntity_1 : statementEntity;
    statementEntityJson = statementEntityJson === VOID ? this.statementEntityJson_1 : statementEntityJson;
    actorEntities = actorEntities === VOID ? this.actorEntities_1 : actorEntities;
    verbEntities = verbEntities === VOID ? this.verbEntities_1 : verbEntities;
    activityEntities = activityEntities === VOID ? this.activityEntities_1 : activityEntities;
    return $super === VOID ? this.copy_9kfrdy_k$(statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities) : $super.copy_9kfrdy_k$.call(this, statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities);
  };
  protoOf(StatementEntities).toString = function () {
    return 'StatementEntities(statementEntity=' + this.statementEntity_1 + ', statementEntityJson=' + this.statementEntityJson_1 + ', actorEntities=' + this.actorEntities_1 + ', verbEntities=' + this.verbEntities_1 + ', activityEntities=' + this.activityEntities_1 + ')';
  };
  protoOf(StatementEntities).hashCode = function () {
    var result = this.statementEntity_1 == null ? 0 : this.statementEntity_1.hashCode();
    result = imul(result, 31) + (this.statementEntityJson_1 == null ? 0 : this.statementEntityJson_1.hashCode()) | 0;
    result = imul(result, 31) + (this.actorEntities_1 == null ? 0 : hashCode(this.actorEntities_1)) | 0;
    result = imul(result, 31) + (this.verbEntities_1 == null ? 0 : this.verbEntities_1.hashCode()) | 0;
    result = imul(result, 31) + (this.activityEntities_1 == null ? 0 : hashCode(this.activityEntities_1)) | 0;
    return result;
  };
  protoOf(StatementEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementEntities))
      return false;
    var tmp0_other_with_cast = other instanceof StatementEntities ? other : THROW_CCE();
    if (!equals(this.statementEntity_1, tmp0_other_with_cast.statementEntity_1))
      return false;
    if (!equals(this.statementEntityJson_1, tmp0_other_with_cast.statementEntityJson_1))
      return false;
    if (!equals(this.actorEntities_1, tmp0_other_with_cast.actorEntities_1))
      return false;
    if (!equals(this.verbEntities_1, tmp0_other_with_cast.verbEntities_1))
      return false;
    if (!equals(this.activityEntities_1, tmp0_other_with_cast.activityEntities_1))
      return false;
    return true;
  };
  function toEntities_3(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, exactJson, isSubStatement, learningSpace) {
    isSubStatement = isSubStatement === VOID ? false : isSubStatement;
    _init_properties_XapiStatement_kt__raho1n();
    var tmp0_safe_receiver = _this__u8e3s4.id_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp = uuidFrom(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('id is null');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var statementUuid = tmp_0;
    var tmp_1;
    if (isSubStatement) {
      var tmp_2 = _this__u8e3s4.object_1;
      tmp_1 = tmp_2 instanceof XapiStatement;
    } else {
      tmp_1 = false;
    }
    if (tmp_1)
      throw new XapiException(400, 'SubStatement cannot have another nested subs== XapiObjectType.SubStatementtatement');
    var tmp2_safe_receiver = _this__u8e3s4.context_1;
    var contextRegistration = xapiRequireValidUuidOrNull(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_registration_hsdiwu_k$(), 'Invalid context registration uuid');
    var statementActorEntities = toEntities_0(_this__u8e3s4.actor_1, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp3_safe_receiver = _this__u8e3s4.authority_1;
    var authorityActor = tmp3_safe_receiver == null ? null : toEntities_0(tmp3_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp4_safe_receiver = _this__u8e3s4.context_1;
    var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_instructor_2wewpy_k$();
    var contextInstructorActorEntities = tmp5_safe_receiver == null ? null : toEntities_0(tmp5_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var statementObjectForeignKeys = objectForeignKeys(_this__u8e3s4.object_1, stringHasher, statementUuid);
    var tmp34_statementIdHi = statementUuid.get_mostSignificantBits_50ugdp_k$();
    var tmp35_statementIdLo = statementUuid.get_leastSignificantBits_mmkdbt_k$();
    var tmp_3;
    var tmp_4;
    var tmp6_safe_receiver = _this__u8e3s4.actor_1.get_account_i7e30c_k$();
    if ((tmp6_safe_receiver == null ? null : tmp6_safe_receiver.get_homePage_v6mod3_k$()) === learningSpace.get_url_18iuii_k$()) {
      var tmp7_safe_receiver = _this__u8e3s4.actor_1.get_account_i7e30c_k$();
      tmp_4 = (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.get_name_woqyms_k$()) === xapiSession.get_xseAccountUsername_q0miri_k$();
    } else {
      tmp_4 = false;
    }
    if (tmp_4) {
      tmp_3 = xapiSession.get_xseAccountPersonUid_gx93sh_k$();
    } else {
      tmp_3 = new Long(0, 0);
    }
    var tmp36_statementActorPersonUid = tmp_3;
    var tmp37_statementActorUid = statementActorEntities.get_actor_ioj5qk_k$().get_actorUid_bxgzj8_k$();
    var tmp9_safe_receiver = authorityActor == null ? null : authorityActor.get_actor_ioj5qk_k$();
    var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.get_actorUid_bxgzj8_k$();
    var tmp38_authorityActorUid = tmp10_elvis_lhs == null ? new Long(0, 0) : tmp10_elvis_lhs;
    var tmp39_statementVerbUid = stringHasher.hash_6htf84_k$(xapiRequireValidIRI(_this__u8e3s4.verb_1.get_id_kntnx8_k$(), 'Statement ' + statementUuid + ' VerbID ' + _this__u8e3s4.verb_1.get_id_kntnx8_k$() + ' is not a valid IRI'));
    var tmp11_safe_receiver = _this__u8e3s4.result_1;
    var tmp40_resultCompletion = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.get_completion_t4gxwb_k$();
    var tmp12_safe_receiver = _this__u8e3s4.result_1;
    var tmp41_resultSuccess = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.get_success_tm3zdy_k$();
    var tmp13_safe_receiver = _this__u8e3s4.result_1;
    var tmp14_safe_receiver = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.get_score_iyfcrt_k$();
    var tmp42_resultScoreScaled = tmp14_safe_receiver == null ? null : tmp14_safe_receiver.get_scaled_je2hyb_k$();
    var tmp15_safe_receiver = _this__u8e3s4.result_1;
    var tmp16_safe_receiver = tmp15_safe_receiver == null ? null : tmp15_safe_receiver.get_score_iyfcrt_k$();
    var tmp43_resultScoreRaw = tmp16_safe_receiver == null ? null : tmp16_safe_receiver.get_raw_18ix4x_k$();
    var tmp17_safe_receiver = _this__u8e3s4.result_1;
    var tmp18_safe_receiver = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.get_score_iyfcrt_k$();
    var tmp44_resultScoreMin = tmp18_safe_receiver == null ? null : tmp18_safe_receiver.get_min_18j0nr_k$();
    var tmp19_safe_receiver = _this__u8e3s4.result_1;
    var tmp20_safe_receiver = tmp19_safe_receiver == null ? null : tmp19_safe_receiver.get_score_iyfcrt_k$();
    var tmp45_resultScoreMax = tmp20_safe_receiver == null ? null : tmp20_safe_receiver.get_max_18j0ud_k$();
    var tmp21_safe_receiver = _this__u8e3s4.result_1;
    var tmp46_resultDuration = xapiRequireDurationOrNullAsLong(tmp21_safe_receiver == null ? null : tmp21_safe_receiver.get_duration_6a6kpp_k$());
    var tmp22_safe_receiver = _this__u8e3s4.result_1;
    var tmp47_resultResponse = tmp22_safe_receiver == null ? null : tmp22_safe_receiver.get_response_xlk07e_k$();
    var tmp23_safe_receiver = _this__u8e3s4.timestamp_1;
    var tmp_5;
    if (tmp23_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp_5 = xapiRequireTimestampAsLong(tmp23_safe_receiver);
    }
    var tmp24_elvis_lhs = tmp_5;
    var tmp48_timestamp = tmp24_elvis_lhs == null ? systemTimeInMillis() : tmp24_elvis_lhs;
    var tmp49_stored = systemTimeInMillis();
    var tmp26_elvis_lhs = contextRegistration == null ? null : contextRegistration.get_mostSignificantBits_50ugdp_k$();
    var tmp50_contextRegistrationHi = tmp26_elvis_lhs == null ? new Long(0, 0) : tmp26_elvis_lhs;
    var tmp28_elvis_lhs = contextRegistration == null ? null : contextRegistration.get_leastSignificantBits_mmkdbt_k$();
    var tmp51_contextRegistrationLo = tmp28_elvis_lhs == null ? new Long(0, 0) : tmp28_elvis_lhs;
    var tmp29_safe_receiver = _this__u8e3s4.context_1;
    var tmp52_contextPlatform = tmp29_safe_receiver == null ? null : tmp29_safe_receiver.get_platform_ssr7o_k$();
    var tmp31_safe_receiver = contextInstructorActorEntities == null ? null : contextInstructorActorEntities.get_actor_ioj5qk_k$();
    var tmp32_elvis_lhs = tmp31_safe_receiver == null ? null : tmp31_safe_receiver.get_actorUid_bxgzj8_k$();
    var tmp53_contextInstructorActorUid = tmp32_elvis_lhs == null ? new Long(0, 0) : tmp32_elvis_lhs;
    var tmp54_statementContentEntryUid = xapiSession.get_xseContentEntryUid_t2vuyy_k$();
    var tmp55_statementClazzUid = xapiSession.get_xseClazzUid_sirfq1_k$();
    var tmp56_statementCbUid = xapiSession.get_xseCbUid_lhfrzk_k$();
    var tmp_6;
    if (isCompletionOrProgress(_this__u8e3s4)) {
      var tmp_7;
      if (xapiSession.get_xseContentEntryUid_t2vuyy_k$().equals(new Long(0, 0))) {
        tmp_7 = true;
      } else {
        var tmp_8 = _this__u8e3s4.object_1;
        var tmp33_safe_receiver = tmp_8 instanceof XapiActivityStatementObject ? tmp_8 : null;
        tmp_7 = (tmp33_safe_receiver == null ? null : tmp33_safe_receiver.get_id_kntnx8_k$()) === xapiSession.get_xseRootActivityId_lo9kxf_k$();
      }
      tmp_6 = tmp_7;
    } else {
      tmp_6 = false;
    }
    var tmp57_completionOrProgress = tmp_6;
    var tmp58_extensionProgress = get_resultProgressExtension(_this__u8e3s4);
    var tmp59_statementObjectType = get_objectTypeFlag(_this__u8e3s4.object_1);
    var tmp60_statementObjectUid1 = statementObjectForeignKeys.get_first_irdx8n_k$();
    var tmp61_statementObjectUid2 = statementObjectForeignKeys.get_second_jf7fjx_k$();
    var tmp_9 = new StatementEntity(tmp34_statementIdHi, tmp35_statementIdLo, tmp36_statementActorPersonUid, tmp39_statementVerbUid, tmp59_statementObjectType, tmp60_statementObjectUid1, tmp61_statementObjectUid2, tmp37_statementActorUid, tmp38_authorityActorUid, VOID, tmp40_resultCompletion, tmp41_resultSuccess, tmp42_resultScoreScaled, tmp43_resultScoreRaw, tmp44_resultScoreMin, tmp45_resultScoreMax, tmp46_resultDuration, tmp47_resultResponse, tmp48_timestamp, tmp49_stored, tmp50_contextRegistrationHi, tmp51_contextRegistrationLo, tmp52_contextPlatform, VOID, VOID, tmp53_contextInstructorActorUid, VOID, tmp58_extensionProgress, tmp57_completionOrProgress, tmp54_statementContentEntryUid, VOID, tmp55_statementClazzUid, tmp56_statementCbUid, VOID, isSubStatement);
    var tmp_10 = new StatementEntityJson(statementUuid.get_mostSignificantBits_50ugdp_k$(), statementUuid.get_leastSignificantBits_mmkdbt_k$(), VOID, exactJson);
    // Inline function 'kotlin.collections.buildList' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildListInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = ArrayList_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
    this_0.add_utx5q5_k$(statementActorEntities);
    if (contextInstructorActorEntities == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>.<anonymous>' call
      this_0.add_utx5q5_k$(contextInstructorActorEntities);
    }
    var tmp_11 = this_0.build_1k0s4u_k$();
    var tmp_12 = toVerbEntities(_this__u8e3s4.verb_1, stringHasher);
    var tmp62_safe_receiver = _this__u8e3s4.context_1;
    var tmp63_safe_receiver = tmp62_safe_receiver == null ? null : tmp62_safe_receiver.get_contextActivities_nvcl9p_k$();
    return plus(listOf_0(new StatementEntities(tmp_9, tmp_10, tmp_11, tmp_12, toEmptyIfNull(tmp63_safe_receiver == null ? null : toEntities_1(tmp63_safe_receiver, stringHasher, json, statementUuid)))), objectToEntities(_this__u8e3s4.object_1, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, statementUuid, learningSpace));
  }
  function isCompletionOrProgress(_this__u8e3s4) {
    _init_properties_XapiStatement_kt__raho1n();
    var tmp;
    var tmp0_safe_receiver = _this__u8e3s4.result_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_completion_t4gxwb_k$()) == null)) {
      tmp = true;
    } else {
      tmp = !(get_resultProgressExtension(_this__u8e3s4) == null);
    }
    return tmp;
  }
  var properties_initialized_XapiStatement_kt_2xltj7;
  function _init_properties_XapiStatement_kt__raho1n() {
    if (!properties_initialized_XapiStatement_kt_2xltj7) {
      properties_initialized_XapiStatement_kt_2xltj7 = true;
      XAPI_PROGRESSED_EXTENSIONS = listOf(['https://w3id.org/xapi/cmi5/result/extensions/progress', 'http://w3id.org/xapi/cmi5/result/extensions/progress']);
    }
  }
  function Companion_77() {
    Companion_instance_77 = this;
  }
  protoOf(Companion_77).serializer_9w0wvi_k$ = function () {
    return XapiStatementObjectSerializer_getInstance();
  };
  protoOf(Companion_77).serializer_nv39qc_k$ = function (typeParamsSerializers) {
    return this.serializer_9w0wvi_k$();
  };
  var Companion_instance_77;
  function Companion_getInstance_138() {
    if (Companion_instance_77 == null)
      new Companion_77();
    return Companion_instance_77;
  }
  function XapiStatementObject() {
  }
  function XapiStatementObjectSerializer() {
    XapiStatementObjectSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiStatementObject));
  }
  protoOf(XapiStatementObjectSerializer).selectDeserializer_70cedr_k$ = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).get_6bo4tg_k$('objectType');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_0;
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      if (!(tmp1_safe_receiver instanceof JsonNull)) {
        tmp_0 = tmp1_safe_receiver;
      } else {
        tmp_0 = null;
      }
      tmp = tmp_0;
    }
    var tmp2_safe_receiver = tmp;
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_content_h02jrk_k$();
    var tmp_1;
    if (tmp3_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      tmp_1 = valueOf_4(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp_1;
    var objectType = tmp4_elvis_lhs == null ? XapiObjectType_Activity_getInstance() : tmp4_elvis_lhs;
    var tmp_2;
    switch (objectType.get_ordinal_ip24qg_k$()) {
      case 2:
        tmp_2 = Companion_getInstance_139().serializer_9w0wvi_k$();
        break;
      case 3:
        tmp_2 = Companion_getInstance_128().serializer_9w0wvi_k$();
        break;
      case 4:
        tmp_2 = Companion_getInstance_132().serializer_9w0wvi_k$();
        break;
      case 0:
        tmp_2 = Companion_getInstance_140().serializer_9w0wvi_k$();
        break;
      case 1:
        tmp_2 = Companion_getInstance_137().serializer_9w0wvi_k$();
        break;
      default:
        throw new XapiException(400, 'Statement object type invalid');
    }
    return tmp_2;
  };
  var XapiStatementObjectSerializer_instance;
  function XapiStatementObjectSerializer_getInstance() {
    if (XapiStatementObjectSerializer_instance == null)
      new XapiStatementObjectSerializer();
    return XapiStatementObjectSerializer_instance;
  }
  function Companion_78() {
    Companion_instance_78 = this;
  }
  protoOf(Companion_78).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_63();
  };
  var Companion_instance_78;
  function Companion_getInstance_139() {
    if (Companion_instance_78 == null)
      new Companion_78();
    return Companion_instance_78;
  }
  function $serializer_53() {
    $serializer_instance_53 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivityStatementObject', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('objectType', true);
    tmp0_serialDesc.addElement_5pzumi_k$('id', false);
    tmp0_serialDesc.addElement_5pzumi_k$('definition', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_53).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_53).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiObjectTypeSerializer_getInstance()), StringSerializer_getInstance(), get_nullable($serializer_getInstance_55())];
  };
  protoOf($serializer_53).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, XapiObjectTypeSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_55(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, XapiObjectTypeSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, $serializer_getInstance_55(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiActivityStatementObject_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_53).serialize_mkyt67_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.objectType_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, XapiObjectTypeSerializer_getInstance(), value.objectType_1);
    }
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.id_1);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.definition_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, $serializer_getInstance_55(), value.definition_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_53).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_mkyt67_k$(encoder, value instanceof XapiActivityStatementObject ? value : THROW_CCE());
  };
  var $serializer_instance_53;
  function $serializer_getInstance_63() {
    if ($serializer_instance_53 == null)
      new $serializer_53();
    return $serializer_instance_53;
  }
  function XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_63().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.objectType_1 = null;
    else
      $this.objectType_1 = objectType;
    $this.id_1 = id;
    if (0 === (seen1 & 4))
      $this.definition_1 = null;
    else
      $this.definition_1 = definition;
    return $this;
  }
  function XapiActivityStatementObject_init_$Create$(seen1, objectType, id, definition, serializationConstructorMarker) {
    return XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, objectCreate(protoOf(XapiActivityStatementObject)));
  }
  function XapiActivityStatementObject(objectType, id, definition) {
    Companion_getInstance_139();
    objectType = objectType === VOID ? null : objectType;
    definition = definition === VOID ? null : definition;
    this.objectType_1 = objectType;
    this.id_1 = id;
    this.definition_1 = definition;
  }
  protoOf(XapiActivityStatementObject).get_objectType_2j2n32_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiActivityStatementObject).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiActivityStatementObject).get_definition_y2whcs_k$ = function () {
    return this.definition_1;
  };
  protoOf(XapiActivityStatementObject).component1_7eebsc_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiActivityStatementObject).component2_7eebsb_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiActivityStatementObject).component3_7eebsa_k$ = function () {
    return this.definition_1;
  };
  protoOf(XapiActivityStatementObject).copy_gtl6g0_k$ = function (objectType, id, definition) {
    return new XapiActivityStatementObject(objectType, id, definition);
  };
  protoOf(XapiActivityStatementObject).copy$default_37xui9_k$ = function (objectType, id, definition, $super) {
    objectType = objectType === VOID ? this.objectType_1 : objectType;
    id = id === VOID ? this.id_1 : id;
    definition = definition === VOID ? this.definition_1 : definition;
    return $super === VOID ? this.copy_gtl6g0_k$(objectType, id, definition) : $super.copy_gtl6g0_k$.call(this, objectType, id, definition);
  };
  protoOf(XapiActivityStatementObject).toString = function () {
    return 'XapiActivityStatementObject(objectType=' + this.objectType_1 + ', id=' + this.id_1 + ', definition=' + this.definition_1 + ')';
  };
  protoOf(XapiActivityStatementObject).hashCode = function () {
    var result = this.objectType_1 == null ? 0 : this.objectType_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.id_1) | 0;
    result = imul(result, 31) + (this.definition_1 == null ? 0 : this.definition_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiActivityStatementObject).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivityStatementObject))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivityStatementObject ? other : THROW_CCE();
    if (!equals(this.objectType_1, tmp0_other_with_cast.objectType_1))
      return false;
    if (!(this.id_1 === tmp0_other_with_cast.id_1))
      return false;
    if (!equals(this.definition_1, tmp0_other_with_cast.definition_1))
      return false;
    return true;
  };
  function objectForeignKeys(_this__u8e3s4, stringHasher, statementUuid) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = new Pair(stringHasher.hash_6htf84_k$(_this__u8e3s4.id_1), new Long(0, 0));
    } else {
      if (_this__u8e3s4 instanceof XapiAgent) {
        tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
      } else {
        if (_this__u8e3s4 instanceof XapiGroup) {
          tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
        } else {
          if (_this__u8e3s4 instanceof XapiStatementRef) {
            var uuid = uuidFrom(_this__u8e3s4.get_id_kntnx8_k$());
            tmp = new Pair(uuid.get_mostSignificantBits_50ugdp_k$(), uuid.get_leastSignificantBits_mmkdbt_k$());
          } else {
            if (_this__u8e3s4 instanceof XapiStatement) {
              var tmp_0 = statementUuid.get_mostSignificantBits_50ugdp_k$();
              // Inline function 'kotlin.Long.plus' call
              var tmp$ret$0 = statementUuid.get_leastSignificantBits_mmkdbt_k$().plus_r93sks_k$(toLong(1));
              tmp = new Pair(tmp_0, tmp$ret$0);
            } else {
              noWhenBranchMatchedException();
            }
          }
        }
      }
    }
    return tmp;
  }
  function objectToEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, parentStatementUuid, learningSpace) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = listOf_0(new StatementEntities(VOID, VOID, VOID, VOID, listOf_0(toEntities(_this__u8e3s4.definition_1, _this__u8e3s4.id_1, stringHasher, json))));
    } else {
      if (isInterface(_this__u8e3s4, XapiActor)) {
        tmp = listOf_0(new StatementEntities(VOID, VOID, listOf_0(toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap))));
      } else {
        if (_this__u8e3s4 instanceof XapiStatementRef) {
          tmp = emptyList();
        } else {
          if (_this__u8e3s4 instanceof XapiStatement) {
            var tmp_0 = parentStatementUuid.get_mostSignificantBits_50ugdp_k$();
            // Inline function 'kotlin.Long.plus' call
            var tmp$ret$0 = parentStatementUuid.get_leastSignificantBits_mmkdbt_k$().plus_r93sks_k$(toLong(1));
            tmp = toEntities_3(_this__u8e3s4.copy$default_dlizxq_k$(Uuid_init_$Create$(tmp_0, tmp$ret$0).toString()), stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, null, true, learningSpace);
          } else {
            throw IllegalStateException_init_$Create$('This cant really happen. The compiler does not recognize XapiActor as covering XapiGroup and XapiAgent, but it does.');
          }
        }
      }
    }
    return tmp;
  }
  function get_objectTypeFlag(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.get_objectType_2j2n32_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_typeFlag(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? XapiEntityObjectTypeFlags_getInstance().get_ACTIVITY_os7lqw_k$() : tmp1_elvis_lhs;
  }
  function Companion_79() {
    Companion_instance_79 = this;
  }
  protoOf(Companion_79).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_64();
  };
  var Companion_instance_79;
  function Companion_getInstance_140() {
    if (Companion_instance_79 == null)
      new Companion_79();
    return Companion_instance_79;
  }
  function $serializer_54() {
    $serializer_instance_54 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatementRef', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('objectType', false);
    tmp0_serialDesc.addElement_5pzumi_k$('id', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_54).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_54).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [XapiObjectTypeSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_54).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, XapiObjectTypeSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, XapiObjectTypeSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeStringElement_3oenpg_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiStatementRef_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_54).serialize_r6psqo_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, XapiObjectTypeSerializer_getInstance(), value.objectType_1);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 1, value.id_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_54).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_r6psqo_k$(encoder, value instanceof XapiStatementRef ? value : THROW_CCE());
  };
  var $serializer_instance_54;
  function $serializer_getInstance_64() {
    if ($serializer_instance_54 == null)
      new $serializer_54();
    return $serializer_instance_54;
  }
  function XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_64().descriptor_1);
    }
    $this.objectType_1 = objectType;
    $this.id_1 = id;
    return $this;
  }
  function XapiStatementRef_init_$Create$(seen1, objectType, id, serializationConstructorMarker) {
    return XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, objectCreate(protoOf(XapiStatementRef)));
  }
  function XapiStatementRef(objectType, id) {
    Companion_getInstance_140();
    this.objectType_1 = objectType;
    this.id_1 = id;
  }
  protoOf(XapiStatementRef).get_objectType_2j2n32_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiStatementRef).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiStatementRef).component1_7eebsc_k$ = function () {
    return this.objectType_1;
  };
  protoOf(XapiStatementRef).component2_7eebsb_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiStatementRef).copy_wumeu5_k$ = function (objectType, id) {
    return new XapiStatementRef(objectType, id);
  };
  protoOf(XapiStatementRef).copy$default_mq8g2_k$ = function (objectType, id, $super) {
    objectType = objectType === VOID ? this.objectType_1 : objectType;
    id = id === VOID ? this.id_1 : id;
    return $super === VOID ? this.copy_wumeu5_k$(objectType, id) : $super.copy_wumeu5_k$.call(this, objectType, id);
  };
  protoOf(XapiStatementRef).toString = function () {
    return 'XapiStatementRef(objectType=' + this.objectType_1 + ', id=' + this.id_1 + ')';
  };
  protoOf(XapiStatementRef).hashCode = function () {
    var result = this.objectType_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.id_1) | 0;
    return result;
  };
  protoOf(XapiStatementRef).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatementRef))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatementRef ? other : THROW_CCE();
    if (!this.objectType_1.equals(tmp0_other_with_cast.objectType_1))
      return false;
    if (!(this.id_1 === tmp0_other_with_cast.id_1))
      return false;
    return true;
  };
  function _get_$childSerializers__r2zwns_18($this) {
    return $this.$childSerializers_1;
  }
  function Companion_80() {
    Companion_instance_80 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  protoOf(Companion_80).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_65();
  };
  var Companion_instance_80;
  function Companion_getInstance_141() {
    if (Companion_instance_80 == null)
      new Companion_80();
    return Companion_instance_80;
  }
  function $serializer_55() {
    $serializer_instance_55 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiVerb', this, 2);
    tmp0_serialDesc.addElement_5pzumi_k$('id', true);
    tmp0_serialDesc.addElement_5pzumi_k$('display', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_55).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_55).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_141().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_55).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp7_cached = Companion_getInstance_141().$childSerializers_1;
    if (tmp6_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.endStructure_1xqz0n_k$(tmp0_desc);
    return XapiVerb_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_55).serialize_5bplgu_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_141().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.id_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, StringSerializer_getInstance(), value.id_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.display_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, tmp2_cached[1], value.display_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_55).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_5bplgu_k$(encoder, value instanceof XapiVerb ? value : THROW_CCE());
  };
  var $serializer_instance_55;
  function $serializer_getInstance_65() {
    if ($serializer_instance_55 == null)
      new $serializer_55();
    return $serializer_instance_55;
  }
  function XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_65().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.id_1 = null;
    else
      $this.id_1 = id;
    if (0 === (seen1 & 2))
      $this.display_1 = null;
    else
      $this.display_1 = display;
    return $this;
  }
  function XapiVerb_init_$Create$(seen1, id, display, serializationConstructorMarker) {
    return XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, objectCreate(protoOf(XapiVerb)));
  }
  function XapiVerb(id, display) {
    Companion_getInstance_141();
    id = id === VOID ? null : id;
    display = display === VOID ? null : display;
    this.id_1 = id;
    this.display_1 = display;
  }
  protoOf(XapiVerb).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiVerb).get_display_swvnix_k$ = function () {
    return this.display_1;
  };
  protoOf(XapiVerb).component1_7eebsc_k$ = function () {
    return this.id_1;
  };
  protoOf(XapiVerb).component2_7eebsb_k$ = function () {
    return this.display_1;
  };
  protoOf(XapiVerb).copy_9kdw3_k$ = function (id, display) {
    return new XapiVerb(id, display);
  };
  protoOf(XapiVerb).copy$default_7td38e_k$ = function (id, display, $super) {
    id = id === VOID ? this.id_1 : id;
    display = display === VOID ? this.display_1 : display;
    return $super === VOID ? this.copy_9kdw3_k$(id, display) : $super.copy_9kdw3_k$.call(this, id, display);
  };
  protoOf(XapiVerb).toString = function () {
    return 'XapiVerb(id=' + this.id_1 + ', display=' + this.display_1 + ')';
  };
  protoOf(XapiVerb).hashCode = function () {
    var result = this.id_1 == null ? 0 : getStringHashCode(this.id_1);
    result = imul(result, 31) + (this.display_1 == null ? 0 : hashCode(this.display_1)) | 0;
    return result;
  };
  protoOf(XapiVerb).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiVerb))
      return false;
    var tmp0_other_with_cast = other instanceof XapiVerb ? other : THROW_CCE();
    if (!(this.id_1 == tmp0_other_with_cast.id_1))
      return false;
    if (!equals(this.display_1, tmp0_other_with_cast.display_1))
      return false;
    return true;
  };
  function get_VERB_COMPLETED() {
    return VERB_COMPLETED;
  }
  var VERB_COMPLETED;
  function VerbEntities(verbEntity, verbLangMapEntries) {
    this.verbEntity_1 = verbEntity;
    this.verbLangMapEntries_1 = verbLangMapEntries;
  }
  protoOf(VerbEntities).get_verbEntity_dpswph_k$ = function () {
    return this.verbEntity_1;
  };
  protoOf(VerbEntities).get_verbLangMapEntries_tbbmp6_k$ = function () {
    return this.verbLangMapEntries_1;
  };
  protoOf(VerbEntities).component1_7eebsc_k$ = function () {
    return this.verbEntity_1;
  };
  protoOf(VerbEntities).component2_7eebsb_k$ = function () {
    return this.verbLangMapEntries_1;
  };
  protoOf(VerbEntities).copy_uj4jpu_k$ = function (verbEntity, verbLangMapEntries) {
    return new VerbEntities(verbEntity, verbLangMapEntries);
  };
  protoOf(VerbEntities).copy$default_w3eo5a_k$ = function (verbEntity, verbLangMapEntries, $super) {
    verbEntity = verbEntity === VOID ? this.verbEntity_1 : verbEntity;
    verbLangMapEntries = verbLangMapEntries === VOID ? this.verbLangMapEntries_1 : verbLangMapEntries;
    return $super === VOID ? this.copy_uj4jpu_k$(verbEntity, verbLangMapEntries) : $super.copy_uj4jpu_k$.call(this, verbEntity, verbLangMapEntries);
  };
  protoOf(VerbEntities).toString = function () {
    return 'VerbEntities(verbEntity=' + this.verbEntity_1 + ', verbLangMapEntries=' + this.verbLangMapEntries_1 + ')';
  };
  protoOf(VerbEntities).hashCode = function () {
    var result = this.verbEntity_1.hashCode();
    result = imul(result, 31) + hashCode(this.verbLangMapEntries_1) | 0;
    return result;
  };
  protoOf(VerbEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VerbEntities))
      return false;
    var tmp0_other_with_cast = other instanceof VerbEntities ? other : THROW_CCE();
    if (!this.verbEntity_1.equals(tmp0_other_with_cast.verbEntity_1))
      return false;
    if (!equals(this.verbLangMapEntries_1, tmp0_other_with_cast.verbLangMapEntries_1))
      return false;
    return true;
  };
  function toVerbEntities(_this__u8e3s4, xxHasher) {
    var verbIri = xapiRequireValidIRI(_this__u8e3s4.id_1);
    var verbUid = xxHasher.hash_6htf84_k$(verbIri);
    var tmp = new VerbEntity(verbUid, _this__u8e3s4.id_1);
    var tmp0_safe_receiver = _this__u8e3s4.display_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_entries_p20ztl_k$();
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator = tmp1_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toVerbEntities.<anonymous>' call
        var tmp0_vlmeLangHash = xxHasher.hash_6htf84_k$(item.get_key_18j28a_k$());
        var tmp1_vlmeEntryString = item.get_value_j01efc_k$();
        var tmp2_vlmeLangCode = item.get_key_18j28a_k$();
        var tmp$ret$0 = new VerbLangMapEntry(verbUid, tmp0_vlmeLangHash, tmp2_vlmeLangCode, tmp1_vlmeEntryString);
        destination.add_utx5q5_k$(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp2_elvis_lhs = tmp_0;
    return new VerbEntities(tmp, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
  }
  function get_VERB_PROGRESSED() {
    return VERB_PROGRESSED;
  }
  var VERB_PROGRESSED;
  function _get_saveStatementOnClearUseCase__82wv86($this) {
    return $this.saveStatementOnClearUseCase_1;
  }
  function _get_saveStatementOnUnloadUseCase__22y24k($this) {
    return $this.saveStatementOnUnloadUseCase_1;
  }
  function _get_xapiStatementResource__4vzu96_0($this) {
    return $this.xapiStatementResource_1;
  }
  function _get_xapiSession__v5zdz1($this) {
    return $this.xapiSession_1;
  }
  function _get_scope__bi2zur_0($this) {
    return $this.scope_1;
  }
  function _get_xapiActivityProvider__1axvhl($this) {
    return $this.xapiActivityProvider_1;
  }
  function _get_learningSpace__h4keh_7($this) {
    return $this.learningSpace_1;
  }
  function _get_totalUsageTime__l9m0pt($this) {
    return $this.totalUsageTime_1;
  }
  function _get_maxProgressPoint__29njxw($this) {
    return $this.maxProgressPoint_1;
  }
  function _get_activeStartTime__mhkifc($this) {
    return $this.activeStartTime_1;
  }
  function _get_isCompleted__gprdlc($this) {
    return $this.isCompleted_1;
  }
  function createXapiStatement($this, totalDuration, progress, isComplete) {
    var tmp = agent($this.xapiSession_1, $this.learningSpace_1);
    var tmp_0;
    if (isComplete === true) {
      tmp_0 = get_VERB_COMPLETED();
    } else {
      tmp_0 = get_VERB_PROGRESSED();
    }
    var tmp_1 = new XapiVerb(tmp_0);
    var tmp_2 = $this.xapiActivityProvider_1();
    // Inline function 'kotlin.time.Companion.milliseconds' call
    Companion_getInstance_24();
    var tmp$ret$0 = toDuration(totalDuration, DurationUnit_MILLISECONDS_getInstance());
    return new XapiStatement(VOID, tmp, tmp_1, tmp_2, new XapiResult(isComplete, VOID, VOID, Duration__toIsoString_impl_9h6wsm(tmp$ret$0), VOID, mapOf_0(to(get_XAPI_RESULT_EXTENSION_PROGRESS(), JsonPrimitive(progress)))));
  }
  function createFinalStatement($this) {
    $this.onActiveChanged_2xtbwa_k$(false);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = $this.totalUsageTime_1;
      while (true) {
        var cur = this_0.get_kotlinx$atomicfu$value_vi2am5_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd = new Long(0, 0);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    var usageDurationVal = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_1 = $this.maxProgressPoint_1;
      while (true) {
        var cur_0 = this_1.get_kotlinx$atomicfu$value_vi2am5_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd_0 = 0;
        if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
          tmp$ret$3 = cur_0;
          break $l$block_0;
        }
      }
    }
    var maxProgressVal = tmp$ret$3;
    return createXapiStatement($this, usageDurationVal, maxProgressVal, false);
  }
  function NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda($active) {
    return function () {
      return 'ContentUsageStatementRecorder: active=' + $active;
    };
  }
  function NonInteractiveContentXapiStatementRecorder$onComplete$lambda() {
    return 'ContentUsageStatementRecorder: completed';
  }
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    this.this$0__1 = this$0;
    this.$usageDurationVal_1 = $usageDurationVal;
    this.$timeSinceActive_1 = $timeSinceActive;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.xapiStatementResource_1.post_c9pbaj_k$(listOf_0(createXapiStatement(this.this$0__1, this.$usageDurationVal_1.plus_r93sks_k$(this.$timeSinceActive_1), 100, true)), this.this$0__1.xapiSession_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this.this$0__1, this.$usageDurationVal_1, this.$timeSinceActive_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NonInteractiveContentXapiStatementRecorder(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, xapiSession, scope, xapiActivityProvider, learningSpace) {
    this.saveStatementOnClearUseCase_1 = saveStatementOnClearUseCase;
    this.saveStatementOnUnloadUseCase_1 = saveStatementOnUnloadUseCase;
    this.xapiStatementResource_1 = xapiStatementResource;
    this.xapiSession_1 = xapiSession;
    this.scope_1 = scope;
    this.xapiActivityProvider_1 = xapiActivityProvider;
    this.learningSpace_1 = learningSpace;
    this.totalUsageTime_1 = atomic$long$1(new Long(0, 0));
    this.maxProgressPoint_1 = atomic$int$1(0);
    this.activeStartTime_1 = atomic$long$1(new Long(0, 0));
    this.isCompleted_1 = atomic$boolean$1(false);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder).onActiveChanged_2xtbwa_k$ = function (active) {
    var tmp = Napier_getInstance();
    tmp.v$default_i2q2w7_k$(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda(active));
    if (active) {
      $l$block: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_0 = this.activeStartTime_1;
        while (true) {
          var cur = this_0.get_kotlinx$atomicfu$value_vi2am5_k$();
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd = cur.equals(new Long(0, 0)) ? systemTimeInMillis() : cur;
          if (this_0.atomicfu$compareAndSet(cur, upd)) {
            break $l$block;
          }
        }
      }
    } else {
      var tmp$ret$3;
      $l$block_0: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_1 = this.activeStartTime_1;
        while (true) {
          var cur_0 = this_1.get_kotlinx$atomicfu$value_vi2am5_k$();
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd_0 = new Long(0, 0);
          if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
            tmp$ret$3 = cur_0;
            break $l$block_0;
          }
        }
      }
      var activeStarted = tmp$ret$3;
      if (!activeStarted.equals(new Long(0, 0))) {
        $l$block_1: {
          // Inline function 'kotlinx.atomicfu.update' call
          var this_2 = this.totalUsageTime_1;
          while (true) {
            var cur_1 = this_2.get_kotlinx$atomicfu$value_vi2am5_k$();
            // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
            var upd_1 = cur_1.plus_r93sks_k$(systemTimeInMillis().minus_mfbszm_k$(activeStarted));
            if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
              break $l$block_1;
            }
          }
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).onProgressed_kt9krh_k$ = function (progress) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.maxProgressPoint_1;
      while (true) {
        var cur = this_0.get_kotlinx$atomicfu$value_vi2am5_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onProgressed.<anonymous>' call
        // Inline function 'kotlin.comparisons.maxOf' call
        var upd = Math.max(cur, progress);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).onComplete_npiz6l_k$ = function (oneCompletionStatementOnly) {
    var tmp = Napier_getInstance();
    tmp.v$default_i2q2w7_k$(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$lambda);
    var tmp_0;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = this.isCompleted_1;
      while (true) {
        var cur = this_0.get_kotlinx$atomicfu$value_vi2am5_k$();
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
        var upd = true;
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    if (!tmp$ret$1) {
      tmp_0 = true;
    } else {
      tmp_0 = !oneCompletionStatementOnly;
    }
    if (tmp_0) {
      var tmp$ret$3;
      $l$block_0: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_1 = this.totalUsageTime_1;
        while (true) {
          var cur_0 = this_1.get_kotlinx$atomicfu$value_vi2am5_k$();
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_0 = new Long(0, 0);
          if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
            tmp$ret$3 = cur_0;
            break $l$block_0;
          }
        }
      }
      var usageDurationVal = tmp$ret$3;
      var tmp$ret$5;
      $l$block_1: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_2 = this.activeStartTime_1;
        while (true) {
          var cur_1 = this_2.get_kotlinx$atomicfu$value_vi2am5_k$();
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_1 = new Long(0, 0);
          if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
            tmp$ret$5 = cur_1;
            break $l$block_1;
          }
        }
      }
      var activeStartTimeVal = tmp$ret$5;
      var tmp_1;
      if (!activeStartTimeVal.equals(new Long(0, 0))) {
        tmp_1 = systemTimeInMillis().minus_mfbszm_k$(activeStartTimeVal);
      } else {
        tmp_1 = new Long(0, 0);
      }
      var timeSinceActive = tmp_1;
      $l$block_2: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_3 = this.maxProgressPoint_1;
        while (true) {
          var cur_2 = this_3.get_kotlinx$atomicfu$value_vi2am5_k$();
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_2 = 0;
          if (this_3.atomicfu$compareAndSet(cur_2, upd_2)) {
            break $l$block_2;
          }
        }
      }
      launch(this.scope_1, VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this, usageDurationVal, timeSinceActive, null));
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).onComplete$default_7yl2qi_k$ = function (oneCompletionStatementOnly, $super) {
    oneCompletionStatementOnly = oneCompletionStatementOnly === VOID ? false : oneCompletionStatementOnly;
    var tmp;
    if ($super === VOID) {
      this.onComplete_npiz6l_k$(oneCompletionStatementOnly);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.onComplete_npiz6l_k$.call(this, oneCompletionStatementOnly);
    }
    return tmp;
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).onCleared_hwiuwz_k$ = function () {
    this.saveStatementOnClearUseCase_1.invoke_w4zz4a_k$(listOf_0(createFinalStatement(this)), this.xapiSession_1);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).onUnload_ku21hu_k$ = function () {
    var tmp0_safe_receiver = this.saveStatementOnUnloadUseCase_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.invoke_w4zz4a_k$(listOf_0(createFinalStatement(this)), this.xapiSession_1);
    }
  };
  function _get_saveStatementOnClearUseCase__82wv86_0($this) {
    return $this.saveStatementOnClearUseCase_1;
  }
  function _get_saveStatementOnUnloadUseCase__22y24k_0($this) {
    return $this.saveStatementOnUnloadUseCase_1;
  }
  function _get_xapiStatementResource__4vzu96_1($this) {
    return $this.xapiStatementResource_1;
  }
  function _get_learningSpace__h4keh_8($this) {
    return $this.learningSpace_1;
  }
  function NonInteractiveContentXapiStatementRecorderFactory(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, learningSpace) {
    this.saveStatementOnClearUseCase_1 = saveStatementOnClearUseCase;
    this.saveStatementOnUnloadUseCase_1 = saveStatementOnUnloadUseCase;
    this.xapiStatementResource_1 = xapiStatementResource;
    this.learningSpace_1 = learningSpace;
  }
  protoOf(NonInteractiveContentXapiStatementRecorderFactory).newStatementRecorder_5pkgkx_k$ = function (xapiSession, scope, xapiActivityProvider) {
    return new NonInteractiveContentXapiStatementRecorder(this.saveStatementOnClearUseCase_1, this.saveStatementOnUnloadUseCase_1, this.xapiStatementResource_1, xapiSession, scope, xapiActivityProvider, this.learningSpace_1);
  };
  function Companion_81() {
    Companion_instance_81 = this;
    this.KEY_LEARNINGSPACE_1 = 'endpoint';
    this.KEY_STATEMENTS_1 = 'statements';
    this.KEY_XAPI_SESSION_1 = 'xapiSession';
  }
  protoOf(Companion_81).get_KEY_LEARNINGSPACE_txas4f_k$ = function () {
    return this.KEY_LEARNINGSPACE_1;
  };
  protoOf(Companion_81).get_KEY_STATEMENTS_5rat5f_k$ = function () {
    return this.KEY_STATEMENTS_1;
  };
  protoOf(Companion_81).get_KEY_XAPI_SESSION_56bm1q_k$ = function () {
    return this.KEY_XAPI_SESSION_1;
  };
  var Companion_instance_81;
  function Companion_getInstance_142() {
    if (Companion_instance_81 == null)
      new Companion_81();
    return Companion_instance_81;
  }
  function SaveStatementOnClearUseCase() {
  }
  function SaveStatementOnUnloadUseCase() {
  }
  function ContainerStorageDir(dirUri, name, usableSpace, removableMedia) {
    name = name === VOID ? null : name;
    usableSpace = usableSpace === VOID ? new Long(-1, -1) : usableSpace;
    removableMedia = removableMedia === VOID ? false : removableMedia;
    this.dirUri_1 = dirUri;
    this.name_1 = name;
    this.usableSpace_1 = usableSpace;
    this.removableMedia_1 = removableMedia;
  }
  protoOf(ContainerStorageDir).set_dirUri_ryiar6_k$ = function (_set____db54di) {
    this.dirUri_1 = _set____db54di;
  };
  protoOf(ContainerStorageDir).get_dirUri_cdzbmw_k$ = function () {
    return this.dirUri_1;
  };
  protoOf(ContainerStorageDir).set_name_wkmnld_k$ = function (_set____db54di) {
    this.name_1 = _set____db54di;
  };
  protoOf(ContainerStorageDir).get_name_woqyms_k$ = function () {
    return this.name_1;
  };
  protoOf(ContainerStorageDir).set_usableSpace_amjlbh_k$ = function (_set____db54di) {
    this.usableSpace_1 = _set____db54di;
  };
  protoOf(ContainerStorageDir).get_usableSpace_4g3kvv_k$ = function () {
    return this.usableSpace_1;
  };
  protoOf(ContainerStorageDir).set_removableMedia_tfnooh_k$ = function (_set____db54di) {
    this.removableMedia_1 = _set____db54di;
  };
  protoOf(ContainerStorageDir).get_removableMedia_wmx1ke_k$ = function () {
    return this.removableMedia_1;
  };
  function UstadMobileConstants() {
    UstadMobileConstants_instance = this;
    this.UTF8__1 = 'UTF-8';
    this.LOCALE_CODE_1 = 0;
    this.UTC_1 = 'UTC';
    this.LANGUAGE_NAMES_1 = mapOf([to('en', 'English'), to('tg', '\u0422\u043E\u04B7\u0438\u043A\u04E3'), to('ps', '\u067E\u069A\u062A\u0648'), to('fa', '\u062F\u0631\u06CC'), to('ar', '\u0627\u0644\u0639\u0631\u0628\u064A\u0629'), to('bn', '\u09AC\u09BE\u0982\u09B2\u09BE'), to('ne', '\u0928\u0947\u092A\u093E\u0932\u0940'), to('my', '\u1019\u103C\u1014\u103A\u1019\u102C\u1005\u102C'), to('ru', '\u0420\u0443\u0441\u0441\u043A\u0438\u0439'), to('rw', 'Kinyarwanda')]);
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.RTL_LANGUAGES_1 = ['ar', 'arc', 'dv', 'fa', 'ha', 'he', 'khw', 'ks', 'ku', 'ps', 'ur', 'yi'];
    this.MINOR_AGE_THRESHOLD_1 = 13;
    this.ADULT_AGE_THRESHOLD_1 = 18;
    this.PBKDF2_ITERATIONS_1 = 10000;
    this.PBKDF2_KEYLENGTH_1 = 512;
  }
  protoOf(UstadMobileConstants).get_UTF8_woapcq_k$ = function () {
    return this.UTF8__1;
  };
  protoOf(UstadMobileConstants).get_LOCALE_CODE_al83m1_k$ = function () {
    return this.LOCALE_CODE_1;
  };
  protoOf(UstadMobileConstants).get_UTC_18jizp_k$ = function () {
    return this.UTC_1;
  };
  protoOf(UstadMobileConstants).get_LANGUAGE_NAMES_e2bibu_k$ = function () {
    return this.LANGUAGE_NAMES_1;
  };
  protoOf(UstadMobileConstants).get_RTL_LANGUAGES_gr3pwj_k$ = function () {
    return this.RTL_LANGUAGES_1;
  };
  protoOf(UstadMobileConstants).get_MINOR_AGE_THRESHOLD_42rq6w_k$ = function () {
    return this.MINOR_AGE_THRESHOLD_1;
  };
  protoOf(UstadMobileConstants).get_ADULT_AGE_THRESHOLD_b8gxur_k$ = function () {
    return this.ADULT_AGE_THRESHOLD_1;
  };
  protoOf(UstadMobileConstants).get_PBKDF2_ITERATIONS_36o6wb_k$ = function () {
    return this.PBKDF2_ITERATIONS_1;
  };
  protoOf(UstadMobileConstants).get_PBKDF2_KEYLENGTH_kg0lp6_k$ = function () {
    return this.PBKDF2_KEYLENGTH_1;
  };
  var UstadMobileConstants_instance;
  function UstadMobileConstants_getInstance() {
    if (UstadMobileConstants_instance == null)
      new UstadMobileConstants();
    return UstadMobileConstants_instance;
  }
  function Companion_82() {
    Companion_instance_82 = this;
    this.Default_1 = new UstadGoOptions(null, false);
  }
  protoOf(Companion_82).get_Default_goqax4_k$ = function () {
    return this.Default_1;
  };
  var Companion_instance_82;
  function Companion_getInstance_143() {
    if (Companion_instance_82 == null)
      new Companion_82();
    return Companion_instance_82;
  }
  function _get_MIME_TYPES__dhhkcj($this) {
    return $this.MIME_TYPES_1;
  }
  function _get_MIME_TYPES_REVERSE__p835gm($this) {
    return $this.MIME_TYPES_REVERSE_1;
  }
  function _get_DEFAULT_CONTENT_DIR_NAME__7g665y($this) {
    return $this.DEFAULT_CONTENT_DIR_NAME_1;
  }
  function _get_settings__lbkut4_2($this) {
    return $this.settings_1;
  }
  function LastGoToDest(viewName, args) {
    this.viewName_1 = viewName;
    this.args_1 = args;
  }
  protoOf(LastGoToDest).get_viewName_c12mav_k$ = function () {
    return this.viewName_1;
  };
  protoOf(LastGoToDest).get_args_woj09y_k$ = function () {
    return this.args_1;
  };
  protoOf(LastGoToDest).component1_7eebsc_k$ = function () {
    return this.viewName_1;
  };
  protoOf(LastGoToDest).component2_7eebsb_k$ = function () {
    return this.args_1;
  };
  protoOf(LastGoToDest).copy_gkq1y6_k$ = function (viewName, args) {
    return new LastGoToDest(viewName, args);
  };
  protoOf(LastGoToDest).copy$default_sc56sz_k$ = function (viewName, args, $super) {
    viewName = viewName === VOID ? this.viewName_1 : viewName;
    args = args === VOID ? this.args_1 : args;
    return $super === VOID ? this.copy_gkq1y6_k$(viewName, args) : $super.copy_gkq1y6_k$.call(this, viewName, args);
  };
  protoOf(LastGoToDest).toString = function () {
    return 'LastGoToDest(viewName=' + this.viewName_1 + ', args=' + this.args_1 + ')';
  };
  protoOf(LastGoToDest).hashCode = function () {
    var result = getStringHashCode(this.viewName_1);
    result = imul(result, 31) + hashCode(this.args_1) | 0;
    return result;
  };
  protoOf(LastGoToDest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LastGoToDest))
      return false;
    var tmp0_other_with_cast = other instanceof LastGoToDest ? other : THROW_CCE();
    if (!(this.viewName_1 === tmp0_other_with_cast.viewName_1))
      return false;
    if (!equals(this.args_1, tmp0_other_with_cast.args_1))
      return false;
    return true;
  };
  function UstadGoOptions(popUpToViewName, popUpToInclusive, clearStack, serializer) {
    Companion_getInstance_143();
    popUpToViewName = popUpToViewName === VOID ? null : popUpToViewName;
    popUpToInclusive = popUpToInclusive === VOID ? false : popUpToInclusive;
    clearStack = clearStack === VOID ? false : clearStack;
    serializer = serializer === VOID ? null : serializer;
    this.popUpToViewName_1 = popUpToViewName;
    this.popUpToInclusive_1 = popUpToInclusive;
    this.clearStack_1 = clearStack;
    this.serializer_1 = serializer;
  }
  protoOf(UstadGoOptions).get_popUpToViewName_t8l7rm_k$ = function () {
    return this.popUpToViewName_1;
  };
  protoOf(UstadGoOptions).get_popUpToInclusive_ijgaa6_k$ = function () {
    return this.popUpToInclusive_1;
  };
  protoOf(UstadGoOptions).get_clearStack_wh5e0s_k$ = function () {
    return this.clearStack_1;
  };
  protoOf(UstadGoOptions).get_serializer_u29zhh_k$ = function () {
    return this.serializer_1;
  };
  protoOf(UstadGoOptions).component1_7eebsc_k$ = function () {
    return this.popUpToViewName_1;
  };
  protoOf(UstadGoOptions).component2_7eebsb_k$ = function () {
    return this.popUpToInclusive_1;
  };
  protoOf(UstadGoOptions).component3_7eebsa_k$ = function () {
    return this.clearStack_1;
  };
  protoOf(UstadGoOptions).component4_7eebs9_k$ = function () {
    return this.serializer_1;
  };
  protoOf(UstadGoOptions).copy_yjhew7_k$ = function (popUpToViewName, popUpToInclusive, clearStack, serializer) {
    return new UstadGoOptions(popUpToViewName, popUpToInclusive, clearStack, serializer);
  };
  protoOf(UstadGoOptions).copy$default_eky3wk_k$ = function (popUpToViewName, popUpToInclusive, clearStack, serializer, $super) {
    popUpToViewName = popUpToViewName === VOID ? this.popUpToViewName_1 : popUpToViewName;
    popUpToInclusive = popUpToInclusive === VOID ? this.popUpToInclusive_1 : popUpToInclusive;
    clearStack = clearStack === VOID ? this.clearStack_1 : clearStack;
    serializer = serializer === VOID ? this.serializer_1 : serializer;
    return $super === VOID ? this.copy_yjhew7_k$(popUpToViewName, popUpToInclusive, clearStack, serializer) : $super.copy_yjhew7_k$.call(this, popUpToViewName, popUpToInclusive, clearStack, serializer);
  };
  protoOf(UstadGoOptions).toString = function () {
    return 'UstadGoOptions(popUpToViewName=' + this.popUpToViewName_1 + ', popUpToInclusive=' + this.popUpToInclusive_1 + ', clearStack=' + this.clearStack_1 + ', serializer=' + this.serializer_1 + ')';
  };
  protoOf(UstadGoOptions).hashCode = function () {
    var result = this.popUpToViewName_1 == null ? 0 : getStringHashCode(this.popUpToViewName_1);
    result = imul(result, 31) + getBooleanHashCode(this.popUpToInclusive_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.clearStack_1) | 0;
    result = imul(result, 31) + (this.serializer_1 == null ? 0 : hashCode(this.serializer_1)) | 0;
    return result;
  };
  protoOf(UstadGoOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadGoOptions))
      return false;
    var tmp0_other_with_cast = other instanceof UstadGoOptions ? other : THROW_CCE();
    if (!(this.popUpToViewName_1 == tmp0_other_with_cast.popUpToViewName_1))
      return false;
    if (!(this.popUpToInclusive_1 === tmp0_other_with_cast.popUpToInclusive_1))
      return false;
    if (!(this.clearStack_1 === tmp0_other_with_cast.clearStack_1))
      return false;
    if (!equals(this.serializer_1, tmp0_other_with_cast.serializer_1))
      return false;
    return true;
  };
  function UiLanguage(langCode, langDisplay) {
    this.langCode_1 = langCode;
    this.langDisplay_1 = langDisplay;
  }
  protoOf(UiLanguage).get_langCode_ciluis_k$ = function () {
    return this.langCode_1;
  };
  protoOf(UiLanguage).get_langDisplay_ah0t4l_k$ = function () {
    return this.langDisplay_1;
  };
  protoOf(UiLanguage).component1_7eebsc_k$ = function () {
    return this.langCode_1;
  };
  protoOf(UiLanguage).component2_7eebsb_k$ = function () {
    return this.langDisplay_1;
  };
  protoOf(UiLanguage).copy_plwnsl_k$ = function (langCode, langDisplay) {
    return new UiLanguage(langCode, langDisplay);
  };
  protoOf(UiLanguage).copy$default_keruq5_k$ = function (langCode, langDisplay, $super) {
    langCode = langCode === VOID ? this.langCode_1 : langCode;
    langDisplay = langDisplay === VOID ? this.langDisplay_1 : langDisplay;
    return $super === VOID ? this.copy_plwnsl_k$(langCode, langDisplay) : $super.copy_plwnsl_k$.call(this, langCode, langDisplay);
  };
  protoOf(UiLanguage).toString = function () {
    return 'UiLanguage(langCode=' + this.langCode_1 + ', langDisplay=' + this.langDisplay_1 + ')';
  };
  protoOf(UiLanguage).hashCode = function () {
    var result = getStringHashCode(this.langCode_1);
    result = imul(result, 31) + getStringHashCode(this.langDisplay_1) | 0;
    return result;
  };
  protoOf(UiLanguage).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UiLanguage))
      return false;
    var tmp0_other_with_cast = other instanceof UiLanguage ? other : THROW_CCE();
    if (!(this.langCode_1 === tmp0_other_with_cast.langCode_1))
      return false;
    if (!(this.langDisplay_1 === tmp0_other_with_cast.langDisplay_1))
      return false;
    return true;
  };
  function Companion_83() {
    Companion_instance_83 = this;
    this.MIME_TYPES_1 = mapOf([to('image/jpg', 'jpg'), to('image/jpg', 'jpg'), to('image/jpeg', 'jpg'), to('image/png', 'png'), to('image/gif', 'gif'), to('image/svg', 'svg'), to('application/epub+zip', 'epub')]);
    var tmp = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_0 = this.MIME_TYPES_1.get_entries_p20ztl_k$();
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination = LinkedHashMap_init_$Create$(capacity);
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp_0 = element.get_value_j01efc_k$();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp$ret$1 = element.get_key_18j28a_k$();
      destination.put_4fpzoq_k$(tmp_0, tmp$ret$1);
    }
    tmp.MIME_TYPES_REVERSE_1 = destination;
    this.DEFAULT_CONTENT_DIR_NAME_1 = 'ustadmobileContent';
    this.LOCALE_USE_SYSTEM_1 = '';
    this.PREFKEY_LOCALE = 'locale';
    this.USER_RESOURCE_1 = 2;
    this.SHARED_RESOURCE_1 = 4;
    this.ARG_REFERRER_1 = 'ref';
    this.GO_FLAG_CLEAR_TOP_1 = 67108864;
    this.TAG_DOWNLOAD_ENABLED_1 = 'dlenabled';
    this.TAG_MAIN_COROUTINE_CONTEXT_1 = 16;
    this.TAG_DLMGR_SINGLETHREAD_CONTEXT_1 = 32;
    this.TAG_LOCAL_HTTP_PORT_1 = 64;
    this.LINK_INTENT_FILTER_1 = 'umclient';
    this.LINK_ENDPOINT_VIEWNAME_DIVIDER_1 = '/umapp/#/';
    this.SUBDIR_SITEDATA_NAME_1 = 'sitedata';
    this.SUBDIR_CONTAINER_NAME_1 = 'container';
    this.SUBDIR_ATTACHMENTS_NAME_1 = 'attachments';
    this.PREF_ROOT_VIEWNAME_1 = 'rootViewName';
    this.TAG_CLIENT_ID_1 = 'client_id';
  }
  protoOf(Companion_83).get_LOCALE_USE_SYSTEM_x167q5_k$ = function () {
    return this.LOCALE_USE_SYSTEM_1;
  };
  protoOf(Companion_83).get_PREFKEY_LOCALE_2pkona_k$ = function () {
    return this.PREFKEY_LOCALE;
  };
  protoOf(Companion_83).get_USER_RESOURCE_cdibq1_k$ = function () {
    return this.USER_RESOURCE_1;
  };
  protoOf(Companion_83).get_SHARED_RESOURCE_reh8lb_k$ = function () {
    return this.SHARED_RESOURCE_1;
  };
  protoOf(Companion_83).get_ARG_REFERRER_z9cswh_k$ = function () {
    return this.ARG_REFERRER_1;
  };
  protoOf(Companion_83).get_GO_FLAG_CLEAR_TOP_iay0ki_k$ = function () {
    return this.GO_FLAG_CLEAR_TOP_1;
  };
  protoOf(Companion_83).get_TAG_DOWNLOAD_ENABLED_2541js_k$ = function () {
    return this.TAG_DOWNLOAD_ENABLED_1;
  };
  protoOf(Companion_83).get_TAG_MAIN_COROUTINE_CONTEXT_t97jtc_k$ = function () {
    return this.TAG_MAIN_COROUTINE_CONTEXT_1;
  };
  protoOf(Companion_83).get_TAG_DLMGR_SINGLETHREAD_CONTEXT_m5k9oh_k$ = function () {
    return this.TAG_DLMGR_SINGLETHREAD_CONTEXT_1;
  };
  protoOf(Companion_83).get_TAG_LOCAL_HTTP_PORT_qcl9rq_k$ = function () {
    return this.TAG_LOCAL_HTTP_PORT_1;
  };
  protoOf(Companion_83).get_LINK_INTENT_FILTER_2dvofz_k$ = function () {
    return this.LINK_INTENT_FILTER_1;
  };
  protoOf(Companion_83).get_LINK_ENDPOINT_VIEWNAME_DIVIDER_ggr3u0_k$ = function () {
    return this.LINK_ENDPOINT_VIEWNAME_DIVIDER_1;
  };
  protoOf(Companion_83).get_SUBDIR_SITEDATA_NAME_zbw0pc_k$ = function () {
    return this.SUBDIR_SITEDATA_NAME_1;
  };
  protoOf(Companion_83).get_SUBDIR_CONTAINER_NAME_mvzary_k$ = function () {
    return this.SUBDIR_CONTAINER_NAME_1;
  };
  protoOf(Companion_83).get_SUBDIR_ATTACHMENTS_NAME_t87ial_k$ = function () {
    return this.SUBDIR_ATTACHMENTS_NAME_1;
  };
  protoOf(Companion_83).get_PREF_ROOT_VIEWNAME_d31d5m_k$ = function () {
    return this.PREF_ROOT_VIEWNAME_1;
  };
  protoOf(Companion_83).get_TAG_CLIENT_ID_oz0rj5_k$ = function () {
    return this.TAG_CLIENT_ID_1;
  };
  var Companion_instance_83;
  function Companion_getInstance_144() {
    if (Companion_instance_83 == null)
      new Companion_83();
    return Companion_instance_83;
  }
  function UstadMobileSystemCommon(settings, langConfig) {
    Companion_getInstance_144();
    this.settings_1 = settings;
    this.langConfig_1 = langConfig;
    this.lastDestination_1 = null;
  }
  protoOf(UstadMobileSystemCommon).get_langConfig_ohcymx_k$ = function () {
    return this.langConfig_1;
  };
  protoOf(UstadMobileSystemCommon).set_lastDestination_6niqfn_k$ = function (_set____db54di) {
    this.lastDestination_1 = _set____db54di;
  };
  protoOf(UstadMobileSystemCommon).get_lastDestination_irpb2p_k$ = function () {
    return this.lastDestination_1;
  };
  protoOf(UstadMobileSystemCommon).getDefaultFirstDest_7opaxz_k$ = function () {
    return Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$();
  };
  protoOf(UstadMobileSystemCommon).go_oylwg1_k$ = function (viewName, args, context) {
    this.go(viewName, args, context, 0, new UstadGoOptions(null, false));
  };
  protoOf(UstadMobileSystemCommon).go_cxvgfg_k$ = function (viewName, args, context, ustadGoOptions) {
    this.go(viewName, args, context, 0, ustadGoOptions);
  };
  protoOf(UstadMobileSystemCommon).getDayOfWeekStrings_62j2s1_k$ = function () {
    // Inline function 'kotlin.collections.associateWith' call
    var this_0 = values();
    var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(this_0.length), 16));
    // Inline function 'kotlin.collections.associateWithTo' call
    var inductionVariable = 0;
    var last = this_0.length;
    while (inductionVariable < last) {
      var element = this_0[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.impl.UstadMobileSystemCommon.getDayOfWeekStrings.<anonymous>' call
      var tmp$ret$0 = this.getString_a9yhoi_k$(get_dayStringResource(element));
      result.put_4fpzoq_k$(element, tmp$ret$0);
    }
    return result;
  };
  protoOf(UstadMobileSystemCommon).getMimeTypeFromExtension_gym021_k$ = function (extension) {
    return Companion_getInstance_144().MIME_TYPES_REVERSE_1.containsKey_aw81wo_k$(extension) ? Companion_getInstance_144().MIME_TYPES_REVERSE_1.get_wei43m_k$(extension) : null;
  };
  protoOf(UstadMobileSystemCommon).getExtensionFromMimeType_dff7hj_k$ = function (mimeType) {
    var tmp;
    if (Companion_getInstance_144().MIME_TYPES_1.containsKey_aw81wo_k$(mimeType)) {
      tmp = Companion_getInstance_144().MIME_TYPES_1.get_wei43m_k$(mimeType);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UstadMobileSystemCommon).openFileInDefaultViewer$default_1th90o_k$ = function (context, doorUri, mimeType, fileName, $super) {
    fileName = fileName === VOID ? null : fileName;
    var tmp;
    if ($super === VOID) {
      this.openFileInDefaultViewer_7fucpv_k$(context, doorUri, mimeType, fileName);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.openFileInDefaultViewer_7fucpv_k$.call(this, context, doorUri, mimeType, fileName);
    }
    return tmp;
  };
  function ActionBarButtonUiState$_init_$lambda_4nqccj() {
    return Unit_getInstance();
  }
  function ActionBarButtonUiState(visible, text, enabled, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    enabled = enabled === VOID ? true : enabled;
    var tmp;
    if (onClick === VOID) {
      tmp = ActionBarButtonUiState$_init_$lambda_4nqccj;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.visible_1 = visible;
    this.text_1 = text;
    this.enabled_1 = enabled;
    this.onClick_1 = onClick;
  }
  protoOf(ActionBarButtonUiState).get_visible_8zfvk9_k$ = function () {
    return this.visible_1;
  };
  protoOf(ActionBarButtonUiState).get_text_wouvsm_k$ = function () {
    return this.text_1;
  };
  protoOf(ActionBarButtonUiState).get_enabled_pcr8o8_k$ = function () {
    return this.enabled_1;
  };
  protoOf(ActionBarButtonUiState).get_onClick_l3c0lc_k$ = function () {
    return this.onClick_1;
  };
  protoOf(ActionBarButtonUiState).component1_7eebsc_k$ = function () {
    return this.visible_1;
  };
  protoOf(ActionBarButtonUiState).component2_7eebsb_k$ = function () {
    return this.text_1;
  };
  protoOf(ActionBarButtonUiState).component3_7eebsa_k$ = function () {
    return this.enabled_1;
  };
  protoOf(ActionBarButtonUiState).component4_7eebs9_k$ = function () {
    return this.onClick_1;
  };
  protoOf(ActionBarButtonUiState).copy_cf391w_k$ = function (visible, text, enabled, onClick) {
    return new ActionBarButtonUiState(visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).copy$default_km9zbw_k$ = function (visible, text, enabled, onClick, $super) {
    visible = visible === VOID ? this.visible_1 : visible;
    text = text === VOID ? this.text_1 : text;
    enabled = enabled === VOID ? this.enabled_1 : enabled;
    onClick = onClick === VOID ? this.onClick_1 : onClick;
    return $super === VOID ? this.copy_cf391w_k$(visible, text, enabled, onClick) : $super.copy_cf391w_k$.call(this, visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).toString = function () {
    return 'ActionBarButtonUiState(visible=' + this.visible_1 + ', text=' + this.text_1 + ', enabled=' + this.enabled_1 + ', onClick=' + this.onClick_1 + ')';
  };
  protoOf(ActionBarButtonUiState).hashCode = function () {
    var result = getBooleanHashCode(this.visible_1);
    result = imul(result, 31) + (this.text_1 == null ? 0 : getStringHashCode(this.text_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.enabled_1) | 0;
    result = imul(result, 31) + hashCode(this.onClick_1) | 0;
    return result;
  };
  protoOf(ActionBarButtonUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActionBarButtonUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ActionBarButtonUiState ? other : THROW_CCE();
    if (!(this.visible_1 === tmp0_other_with_cast.visible_1))
      return false;
    if (!(this.text_1 == tmp0_other_with_cast.text_1))
      return false;
    if (!(this.enabled_1 === tmp0_other_with_cast.enabled_1))
      return false;
    if (!equals(this.onClick_1, tmp0_other_with_cast.onClick_1))
      return false;
    return true;
  };
  function AppActionButton(icon, contentDescription, onClick, id) {
    this.icon_1 = icon;
    this.contentDescription_1 = contentDescription;
    this.onClick_1 = onClick;
    this.id_1 = id;
  }
  protoOf(AppActionButton).get_icon_wont8i_k$ = function () {
    return this.icon_1;
  };
  protoOf(AppActionButton).get_contentDescription_5hs85o_k$ = function () {
    return this.contentDescription_1;
  };
  protoOf(AppActionButton).get_onClick_l3c0lc_k$ = function () {
    return this.onClick_1;
  };
  protoOf(AppActionButton).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(AppActionButton).component1_7eebsc_k$ = function () {
    return this.icon_1;
  };
  protoOf(AppActionButton).component2_7eebsb_k$ = function () {
    return this.contentDescription_1;
  };
  protoOf(AppActionButton).component3_7eebsa_k$ = function () {
    return this.onClick_1;
  };
  protoOf(AppActionButton).component4_7eebs9_k$ = function () {
    return this.id_1;
  };
  protoOf(AppActionButton).copy_skb0rj_k$ = function (icon, contentDescription, onClick, id) {
    return new AppActionButton(icon, contentDescription, onClick, id);
  };
  protoOf(AppActionButton).copy$default_pcn5o_k$ = function (icon, contentDescription, onClick, id, $super) {
    icon = icon === VOID ? this.icon_1 : icon;
    contentDescription = contentDescription === VOID ? this.contentDescription_1 : contentDescription;
    onClick = onClick === VOID ? this.onClick_1 : onClick;
    id = id === VOID ? this.id_1 : id;
    return $super === VOID ? this.copy_skb0rj_k$(icon, contentDescription, onClick, id) : $super.copy_skb0rj_k$.call(this, icon, contentDescription, onClick, id);
  };
  protoOf(AppActionButton).toString = function () {
    return 'AppActionButton(icon=' + this.icon_1 + ', contentDescription=' + this.contentDescription_1 + ', onClick=' + this.onClick_1 + ', id=' + this.id_1 + ')';
  };
  protoOf(AppActionButton).hashCode = function () {
    var result = this.icon_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.contentDescription_1) | 0;
    result = imul(result, 31) + hashCode(this.onClick_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.id_1) | 0;
    return result;
  };
  protoOf(AppActionButton).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppActionButton))
      return false;
    var tmp0_other_with_cast = other instanceof AppActionButton ? other : THROW_CCE();
    if (!this.icon_1.equals(tmp0_other_with_cast.icon_1))
      return false;
    if (!(this.contentDescription_1 === tmp0_other_with_cast.contentDescription_1))
      return false;
    if (!equals(this.onClick_1, tmp0_other_with_cast.onClick_1))
      return false;
    if (!(this.id_1 === tmp0_other_with_cast.id_1))
      return false;
    return true;
  };
  var AppBarColors_STANDARD_instance;
  var AppBarColors_SELECTION_MODE_instance;
  function values_6() {
    return [AppBarColors_STANDARD_getInstance(), AppBarColors_SELECTION_MODE_getInstance()];
  }
  function valueOf_5(value) {
    switch (value) {
      case 'STANDARD':
        return AppBarColors_STANDARD_getInstance();
      case 'SELECTION_MODE':
        return AppBarColors_SELECTION_MODE_getInstance();
      default:
        AppBarColors_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_5() {
    if ($ENTRIES_5 == null)
      $ENTRIES_5 = enumEntries(values_6());
    return $ENTRIES_5;
  }
  var AppBarColors_entriesInitialized;
  function AppBarColors_initEntries() {
    if (AppBarColors_entriesInitialized)
      return Unit_getInstance();
    AppBarColors_entriesInitialized = true;
    AppBarColors_STANDARD_instance = new AppBarColors('STANDARD', 0);
    AppBarColors_SELECTION_MODE_instance = new AppBarColors('SELECTION_MODE', 1);
  }
  var $ENTRIES_5;
  function AppBarColors(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppBarColors_STANDARD_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_STANDARD_instance;
  }
  function AppBarColors_SELECTION_MODE_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_SELECTION_MODE_instance;
  }
  function AppBarSearchUiState$_init_$lambda_rwjni0(it) {
    return Unit_getInstance();
  }
  function AppBarSearchUiState(visible, searchText, onSearchTextChanged) {
    visible = visible === VOID ? false : visible;
    searchText = searchText === VOID ? '' : searchText;
    var tmp;
    if (onSearchTextChanged === VOID) {
      tmp = AppBarSearchUiState$_init_$lambda_rwjni0;
    } else {
      tmp = onSearchTextChanged;
    }
    onSearchTextChanged = tmp;
    this.visible_1 = visible;
    this.searchText_1 = searchText;
    this.onSearchTextChanged_1 = onSearchTextChanged;
  }
  protoOf(AppBarSearchUiState).get_visible_8zfvk9_k$ = function () {
    return this.visible_1;
  };
  protoOf(AppBarSearchUiState).get_searchText_vx8z2a_k$ = function () {
    return this.searchText_1;
  };
  protoOf(AppBarSearchUiState).get_onSearchTextChanged_j17zih_k$ = function () {
    return this.onSearchTextChanged_1;
  };
  protoOf(AppBarSearchUiState).component1_7eebsc_k$ = function () {
    return this.visible_1;
  };
  protoOf(AppBarSearchUiState).component2_7eebsb_k$ = function () {
    return this.searchText_1;
  };
  protoOf(AppBarSearchUiState).component3_7eebsa_k$ = function () {
    return this.onSearchTextChanged_1;
  };
  protoOf(AppBarSearchUiState).copy_tlpd67_k$ = function (visible, searchText, onSearchTextChanged) {
    return new AppBarSearchUiState(visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).copy$default_26m90z_k$ = function (visible, searchText, onSearchTextChanged, $super) {
    visible = visible === VOID ? this.visible_1 : visible;
    searchText = searchText === VOID ? this.searchText_1 : searchText;
    onSearchTextChanged = onSearchTextChanged === VOID ? this.onSearchTextChanged_1 : onSearchTextChanged;
    return $super === VOID ? this.copy_tlpd67_k$(visible, searchText, onSearchTextChanged) : $super.copy_tlpd67_k$.call(this, visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).toString = function () {
    return 'AppBarSearchUiState(visible=' + this.visible_1 + ', searchText=' + this.searchText_1 + ', onSearchTextChanged=' + this.onSearchTextChanged_1 + ')';
  };
  protoOf(AppBarSearchUiState).hashCode = function () {
    var result = getBooleanHashCode(this.visible_1);
    result = imul(result, 31) + getStringHashCode(this.searchText_1) | 0;
    result = imul(result, 31) + hashCode(this.onSearchTextChanged_1) | 0;
    return result;
  };
  protoOf(AppBarSearchUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppBarSearchUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppBarSearchUiState ? other : THROW_CCE();
    if (!(this.visible_1 === tmp0_other_with_cast.visible_1))
      return false;
    if (!(this.searchText_1 === tmp0_other_with_cast.searchText_1))
      return false;
    if (!equals(this.onSearchTextChanged_1, tmp0_other_with_cast.onSearchTextChanged_1))
      return false;
    return true;
  };
  var AppStateIcon_MOVE_instance;
  var AppStateIcon_CLOSE_instance;
  var AppStateIcon_DELETE_instance;
  function values_7() {
    return [AppStateIcon_MOVE_getInstance(), AppStateIcon_CLOSE_getInstance(), AppStateIcon_DELETE_getInstance()];
  }
  function valueOf_6(value) {
    switch (value) {
      case 'MOVE':
        return AppStateIcon_MOVE_getInstance();
      case 'CLOSE':
        return AppStateIcon_CLOSE_getInstance();
      case 'DELETE':
        return AppStateIcon_DELETE_getInstance();
      default:
        AppStateIcon_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_6() {
    if ($ENTRIES_6 == null)
      $ENTRIES_6 = enumEntries(values_7());
    return $ENTRIES_6;
  }
  var AppStateIcon_entriesInitialized;
  function AppStateIcon_initEntries() {
    if (AppStateIcon_entriesInitialized)
      return Unit_getInstance();
    AppStateIcon_entriesInitialized = true;
    AppStateIcon_MOVE_instance = new AppStateIcon('MOVE', 0);
    AppStateIcon_CLOSE_instance = new AppStateIcon('CLOSE', 1);
    AppStateIcon_DELETE_instance = new AppStateIcon('DELETE', 2);
  }
  var $ENTRIES_6;
  function AppStateIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppStateIcon_MOVE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_MOVE_instance;
  }
  function AppStateIcon_CLOSE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_CLOSE_instance;
  }
  function AppStateIcon_DELETE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_DELETE_instance;
  }
  function AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    fabState = fabState === VOID ? new FabUiState() : fabState;
    loadingState = loadingState === VOID ? new LoadingUiState() : loadingState;
    title = title === VOID ? null : title;
    navigationVisible = navigationVisible === VOID ? true : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? false : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? false : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? true : userAccountIconVisible;
    searchState = searchState === VOID ? new AppBarSearchUiState() : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? new ActionBarButtonUiState() : actionBarButtonState;
    overflowItems = overflowItems === VOID ? emptyList() : overflowItems;
    hideAppBar = hideAppBar === VOID ? false : hideAppBar;
    actionButtons = actionButtons === VOID ? emptyList() : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? null : leadingActionButton;
    appBarColors = appBarColors === VOID ? AppBarColors_STANDARD_getInstance() : appBarColors;
    this.fabState_1 = fabState;
    this.loadingState_1 = loadingState;
    this.title_1 = title;
    this.navigationVisible_1 = navigationVisible;
    this.hideBottomNavigation_1 = hideBottomNavigation;
    this.hideSettingsIcon_1 = hideSettingsIcon;
    this.userAccountIconVisible_1 = userAccountIconVisible;
    this.searchState_1 = searchState;
    this.actionBarButtonState_1 = actionBarButtonState;
    this.overflowItems_1 = overflowItems;
    this.hideAppBar_1 = hideAppBar;
    this.actionButtons_1 = actionButtons;
    this.leadingActionButton_1 = leadingActionButton;
    this.appBarColors_1 = appBarColors;
  }
  protoOf(AppUiState).get_fabState_obl84t_k$ = function () {
    return this.fabState_1;
  };
  protoOf(AppUiState).get_loadingState_rpk2ke_k$ = function () {
    return this.loadingState_1;
  };
  protoOf(AppUiState).get_title_iz32un_k$ = function () {
    return this.title_1;
  };
  protoOf(AppUiState).get_navigationVisible_i7t5nv_k$ = function () {
    return this.navigationVisible_1;
  };
  protoOf(AppUiState).get_hideBottomNavigation_xk7et2_k$ = function () {
    return this.hideBottomNavigation_1;
  };
  protoOf(AppUiState).get_hideSettingsIcon_n7vnfr_k$ = function () {
    return this.hideSettingsIcon_1;
  };
  protoOf(AppUiState).get_userAccountIconVisible_u1y7pc_k$ = function () {
    return this.userAccountIconVisible_1;
  };
  protoOf(AppUiState).get_searchState_4sjvxc_k$ = function () {
    return this.searchState_1;
  };
  protoOf(AppUiState).get_actionBarButtonState_cgbrez_k$ = function () {
    return this.actionBarButtonState_1;
  };
  protoOf(AppUiState).get_overflowItems_8hzrn9_k$ = function () {
    return this.overflowItems_1;
  };
  protoOf(AppUiState).get_hideAppBar_myb6ub_k$ = function () {
    return this.hideAppBar_1;
  };
  protoOf(AppUiState).get_actionButtons_pqgvuq_k$ = function () {
    return this.actionButtons_1;
  };
  protoOf(AppUiState).get_leadingActionButton_iz66uz_k$ = function () {
    return this.leadingActionButton_1;
  };
  protoOf(AppUiState).get_appBarColors_rqveyd_k$ = function () {
    return this.appBarColors_1;
  };
  protoOf(AppUiState).component1_7eebsc_k$ = function () {
    return this.fabState_1;
  };
  protoOf(AppUiState).component2_7eebsb_k$ = function () {
    return this.loadingState_1;
  };
  protoOf(AppUiState).component3_7eebsa_k$ = function () {
    return this.title_1;
  };
  protoOf(AppUiState).component4_7eebs9_k$ = function () {
    return this.navigationVisible_1;
  };
  protoOf(AppUiState).component5_7eebs8_k$ = function () {
    return this.hideBottomNavigation_1;
  };
  protoOf(AppUiState).component6_7eebs7_k$ = function () {
    return this.hideSettingsIcon_1;
  };
  protoOf(AppUiState).component7_7eebs6_k$ = function () {
    return this.userAccountIconVisible_1;
  };
  protoOf(AppUiState).component8_7eebs5_k$ = function () {
    return this.searchState_1;
  };
  protoOf(AppUiState).component9_7eebs4_k$ = function () {
    return this.actionBarButtonState_1;
  };
  protoOf(AppUiState).component10_gazzfo_k$ = function () {
    return this.overflowItems_1;
  };
  protoOf(AppUiState).component11_gazzfn_k$ = function () {
    return this.hideAppBar_1;
  };
  protoOf(AppUiState).component12_gazzfm_k$ = function () {
    return this.actionButtons_1;
  };
  protoOf(AppUiState).component13_gazzfl_k$ = function () {
    return this.leadingActionButton_1;
  };
  protoOf(AppUiState).component14_gazzfk_k$ = function () {
    return this.appBarColors_1;
  };
  protoOf(AppUiState).copy_vs25c9_k$ = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    return new AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).copy$default_9ltzmx_k$ = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors, $super) {
    fabState = fabState === VOID ? this.fabState_1 : fabState;
    loadingState = loadingState === VOID ? this.loadingState_1 : loadingState;
    title = title === VOID ? this.title_1 : title;
    navigationVisible = navigationVisible === VOID ? this.navigationVisible_1 : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? this.hideBottomNavigation_1 : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? this.hideSettingsIcon_1 : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? this.userAccountIconVisible_1 : userAccountIconVisible;
    searchState = searchState === VOID ? this.searchState_1 : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? this.actionBarButtonState_1 : actionBarButtonState;
    overflowItems = overflowItems === VOID ? this.overflowItems_1 : overflowItems;
    hideAppBar = hideAppBar === VOID ? this.hideAppBar_1 : hideAppBar;
    actionButtons = actionButtons === VOID ? this.actionButtons_1 : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? this.leadingActionButton_1 : leadingActionButton;
    appBarColors = appBarColors === VOID ? this.appBarColors_1 : appBarColors;
    return $super === VOID ? this.copy_vs25c9_k$(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) : $super.copy_vs25c9_k$.call(this, fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).toString = function () {
    return 'AppUiState(fabState=' + this.fabState_1 + ', loadingState=' + this.loadingState_1 + ', title=' + this.title_1 + ', navigationVisible=' + this.navigationVisible_1 + ', hideBottomNavigation=' + this.hideBottomNavigation_1 + ', hideSettingsIcon=' + this.hideSettingsIcon_1 + ', userAccountIconVisible=' + this.userAccountIconVisible_1 + ', searchState=' + this.searchState_1 + ', actionBarButtonState=' + this.actionBarButtonState_1 + ', overflowItems=' + this.overflowItems_1 + ', hideAppBar=' + this.hideAppBar_1 + ', actionButtons=' + this.actionButtons_1 + ', leadingActionButton=' + this.leadingActionButton_1 + ', appBarColors=' + this.appBarColors_1 + ')';
  };
  protoOf(AppUiState).hashCode = function () {
    var result = this.fabState_1.hashCode();
    result = imul(result, 31) + this.loadingState_1.hashCode() | 0;
    result = imul(result, 31) + (this.title_1 == null ? 0 : getStringHashCode(this.title_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.navigationVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hideBottomNavigation_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hideSettingsIcon_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.userAccountIconVisible_1) | 0;
    result = imul(result, 31) + this.searchState_1.hashCode() | 0;
    result = imul(result, 31) + this.actionBarButtonState_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.overflowItems_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hideAppBar_1) | 0;
    result = imul(result, 31) + hashCode(this.actionButtons_1) | 0;
    result = imul(result, 31) + (this.leadingActionButton_1 == null ? 0 : this.leadingActionButton_1.hashCode()) | 0;
    result = imul(result, 31) + this.appBarColors_1.hashCode() | 0;
    return result;
  };
  protoOf(AppUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppUiState ? other : THROW_CCE();
    if (!this.fabState_1.equals(tmp0_other_with_cast.fabState_1))
      return false;
    if (!this.loadingState_1.equals(tmp0_other_with_cast.loadingState_1))
      return false;
    if (!(this.title_1 == tmp0_other_with_cast.title_1))
      return false;
    if (!(this.navigationVisible_1 === tmp0_other_with_cast.navigationVisible_1))
      return false;
    if (!(this.hideBottomNavigation_1 === tmp0_other_with_cast.hideBottomNavigation_1))
      return false;
    if (!(this.hideSettingsIcon_1 === tmp0_other_with_cast.hideSettingsIcon_1))
      return false;
    if (!(this.userAccountIconVisible_1 === tmp0_other_with_cast.userAccountIconVisible_1))
      return false;
    if (!this.searchState_1.equals(tmp0_other_with_cast.searchState_1))
      return false;
    if (!this.actionBarButtonState_1.equals(tmp0_other_with_cast.actionBarButtonState_1))
      return false;
    if (!equals(this.overflowItems_1, tmp0_other_with_cast.overflowItems_1))
      return false;
    if (!(this.hideAppBar_1 === tmp0_other_with_cast.hideAppBar_1))
      return false;
    if (!equals(this.actionButtons_1, tmp0_other_with_cast.actionButtons_1))
      return false;
    if (!equals(this.leadingActionButton_1, tmp0_other_with_cast.leadingActionButton_1))
      return false;
    if (!this.appBarColors_1.equals(tmp0_other_with_cast.appBarColors_1))
      return false;
    return true;
  };
  var FabIcon_NONE_instance;
  var FabIcon_ADD_instance;
  var FabIcon_EDIT_instance;
  function values_8() {
    return [FabIcon_NONE_getInstance(), FabIcon_ADD_getInstance(), FabIcon_EDIT_getInstance()];
  }
  function valueOf_7(value) {
    switch (value) {
      case 'NONE':
        return FabIcon_NONE_getInstance();
      case 'ADD':
        return FabIcon_ADD_getInstance();
      case 'EDIT':
        return FabIcon_EDIT_getInstance();
      default:
        FabIcon_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_7() {
    if ($ENTRIES_7 == null)
      $ENTRIES_7 = enumEntries(values_8());
    return $ENTRIES_7;
  }
  var FabIcon_entriesInitialized;
  function FabIcon_initEntries() {
    if (FabIcon_entriesInitialized)
      return Unit_getInstance();
    FabIcon_entriesInitialized = true;
    FabIcon_NONE_instance = new FabIcon('NONE', 0);
    FabIcon_ADD_instance = new FabIcon('ADD', 1);
    FabIcon_EDIT_instance = new FabIcon('EDIT', 2);
  }
  var $ENTRIES_7;
  function FabIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function FabUiState$_init_$lambda_e3ylcb() {
    return Unit_getInstance();
  }
  function FabIcon_NONE_getInstance() {
    FabIcon_initEntries();
    return FabIcon_NONE_instance;
  }
  function FabIcon_ADD_getInstance() {
    FabIcon_initEntries();
    return FabIcon_ADD_instance;
  }
  function FabIcon_EDIT_getInstance() {
    FabIcon_initEntries();
    return FabIcon_EDIT_instance;
  }
  function FabUiState(visible, text, icon, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    icon = icon === VOID ? FabIcon_NONE_getInstance() : icon;
    var tmp;
    if (onClick === VOID) {
      tmp = FabUiState$_init_$lambda_e3ylcb;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.visible_1 = visible;
    this.text_1 = text;
    this.icon_1 = icon;
    this.onClick_1 = onClick;
  }
  protoOf(FabUiState).get_visible_8zfvk9_k$ = function () {
    return this.visible_1;
  };
  protoOf(FabUiState).get_text_wouvsm_k$ = function () {
    return this.text_1;
  };
  protoOf(FabUiState).get_icon_wont8i_k$ = function () {
    return this.icon_1;
  };
  protoOf(FabUiState).get_onClick_l3c0lc_k$ = function () {
    return this.onClick_1;
  };
  protoOf(FabUiState).component1_7eebsc_k$ = function () {
    return this.visible_1;
  };
  protoOf(FabUiState).component2_7eebsb_k$ = function () {
    return this.text_1;
  };
  protoOf(FabUiState).component3_7eebsa_k$ = function () {
    return this.icon_1;
  };
  protoOf(FabUiState).component4_7eebs9_k$ = function () {
    return this.onClick_1;
  };
  protoOf(FabUiState).copy_fvlh3j_k$ = function (visible, text, icon, onClick) {
    return new FabUiState(visible, text, icon, onClick);
  };
  protoOf(FabUiState).copy$default_kse1yx_k$ = function (visible, text, icon, onClick, $super) {
    visible = visible === VOID ? this.visible_1 : visible;
    text = text === VOID ? this.text_1 : text;
    icon = icon === VOID ? this.icon_1 : icon;
    onClick = onClick === VOID ? this.onClick_1 : onClick;
    return $super === VOID ? this.copy_fvlh3j_k$(visible, text, icon, onClick) : $super.copy_fvlh3j_k$.call(this, visible, text, icon, onClick);
  };
  protoOf(FabUiState).toString = function () {
    return 'FabUiState(visible=' + this.visible_1 + ', text=' + this.text_1 + ', icon=' + this.icon_1 + ', onClick=' + this.onClick_1 + ')';
  };
  protoOf(FabUiState).hashCode = function () {
    var result = getBooleanHashCode(this.visible_1);
    result = imul(result, 31) + (this.text_1 == null ? 0 : getStringHashCode(this.text_1)) | 0;
    result = imul(result, 31) + this.icon_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.onClick_1) | 0;
    return result;
  };
  protoOf(FabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof FabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof FabUiState ? other : THROW_CCE();
    if (!(this.visible_1 === tmp0_other_with_cast.visible_1))
      return false;
    if (!(this.text_1 == tmp0_other_with_cast.text_1))
      return false;
    if (!this.icon_1.equals(tmp0_other_with_cast.icon_1))
      return false;
    if (!equals(this.onClick_1, tmp0_other_with_cast.onClick_1))
      return false;
    return true;
  };
  var State_NOT_LOADING_instance;
  var State_INDETERMINATE_instance;
  function values_9() {
    return [State_NOT_LOADING_getInstance(), State_INDETERMINATE_getInstance()];
  }
  function valueOf_8(value) {
    switch (value) {
      case 'NOT_LOADING':
        return State_NOT_LOADING_getInstance();
      case 'INDETERMINATE':
        return State_INDETERMINATE_getInstance();
      default:
        State_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_8() {
    if ($ENTRIES_8 == null)
      $ENTRIES_8 = enumEntries(values_9());
    return $ENTRIES_8;
  }
  var State_entriesInitialized;
  function State_initEntries() {
    if (State_entriesInitialized)
      return Unit_getInstance();
    State_entriesInitialized = true;
    State_NOT_LOADING_instance = new State('NOT_LOADING', 0);
    State_INDETERMINATE_instance = new State('INDETERMINATE', 1);
  }
  var $ENTRIES_8;
  function State(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function Companion_84() {
    Companion_instance_84 = this;
    this.INDETERMINATE_1 = new LoadingUiState(State_INDETERMINATE_getInstance());
    this.NOT_LOADING_1 = new LoadingUiState(State_NOT_LOADING_getInstance());
  }
  protoOf(Companion_84).get_INDETERMINATE_a8koem_k$ = function () {
    return this.INDETERMINATE_1;
  };
  protoOf(Companion_84).get_NOT_LOADING_rtutyf_k$ = function () {
    return this.NOT_LOADING_1;
  };
  var Companion_instance_84;
  function Companion_getInstance_145() {
    if (Companion_instance_84 == null)
      new Companion_84();
    return Companion_instance_84;
  }
  function State_NOT_LOADING_getInstance() {
    State_initEntries();
    return State_NOT_LOADING_instance;
  }
  function State_INDETERMINATE_getInstance() {
    State_initEntries();
    return State_INDETERMINATE_instance;
  }
  function LoadingUiState(loadingState) {
    Companion_getInstance_145();
    loadingState = loadingState === VOID ? State_NOT_LOADING_getInstance() : loadingState;
    this.loadingState_1 = loadingState;
  }
  protoOf(LoadingUiState).get_loadingState_rpk2ke_k$ = function () {
    return this.loadingState_1;
  };
  protoOf(LoadingUiState).component1_7eebsc_k$ = function () {
    return this.loadingState_1;
  };
  protoOf(LoadingUiState).copy_h8csr9_k$ = function (loadingState) {
    return new LoadingUiState(loadingState);
  };
  protoOf(LoadingUiState).copy$default_parqyz_k$ = function (loadingState, $super) {
    loadingState = loadingState === VOID ? this.loadingState_1 : loadingState;
    return $super === VOID ? this.copy_h8csr9_k$(loadingState) : $super.copy_h8csr9_k$.call(this, loadingState);
  };
  protoOf(LoadingUiState).toString = function () {
    return 'LoadingUiState(loadingState=' + this.loadingState_1 + ')';
  };
  protoOf(LoadingUiState).hashCode = function () {
    return this.loadingState_1.hashCode();
  };
  protoOf(LoadingUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoadingUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoadingUiState ? other : THROW_CCE();
    if (!this.loadingState_1.equals(tmp0_other_with_cast.loadingState_1))
      return false;
    return true;
  };
  function OverflowItem(label, onClick) {
    this.label_1 = label;
    this.onClick_1 = onClick;
  }
  protoOf(OverflowItem).get_label_iuj8p7_k$ = function () {
    return this.label_1;
  };
  protoOf(OverflowItem).get_onClick_l3c0lc_k$ = function () {
    return this.onClick_1;
  };
  protoOf(OverflowItem).component1_7eebsc_k$ = function () {
    return this.label_1;
  };
  protoOf(OverflowItem).component2_7eebsb_k$ = function () {
    return this.onClick_1;
  };
  protoOf(OverflowItem).copy_y7fnx9_k$ = function (label, onClick) {
    return new OverflowItem(label, onClick);
  };
  protoOf(OverflowItem).copy$default_vz2396_k$ = function (label, onClick, $super) {
    label = label === VOID ? this.label_1 : label;
    onClick = onClick === VOID ? this.onClick_1 : onClick;
    return $super === VOID ? this.copy_y7fnx9_k$(label, onClick) : $super.copy_y7fnx9_k$.call(this, label, onClick);
  };
  protoOf(OverflowItem).toString = function () {
    return 'OverflowItem(label=' + this.label_1 + ', onClick=' + this.onClick_1 + ')';
  };
  protoOf(OverflowItem).hashCode = function () {
    var result = getStringHashCode(this.label_1);
    result = imul(result, 31) + hashCode(this.onClick_1) | 0;
    return result;
  };
  protoOf(OverflowItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OverflowItem))
      return false;
    var tmp0_other_with_cast = other instanceof OverflowItem ? other : THROW_CCE();
    if (!(this.label_1 === tmp0_other_with_cast.label_1))
      return false;
    if (!equals(this.onClick_1, tmp0_other_with_cast.onClick_1))
      return false;
    return true;
  };
  function Snack(message, action, onAction) {
    action = action === VOID ? null : action;
    onAction = onAction === VOID ? null : onAction;
    this.message_1 = message;
    this.action_1 = action;
    this.onAction_1 = onAction;
  }
  protoOf(Snack).get_message_h23axq_k$ = function () {
    return this.message_1;
  };
  protoOf(Snack).get_action_avldmn_k$ = function () {
    return this.action_1;
  };
  protoOf(Snack).get_onAction_fo698i_k$ = function () {
    return this.onAction_1;
  };
  protoOf(Snack).component1_7eebsc_k$ = function () {
    return this.message_1;
  };
  protoOf(Snack).component2_7eebsb_k$ = function () {
    return this.action_1;
  };
  protoOf(Snack).component3_7eebsa_k$ = function () {
    return this.onAction_1;
  };
  protoOf(Snack).copy_pt0177_k$ = function (message, action, onAction) {
    return new Snack(message, action, onAction);
  };
  protoOf(Snack).copy$default_4mjieg_k$ = function (message, action, onAction, $super) {
    message = message === VOID ? this.message_1 : message;
    action = action === VOID ? this.action_1 : action;
    onAction = onAction === VOID ? this.onAction_1 : onAction;
    return $super === VOID ? this.copy_pt0177_k$(message, action, onAction) : $super.copy_pt0177_k$.call(this, message, action, onAction);
  };
  protoOf(Snack).toString = function () {
    return 'Snack(message=' + this.message_1 + ', action=' + this.action_1 + ', onAction=' + this.onAction_1 + ')';
  };
  protoOf(Snack).hashCode = function () {
    var result = getStringHashCode(this.message_1);
    result = imul(result, 31) + (this.action_1 == null ? 0 : getStringHashCode(this.action_1)) | 0;
    result = imul(result, 31) + (this.onAction_1 == null ? 0 : hashCode(this.onAction_1)) | 0;
    return result;
  };
  protoOf(Snack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Snack))
      return false;
    var tmp0_other_with_cast = other instanceof Snack ? other : THROW_CCE();
    if (!(this.message_1 === tmp0_other_with_cast.message_1))
      return false;
    if (!(this.action_1 == tmp0_other_with_cast.action_1))
      return false;
    if (!equals(this.onAction_1, tmp0_other_with_cast.onAction_1))
      return false;
    return true;
  };
  function SnackBarDispatcher() {
  }
  function TabItem(viewName, args, label) {
    this.viewName_1 = viewName;
    this.args_1 = args;
    this.label_1 = label;
  }
  protoOf(TabItem).get_viewName_c12mav_k$ = function () {
    return this.viewName_1;
  };
  protoOf(TabItem).get_args_woj09y_k$ = function () {
    return this.args_1;
  };
  protoOf(TabItem).get_label_iuj8p7_k$ = function () {
    return this.label_1;
  };
  protoOf(TabItem).component1_7eebsc_k$ = function () {
    return this.viewName_1;
  };
  protoOf(TabItem).component2_7eebsb_k$ = function () {
    return this.args_1;
  };
  protoOf(TabItem).component3_7eebsa_k$ = function () {
    return this.label_1;
  };
  protoOf(TabItem).copy_dr5lcd_k$ = function (viewName, args, label) {
    return new TabItem(viewName, args, label);
  };
  protoOf(TabItem).copy$default_ev7xdq_k$ = function (viewName, args, label, $super) {
    viewName = viewName === VOID ? this.viewName_1 : viewName;
    args = args === VOID ? this.args_1 : args;
    label = label === VOID ? this.label_1 : label;
    return $super === VOID ? this.copy_dr5lcd_k$(viewName, args, label) : $super.copy_dr5lcd_k$.call(this, viewName, args, label);
  };
  protoOf(TabItem).toString = function () {
    return 'TabItem(viewName=' + this.viewName_1 + ', args=' + this.args_1 + ', label=' + this.label_1 + ')';
  };
  protoOf(TabItem).hashCode = function () {
    var result = getStringHashCode(this.viewName_1);
    result = imul(result, 31) + hashCode(this.args_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.label_1) | 0;
    return result;
  };
  protoOf(TabItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TabItem))
      return false;
    var tmp0_other_with_cast = other instanceof TabItem ? other : THROW_CCE();
    if (!(this.viewName_1 === tmp0_other_with_cast.viewName_1))
      return false;
    if (!equals(this.args_1, tmp0_other_with_cast.args_1))
      return false;
    if (!(this.label_1 === tmp0_other_with_cast.label_1))
      return false;
    return true;
  };
  function UstadContextMenuItem(label, onClick) {
    this.label_1 = label;
    this.onClick_1 = onClick;
  }
  protoOf(UstadContextMenuItem).get_label_iuj8p7_k$ = function () {
    return this.label_1;
  };
  protoOf(UstadContextMenuItem).get_onClick_l3c0lc_k$ = function () {
    return this.onClick_1;
  };
  protoOf(UstadContextMenuItem).component1_7eebsc_k$ = function () {
    return this.label_1;
  };
  protoOf(UstadContextMenuItem).component2_7eebsb_k$ = function () {
    return this.onClick_1;
  };
  protoOf(UstadContextMenuItem).copy_y7fnx9_k$ = function (label, onClick) {
    return new UstadContextMenuItem(label, onClick);
  };
  protoOf(UstadContextMenuItem).copy$default_6z5w7b_k$ = function (label, onClick, $super) {
    label = label === VOID ? this.label_1 : label;
    onClick = onClick === VOID ? this.onClick_1 : onClick;
    return $super === VOID ? this.copy_y7fnx9_k$(label, onClick) : $super.copy_y7fnx9_k$.call(this, label, onClick);
  };
  protoOf(UstadContextMenuItem).toString = function () {
    return 'UstadContextMenuItem(label=' + this.label_1 + ', onClick=' + this.onClick_1 + ')';
  };
  protoOf(UstadContextMenuItem).hashCode = function () {
    var result = getStringHashCode(this.label_1);
    result = imul(result, 31) + hashCode(this.onClick_1) | 0;
    return result;
  };
  protoOf(UstadContextMenuItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadContextMenuItem))
      return false;
    var tmp0_other_with_cast = other instanceof UstadContextMenuItem ? other : THROW_CCE();
    if (!(this.label_1 === tmp0_other_with_cast.label_1))
      return false;
    if (!equals(this.onClick_1, tmp0_other_with_cast.onClick_1))
      return false;
    return true;
  };
  function GenderConfig_init_$Init$(appConfig, $this) {
    var tmp0_safe_receiver = appConfig.get_6bo4tg_k$(Companion_getInstance_149().get_KEY_GENDER_CONFIG_7va59l_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toNullIfBlank(tmp0_safe_receiver);
    GenderConfig.call($this, tmp1_elvis_lhs == null ? '1,2,4' : tmp1_elvis_lhs);
    return $this;
  }
  function GenderConfig_init_$Create$(appConfig) {
    return GenderConfig_init_$Init$(appConfig, objectCreate(protoOf(GenderConfig)));
  }
  function _get_genderOptions__2cwizw($this) {
    return $this.genderOptions_1;
  }
  function _get_genderMessageIds__j9rglj($this) {
    return $this.genderMessageIds_1;
  }
  function Companion_85() {
    Companion_instance_85 = this;
    this.DEFAULT_GENDER_OPTIONS_1 = '1,2,4';
  }
  protoOf(Companion_85).get_DEFAULT_GENDER_OPTIONS_wtvgtj_k$ = function () {
    return this.DEFAULT_GENDER_OPTIONS_1;
  };
  var Companion_instance_85;
  function Companion_getInstance_146() {
    if (Companion_instance_85 == null)
      new Companion_85();
    return Companion_instance_85;
  }
  function GenderConfig(genderConfigStr) {
    Companion_getInstance_146();
    genderConfigStr = genderConfigStr === VOID ? '1,2,4' : genderConfigStr;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = split(genderConfigStr, [',']);
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(element)) {
        destination.add_utx5q5_k$(element);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_0 = destination.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator_0.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      var tmp$ret$4 = toInt(item);
      destination_0.add_utx5q5_k$(tmp$ret$4);
    }
    tmp.genderOptions_1 = destination_0;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_1 = PersonConstants_getInstance().get_GENDER_MESSAGE_IDS_o7v4c5_k$();
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = this_1.iterator_jk1svi_k$();
    while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
      var element_0 = tmp0_iterator_1.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderMessageIds.<anonymous>' call
      if (this.genderOptions_1.contains_aljjnj_k$(element_0.get_value_j01efc_k$())) {
        destination_1.add_utx5q5_k$(element_0);
      }
    }
    tmp_0.genderMessageIds_1 = destination_1;
    this.genderMessageIdsAndUnset_1 = plus(this.genderMessageIds_1, listOf_0(new MessageIdOption2(strings_getInstance().get_blank_ip8b3f_k$(), Companion_getInstance_7().get_GENDER_UNSET_ij51gs_k$())));
  }
  protoOf(GenderConfig).get_genderMessageIdsAndUnset_iid7il_k$ = function () {
    return this.genderMessageIdsAndUnset_1;
  };
  function _get_settings__lbkut4_3($this) {
    return $this.settings_1;
  }
  function _get_localeSettingDelegate__bcdi4q($this) {
    return $this.localeSettingDelegate_1;
  }
  function _get_availableLanguagesConfig__ehqtxz($this) {
    return $this.availableLanguagesConfig_1;
  }
  function _get_fallbackLocaleCode__ktmapu($this) {
    return $this.fallbackLocaleCode_1;
  }
  function SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, $this) {
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    SupportedLanguagesConfig.call($this, systemLocales, new SettingsLocaleSettingDelegate(settings), availableLanguagesConfig, fallbackLocaleCode);
    return $this;
  }
  function SupportedLanguagesConfig_init_$Create$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode) {
    return SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, objectCreate(protoOf(SupportedLanguagesConfig)));
  }
  function LocaleSettingDelegate() {
  }
  function SettingsLocaleSettingDelegate(settings) {
    this.settings_1 = settings;
  }
  protoOf(SettingsLocaleSettingDelegate).set_localeSetting_dbu10i_k$ = function (value) {
    if (!(value == null)) {
      this.settings_1.putString_q7x3bk_k$('locale', value);
    } else {
      this.settings_1.remove_6241ba_k$('locale');
    }
  };
  protoOf(SettingsLocaleSettingDelegate).get_localeSetting_x5lai5_k$ = function () {
    return this.settings_1.getStringOrNull_w9a5ex_k$('locale');
  };
  function _get_supportedLangMap__un6caz($this) {
    return $this.supportedLangMap_1;
  }
  function _set_displayedLocale__b0ax86($this, _set____db54di) {
    $this.displayedLocale_1 = _set____db54di;
  }
  function displayLocaleForLangSetting($this, setting) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (setting == null ? true : charSequenceLength(setting) === 0) {
      tmp = $this.selectFirstSupportedLocale$default_xkwuxc_k$().get_langCode_ciluis_k$();
    } else {
      tmp = setting;
    }
    return tmp;
  }
  function Companion_86() {
    Companion_instance_86 = this;
    this.PREFKEY_LOCALE_1 = 'locale';
    this.APPCONFIG_KEY_PRESET_LANG_1 = 'com.ustadmobile.presetlocale';
    this.PREFKEY_ACTIONED_PRESET_1 = 'localePresetDone';
    this.DEFAULT_SUPPORTED_LANGUAGES_1 = 'en,fa,ps,ar,tg,bn,ne,my,rw,ru';
    this.LOCALE_USE_SYSTEM_1 = '';
  }
  protoOf(Companion_86).get_PREFKEY_LOCALE_2pkona_k$ = function () {
    return this.PREFKEY_LOCALE_1;
  };
  protoOf(Companion_86).get_APPCONFIG_KEY_PRESET_LANG_4p2y21_k$ = function () {
    return this.APPCONFIG_KEY_PRESET_LANG_1;
  };
  protoOf(Companion_86).get_PREFKEY_ACTIONED_PRESET_lagqub_k$ = function () {
    return this.PREFKEY_ACTIONED_PRESET_1;
  };
  protoOf(Companion_86).get_DEFAULT_SUPPORTED_LANGUAGES_we7wn1_k$ = function () {
    return this.DEFAULT_SUPPORTED_LANGUAGES_1;
  };
  protoOf(Companion_86).get_LOCALE_USE_SYSTEM_x167q5_k$ = function () {
    return this.LOCALE_USE_SYSTEM_1;
  };
  var Companion_instance_86;
  function Companion_getInstance_147() {
    if (Companion_instance_86 == null)
      new Companion_86();
    return Companion_instance_86;
  }
  function SupportedLanguagesConfig(systemLocales, localeSettingDelegate, availableLanguagesConfig, fallbackLocaleCode) {
    Companion_getInstance_147();
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    this.systemLocales_1 = systemLocales;
    this.localeSettingDelegate_1 = localeSettingDelegate;
    this.availableLanguagesConfig_1 = availableLanguagesConfig;
    this.fallbackLocaleCode_1 = fallbackLocaleCode;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = sorted(split(this.availableLanguagesConfig_1, [',']));
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedUiLanguages.<anonymous>' call
      var tmp0_elvis_lhs = UstadMobileConstants_getInstance().get_LANGUAGE_NAMES_e2bibu_k$().get_wei43m_k$(item);
      var tmp$ret$0 = new UiLanguage(item, tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs);
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    tmp.supportedUiLanguages_1 = destination;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_1 = this.supportedUiLanguages_1;
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination_0 = LinkedHashMap_init_$Create$(capacity);
    var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator_0.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedLangMap.<anonymous>' call
      var tmp$ret$3 = element.get_langCode_ciluis_k$();
      destination_0.put_4fpzoq_k$(tmp$ret$3, element);
    }
    tmp_0.supportedLangMap_1 = destination_0;
    this.displayedLocale_1 = displayLocaleForLangSetting(this, this.get_localeSetting_x5lai5_k$());
    if (!this.supportedLangMap_1.containsKey_aw81wo_k$(this.fallbackLocaleCode_1))
      throw IllegalStateException_init_$Create$('available languages ' + this.availableLanguagesConfig_1 + ' does not ' + ("include fallback: '" + this.fallbackLocaleCode_1 + "'"));
  }
  protoOf(SupportedLanguagesConfig).get_systemLocales_x3efi7_k$ = function () {
    return this.systemLocales_1;
  };
  protoOf(SupportedLanguagesConfig).get_supportedUiLanguages_ph0zaa_k$ = function () {
    return this.supportedUiLanguages_1;
  };
  protoOf(SupportedLanguagesConfig).set_localeSetting_dbu10i_k$ = function (value) {
    this.localeSettingDelegate_1.set_localeSetting_dbu10i_k$(value);
    this.displayedLocale_1 = displayLocaleForLangSetting(this, value);
  };
  protoOf(SupportedLanguagesConfig).get_localeSetting_x5lai5_k$ = function () {
    return this.localeSettingDelegate_1.get_localeSetting_x5lai5_k$();
  };
  protoOf(SupportedLanguagesConfig).getCurrentLanguage_ra0l1n_k$ = function (systemImpl) {
    var tmp0_elvis_lhs = this.get_localeSetting_x5lai5_k$();
    var currentLocaleSetting = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.supportedUiLanguagesAndSysDefault_rnahh0_k$(systemImpl).iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.getCurrentLanguage.<anonymous>' call
        if (element.get_langCode_ciluis_k$() === currentLocaleSetting) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(SupportedLanguagesConfig).get_displayedLocale_vlg2wi_k$ = function () {
    return this.displayedLocale_1;
  };
  protoOf(SupportedLanguagesConfig).supportedUiLanguagesAndSysDefault_seeqc8_k$ = function (useDeviceLangDisplay) {
    return plus(listOf_0(new UiLanguage(Companion_getInstance_144().get_LOCALE_USE_SYSTEM_x167q5_k$(), useDeviceLangDisplay)), this.supportedUiLanguages_1);
  };
  protoOf(SupportedLanguagesConfig).supportedUiLanguagesAndSysDefault_rnahh0_k$ = function (systemImpl) {
    return this.supportedUiLanguagesAndSysDefault_seeqc8_k$(systemImpl.getString_a9yhoi_k$(strings_getInstance().get_use_device_language_niewhs_k$()));
  };
  protoOf(SupportedLanguagesConfig).selectFirstSupportedLocale_pcbeuq_k$ = function (preferredLocales) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.supportedUiLanguages_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      var tmp$ret$0 = item.get_langCode_ciluis_k$();
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    var supportedLocaleCodes = destination;
    var tmp$ret$6;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_0 = preferredLocales.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$4 = element.substring(0, 2);
        if (supportedLocaleCodes.contains_aljjnj_k$(tmp$ret$4)) {
          tmp$ret$6 = element;
          break $l$block;
        }
      }
      tmp$ret$6 = null;
    }
    var tmp0_safe_receiver = tmp$ret$6;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$8 = tmp0_safe_receiver.substring(0, 2);
      tmp = ensureNotNull(this.supportedLangMap_1.get_wei43m_k$(tmp$ret$8));
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? ensureNotNull(this.supportedLangMap_1.get_wei43m_k$(this.fallbackLocaleCode_1)) : tmp1_elvis_lhs;
  };
  protoOf(SupportedLanguagesConfig).selectFirstSupportedLocale$default_xkwuxc_k$ = function (preferredLocales, $super) {
    preferredLocales = preferredLocales === VOID ? this.systemLocales_1 : preferredLocales;
    return $super === VOID ? this.selectFirstSupportedLocale_pcbeuq_k$(preferredLocales) : $super.selectFirstSupportedLocale_pcbeuq_k$.call(this, preferredLocales);
  };
  function Companion_87() {
    Companion_instance_87 = this;
  }
  protoOf(Companion_87).fromUstadBuildConfig_acnc9q_k$ = function (buildConfig) {
    var tmp = ensureNotNull(buildConfig.get_6bo4tg_k$(Companion_getInstance_149().get_KEY_SYSTEM_URL_8ga2x4_k$()));
    var tmp0_safe_receiver = buildConfig.get_6bo4tg_k$(Companion_getInstance_149().get_KEY_PRESET_LEARNING_SPACE_URL_fq6hpw_k$());
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_1;
      // Inline function 'com.ustadmobile.core.impl.config.Companion.fromUstadBuildConfig.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(tmp0_safe_receiver)) {
        tmp_1 = tmp0_safe_receiver;
      } else {
        tmp_1 = null;
      }
      tmp_0 = tmp_1;
    }
    var tmp_2 = tmp_0;
    var tmp1_safe_receiver = buildConfig.get_6bo4tg_k$(Companion_getInstance_149().get_KEY_NEW_PERSONAL_ACCOUNT_LEARNING_SPACE_URL_3reptu_k$());
    var tmp_3;
    if (tmp1_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_4;
      // Inline function 'com.ustadmobile.core.impl.config.Companion.fromUstadBuildConfig.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(tmp1_safe_receiver)) {
        tmp_4 = tmp1_safe_receiver;
      } else {
        tmp_4 = null;
      }
      tmp_3 = tmp_4;
    }
    return new SystemUrlConfig(tmp, tmp_2, tmp_3);
  };
  var Companion_instance_87;
  function Companion_getInstance_148() {
    if (Companion_instance_87 == null)
      new Companion_87();
    return Companion_instance_87;
  }
  function SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    Companion_getInstance_148();
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? null : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? null : newPersonalAccountsLearningSpaceUrl;
    this.systemBaseUrl_1 = systemBaseUrl;
    this.presetLearningSpaceUrl_1 = presetLearningSpaceUrl;
    this.newPersonalAccountsLearningSpaceUrl_1 = newPersonalAccountsLearningSpaceUrl;
    this.canSelectServer_1 = this.presetLearningSpaceUrl_1 == null;
  }
  protoOf(SystemUrlConfig).get_systemBaseUrl_qu6zd2_k$ = function () {
    return this.systemBaseUrl_1;
  };
  protoOf(SystemUrlConfig).get_presetLearningSpaceUrl_nzw9pt_k$ = function () {
    return this.presetLearningSpaceUrl_1;
  };
  protoOf(SystemUrlConfig).get_newPersonalAccountsLearningSpaceUrl_l46cfw_k$ = function () {
    return this.newPersonalAccountsLearningSpaceUrl_1;
  };
  protoOf(SystemUrlConfig).get_canSelectServer_81keje_k$ = function () {
    return this.canSelectServer_1;
  };
  protoOf(SystemUrlConfig).component1_7eebsc_k$ = function () {
    return this.systemBaseUrl_1;
  };
  protoOf(SystemUrlConfig).component2_7eebsb_k$ = function () {
    return this.presetLearningSpaceUrl_1;
  };
  protoOf(SystemUrlConfig).component3_7eebsa_k$ = function () {
    return this.newPersonalAccountsLearningSpaceUrl_1;
  };
  protoOf(SystemUrlConfig).copy_37sg9j_k$ = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    return new SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).copy$default_5x2ty6_k$ = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl, $super) {
    systemBaseUrl = systemBaseUrl === VOID ? this.systemBaseUrl_1 : systemBaseUrl;
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? this.presetLearningSpaceUrl_1 : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? this.newPersonalAccountsLearningSpaceUrl_1 : newPersonalAccountsLearningSpaceUrl;
    return $super === VOID ? this.copy_37sg9j_k$(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) : $super.copy_37sg9j_k$.call(this, systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).toString = function () {
    return 'SystemUrlConfig(systemBaseUrl=' + this.systemBaseUrl_1 + ', presetLearningSpaceUrl=' + this.presetLearningSpaceUrl_1 + ', newPersonalAccountsLearningSpaceUrl=' + this.newPersonalAccountsLearningSpaceUrl_1 + ')';
  };
  protoOf(SystemUrlConfig).hashCode = function () {
    var result = getStringHashCode(this.systemBaseUrl_1);
    result = imul(result, 31) + (this.presetLearningSpaceUrl_1 == null ? 0 : getStringHashCode(this.presetLearningSpaceUrl_1)) | 0;
    result = imul(result, 31) + (this.newPersonalAccountsLearningSpaceUrl_1 == null ? 0 : getStringHashCode(this.newPersonalAccountsLearningSpaceUrl_1)) | 0;
    return result;
  };
  protoOf(SystemUrlConfig).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemUrlConfig))
      return false;
    var tmp0_other_with_cast = other instanceof SystemUrlConfig ? other : THROW_CCE();
    if (!(this.systemBaseUrl_1 === tmp0_other_with_cast.systemBaseUrl_1))
      return false;
    if (!(this.presetLearningSpaceUrl_1 == tmp0_other_with_cast.presetLearningSpaceUrl_1))
      return false;
    if (!(this.newPersonalAccountsLearningSpaceUrl_1 == tmp0_other_with_cast.newPersonalAccountsLearningSpaceUrl_1))
      return false;
    return true;
  };
  function Companion_88() {
    Companion_instance_88 = this;
    this.KEY_GENDER_CONFIG_1 = 'com.ustadmobile.gopts';
    this.KEY_CONFIG_SHOW_POWERED_BY_1 = 'com.ustadmobile.showpoweredbymsg';
    this.KEY_SYSTEM_URL_1 = 'com.ustadmobile.system.systemBaseUrl';
    this.KEY_PRESET_LEARNING_SPACE_URL_1 = 'com.ustadmobile.system.presetLsUrl';
    this.KEY_NEW_PERSONAL_ACCOUNT_LEARNING_SPACE_URL_1 = 'com.ustadmobile.system.newPersonalAccountsLsUrl';
  }
  protoOf(Companion_88).get_KEY_GENDER_CONFIG_7va59l_k$ = function () {
    return this.KEY_GENDER_CONFIG_1;
  };
  protoOf(Companion_88).get_KEY_CONFIG_SHOW_POWERED_BY_o4fkjk_k$ = function () {
    return this.KEY_CONFIG_SHOW_POWERED_BY_1;
  };
  protoOf(Companion_88).get_KEY_SYSTEM_URL_8ga2x4_k$ = function () {
    return this.KEY_SYSTEM_URL_1;
  };
  protoOf(Companion_88).get_KEY_PRESET_LEARNING_SPACE_URL_fq6hpw_k$ = function () {
    return this.KEY_PRESET_LEARNING_SPACE_URL_1;
  };
  protoOf(Companion_88).get_KEY_NEW_PERSONAL_ACCOUNT_LEARNING_SPACE_URL_3reptu_k$ = function () {
    return this.KEY_NEW_PERSONAL_ACCOUNT_LEARNING_SPACE_URL_1;
  };
  var Companion_instance_88;
  function Companion_getInstance_149() {
    if (Companion_instance_88 == null)
      new Companion_88();
    return Companion_instance_88;
  }
  function UstadBuildConfig() {
  }
  function _get_terminologyEntries__aegxqm($this) {
    return $this.terminologyEntries_1;
  }
  function CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, $this) {
    CourseTerminologyStrings.call($this, toTerminologyEntries(courseTerminology, json, systemImpl), courseTerminology.get_ctLct_ipwrr7_k$());
    return $this;
  }
  function CourseTerminologyStrings_init_$Create$(courseTerminology, systemImpl, json) {
    return CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, objectCreate(protoOf(CourseTerminologyStrings)));
  }
  function Companion_89() {
    Companion_instance_89 = this;
    this.PREVIEW_TERMINOLOGY_1 = new CourseTerminologyStrings(emptyList());
  }
  protoOf(Companion_89).get_PREVIEW_TERMINOLOGY_d7su0d_k$ = function () {
    return this.PREVIEW_TERMINOLOGY_1;
  };
  var Companion_instance_89;
  function Companion_getInstance_150() {
    if (Companion_instance_89 == null)
      new Companion_89();
    return Companion_instance_89;
  }
  function CourseTerminologyStrings(terminologyEntries, terminologyKey) {
    Companion_getInstance_150();
    terminologyKey = terminologyKey === VOID ? null : terminologyKey;
    this.terminologyEntries_1 = terminologyEntries;
    this.terminologyKey_1 = terminologyKey;
  }
  protoOf(CourseTerminologyStrings).get_terminologyKey_gsb0wb_k$ = function () {
    return this.terminologyKey_1;
  };
  protoOf(CourseTerminologyStrings).get_4ktic3_k$ = function (messageId) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.terminologyEntries_1.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.impl.locale.CourseTerminologyStrings.get.<anonymous>' call
        if (element.get_stringResource_4df0w8_k$().equals(messageId)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_term_wouvn9_k$();
  };
  protoOf(CourseTerminologyStrings).equals = function (other) {
    var tmp0_safe_receiver = other instanceof CourseTerminologyStrings ? other : null;
    return equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.terminologyEntries_1, this.terminologyEntries_1);
  };
  protoOf(CourseTerminologyStrings).hashCode = function () {
    return hashCode(this.terminologyEntries_1);
  };
  function TerminologyEntry(id, stringResource, term, errorMessage) {
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.id_1 = id;
    this.stringResource_1 = stringResource;
    this.term_1 = term;
    this.errorMessage_1 = errorMessage;
  }
  protoOf(TerminologyEntry).get_id_kntnx8_k$ = function () {
    return this.id_1;
  };
  protoOf(TerminologyEntry).get_stringResource_4df0w8_k$ = function () {
    return this.stringResource_1;
  };
  protoOf(TerminologyEntry).set_term_sj1xny_k$ = function (_set____db54di) {
    this.term_1 = _set____db54di;
  };
  protoOf(TerminologyEntry).get_term_wouvn9_k$ = function () {
    return this.term_1;
  };
  protoOf(TerminologyEntry).set_errorMessage_lkp70b_k$ = function (_set____db54di) {
    this.errorMessage_1 = _set____db54di;
  };
  protoOf(TerminologyEntry).get_errorMessage_ofxtm0_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(TerminologyEntry).component1_7eebsc_k$ = function () {
    return this.id_1;
  };
  protoOf(TerminologyEntry).component2_7eebsb_k$ = function () {
    return this.stringResource_1;
  };
  protoOf(TerminologyEntry).component3_7eebsa_k$ = function () {
    return this.term_1;
  };
  protoOf(TerminologyEntry).component4_7eebs9_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(TerminologyEntry).copy_crm7qi_k$ = function (id, stringResource, term, errorMessage) {
    return new TerminologyEntry(id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).copy$default_cdbhlx_k$ = function (id, stringResource, term, errorMessage, $super) {
    id = id === VOID ? this.id_1 : id;
    stringResource = stringResource === VOID ? this.stringResource_1 : stringResource;
    term = term === VOID ? this.term_1 : term;
    errorMessage = errorMessage === VOID ? this.errorMessage_1 : errorMessage;
    return $super === VOID ? this.copy_crm7qi_k$(id, stringResource, term, errorMessage) : $super.copy_crm7qi_k$.call(this, id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).toString = function () {
    return 'TerminologyEntry(id=' + this.id_1 + ', stringResource=' + this.stringResource_1 + ', term=' + this.term_1 + ', errorMessage=' + this.errorMessage_1 + ')';
  };
  protoOf(TerminologyEntry).hashCode = function () {
    var result = getStringHashCode(this.id_1);
    result = imul(result, 31) + this.stringResource_1.hashCode() | 0;
    result = imul(result, 31) + (this.term_1 == null ? 0 : getStringHashCode(this.term_1)) | 0;
    result = imul(result, 31) + (this.errorMessage_1 == null ? 0 : getStringHashCode(this.errorMessage_1)) | 0;
    return result;
  };
  protoOf(TerminologyEntry).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TerminologyEntry))
      return false;
    var tmp0_other_with_cast = other instanceof TerminologyEntry ? other : THROW_CCE();
    if (!(this.id_1 === tmp0_other_with_cast.id_1))
      return false;
    if (!this.stringResource_1.equals(tmp0_other_with_cast.stringResource_1))
      return false;
    if (!(this.term_1 == tmp0_other_with_cast.term_1))
      return false;
    if (!(this.errorMessage_1 == tmp0_other_with_cast.errorMessage_1))
      return false;
    return true;
  };
  function PersonConstants() {
    PersonConstants_instance = this;
    this.GENDER_MESSAGE_IDS_1 = listOf([new MessageIdOption2(strings_getInstance().get_female_d9sfv9_k$(), Companion_getInstance_7().get_GENDER_FEMALE_dh67xb_k$()), new MessageIdOption2(strings_getInstance().get_male_woqbme_k$(), Companion_getInstance_7().get_GENDER_MALE_56n82m_k$()), new MessageIdOption2(strings_getInstance().get_other_iwivon_k$(), Companion_getInstance_7().get_GENDER_OTHER_imc79h_k$())]);
    this.GENDER_MESSAGE_IDS_AND_UNSET_1 = plus(listOf_0(new MessageIdOption2(strings_getInstance().get_unset_izq1hc_k$(), Companion_getInstance_7().get_GENDER_UNSET_ij51gs_k$())), this.GENDER_MESSAGE_IDS_1);
  }
  protoOf(PersonConstants).get_GENDER_MESSAGE_IDS_o7v4c5_k$ = function () {
    return this.GENDER_MESSAGE_IDS_1;
  };
  protoOf(PersonConstants).get_GENDER_MESSAGE_IDS_AND_UNSET_762xdf_k$ = function () {
    return this.GENDER_MESSAGE_IDS_AND_UNSET_1;
  };
  var PersonConstants_instance;
  function PersonConstants_getInstance() {
    if (PersonConstants_instance == null)
      new PersonConstants();
    return PersonConstants_instance;
  }
  function _get__commandFlow__74fetr($this) {
    return $this._commandFlow_1;
  }
  function CommandFlowUstadNavController() {
    this._commandFlow_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.commandFlow_1 = asSharedFlow(this._commandFlow_1);
  }
  protoOf(CommandFlowUstadNavController).get_commandFlow_aa1dg0_k$ = function () {
    return this.commandFlow_1;
  };
  protoOf(CommandFlowUstadNavController).navigate_6urlkw_k$ = function (viewName, args, goOptions) {
    this._commandFlow_1.tryEmit_ru0jrz_k$(new NavigateNavCommand(viewName, args, goOptions));
  };
  protoOf(CommandFlowUstadNavController).popBackStack_rnnumt_k$ = function (viewName, inclusive) {
    this._commandFlow_1.tryEmit_ru0jrz_k$(new PopNavCommand(viewName, inclusive));
  };
  function NavCommand(timestamp) {
    this.timestamp_1 = timestamp;
  }
  protoOf(NavCommand).get_timestamp_9fccx9_k$ = function () {
    return this.timestamp_1;
  };
  function NavigateNavCommand(viewName, args, goOptions) {
    NavCommand.call(this, systemTimeInMillis());
    this.viewName_1 = viewName;
    this.args_1 = args;
    this.goOptions_1 = goOptions;
  }
  protoOf(NavigateNavCommand).get_viewName_c12mav_k$ = function () {
    return this.viewName_1;
  };
  protoOf(NavigateNavCommand).get_args_woj09y_k$ = function () {
    return this.args_1;
  };
  protoOf(NavigateNavCommand).get_goOptions_67q8lv_k$ = function () {
    return this.goOptions_1;
  };
  protoOf(NavigateNavCommand).component1_7eebsc_k$ = function () {
    return this.viewName_1;
  };
  protoOf(NavigateNavCommand).component2_7eebsb_k$ = function () {
    return this.args_1;
  };
  protoOf(NavigateNavCommand).component3_7eebsa_k$ = function () {
    return this.goOptions_1;
  };
  protoOf(NavigateNavCommand).copy_yu31zo_k$ = function (viewName, args, goOptions) {
    return new NavigateNavCommand(viewName, args, goOptions);
  };
  protoOf(NavigateNavCommand).copy$default_niikrb_k$ = function (viewName, args, goOptions, $super) {
    viewName = viewName === VOID ? this.viewName_1 : viewName;
    args = args === VOID ? this.args_1 : args;
    goOptions = goOptions === VOID ? this.goOptions_1 : goOptions;
    return $super === VOID ? this.copy_yu31zo_k$(viewName, args, goOptions) : $super.copy_yu31zo_k$.call(this, viewName, args, goOptions);
  };
  protoOf(NavigateNavCommand).toString = function () {
    return 'NavigateNavCommand(viewName=' + this.viewName_1 + ', args=' + this.args_1 + ', goOptions=' + this.goOptions_1 + ')';
  };
  protoOf(NavigateNavCommand).hashCode = function () {
    var result = getStringHashCode(this.viewName_1);
    result = imul(result, 31) + hashCode(this.args_1) | 0;
    result = imul(result, 31) + this.goOptions_1.hashCode() | 0;
    return result;
  };
  protoOf(NavigateNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavigateNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof NavigateNavCommand ? other : THROW_CCE();
    if (!(this.viewName_1 === tmp0_other_with_cast.viewName_1))
      return false;
    if (!equals(this.args_1, tmp0_other_with_cast.args_1))
      return false;
    if (!this.goOptions_1.equals(tmp0_other_with_cast.goOptions_1))
      return false;
    return true;
  };
  function PopNavCommand(viewName, inclusive) {
    NavCommand.call(this, systemTimeInMillis());
    this.viewName_1 = viewName;
    this.inclusive_1 = inclusive;
  }
  protoOf(PopNavCommand).get_viewName_c12mav_k$ = function () {
    return this.viewName_1;
  };
  protoOf(PopNavCommand).get_inclusive_g8fo3h_k$ = function () {
    return this.inclusive_1;
  };
  protoOf(PopNavCommand).component1_7eebsc_k$ = function () {
    return this.viewName_1;
  };
  protoOf(PopNavCommand).component2_7eebsb_k$ = function () {
    return this.inclusive_1;
  };
  protoOf(PopNavCommand).copy_smzrfk_k$ = function (viewName, inclusive) {
    return new PopNavCommand(viewName, inclusive);
  };
  protoOf(PopNavCommand).copy$default_nf5m2w_k$ = function (viewName, inclusive, $super) {
    viewName = viewName === VOID ? this.viewName_1 : viewName;
    inclusive = inclusive === VOID ? this.inclusive_1 : inclusive;
    return $super === VOID ? this.copy_smzrfk_k$(viewName, inclusive) : $super.copy_smzrfk_k$.call(this, viewName, inclusive);
  };
  protoOf(PopNavCommand).toString = function () {
    return 'PopNavCommand(viewName=' + this.viewName_1 + ', inclusive=' + this.inclusive_1 + ')';
  };
  protoOf(PopNavCommand).hashCode = function () {
    var result = getStringHashCode(this.viewName_1);
    result = imul(result, 31) + getBooleanHashCode(this.inclusive_1) | 0;
    return result;
  };
  protoOf(PopNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PopNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof PopNavCommand ? other : THROW_CCE();
    if (!(this.viewName_1 === tmp0_other_with_cast.viewName_1))
      return false;
    if (!(this.inclusive_1 === tmp0_other_with_cast.inclusive_1))
      return false;
    return true;
  };
  function NavResult(key, timestamp, result) {
    this.key_1 = key;
    this.timestamp_1 = timestamp;
    this.result_1 = result;
  }
  protoOf(NavResult).get_key_18j28a_k$ = function () {
    return this.key_1;
  };
  protoOf(NavResult).get_timestamp_9fccx9_k$ = function () {
    return this.timestamp_1;
  };
  protoOf(NavResult).get_result_iyg5d2_k$ = function () {
    return this.result_1;
  };
  protoOf(NavResult).component1_7eebsc_k$ = function () {
    return this.key_1;
  };
  protoOf(NavResult).component2_7eebsb_k$ = function () {
    return this.timestamp_1;
  };
  protoOf(NavResult).component3_7eebsa_k$ = function () {
    return this.result_1;
  };
  protoOf(NavResult).copy_oin3my_k$ = function (key, timestamp, result) {
    return new NavResult(key, timestamp, result);
  };
  protoOf(NavResult).copy$default_143xta_k$ = function (key, timestamp, result, $super) {
    key = key === VOID ? this.key_1 : key;
    timestamp = timestamp === VOID ? this.timestamp_1 : timestamp;
    result = result === VOID ? this.result_1 : result;
    return $super === VOID ? this.copy_oin3my_k$(key, timestamp, result) : $super.copy_oin3my_k$.call(this, key, timestamp, result);
  };
  protoOf(NavResult).toString = function () {
    return 'NavResult(key=' + this.key_1 + ', timestamp=' + this.timestamp_1.toString() + ', result=' + toString_1(this.result_1) + ')';
  };
  protoOf(NavResult).hashCode = function () {
    var result = getStringHashCode(this.key_1);
    result = imul(result, 31) + this.timestamp_1.hashCode() | 0;
    result = imul(result, 31) + (this.result_1 == null ? 0 : hashCode(this.result_1)) | 0;
    return result;
  };
  protoOf(NavResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavResult))
      return false;
    var tmp0_other_with_cast = other instanceof NavResult ? other : THROW_CCE();
    if (!(this.key_1 === tmp0_other_with_cast.key_1))
      return false;
    if (!this.timestamp_1.equals(tmp0_other_with_cast.timestamp_1))
      return false;
    if (!equals(this.result_1, tmp0_other_with_cast.result_1))
      return false;
    return true;
  };
  function NavResultDest(viewName, key) {
    this.viewName_1 = viewName;
    this.key_1 = key;
  }
  protoOf(NavResultDest).get_viewName_c12mav_k$ = function () {
    return this.viewName_1;
  };
  protoOf(NavResultDest).get_key_18j28a_k$ = function () {
    return this.key_1;
  };
  function NavResultReturner() {
  }
  function UstadNavController() {
  }
  function UstadSavedStateHandle() {
  }
  function RefreshCommand(time) {
    time = time === VOID ? systemTimeInMillis() : time;
    this.time_1 = time;
  }
  protoOf(RefreshCommand).get_time_wouyhi_k$ = function () {
    return this.time_1;
  };
  function generateUid(_this__u8e3s4) {
    return toLong(_this__u8e3s4.get_clazzLogClazzUid_p2tbpp_k$().hashCode()).shl_bg8if3_k$(32).or_v7fvkl_k$(toLong(_this__u8e3s4.get_logDate_6wppgp_k$().hashCode()));
  }
  function UriHelper() {
  }
  function UrlKmp() {
  }
  function UsernameErrorException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, UsernameErrorException);
  }
  function requireEntryByUri(_this__u8e3s4, uri) {
    var tmp0_elvis_lhs = entryByUri(_this__u8e3s4, uri);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('Manifest has no entry for ' + uri);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function entryByUri(_this__u8e3s4, uri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.get_entries_p20ztl_k$().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.util.entryByUri.<anonymous>' call
        if (element.get_uri_18iuil_k$() === uri) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  }
  function _get_maxWaitTime__cgml91($this) {
    return $this.maxWaitTime_1;
  }
  function _get_coroutineScope__o75s5t($this) {
    return $this.coroutineScope_1;
  }
  function _get_onCollate__dq7uui($this) {
    return $this.onCollate_1;
  }
  function tryReceiveAll(_this__u8e3s4, $this) {
    var resultList = mutableLinkedListOf([]);
    while (true) {
      var result = _this__u8e3s4.tryReceive_y3ovg2_k$();
      if (_ChannelResult___get_isSuccess__impl__odq1z9(result)) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = ChannelResult__getOrThrow_impl_od1axs(result);
        resultList.add_utx5q5_k$(element);
      } else
        return resultList;
    }
  }
  function _get_channel__c6e3yq($this) {
    return $this.channel_1;
  }
  function _set_dispatchJob__ooylby($this, _set____db54di) {
    $this.dispatchJob_1 = _set____db54di;
  }
  function _get_dispatchJob__5lfkzy($this) {
    return $this.dispatchJob_1;
  }
  function EventCollator2$receiveEvent$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EventCollator2$receiveEvent$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EventCollator2$receiveEvent$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EventCollator2$receiveEvent$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.this$0__1.maxWaitTime_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.dispatchJob_1 = null;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.onCollate_1(tryReceiveAll(this.this$0__1.channel_1, this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(EventCollator2$receiveEvent$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new EventCollator2$receiveEvent$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(EventCollator2$receiveEvent$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function EventCollator2$receiveEvent$slambda_0(this$0, resultContinuation) {
    var i = new EventCollator2$receiveEvent$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EventCollator2(maxWaitTime, coroutineScope, capacity, onBufferOverflow, onCollate) {
    this.maxWaitTime_1 = maxWaitTime;
    this.coroutineScope_1 = coroutineScope;
    this.onCollate_1 = onCollate;
    this.channel_1 = Channel(capacity, onBufferOverflow);
    this.dispatchJob_1 = null;
  }
  protoOf(EventCollator2).receiveEvent_cmiqeg_k$ = function (event) {
    this.channel_1.trySend_62dpg8_k$(event);
    if (this.dispatchJob_1 == null) {
      var tmp = this;
      tmp.dispatchJob_1 = launch(this.coroutineScope_1, VOID, VOID, EventCollator2$receiveEvent$slambda_0(this, null));
    }
  };
  function ExceptionWithStringResource() {
  }
  function IdOption(description, optionId) {
    this.description_1 = description;
    this.optionId_1 = optionId;
  }
  protoOf(IdOption).get_description_emjre5_k$ = function () {
    return this.description_1;
  };
  protoOf(IdOption).get_optionId_x3zd8n_k$ = function () {
    return this.optionId_1;
  };
  protoOf(IdOption).toString = function () {
    return this.description_1;
  };
  protoOf(IdOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof IdOption))
      return false;
    if (!(this.description_1 === other.description_1))
      return false;
    if (!(this.optionId_1 === other.optionId_1))
      return false;
    return true;
  };
  protoOf(IdOption).hashCode = function () {
    var result = getStringHashCode(this.description_1);
    result = imul(31, result) + this.optionId_1 | 0;
    return result;
  };
  function ListFilterIdOption(description, optionId) {
    IdOption.call(this, description, optionId);
  }
  function Companion_90() {
    Companion_instance_90 = this;
    this.UNSET_VALUE_1 = -1;
    this.UNSET_1 = new MessageIdOption2(strings_getInstance().get_unset_izq1hc_k$(), this.UNSET_VALUE_1);
  }
  protoOf(Companion_90).get_UNSET_VALUE_a7ctv6_k$ = function () {
    return this.UNSET_VALUE_1;
  };
  protoOf(Companion_90).get_UNSET_ihjie8_k$ = function () {
    return this.UNSET_1;
  };
  var Companion_instance_90;
  function Companion_getInstance_151() {
    if (Companion_instance_90 == null)
      new Companion_90();
    return Companion_instance_90;
  }
  function MessageIdOption2(stringResource, value) {
    Companion_getInstance_151();
    this.stringResource_1 = stringResource;
    this.value_1 = value;
  }
  protoOf(MessageIdOption2).get_stringResource_4df0w8_k$ = function () {
    return this.stringResource_1;
  };
  protoOf(MessageIdOption2).get_value_j01efc_k$ = function () {
    return this.value_1;
  };
  protoOf(MessageIdOption2).component1_7eebsc_k$ = function () {
    return this.stringResource_1;
  };
  protoOf(MessageIdOption2).component2_7eebsb_k$ = function () {
    return this.value_1;
  };
  protoOf(MessageIdOption2).copy_ojp8ck_k$ = function (stringResource, value) {
    return new MessageIdOption2(stringResource, value);
  };
  protoOf(MessageIdOption2).copy$default_fqex5a_k$ = function (stringResource, value, $super) {
    stringResource = stringResource === VOID ? this.stringResource_1 : stringResource;
    value = value === VOID ? this.value_1 : value;
    return $super === VOID ? this.copy_ojp8ck_k$(stringResource, value) : $super.copy_ojp8ck_k$.call(this, stringResource, value);
  };
  protoOf(MessageIdOption2).toString = function () {
    return 'MessageIdOption2(stringResource=' + this.stringResource_1 + ', value=' + this.value_1 + ')';
  };
  protoOf(MessageIdOption2).hashCode = function () {
    var result = this.stringResource_1.hashCode();
    result = imul(result, 31) + this.value_1 | 0;
    return result;
  };
  protoOf(MessageIdOption2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageIdOption2))
      return false;
    var tmp0_other_with_cast = other instanceof MessageIdOption2 ? other : THROW_CCE();
    if (!this.stringResource_1.equals(tmp0_other_with_cast.stringResource_1))
      return false;
    if (!(this.value_1 === tmp0_other_with_cast.value_1))
      return false;
    return true;
  };
  function get_MS_PER_HOUR() {
    return MS_PER_HOUR;
  }
  var MS_PER_HOUR;
  function SortOrderOption(fieldMessageId, flag, order) {
    this.fieldMessageId_1 = fieldMessageId;
    this.flag_1 = flag;
    this.order_1 = order;
  }
  protoOf(SortOrderOption).get_fieldMessageId_lkzkun_k$ = function () {
    return this.fieldMessageId_1;
  };
  protoOf(SortOrderOption).get_flag_wom2lx_k$ = function () {
    return this.flag_1;
  };
  protoOf(SortOrderOption).get_order_iwhiqt_k$ = function () {
    return this.order_1;
  };
  protoOf(SortOrderOption).component1_7eebsc_k$ = function () {
    return this.fieldMessageId_1;
  };
  protoOf(SortOrderOption).component2_7eebsb_k$ = function () {
    return this.flag_1;
  };
  protoOf(SortOrderOption).component3_7eebsa_k$ = function () {
    return this.order_1;
  };
  protoOf(SortOrderOption).copy_5xybnw_k$ = function (fieldMessageId, flag, order) {
    return new SortOrderOption(fieldMessageId, flag, order);
  };
  protoOf(SortOrderOption).copy$default_5v5497_k$ = function (fieldMessageId, flag, order, $super) {
    fieldMessageId = fieldMessageId === VOID ? this.fieldMessageId_1 : fieldMessageId;
    flag = flag === VOID ? this.flag_1 : flag;
    order = order === VOID ? this.order_1 : order;
    return $super === VOID ? this.copy_5xybnw_k$(fieldMessageId, flag, order) : $super.copy_5xybnw_k$.call(this, fieldMessageId, flag, order);
  };
  protoOf(SortOrderOption).toString = function () {
    return 'SortOrderOption(fieldMessageId=' + this.fieldMessageId_1 + ', flag=' + this.flag_1 + ', order=' + this.order_1 + ')';
  };
  protoOf(SortOrderOption).hashCode = function () {
    var result = this.fieldMessageId_1.hashCode();
    result = imul(result, 31) + this.flag_1 | 0;
    result = imul(result, 31) + (this.order_1 == null ? 0 : getBooleanHashCode(this.order_1)) | 0;
    return result;
  };
  protoOf(SortOrderOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SortOrderOption))
      return false;
    var tmp0_other_with_cast = other instanceof SortOrderOption ? other : THROW_CCE();
    if (!this.fieldMessageId_1.equals(tmp0_other_with_cast.fieldMessageId_1))
      return false;
    if (!(this.flag_1 === tmp0_other_with_cast.flag_1))
      return false;
    if (!(this.order_1 == tmp0_other_with_cast.order_1))
      return false;
    return true;
  };
  function _get_UNIT_GB__rqvbtx($this) {
    return $this.UNIT_GB_1;
  }
  function _get_UNIT_MB__rqv7dr($this) {
    return $this.UNIT_MB_1;
  }
  function _get_UNIT_KB__rqv8v5($this) {
    return $this.UNIT_KB_1;
  }
  function isUriAbsoluteLcase($this, uriLower) {
    var charFoundIndex = indexOf_0(uriLower, '://');
    if (!(charFoundIndex === -1)) {
      var isAllChars = true;
      var cc;
      var inductionVariable = 0;
      if (inductionVariable < charFoundIndex)
        do {
          var i = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          cc = charSequenceGet(uriLower, i);
          isAllChars = !!(isAllChars & (((((_Char___init__impl__6a9atx(98) <= cc ? cc <= _Char___init__impl__6a9atx(121) : false) ? true : _Char___init__impl__6a9atx(49) <= cc ? cc <= _Char___init__impl__6a9atx(56) : false) ? true : cc === _Char___init__impl__6a9atx(43)) ? true : cc === _Char___init__impl__6a9atx(46)) ? true : cc === _Char___init__impl__6a9atx(45)));
        }
         while (inductionVariable < charFoundIndex);
      if (isAllChars) {
        return true;
      }
    }
    return false;
  }
  function splitString($this, str, splitChar) {
    var numParts = countChar($this, str, splitChar);
    // Inline function 'kotlin.arrayOfNulls' call
    var size = numParts + 1 | 0;
    var splitStr = fillArrayVal(Array(size), null);
    var buffer = StringBuilder_init_$Create$();
    var partCounter = 0;
    var currentChar;
    var inductionVariable = 0;
    var last = str.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        currentChar = charSequenceGet(str, i);
        if (currentChar === splitChar) {
          splitStr[partCounter] = buffer.toString();
          partCounter = partCounter + 1 | 0;
          buffer = StringBuilder_init_$Create$();
        } else {
          buffer.append_am5a4z_k$(currentChar);
        }
      }
       while (inductionVariable < last);
    splitStr[partCounter] = buffer.toString();
    return splitStr;
  }
  function countChar($this, str, c) {
    var count = 0;
    var strLen = str.length;
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (charSequenceGet(str, i) === c) {
          count = count + 1 | 0;
        }
      }
       while (inductionVariable < strLen);
    return count;
  }
  function TypeWithParamHeader(typeName, params) {
    this.typeName_1 = typeName;
    this.params_1 = params;
  }
  protoOf(TypeWithParamHeader).set_typeName_ori4l4_k$ = function (_set____db54di) {
    this.typeName_1 = _set____db54di;
  };
  protoOf(TypeWithParamHeader).get_typeName_s1eeum_k$ = function () {
    return this.typeName_1;
  };
  protoOf(TypeWithParamHeader).set_params_2v6l0o_k$ = function (_set____db54di) {
    this.params_1 = _set____db54di;
  };
  protoOf(TypeWithParamHeader).get_params_hy4oen_k$ = function () {
    return this.params_1;
  };
  protoOf(TypeWithParamHeader).getParam_lm5u4d_k$ = function (paramName) {
    var tmp;
    if (!(this.params_1 == null) ? ensureNotNull(this.params_1).containsKey_aw81wo_k$(paramName) : false) {
      var tmp_0 = ensureNotNull(this.params_1).get_wei43m_k$(paramName);
      tmp = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    } else {
      tmp = null;
    }
    return tmp;
  };
  function isWhiteSpace($this, c) {
    return ((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(9)) ? true : c === _Char___init__impl__6a9atx(13);
  }
  function UMFileUtil() {
    UMFileUtil_instance = this;
    this.FILE_SEP_1 = _Char___init__impl__6a9atx(47);
    this.PROTOCOL_FILE_1 = 'file:///';
    this.UNIT_GB_1 = new Long(1073741824, 0);
    this.UNIT_MB_1 = new Long(1048576, 0);
    this.UNIT_KB_1 = new Long(1024, 0);
  }
  protoOf(UMFileUtil).get_FILE_SEP_f60n9i_k$ = function () {
    return this.FILE_SEP_1;
  };
  protoOf(UMFileUtil).get_PROTOCOL_FILE_8isdpi_k$ = function () {
    return this.PROTOCOL_FILE_1;
  };
  protoOf(UMFileUtil).joinPaths_ysd08s_k$ = function (paths) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>' call
    // Inline function 'kotlin.collections.forEachIndexed' call
    var index = 0;
    var inductionVariable = 0;
    var last = paths.length;
    while (inductionVariable < last) {
      var item = paths[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var tmp;
      if (tmp1 > 0) {
        tmp = removePrefix(item, '/');
      } else {
        tmp = item;
      }
      this_0.append_22ad7x_k$(tmp);
      if (tmp1 < (paths.length - 1 | 0) ? !endsWith(item, '/') : false) {
        this_0.append_am5a4z_k$(_Char___init__impl__6a9atx(47));
      }
    }
    return this_0.toString();
  };
  protoOf(UMFileUtil).resolveLink_lx3s8q_k$ = function (baseLink, link) {
    var base = baseLink;
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var linkLower = link.toLowerCase();
    var charFoundIndex;
    charFoundIndex = indexOf_0(linkLower, '://');
    if (!(charFoundIndex === -1)) {
      var isAllChars = true;
      var cc;
      var inductionVariable = 0;
      var last = charFoundIndex;
      if (inductionVariable < last)
        do {
          var i = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          cc = charSequenceGet(linkLower, i);
          isAllChars = !!(isAllChars & (((((Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(97)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(122)) < 0 : false) ? true : Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(48)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(57)) < 0 : false) ? true : cc === _Char___init__impl__6a9atx(43)) ? true : cc === _Char___init__impl__6a9atx(46)) ? true : cc === _Char___init__impl__6a9atx(45)));
        }
         while (inductionVariable < last);
      if (isAllChars) {
        return link;
      }
    }
    if (startsWith(link, 'data:')) {
      return link;
    }
    if ((link.length > 2 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) ? charSequenceGet(link, 1) === _Char___init__impl__6a9atx(47) : false) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = base;
      var endIndex = indexOf(base, _Char___init__impl__6a9atx(58)) + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      return this_0.substring(0, endIndex) + link;
    }
    if (link.length > 1 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) {
      var serverStartPos = indexOf_0(base, '://') + 3 | 0;
      var serverFinishPos = indexOf(base, _Char___init__impl__6a9atx(47), serverStartPos + 1 | 0);
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      return base.substring(0, serverFinishPos) + link;
    }
    charFoundIndex = indexOf(base, _Char___init__impl__6a9atx(63));
    if (!(charFoundIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_1 = base;
      var endIndex_0 = charFoundIndex;
      // Inline function 'kotlin.js.asDynamic' call
      base = this_1.substring(0, endIndex_0);
    }
    charFoundIndex = lastIndexOf(base, _Char___init__impl__6a9atx(47));
    if (charFoundIndex === -1) {
      return link;
    }
    // Inline function 'kotlin.text.substring' call
    var this_2 = base;
    var endIndex_1 = charFoundIndex;
    // Inline function 'kotlin.js.asDynamic' call
    base = this_2.substring(0, endIndex_1);
    var baseParts = splitString(this, base, _Char___init__impl__6a9atx(47));
    var linkParts = splitString(this, link, _Char___init__impl__6a9atx(47));
    // Inline function 'kotlin.collections.mutableListOf' call
    var resultVector = ArrayList_init_$Create$();
    var inductionVariable_0 = 0;
    var last_0 = baseParts.length - 1 | 0;
    if (inductionVariable_0 <= last_0)
      do {
        var i_0 = inductionVariable_0;
        inductionVariable_0 = inductionVariable_0 + 1 | 0;
        resultVector.add_utx5q5_k$(ensureNotNull(baseParts[i_0]));
      }
       while (inductionVariable_0 <= last_0);
    var inductionVariable_1 = 0;
    var last_1 = linkParts.length - 1 | 0;
    if (inductionVariable_1 <= last_1)
      $l$loop: do {
        var i_1 = inductionVariable_1;
        inductionVariable_1 = inductionVariable_1 + 1 | 0;
        if (linkParts[i_1] === '.') {
          continue $l$loop;
        }
        if (linkParts[i_1] === '..') {
          resultVector.removeAt_6niowx_k$(resultVector.get_size_woubt6_k$() - 1 | 0);
        } else {
          resultVector.add_utx5q5_k$(ensureNotNull(linkParts[i_1]));
        }
      }
       while (inductionVariable_1 <= last_1);
    var resultSB = StringBuilder_init_$Create$();
    var numElements = resultVector.get_size_woubt6_k$();
    var inductionVariable_2 = 0;
    if (inductionVariable_2 < numElements)
      do {
        var i_2 = inductionVariable_2;
        inductionVariable_2 = inductionVariable_2 + 1 | 0;
        // Inline function 'kotlin.collections.elementAt' call
        var tmp$ret$11 = resultVector.get_c1px32_k$(i_2);
        resultSB.append_22ad7x_k$(tmp$ret$11);
        if (i_2 < (numElements - 1 | 0)) {
          resultSB.append_am5a4z_k$(_Char___init__impl__6a9atx(47));
        }
      }
       while (inductionVariable_2 < numElements);
    return resultSB.toString();
  };
  protoOf(UMFileUtil).isUriAbsolute_d2ukpt_k$ = function (uri) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$1 = uri.toLowerCase();
    return isUriAbsoluteLcase(this, tmp$ret$1);
  };
  protoOf(UMFileUtil).joinString_m225m2_k$ = function (strArr, joinChar) {
    var resultSB = StringBuilder_init_$Create$();
    var numElements = strArr.length;
    var inductionVariable = 0;
    if (inductionVariable < numElements)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        resultSB.append_22ad7x_k$(strArr[i]);
        if (i < (numElements - 1 | 0)) {
          resultSB.append_am5a4z_k$(joinChar);
        }
      }
       while (inductionVariable < numElements);
    return resultSB.toString();
  };
  protoOf(UMFileUtil).getFilename_u2i50d_k$ = function (url) {
    if (url.length === 1) {
      return url === '/' ? '' : url;
    }
    var charPos = lastIndexOf(url, _Char___init__impl__6a9atx(47), url.length - 2 | 0);
    var retVal = url;
    if (!(charPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      var startIndex = charPos + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      retVal = url.substring(startIndex);
    }
    charPos = indexOf_0(retVal, '?');
    if (!(charPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      var endIndex = charPos;
      // Inline function 'kotlin.js.asDynamic' call
      retVal = url.substring(0, endIndex);
    }
    return retVal;
  };
  protoOf(UMFileUtil).parseParams_nh9y7o_k$ = function (str, deliminator) {
    var paramName = null;
    var params = HashMap_init_$Create$();
    var inQuotes = false;
    var strLen = str.length;
    var sb = StringBuilder_init_$Create$();
    var c;
    var lastChar = _Char___init__impl__6a9atx(0);
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        c = charSequenceGet(str, i);
        if (c === _Char___init__impl__6a9atx(34)) {
          if (!inQuotes) {
            inQuotes = true;
          } else if (inQuotes ? !(lastChar === _Char___init__impl__6a9atx(92)) : false) {
            inQuotes = false;
          }
        }
        if (!((isWhiteSpace(this, c) ? !inQuotes : false) ? true : c === _Char___init__impl__6a9atx(34) ? i < (strLen - 1 | 0) : false))
          if (c === deliminator ? true : i === (strLen - 1 | 0)) {
            if (i === (strLen - 1 | 0) ? !(c === _Char___init__impl__6a9atx(34)) : false) {
              sb.append_am5a4z_k$(c);
            }
            if (!(paramName == null)) {
              // Inline function 'kotlin.collections.set' call
              var key = paramName;
              var value = sb.toString();
              params.put_4fpzoq_k$(key, value);
            } else {
              // Inline function 'kotlin.collections.set' call
              var key_0 = sb.toString();
              params.put_4fpzoq_k$(key_0, '');
            }
            sb = StringBuilder_init_$Create$();
            paramName = null;
          } else if (c === _Char___init__impl__6a9atx(61)) {
            paramName = sb.toString();
            sb = StringBuilder_init_$Create$();
          } else {
            sb.append_am5a4z_k$(c);
          }
        lastChar = c;
      }
       while (inductionVariable < strLen);
    return params;
  };
  protoOf(UMFileUtil).parseURLQueryString = function (urlQuery) {
    var retVal = urlQuery;
    var queryPos = indexOf(retVal, _Char___init__impl__6a9atx(63));
    if (!(queryPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = retVal;
      var startIndex = queryPos + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      retVal = this_0.substring(startIndex);
    }
    var parsedParams = this.parseParams_nh9y7o_k$(retVal, _Char___init__impl__6a9atx(38));
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(parsedParams.get_size_woubt6_k$());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = parsedParams.get_entries_p20ztl_k$().iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.parseURLQueryString.<anonymous>' call
      var tmp$ret$3 = to(Companion_getInstance_253().decodeUTF8_sxg78b_k$(item.get_key_18j28a_k$()), Companion_getInstance_253().decodeUTF8_sxg78b_k$(item.get_value_j01efc_k$()));
      destination.add_utx5q5_k$(tmp$ret$3);
    }
    return toMap(destination);
  };
  protoOf(UMFileUtil).mapToQueryString = function (ht) {
    var sb = StringBuilder_init_$Create$();
    if (ht.isEmpty_y1axqb_k$()) {
      return '';
    }
    var keys = ht.get_keys_wop4xp_k$().iterator_jk1svi_k$();
    var key;
    var firstEl = true;
    while (keys.hasNext_bitz1p_k$()) {
      if (!firstEl) {
        sb.append_am5a4z_k$(_Char___init__impl__6a9atx(38));
      } else {
        firstEl = false;
      }
      key = keys.next_20eer_k$();
      sb.append_22ad7x_k$(Companion_getInstance_253().encodeUTF8_iwe365_k$(key)).append_am5a4z_k$(_Char___init__impl__6a9atx(61));
      var tmp = Companion_getInstance_253();
      var tmp_0 = ht.get_wei43m_k$(key);
      sb.append_22ad7x_k$(tmp.encodeUTF8_iwe365_k$((!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE()));
    }
    return sb.toString();
  };
  protoOf(UMFileUtil).parseTypeWithParamHeader_k46f83_k$ = function (header) {
    var result = null;
    var semiPos = indexOf(header, _Char___init__impl__6a9atx(59));
    var typeStr;
    var params = null;
    var tmp;
    if (semiPos === -1) {
      // Inline function 'kotlin.text.trim' call
      // Inline function 'kotlin.text.trim' call
      var this_0 = isCharSequence(header) ? header : THROW_CCE();
      var startIndex = 0;
      var endIndex = charSequenceLength(this_0) - 1 | 0;
      var startFound = false;
      $l$loop: while (startIndex <= endIndex) {
        var index = !startFound ? startIndex : endIndex;
        // Inline function 'com.ustadmobile.core.util.UMFileUtil.parseTypeWithParamHeader.<anonymous>' call
        var it = charSequenceGet(this_0, index);
        var match = Char__compareTo_impl_ypi4mb(it, _Char___init__impl__6a9atx(32)) <= 0;
        if (!startFound) {
          if (!match)
            startFound = true;
          else
            startIndex = startIndex + 1 | 0;
        } else {
          if (!match)
            break $l$loop;
          else
            endIndex = endIndex - 1 | 0;
        }
      }
      var tmp$ret$1 = charSequenceSubSequence(this_0, startIndex, endIndex + 1 | 0);
      tmp = toString(tmp$ret$1);
    } else {
      // Inline function 'kotlin.text.trim' call
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var this_1 = header.substring(0, semiPos);
      // Inline function 'kotlin.text.trim' call
      var this_2 = isCharSequence(this_1) ? this_1 : THROW_CCE();
      var startIndex_0 = 0;
      var endIndex_0 = charSequenceLength(this_2) - 1 | 0;
      var startFound_0 = false;
      $l$loop_0: while (startIndex_0 <= endIndex_0) {
        var index_0 = !startFound_0 ? startIndex_0 : endIndex_0;
        // Inline function 'com.ustadmobile.core.util.UMFileUtil.parseTypeWithParamHeader.<anonymous>' call
        var it_0 = charSequenceGet(this_2, index_0);
        var match_0 = Char__compareTo_impl_ypi4mb(it_0, _Char___init__impl__6a9atx(32)) <= 0;
        if (!startFound_0) {
          if (!match_0)
            startFound_0 = true;
          else
            startIndex_0 = startIndex_0 + 1 | 0;
        } else {
          if (!match_0)
            break $l$loop_0;
          else
            endIndex_0 = endIndex_0 - 1 | 0;
        }
      }
      var tmp$ret$6 = charSequenceSubSequence(this_2, startIndex_0, endIndex_0 + 1 | 0);
      tmp = toString(tmp$ret$6);
    }
    typeStr = tmp;
    if (!(semiPos === -1) ? semiPos < (header.length - 1 | 0) : false) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$9 = header.substring(semiPos);
      params = this.parseParams_nh9y7o_k$(tmp$ret$9, _Char___init__impl__6a9atx(59));
    }
    return new TypeWithParamHeader(typeStr, params);
  };
  protoOf(UMFileUtil).filterFilename_ne8491_k$ = function (filename) {
    var newStr = StringBuilder_init_$Create$_0(filename.length);
    var c;
    var inductionVariable = 0;
    var last = filename.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        c = charSequenceGet(filename, i);
        if (!((((((c === _Char___init__impl__6a9atx(58) ? true : c === _Char___init__impl__6a9atx(47)) ? true : c === _Char___init__impl__6a9atx(92)) ? true : c === _Char___init__impl__6a9atx(42)) ? true : c === _Char___init__impl__6a9atx(62)) ? true : c === _Char___init__impl__6a9atx(60)) ? true : c === _Char___init__impl__6a9atx(63))) {
          newStr.append_am5a4z_k$(c);
        }
      }
       while (inductionVariable < last);
    return newStr.toString();
  };
  protoOf(UMFileUtil).getParentFilename_7hzpv1_k$ = function (uri) {
    if (uri.length === 1) {
      return null;
    }
    var charPos = lastIndexOf(uri, _Char___init__impl__6a9atx(47), uri.length - 2 | 0);
    var tmp;
    if (!(charPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      var endIndex = charPos + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp = uri.substring(0, endIndex);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UMFileUtil).getExtension_rzvlb_k$ = function (uri) {
    var filename = this.getFilename_u2i50d_k$(uri);
    var lastDot = lastIndexOf(filename, _Char___init__impl__6a9atx(46));
    var tmp;
    if (!(lastDot === -1) ? !(lastDot === (filename.length - 1 | 0)) : false) {
      // Inline function 'kotlin.text.substring' call
      var startIndex = lastDot + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp = filename.substring(startIndex);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UMFileUtil).stripAnchorIfPresent_5tz33d_k$ = function (uri) {
    var charPos = lastIndexOf(uri, _Char___init__impl__6a9atx(35));
    var tmp;
    if (!(charPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = uri.substring(0, charPos);
    } else {
      tmp = uri;
    }
    return tmp;
  };
  protoOf(UMFileUtil).formatFileSize_70e2_k$ = function (fileSize) {
    var unit;
    var factor;
    if (fileSize.compareTo_9jj042_k$(new Long(1073741824, 0)) > 0) {
      factor = new Long(1073741824, 0);
      unit = 'GB';
    } else if (fileSize.compareTo_9jj042_k$(new Long(1048576, 0)) > 0) {
      factor = new Long(1048576, 0);
      unit = 'MB';
    } else if (fileSize.compareTo_9jj042_k$(new Long(1024, 0)) > 0) {
      factor = new Long(1024, 0);
      unit = 'kB';
    } else {
      factor = new Long(1, 0);
      unit = 'bytes';
    }
    var unitSize = fileSize.toDouble_ygsx0s_k$() / factor.toDouble_ygsx0s_k$();
    unitSize = round(unitSize * 100) / 100.0;
    return '' + unitSize + ' ' + unit;
  };
  protoOf(UMFileUtil).formatFileSizeMb_o0ulyd_k$ = function (fileSize) {
    var fileSizeMb = roundTo(fileSize.toFloat_jhbgwv_k$() / 1048576, 2);
    return '' + fileSizeMb + ' MB';
  };
  protoOf(UMFileUtil).stripExtensionIfPresent_b2xy0z_k$ = function (uri) {
    var lastSlashPos = lastIndexOf(uri, _Char___init__impl__6a9atx(47));
    var lastDotPos = lastIndexOf(uri, _Char___init__impl__6a9atx(46));
    var tmp;
    if (!(lastDotPos === -1) ? lastDotPos > lastSlashPos : false) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = uri.substring(0, lastDotPos);
    } else {
      tmp = uri;
    }
    return tmp;
  };
  protoOf(UMFileUtil).clearTopFromReferrerPath_iomg3d_k$ = function (viewname, args, referrerPath) {
    var lastIndex = lastIndexOf_0(referrerPath, '/' + viewname + '?');
    var tmp;
    if (!(lastIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      var endIndex = indexOf_0(referrerPath, '/', lastIndex);
      // Inline function 'kotlin.js.asDynamic' call
      tmp = referrerPath.substring(0, endIndex);
    } else {
      tmp = '/' + viewname + '?' + this.mapToQueryString(args);
    }
    return tmp;
  };
  protoOf(UMFileUtil).getContentType_noocsj_k$ = function (filePath) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.text.substring' call
    var startIndex = lastIndexOf_0(filePath, '.');
    // Inline function 'kotlin.js.asDynamic' call
    // Inline function 'kotlin.js.asDynamic' call
    var extension = filePath.substring(startIndex).toLowerCase();
    var extensionMap = mapOf([to('.html', Text_getInstance().get_Html_wo3384_k$()), to('.xml', Text_getInstance().get_Xml_18jg4y_k$()), to('.css', Text_getInstance().get_CSS_18jwcm_k$()), to('.js', Text_getInstance().get_JavaScript_roqba_k$()), to('.json', Application_getInstance().get_Json_wo4ci9_k$()), to('.txt', Text_getInstance().get_Html_wo3384_k$()), to('.xhtml', Text_getInstance().get_Html_wo3384_k$()), to('.jpg', Image_getInstance().get_JPEG_wo3lip_k$()), to('.png', Image_getInstance().get_PNG_18jmu8_k$()), to('.gif', Image_getInstance().get_GIF_18jtmt_k$()), to('.webp', ContentType_init_$Create$('image', 'webp')), to('.mp4', Video_getInstance().get_MP4_18jp14_k$()), to('.mpeg', Video_getInstance().get_MPEG_wo5iha_k$()), to('.m4v', ContentType_init_$Create$('video', 'x-m4v')), to('.webm', ContentType_init_$Create$('video', 'webm')), to('.ogv', ContentType_init_$Create$('video', 'ogg')), to('.mp3', Audio_getInstance().get_MPEG_wo5iha_k$()), to('.ogg', ContentType_init_$Create$('audio', 'ogg'))]);
    var tmp0_elvis_lhs = extensionMap.get_wei43m_k$(extension);
    return tmp0_elvis_lhs == null ? Companion_getInstance_32().get_Any_18jx5p_k$() : tmp0_elvis_lhs;
  };
  var UMFileUtil_instance;
  function UMFileUtil_getInstance() {
    if (UMFileUtil_instance == null)
      new UMFileUtil();
    return UMFileUtil_instance;
  }
  function Companion_91() {
    Companion_instance_91 = this;
    this.DEFAULT_DIVIDER_1 = '/#/';
  }
  protoOf(Companion_91).get_DEFAULT_DIVIDER_dqxdde_k$ = function () {
    return this.DEFAULT_DIVIDER_1;
  };
  protoOf(Companion_91).parse_2uyqq5_k$ = function (url, divider) {
    var dividerIndex = indexOf_0(url, divider);
    if (dividerIndex === -1)
      throw IllegalArgumentException_init_$Create$('Not a valid UstadUrl: ' + url);
    // Inline function 'kotlin.text.substring' call
    var endIndex = dividerIndex + 1 | 0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$1 = url.substring(0, endIndex);
    var endpoint = removeSuffix(tmp$ret$1, 'umapp/');
    var queryIndex = indexOf_0(url, '?', dividerIndex);
    var viewName;
    var queryString;
    if (queryIndex === -1 ? true : queryIndex === (url.length - 1 | 0)) {
      // Inline function 'kotlin.text.substring' call
      var startIndex = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = url.substring(startIndex);
      viewName = removeSuffix(tmp$ret$3, '?');
      queryString = '';
    } else {
      // Inline function 'kotlin.text.substring' call
      var startIndex_0 = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      viewName = url.substring(startIndex_0, queryIndex);
      // Inline function 'kotlin.text.substring' call
      var startIndex_1 = queryIndex + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      queryString = url.substring(startIndex_1);
    }
    return new UstadUrlComponents(endpoint, viewName, queryString);
  };
  protoOf(Companion_91).parse$default_z354sd_k$ = function (url, divider, $super) {
    divider = divider === VOID ? '/#/' : divider;
    return $super === VOID ? this.parse_2uyqq5_k$(url, divider) : $super.parse_2uyqq5_k$.call(this, url, divider);
  };
  var Companion_instance_91;
  function Companion_getInstance_152() {
    if (Companion_instance_91 == null)
      new Companion_91();
    return Companion_instance_91;
  }
  function UstadUrlComponents$arguments$delegate$lambda(this$0) {
    return function () {
      var parsedParams = UMFileUtil_getInstance().parseParams_nh9y7o_k$(this$0.queryString_1, _Char___init__impl__6a9atx(38));
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(parsedParams.get_size_woubt6_k$());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = parsedParams.get_entries_p20ztl_k$().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.util.UstadUrlComponents.arguments$delegate.<anonymous>.<anonymous>' call
        var tmp$ret$1 = to(Companion_getInstance_253().decodeUTF8_sxg78b_k$(item.get_key_18j28a_k$()), Companion_getInstance_253().decodeUTF8_sxg78b_k$(item.get_value_j01efc_k$()));
        destination.add_utx5q5_k$(tmp$ret$1);
      }
      return toMap(destination);
    };
  }
  function UstadUrlComponents$viewUri$delegate$lambda(this$0) {
    return function () {
      var tmp;
      // Inline function 'kotlin.text.isEmpty' call
      var this_0 = this$0.queryString_1;
      if (charSequenceLength(this_0) === 0) {
        tmp = this$0.viewName_1;
      } else {
        tmp = this$0.viewName_1 + '?' + this$0.queryString_1;
      }
      return tmp;
    };
  }
  function UstadUrlComponents(learningSpace, viewName, queryString) {
    Companion_getInstance_152();
    this.learningSpace_1 = learningSpace;
    this.viewName_1 = viewName;
    this.queryString_1 = queryString;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.arguments$delegate_1 = lazy(tmp_0, UstadUrlComponents$arguments$delegate$lambda(this));
    var tmp_1 = this;
    tmp_1.viewUri$delegate_1 = lazy_0(UstadUrlComponents$viewUri$delegate$lambda(this));
  }
  protoOf(UstadUrlComponents).get_learningSpace_sz4skh_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(UstadUrlComponents).get_viewName_c12mav_k$ = function () {
    return this.viewName_1;
  };
  protoOf(UstadUrlComponents).get_queryString_6ylqpc_k$ = function () {
    return this.queryString_1;
  };
  protoOf(UstadUrlComponents).get_arguments_p5ddub_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.arguments$delegate_1;
    arguments$factory();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadUrlComponents).get_viewUri_8rzfku_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.viewUri$delegate_1;
    viewUri$factory();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadUrlComponents).fullUrl_gm28yu_k$ = function (divider) {
    return UMFileUtil_getInstance().joinPaths_ysd08s_k$([this.learningSpace_1, divider, this.get_viewUri_8rzfku_k$()]);
  };
  protoOf(UstadUrlComponents).fullUrl$default_i1ngok_k$ = function (divider, $super) {
    divider = divider === VOID ? Companion_getInstance_144().get_LINK_ENDPOINT_VIEWNAME_DIVIDER_ggr3u0_k$() : divider;
    return $super === VOID ? this.fullUrl_gm28yu_k$(divider) : $super.fullUrl_gm28yu_k$.call(this, divider);
  };
  protoOf(UstadUrlComponents).component1_7eebsc_k$ = function () {
    return this.learningSpace_1;
  };
  protoOf(UstadUrlComponents).component2_7eebsb_k$ = function () {
    return this.viewName_1;
  };
  protoOf(UstadUrlComponents).component3_7eebsa_k$ = function () {
    return this.queryString_1;
  };
  protoOf(UstadUrlComponents).copy_nc7k0r_k$ = function (learningSpace, viewName, queryString) {
    return new UstadUrlComponents(learningSpace, viewName, queryString);
  };
  protoOf(UstadUrlComponents).copy$default_nd3lgz_k$ = function (learningSpace, viewName, queryString, $super) {
    learningSpace = learningSpace === VOID ? this.learningSpace_1 : learningSpace;
    viewName = viewName === VOID ? this.viewName_1 : viewName;
    queryString = queryString === VOID ? this.queryString_1 : queryString;
    return $super === VOID ? this.copy_nc7k0r_k$(learningSpace, viewName, queryString) : $super.copy_nc7k0r_k$.call(this, learningSpace, viewName, queryString);
  };
  protoOf(UstadUrlComponents).toString = function () {
    return 'UstadUrlComponents(learningSpace=' + this.learningSpace_1 + ', viewName=' + this.viewName_1 + ', queryString=' + this.queryString_1 + ')';
  };
  protoOf(UstadUrlComponents).hashCode = function () {
    var result = getStringHashCode(this.learningSpace_1);
    result = imul(result, 31) + getStringHashCode(this.viewName_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.queryString_1) | 0;
    return result;
  };
  protoOf(UstadUrlComponents).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadUrlComponents))
      return false;
    var tmp0_other_with_cast = other instanceof UstadUrlComponents ? other : THROW_CCE();
    if (!(this.learningSpace_1 === tmp0_other_with_cast.learningSpace_1))
      return false;
    if (!(this.viewName_1 === tmp0_other_with_cast.viewName_1))
      return false;
    if (!(this.queryString_1 === tmp0_other_with_cast.queryString_1))
      return false;
    return true;
  };
  function arguments$factory() {
    return getPropertyCallableRef('arguments', 1, KProperty1, function (receiver) {
      return receiver.get_arguments_p5ddub_k$();
    }, null);
  }
  function viewUri$factory() {
    return getPropertyCallableRef('viewUri', 1, KProperty1, function (receiver) {
      return receiver.get_viewUri_8rzfku_k$();
    }, null);
  }
  function get_ROLE_TO_MESSAGEID_MAP() {
    _init_properties_ClazzEnrolmentExt_kt__eho9sz();
    return ROLE_TO_MESSAGEID_MAP;
  }
  var ROLE_TO_MESSAGEID_MAP;
  function get_OUTCOME_TO_MESSAGE_ID_MAP() {
    _init_properties_ClazzEnrolmentExt_kt__eho9sz();
    return OUTCOME_TO_MESSAGE_ID_MAP;
  }
  var OUTCOME_TO_MESSAGE_ID_MAP;
  var properties_initialized_ClazzEnrolmentExt_kt_x2yvhh;
  function _init_properties_ClazzEnrolmentExt_kt__eho9sz() {
    if (!properties_initialized_ClazzEnrolmentExt_kt_x2yvhh) {
      properties_initialized_ClazzEnrolmentExt_kt_x2yvhh = true;
      ROLE_TO_MESSAGEID_MAP = mapOf([to(Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$(), strings_getInstance().get_student_tt8o8e_k$()), to(Companion_getInstance_15().get_ROLE_STUDENT_PENDING_13dnf7_k$(), strings_getInstance().get_student_tt8o8e_k$()), to(Companion_getInstance_15().get_ROLE_TEACHER_obiog2_k$(), strings_getInstance().get_teacher_mjj6rr_k$()), to(Companion_getInstance_15().get_ROLE_PARENT_x7h7vu_k$(), strings_getInstance().get_parent_hy4reb_k$())]);
      OUTCOME_TO_MESSAGE_ID_MAP = mapOf([to(Companion_getInstance_15().get_OUTCOME_IN_PROGRESS_z4xz4h_k$(), strings_getInstance().get_in_progress_1fk8ta_k$()), to(Companion_getInstance_15().get_OUTCOME_DROPPED_OUT_oen6cn_k$(), strings_getInstance().get_dropped_out_k8l9ui_k$()), to(Companion_getInstance_15().get_OUTCOME_FAILED_3n82kt_k$(), strings_getInstance().get_failed_d7ixja_k$()), to(Companion_getInstance_15().get_OUTCOME_GRADUATED_1g2bz1_k$(), strings_getInstance().get_graduated_gdenu8_k$())]);
    }
  }
  function get_effectiveTimeZone(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.get_clazzTimeZone_yu1krs_k$();
    return tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
  }
  function roundTo(_this__u8e3s4, decimalPlaces) {
    decimalPlaces = decimalPlaces === VOID ? 0 : decimalPlaces;
    // Inline function 'kotlin.math.pow' call
    var factor = Math.pow(10.0, decimalPlaces);
    return roundToInt(_this__u8e3s4 * factor) / factor;
  }
  function paramSubtitles(_this__u8e3s4, json) {
    var tmp0_safe_receiver = paramMap(_this__u8e3s4, json);
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_wei43m_k$(Companion_getInstance_33().get_PARAM_KEY_SUBTITLES_95z14w_k$());
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramSubtitles.<anonymous>' call
      tmp = json.decodeFromString_jwu9sq_k$(ListSerializer(Companion_getInstance_95().serializer_9w0wvi_k$()), tmp1_safe_receiver);
    }
    return tmp;
  }
  function paramMap(_this__u8e3s4, json) {
    var tmp0_safe_receiver = _this__u8e3s4.get_cjiParams_jqdy8x_k$();
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramMap.<anonymous>' call
      tmp = json.decodeFromString_jwu9sq_k$(MapSerializer(serializer_0(StringCompanionObject_getInstance()), serializer_0(StringCompanionObject_getInstance())), tmp0_safe_receiver);
    }
    return tmp;
  }
  function lastPossibleSubmissionTime(_this__u8e3s4) {
    if (isDateSet(_this__u8e3s4.get_cbGracePeriodDate_kapsrj_k$()) ? _this__u8e3s4.get_cbGracePeriodDate_kapsrj_k$().compareTo_9jj042_k$(_this__u8e3s4.get_cbDeadlineDate_nvh1aq_k$()) > 0 : false)
      return _this__u8e3s4.get_cbGracePeriodDate_kapsrj_k$();
    else
      return _this__u8e3s4.get_cbDeadlineDate_nvh1aq_k$();
  }
  function toTerminologyEntries(_this__u8e3s4, json, systemImpl) {
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.get_ctTerminology_oszxd3_k$();
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      tmp = decodeStringMapFromString(json, tmp1_safe_receiver);
    }
    var tmp2_elvis_lhs = tmp;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      // Inline function 'kotlin.collections.mapOf' call
      tmp_0 = emptyMap();
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var termMap = tmp_0;
    // Inline function 'kotlin.collections.map' call
    var this_0 = TerminologyKeys_getInstance().get_TERMINOLOGY_ENTRY_MESSAGE_ID_oku5f9_k$();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(this_0.get_size_woubt6_k$());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = this_0.get_entries_p20ztl_k$().iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      var tmp_1 = item.get_key_18j28a_k$();
      var tmp_2 = item.get_value_j01efc_k$();
      var tmp1_elvis_lhs = termMap.get_wei43m_k$(item.get_key_18j28a_k$());
      var tmp_3;
      if (tmp1_elvis_lhs == null) {
        tmp_3 = systemImpl == null ? null : systemImpl.getString_a9yhoi_k$(item.get_value_j01efc_k$());
      } else {
        tmp_3 = tmp1_elvis_lhs;
      }
      var tmp$ret$4 = new TerminologyEntry(tmp_1, tmp_2, tmp_3);
      destination.add_utx5q5_k$(tmp$ret$4);
    }
    return destination;
  }
  function encodeToStringMap(_this__u8e3s4, json) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.util.ext.encodeToStringMap.<anonymous>' call
      var tmp = item.get_id_kntnx8_k$();
      var tmp0_elvis_lhs = item.get_term_wouvn9_k$();
      var tmp$ret$0 = to(tmp, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    return encodeStringMapToString(json, toMap(destination));
  }
  function onActiveLearningSpace(_this__u8e3s4) {
    // Inline function 'org.kodein.di.on' call
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(_this__u8e3s4).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var context = tmp.Instance_vwdrk9_k$(tmp$ret$0, null).get_activeLearningSpace_4z58w7_k$();
    var trigger = _this__u8e3s4.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_1 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp$ret$3 = tmp_1.invoke_4wgfc3_k$(tmp$ret$2, context);
    return On(_this__u8e3s4, tmp$ret$3, trigger);
  }
  function get_dayStringResource(_this__u8e3s4) {
    switch (_this__u8e3s4.get_ordinal_ip24qg_k$()) {
      case 0:
        return strings_getInstance().get_monday_gqmfix_k$();
      case 1:
        return strings_getInstance().get_tuesday_ewbxcs_k$();
      case 2:
        return strings_getInstance().get_wednesday_vk70dp_k$();
      case 3:
        return strings_getInstance().get_thursday_5sz4v1_k$();
      case 4:
        return strings_getInstance().get_friday_dgv9m0_k$();
      case 5:
        return strings_getInstance().get_saturday_49fmv6_k$();
      case 6:
        return strings_getInstance().get_sunday_jo6xg9_k$();
      default:
        return strings_getInstance().get_blank_ip8b3f_k$();
    }
  }
  function stringResourceOrMessage(_this__u8e3s4, systemImpl) {
    var tmp0_safe_receiver = isInterface(_this__u8e3s4, ExceptionWithStringResource) ? _this__u8e3s4 : null;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_stringResource_4df0w8_k$();
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.stringResourceOrMessage.<anonymous>' call
      tmp = systemImpl.getString_a9yhoi_k$(tmp1_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var tmp_0;
    if (tmp3_elvis_lhs == null) {
      var tmp_1 = systemImpl.getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$());
      var tmp2_elvis_lhs = _this__u8e3s4.message;
      tmp_0 = tmp_1 + ': ' + (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
    } else {
      tmp_0 = tmp3_elvis_lhs;
    }
    return tmp_0;
  }
  function verifySite(_this__u8e3s4, endpointUrl, timeout, json, $completion) {
    timeout = timeout === VOID ? new Long(30000, 0) : timeout;
    var tmp = new $verifySiteCOROUTINE$40(_this__u8e3s4, endpointUrl, timeout, json, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function verifySite$lambda($timeout) {
    return function ($this$timeout) {
      $this$timeout.set_requestTimeoutMillis_xyy1t6_k$($timeout);
      return Unit_getInstance();
    };
  }
  function $verifySiteCOROUTINE$40(_this__u8e3s4, endpointUrl, timeout, json, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.endpointUrl_1 = endpointUrl;
    this.timeout_1 = timeout;
    this.json_1 = json;
  }
  protoOf($verifySiteCOROUTINE$40).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.siteVerifyUrl0__1 = UMFileUtil_getInstance().joinPaths_ysd08s_k$([this.endpointUrl_1, 'Site', 'verify']);
            var tmp_0 = this;
            tmp_0.this1__1 = this._this__u8e3s4__1;
            var tmp_1 = this;
            tmp_1.urlString2__1 = this.siteVerifyUrl0__1;
            var tmp_2 = this;
            tmp_2.this3__1 = this.this1__1;
            var tmp_3 = this;
            tmp_3.this4__1 = this.this3__1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString2__1);
            header(this_0, 'cache-control', 'no-cache');
            timeout(this_0, verifySite$lambda(this.timeout_1));
            tmp_4.builder5__1 = this_0;
            this.builder5__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_5 = this;
            tmp_5.this6__1 = this.this4__1;
            var tmp_6 = this;
            tmp_6.builder7__1 = this.builder5__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder7__1, this.this6__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT8__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsText(this.ARGUMENT8__1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var responseStr = suspendResult;
            return this.json_1.decodeFromString_jwu9sq_k$(Companion_getInstance_34().serializer_9w0wvi_k$(), responseStr);
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function toMap_1(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4 instanceof MapStringValues) {
      tmp = _this__u8e3s4.get_map_18j0ul_k$();
    } else {
      // Inline function 'kotlin.collections.map' call
      var this_0 = _this__u8e3s4.names_1q9mbs_k$();
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.util.ext.toMap.<anonymous>' call
        var tmp$ret$0 = to(item, _this__u8e3s4.getAll_ffxf4h_k$(item));
        destination.add_utx5q5_k$(tmp$ret$0);
      }
      tmp = toMap(destination);
    }
    return tmp;
  }
  function toLocalMidnight(_this__u8e3s4, timeZoneId) {
    return toLocalMidnight_0(_this__u8e3s4, Companion_getInstance_35().of_5gnbr7_k$(timeZoneId));
  }
  function toLocalEndOfDay(_this__u8e3s4, timeZoneId) {
    return toLocalEndOfDay_0(_this__u8e3s4, Companion_getInstance_35().of_5gnbr7_k$(timeZoneId));
  }
  function isDateOfBirthAnAdult(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) >= UstadMobileConstants_getInstance().get_ADULT_AGE_THRESHOLD_b8gxur_k$();
  }
  function isDateOfBirthAMinor(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) < UstadMobileConstants_getInstance().get_MINOR_AGE_THRESHOLD_42rq6w_k$();
  }
  function toLocalMidnight_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalMidnight_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function toLocalEndOfDay_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalEndOfDay_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function ageInYears(_this__u8e3s4) {
    return periodUntil(_this__u8e3s4, System_getInstance().now_2cba_k$(), Companion_getInstance_35().get_UTC_18jizp_k$()).get_years_j1r3xp_k$();
  }
  function hasFlag(_this__u8e3s4, flag) {
    return (_this__u8e3s4 & flag) === flag;
  }
  function decodeStringMapFromString(_this__u8e3s4, string) {
    return _this__u8e3s4.decodeFromString_jwu9sq_k$(MapSerializer(serializer_0(StringCompanionObject_getInstance()), serializer_0(StringCompanionObject_getInstance())), string);
  }
  function encodeStringMapToString(_this__u8e3s4, stringMap) {
    return _this__u8e3s4.encodeToString_k0apqx_k$(MapSerializer(serializer_0(StringCompanionObject_getInstance()), serializer_0(StringCompanionObject_getInstance())), stringMap);
  }
  function decodeListOrSingleObjectAsList(_this__u8e3s4, serializer, element) {
    var tmp;
    if (element instanceof JsonArray) {
      tmp = _this__u8e3s4.decodeFromJsonElement_tsogwj_k$(ListSerializer(serializer), element);
    } else {
      if (element instanceof JsonObject) {
        tmp = listOf_0(_this__u8e3s4.decodeFromJsonElement_tsogwj_k$(serializer, element));
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function replaceOrAppend(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    var tmp;
    if (replaceIndex >= 0) {
      // Inline function 'kotlin.also' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.replaceOrAppend.<anonymous>' call
      this_0.set_82063s_k$(replaceIndex, element);
      tmp = toList(this_0);
    } else {
      tmp = plus_3(_this__u8e3s4, element);
    }
    return tmp;
  }
  function findKeysNotInOtherList(_this__u8e3s4, otherList, key) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(otherList, 10));
    var tmp0_iterator = otherList.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      destination.add_utx5q5_k$(key(item));
    }
    var otherListKeys = destination;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator_0 = _this__u8e3s4.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var item_0 = tmp0_iterator_0.next_20eer_k$();
      destination_0.add_utx5q5_k$(key(item_0));
    }
    var thisListKeys = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = thisListKeys.iterator_jk1svi_k$();
    while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator_1.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.util.ext.findKeysNotInOtherList.<anonymous>' call
      if (!otherListKeys.contains_aljjnj_k$(element)) {
        destination_1.add_utx5q5_k$(element);
      }
    }
    return destination_1;
  }
  function replace_0(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    if (replaceIndex === -1)
      throw IllegalArgumentException_init_$Create$('element to replace not found');
    // Inline function 'kotlin.also' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.replace.<anonymous>' call
    this_0.set_82063s_k$(replaceIndex, element);
    return toList(this_0);
  }
  function padEnd(_this__u8e3s4, minSize, item) {
    var tmp;
    if (_this__u8e3s4.get_size_woubt6_k$() < minSize) {
      // Inline function 'kotlin.collections.map' call
      var this_0 = until(_this__u8e3s4.get_size_woubt6_k$(), minSize);
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item_0 = tmp0_iterator.next_20eer_k$();
        destination.add_utx5q5_k$(item(item_0));
      }
      tmp = plus(_this__u8e3s4, destination);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function trimToSize(_this__u8e3s4, maxSize) {
    var tmp;
    if (_this__u8e3s4.get_size_woubt6_k$() > maxSize) {
      tmp = _this__u8e3s4.subList_xle3r2_k$(0, maxSize);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function toggle(_this__u8e3s4, item) {
    var indexOfItem = _this__u8e3s4.indexOf_si1fv9_k$(item);
    var tmp;
    if (indexOfItem < 0) {
      tmp = plus_3(_this__u8e3s4, item);
    } else {
      // Inline function 'kotlin.also' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
      this_0.removeAt_6niowx_k$(indexOfItem);
      tmp = toList(this_0);
    }
    return tmp;
  }
  function toEmptyIfNull(_this__u8e3s4) {
    return _this__u8e3s4 == null ? emptyList() : _this__u8e3s4;
  }
  function toLocalMidnight_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.get_date_wokkxj_k$(), LocalTime_init_$Create$(0, 0, 0));
  }
  function toLocalEndOfDay_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.get_date_wokkxj_k$(), LocalTime_init_$Create$(23, 59, 59));
  }
  function hasFlag_0(_this__u8e3s4, flag) {
    return _this__u8e3s4.and_4spn93_k$(flag).equals(flag);
  }
  function toggleFlag(_this__u8e3s4, flag) {
    var tmp;
    if (hasFlag_0(_this__u8e3s4, flag)) {
      tmp = _this__u8e3s4.and_4spn93_k$(flag.inv_28kx_k$());
    } else {
      tmp = _this__u8e3s4.or_v7fvkl_k$(flag);
    }
    return tmp;
  }
  function isDateSet(_this__u8e3s4) {
    return (!(_this__u8e3s4 == null) ? _this__u8e3s4.compareTo_9jj042_k$(new Long(0, 0)) > 0 : false) ? _this__u8e3s4.compareTo_9jj042_k$(new Long(-376330240, 1689)) < 0 : false;
  }
  function get_MAX_VALID_DATE() {
    return MAX_VALID_DATE;
  }
  var MAX_VALID_DATE;
  function get_UNSET_DISTANT_FUTURE() {
    return UNSET_DISTANT_FUTURE;
  }
  var UNSET_DISTANT_FUTURE;
  function toByteArray(_this__u8e3s4) {
    var buffer = new Int8Array(8);
    var temp = _this__u8e3s4;
    var inductionVariable = 0;
    if (inductionVariable < 8)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        buffer[7 - i | 0] = temp.and_4spn93_k$(new Long(255, 0)).toByte_edm0nx_k$();
        temp = temp.shr_9fl3wl_k$(8);
      }
       while (inductionVariable < 8);
    return buffer;
  }
  function putFromSavedStateIfPresent(_this__u8e3s4, savedState, key) {
    var tmp0_safe_receiver = savedState.get_6bo4tg_k$(key);
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.putFromSavedStateIfPresent.<anonymous>' call
      _this__u8e3s4.put_4fpzoq_k$(key, tmp0_safe_receiver);
    }
  }
  function toQueryString(_this__u8e3s4) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.get_entries_p20ztl_k$();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.util.ext.toQueryString.<anonymous>' call
      var tmp$ret$0 = Companion_getInstance_253().encodeUTF8_iwe365_k$(item.get_key_18j28a_k$()) + '=' + Companion_getInstance_253().encodeUTF8_iwe365_k$(item.get_value_j01efc_k$());
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    return joinToString(destination, '&');
  }
  function firstCaseInsensitiveOrNull(_this__u8e3s4, key) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.get_entries_p20ztl_k$().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.util.ext.firstCaseInsensitiveOrNull.<anonymous>' call
        if (equals_0(element.get_key_18j28a_k$(), key, true)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_value_j01efc_k$();
    return tmp1_safe_receiver == null ? null : firstOrNull(tmp1_safe_receiver);
  }
  function whenSubscribed(_this__u8e3s4, block, $completion) {
    // Inline function 'kotlinx.coroutines.flow.map' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.get_subscriptionCount_9h9j93_k$();
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    var tmp$ret$2 = new _no_name_provided__qut3iv_0(this_0);
    var tmp = distinctUntilChanged(tmp$ret$2);
    return collectLatest(tmp, whenSubscribed$slambda_0(block, null), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_1(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_1).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$o$collect$slambda).invoke_upy66h_k$ = function (value, $completion) {
    var tmp = this.create_t6fi7n_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(whenSubscribed$o$collect$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_upy66h_k$((!(p1 == null) ? typeof p1 === 'number' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$o$collect$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform0__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value1__1 = this.value_1;
            this.set_state_rjd8d0_k$(1);
            var it = this.value1__1;
            suspendResult = this.$this$unsafeTransform0__1.emit_t92u1f_k$(it > 0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(whenSubscribed$o$collect$slambda).create_t6fi7n_k$ = function (value, completion) {
    var i = new whenSubscribed$o$collect$slambda(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(whenSubscribed$o$collect$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_t6fi7n_k$((!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE(), completion);
  };
  function whenSubscribed$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_upy66h_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$41(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$41).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = whenSubscribed$o$collect$slambda_0(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_1(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_0($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_0).collect_aebrhc_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$41(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_0).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_aebrhc_k$(collector, $completion);
  };
  function whenSubscribed$slambda($block, resultContinuation) {
    this.$block_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$slambda).invoke_f29lti_k$ = function (active, $completion) {
    var tmp = this.create_vh5neu_k$(active, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(whenSubscribed$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (this.active_1) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.$block_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(whenSubscribed$slambda).create_vh5neu_k$ = function (active, completion) {
    var i = new whenSubscribed$slambda(this.$block_1, completion);
    i.active_1 = active;
    return i;
  };
  protoOf(whenSubscribed$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function whenSubscribed$slambda_0($block, resultContinuation) {
    var i = new whenSubscribed$slambda($block, resultContinuation);
    var l = function (active, $completion) {
      return i.invoke_f29lti_k$(active, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function navigateToLink(_this__u8e3s4, link, accountManager, openExternalLinkUseCase, goOptions, forceAccountSelection, userCanSelectServer, accountName, scope, linkTarget, dontSetCurrentSession, presetLearningSpaceUrl, checkRegistrationAllowedUseCase) {
    goOptions = goOptions === VOID ? Companion_getInstance_143().get_Default_goqax4_k$() : goOptions;
    forceAccountSelection = forceAccountSelection === VOID ? false : forceAccountSelection;
    userCanSelectServer = userCanSelectServer === VOID ? true : userCanSelectServer;
    accountName = accountName === VOID ? null : accountName;
    scope = scope === VOID ? GlobalScope_getInstance() : scope;
    linkTarget = linkTarget === VOID ? LinkTarget_DEFAULT_getInstance() : linkTarget;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? null : presetLearningSpaceUrl;
    checkRegistrationAllowedUseCase = checkRegistrationAllowedUseCase === VOID ? null : checkRegistrationAllowedUseCase;
    var learningSpaceUrl = {_v: null};
    var viewUri = {_v: null};
    if (startsWithHttpProtocol(link) ? contains(link, Companion_getInstance_152().get_DEFAULT_DIVIDER_dqxdde_k$()) : false) {
      var urlComponents = Companion_getInstance_152().parse$default_z354sd_k$(link);
      learningSpaceUrl._v = urlComponents.get_learningSpace_sz4skh_k$();
      viewUri._v = urlComponents.get_viewUri_8rzfku_k$();
    } else if (!startsWithHttpProtocol(link)) {
      viewUri._v = link;
    }
    if (presetLearningSpaceUrl == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.navigateToLink.<anonymous>' call
      learningSpaceUrl._v = presetLearningSpaceUrl;
    }
    var tmp;
    var tmp1_safe_receiver = viewUri._v;
    if ((tmp1_safe_receiver == null ? null : startsWith(tmp1_safe_receiver, Companion_getInstance_226().get_DEST_NAME_gmgk7z_k$())) === true) {
      tmp = minus(System_getInstance().now_2cba_k$(), UstadMobileConstants_getInstance().get_ADULT_AGE_THRESHOLD_b8gxur_k$(), Companion_getInstance_36().get_YEAR_wocy2u_k$(), Companion_getInstance_35().get_UTC_18jizp_k$()).toEpochMilliseconds_82cfls_k$();
    } else {
      tmp = new Long(0, 0);
    }
    var maxDateOfBirth = tmp;
    var tmp_0;
    if (viewUri._v == null ? true : (!userCanSelectServer ? !(learningSpaceUrl._v == null) : false) ? !(learningSpaceUrl._v === accountManager.get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$()) : false) {
      openExternalLinkUseCase.invoke_ts1gt6_k$(link, linkTarget);
      tmp_0 = null;
    } else {
      tmp_0 = launch(scope, VOID, VOID, navigateToLink$slambda_0(accountName, learningSpaceUrl, accountManager, dontSetCurrentSession, _this__u8e3s4, viewUri, goOptions, forceAccountSelection, maxDateOfBirth, checkRegistrationAllowedUseCase, null));
    }
    return tmp_0;
  }
  function navigateToViewUri(_this__u8e3s4, viewUri, goOptions) {
    var questionIndex = indexOf(viewUri, _Char___init__impl__6a9atx(63));
    var tmp;
    if (!(questionIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = viewUri.substring(0, questionIndex);
    } else {
      tmp = viewUri;
    }
    var viewName = tmp;
    var tmp_0;
    if (questionIndex > 0) {
      var tmp_1 = UMFileUtil_getInstance();
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = viewUri.substring(questionIndex);
      tmp_0 = tmp_1.parseURLQueryString(tmp$ret$3);
    } else {
      tmp_0 = emptyMap();
    }
    var args = tmp_0;
    _this__u8e3s4.navigate_6urlkw_k$(viewName, args, goOptions);
  }
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_2(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_2).filterEndpoint_9pizal_k$ = function (endpointUrl) {
    return this.function_1(endpointUrl);
  };
  function navigateToLink$slambda$lambda($learningSpaceUrl) {
    return function (filterUrl) {
      return filterUrl === $learningSpaceUrl._v;
    };
  }
  function navigateToLink$slambda$lambda_0($learningSpaceUrl) {
    return function (it) {
      return it === $learningSpaceUrl._v;
    };
  }
  function navigateToLink$slambda($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation) {
    this.$accountName_1 = $accountName;
    this.$learningSpaceUrl_1 = $learningSpaceUrl;
    this.$accountManager_1 = $accountManager;
    this.$dontSetCurrentSession_1 = $dontSetCurrentSession;
    this.$this_navigateToLink_1 = $this_navigateToLink;
    this.$viewUri_1 = $viewUri;
    this.$goOptions_1 = $goOptions;
    this.$forceAccountSelection_1 = $forceAccountSelection;
    this.$maxDateOfBirth_1 = $maxDateOfBirth;
    this.$checkRegistrationAllowedUseCase_1 = $checkRegistrationAllowedUseCase;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(navigateToLink$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(navigateToLink$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(navigateToLink$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(16);
            if (!(this.$accountName_1 == null) ? !(this.$learningSpaceUrl_1._v == null) : false) {
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            } else {
              if ((!this.$forceAccountSelection_1 ? !isTemporary(this.$accountManager_1.get_currentUserSession_tk77tx_k$().get_userSession_tatogu_k$()) : false) ? this.$learningSpaceUrl_1._v == null ? true : this.$accountManager_1.get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$() === this.$learningSpaceUrl_1._v : false) {
                navigateToViewUri(this.$this_navigateToLink_1, this.$viewUri_1._v, this.$goOptions_1);
                this.set_state_rjd8d0_k$(15);
                continue $sm;
              } else {
                if (!(this.$learningSpaceUrl_1._v == null)) {
                  this.set_state_rjd8d0_k$(1);
                  var tmp_0 = navigateToLink$slambda$lambda_0(this.$learningSpaceUrl_1);
                  suspendResult = this.$accountManager_1.activeSessionCount_ew8bqw_k$(this.$maxDateOfBirth_1, new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_2(tmp_0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.WHEN_RESULT2__1 = false;
                  this.set_state_rjd8d0_k$(2);
                  continue $sm;
                }
              }
            }

          case 1:
            this.ARGUMENT3__1 = suspendResult;
            this.WHEN_RESULT2__1 = this.ARGUMENT3__1 === 0;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (this.WHEN_RESULT2__1) {
              this.WHEN_RESULT1__1 = true;
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              if (this.$learningSpaceUrl_1._v == null) {
                this.set_state_rjd8d0_k$(3);
                suspendResult = this.$accountManager_1.activeSessionCount$default_wx5dbr_k$(this.$maxDateOfBirth_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.WHEN_RESULT4__1 = false;
                this.set_state_rjd8d0_k$(4);
                continue $sm;
              }
            }

          case 3:
            this.ARGUMENT5__1 = suspendResult;
            this.WHEN_RESULT4__1 = this.ARGUMENT5__1 === 0;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.WHEN_RESULT1__1 = this.WHEN_RESULT4__1;
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            if (this.WHEN_RESULT1__1) {
              var tmp_1 = this;
              var this_0 = LinkedHashMap_init_$Create$_0();
              this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$(), this.$viewUri_1._v);
              this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$(), this.$dontSetCurrentSession_1.toString());
              var tmp0_safe_receiver = this.$learningSpaceUrl_1._v;
              if (tmp0_safe_receiver == null)
                null;
              else {
                this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), tmp0_safe_receiver);
              }
              tmp_1.args6__1 = this_0.build_1k0s4u_k$();
              this.tmp1_safe_receiver7__1 = this.$learningSpaceUrl_1._v;
              if (this.tmp1_safe_receiver7__1 == null) {
                this.WHEN_RESULT8__1 = null;
                this.set_state_rjd8d0_k$(8);
                continue $sm;
              } else {
                var tmp_2 = this;
                tmp_2.this9__1 = this.tmp1_safe_receiver7__1;
                var tmp_3 = this;
                tmp_3.learningSpaceUrlVal10__1 = this.this9__1;
                var tmp_4 = this;
                var tmp0_safe_receiver_0 = this.$checkRegistrationAllowedUseCase_1;
                tmp_4.tmp1_safe_receiver11__1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0(new LearningSpace(this.learningSpaceUrlVal10__1));
                if (this.tmp1_safe_receiver11__1 == null) {
                  this.WHEN_RESULT12__1 = null;
                  this.set_state_rjd8d0_k$(7);
                  continue $sm;
                } else {
                  this.set_state_rjd8d0_k$(6);
                  suspendResult = this.tmp1_safe_receiver11__1.invoke_wdlpwn_k$(this.$viewUri_1._v, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            } else {
              var this_1 = LinkedHashMap_init_$Create$_0();
              this_1.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$(), this.$viewUri_1._v);
              this_1.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$(), this.$dontSetCurrentSession_1.toString());
              var tmp0_safe_receiver_1 = this.$learningSpaceUrl_1._v;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                this_1.put_4fpzoq_k$(Companion_getInstance_164().get_ARG_FILTER_BY_LEARNINGSPACE_pvkiz9_k$(), tmp0_safe_receiver_1);
              }
              this_1.put_4fpzoq_k$(Companion_getInstance_164().get_ARG_ACTIVE_ACCOUNT_MODE_tk6oxo_k$(), Companion_getInstance_164().get_ACTIVE_ACCOUNT_MODE_INLIST_ig72t9_k$());
              this_1.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_LISTMODE_1jy3rh_k$(), ListViewMode_PICKER_getInstance().toString());
              this_1.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$(), this.$maxDateOfBirth_1.toString());
              var args = this_1.build_1k0s4u_k$();
              this.$this_navigateToLink_1.navigate_6urlkw_k$(Companion_getInstance_164().get_DEST_NAME_gmgk7z_k$(), toMap_0(args), this.$goOptions_1);
              this.set_state_rjd8d0_k$(15);
              continue $sm;
            }

          case 6:
            this.WHEN_RESULT12__1 = suspendResult;
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            this.WHEN_RESULT8__1 = this.WHEN_RESULT12__1;
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 8:
            this.canRegister13__1 = this.WHEN_RESULT8__1;
            var tmp_5;
            if (this.canRegister13__1 === false) {
              tmp_5 = Companion_getInstance_223().get_DEST_NAME_gmgk7z_k$();
            } else {
              tmp_5 = Companion_getInstance_162().get_DEST_NAME_gmgk7z_k$();
            }

            this.$this_navigateToLink_1.navigate$default_srzzsc_k$(tmp_5, this.args6__1);
            this.set_state_rjd8d0_k$(15);
            continue $sm;
          case 9:
            this.set_state_rjd8d0_k$(10);
            var tmp_6 = navigateToLink$slambda$lambda(this.$learningSpaceUrl_1);
            suspendResult = this.$accountManager_1.activeSessionsList_fx72nd_k$(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_2(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp0_iterator = suspendResult.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(11);
            continue $sm;
          case 11:
            if (!tmp0_iterator.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(13);
              continue $sm;
            }

            var element = tmp0_iterator.next_20eer_k$();
            if (element.get_person_i0c866_k$().get_username_ytz5i7_k$() === substringBefore(this.$accountName_1, '@')) {
              this.tmp$ret$00__1 = element;
              this.set_state_rjd8d0_k$(14);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(12);
              continue $sm;
            }

          case 12:
            this.set_state_rjd8d0_k$(11);
            continue $sm;
          case 13:
            this.tmp$ret$00__1 = null;
            if (false) {
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            }

            this.set_state_rjd8d0_k$(14);
            continue $sm;
          case 14:
            var session = this.tmp$ret$00__1;
            if (!(session == null)) {
              var this_2 = this.$accountManager_1;
              var tmp_7;
              if (!this.$dontSetCurrentSession_1) {
                tmp_7 = this_2;
              } else {
                tmp_7 = null;
              }
              var tmp0_safe_receiver_2 = tmp_7;
              if (tmp0_safe_receiver_2 != null) {
                tmp0_safe_receiver_2.set_currentUserSession_3cktus_k$(session);
              }
              navigateToViewUri(this.$this_navigateToLink_1, this.$viewUri_1._v, this.$goOptions_1);
            }

            this.set_state_rjd8d0_k$(15);
            continue $sm;
          case 15:
            return Unit_getInstance();
          case 16:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 16) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(navigateToLink$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new navigateToLink$slambda(this.$accountName_1, this.$learningSpaceUrl_1, this.$accountManager_1, this.$dontSetCurrentSession_1, this.$this_navigateToLink_1, this.$viewUri_1, this.$goOptions_1, this.$forceAccountSelection_1, this.$maxDateOfBirth_1, this.$checkRegistrationAllowedUseCase_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(navigateToLink$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function navigateToLink$slambda_0($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation) {
    var i = new navigateToLink$slambda($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function get_VALID_RESOLUTIONS() {
    _init_properties_PairExt_kt__lrsj05();
    return VALID_RESOLUTIONS;
  }
  var VALID_RESOLUTIONS;
  var properties_initialized_PairExt_kt_y851e1;
  function _init_properties_PairExt_kt__lrsj05() {
    if (!properties_initialized_PairExt_kt_y851e1) {
      properties_initialized_PairExt_kt_y851e1 = true;
      VALID_RESOLUTIONS = listOf([new Pair(480, 360), new Pair(360, 480), new Pair(176, 144), new Pair(144, 176), new Pair(640, 360), new Pair(360, 640), new Pair(320, 180), new Pair(180, 320), new Pair(480, 270), new Pair(270, 480), new Pair(480, 480), new Pair(240, 240)]);
    }
  }
  function isGuestUser(_this__u8e3s4) {
    return _this__u8e3s4.get_username_ytz5i7_k$() == null;
  }
  function toUmAccount(_this__u8e3s4, endpointUrl) {
    return new UmAccount(_this__u8e3s4.get_personUid_mmhd76_k$(), _this__u8e3s4.get_username_ytz5i7_k$(), '', endpointUrl, _this__u8e3s4.get_firstNames_n3o3y7_k$(), _this__u8e3s4.get_lastName_f360wa_k$());
  }
  function personFullName(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.get_firstNames_n3o3y7_k$();
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.get_lastName_f360wa_k$();
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  }
  function toXapiAgent(_this__u8e3s4, learningSpace) {
    var tmp = personFullName(_this__u8e3s4);
    var tmp0_elvis_lhs = _this__u8e3s4.get_username_ytz5i7_k$();
    var tmp1_name = tmp0_elvis_lhs == null ? _this__u8e3s4.get_personUid_mmhd76_k$().toString() : tmp0_elvis_lhs;
    var tmp2_homePage = learningSpace.get_url_18iuii_k$();
    return new XapiAgent(tmp, VOID, VOID, VOID, VOID, new XapiAccount(tmp2_homePage, tmp1_name));
  }
  function toggle_0(_this__u8e3s4, item) {
    var tmp;
    if (_this__u8e3s4.contains_aljjnj_k$(item)) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
        if (!equals(element, item)) {
          destination.add_utx5q5_k$(element);
        }
      }
      tmp = toSet(destination);
    } else {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableSet(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
      this_0.add_utx5q5_k$(item);
      tmp = toSet(this_0);
    }
    return tmp;
  }
  function toQueryLikeParam(_this__u8e3s4) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (_this__u8e3s4 == null ? true : charSequenceLength(_this__u8e3s4) === 0) {
      tmp = '%';
    } else {
      tmp = '%' + _this__u8e3s4 + '%';
    }
    return tmp;
  }
  function capitalizeFirstLetter(_this__u8e3s4) {
    // Inline function 'kotlin.text.replaceFirstChar' call
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(_this__u8e3s4) > 0) {
      // Inline function 'com.ustadmobile.core.util.ext.capitalizeFirstLetter.<anonymous>' call
      var it = charSequenceGet(_this__u8e3s4, 0);
      var tmp$ret$1 = isLowerCase(it) ? titlecase(it) : toString_0(it);
      var tmp_0 = toString(tmp$ret$1);
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp_0 + _this__u8e3s4.substring(1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function ifNullOrBlank(_this__u8e3s4, defaultValue) {
    var tmp;
    if (_this__u8e3s4 == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.ifBlank' call
      tmp = isBlank(_this__u8e3s4) ? defaultValue() : _this__u8e3s4;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? defaultValue() : tmp1_elvis_lhs;
  }
  function appendQueryArgs(_this__u8e3s4, args) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!args.isEmpty_y1axqb_k$()) {
      tmp = appendQueryArgs_0(_this__u8e3s4, toQueryString(args));
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function appendQueryArgs_0(_this__u8e3s4, queryArgs) {
    var retVal = _this__u8e3s4;
    if (contains(_this__u8e3s4, '?'))
      retVal = retVal + '&';
    else
      retVal = retVal + '?';
    retVal = retVal + queryArgs;
    return retVal;
  }
  function countWords(_this__u8e3s4) {
    var lastCharWasWhitespace = true;
    var wordCount = 0;
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var thisCharWhitespace = isWhitespace(charSequenceGet(_this__u8e3s4, i));
        if (!thisCharWhitespace ? lastCharWasWhitespace : false) {
          wordCount = wordCount + 1 | 0;
        }
        lastCharWasWhitespace = thisCharWhitespace;
      }
       while (inductionVariable < last);
    return wordCount;
  }
  function startsWithHttpProtocol(_this__u8e3s4) {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.startsWithHttpProtocol.<anonymous>' call
    var it = _this__u8e3s4.toLowerCase();
    return startsWith(it, 'http://') ? true : startsWith(it, 'https://');
  }
  function requirePostfix(_this__u8e3s4, postFix, ignoreCase) {
    ignoreCase = ignoreCase === VOID ? false : ignoreCase;
    return endsWith(_this__u8e3s4, postFix, ignoreCase) ? _this__u8e3s4 : _this__u8e3s4 + postFix;
  }
  function appendSelectedAccount(_this__u8e3s4, personUid, learningSpace) {
    return appendQueryArgs(_this__u8e3s4, mapOf([to(Companion_getInstance_160().get_ARG_SELECTED_ACCOUNT_PERSON_UID_31s0ba_k$(), personUid.toString()), to(Companion_getInstance_160().get_ARG_SELECTED_ACCOUNT_LEARNINGSPACE_URL_hc2g6s_k$(), learningSpace.get_url_18iuii_k$())]));
  }
  function toNullIfBlank(_this__u8e3s4) {
    // Inline function 'kotlin.text.ifBlank' call
    var tmp;
    if (isBlank(_this__u8e3s4)) {
      // Inline function 'com.ustadmobile.core.util.ext.toNullIfBlank.<anonymous>' call
      tmp = null;
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function requireHttpPrefix(_this__u8e3s4, defaultProtocol) {
    defaultProtocol = defaultProtocol === VOID ? 'https' : defaultProtocol;
    return startsWithHttpProtocol(_this__u8e3s4) ? _this__u8e3s4 : defaultProtocol + '://' + _this__u8e3s4;
  }
  function trimExcessWhiteSpace(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.text.indexOfFirst' call
      var inductionVariable = 0;
      var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (inductionVariable <= last)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!isWhitespace(it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var firstNonWhiteSpace = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlin.text.indexOfLast' call
      var inductionVariable_0 = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (0 <= inductionVariable_0)
        do {
          var index_0 = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + -1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it_0 = charSequenceGet(_this__u8e3s4, index_0);
          if (!isWhitespace(it_0)) {
            tmp$ret$3 = index_0;
            break $l$block_0;
          }
        }
         while (0 <= inductionVariable_0);
      tmp$ret$3 = -1;
    }
    var lastNonWhiteSpace = tmp$ret$3;
    // Inline function 'kotlin.math.max' call
    var b = firstNonWhiteSpace - 1 | 0;
    var startPos = Math.max(0, b);
    // Inline function 'kotlin.math.min' call
    var a = _this__u8e3s4.length;
    var b_0 = lastNonWhiteSpace + 2 | 0;
    var endPos = Math.min(a, b_0);
    var tmp;
    if (!(startPos === 0) ? true : !(endPos === _this__u8e3s4.length)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = _this__u8e3s4.substring(startPos, endPos);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function insertPersonAndGroup(_this__u8e3s4, entity, groupFlag, $completion) {
    groupFlag = groupFlag === VOID ? Companion_getInstance_8().get_PERSONGROUP_FLAG_PERSONGROUP_elfg4r_k$() : groupFlag;
    var tmp = new $insertPersonAndGroupCOROUTINE$42(_this__u8e3s4, entity, groupFlag, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function localFirstThenRepoIfFalse(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfFalseCOROUTINE$43(_this__u8e3s4, block, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function ScopedGrantResult(sgUid) {
    this.sgUid_1 = sgUid;
  }
  protoOf(ScopedGrantResult).get_sgUid_iyhd83_k$ = function () {
    return this.sgUid_1;
  };
  protoOf(ScopedGrantResult).component1_7eebsc_k$ = function () {
    return this.sgUid_1;
  };
  protoOf(ScopedGrantResult).copy_dtzw2h_k$ = function (sgUid) {
    return new ScopedGrantResult(sgUid);
  };
  protoOf(ScopedGrantResult).copy$default_rimhhg_k$ = function (sgUid, $super) {
    sgUid = sgUid === VOID ? this.sgUid_1 : sgUid;
    return $super === VOID ? this.copy_dtzw2h_k$(sgUid) : $super.copy_dtzw2h_k$.call(this, sgUid);
  };
  protoOf(ScopedGrantResult).toString = function () {
    return 'ScopedGrantResult(sgUid=' + this.sgUid_1.toString() + ')';
  };
  protoOf(ScopedGrantResult).hashCode = function () {
    return this.sgUid_1.hashCode();
  };
  protoOf(ScopedGrantResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantResult))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantResult ? other : THROW_CCE();
    if (!this.sgUid_1.equals(tmp0_other_with_cast.sgUid_1))
      return false;
    return true;
  };
  function grantScopedPermission(_this__u8e3s4, toPerson, permissions, scopeTableId, scopeEntityUid, $completion) {
    return grantScopedPermission_0(_this__u8e3s4, toPerson.get_personGroupUid_wriklr_k$(), permissions, scopeTableId, scopeEntityUid, $completion);
  }
  function grantScopedPermission_0(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion) {
    var tmp = new $grantScopedPermissionCOROUTINE$44(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function localFirstThenRepoIfNull(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfNullCOROUTINE$45(_this__u8e3s4, block, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function $insertPersonAndGroupCOROUTINE$42(_this__u8e3s4, entity, groupFlag, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.entity_1 = entity;
    this.groupFlag_1 = groupFlag;
  }
  protoOf($insertPersonAndGroupCOROUTINE$42).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            var tmp_0 = this;
            var this_0 = new PersonGroup();
            this_0.set_groupName_pormeu_k$('Person individual group');
            this_0.set_personGroupFlag_csix73_k$(this.groupFlag_1);
            tmp_0.groupPerson0__1 = this_0;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.personGroupDao_lgohk_k$().insertAsync(this.groupPerson0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT1__1 = suspendResult;
            this.groupPerson0__1.set_groupUid_bnt4k0_k$(this.ARGUMENT1__1);
            this.entity_1.set_personGroupUid_eex3gl_k$(this.groupPerson0__1.get_groupUid_nfguzq_k$());
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.personDao_e3y77h_k$().insertAsync(this.entity_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ARGUMENT2__1 = suspendResult;
            this.entity_1.set_personUid_j3idds_k$(this.ARGUMENT2__1);
            this.set_state_rjd8d0_k$(3);
            suspendResult = this._this__u8e3s4__1.personGroupMemberDao_v4nqlu_k$().insertAsync(PersonGroupMember_init_$Create$(this.entity_1.get_personUid_mmhd76_k$(), this.entity_1.get_personGroupUid_wriklr_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(4);
            suspendResult = grantScopedPermission(this._this__u8e3s4__1, this.entity_1, Companion_getInstance_11().get_MAX_VALUE_54a9lf_k$(), Companion_getInstance_7().get_TABLE_ID_xo2mej_k$(), this.entity_1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return this.entity_1;
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $localFirstThenRepoIfFalseCOROUTINE$43(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.block_1 = block;
  }
  protoOf($localFirstThenRepoIfFalseCOROUTINE$43).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp_1 = this._this__u8e3s4__1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_db_knto1l_k$();
            tmp_0.localDb0__1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.tmp1_safe_receiver1__1 = this.localDb0__1;
            if (this.tmp1_safe_receiver1__1 == null) {
              this.WHEN_RESULT2__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.this3__1 = this.tmp1_safe_receiver1__1;
              var tmp_4 = this;
              tmp_4.it4__1 = this.this3__1;
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.block_1(this.it4__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT2__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.localResult5__1 = this.WHEN_RESULT2__1;
            if (this.localResult5__1 === true)
              return this.localResult5__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.block_1(this._this__u8e3s4__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $grantScopedPermissionCOROUTINE$44(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.toGroupUid_1 = toGroupUid;
    this.permissions_1 = permissions;
    this.scopeTableId_1 = scopeTableId;
    this.scopeEntityUid_1 = scopeEntityUid;
  }
  protoOf($grantScopedPermissionCOROUTINE$44).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this._this__u8e3s4__1.scopedGrantDao_yq1jei_k$();
            var this_0 = new ScopedGrant();
            this_0.set_sgGroupUid_4hdzmk_k$(this.toGroupUid_1);
            this_0.set_sgPermissions_b70f05_k$(this.permissions_1);
            this_0.set_sgTableId_nfzhww_k$(this.scopeTableId_1);
            this_0.set_sgEntityUid_wqr9fm_k$(this.scopeEntityUid_1);
            suspendResult = tmp_0.insertAsync_b9qlyl_k$(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var sgUid = suspendResult;
            return new ScopedGrantResult(sgUid);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $localFirstThenRepoIfNullCOROUTINE$45(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.block_1 = block;
  }
  protoOf($localFirstThenRepoIfNullCOROUTINE$45).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp_1 = this._this__u8e3s4__1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_db_knto1l_k$();
            tmp_0.localDb0__1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.tmp1_safe_receiver1__1 = this.localDb0__1;
            if (this.tmp1_safe_receiver1__1 == null) {
              this.WHEN_RESULT2__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.this3__1 = this.tmp1_safe_receiver1__1;
              var tmp_4 = this;
              tmp_4.it4__1 = this.this3__1;
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.block_1(this.it4__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT2__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.localResult5__1 = this.WHEN_RESULT2__1;
            if (!(this.localResult5__1 == null))
              return this.localResult5__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.block_1(this._this__u8e3s4__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function withLearningSpace(_this__u8e3s4, learningSpace) {
    var tmp0_elvis_lhs = _this__u8e3s4.get_userSession_tatogu_k$();
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint : usersession must not be null');
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var tmp_0 = tmp;
    var tmp1_elvis_lhs = _this__u8e3s4.get_person_i0c866_k$();
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint: person msut not be null');
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    return new UserSessionWithPersonAndLearningSpace(tmp_0, tmp_1, learningSpace);
  }
  function isTemporary(_this__u8e3s4) {
    return (_this__u8e3s4.get_usSessionType_c3pu47_k$() & Companion_getInstance_4().get_TYPE_TEMP_LOCAL_1rarok_k$()) === Companion_getInstance_4().get_TYPE_TEMP_LOCAL_1rarok_k$();
  }
  function setIfNoValueSetYet(_this__u8e3s4, key, value) {
    if (_this__u8e3s4.get_6bo4tg_k$(key) == null) {
      _this__u8e3s4.set_wua6pr_k$(key, value);
    }
  }
  function require_0(_this__u8e3s4, key) {
    var tmp0_elvis_lhs = _this__u8e3s4.get_6bo4tg_k$(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('SavedStateHandle: required key not found: ' + key);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function xhtmlContentToText(_this__u8e3s4) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>' call
    var initTagName = _this__u8e3s4.get_name_woqyms_k$();
    var initDepth = _this__u8e3s4.get_depth_iq7qmy_k$();
    while (!((_this__u8e3s4.next_20eer_k$().equals(EventType_END_ELEMENT_getInstance()) ? _this__u8e3s4.get_depth_iq7qmy_k$() === (initDepth - 1 | 0) : false) ? _this__u8e3s4.get_name_woqyms_k$().equals(initTagName) : false)) {
      switch (_this__u8e3s4.get_eventType_918hfv_k$().get_ordinal_ip24qg_k$()) {
        case 1:
          if (_this__u8e3s4.get_name_woqyms_k$().getLocalPart_k3cdyw_k$() === 'img') {
            var tmp1_elvis_lhs = _this__u8e3s4.getAttributeValue_8yb7e2_k$(null, 'alt');
            var textVal = tmp1_elvis_lhs == null ? _this__u8e3s4.getAttributeValue_8yb7e2_k$(null, 'title') : tmp1_elvis_lhs;
            if (textVal == null)
              null;
            else {
              // Inline function 'kotlin.also' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>.<anonymous>' call
              this_0.append_22ad7x_k$(textVal);
            }
          }

          break;
        case 4:
          this_0.append_22ad7x_k$(trimExcessWhiteSpace(_this__u8e3s4.get_text_wouvsm_k$()));
          break;
        default:
          break;
      }
    }
    return this_0.toString();
  }
  function emptyStringValues() {
    return new MapStringValues(emptyMap());
  }
  function Companion_92() {
    Companion_instance_92 = this;
  }
  protoOf(Companion_92).empty_1lj7f1_k$ = function () {
    return new MapStringValues(emptyMap());
  };
  protoOf(Companion_92).contentType_nqqym1_k$ = function (contentType) {
    return new MapStringValues(mapOf_0(to('content-type', listOf_0(contentType))));
  };
  protoOf(Companion_92).serializer_9w0wvi_k$ = function () {
    return new StringValuesSerializer();
  };
  protoOf(Companion_92).serializer_nv39qc_k$ = function (typeParamsSerializers) {
    return this.serializer_9w0wvi_k$();
  };
  var Companion_instance_92;
  function Companion_getInstance_153() {
    if (Companion_instance_92 == null)
      new Companion_92();
    return Companion_instance_92;
  }
  function IStringValues() {
  }
  function _get_headers__gprxor($this) {
    return $this.headers_1;
  }
  function KtorHeadersStringValues(headers) {
    this.headers_1 = headers;
  }
  protoOf(KtorHeadersStringValues).get_6bo4tg_k$ = function (key) {
    return this.headers_1.get_6bo4tg_k$(key);
  };
  protoOf(KtorHeadersStringValues).getAll_ffxf4h_k$ = function (key) {
    var tmp0_elvis_lhs = this.headers_1.getAll_ffxf4h_k$(key);
    return tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
  };
  protoOf(KtorHeadersStringValues).names_1q9mbs_k$ = function () {
    return this.headers_1.names_1q9mbs_k$();
  };
  function asIStringValues(_this__u8e3s4) {
    return new KtorHeadersStringValues(_this__u8e3s4);
  }
  function MapStringValues(map) {
    this.map_1 = map;
  }
  protoOf(MapStringValues).get_map_18j0ul_k$ = function () {
    return this.map_1;
  };
  protoOf(MapStringValues).get_6bo4tg_k$ = function (key) {
    return firstCaseInsensitiveOrNull(this.map_1, key);
  };
  protoOf(MapStringValues).getAll_ffxf4h_k$ = function (key) {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.map_1.get_entries_p20ztl_k$();
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      if (equals_0(element.get_key_18j28a_k$(), key, true)) {
        destination.add_utx5q5_k$(element);
      }
    }
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_0 = ArrayList_init_$Create$();
    var tmp0_iterator_0 = destination.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var element_0 = tmp0_iterator_0.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      var list = element_0.get_value_j01efc_k$();
      addAll(destination_0, list);
    }
    return destination_0;
  };
  protoOf(MapStringValues).names_1q9mbs_k$ = function () {
    return this.map_1.get_keys_wop4xp_k$();
  };
  function _get_delegateSerializer__hliut0($this) {
    return $this.delegateSerializer_1;
  }
  function StringValuesSerializer() {
    this.delegateSerializer_1 = MapSerializer(serializer_0(StringCompanionObject_getInstance()), ListSerializer(serializer_0(StringCompanionObject_getInstance())));
    this.descriptor_1 = SerialDescriptor('StringValuesSerializer', this.delegateSerializer_1.get_descriptor_wjt6a0_k$());
  }
  protoOf(StringValuesSerializer).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf(StringValuesSerializer).deserialize_sy6x50_k$ = function (decoder) {
    var stringMap = decoder.decodeSerializableValue_xpnpad_k$(this.delegateSerializer_1);
    return new MapStringValues(stringMap);
  };
  protoOf(StringValuesSerializer).serialize_ynw2pu_k$ = function (encoder, value) {
    encoder.encodeSerializableValue_3uuzip_k$(this.delegateSerializer_1, toMap_1(value));
  };
  protoOf(StringValuesSerializer).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_ynw2pu_k$(encoder, (!(value == null) ? isInterface(value, IStringValues) : false) ? value : THROW_CCE());
  };
  function Companion_93() {
    Companion_instance_93 = this;
    this.VIEW_NAME_1 = 'SiteTermsDetailView';
    this.VIEW_NAME_ACCEPT_TERMS_1 = 'SiteTermsDetailAcceptTerms';
    this.ARG_USE_DISPLAY_LOCALE_1 = 'useDisplayLocale';
    this.ARG_SHOW_ACCEPT_BUTTON_1 = 'showAccept';
  }
  protoOf(Companion_93).get_VIEW_NAME_t2jg3g_k$ = function () {
    return this.VIEW_NAME_1;
  };
  protoOf(Companion_93).get_VIEW_NAME_ACCEPT_TERMS_ghblw3_k$ = function () {
    return this.VIEW_NAME_ACCEPT_TERMS_1;
  };
  protoOf(Companion_93).get_ARG_USE_DISPLAY_LOCALE_sy0kkh_k$ = function () {
    return this.ARG_USE_DISPLAY_LOCALE_1;
  };
  protoOf(Companion_93).get_ARG_SHOW_ACCEPT_BUTTON_owychz_k$ = function () {
    return this.ARG_SHOW_ACCEPT_BUTTON_1;
  };
  var Companion_instance_93;
  function Companion_getInstance_154() {
    if (Companion_instance_93 == null)
      new Companion_93();
    return Companion_instance_93;
  }
  function SiteTermsDetailView() {
  }
  function UstadDetailView() {
  }
  var EditButtonMode_GONE_instance;
  var EditButtonMode_FAB_instance;
  function values_10() {
    return [EditButtonMode_GONE_getInstance(), EditButtonMode_FAB_getInstance()];
  }
  function valueOf_9(value) {
    switch (value) {
      case 'GONE':
        return EditButtonMode_GONE_getInstance();
      case 'FAB':
        return EditButtonMode_FAB_getInstance();
      default:
        EditButtonMode_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_9() {
    if ($ENTRIES_9 == null)
      $ENTRIES_9 = enumEntries(values_10());
    return $ENTRIES_9;
  }
  var EditButtonMode_entriesInitialized;
  function EditButtonMode_initEntries() {
    if (EditButtonMode_entriesInitialized)
      return Unit_getInstance();
    EditButtonMode_entriesInitialized = true;
    EditButtonMode_GONE_instance = new EditButtonMode('GONE', 0);
    EditButtonMode_FAB_instance = new EditButtonMode('FAB', 1);
  }
  var $ENTRIES_9;
  function EditButtonMode(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function EditButtonMode_GONE_getInstance() {
    EditButtonMode_initEntries();
    return EditButtonMode_GONE_instance;
  }
  function EditButtonMode_FAB_getInstance() {
    EditButtonMode_initEntries();
    return EditButtonMode_FAB_instance;
  }
  function Companion_94() {
    Companion_instance_94 = this;
    this.ARG_ENTITY_JSON_1 = 'entity';
    this.DEFAULT_COMMIT_DELAY_1 = new Long(200, 0);
  }
  protoOf(Companion_94).get_ARG_ENTITY_JSON_x3rfse_k$ = function () {
    return this.ARG_ENTITY_JSON_1;
  };
  protoOf(Companion_94).get_DEFAULT_COMMIT_DELAY_oeb5ky_k$ = function () {
    return this.DEFAULT_COMMIT_DELAY_1;
  };
  var Companion_instance_94;
  function Companion_getInstance_155() {
    if (Companion_instance_94 == null)
      new Companion_94();
    return Companion_instance_94;
  }
  function UstadEditView() {
  }
  var ListViewMode_BROWSER_instance;
  var ListViewMode_PICKER_instance;
  function values_11() {
    return [ListViewMode_BROWSER_getInstance(), ListViewMode_PICKER_getInstance()];
  }
  function valueOf_10(value) {
    switch (value) {
      case 'BROWSER':
        return ListViewMode_BROWSER_getInstance();
      case 'PICKER':
        return ListViewMode_PICKER_getInstance();
      default:
        ListViewMode_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_10() {
    if ($ENTRIES_10 == null)
      $ENTRIES_10 = enumEntries(values_11());
    return $ENTRIES_10;
  }
  var ListViewMode_entriesInitialized;
  function ListViewMode_initEntries() {
    if (ListViewMode_entriesInitialized)
      return Unit_getInstance();
    ListViewMode_entriesInitialized = true;
    ListViewMode_BROWSER_instance = new ListViewMode('BROWSER', 0, 'BROWSER');
    ListViewMode_PICKER_instance = new ListViewMode('PICKER', 1, 'PICKER');
  }
  var $ENTRIES_10;
  function ListViewMode(name, ordinal, mode) {
    Enum.call(this, name, ordinal);
    this.mode_1 = mode;
  }
  protoOf(ListViewMode).get_mode_woqlt8_k$ = function () {
    return this.mode_1;
  };
  function ListViewMode_BROWSER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_BROWSER_instance;
  }
  function ListViewMode_PICKER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_PICKER_instance;
  }
  function UstadSingleEntityView() {
  }
  function Companion_95() {
    Companion_instance_95 = this;
    this.CLAZZ_ACTION_1 = 'clazzAction';
    this.ARG_ENTITY_UID_1 = 'entityUid';
    this.ARG_CONTAINER_UID_1 = 'containerUid';
    this.ARG_PARENT_ENTRY_UID_1 = 'parentUid';
    this.ARG_PARENT_ENTRY_TITLE_1 = 'parentTitle';
    this.ARG_CONTENT_ENTRY_UID_1 = 'entryid';
    this.ARG_STATEMENT_VERB_UID_1 = 'statementVerUid';
    this.ARG_CONTEXT_REGISTRATION_ID_HI_1 = 'contextRegistrationIdHi';
    this.ARG_CONTEXT_REGISTRATION_ID_LO_1 = 'contextRegistrationIdLo';
    this.ARG_LEARNER_GROUP_UID_1 = 'learnerGroupUid';
    this.ARG_NO_IFRAMES_1 = 'noiframe';
    this.ARG_SCHOOL_UID_1 = 'schoolUid';
    this.ARG_LEAF_1 = 'content_type';
    this.ARG_FILTER_BY_SCHOOLUID_1 = 'filterBySchoolUid';
    this.ARG_FILTER_BY_ROLE_1 = 'filterByRole';
    this.ARG_LISTMODE_1 = 'listMode';
    this.ARG_GETRESULTMODE_1 = 'getResultMode';
    this.ARG_LISTADDMODE_1 = 'listAddMode';
    this.ARG_FILTER_BY_PERMISSION_1 = 'filterByPermission';
    this.ARG_CLAZZUID_1 = 'clazzUid';
    this.ARG_FILTER_BY_PERSONGROUPUID_1 = 'filterByPersonGroupUid';
    this.ARG_FILTER_BY_ENROLMENT_ROLE_1 = 'filterByEnrolmentRole';
    this.ARG_CLAZZ_ASSIGNMENT_UID_1 = 'clazzAssignmentUid';
    this.ARG_SUBMITER_UID_1 = 'clazzAssignmentSubmitterUid';
    this.ARG_PERSON_UID_1 = 'personUid';
    this.ARG_NEXT_1 = 'next';
    this.ARG_SITE_1 = 'site';
    this.ARG_LEARNINGSPACE_URL_1 = 'learningSpaceUrl';
    this.ARG_OPEN_LINK_1 = 'openLink';
    this.ARG_ACCOUNT_NAME_1 = 'account';
    this.ARG_ACCOUNT_ENDPOINT_1 = 'accountEndpoint';
    this.ARG_SNACK_MESSAGE_1 = 'snack_message';
    this.ARG_CODE_1 = 'argCode';
    this.ARG_CODE_TABLE_1 = 'argCodeTable';
    this.ARG_ENTITY_NAME_1 = 'argEntityName';
    this.CURRENT_DEST_1 = '';
    this.ROOT_DEST_1 = 'root';
    this.ARG_CURRENT_1 = 'current';
    this.ARG_GO_TO_COMPLETE_1 = 'goToComplete';
    this.ARG_SAVE_TO_DB_1 = 'saveDb';
    this.ARG_POPUPTO_ON_FINISH_1 = 'popUpToOnFinish';
    this.ARG_RESULT_DEST_ID_1 = 'result_dest';
    this.ARG_RESULT_DEST_VIEWNAME_1 = 'result_viewname';
    this.ARG_REGISTRATION_ALLOWED_1 = 'registration_allowed';
    this.ARG_RESULT_DEST_KEY_1 = 'result_key';
    this.ARG_INTENT_MESSAGE_1 = 'intMsg';
    this.ARG_TITLE_1 = 'title';
    this.ARG_NAV_CHILD_1 = 'navChild';
    this.ARG_ACTIVE_TAB_INDEX_1 = 'activeTabIndex';
    this.ARG_MAX_DATE_OF_BIRTH_1 = 'maxDob';
    this.MASTER_SERVER_ROOT_ENTRY_UID_1 = new Long(1, -955361223);
  }
  protoOf(Companion_95).get_CLAZZ_ACTION_267bl2_k$ = function () {
    return this.CLAZZ_ACTION_1;
  };
  protoOf(Companion_95).get_ARG_ENTITY_UID_qfeu86_k$ = function () {
    return this.ARG_ENTITY_UID_1;
  };
  protoOf(Companion_95).get_ARG_CONTAINER_UID_hpaee8_k$ = function () {
    return this.ARG_CONTAINER_UID_1;
  };
  protoOf(Companion_95).get_ARG_PARENT_ENTRY_UID_gjgbq8_k$ = function () {
    return this.ARG_PARENT_ENTRY_UID_1;
  };
  protoOf(Companion_95).get_ARG_PARENT_ENTRY_TITLE_flvsmg_k$ = function () {
    return this.ARG_PARENT_ENTRY_TITLE_1;
  };
  protoOf(Companion_95).get_ARG_CONTENT_ENTRY_UID_tla4x7_k$ = function () {
    return this.ARG_CONTENT_ENTRY_UID_1;
  };
  protoOf(Companion_95).get_ARG_STATEMENT_VERB_UID_k3bv76_k$ = function () {
    return this.ARG_STATEMENT_VERB_UID_1;
  };
  protoOf(Companion_95).get_ARG_CONTEXT_REGISTRATION_ID_HI_sl43y9_k$ = function () {
    return this.ARG_CONTEXT_REGISTRATION_ID_HI_1;
  };
  protoOf(Companion_95).get_ARG_CONTEXT_REGISTRATION_ID_LO_sl441v_k$ = function () {
    return this.ARG_CONTEXT_REGISTRATION_ID_LO_1;
  };
  protoOf(Companion_95).get_ARG_LEARNER_GROUP_UID_bzhqq8_k$ = function () {
    return this.ARG_LEARNER_GROUP_UID_1;
  };
  protoOf(Companion_95).get_ARG_NO_IFRAMES_6jah7h_k$ = function () {
    return this.ARG_NO_IFRAMES_1;
  };
  protoOf(Companion_95).get_ARG_SCHOOL_UID_lnxx7t_k$ = function () {
    return this.ARG_SCHOOL_UID_1;
  };
  protoOf(Companion_95).get_ARG_LEAF_q15lsg_k$ = function () {
    return this.ARG_LEAF_1;
  };
  protoOf(Companion_95).get_ARG_FILTER_BY_SCHOOLUID_cjpvb_k$ = function () {
    return this.ARG_FILTER_BY_SCHOOLUID_1;
  };
  protoOf(Companion_95).get_ARG_FILTER_BY_ROLE_5gxf0p_k$ = function () {
    return this.ARG_FILTER_BY_ROLE_1;
  };
  protoOf(Companion_95).get_ARG_LISTMODE_1jy3rh_k$ = function () {
    return this.ARG_LISTMODE_1;
  };
  protoOf(Companion_95).get_ARG_GETRESULTMODE_8ufbwk_k$ = function () {
    return this.ARG_GETRESULTMODE_1;
  };
  protoOf(Companion_95).get_ARG_LISTADDMODE_p3uo18_k$ = function () {
    return this.ARG_LISTADDMODE_1;
  };
  protoOf(Companion_95).get_ARG_FILTER_BY_PERMISSION_hsjuse_k$ = function () {
    return this.ARG_FILTER_BY_PERMISSION_1;
  };
  protoOf(Companion_95).get_ARG_CLAZZUID_c9bcuu_k$ = function () {
    return this.ARG_CLAZZUID_1;
  };
  protoOf(Companion_95).get_ARG_FILTER_BY_PERSONGROUPUID_c8pejd_k$ = function () {
    return this.ARG_FILTER_BY_PERSONGROUPUID_1;
  };
  protoOf(Companion_95).get_ARG_FILTER_BY_ENROLMENT_ROLE_y6uuck_k$ = function () {
    return this.ARG_FILTER_BY_ENROLMENT_ROLE_1;
  };
  protoOf(Companion_95).get_ARG_CLAZZ_ASSIGNMENT_UID_n6bn4n_k$ = function () {
    return this.ARG_CLAZZ_ASSIGNMENT_UID_1;
  };
  protoOf(Companion_95).get_ARG_SUBMITER_UID_yczcpk_k$ = function () {
    return this.ARG_SUBMITER_UID_1;
  };
  protoOf(Companion_95).get_ARG_PERSON_UID_8uotmw_k$ = function () {
    return this.ARG_PERSON_UID_1;
  };
  protoOf(Companion_95).get_ARG_NEXT_q16wbp_k$ = function () {
    return this.ARG_NEXT_1;
  };
  protoOf(Companion_95).get_ARG_SITE_q1a649_k$ = function () {
    return this.ARG_SITE_1;
  };
  protoOf(Companion_95).get_ARG_LEARNINGSPACE_URL_awzye2_k$ = function () {
    return this.ARG_LEARNINGSPACE_URL_1;
  };
  protoOf(Companion_95).get_ARG_OPEN_LINK_2333fn_k$ = function () {
    return this.ARG_OPEN_LINK_1;
  };
  protoOf(Companion_95).get_ARG_ACCOUNT_NAME_oxicvj_k$ = function () {
    return this.ARG_ACCOUNT_NAME_1;
  };
  protoOf(Companion_95).get_ARG_ACCOUNT_ENDPOINT_qai6o7_k$ = function () {
    return this.ARG_ACCOUNT_ENDPOINT_1;
  };
  protoOf(Companion_95).get_ARG_SNACK_MESSAGE_a9ybz0_k$ = function () {
    return this.ARG_SNACK_MESSAGE_1;
  };
  protoOf(Companion_95).get_ARG_CODE_q102e7_k$ = function () {
    return this.ARG_CODE_1;
  };
  protoOf(Companion_95).get_ARG_CODE_TABLE_eia99u_k$ = function () {
    return this.ARG_CODE_TABLE_1;
  };
  protoOf(Companion_95).get_ARG_ENTITY_NAME_x3p98r_k$ = function () {
    return this.ARG_ENTITY_NAME_1;
  };
  protoOf(Companion_95).get_CURRENT_DEST_3e1ddb_k$ = function () {
    return this.CURRENT_DEST_1;
  };
  protoOf(Companion_95).get_ROOT_DEST_uaebwq_k$ = function () {
    return this.ROOT_DEST_1;
  };
  protoOf(Companion_95).get_ARG_CURRENT_oqr0fb_k$ = function () {
    return this.ARG_CURRENT_1;
  };
  protoOf(Companion_95).get_ARG_GO_TO_COMPLETE_us1oig_k$ = function () {
    return this.ARG_GO_TO_COMPLETE_1;
  };
  protoOf(Companion_95).get_ARG_SAVE_TO_DB_iffzn6_k$ = function () {
    return this.ARG_SAVE_TO_DB_1;
  };
  protoOf(Companion_95).get_ARG_POPUPTO_ON_FINISH_sh92d3_k$ = function () {
    return this.ARG_POPUPTO_ON_FINISH_1;
  };
  protoOf(Companion_95).get_ARG_RESULT_DEST_ID_azu2zc_k$ = function () {
    return this.ARG_RESULT_DEST_ID_1;
  };
  protoOf(Companion_95).get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$ = function () {
    return this.ARG_RESULT_DEST_VIEWNAME_1;
  };
  protoOf(Companion_95).get_ARG_REGISTRATION_ALLOWED_ak9gp8_k$ = function () {
    return this.ARG_REGISTRATION_ALLOWED_1;
  };
  protoOf(Companion_95).get_ARG_RESULT_DEST_KEY_eanr0y_k$ = function () {
    return this.ARG_RESULT_DEST_KEY_1;
  };
  protoOf(Companion_95).get_ARG_INTENT_MESSAGE_fgwz62_k$ = function () {
    return this.ARG_INTENT_MESSAGE_1;
  };
  protoOf(Companion_95).get_ARG_TITLE_ps2gqu_k$ = function () {
    return this.ARG_TITLE_1;
  };
  protoOf(Companion_95).get_ARG_NAV_CHILD_5c2gqa_k$ = function () {
    return this.ARG_NAV_CHILD_1;
  };
  protoOf(Companion_95).get_ARG_ACTIVE_TAB_INDEX_2jcazl_k$ = function () {
    return this.ARG_ACTIVE_TAB_INDEX_1;
  };
  protoOf(Companion_95).get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$ = function () {
    return this.ARG_MAX_DATE_OF_BIRTH_1;
  };
  protoOf(Companion_95).get_MASTER_SERVER_ROOT_ENTRY_UID_rof1ou_k$ = function () {
    return this.MASTER_SERVER_ROOT_ENTRY_UID_1;
  };
  var Companion_instance_95;
  function Companion_getInstance_156() {
    if (Companion_instance_95 == null)
      new Companion_95();
    return Companion_instance_95;
  }
  function UstadView$showSnackBar$lambda() {
    return Unit_getInstance();
  }
  function UstadView() {
  }
  function DetailViewModel(di, savedStateHandle, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.entityUidArg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  protoOf(DetailViewModel).get_entityUidArg_hgo6pe_k$ = function () {
    return this.entityUidArg_1;
  };
  function _get__uiState__8e9jsd($this) {
    return $this._uiState_1;
  }
  function _get_argDoneButtonLabel__uj5am7($this) {
    return $this.argDoneButtonLabel_1;
  }
  function _get_argTitle__ou2is7($this) {
    return $this.argTitle_1;
  }
  function Companion_96() {
    Companion_instance_96 = this;
    this.ARG_HTML_1 = 'html';
    this.ARG_WORD_LIMIT_1 = 'wordLimit';
    this.ARG_CHAR_LIMIT_1 = 'charLimit';
    this.ARG_TITLE_1 = 'title';
    this.ARG_DONE_STR_1 = 'done';
    this.DEST_NAME_1 = 'HtmlEdit';
    this.KEY_STATE_CURRENT_HTML_1 = 'currentHtml';
  }
  protoOf(Companion_96).get_ARG_HTML_q13d99_k$ = function () {
    return this.ARG_HTML_1;
  };
  protoOf(Companion_96).get_ARG_WORD_LIMIT_p3divs_k$ = function () {
    return this.ARG_WORD_LIMIT_1;
  };
  protoOf(Companion_96).get_ARG_CHAR_LIMIT_eu2xb8_k$ = function () {
    return this.ARG_CHAR_LIMIT_1;
  };
  protoOf(Companion_96).get_ARG_TITLE_ps2gqu_k$ = function () {
    return this.ARG_TITLE_1;
  };
  protoOf(Companion_96).get_ARG_DONE_STR_4lhipm_k$ = function () {
    return this.ARG_DONE_STR_1;
  };
  protoOf(Companion_96).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_96).get_KEY_STATE_CURRENT_HTML_yuozdk_k$ = function () {
    return this.KEY_STATE_CURRENT_HTML_1;
  };
  var Companion_instance_96;
  function Companion_getInstance_157() {
    if (Companion_instance_96 == null)
      new Companion_96();
    return Companion_instance_96;
  }
  function _init_$lambda($htmlPlainText$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('htmlPlainText', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $htmlPlainText$delegate.get_value_j01efc_k$();
  }
  function onHtmlChanged$lambda($htmlPlainText$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('htmlPlainText', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $htmlPlainText$delegate.get_value_j01efc_k$();
  }
  function onClickDone$lambda($plainText$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('plainText', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $plainText$delegate.get_value_j01efc_k$();
  }
  function HtmlEditViewModel$lambda($htmlText) {
    return function () {
      return htmlToPlainText($htmlText);
    };
  }
  function HtmlEditViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.onClickDone_9vldqd_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function HtmlEditViewModel$onHtmlChanged$lambda($html) {
    return function () {
      return htmlToPlainText($html);
    };
  }
  function HtmlEditViewModel$onHtmlChanged$slambda(this$0, $html, resultContinuation) {
    this.this$0__1 = this$0;
    this.$html_1 = $html;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(HtmlEditViewModel$onHtmlChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(HtmlEditViewModel$onHtmlChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(HtmlEditViewModel$onHtmlChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('currentHtml', this.$html_1);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(HtmlEditViewModel$onHtmlChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new HtmlEditViewModel$onHtmlChanged$slambda(this.this$0__1, this.$html_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(HtmlEditViewModel$onHtmlChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function HtmlEditViewModel$onHtmlChanged$slambda_0(this$0, $html, resultContinuation) {
    var i = new HtmlEditViewModel$onHtmlChanged$slambda(this$0, $html, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function HtmlEditViewModel$onClickDone$lambda(this$0) {
    return function () {
      return htmlToPlainText(this$0._uiState_1.get_value_j01efc_k$().html_1);
    };
  }
  function HtmlEditViewModel(di, savedStateHandle) {
    Companion_getInstance_157();
    UstadEditViewModel.call(this, di, savedStateHandle, 'HtmlEdit');
    this._uiState_1 = MutableStateFlow(new HtmlEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    this.argDoneButtonLabel_1 = savedStateHandle.get_6bo4tg_k$('done');
    this.argTitle_1 = savedStateHandle.get_6bo4tg_k$('title');
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$('html');
    var htmlText = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var htmlPlainText$delegate = lazy_0(HtmlEditViewModel$lambda(htmlText));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.HtmlEditViewModel.<anonymous>' call
        var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$('wordLimit');
        var tmp = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
        var tmp1_safe_receiver = savedStateHandle.get_6bo4tg_k$('charLimit');
        var tmp_0 = tmp1_safe_receiver == null ? null : toInt(tmp1_safe_receiver);
        var tmp_1;
        if (!(savedStateHandle.get_6bo4tg_k$('wordLimit') == null)) {
          tmp_1 = countWords(_init_$lambda(htmlPlainText$delegate));
        } else {
          tmp_1 = null;
        }
        var tmp_2 = tmp_1;
        var tmp_3;
        if (!(savedStateHandle.get_6bo4tg_k$('charLimit') == null)) {
          tmp_3 = _init_$lambda(htmlPlainText$delegate).length;
        } else {
          tmp_3 = null;
        }
        var nextValue = prevValue.copy_k936bd_k$(htmlText, tmp, tmp_0, tmp_2, tmp_3);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.HtmlEditViewModel.<anonymous>' call
        var tmp1_title = this.argTitle_1;
        var tmp0_elvis_lhs_0 = this.argDoneButtonLabel_1;
        var tmp_4 = tmp0_elvis_lhs_0 == null ? this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_done_wokv63_k$()) : tmp0_elvis_lhs_0;
        var tmp2_actionBarButtonState = new ActionBarButtonUiState(true, tmp_4, true, HtmlEditViewModel$onClickDone$ref(this));
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp1_title, VOID, true, VOID, VOID, VOID, tmp2_actionBarButtonState);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(HtmlEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(HtmlEditViewModel).onHtmlChanged_grxgzk_k$ = function (html) {
    var htmlPlainText$delegate = lazy_0(HtmlEditViewModel$onHtmlChanged$lambda(html));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.HtmlEditViewModel.onHtmlChanged.<anonymous>' call
        var tmp;
        if (prevValue.wordLimit_1 == null) {
          tmp = null;
        } else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.HtmlEditViewModel.onHtmlChanged.<anonymous>.<anonymous>' call
          tmp = countWords(onHtmlChanged$lambda(htmlPlainText$delegate));
        }
        var tmp_0 = tmp;
        var tmp_1;
        if (prevValue.charLimit_1 == null) {
          tmp_1 = null;
        } else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.HtmlEditViewModel.onHtmlChanged.<anonymous>.<anonymous>' call
          tmp_1 = onHtmlChanged$lambda(htmlPlainText$delegate).length;
        }
        var nextValue = prevValue.copy$default_e7nkpn_k$(html, VOID, VOID, tmp_0, tmp_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_2, VOID, VOID, HtmlEditViewModel$onHtmlChanged$slambda_0(this, html, null)));
  };
  protoOf(HtmlEditViewModel).onClickDone_9vldqd_k$ = function () {
    var plainText$delegate = lazy_0(HtmlEditViewModel$onClickDone$lambda(this));
    var tmp;
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().wordLimit_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.HtmlEditViewModel.onClickDone.<anonymous>' call
      tmp_0 = tmp0_safe_receiver >= countWords(onClickDone$lambda(plainText$delegate));
    }
    if (tmp_0 === false) {
      tmp = true;
    } else {
      var tmp1_safe_receiver = this._uiState_1.get_value_j01efc_k$().charLimit_1;
      var tmp_1;
      if (tmp1_safe_receiver == null) {
        tmp_1 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.HtmlEditViewModel.onClickDone.<anonymous>' call
        tmp_1 = tmp1_safe_receiver >= onClickDone$lambda(plainText$delegate).length;
      }
      tmp = tmp_1 === false;
    }
    if (tmp) {
      this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_too_long_text_y0t7k5_k$())));
      return Unit_getInstance();
    }
    this.finishWithResult_jlqwtj_k$(this._uiState_1.get_value_j01efc_k$().html_1);
  };
  function HtmlEditUiState(html, wordLimit, charLimit, wordCount, charCount) {
    html = html === VOID ? '' : html;
    wordLimit = wordLimit === VOID ? null : wordLimit;
    charLimit = charLimit === VOID ? null : charLimit;
    wordCount = wordCount === VOID ? null : wordCount;
    charCount = charCount === VOID ? null : charCount;
    this.html_1 = html;
    this.wordLimit_1 = wordLimit;
    this.charLimit_1 = charLimit;
    this.wordCount_1 = wordCount;
    this.charCount_1 = charCount;
  }
  protoOf(HtmlEditUiState).get_html_wonit0_k$ = function () {
    return this.html_1;
  };
  protoOf(HtmlEditUiState).get_wordLimit_mxu2i0_k$ = function () {
    return this.wordLimit_1;
  };
  protoOf(HtmlEditUiState).get_charLimit_y2cyn0_k$ = function () {
    return this.charLimit_1;
  };
  protoOf(HtmlEditUiState).get_wordCount_mszx4s_k$ = function () {
    return this.wordCount_1;
  };
  protoOf(HtmlEditUiState).get_charCount_xxit9s_k$ = function () {
    return this.charCount_1;
  };
  protoOf(HtmlEditUiState).component1_7eebsc_k$ = function () {
    return this.html_1;
  };
  protoOf(HtmlEditUiState).component2_7eebsb_k$ = function () {
    return this.wordLimit_1;
  };
  protoOf(HtmlEditUiState).component3_7eebsa_k$ = function () {
    return this.charLimit_1;
  };
  protoOf(HtmlEditUiState).component4_7eebs9_k$ = function () {
    return this.wordCount_1;
  };
  protoOf(HtmlEditUiState).component5_7eebs8_k$ = function () {
    return this.charCount_1;
  };
  protoOf(HtmlEditUiState).copy_k936bd_k$ = function (html, wordLimit, charLimit, wordCount, charCount) {
    return new HtmlEditUiState(html, wordLimit, charLimit, wordCount, charCount);
  };
  protoOf(HtmlEditUiState).copy$default_e7nkpn_k$ = function (html, wordLimit, charLimit, wordCount, charCount, $super) {
    html = html === VOID ? this.html_1 : html;
    wordLimit = wordLimit === VOID ? this.wordLimit_1 : wordLimit;
    charLimit = charLimit === VOID ? this.charLimit_1 : charLimit;
    wordCount = wordCount === VOID ? this.wordCount_1 : wordCount;
    charCount = charCount === VOID ? this.charCount_1 : charCount;
    return $super === VOID ? this.copy_k936bd_k$(html, wordLimit, charLimit, wordCount, charCount) : $super.copy_k936bd_k$.call(this, html, wordLimit, charLimit, wordCount, charCount);
  };
  protoOf(HtmlEditUiState).toString = function () {
    return 'HtmlEditUiState(html=' + this.html_1 + ', wordLimit=' + this.wordLimit_1 + ', charLimit=' + this.charLimit_1 + ', wordCount=' + this.wordCount_1 + ', charCount=' + this.charCount_1 + ')';
  };
  protoOf(HtmlEditUiState).hashCode = function () {
    var result = getStringHashCode(this.html_1);
    result = imul(result, 31) + (this.wordLimit_1 == null ? 0 : this.wordLimit_1) | 0;
    result = imul(result, 31) + (this.charLimit_1 == null ? 0 : this.charLimit_1) | 0;
    result = imul(result, 31) + (this.wordCount_1 == null ? 0 : this.wordCount_1) | 0;
    result = imul(result, 31) + (this.charCount_1 == null ? 0 : this.charCount_1) | 0;
    return result;
  };
  protoOf(HtmlEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HtmlEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof HtmlEditUiState ? other : THROW_CCE();
    if (!(this.html_1 === tmp0_other_with_cast.html_1))
      return false;
    if (!(this.wordLimit_1 == tmp0_other_with_cast.wordLimit_1))
      return false;
    if (!(this.charLimit_1 == tmp0_other_with_cast.charLimit_1))
      return false;
    if (!(this.wordCount_1 == tmp0_other_with_cast.wordCount_1))
      return false;
    if (!(this.charCount_1 == tmp0_other_with_cast.charCount_1))
      return false;
    return true;
  };
  function Companion_97() {
    Companion_instance_97 = this;
    this.COMMIT_DELAY_1 = new Long(200, 0);
    this.INIT_PIC_URI_1 = 'initPicUri';
  }
  protoOf(Companion_97).get_COMMIT_DELAY_jgood8_k$ = function () {
    return this.COMMIT_DELAY_1;
  };
  protoOf(Companion_97).get_INIT_PIC_URI_ye3my7_k$ = function () {
    return this.INIT_PIC_URI_1;
  };
  var Companion_instance_97;
  function Companion_getInstance_158() {
    if (Companion_instance_97 == null)
      new Companion_97();
    return Companion_instance_97;
  }
  function UstadEditViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_158();
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.saveStateJob_1 = null;
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.entityUidArg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  protoOf(UstadEditViewModel).set_saveStateJob_g1ttuu_k$ = function (_set____db54di) {
    this.saveStateJob_1 = _set____db54di;
  };
  protoOf(UstadEditViewModel).get_saveStateJob_pa13yq_k$ = function () {
    return this.saveStateJob_1;
  };
  protoOf(UstadEditViewModel).get_entityUidArg_hgo6pe_k$ = function () {
    return this.entityUidArg_1;
  };
  protoOf(UstadEditViewModel).finishWithResult_lyhkrz_k$ = function (detailViewName, entityUid, result, detailViewExtraArgs) {
    var popUpToViewName = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$());
    var saveToKey = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$());
    var createdNewEntity = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$()) == null;
    var returnResultExpected = !(popUpToViewName == null) ? !(saveToKey == null) : false;
    if (createdNewEntity ? !returnResultExpected : false) {
      var tmp = this.get_navController_qibdoq_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.finishWithResult.<anonymous>' call
      this_0.putAll_wgg6cj_k$(detailViewExtraArgs);
      this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), entityUid.toString());
      var tmp$ret$2 = this_0.build_1k0s4u_k$();
      tmp.navigate_6urlkw_k$(detailViewName, tmp$ret$2, new UstadGoOptions(Companion_getInstance_156().get_CURRENT_DEST_3e1ddb_k$(), true));
    } else {
      this.finishWithResult_jlqwtj_k$(result);
    }
  };
  protoOf(UstadEditViewModel).finishWithResult$default_p2obzb_k$ = function (detailViewName, entityUid, result, detailViewExtraArgs, $super) {
    detailViewExtraArgs = detailViewExtraArgs === VOID ? emptyMap() : detailViewExtraArgs;
    var tmp;
    if ($super === VOID) {
      this.finishWithResult_lyhkrz_k$(detailViewName, entityUid, result, detailViewExtraArgs);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.finishWithResult_lyhkrz_k$.call(this, detailViewName, entityUid, result, detailViewExtraArgs);
    }
    return tmp;
  };
  protoOf(UstadEditViewModel).createEditTitle_2tyyvi_k$ = function (newEntityStringResource, editEntityStringResource) {
    var isEditing = !this.entityUidArg_1.equals(new Long(0, 0)) ? true : !(this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_155().get_ARG_ENTITY_JSON_x3rfse_k$()) == null);
    var tmp = this.get_systemImpl_9jowp4_k$();
    var tmp_0;
    if (isEditing) {
      tmp_0 = editEntityStringResource;
    } else {
      tmp_0 = newEntityStringResource;
    }
    return tmp.getString_a9yhoi_k$(tmp_0);
  };
  protoOf(UstadEditViewModel).updateErrorMessageOnChange_silrgy_k$ = function (prevFieldValue, currentFieldValue, currentErrorMessage) {
    return currentErrorMessage == null ? null : !equals(prevFieldValue, currentFieldValue) ? null : currentErrorMessage;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.this$0__1 = this$0;
    this.$fabStringResource_1 = $fabStringResource;
    this.$onSetAddListItemVisibility_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).invoke_f29lti_k$ = function (hasAddPermission, $completion) {
    var tmp = this.create_vh5neu_k$(hasAddPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          setAddNewItemUiState(this.this$0__1, this.hasAddPermission_1, this.$fabStringResource_1, this.$onSetAddListItemVisibility_1);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).create_vh5neu_k$ = function (hasAddPermission, completion) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this.this$0__1, this.$fabStringResource_1, this.$onSetAddListItemVisibility_1, completion);
    i.hasAddPermission_1 = hasAddPermission;
    return i;
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function (hasAddPermission, $completion) {
      return i.invoke_f29lti_k$(hasAddPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_searchEvtCollator__hug3gs($this) {
    return $this.searchEvtCollator_1;
  }
  function setAddNewItemUiState($this, hasAddPermission, fabStringResource, onSetAddItemVisibility) {
    var tmp;
    if (hasAddPermission ? $this.get_listMode_9jw63a_k$().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var tmp_0 = $this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(fabStringResource);
      var tmp_1 = FabIcon_ADD_getInstance();
      tmp = new FabUiState(true, tmp_0, tmp_1, UstadListViewModel$onClickAdd$ref($this));
    } else {
      tmp = new FabUiState(false);
    }
    var fabState = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.setAddNewItemUiState.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(fabState);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    onSetAddItemVisibility(hasAddPermission ? $this.get_listMode_9jw63a_k$().equals(ListViewMode_PICKER_getInstance()) : false);
  }
  function Companion_98() {
    Companion_instance_98 = this;
    this.ARG_LISTMODE_1 = 'listMode';
  }
  protoOf(Companion_98).get_ARG_LISTMODE_1jy3rh_k$ = function () {
    return this.ARG_LISTMODE_1;
  };
  var Companion_instance_98;
  function Companion_getInstance_159() {
    if (Companion_instance_98 == null)
      new Companion_98();
    return Companion_instance_98;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_2(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_2).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$searchEvtCollator$slambda).invoke_lwxlr_k$ = function (it, $completion) {
    var tmp = this.create_icoe51_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_lwxlr_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_elvis_lhs = lastOrNull(this.it_1);
          this.this$0__1.onUpdateSearchResult_wui0ar_k$(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).create_icoe51_k$ = function (it, completion) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_icoe51_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function UstadListViewModel$searchEvtCollator$slambda_0(this$0, resultContinuation) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_lwxlr_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadListViewModel$createSearchEnabledState$lambda(this$0) {
    return function (searchText) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.createSearchEnabledState.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.get_searchState_4sjvxc_k$().copy$default_26m90z_k$(VOID, searchText));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this$0.searchEvtCollator_1.receiveEvent_cmiqeg_k$(searchText);
      return Unit_getInstance();
    };
  }
  function UstadListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.onClickAdd_cbqifs_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.$hasPermissionFlow_1 = $hasPermissionFlow;
    this.this$0__1 = this$0;
    this.$fabStringResource_1 = $fabStringResource;
    this.$onSetAddListItemVisibility_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.$hasPermissionFlow_1());
            var tmp_1 = UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this.this$0__1, this.$fabStringResource_1, this.$onSetAddListItemVisibility_1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_2(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).create_d196fn_k$ = function (completion) {
    return new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda(this.$hasPermissionFlow_1, this.this$0__1, this.$fabStringResource_1, this.$onSetAddListItemVisibility_1, completion);
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadListViewModel$onClickAdd$ref_0($boundThis) {
    var l = function () {
      $boundThis.onClickAdd_cbqifs_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel(di, savedStateHandle, initialState, destinationName) {
    Companion_getInstance_159();
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this._uiState_1 = MutableStateFlow(initialState);
    this.uiState_1 = asStateFlow(this._uiState_1);
    this._refreshCommandFlow_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.refreshCommandFlow_1 = asSharedFlow(this._refreshCommandFlow_1);
    var tmp = this;
    var tmp_0 = new Long(200, 0);
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    var tmp_2 = BufferOverflow_DROP_OLDEST_getInstance();
    tmp.searchEvtCollator_1 = new EventCollator2(tmp_0, tmp_1, 1, tmp_2, UstadListViewModel$searchEvtCollator$slambda_0(this, null));
  }
  protoOf(UstadListViewModel).get__uiState_8tkbd_k$ = function () {
    return this._uiState_1;
  };
  protoOf(UstadListViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(UstadListViewModel).get__refreshCommandFlow_t5fb0s_k$ = function () {
    return this._refreshCommandFlow_1;
  };
  protoOf(UstadListViewModel).get_refreshCommandFlow_3p9ghz_k$ = function () {
    return this.refreshCommandFlow_1;
  };
  protoOf(UstadListViewModel).get_listMode_9jw63a_k$ = function () {
    var tmp;
    if (this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_LISTMODE_1jy3rh_k$()) === ListViewMode_PICKER_getInstance().get_mode_woqlt8_k$() ? true : !(this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$()) == null) ? !(this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$()) == null) : false) {
      tmp = ListViewMode_PICKER_getInstance();
    } else {
      tmp = ListViewMode_BROWSER_getInstance();
    }
    return tmp;
  };
  protoOf(UstadListViewModel).createSearchEnabledState_l9ncdt_k$ = function (visible) {
    return new AppBarSearchUiState(visible, VOID, UstadListViewModel$createSearchEnabledState$lambda(this));
  };
  protoOf(UstadListViewModel).createSearchEnabledState$default_7v3uai_k$ = function (visible, $super) {
    visible = visible === VOID ? true : visible;
    return $super === VOID ? this.createSearchEnabledState_l9ncdt_k$(visible) : $super.createSearchEnabledState_l9ncdt_k$.call(this, visible);
  };
  protoOf(UstadListViewModel).onSearchTextChanged_1nlcqy_k$ = function (searchText) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.onSearchTextChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.get_searchState_4sjvxc_k$().copy$default_26m90z_k$(VOID, searchText));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.searchEvtCollator_1.receiveEvent_cmiqeg_k$(searchText);
  };
  protoOf(UstadListViewModel).collectHasPermissionFlowAndSetAddNewItemUiState_pzgxi3_k$ = function (hasPermissionFlow, fabStringResource, onSetAddListItemVisibility, $completion) {
    return whenSubscribed(this._uiState_1, UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0(hasPermissionFlow, this, fabStringResource, onSetAddListItemVisibility, null), $completion);
  };
  protoOf(UstadListViewModel).createFabState_dqy38i_k$ = function (hasAddPermission, stringResource, onClick) {
    var tmp;
    if (hasAddPermission ? this.get_listMode_9jw63a_k$().equals(ListViewMode_BROWSER_getInstance()) : false) {
      tmp = new FabUiState(true, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(stringResource), FabIcon_ADD_getInstance(), onClick);
    } else {
      tmp = new FabUiState(false);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).createFabState$default_wd281f_k$ = function (hasAddPermission, stringResource, onClick, $super) {
    var tmp;
    if (onClick === VOID) {
      tmp = UstadListViewModel$onClickAdd$ref_0(this);
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    return $super === VOID ? this.createFabState_dqy38i_k$(hasAddPermission, stringResource, onClick) : $super.createFabState_dqy38i_k$.call(this, hasAddPermission, stringResource, onClick);
  };
  protoOf(UstadListViewModel).navigateToCreateNew_mwxhbu_k$ = function (editViewName, extraArgs) {
    var resultDest = this.get_expectedResultDest_cc1yyo_k$();
    var tmp;
    if (!(resultDest == null)) {
      tmp = plus_0(mapOf([to(Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$(), resultDest.get_viewName_c12mav_k$()), to(Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$(), resultDest.get_key_18j28a_k$())]), extraArgs);
    } else {
      tmp = extraArgs;
    }
    var args = tmp;
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(editViewName, args);
  };
  protoOf(UstadListViewModel).navigateToCreateNew$default_bv6w7d_k$ = function (editViewName, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.navigateToCreateNew_mwxhbu_k$(editViewName, extraArgs);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.navigateToCreateNew_mwxhbu_k$.call(this, editViewName, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).navigateOnItemClicked_y77ane_k$ = function (detailViewName, entityUid, result, extraArgs) {
    var resultDest = this.get_expectedResultDest_cc1yyo_k$();
    if (!(resultDest == null)) {
      this.finishWithResult_jlqwtj_k$(result);
    } else {
      var tmp = this.get_navController_qibdoq_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.navigateOnItemClicked.<anonymous>' call
      this_0.putAll_wgg6cj_k$(extraArgs);
      this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), entityUid.toString());
      var tmp$ret$2 = this_0.build_1k0s4u_k$();
      tmp.navigate$default_srzzsc_k$(detailViewName, tmp$ret$2);
    }
  };
  protoOf(UstadListViewModel).navigateOnItemClicked$default_l754h1_k$ = function (detailViewName, entityUid, result, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.navigateOnItemClicked_y77ane_k$(detailViewName, entityUid, result, extraArgs);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.navigateOnItemClicked_y77ane_k$.call(this, detailViewName, entityUid, result, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).listTitle_mhmhkq_k$ = function (browseStringResource, selectStringResource) {
    var tmp = this.get_systemImpl_9jowp4_k$();
    var tmp_0;
    if (this.get_listMode_9jw63a_k$().equals(ListViewMode_BROWSER_getInstance())) {
      tmp_0 = browseStringResource;
    } else {
      tmp_0 = selectStringResource;
    }
    return tmp.getString_a9yhoi_k$(tmp_0);
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).invoke_loxtj4_k$ = function (value, $completion) {
    var tmp = this.create_h5keyk_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform1__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value2__1 = this.value_1;
            var it = this.value2__1;
            var isNew = it.get_timestamp_9fccx9_k$().compareTo_9jj042_k$(this.this$0__1.lastNavResultTimestampCollected_1) > 0;
            if (isNew) {
              _set_lastNavResultTimestampCollected__txfbew(this.this$0__1, it.get_timestamp_9fccx9_k$());
            }

            if (isNew) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = this.$this$unsafeTransform1__1.emit_t92u1f_k$(this.value2__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 2:
            if (false) {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 3:
            this.tmp$ret$00__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).create_h5keyk_k$ = function (value, completion) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda(this.$$this$unsafeFlow_1, this.this$0__1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0($$this$unsafeFlow, this$0, resultContinuation) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_loxtj4_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$49(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$49).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0(this.$this$unsafeFlow0__1, this._this__u8e3s4__1.this$0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_3(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function _set_lastNavResultTimestampCollected__txfbew($this, value) {
    $this.lastNavResultTimestampCollected_1 = value;
    $this.savedStateHandle_1.set_wua6pr_k$('collectedTs', value.toString());
  }
  function _get_lastNavResultTimestampCollected__1ywuek($this) {
    return $this.lastNavResultTimestampCollected_1;
  }
  function Companion_99() {
    Companion_instance_99 = this;
    this.KEY_ENTITY_STATE_1 = 'entityState';
    this.KEY_LAST_COLLECTED_TS_1 = 'collectedTs';
    this.KEY_INIT_STATE_1 = 'initState';
    this.ARG_TIME_ZONE_1 = 'timeZone';
    this.ARG_PARENT_UID_1 = 'parentUid';
    this.ARG_COURSE_BLOCK_UID_1 = 'courseBlockUid';
    this.ARG_ENTITY_UID_1 = 'entityUid';
    this.ARG_SERVER_URL_1 = 'serverUrl';
    this.ARG_NEXT_1 = 'next';
    this.ARG_MAX_DATE_OF_BIRTH_1 = 'maxDob';
    this.ROOT_DESTINATIONS_1 = listOf([Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$(), Companion_getInstance_204().get_DEST_NAME_HOME_lftflt_k$(), Companion_getInstance_224().get_DEST_NAME_HOME_lftflt_k$(), Companion_getInstance_237().get_DEST_NAME_HOME_lftflt_k$()]);
    this.ARG_OPEN_LINK_1 = 'openLink';
    this.ARG_ACCOUNT_NAME_1 = 'account';
    this.ARG_POPUPTO_ON_FINISH_1 = 'popUpToOnFinish';
    this.ARG_INVITE_CODE_1 = 'inviteCode';
    this.ARG_CLAZZUID_1 = 'clazzUid';
    this.ARG_CONTENT_ENTRY_UID_1 = 'entryid';
    this.ARG_PERSON_UID_1 = 'personUid';
    this.ARG_TITLE_1 = 't';
    this.ARG_DONT_SET_CURRENT_SESSION_1 = 'noSessionChange';
    this.ARG_SELECTED_ACCOUNT_PERSON_UID_1 = 'selectedAccountPersonUid';
    this.ARG_SELECTED_ACCOUNT_LEARNINGSPACE_URL_1 = 'selectedAccountEndpointUrl';
    this.ARG_RESULT_DEST_VIEWNAME_1 = 'result_viewname';
    this.ARG_RESULT_DEST_KEY_1 = 'result_key';
  }
  protoOf(Companion_99).get_KEY_ENTITY_STATE_mgypsy_k$ = function () {
    return this.KEY_ENTITY_STATE_1;
  };
  protoOf(Companion_99).get_KEY_LAST_COLLECTED_TS_rdd13f_k$ = function () {
    return this.KEY_LAST_COLLECTED_TS_1;
  };
  protoOf(Companion_99).get_KEY_INIT_STATE_mwep3f_k$ = function () {
    return this.KEY_INIT_STATE_1;
  };
  protoOf(Companion_99).get_ARG_TIME_ZONE_r1nmdw_k$ = function () {
    return this.ARG_TIME_ZONE_1;
  };
  protoOf(Companion_99).get_ARG_PARENT_UID_o4figj_k$ = function () {
    return this.ARG_PARENT_UID_1;
  };
  protoOf(Companion_99).get_ARG_COURSE_BLOCK_UID_jgfzis_k$ = function () {
    return this.ARG_COURSE_BLOCK_UID_1;
  };
  protoOf(Companion_99).get_ARG_ENTITY_UID_qfeu86_k$ = function () {
    return this.ARG_ENTITY_UID_1;
  };
  protoOf(Companion_99).get_ARG_SERVER_URL_kr93b9_k$ = function () {
    return this.ARG_SERVER_URL_1;
  };
  protoOf(Companion_99).get_ARG_NEXT_q16wbp_k$ = function () {
    return this.ARG_NEXT_1;
  };
  protoOf(Companion_99).get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$ = function () {
    return this.ARG_MAX_DATE_OF_BIRTH_1;
  };
  protoOf(Companion_99).get_ROOT_DESTINATIONS_rmy0qv_k$ = function () {
    return this.ROOT_DESTINATIONS_1;
  };
  protoOf(Companion_99).get_ARG_OPEN_LINK_2333fn_k$ = function () {
    return this.ARG_OPEN_LINK_1;
  };
  protoOf(Companion_99).get_ARG_ACCOUNT_NAME_oxicvj_k$ = function () {
    return this.ARG_ACCOUNT_NAME_1;
  };
  protoOf(Companion_99).get_ARG_POPUPTO_ON_FINISH_sh92d3_k$ = function () {
    return this.ARG_POPUPTO_ON_FINISH_1;
  };
  protoOf(Companion_99).get_ARG_INVITE_CODE_853xn3_k$ = function () {
    return this.ARG_INVITE_CODE_1;
  };
  protoOf(Companion_99).get_ARG_CLAZZUID_c9bcuu_k$ = function () {
    return this.ARG_CLAZZUID_1;
  };
  protoOf(Companion_99).get_ARG_CONTENT_ENTRY_UID_tla4x7_k$ = function () {
    return this.ARG_CONTENT_ENTRY_UID_1;
  };
  protoOf(Companion_99).get_ARG_PERSON_UID_8uotmw_k$ = function () {
    return this.ARG_PERSON_UID_1;
  };
  protoOf(Companion_99).get_ARG_TITLE_ps2gqu_k$ = function () {
    return this.ARG_TITLE_1;
  };
  protoOf(Companion_99).get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$ = function () {
    return this.ARG_DONT_SET_CURRENT_SESSION_1;
  };
  protoOf(Companion_99).get_ARG_SELECTED_ACCOUNT_PERSON_UID_31s0ba_k$ = function () {
    return this.ARG_SELECTED_ACCOUNT_PERSON_UID_1;
  };
  protoOf(Companion_99).get_ARG_SELECTED_ACCOUNT_LEARNINGSPACE_URL_hc2g6s_k$ = function () {
    return this.ARG_SELECTED_ACCOUNT_LEARNINGSPACE_URL_1;
  };
  protoOf(Companion_99).get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$ = function () {
    return this.ARG_RESULT_DEST_VIEWNAME_1;
  };
  protoOf(Companion_99).get_ARG_RESULT_DEST_KEY_eanr0y_k$ = function () {
    return this.ARG_RESULT_DEST_KEY_1;
  };
  var Companion_instance_99;
  function Companion_getInstance_160() {
    if (Companion_instance_99 == null)
      new Companion_99();
    return Companion_instance_99;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_3(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_3).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0).invoke_ts1gt6_k$ = function (url, target) {
    return this.function_1(url, target);
  };
  function ifLoggedInElseNavigateToLoginWithNextDestSet$lambda($apiUrlConfig$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $apiUrlConfig$delegate.get_value_j01efc_k$();
  }
  function UstadViewModel$onClickLinkUseCase$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.get_accountManager_bzeywn_k$();
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(this$0.get_di_knto1e_k$()).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, null);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(this$0.get_di_knto1e_k$()).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.Instance_vwdrk9_k$(tmp$ret$2, null);
      return OnClickLinkUseCase_init_$Create$(this$0.navController_1, tmp, tmp_2, tmp$ret$3);
    };
  }
  function _no_name_provided__qut3iv_1($this, this$0) {
    this.$this_1 = $this;
    this.this$0__1 = this$0;
  }
  protoOf(_no_name_provided__qut3iv_1).collect_qksdfu_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$49(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_1).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_qksdfu_k$(collector, $completion);
  };
  function UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation) {
    this.this$0__1 = this$0;
    this.$deserializer_1 = $deserializer;
    this.$jsonStr_1 = $jsonStr;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$getJson$slambda).invoke_x2i4op_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel$getJson$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_x2i4op_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$getJson$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return this.this$0__1.get_json_woos35_k$().decodeFromString_jwu9sq_k$(this.$deserializer_1, this.$jsonStr_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$getJson$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new UstadViewModel$getJson$slambda(this.this$0__1, this.$deserializer_1, this.$jsonStr_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(UstadViewModel$getJson$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadViewModel$getJson$slambda_0(this$0, $deserializer, $jsonStr, resultContinuation) {
    var i = new UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_x2i4op_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation) {
    this.this$0__1 = this$0;
    this.$serializer_1 = $serializer;
    this.$value_1 = $value;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$setJson$slambda).invoke_t04clr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel$setJson$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_t04clr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$setJson$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(this.$serializer_1, this.$value_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$setJson$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new UstadViewModel$setJson$slambda(this.this$0__1, this.$serializer_1, this.$value_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(UstadViewModel$setJson$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadViewModel$setJson$slambda_0(this$0, $serializer, $value, resultContinuation) {
    var i = new UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_t04clr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    this.this$0__1 = this$0;
    this.$permissionCheck_1 = $permissionCheck;
    this.$block_1 = $block;
    this.$onSetFieldsEnabled_1 = $onSetFieldsEnabled;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchIfHasPermission$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(8);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(7);
            this.tmp0_safe_receiver1__1 = this.this$0__1.get_activeRepo_dmmom9_k$();
            if (this.tmp0_safe_receiver1__1 == null) {
              this.WHEN_RESULT2__1 = null;
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              suspendResult = localFirstThenRepoIfFalse(this.tmp0_safe_receiver1__1, this.$permissionCheck_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.WHEN_RESULT2__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.ARGUMENT3__1 = this.WHEN_RESULT2__1;
            if (this.ARGUMENT3__1 === false) {
              this.this$0__1.navController_1.navigate_6urlkw_k$(Companion_getInstance_222().get_DEST_NAME_gmgk7z_k$(), emptyMap(), new UstadGoOptions(this.this$0__1.destinationName_1, true));
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              suspendResult = this.$block_1(this.$this$launch_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            this.tmp$ret$00__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(8);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 6:
            this.set_exceptionState_fex74n_k$(8);
            l$ret$5: do {
              var this_0 = this.this$0__1._appUiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver = this.$onSetFieldsEnabled_1;
            if (tmp1_safe_receiver == null)
              null;
            else
              tmp1_safe_receiver(true);
            return Unit_getInstance();
          case 7:
            this.set_exceptionState_fex74n_k$(8);
            var t = this.get_exception_x0n6w6_k$();
            l$ret$3: do {
              var this_1 = this.this$0__1._appUiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver_0 = this.$onSetFieldsEnabled_1;
            if (tmp1_safe_receiver_0 == null)
              null;
            else
              tmp1_safe_receiver_0(true);
            throw t;
          case 8:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 8) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this.this$0__1, this.$permissionCheck_1, this.$block_1, this.$onSetFieldsEnabled_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadViewModel$launchIfHasPermission$slambda_0(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    this.$onSetFieldsEnabled_1 = $onSetFieldsEnabled;
    this.this$0__1 = this$0;
    this.$block_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.$onSetFieldsEnabled_1(false);
            l$ret$1: do {
              var this_0 = this.this$0__1._appUiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_INDETERMINATE_a8koem_k$(), VOID, VOID, VOID, VOID, VOID, VOID, prevValue.get_actionBarButtonState_cgbrez_k$().copy$default_km9zbw_k$(VOID, VOID, false));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.$block_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.tmp$ret$20__1 = suspendResult;
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(5);
            this.$onSetFieldsEnabled_1(true);
            l$ret$7: do {
              var this_1 = this.this$0__1._appUiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$(), VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.get_actionBarButtonState_cgbrez_k$().copy$default_km9zbw_k$(VOID, VOID, true));
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var t = this.get_exception_x0n6w6_k$();
            this.$onSetFieldsEnabled_1(true);
            l$ret$5: do {
              var this_2 = this.this$0__1._appUiState_1;
              while (true) {
                var prevValue_1 = this_2.get_value_j01efc_k$();
                var nextValue_1 = prevValue_1.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$(), VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.get_actionBarButtonState_cgbrez_k$().copy$default_km9zbw_k$(VOID, VOID, true));
                if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda(this.$onSetFieldsEnabled_1, this.this$0__1, this.$block_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadViewModel$launchWithLoadingIndicator$slambda_0($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_getInstance();
  }
  function $getJsonCOROUTINE$46(_this__u8e3s4, _this__u8e3s4_0, key, deserializer, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this._this__u8e3s4__2 = _this__u8e3s4_0;
    this.key_1 = key;
    this.deserializer_1 = deserializer;
  }
  protoOf($getJsonCOROUTINE$46).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.jsonStr0__1 = this._this__u8e3s4__2.get_6bo4tg_k$(this.key_1);
            if (!(this.jsonStr0__1 == null)) {
              this.set_state_rjd8d0_k$(1);
              var tmp_0 = Dispatchers_getInstance().get_Default_goqax4_k$();
              suspendResult = withContext(tmp_0, UstadViewModel$getJson$slambda_0(this._this__u8e3s4__1, this.deserializer_1, this.jsonStr0__1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT1__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $setJsonCOROUTINE$47(_this__u8e3s4, _this__u8e3s4_0, key, serializer, value, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this._this__u8e3s4__2 = _this__u8e3s4_0;
    this.key_1 = key;
    this.serializer_1 = serializer;
    this.value_1 = value;
  }
  protoOf($setJsonCOROUTINE$47).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Dispatchers_getInstance().get_Default_goqax4_k$();
            suspendResult = withContext(tmp_0, UstadViewModel$setJson$slambda_0(this._this__u8e3s4__1, this.serializer_1, this.value_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var jsonStr = suspendResult;
            this._this__u8e3s4__2.set_wua6pr_k$(this.key_1, jsonStr);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $loadEntityCOROUTINE$48(_this__u8e3s4, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.serializer_1 = serializer;
    this.loadFromStateKeys_1 = loadFromStateKeys;
    this.savedStateKey_1 = savedStateKey;
    this.onLoadFromDb_1 = onLoadFromDb;
    this.makeDefault_1 = makeDefault;
    this.uiUpdate_1 = uiUpdate;
  }
  protoOf($loadEntityCOROUTINE$48).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(19);
            var tmp_0 = this;
            tmp_0.this0__1 = this.loadFromStateKeys_1;
            this.tmp0_iterator1__1 = this.this0__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            if (!this.tmp0_iterator1__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

            this.element2__1 = this.tmp0_iterator1__1.next_20eer_k$();
            var tmp_1 = this;
            tmp_1.key3__1 = this.element2__1;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.getJson_t7vwf3_k$(this._this__u8e3s4__1.savedStateHandle_1, this.key3__1, this.serializer_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.savedVal4__1 = suspendResult;
            if (!(this.savedVal4__1 == null)) {
              this.uiUpdate_1(this.savedVal4__1);
              return this.savedVal4__1;
            }

            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 3:
            this.tmp0_safe_receiver5__1 = this.onLoadFromDb_1;
            if (this.tmp0_safe_receiver5__1 == null) {
              this.WHEN_RESULT6__1 = null;
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              suspendResult = this.tmp0_safe_receiver5__1(this._this__u8e3s4__1.get_activeDb_bu92wd_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.WHEN_RESULT6__1 = suspendResult;
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            this.dbVal7__1 = this.WHEN_RESULT6__1;
            if (!(this.dbVal7__1 == null)) {
              this.uiUpdate_1(this.dbVal7__1);
            }

            this.set_exceptionState_fex74n_k$(13);
            this.tmp1_safe_receiver9__1 = this._this__u8e3s4__1.get_activeRepo_dmmom9_k$();
            if (this.tmp1_safe_receiver9__1 == null) {
              this.WHEN_RESULT10__1 = null;
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.this11__1 = this.tmp1_safe_receiver9__1;
              var tmp_3 = this;
              tmp_3.repo12__1 = this.this11__1;
              this.tmp0_safe_receiver13__1 = this.onLoadFromDb_1;
              if (this.tmp0_safe_receiver13__1 == null) {
                this.WHEN_RESULT14__1 = null;
                this.set_state_rjd8d0_k$(7);
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(6);
                suspendResult = this.tmp0_safe_receiver13__1(this.repo12__1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 6:
            this.WHEN_RESULT14__1 = suspendResult;
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            this.WHEN_RESULT10__1 = this.WHEN_RESULT14__1;
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 8:
            this.tmp2_elvis_lhs15__1 = this.WHEN_RESULT10__1;
            if (this.tmp2_elvis_lhs15__1 == null) {
              this.set_state_rjd8d0_k$(9);
              suspendResult = this.makeDefault_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT16__1 = this.tmp2_elvis_lhs15__1;
              this.set_state_rjd8d0_k$(10);
              continue $sm;
            }

          case 9:
            this.WHEN_RESULT16__1 = suspendResult;
            this.set_state_rjd8d0_k$(10);
            continue $sm;
          case 10:
            this.repoVal17__1 = this.WHEN_RESULT16__1;
            if (!(this.repoVal17__1 == null)) {
              this.set_state_rjd8d0_k$(11);
              suspendResult = this._this__u8e3s4__1.setJson_jnpl42_k$(this._this__u8e3s4__1.savedStateHandle_1, this.savedStateKey_1, this.serializer_1, this.repoVal17__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(12);
              continue $sm;
            }

          case 11:
            this.set_state_rjd8d0_k$(12);
            continue $sm;
          case 12:
            this.uiUpdate_1(this.repoVal17__1);
            this.TRY_RESULT8__1 = this.repoVal17__1;
            this.set_exceptionState_fex74n_k$(19);
            this.set_state_rjd8d0_k$(18);
            continue $sm;
          case 13:
            this.set_exceptionState_fex74n_k$(19);
            var tmp_4 = this.get_exception_x0n6w6_k$();
            if (tmp_4 instanceof Exception) {
              this.e18__1 = this.get_exception_x0n6w6_k$();
              if (!(this.dbVal7__1 == null)) {
                this.set_state_rjd8d0_k$(14);
                suspendResult = this._this__u8e3s4__1.setJson_jnpl42_k$(this._this__u8e3s4__1.savedStateHandle_1, this.savedStateKey_1, this.serializer_1, this.dbVal7__1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(15);
                continue $sm;
              }
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 14:
            this.set_state_rjd8d0_k$(15);
            continue $sm;
          case 15:
            this.tmp3_elvis_lhs19__1 = this.dbVal7__1;
            if (this.tmp3_elvis_lhs19__1 == null) {
              this.set_state_rjd8d0_k$(16);
              suspendResult = this.makeDefault_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT20__1 = this.tmp3_elvis_lhs19__1;
              this.set_state_rjd8d0_k$(17);
              continue $sm;
            }

          case 16:
            var this_0 = suspendResult;
            this.uiUpdate_1(this_0);
            this.WHEN_RESULT20__1 = this_0;
            this.set_state_rjd8d0_k$(17);
            continue $sm;
          case 17:
            this.TRY_RESULT8__1 = this.WHEN_RESULT20__1;
            this.set_state_rjd8d0_k$(18);
            continue $sm;
          case 18:
            this.set_exceptionState_fex74n_k$(19);
            return this.TRY_RESULT8__1;
          case 19:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 19) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function UstadViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_160();
    ViewModel_init_$Init$(this);
    this.di_1 = di;
    this.savedStateHandle_1 = savedStateHandle;
    this.destinationName_1 = destinationName;
    this.navController_1 = new CommandFlowUstadNavController();
    this.navCommandFlow_1 = this.navController_1.get_commandFlow_aa1dg0_k$();
    this._appUiState_1 = MutableStateFlow(new AppUiState());
    this.appUiState_1 = asStateFlow(this._appUiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.accountManager$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, accountManager$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_2 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.invoke_4wgfc3_k$(tmp$ret$2, context);
    var this_0 = On(this, tmp$ret$3, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_1.activeDataLayer$delegate_1 = Instance(this_0, tmp$ret$5, null).provideDelegate_o2qlc1_k$(this, activeDataLayer$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger_0 = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$8 = tmp_6.invoke_4wgfc3_k$(tmp$ret$7, context_0);
    var this_1 = On(this, tmp$ret$8, trigger_0);
    var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_5.activeDb$delegate_1 = Instance(this_1, tmp$ret$10, tag).provideDelegate_o2qlc1_k$(this, activeDb$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.navResultReturner$delegate_1 = Instance(this, tmp$ret$12, null).provideDelegate_o2qlc1_k$(this, navResultReturner$factory());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.json$delegate_1 = Instance(this, tmp$ret$14, null).provideDelegate_o2qlc1_k$(this, json$factory_1());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.snackDispatcher$delegate_1 = Instance(this, tmp$ret$16, null).provideDelegate_o2qlc1_k$(this, snackDispatcher$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.resultReturner$delegate_1 = Instance(this, tmp$ret$18, null).provideDelegate_o2qlc1_k$(this, resultReturner$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.systemImpl$delegate_1 = Instance(this, tmp$ret$20, null).provideDelegate_o2qlc1_k$(this, systemImpl$factory());
    var tmp_19 = this;
    tmp_19.onClickLinkUseCase$delegate_1 = lazy_0(UstadViewModel$onClickLinkUseCase$delegate$lambda(this));
    var tmp_20 = this;
    var tmp0_safe_receiver = this.savedStateHandle_1.get_6bo4tg_k$('collectedTs');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_20.lastNavResultTimestampCollected_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    if (this.lastNavResultTimestampCollected_1.equals(new Long(0, 0))) {
      _set_lastNavResultTimestampCollected__txfbew(this, systemTimeInMillis());
    }
  }
  protoOf(UstadViewModel).get_di_knto1e_k$ = function () {
    return this.di_1;
  };
  protoOf(UstadViewModel).get_savedStateHandle_xtsxet_k$ = function () {
    return this.savedStateHandle_1;
  };
  protoOf(UstadViewModel).get_destinationName_akz2s0_k$ = function () {
    return this.destinationName_1;
  };
  protoOf(UstadViewModel).get_navController_qibdoq_k$ = function () {
    return this.navController_1;
  };
  protoOf(UstadViewModel).get_navCommandFlow_ys3zen_k$ = function () {
    return this.navCommandFlow_1;
  };
  protoOf(UstadViewModel).get__appUiState_rulqry_k$ = function () {
    return this._appUiState_1;
  };
  protoOf(UstadViewModel).get_appUiState_8vwbqz_k$ = function () {
    return this.appUiState_1;
  };
  protoOf(UstadViewModel).get_accountManager_bzeywn_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.accountManager$delegate_1;
    accountManager$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_viewModelScope_ryv1dz_k$ = function () {
    return get_viewModelScope(this);
  };
  protoOf(UstadViewModel).get_activeUserPersonUid_1nlgnz_k$ = function () {
    return this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_personUid_mmhd76_k$();
  };
  protoOf(UstadViewModel).get_activeDataLayer_uea26g_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.activeDataLayer$delegate_1;
    activeDataLayer$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_activeDb_bu92wd_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.activeDb$delegate_1;
    activeDb$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_activeRepo_dmmom9_k$ = function () {
    return this.get_activeDataLayer_uea26g_k$().get_repository_c37cur_k$();
  };
  protoOf(UstadViewModel).get_activeRepoWithFallback_3qnek7_k$ = function () {
    return this.get_activeDataLayer_uea26g_k$().get_repositoryOrLocalDb_ys0nkj_k$();
  };
  protoOf(UstadViewModel).get_navResultReturner_jwjn90_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.navResultReturner$delegate_1;
    navResultReturner$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_json_woos35_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.json$delegate_1;
    json$factory_2();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_snackDispatcher_ifpff8_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.snackDispatcher$delegate_1;
    snackDispatcher$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_resultReturner_b7x1wd_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.resultReturner$delegate_1;
    resultReturner$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_systemImpl_9jowp4_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.systemImpl$delegate_1;
    systemImpl$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_onClickLinkUseCase_cwehnh_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.onClickLinkUseCase$delegate_1;
    onClickLinkUseCase$factory();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(UstadViewModel).get_expectedResultDest_cc1yyo_k$ = function () {
    var popUpToViewName = this.savedStateHandle_1.get_6bo4tg_k$('result_viewname');
    var saveToKey = this.savedStateHandle_1.get_6bo4tg_k$('result_key');
    var tmp;
    if (!(popUpToViewName == null) ? !(saveToKey == null) : false) {
      tmp = new NavResultDest(popUpToViewName, saveToKey);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UstadViewModel).set_loadingState_52atj3_k$ = function (value) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._appUiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.<set-loadingState>.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, value);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(UstadViewModel).get_loadingState_rpk2ke_k$ = function () {
    return this._appUiState_1.get_value_j01efc_k$().get_loadingState_rpk2ke_k$();
  };
  protoOf(UstadViewModel).set_title_ceyuu4_k$ = function (value) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._appUiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.<set-title>.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, value);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(UstadViewModel).get_title_iz32un_k$ = function () {
    return this._appUiState_1.get_value_j01efc_k$().get_title_iz32un_k$();
  };
  protoOf(UstadViewModel).filteredResultFlowForKey_oacype_k$ = function (_this__u8e3s4, key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.resultFlowForKey_v7xpa1_k$(key);
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_1(this_0, this);
  };
  protoOf(UstadViewModel).getJson_t7vwf3_k$ = function (_this__u8e3s4, key, deserializer, $completion) {
    var tmp = new $getJsonCOROUTINE$46(this, _this__u8e3s4, key, deserializer, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel).setJson_jnpl42_k$ = function (_this__u8e3s4, key, serializer, value, $completion) {
    var tmp = new $setJsonCOROUTINE$47(this, _this__u8e3s4, key, serializer, value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel).navigateToViewUri_qtkrj7_k$ = function (_this__u8e3s4, viewUri, goOptions) {
    var viewName = substringBefore(viewUri, '?');
    var tmp;
    if (contains(viewUri, '?')) {
      tmp = UMFileUtil_getInstance().parseURLQueryString(viewUri);
    } else {
      // Inline function 'kotlin.collections.mapOf' call
      tmp = emptyMap();
    }
    var args = tmp;
    _this__u8e3s4.navigate_6urlkw_k$(viewName, args, goOptions);
  };
  protoOf(UstadViewModel).navigateToViewUri$default_l2v2gb_k$ = function (_this__u8e3s4, viewUri, goOptions, $super) {
    goOptions = goOptions === VOID ? Companion_getInstance_143().get_Default_goqax4_k$() : goOptions;
    var tmp;
    if ($super === VOID) {
      this.navigateToViewUri_qtkrj7_k$(_this__u8e3s4, viewUri, goOptions);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.navigateToViewUri_qtkrj7_k$.call(this, _this__u8e3s4, viewUri, goOptions);
    }
    return tmp;
  };
  protoOf(UstadViewModel).finishWithResult_jlqwtj_k$ = function (result) {
    var resultDest = this.get_expectedResultDest_cc1yyo_k$();
    if (!(resultDest == null)) {
      this.get_navResultReturner_jwjn90_k$().sendResult_ncuz0m_k$(new NavResult(resultDest.get_key_18j28a_k$(), systemTimeInMillis(), result));
      this.navController_1.popBackStack_rnnumt_k$(resultDest.get_viewName_c12mav_k$(), false);
    } else {
      this.navController_1.popBackStack_rnnumt_k$(Companion_getInstance_156().get_CURRENT_DEST_3e1ddb_k$(), true);
    }
  };
  protoOf(UstadViewModel).navigateForResult_4lcpk1_k$ = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination) {
    var navArgs = toMutableMap(args);
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp = navArgs;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      this.putFromSavedStateIfPresent_891b9h_k$(tmp0_safe_receiver, 'result_key');
    }
    if (!navArgs.containsKey_aw81wo_k$('result_key') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_0 = 'result_key';
      navArgs.put_4fpzoq_k$(key_0, key);
    }
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp_0 = navArgs;
    } else {
      tmp_0 = null;
    }
    var tmp1_safe_receiver = tmp_0;
    if (tmp1_safe_receiver == null)
      null;
    else {
      this.putFromSavedStateIfPresent_891b9h_k$(tmp1_safe_receiver, 'result_viewname');
    }
    if (!navArgs.containsKey_aw81wo_k$('result_viewname') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_1 = 'result_viewname';
      var value = this.destinationName_1;
      navArgs.put_4fpzoq_k$(key_1, value);
    }
    if (!(currentValue == null)) {
      // Inline function 'kotlin.collections.set' call
      var key_2 = Companion_getInstance_155().get_ARG_ENTITY_JSON_x3rfse_k$();
      var value_0 = this.get_json_woos35_k$().encodeToString_k0apqx_k$(serializer, currentValue);
      navArgs.put_4fpzoq_k$(key_2, value_0);
    }
    this.navController_1.navigate_6urlkw_k$(nextViewName, toMap_0(navArgs), goOptions);
  };
  protoOf(UstadViewModel).navigateForResult$default_qg960j_k$ = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination, $super) {
    args = args === VOID ? emptyMap() : args;
    goOptions = goOptions === VOID ? Companion_getInstance_143().get_Default_goqax4_k$() : goOptions;
    var tmp;
    if (overwriteDestination === VOID) {
      tmp = this instanceof UstadEditViewModel;
    } else {
      tmp = overwriteDestination;
    }
    overwriteDestination = tmp;
    var tmp_0;
    if ($super === VOID) {
      this.navigateForResult_4lcpk1_k$(nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
      tmp_0 = Unit_getInstance();
    } else {
      tmp_0 = $super.navigateForResult_4lcpk1_k$.call(this, nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
    }
    return tmp_0;
  };
  protoOf(UstadViewModel).navigateToEditHtml_j9rhtp_k$ = function (currentValue, resultKey, title, extraArgs) {
    var tmp = Companion_getInstance_157().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateToEditHtml.<anonymous>' call
    var tmp_0 = Companion_getInstance_157().get_ARG_HTML_q13d99_k$();
    this_0.put_4fpzoq_k$(tmp_0, currentValue == null ? '' : currentValue);
    this_0.put_4fpzoq_k$('result_key', resultKey);
    this_0.put_4fpzoq_k$('result_viewname', this.destinationName_1);
    if (title == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateToEditHtml.<anonymous>.<anonymous>' call
      this_0.put_4fpzoq_k$(Companion_getInstance_157().get_ARG_TITLE_ps2gqu_k$(), title);
    }
    this_0.putAll_wgg6cj_k$(extraArgs);
    var tmp$ret$3 = this_0.build_1k0s4u_k$();
    this.navController_1.navigate$default_srzzsc_k$(tmp, tmp$ret$3);
  };
  protoOf(UstadViewModel).navigateToEditHtml$default_imw6oe_k$ = function (currentValue, resultKey, title, extraArgs, $super) {
    title = title === VOID ? null : title;
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.navigateToEditHtml_j9rhtp_k$(currentValue, resultKey, title, extraArgs);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.navigateToEditHtml_j9rhtp_k$.call(this, currentValue, resultKey, title, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadViewModel).loadEntity_6hutmy_k$ = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) {
    var tmp = new $loadEntityCOROUTINE$48(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadViewModel).loadEntity$default_wfbimj_k$ = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion, $super) {
    loadFromStateKeys = loadFromStateKeys === VOID ? listOf(['entityState', Companion_getInstance_155().get_ARG_ENTITY_JSON_x3rfse_k$()]) : loadFromStateKeys;
    savedStateKey = savedStateKey === VOID ? first_0(loadFromStateKeys) : savedStateKey;
    return $super === VOID ? this.loadEntity_6hutmy_k$(serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) : $super.loadEntity_6hutmy_k$.call(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
  };
  protoOf(UstadViewModel).launchIfHasPermission_rjt2z5_k$ = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block) {
    if (setLoadingState) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._appUiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.launchIfHasPermission.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (onSetFieldsEnabled == null)
      null;
    else
      onSetFieldsEnabled(false);
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, UstadViewModel$launchIfHasPermission$slambda_0(this, permissionCheck, block, onSetFieldsEnabled, null));
  };
  protoOf(UstadViewModel).launchIfHasPermission$default_l9omam_k$ = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block, $super) {
    setLoadingState = setLoadingState === VOID ? false : setLoadingState;
    onSetFieldsEnabled = onSetFieldsEnabled === VOID ? null : onSetFieldsEnabled;
    var tmp;
    if ($super === VOID) {
      this.launchIfHasPermission_rjt2z5_k$(permissionCheck, setLoadingState, onSetFieldsEnabled, block);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.launchIfHasPermission_rjt2z5_k$.call(this, permissionCheck, setLoadingState, onSetFieldsEnabled, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).putFromSavedStateIfPresent_891b9h_k$ = function (_this__u8e3s4, key) {
    putFromSavedStateIfPresent(_this__u8e3s4, this.savedStateHandle_1, key);
  };
  protoOf(UstadViewModel).putAllFromSavedStateIfPresent_yspo74_k$ = function (_this__u8e3s4, keys) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = keys.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.putAllFromSavedStateIfPresent.<anonymous>' call
      this.putFromSavedStateIfPresent_891b9h_k$(_this__u8e3s4, element);
    }
  };
  protoOf(UstadViewModel).launchWithLoadingIndicator_qcafqw_k$ = function (onSetFieldsEnabled, block) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, UstadViewModel$launchWithLoadingIndicator$slambda_0(onSetFieldsEnabled, this, block, null));
  };
  protoOf(UstadViewModel).ifLoggedInElseNavigateToLoginWithNextDestSet_j3c0kq_k$ = function (requireAdultAccount, args, block) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var apiUrlConfig$delegate = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(null, getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.ifLoggedInElseNavigateToLoginWithNextDestSet.<anonymous>' call
    var it = this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$();
    if (isGuestUser(it) ? true : requireAdultAccount ? !isDateOfBirthAnAdult(Companion_getInstance().fromEpochMilliseconds_e2resj_k$(it.get_dateOfBirth_7hv8kx_k$())) : false) {
      var tmp_0 = this.destinationName_1 + '?' + toQueryString(args);
      var tmp_1 = this.get_accountManager_bzeywn_k$();
      var tmp_2 = UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda;
      navigateToLink(this.navController_1, tmp_0, tmp_1, new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(tmp_2), new UstadGoOptions(this.destinationName_1, true), VOID, ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(apiUrlConfig$delegate).get_canSelectServer_81keje_k$());
    } else {
      block();
    }
  };
  protoOf(UstadViewModel).ifLoggedInElseNavigateToLoginWithNextDestSet$default_9n4rd6_k$ = function (requireAdultAccount, args, block, $super) {
    requireAdultAccount = requireAdultAccount === VOID ? false : requireAdultAccount;
    var tmp;
    if ($super === VOID) {
      this.ifLoggedInElseNavigateToLoginWithNextDestSet_j3c0kq_k$(requireAdultAccount, args, block);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.ifLoggedInElseNavigateToLoginWithNextDestSet_j3c0kq_k$.call(this, requireAdultAccount, args, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).createXapiSession_4d9ia2_k$ = function (contentEntryUid, clazzUid, cbUid) {
    var registrationUuid = uuid4();
    var activityId = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$() + 'ns/xapi/contentEntry/' + contentEntryUid.toString();
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this.get_di_knto1e_k$()).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var xxStringHasher = tmp.Instance_vwdrk9_k$(tmp$ret$0, null);
    var tmp1_xseUid = get_doorPrimaryKeyManager(this.get_activeDb_bu92wd_k$()).nextId_8yjjmy_k$(Companion_getInstance_37().get_TABLE_ID_xo2mej_k$());
    var tmp2_xseAccountPersonUid = this.get_activeUserPersonUid_1nlgnz_k$();
    var tmp0_elvis_lhs = this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_username_ytz5i7_k$();
    var tmp3_xseAccountUsername = tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs;
    var tmp4_xseRootActivityUid = xxStringHasher.hash_6htf84_k$(activityId);
    var tmp5_xseRegistrationHi = registrationUuid.get_mostSignificantBits_50ugdp_k$();
    var tmp6_xseRegistrationLo = registrationUuid.get_leastSignificantBits_mmkdbt_k$();
    return new XapiSessionEntity(tmp1_xseUid, VOID, tmp5_xseRegistrationHi, tmp6_xseRegistrationLo, VOID, tmp2_xseAccountPersonUid, VOID, tmp3_xseAccountUsername, clazzUid, cbUid, contentEntryUid, VOID, activityId, tmp4_xseRootActivityUid);
  };
  protoOf(UstadViewModel).createXapiSession$default_xiy4tw_k$ = function (contentEntryUid, clazzUid, cbUid, $super) {
    contentEntryUid = contentEntryUid === VOID ? new Long(0, 0) : contentEntryUid;
    var tmp;
    if (clazzUid === VOID) {
      var tmp0_safe_receiver = this.savedStateHandle_1.get_6bo4tg_k$('clazzUid');
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
      tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    } else {
      tmp = clazzUid;
    }
    clazzUid = tmp;
    var tmp_0;
    if (cbUid === VOID) {
      var tmp2_safe_receiver = this.savedStateHandle_1.get_6bo4tg_k$('courseBlockUid');
      var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
      tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    } else {
      tmp_0 = cbUid;
    }
    cbUid = tmp_0;
    return $super === VOID ? this.createXapiSession_4d9ia2_k$(contentEntryUid, clazzUid, cbUid) : $super.createXapiSession_4d9ia2_k$.call(this, contentEntryUid, clazzUid, cbUid);
  };
  function accountManager$factory() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.get_accountManager_bzeywn_k$();
    }, null);
  }
  function activeDataLayer$factory() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.get_activeDataLayer_uea26g_k$();
    }, null);
  }
  function activeDb$factory() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.get_activeDb_bu92wd_k$();
    }, null);
  }
  function navResultReturner$factory() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.get_navResultReturner_jwjn90_k$();
    }, null);
  }
  function json$factory_1() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.get_json_woos35_k$();
    }, null);
  }
  function snackDispatcher$factory() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.get_snackDispatcher_ifpff8_k$();
    }, null);
  }
  function resultReturner$factory() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.get_resultReturner_b7x1wd_k$();
    }, null);
  }
  function systemImpl$factory() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.get_systemImpl_9jowp4_k$();
    }, null);
  }
  function accountManager$factory_0() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.get_accountManager_bzeywn_k$();
    }, null);
  }
  function activeDataLayer$factory_0() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.get_activeDataLayer_uea26g_k$();
    }, null);
  }
  function activeDb$factory_0() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.get_activeDb_bu92wd_k$();
    }, null);
  }
  function navResultReturner$factory_0() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.get_navResultReturner_jwjn90_k$();
    }, null);
  }
  function json$factory_2() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.get_json_woos35_k$();
    }, null);
  }
  function snackDispatcher$factory_0() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.get_snackDispatcher_ifpff8_k$();
    }, null);
  }
  function resultReturner$factory_0() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.get_resultReturner_b7x1wd_k$();
    }, null);
  }
  function systemImpl$factory_0() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.get_systemImpl_9jowp4_k$();
    }, null);
  }
  function onClickLinkUseCase$factory() {
    return getPropertyCallableRef('onClickLinkUseCase', 1, KProperty1, function (receiver) {
      return receiver.get_onClickLinkUseCase_cwehnh_k$();
    }, null);
  }
  function Companion_100() {
    Companion_instance_100 = this;
    this.DEST_NAME_1 = 'OpenLicenses';
  }
  protoOf(Companion_100).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_100;
  function Companion_getInstance_161() {
    if (Companion_instance_100 == null)
      new Companion_100();
    return Companion_instance_100;
  }
  function OpenLicensesViewModel(di, savedStateHandle) {
    Companion_getInstance_161();
    UstadViewModel.call(this, di, savedStateHandle, Companion_getInstance_221().get_DEST_NAME_gmgk7z_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.about.OpenLicensesViewModel.<anonymous>' call
        var tmp0_title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_licenses_hc9vqd_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, false, true, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(OpenLicensesViewModel).onClickLink_84ihtl_k$ = function (link) {
    this.get_onClickLinkUseCase_cwehnh_k$().invoke_ts1gt6_k$(link, LinkTarget_BLANK_getInstance());
  };
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda$lambda($credentialResult) {
    return function () {
      return 'Error occurred: ' + $credentialResult.get_message_h23axq_k$();
    };
  }
  function _get__uiState__8e9jsd_0($this) {
    return $this._uiState_1;
  }
  function _get_supportLangConfig__jc22wi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.supportLangConfig$delegate_1;
    supportLangConfig$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_setLanguageUseCase__st7nci($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.setLanguageUseCase$delegate_1;
    setLanguageUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_decodeUserHandleUseCase__wbsil7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.decodeUserHandleUseCase$delegate_1;
    decodeUserHandleUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_apiUrlConfig__mldllg_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_impl__d88w17($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.impl$delegate_1;
    impl$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_dontSetCurrentSession__mobbul($this) {
    return $this.dontSetCurrentSession_1;
  }
  function _get_getCredentialUseCase__qofq9r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getCredentialUseCase$delegate_1;
    getCredentialUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.parseCredentialUsernameUseCase$delegate_1;
    parseCredentialUsernameUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function getCredentials($this) {
    var tmp = $this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda_0($this, null));
  }
  function onLoginWithUsernameAndPasswordFromCredentialManager($this, credentialUsername, password) {
    var tmp = $this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda_0($this, credentialUsername, password, null));
  }
  function goToNextDestAfterSignIn($this, person, serverUrl) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_0 = $this.get_di_knto1e_k$();
    var context = new LearningSpace(serverUrl);
    var trigger = this_0.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.invoke_4wgfc3_k$(tmp$ret$0, context);
    var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
    var tmp_1 = get_direct(tmp$ret$2).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var getDefaultDestinationUseCase = tmp_1.Instance_vwdrk9_k$(tmp$ret$3, null);
    var tmp0_elvis_lhs = $this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
    var nextDestVal = tmp0_elvis_lhs == null ? getDefaultDestinationUseCase.invoke_jkqnwo_k$() : tmp0_elvis_lhs;
    var tmp_3 = Napier_getInstance();
    tmp_3.d$default_iccotn_k$(VOID, VOID, AddAccountSelectNewOrExistingViewModel$goToNextDestAfterSignIn$lambda(nextDestVal));
    $this.navigateToViewUri_qtkrj7_k$($this.get_navController_qibdoq_k$(), appendSelectedAccount(nextDestVal, person.get_personUid_mmhd76_k$(), new LearningSpace(serverUrl)), new UstadGoOptions(VOID, VOID, true));
  }
  function Companion_101() {
    Companion_instance_101 = this;
    this.DEST_NAME_1 = 'AddAccountSelectNewOrExisting';
  }
  protoOf(Companion_101).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_101;
  function Companion_getInstance_162() {
    if (Companion_instance_101 == null)
      new Companion_101();
    return Companion_instance_101;
  }
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_exceptionState_fex74n_k$(5);
            this.tmp0_safe_receiver0__1 = _get_getCredentialUseCase__qofq9r(this.this$0__1);
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.invoke_22774b_k$(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.credentialResult2__1 = this.WHEN_RESULT1__1;
            var tmp_0 = this.credentialResult2__1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              var tmp_1 = this;
              var tmp1_elvis_lhs = this.credentialResult2__1.get_passkeyWebAuthNResponse_wr4mig_k$().get_response_xlk07e_k$().get_userHandle_nn68s_k$();
              var tmp_2;
              if (tmp1_elvis_lhs == null) {
                throw IllegalStateException_init_$Create$('userHandle not found');
              } else {
                tmp_2 = tmp1_elvis_lhs;
              }
              tmp_1.userHandle3__1 = tmp_2;
              this.tmp2_container4__1 = _get_decodeUserHandleUseCase__wbsil7(this.this$0__1).invoke_lt562m_k$(this.userHandle3__1);
              this.learningSpace5__1 = this.tmp2_container4__1.component1_7eebsc_k$();
              this.set_state_rjd8d0_k$(3);
              suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().loginWithPasskey_m4qfem_k$(this.credentialResult2__1.get_passkeyWebAuthNResponse_wr4mig_k$(), this.learningSpace5__1.get_url_18iuii_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_3 = this.credentialResult2__1;
              if (tmp_3 instanceof PasswordCredentialResult) {
                onLoginWithUsernameAndPasswordFromCredentialManager(this.this$0__1, this.credentialResult2__1.get_credentialUsername_qohbu2_k$(), this.credentialResult2__1.get_password_bodifw_k$());
                this.set_state_rjd8d0_k$(4);
                continue $sm;
              } else {
                var tmp_4 = this.credentialResult2__1;
                if (tmp_4 instanceof Error_1) {
                  var tmp_5 = Napier_getInstance();
                  tmp_5.e$default_s5p7m2_k$(VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda$lambda(this.credentialResult2__1));
                  l$ret$1: do {
                    var this_0 = this.this$0__1._uiState_1;
                    while (true) {
                      var prevValue = this_0.get_value_j01efc_k$();
                      var nextValue = prevValue.copy$default_23kqvm_k$(VOID, VOID, VOID, this.credentialResult2__1.get_message_h23axq_k$());
                      if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                        break l$ret$1;
                      }
                    }
                  }
                   while (false);
                  this.set_state_rjd8d0_k$(4);
                  continue $sm;
                } else {
                  var tmp_6 = this.credentialResult2__1;
                  if (tmp_6 instanceof NoCredentialAvailableResult) {
                    this.set_state_rjd8d0_k$(4);
                    continue $sm;
                  } else {
                    if (this.credentialResult2__1 == null) {
                      this.set_state_rjd8d0_k$(4);
                      continue $sm;
                    } else {
                      this.set_state_rjd8d0_k$(4);
                      continue $sm;
                    }
                  }
                }
              }
            }

          case 3:
            var account = suspendResult;
            goToNextDestAfterSignIn(this.this$0__1, account.toPerson_v1b6fk_k$(), this.learningSpace5__1.get_url_18iuii_k$());
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 5:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_7 = this.get_exception_x0n6w6_k$();
            if (tmp_7 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              Napier_getInstance().e$default_pvzj32_k$('AddAccountSelectNewOrExistingViewModel: getCredentials: Error occurred', e);
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 6:
            throw this.get_exception_x0n6w6_k$();
          case 7:
            this.set_exceptionState_fex74n_k$(6);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda_0(this$0, resultContinuation) {
    var i = new AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this$0, $credentialUsername, $password, resultContinuation) {
    this.this$0__1 = this$0;
    this.$credentialUsername_1 = $credentialUsername;
    this.$password_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.errorMessage0__1 = null;
            this.tmp0_container1__1 = _get_parseCredentialUsernameUseCase__8m48wk(this.this$0__1).invoke_lt562m_k$(this.$credentialUsername_1);
            this.learningSpace2__1 = this.tmp0_container1__1.component1_7eebsc_k$();
            this.username3__1 = this.tmp0_container1__1.component2_7eebsb_k$();
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = this.this$0__1.get_accountManager_bzeywn_k$();
            var this_0 = this.username3__1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.$password_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            var tmp_3 = this.learningSpace2__1.get_url_18iuii_k$();
            var tmp1_safe_receiver = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$());
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toLong_0(tmp1_safe_receiver);
            suspendResult = tmp_0.login_jicr3d_k$(tmp_1, tmp_2, tmp_3, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.this$0__1.dontSetCurrentSession_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var account = suspendResult;
            var tmp_4 = this;
            goToNextDestAfterSignIn(this.this$0__1, account.toPerson_v1b6fk_k$(), this.learningSpace2__1.get_url_18iuii_k$());
            tmp_4.tmp$ret$04__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_5 = this.get_exception_x0n6w6_k$();
            if (tmp_5 instanceof AdultAccountRequiredException) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_6 = this;
              this.errorMessage0__1 = _get_impl__d88w17(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_adult_account_required_hbft5r_k$());
              tmp_6.tmp$ret$04__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(5);
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              var tmp_7 = this.get_exception_x0n6w6_k$();
              if (tmp_7 instanceof UnauthorizedException) {
                var e_0 = this.get_exception_x0n6w6_k$();
                var tmp_8 = this;
                this.errorMessage0__1 = _get_impl__d88w17(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_wrong_user_pass_combo_so7k7t_k$());
                tmp_8.tmp$ret$04__1 = Unit_getInstance();
                this.set_exceptionState_fex74n_k$(5);
                this.set_state_rjd8d0_k$(6);
                continue $sm;
              } else {
                var tmp_9 = this.get_exception_x0n6w6_k$();
                if (tmp_9 instanceof ConsentNotGrantedException) {
                  var e_1 = this.get_exception_x0n6w6_k$();
                  var tmp_10 = this;
                  this.errorMessage0__1 = _get_impl__d88w17(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_your_account_needs_approved_9xp7xu_k$());
                  tmp_10.tmp$ret$04__1 = Unit_getInstance();
                  this.set_exceptionState_fex74n_k$(5);
                  this.set_state_rjd8d0_k$(6);
                  continue $sm;
                } else {
                  var tmp_11 = this.get_exception_x0n6w6_k$();
                  if (tmp_11 instanceof Exception) {
                    var e_2 = this.get_exception_x0n6w6_k$();
                    var tmp_12 = this;
                    this.errorMessage0__1 = _get_impl__d88w17(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_login_network_error_b1pwy0_k$());
                    tmp_12.tmp$ret$04__1 = Unit_getInstance();
                    this.set_exceptionState_fex74n_k$(5);
                    this.set_state_rjd8d0_k$(6);
                    continue $sm;
                  } else {
                    throw this.get_exception_x0n6w6_k$();
                  }
                }
              }
            }

          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            if (!(this.errorMessage0__1 == null)) {
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(toString(this.errorMessage0__1)));
            }

            throw t;
          case 5:
            throw this.get_exception_x0n6w6_k$();
          case 6:
            this.set_exceptionState_fex74n_k$(5);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            if (!(this.errorMessage0__1 == null)) {
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(toString(this.errorMessage0__1)));
            }

            return Unit_getInstance();
        }
      } catch ($p) {
        var e_3 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e_3;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_3);
        }
      }
     while (true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this.this$0__1, this.$credentialUsername_1, this.$password_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda_0(this$0, $credentialUsername, $password, resultContinuation) {
    var i = new AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this$0, $credentialUsername, $password, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddAccountSelectNewOrExistingViewModel$goToNextDestAfterSignIn$lambda($nextDestVal) {
    return function () {
      return 'AddAccountSelectNewOrExistingViewModel: go to next destination: ' + $nextDestVal;
    };
  }
  function AddAccountSelectNewOrExistingViewModel(di, savedStateHandle) {
    Companion_getInstance_162();
    UstadViewModel.call(this, di, savedStateHandle, 'AddAccountSelectNewOrExisting');
    this._uiState_1 = MutableStateFlow(new AddAccountSelectNewOrExistingUiState());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.supportLangConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, supportLangConfig$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.setLanguageUseCase$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, setLanguageUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(DecodeUserHandleUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.decodeUserHandleUseCase$delegate_1 = Instance(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, decodeUserHandleUseCase$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_1());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.impl$delegate_1 = Instance(this, tmp$ret$8, null).provideDelegate_o2qlc1_k$(this, impl$factory());
    var tmp_9 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_9.dontSetCurrentSession_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(GetCredentialUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.getCredentialUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$10, null).provideDelegate_o2qlc1_k$(this, getCredentialUseCase$factory());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.parseCredentialUsernameUseCase$delegate_1 = Instance(this, tmp$ret$12, null).provideDelegate_o2qlc1_k$(this, parseCredentialUsernameUseCase$factory());
    this.get__appUiState_rulqry_k$().set_value_v1vabv_k$(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, false, VOID, VOID, VOID, true));
    var allLanguages = _get_supportLangConfig__jc22wi(this).supportedUiLanguagesAndSysDefault_rnahh0_k$(this.get_systemImpl_9jowp4_k$());
    var currentLanguage = _get_supportLangConfig__jc22wi(this).getCurrentLanguage_ra0l1n_k$(this.get_systemImpl_9jowp4_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.<anonymous>' call
        var nextValue = new AddAccountSelectNewOrExistingUiState(currentLanguage, allLanguages);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    getCredentials(this);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).onClickNewUser_pja4ya_k$ = function () {
    this.navigateUser_perbev_k$(true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).onClickExistingUser_8tp2un_k$ = function () {
    this.navigateUser_perbev_k$(false);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).navigateUser_perbev_k$ = function (isNewUser) {
    var userType = isNewUser ? Companion_getInstance_244().get_ARG_VAL_NEW_USER_g702u_k$() : Companion_getInstance_244().get_ARG_VAL_EXISTING_USER_9ael69_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.navigateUser.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    this_0.put_4fpzoq_k$(Companion_getInstance_244().get_ARG_NEW_OR_EXISTING_USER_v4h2ks_k$(), userType);
    var tmp0_safe_receiver = _get_apiUrlConfig__mldllg_0(this).get_presetLearningSpaceUrl_nzw9pt_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), tmp0_safe_receiver);
    }
    var args = this_0.build_1k0s4u_k$();
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    var this_1 = _get_apiUrlConfig__mldllg_0(this).get_presetLearningSpaceUrl_nzw9pt_k$();
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_1 == null ? true : charSequenceLength(this_1) === 0)) {
      tmp = isNewUser ? Companion_getInstance_240().get_DEST_NAME_gmgk7z_k$() : Companion_getInstance_223().get_DEST_NAME_gmgk7z_k$();
    } else {
      // Inline function 'kotlin.text.isNullOrEmpty' call
      var this_2 = _get_apiUrlConfig__mldllg_0(this).get_newPersonalAccountsLearningSpaceUrl_l46cfw_k$();
      // Inline function 'kotlin.contracts.contract' call
      if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
        tmp = Companion_getInstance_236().get_DEST_NAME_gmgk7z_k$();
      } else {
        tmp = Companion_getInstance_163().get_DEST_NAME_gmgk7z_k$();
      }
    }
    var destination = tmp;
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(destination, args);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).onLanguageSelected_pjwrc0_k$ = function (uiLanguage) {
    if (!uiLanguage.equals(this._uiState_1.get_value_j01efc_k$().currentLanguage_1)) {
      var result = _get_setLanguageUseCase__st7nci(this).invoke$default_l22cmf_k$(uiLanguage, 'AddAccountSelectNewOrExisting', this.get_navController_qibdoq_k$());
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.onLanguageSelected.<anonymous>' call
          var nextValue = prevValue.copy$default_23kqvm_k$(uiLanguage, VOID, result.get_waitForRestart_vo16qs_k$());
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  function AddAccountSelectNewOrExistingUiState(currentLanguage, languageList, showWaitForRestart, errorText) {
    currentLanguage = currentLanguage === VOID ? new UiLanguage('en', 'English') : currentLanguage;
    languageList = languageList === VOID ? listOf_0(currentLanguage) : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? false : showWaitForRestart;
    errorText = errorText === VOID ? null : errorText;
    this.currentLanguage_1 = currentLanguage;
    this.languageList_1 = languageList;
    this.showWaitForRestart_1 = showWaitForRestart;
    this.errorText_1 = errorText;
  }
  protoOf(AddAccountSelectNewOrExistingUiState).get_currentLanguage_kpnmk8_k$ = function () {
    return this.currentLanguage_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).get_languageList_u20dcx_k$ = function () {
    return this.languageList_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).get_showWaitForRestart_gqlxof_k$ = function () {
    return this.showWaitForRestart_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).get_errorText_dypup8_k$ = function () {
    return this.errorText_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).component1_7eebsc_k$ = function () {
    return this.currentLanguage_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).component2_7eebsb_k$ = function () {
    return this.languageList_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).component3_7eebsa_k$ = function () {
    return this.showWaitForRestart_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).component4_7eebs9_k$ = function () {
    return this.errorText_1;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).copy_agh7y9_k$ = function (currentLanguage, languageList, showWaitForRestart, errorText) {
    return new AddAccountSelectNewOrExistingUiState(currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).copy$default_23kqvm_k$ = function (currentLanguage, languageList, showWaitForRestart, errorText, $super) {
    currentLanguage = currentLanguage === VOID ? this.currentLanguage_1 : currentLanguage;
    languageList = languageList === VOID ? this.languageList_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.showWaitForRestart_1 : showWaitForRestart;
    errorText = errorText === VOID ? this.errorText_1 : errorText;
    return $super === VOID ? this.copy_agh7y9_k$(currentLanguage, languageList, showWaitForRestart, errorText) : $super.copy_agh7y9_k$.call(this, currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUiState(currentLanguage=' + this.currentLanguage_1 + ', languageList=' + this.languageList_1 + ', showWaitForRestart=' + this.showWaitForRestart_1 + ', errorText=' + this.errorText_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUiState).hashCode = function () {
    var result = this.currentLanguage_1.hashCode();
    result = imul(result, 31) + hashCode(this.languageList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showWaitForRestart_1) | 0;
    result = imul(result, 31) + (this.errorText_1 == null ? 0 : getStringHashCode(this.errorText_1)) | 0;
    return result;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddAccountSelectNewOrExistingUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddAccountSelectNewOrExistingUiState ? other : THROW_CCE();
    if (!this.currentLanguage_1.equals(tmp0_other_with_cast.currentLanguage_1))
      return false;
    if (!equals(this.languageList_1, tmp0_other_with_cast.languageList_1))
      return false;
    if (!(this.showWaitForRestart_1 === tmp0_other_with_cast.showWaitForRestart_1))
      return false;
    if (!(this.errorText_1 == tmp0_other_with_cast.errorText_1))
      return false;
    return true;
  };
  function supportLangConfig$factory() {
    return getPropertyCallableRef('supportLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportLangConfig__jc22wi(receiver);
    }, null);
  }
  function setLanguageUseCase$factory() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function decodeUserHandleUseCase$factory() {
    return getPropertyCallableRef('decodeUserHandleUseCase', 1, KProperty1, function (receiver) {
      return _get_decodeUserHandleUseCase__wbsil7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_1() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function impl$factory() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function getCredentialUseCase$factory() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk(receiver);
    }, null);
  }
  function supportLangConfig$factory_0() {
    return getPropertyCallableRef('supportLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportLangConfig__jc22wi(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_0() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function decodeUserHandleUseCase$factory_0() {
    return getPropertyCallableRef('decodeUserHandleUseCase', 1, KProperty1, function (receiver) {
      return _get_decodeUserHandleUseCase__wbsil7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_2() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function impl$factory_0() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function getCredentialUseCase$factory_0() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_0() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk(receiver);
    }, null);
  }
  function _get_apiUrlConfig__mldllg_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function _get__uiState__8e9jsd_1($this) {
    return $this._uiState_1;
  }
  function _get_isNewUser__c4ed8w($this) {
    return $this.isNewUser_1;
  }
  function _get_personAccountLearningSpaceUrl__7beoc2($this) {
    return $this.personAccountLearningSpaceUrl_1;
  }
  function Companion_102() {
    Companion_instance_102 = this;
    this.DEST_NAME_1 = 'AddAccountSelectUserType';
  }
  protoOf(Companion_102).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_102;
  function Companion_getInstance_163() {
    if (Companion_instance_102 == null)
      new Companion_102();
    return Companion_instance_102;
  }
  function AddAccountSelectNewOrExistingUserTypeViewModel(di, savedStateHandle) {
    Companion_getInstance_163();
    UstadViewModel.call(this, di, savedStateHandle, 'AddAccountSelectUserType');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_3());
    this._uiState_1 = MutableStateFlow(new AddAccountSelectNewOrExistingUserTypeUiState());
    this.isNewUser_1 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_244().get_ARG_NEW_OR_EXISTING_USER_v4h2ks_k$()) === Companion_getInstance_244().get_ARG_VAL_NEW_USER_g702u_k$();
    this.personAccountLearningSpaceUrl_1 = _get_apiUrlConfig__mldllg_1(this).get_newPersonalAccountsLearningSpaceUrl_l46cfw_k$();
    var tmp_1 = this.get__appUiState_rulqry_k$();
    var tmp_2;
    if (this.isNewUser_1) {
      tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_new_user_90vx9p_k$());
    } else {
      tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_existing_user_jgf48a_k$());
    }
    var tmp0_title = tmp_2;
    tmp_1.set_value_v1vabv_k$(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false, VOID, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.<anonymous>' call
        var nextValue = prevValue.copy_o18wmo_k$(!(this.personAccountLearningSpaceUrl_1 == null));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).get_uiState_66ctcc_k$ = function () {
    return asStateFlow(this._uiState_1);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).onClickPersonalAccount_m2lsk4_k$ = function () {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0;
    if (this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_244().get_ARG_NEW_OR_EXISTING_USER_v4h2ks_k$()) === Companion_getInstance_244().get_ARG_VAL_NEW_USER_g702u_k$()) {
      tmp_0 = Companion_getInstance_240().get_DEST_NAME_gmgk7z_k$();
    } else {
      tmp_0 = Companion_getInstance_223().get_DEST_NAME_gmgk7z_k$();
    }
    var tmp_1 = tmp_0;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.onClickPersonalAccount.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    this_0.put_4fpzoq_k$(Companion_getInstance_244().get_ARG_IS_PERSONAL_ACCOUNT_yt5p7z_k$(), 'true');
    var tmp_2 = Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$();
    var tmp0_elvis_lhs = this.personAccountLearningSpaceUrl_1;
    var tmp_3;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$('Personal account button should not have been there...');
    } else {
      tmp_3 = tmp0_elvis_lhs;
    }
    this_0.put_4fpzoq_k$(tmp_2, tmp_3);
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_1, tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).onClickJoinLearningSpace_2dyywr_k$ = function () {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_236().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.onClickJoinLearningSpace.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).onClickNewLearningSpace_snh1q9_k$ = function () {
  };
  function AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount) {
    showAddPersonalAccount = showAddPersonalAccount === VOID ? false : showAddPersonalAccount;
    this.showAddPersonalAccount_1 = showAddPersonalAccount;
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).get_showAddPersonalAccount_h2345u_k$ = function () {
    return this.showAddPersonalAccount_1;
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).component1_7eebsc_k$ = function () {
    return this.showAddPersonalAccount_1;
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).copy_o18wmo_k$ = function (showAddPersonalAccount) {
    return new AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).copy$default_r8xcs0_k$ = function (showAddPersonalAccount, $super) {
    showAddPersonalAccount = showAddPersonalAccount === VOID ? this.showAddPersonalAccount_1 : showAddPersonalAccount;
    return $super === VOID ? this.copy_o18wmo_k$(showAddPersonalAccount) : $super.copy_o18wmo_k$.call(this, showAddPersonalAccount);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount=' + this.showAddPersonalAccount_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).hashCode = function () {
    return getBooleanHashCode(this.showAddPersonalAccount_1);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddAccountSelectNewOrExistingUserTypeUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddAccountSelectNewOrExistingUserTypeUiState ? other : THROW_CCE();
    if (!(this.showAddPersonalAccount_1 === tmp0_other_with_cast.showAddPersonalAccount_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_3() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function apiUrlConfig$factory_4() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function AccountListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda).invoke_708t0e_k$ = function (it, $completion) {
    var tmp = this.create_wsu6fq_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_708t0e_k$(p1 instanceof UserSessionWithPersonAndLearningSpace ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_lgpdyh_k$(this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda).create_wsu6fq_k$ = function (it, completion) {
    var i = new AccountListViewModel$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(AccountListViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_wsu6fq_k$(value instanceof UserSessionWithPersonAndLearningSpace ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_708t0e_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda$slambda).invoke_8nu6g2_k$ = function (accountList, $completion) {
    var tmp = this.create_owaxm_k$(accountList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_8nu6g2_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var currentUserSessionUid = this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_userSession_tatogu_k$().get_usUid_izsm95_k$();
          var this_0 = this.accountList_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_0.iterator_jk1svi_k$();
          while (tmp0_iterator.hasNext_bitz1p_k$()) {
            var element = tmp0_iterator.next_20eer_k$();
            var isFilteredOutActiveAccount = this.this$0__1.activeAccountMode_1 === 'header' ? element.get_userSession_tatogu_k$().get_usUid_izsm95_k$().equals(currentUserSessionUid) : false;
            var isFilteredOutByEndpoint = !(this.this$0__1.endpointFilter_1 == null) ? !(element.get_learningSpace_sz4skh_k$().get_url_18iuii_k$() === this.this$0__1.endpointFilter_1) : false;
            var isFilteredOutByDateOfBirth = this.this$0__1.maxDateOfBirth_1.compareTo_9jj042_k$(new Long(0, 0)) > 0 ? element.get_person_i0c866_k$().get_dateOfBirth_7hv8kx_k$().compareTo_9jj042_k$(this.this$0__1.maxDateOfBirth_1) > 0 : false;
            if (!(((isFilteredOutActiveAccount ? true : isFilteredOutByEndpoint) ? true : isFilteredOutByDateOfBirth) ? true : isTemporary(element.get_userSession_tatogu_k$()))) {
              destination.add_utx5q5_k$(element);
            }
          }
          var accountsToDisplay = destination;
          l$ret$1: do {
            var this_1 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_1.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_lgpdyh_k$(VOID, accountsToDisplay);
              if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).create_owaxm_k$ = function (accountList, completion) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.accountList_1 = accountList;
    return i;
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_owaxm_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (accountList, $completion) {
      return i.invoke_8nu6g2_k$(accountList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda_1).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_accountManager_bzeywn_k$().get_activeUserSessionsFlow_n4f46z_k$();
            var tmp_1 = AccountListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_4(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new AccountListViewModel$slambda$slambda_1(this.this$0__1, completion);
  };
  function AccountListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_getInstance();
  }
  function AccountListViewModel$onClickLogout$slambda$lambda_0(this$0) {
    return function (it) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var this_0 = this$0.get_di_knto1e_k$();
      var trigger = this_0.get_diTrigger_fb5jcm_k$();
      // Inline function 'org.kodein.di.diContext' call
      var tmp = Companion_getInstance_2();
      // Inline function 'org.kodein.type.generic' call
      var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
      var tmp$ret$1 = tmp.invoke_4wgfc3_k$(tmp$ret$0, it);
      var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
      var tmp_1 = get_direct(tmp$ret$2).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_2 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
      return tmp_1.Instance_vwdrk9_k$(tmp$ret$3, null);
    };
  }
  function _get_startUserSessionUseCase__1ovkxp($this) {
    return $this.startUserSessionUseCase_1;
  }
  function _get_endpointFilter__vsg7gi($this) {
    return $this.endpointFilter_1;
  }
  function _get_activeAccountMode__bomznd($this) {
    return $this.activeAccountMode_1;
  }
  function _get_maxDateOfBirth__mm9iob($this) {
    return $this.maxDateOfBirth_1;
  }
  function _get_apiUrlConfig__mldllg_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_6();
    return this_0.get_value_j01efc_k$();
  }
  function _get_shareAppUseCase__louoas($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.shareAppUseCase$delegate_1;
    shareAppUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get__uiState__8e9jsd_2($this) {
    return $this._uiState_1;
  }
  function _get_getVersionUseCase__n7x57g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getVersionUseCase$delegate_1;
    getVersionUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_launchOpenLicensesUseCase__f5qz1z($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.launchOpenLicensesUseCase$delegate_1;
    launchOpenLicensesUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_getShowPoweredByUseCase__5l0p0e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getShowPoweredByUseCase$delegate_1;
    getShowPoweredByUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_dontSetCurrentSession__mobbul_0($this) {
    return $this.dontSetCurrentSession_1;
  }
  function Companion_103() {
    Companion_instance_103 = this;
    this.DEST_NAME_1 = 'AccountList';
    this.ARG_FILTER_BY_LEARNINGSPACE_1 = 'filterByLearningSpace';
    this.ARG_ACTIVE_ACCOUNT_MODE_1 = 'activeAccountMode';
    this.ACTIVE_ACCOUNT_MODE_HEADER_1 = 'header';
    this.ACTIVE_ACCOUNT_MODE_INLIST_1 = 'inlist';
  }
  protoOf(Companion_103).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_103).get_ARG_FILTER_BY_LEARNINGSPACE_pvkiz9_k$ = function () {
    return this.ARG_FILTER_BY_LEARNINGSPACE_1;
  };
  protoOf(Companion_103).get_ARG_ACTIVE_ACCOUNT_MODE_tk6oxo_k$ = function () {
    return this.ARG_ACTIVE_ACCOUNT_MODE_1;
  };
  protoOf(Companion_103).get_ACTIVE_ACCOUNT_MODE_HEADER_hu066f_k$ = function () {
    return this.ACTIVE_ACCOUNT_MODE_HEADER_1;
  };
  protoOf(Companion_103).get_ACTIVE_ACCOUNT_MODE_INLIST_ig72t9_k$ = function () {
    return this.ACTIVE_ACCOUNT_MODE_INLIST_1;
  };
  var Companion_instance_103;
  function Companion_getInstance_164() {
    if (Companion_instance_103 == null)
      new Companion_103();
    return Companion_instance_103;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_4(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_4).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0).invoke_ts1gt6_k$ = function (url, target) {
    return this.function_1(url, target);
  };
  function AccountListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSessionFlow_glv447_k$();
            var tmp_1 = AccountListViewModel$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_4(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AccountListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, AccountListViewModel$slambda$slambda_2(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AccountListViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickAppShare$slambda(this$0, $shareLink, resultContinuation) {
    this.this$0__1 = this$0;
    this.$shareLink_1 = $shareLink;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickAppShare$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$onClickAppShare$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickAppShare$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_exceptionState_fex74n_k$(3);
            this.tmp0_safe_receiver0__1 = _get_shareAppUseCase__louoas(this.this$0__1);
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.invoke_f29lti_k$(this.$shareLink_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_0 = this;
            tmp_0.WHEN_RESULT1__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_1 = this.get_exception_x0n6w6_k$();
            if (tmp_1 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(toString_1(e.message)));
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 4:
            throw this.get_exception_x0n6w6_k$();
          case 5:
            this.set_exceptionState_fex74n_k$(4);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickAppShare$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickAppShare$slambda(this.this$0__1, this.$shareLink_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AccountListViewModel$onClickAppShare$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$onClickAppShare$slambda_0(this$0, $shareLink, resultContinuation) {
    var i = new AccountListViewModel$onClickAppShare$slambda(this$0, $shareLink, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation) {
    this.this$0__1 = this$0;
    this.$currentSession_1 = $currentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickLogout$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().endSession$default_nok288_k$(this.$currentSession_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_$receiver = this.this$0__1.get_navController_qibdoq_k$();
            var tmp1_link = Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$();
            var tmp2_accountManager = this.this$0__1.get_accountManager_bzeywn_k$();
            var tmp_0 = AccountListViewModel$onClickLogout$slambda$lambda;
            var tmp3_openExternalLinkUseCase = new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(tmp_0);
            var tmp4_userCanSelectServer = _get_apiUrlConfig__mldllg_2(this.this$0__1).get_canSelectServer_81keje_k$();
            var tmp5_goOptions = new UstadGoOptions(VOID, VOID, true);
            var tmp6_presetLearningSpaceUrl = _get_apiUrlConfig__mldllg_2(this.this$0__1).get_presetLearningSpaceUrl_nzw9pt_k$();
            navigateToLink(tmp0_$receiver, tmp1_link, tmp2_accountManager, tmp3_openExternalLinkUseCase, tmp5_goOptions, VOID, tmp4_userCanSelectServer, VOID, VOID, VOID, VOID, tmp6_presetLearningSpaceUrl, AccountListViewModel$onClickLogout$slambda$lambda_0(this.this$0__1));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickLogout$slambda(this.this$0__1, this.$currentSession_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$onClickLogout$slambda_0(this$0, $currentSession, resultContinuation) {
    var i = new AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickAddAccount$slambda(this$0, $args, resultContinuation) {
    this.this$0__1 = this$0;
    this.$args_1 = $args;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickAddAccount$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$onClickAddAccount$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickAddAccount$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            if (!(this.this$0__1.presetRepo_1 == null)) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.presetRepo_1.siteDao_yq9qyz_k$().getSiteAsync_wzkaej_k$(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT0__1 = false;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            var tmp0_safe_receiver = suspendResult;
            var ARGUMENT = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_registrationAllowed_lhz77q_k$();
            this.WHEN_RESULT0__1 = ARGUMENT === false;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (this.WHEN_RESULT0__1) {
              var this_0 = LinkedHashMap_init_$Create$_0();
              this.this$0__1.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
              this_0.put_4fpzoq_k$(Companion_getInstance_244().get_ARG_NEW_OR_EXISTING_USER_v4h2ks_k$(), 'existing');
              this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), toString_1(_get_apiUrlConfig__mldllg_2(this.this$0__1).get_presetLearningSpaceUrl_nzw9pt_k$()));
              var arg = this_0.build_1k0s4u_k$();
              this.this$0__1.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_223().get_DEST_NAME_gmgk7z_k$(), arg);
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              this.this$0__1.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_162().get_DEST_NAME_gmgk7z_k$(), this.$args_1);
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickAddAccount$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickAddAccount$slambda(this.this$0__1, this.$args_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AccountListViewModel$onClickAddAccount$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$onClickAddAccount$slambda_0(this$0, $args, resultContinuation) {
    var i = new AccountListViewModel$onClickAddAccount$slambda(this$0, $args, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation) {
    this.this$0__1 = this$0;
    this.$session_1 = $session;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().endSession$default_nok288_k$(this.$session_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this.this$0__1, this.$session_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$onClickDeleteAccount$slambda_0(this$0, $session, resultContinuation) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation) {
    this.$launchUseCaseVal_1 = $launchUseCaseVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$launchUseCaseVal_1.invoke_h7udsx_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda(this.$launchUseCaseVal_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AccountListViewModel$onClickOpenLicenses$slambda_0($launchUseCaseVal, resultContinuation) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel(di, savedStateHandle, startUserSessionUseCase) {
    Companion_getInstance_164();
    var tmp;
    if (startUserSessionUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, null);
      tmp = new StartUserSessionUseCase(tmp$ret$1);
    } else {
      tmp = startUserSessionUseCase;
    }
    startUserSessionUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'AccountList');
    this.startUserSessionUseCase_1 = startUserSessionUseCase;
    this.endpointFilter_1 = savedStateHandle.get_6bo4tg_k$('filterByLearningSpace');
    var tmp_2 = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$('activeAccountMode');
    tmp_2.activeAccountMode_1 = tmp0_elvis_lhs == null ? 'header' : tmp0_elvis_lhs;
    var tmp_3 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.maxDateOfBirth_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_5());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(ShareAppUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.shareAppUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, shareAppUseCase$factory());
    this._uiState_1 = MutableStateFlow(new AccountListUiState(VOID, VOID, _get_apiUrlConfig__mldllg_2(this).get_canSelectServer_81keje_k$(), VOID, VOID, !(_get_shareAppUseCase__louoas(this) == null)));
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.getVersionUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, getVersionUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(LaunchOpenLicensesUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.launchOpenLicensesUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$8, null).provideDelegate_o2qlc1_k$(this, launchOpenLicensesUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.getShowPoweredByUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$10, null).provideDelegate_o2qlc1_k$(this, getShowPoweredByUseCase$factory());
    var tmp_14 = this;
    var tmp0_safe_receiver_0 = _get_apiUrlConfig__mldllg_2(this).get_presetLearningSpaceUrl_nzw9pt_k$();
    var tmp_15;
    if (tmp0_safe_receiver_0 == null) {
      tmp_15 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.presetRepo.<anonymous>' call
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var context = new LearningSpace(tmp0_safe_receiver_0);
      var trigger = di.get_diTrigger_fb5jcm_k$();
      // Inline function 'org.kodein.di.diContext' call
      var tmp_16 = Companion_getInstance_2();
      // Inline function 'org.kodein.type.generic' call
      var tmp_17 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
      var tmp$ret$13 = tmp_16.invoke_4wgfc3_k$(tmp$ret$12, context);
      var tmp$ret$14 = On(di, tmp$ret$13, trigger);
      var tmp_18 = get_direct(tmp$ret$14).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
      var tmp$ret$15 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      tmp_15 = tmp_18.Instance_vwdrk9_k$(tmp$ret$15, null).get_repository_c37cur_k$();
    }
    tmp_14.presetRepo_1 = tmp_15;
    var tmp_20 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$());
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toBoolean(tmp0_safe_receiver_1);
    tmp_20.dontSetCurrentSession_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_21 = this.get__appUiState_rulqry_k$();
    var tmp_22;
    if (savedStateHandle.get_6bo4tg_k$(Companion_getInstance_159().get_ARG_LISTMODE_1jy3rh_k$()) === ListViewMode_PICKER_getInstance().get_mode_woqlt8_k$()) {
      tmp_22 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_select_account_3gktfx_k$());
    } else {
      tmp_22 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_accounts_3vrulr_k$());
    }
    var tmp0_title = tmp_22;
    tmp_21.set_value_v1vabv_k$(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.<anonymous>' call
        var tmp0_safe_receiver_2 = _get_getVersionUseCase__n7x57g(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.invoke_jkqnwo_k$();
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_versionString_blgteo_k$();
        var tmp_23 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
        var tmp3_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e(this);
        var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.invoke_jkqnwo_k$();
        var nextValue = prevValue.copy$default_lgpdyh_k$(VOID, VOID, VOID, tmp_23, tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'kotlin.takeIf' call
    var this_1 = this.get_viewModelScope_ryv1dz_k$();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_24;
    // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.<anonymous>' call
    if (this.activeAccountMode_1 === 'header') {
      tmp_24 = this_1;
    } else {
      tmp_24 = null;
    }
    var tmp1_safe_receiver_0 = tmp_24;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      launch(tmp1_safe_receiver_0, VOID, VOID, AccountListViewModel$slambda_0(this, null));
    }
    var tmp_25 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_25, VOID, VOID, AccountListViewModel$slambda_2(this, null));
  }
  protoOf(AccountListViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(AccountListViewModel).get_presetRepo_4gaj5m_k$ = function () {
    return this.presetRepo_1;
  };
  protoOf(AccountListViewModel).onClickAppShare_ahri3y_k$ = function (shareLink) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickAppShare$slambda_0(this, shareLink, null));
  };
  protoOf(AccountListViewModel).onClickLogout_rz4m4d_k$ = function () {
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().headerAccount_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSession = tmp;
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, AccountListViewModel$onClickLogout$slambda_0(this, currentSession, null));
  };
  protoOf(AccountListViewModel).onClickProfile_8u65s_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().headerAccount_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_personUid_mmhd76_k$();
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var personUid = tmp;
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_234().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), personUid.toString())));
  };
  protoOf(AccountListViewModel).onClickAddAccount_d50xtx_k$ = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.onClickAddAccount.<anonymous>' call
    if (!(this.endpointFilter_1 == null)) {
      this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_SERVER_URL_kr93b9_k$(), this.endpointFilter_1);
    }
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, listOf([Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$()]));
    var tmp = Companion_getInstance_160().get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$();
    var tmp0_elvis_lhs = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$());
    this_0.put_4fpzoq_k$(tmp, tmp0_elvis_lhs == null ? '0' : tmp0_elvis_lhs);
    var args = this_0.build_1k0s4u_k$();
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, AccountListViewModel$onClickAddAccount$slambda_0(this, args, null));
  };
  protoOf(AccountListViewModel).onClickAccount_d9d5w1_k$ = function (sessionWithPersonAndLearningSpace) {
    var tmp;
    if (sessionWithPersonAndLearningSpace.get_person_i0c866_k$().get_isPersonalAccount_yq673a_k$()) {
      tmp = Companion_getInstance_204().get_DEST_NAME_HOME_lftflt_k$();
    } else {
      tmp = Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$();
    }
    var viewName = tmp;
    var tmp1_$this = this.startUserSessionUseCase_1;
    var tmp2_navController = this.get_navController_qibdoq_k$();
    var tmp0_elvis_lhs = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    var tmp3_nextDest = tmp0_elvis_lhs == null ? viewName : tmp0_elvis_lhs;
    var tmp4_dontSetCurrentSession = this.dontSetCurrentSession_1;
    tmp1_$this.invoke$default_pefs6_k$(sessionWithPersonAndLearningSpace, tmp3_nextDest, tmp2_navController, VOID, tmp4_dontSetCurrentSession);
  };
  protoOf(AccountListViewModel).onClickDeleteAccount_c6b7c6_k$ = function (session) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickDeleteAccount$slambda_0(this, session, null));
  };
  protoOf(AccountListViewModel).onClickOpenLicenses_dhmu8b_k$ = function () {
    var launchUseCaseVal = _get_launchOpenLicensesUseCase__f5qz1z(this);
    if (!(launchUseCaseVal == null)) {
      var tmp = this.get_viewModelScope_ryv1dz_k$();
      launch(tmp, VOID, VOID, AccountListViewModel$onClickOpenLicenses$slambda_0(launchUseCaseVal, null));
    } else {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_161().get_DEST_NAME_gmgk7z_k$(), emptyMap());
    }
  };
  protoOf(AccountListViewModel).onToggleShareAppOptions_nxd71j_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.onToggleShareAppOptions.<anonymous>' call
        var nextValue = prevValue.copy$default_lgpdyh_k$(VOID, VOID, VOID, VOID, VOID, VOID, !prevValue.shareAppBottomSheetVisible_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    headerAccount = headerAccount === VOID ? null : headerAccount;
    accountsList = accountsList === VOID ? emptyList() : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? false : showAccountEndpoint;
    version = version === VOID ? '' : version;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? false : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? false : shareAppBottomSheetVisible;
    this.headerAccount_1 = headerAccount;
    this.accountsList_1 = accountsList;
    this.showAccountEndpoint_1 = showAccountEndpoint;
    this.version_1 = version;
    this.showPoweredBy_1 = showPoweredBy;
    this.shareAppOptionVisible_1 = shareAppOptionVisible;
    this.shareAppBottomSheetVisible_1 = shareAppBottomSheetVisible;
  }
  protoOf(AccountListUiState).get_headerAccount_qqwy15_k$ = function () {
    return this.headerAccount_1;
  };
  protoOf(AccountListUiState).get_accountsList_mvnoq5_k$ = function () {
    return this.accountsList_1;
  };
  protoOf(AccountListUiState).get_showAccountEndpoint_1gced8_k$ = function () {
    return this.showAccountEndpoint_1;
  };
  protoOf(AccountListUiState).get_version_72w4j3_k$ = function () {
    return this.version_1;
  };
  protoOf(AccountListUiState).get_showPoweredBy_25x6id_k$ = function () {
    return this.showPoweredBy_1;
  };
  protoOf(AccountListUiState).get_shareAppOptionVisible_ot5i8e_k$ = function () {
    return this.shareAppOptionVisible_1;
  };
  protoOf(AccountListUiState).get_shareAppBottomSheetVisible_777idl_k$ = function () {
    return this.shareAppBottomSheetVisible_1;
  };
  protoOf(AccountListUiState).get_activeAccountButtonsEnabled_jlisse_k$ = function () {
    return !(this.headerAccount_1 == null) ? !this.headerAccount_1.get_person_i0c866_k$().get_personUid_mmhd76_k$().equals(new Long(0, 0)) : false;
  };
  protoOf(AccountListUiState).get_myProfileButtonVisible_mlrd70_k$ = function () {
    return !(this.headerAccount_1 == null) ? !isGuestUser(this.headerAccount_1.get_person_i0c866_k$()) : false;
  };
  protoOf(AccountListUiState).component1_7eebsc_k$ = function () {
    return this.headerAccount_1;
  };
  protoOf(AccountListUiState).component2_7eebsb_k$ = function () {
    return this.accountsList_1;
  };
  protoOf(AccountListUiState).component3_7eebsa_k$ = function () {
    return this.showAccountEndpoint_1;
  };
  protoOf(AccountListUiState).component4_7eebs9_k$ = function () {
    return this.version_1;
  };
  protoOf(AccountListUiState).component5_7eebs8_k$ = function () {
    return this.showPoweredBy_1;
  };
  protoOf(AccountListUiState).component6_7eebs7_k$ = function () {
    return this.shareAppOptionVisible_1;
  };
  protoOf(AccountListUiState).component7_7eebs6_k$ = function () {
    return this.shareAppBottomSheetVisible_1;
  };
  protoOf(AccountListUiState).copy_w740uk_k$ = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    return new AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).copy$default_lgpdyh_k$ = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible, $super) {
    headerAccount = headerAccount === VOID ? this.headerAccount_1 : headerAccount;
    accountsList = accountsList === VOID ? this.accountsList_1 : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? this.showAccountEndpoint_1 : showAccountEndpoint;
    version = version === VOID ? this.version_1 : version;
    showPoweredBy = showPoweredBy === VOID ? this.showPoweredBy_1 : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? this.shareAppOptionVisible_1 : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? this.shareAppBottomSheetVisible_1 : shareAppBottomSheetVisible;
    return $super === VOID ? this.copy_w740uk_k$(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) : $super.copy_w740uk_k$.call(this, headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).toString = function () {
    return 'AccountListUiState(headerAccount=' + this.headerAccount_1 + ', accountsList=' + this.accountsList_1 + ', showAccountEndpoint=' + this.showAccountEndpoint_1 + ', version=' + this.version_1 + ', showPoweredBy=' + this.showPoweredBy_1 + ', shareAppOptionVisible=' + this.shareAppOptionVisible_1 + ', shareAppBottomSheetVisible=' + this.shareAppBottomSheetVisible_1 + ')';
  };
  protoOf(AccountListUiState).hashCode = function () {
    var result = this.headerAccount_1 == null ? 0 : this.headerAccount_1.hashCode();
    result = imul(result, 31) + hashCode(this.accountsList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showAccountEndpoint_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.version_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showPoweredBy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.shareAppOptionVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.shareAppBottomSheetVisible_1) | 0;
    return result;
  };
  protoOf(AccountListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AccountListUiState ? other : THROW_CCE();
    if (!equals(this.headerAccount_1, tmp0_other_with_cast.headerAccount_1))
      return false;
    if (!equals(this.accountsList_1, tmp0_other_with_cast.accountsList_1))
      return false;
    if (!(this.showAccountEndpoint_1 === tmp0_other_with_cast.showAccountEndpoint_1))
      return false;
    if (!(this.version_1 === tmp0_other_with_cast.version_1))
      return false;
    if (!(this.showPoweredBy_1 === tmp0_other_with_cast.showPoweredBy_1))
      return false;
    if (!(this.shareAppOptionVisible_1 === tmp0_other_with_cast.shareAppOptionVisible_1))
      return false;
    if (!(this.shareAppBottomSheetVisible_1 === tmp0_other_with_cast.shareAppBottomSheetVisible_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_5() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function shareAppUseCase$factory() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function apiUrlConfig$factory_6() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function shareAppUseCase$factory_0() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory_0() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory_0() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_0() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function launchSetTitleFromClazzUid(_this__u8e3s4, clazzUid, updateUi) {
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(_this__u8e3s4.get_di_knto1e_k$());
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var dataLayer$delegate = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(null, getLocalDelegateReference('dataLayer', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.takeIf' call
    var this_1 = _this__u8e3s4.get_viewModelScope_ryv1dz_k$();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.launchSetTitleFromClazzUid.<anonymous>' call
    if (!clazzUid.equals(new Long(0, 0))) {
      tmp_0 = this_1;
    } else {
      tmp_0 = null;
    }
    var tmp0_safe_receiver = tmp_0;
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, VOID, VOID, launchSetTitleFromClazzUid$slambda_0(clazzUid, dataLayer$delegate, updateUi, null));
    }
  }
  function launchSetTitleFromClazzUid$lambda($dataLayer$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('dataLayer', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $dataLayer$delegate.get_value_j01efc_k$();
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_5(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_5).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation) {
    this.$updateUi_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).invoke_sndfju_k$ = function (it, $completion) {
    var tmp = this.create_56vlru_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_sndfju_k$((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          this.$updateUi_1(this.it_1);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).create_56vlru_k$ = function (it, completion) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda(this.$updateUi_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_56vlru_k$((value == null ? true : typeof value === 'string') ? value : THROW_CCE(), completion);
  };
  function launchSetTitleFromClazzUid$slambda$slambda_0($updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_sndfju_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function launchSetTitleFromClazzUid$slambda($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation) {
    this.$clazzUid_1 = $clazzUid;
    this.$dataLayer$delegate_1 = $dataLayer$delegate;
    this.$updateUi_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(launchSetTitleFromClazzUid$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = launchSetTitleFromClazzUid$lambda(this.$dataLayer$delegate_1).get_repositoryOrLocalDb_ys0nkj_k$().clazzDao_bk7qje_k$().getTitleByUidAsFlow_bp2lxl_k$(this.$clazzUid_1);
            var tmp_1 = launchSetTitleFromClazzUid$slambda$slambda_0(this.$updateUi_1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_5(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new launchSetTitleFromClazzUid$slambda(this.$clazzUid_1, this.$dataLayer$delegate_1, this.$updateUi_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(launchSetTitleFromClazzUid$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function launchSetTitleFromClazzUid$slambda_0($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function parseAndUpdateTerminologyStringsIfNeeded(currentTerminologyStrings, terminology, systemImpl, json, onUpdate) {
    var tmp = currentTerminologyStrings == null ? null : currentTerminologyStrings.get_terminologyKey_gsb0wb_k$();
    if (!equals(tmp, terminology == null ? null : terminology.get_ctLct_ipwrr7_k$())) {
      var tmp_0;
      if (terminology == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.parseAndUpdateTerminologyStringsIfNeeded.<anonymous>' call
        tmp_0 = CourseTerminologyStrings_init_$Create$(terminology, systemImpl, json);
      }
      var courseTerminologyStrings = tmp_0;
      onUpdate(courseTerminologyStrings);
    }
  }
  function collectClazzNameAndUpdateTitle(clazzUid, activeDb, appUiState, $completion) {
    var tmp = activeDb.clazzDao_bk7qje_k$().getTitleByUidAsFlow_bp2lxl_k$(clazzUid);
    var tmp_0 = collectClazzNameAndUpdateTitle$slambda_0(appUiState, null);
    return tmp.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_6(tmp_0), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_6(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_6).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation) {
    this.$appUiState_1 = $appUiState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectClazzNameAndUpdateTitle$slambda).invoke_sndfju_k$ = function (clazzTitle, $completion) {
    var tmp = this.create_56vlru_k$(clazzTitle, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_sndfju_k$((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.$appUiState_1;
          var tmp_0;
          if (!(this.$appUiState_1.get_value_j01efc_k$().get_title_iz32un_k$() == this.clazzTitle_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.clazzTitle_1);
                if (tmp0_safe_receiver.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).create_56vlru_k$ = function (clazzTitle, completion) {
    var i = new collectClazzNameAndUpdateTitle$slambda(this.$appUiState_1, completion);
    i.clazzTitle_1 = clazzTitle;
    return i;
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_56vlru_k$((value == null ? true : typeof value === 'string') ? value : THROW_CCE(), completion);
  };
  function collectClazzNameAndUpdateTitle$slambda_0($appUiState, resultContinuation) {
    var i = new collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation);
    var l = function (clazzTitle, $completion) {
      return i.invoke_sndfju_k$(clazzTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionConstants() {
    CoursePermissionConstants_instance = this;
    this.COURSE_PERMISSIONS_LABELS_1 = listOf([to(strings_getInstance().get_view_course_8lhojw_k$(), PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$()), to(strings_getInstance().get_view_members_hrmeyg_k$(), PermissionFlags_getInstance().get_PERSON_VIEW_s2u8t6_k$()), to(strings_getInstance().get_edit_course_v4swhl_k$(), PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$()), to(strings_getInstance().get_moderate_szq218_k$(), PermissionFlags_getInstance().get_COURSE_MODERATE_rl1ttu_k$()), to(strings_getInstance().get_manage_student_enrolments_6vauis_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$()), to(strings_getInstance().get_manage_teacher_enrolments_q07jst_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_TEACHER_ENROLMENT_2dgmjc_k$()), to(strings_getInstance().get_permission_attendance_select_15w3xn_k$(), PermissionFlags_getInstance().get_COURSE_ATTENDANCE_VIEW_cozdgg_k$()), to(strings_getInstance().get_permission_attendance_update_29vws8_k$(), PermissionFlags_getInstance().get_COURSE_ATTENDANCE_RECORD_ggo5xo_k$()), to(strings_getInstance().get_view_learning_records_r7uqb2_k$(), PermissionFlags_getInstance().get_COURSE_LEARNINGRECORD_VIEW_conusm_k$()), to(strings_getInstance().get_edit_learning_records_bswivh_k$(), PermissionFlags_getInstance().get_COURSE_LEARNINGRECORD_EDIT_coyt6p_k$())]);
  }
  protoOf(CoursePermissionConstants).get_COURSE_PERMISSIONS_LABELS_i2xsjv_k$ = function () {
    return this.COURSE_PERMISSIONS_LABELS_1;
  };
  var CoursePermissionConstants_instance;
  function CoursePermissionConstants_getInstance() {
    if (CoursePermissionConstants_instance == null)
      new CoursePermissionConstants();
    return CoursePermissionConstants_instance;
  }
  function getTitleForCoursePermission(_this__u8e3s4, entity, $completion) {
    var tmp = new $getTitleForCoursePermissionCOROUTINE$50(_this__u8e3s4, entity, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function titleStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.get_cpToEnrolmentRole_8h904p_k$();
    return tmp0_subject === Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$() ? strings_getInstance().get_students_s05gf_k$() : tmp0_subject === Companion_getInstance_15().get_ROLE_TEACHER_obiog2_k$() ? strings_getInstance().get_teachers_literal_n9taeu_k$() : null;
  }
  function getTitleForCoursePermission$slambda($entity, resultContinuation) {
    this.$entity_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda).invoke_8ktjd6_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(getTitleForCoursePermission$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_8ktjd6_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.it_1.courseTerminologyDao_p353oa_k$().findByUidAsync_kys5x5_k$(this.$entity_1.get_cpClazzUid_gewage_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(getTitleForCoursePermission$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda(this.$entity_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(getTitleForCoursePermission$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function getTitleForCoursePermission$slambda_0($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_8ktjd6_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function getTitleForCoursePermission$slambda_1($entity, resultContinuation) {
    this.$entity_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda_1).invoke_cuty2t_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(getTitleForCoursePermission$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_cuty2t_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.it_1.personDao_e3y77h_k$();
            var tmp0_safe_receiver = this.$entity_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cpToPersonUid_1zvcmi_k$();
            suspendResult = tmp_0.findByUidAsync_uxf6ac_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp2_safe_receiver = suspendResult;
            return tmp2_safe_receiver == null ? null : personFullName(tmp2_safe_receiver);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(getTitleForCoursePermission$slambda_1).create_9q7izm_k$ = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda_1(this.$entity_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(getTitleForCoursePermission$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function getTitleForCoursePermission$slambda_2($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda_1($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_cuty2t_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $getTitleForCoursePermissionCOROUTINE$50(_this__u8e3s4, entity, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.entity_1 = entity;
  }
  protoOf($getTitleForCoursePermissionCOROUTINE$50).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp_1 = get_direct(this._this__u8e3s4__1.get_di_knto1e_k$()).get_directDI_rqg7bd_k$();
            var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
            tmp_0.json0__1 = tmp_1.Instance_vwdrk9_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            var tmp0_safe_receiver = this.entity_1;
            tmp_3.roleStringResource1__1 = tmp0_safe_receiver == null ? null : titleStringResource(tmp0_safe_receiver);
            if (!(this.roleStringResource1__1 == null)) {
              this.set_state_rjd8d0_k$(2);
              var tmp_4 = this._this__u8e3s4__1.get_activeRepoWithFallback_3qnek7_k$();
              suspendResult = localFirstThenRepoIfNull(tmp_4, getTitleForCoursePermission$slambda_0(this.entity_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              var tmp_5 = this._this__u8e3s4__1.get_activeRepoWithFallback_3qnek7_k$();
              suspendResult = localFirstThenRepoIfNull(tmp_5, getTitleForCoursePermission$slambda_2(this.entity_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp5_elvis_lhs = suspendResult;
            this.WHEN_RESULT2__1 = tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 2:
            var terminology = suspendResult;
            var tmp2_elvis_lhs = terminology == null ? null : toTerminologyEntries(terminology, this.json0__1, this._this__u8e3s4__1.get_systemImpl_9jowp4_k$());
            var terminologyEntries = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = terminologyEntries.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                if (element.get_stringResource_4df0w8_k$().equals(this.roleStringResource1__1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp3_safe_receiver = tmp$ret$0;
            var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_term_wouvn9_k$();
            tmp_6.WHEN_RESULT2__1 = tmp4_elvis_lhs == null ? this._this__u8e3s4__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(this.roleStringResource1__1) : tmp4_elvis_lhs;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return this.WHEN_RESULT2__1;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).invoke_1qnvr8_k$ = function (it, $completion) {
    var tmp = this.create_4tnuvc_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_1qnvr8_k$((p1 == null ? true : p1 instanceof ClazzAndDetailPermissions) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_safe_receiver = this.it_1;
          var clazz = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazz_ips3zj_k$();
          var tabList = clazz == null ? emptyList() : createTabList(this.this$0__1, hasFlag_0(clazz.get_clazzFeatures_6nf4ac_k$(), Companion_getInstance_14().get_CLAZZ_FEATURE_ATTENDANCE_h2pzj6_k$()) ? this.it_1.get_hasAttendancePermission_2bsodl_k$() : false, this.it_1.get_hasViewMembersPermission_dswsum_k$(), this.it_1.get_hasLearningRecordPermission_s03z_k$());
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy_y53k8x_k$(tabList);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).create_4tnuvc_k$ = function (it, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_4tnuvc_k$((value == null ? true : value instanceof ClazzAndDetailPermissions) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_1qnvr8_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeDb_bu92wd_k$().clazzDao_bk7qje_k$().clazzAndDetailPermissionsAsFlow_mptfws_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_7(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzDetailViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzDetailViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, completion);
  };
  function ClazzDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get__uiState__8e9jsd_3($this) {
    return $this._uiState_1;
  }
  function createTabList($this, showAttendance, showMembers, showProgressReport) {
    var tabs = mutableListOf([new TabItem(Companion_getInstance_166().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), $this.get_entityUidArg_hgo6pe_k$().toString())), $this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_course_c0azac_k$()))]);
    if (showMembers) {
      tabs.add_utx5q5_k$(new TabItem(Companion_getInstance_189().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), $this.get_entityUidArg_hgo6pe_k$().toString())), capitalizeFirstLetter($this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_members_key_xy93qo_k$()))));
    }
    if (showProgressReport) {
      tabs.add_utx5q5_k$(new TabItem(Companion_getInstance_170().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), $this.get_entityUidArg_hgo6pe_k$().toString())), $this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_gradebook_gm6tt5_k$())));
    }
    if (showAttendance) {
      tabs.add_utx5q5_k$(new TabItem(Companion_getInstance_192().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), $this.get_entityUidArg_hgo6pe_k$().toString())), $this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_attendance_b7eliq_k$())));
    }
    tabs.add_utx5q5_k$(new TabItem(Companion_getInstance_214().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), $this.get_entityUidArg_hgo6pe_k$().toString())), $this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_groups_dy12vx_k$())));
    return toList(tabs);
  }
  function Companion_104() {
    Companion_instance_104 = this;
    this.DEST_NAME_1 = 'Course';
  }
  protoOf(Companion_104).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_104;
  function Companion_getInstance_165() {
    if (Companion_instance_104 == null)
      new Companion_104();
    return Companion_instance_104;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_7(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_7).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzDetailViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ClazzDetailViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_165();
    DetailViewModel.call(this, di, savedStateHandle, 'Course');
    this._uiState_1 = MutableStateFlow(new ClazzDetailUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzDetailViewModel$slambda_0(this, null));
  }
  protoOf(ClazzDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function ClazzDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.tabs_1 = tabs;
  }
  protoOf(ClazzDetailUiState).get_tabs_wousav_k$ = function () {
    return this.tabs_1;
  };
  protoOf(ClazzDetailUiState).component1_7eebsc_k$ = function () {
    return this.tabs_1;
  };
  protoOf(ClazzDetailUiState).copy_y53k8x_k$ = function (tabs) {
    return new ClazzDetailUiState(tabs);
  };
  protoOf(ClazzDetailUiState).copy$default_whnrig_k$ = function (tabs, $super) {
    tabs = tabs === VOID ? this.tabs_1 : tabs;
    return $super === VOID ? this.copy_y53k8x_k$(tabs) : $super.copy_y53k8x_k$.call(this, tabs);
  };
  protoOf(ClazzDetailUiState).toString = function () {
    return 'ClazzDetailUiState(tabs=' + this.tabs_1 + ')';
  };
  protoOf(ClazzDetailUiState).hashCode = function () {
    return hashCode(this.tabs_1);
  };
  protoOf(ClazzDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailUiState ? other : THROW_CCE();
    if (!equals(this.tabs_1, tmp0_other_with_cast.tabs_1))
      return false;
    return true;
  };
  var ClazzAction_EDIT_instance;
  var ClazzAction_COPY_instance;
  function values_12() {
    return [ClazzAction_EDIT_getInstance(), ClazzAction_COPY_getInstance()];
  }
  function valueOf_11(value) {
    switch (value) {
      case 'EDIT':
        return ClazzAction_EDIT_getInstance();
      case 'COPY':
        return ClazzAction_COPY_getInstance();
      default:
        ClazzAction_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_11() {
    if ($ENTRIES_11 == null)
      $ENTRIES_11 = enumEntries(values_12());
    return $ENTRIES_11;
  }
  var ClazzAction_entriesInitialized;
  function ClazzAction_initEntries() {
    if (ClazzAction_entriesInitialized)
      return Unit_getInstance();
    ClazzAction_entriesInitialized = true;
    ClazzAction_EDIT_instance = new ClazzAction('EDIT', 0);
    ClazzAction_COPY_instance = new ClazzAction('COPY', 1);
  }
  var $ENTRIES_11;
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).invoke_f29lti_k$ = function (hasPermission, $completion) {
    var tmp = this.create_vh5neu_k$(hasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_tskj52_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hasPermission_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).create_vh5neu_k$ = function (hasPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.hasPermission_1 = hasPermission;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermission, $completion) {
      return i.invoke_f29lti_k$(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermissionAsFlow_ryvoyl_k$(this.this$0__1.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$(), PermissionFlags_getInstance().get_ADD_COURSE_d9fly6_k$()));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).invoke_m6ysgq_k$ = function (value, $completion) {
    var tmp = this.create_8fthgm_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_m6ysgq_k$(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform0__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value1__1 = this.value_1;
            this.set_state_rjd8d0_k$(1);
            var it = this.value1__1;
            suspendResult = this.$this$unsafeTransform0__1.emit_t92u1f_k$(it.get_firstPermission_y8246u_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).create_8fthgm_k$ = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8fthgm_k$(value instanceof PermissionTriple ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_m6ysgq_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$51(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$51).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).invoke_swcfs2_k$ = function (courseBlockList, $completion) {
    var tmp = this.create_axzp9e_k$(courseBlockList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_swcfs2_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_tskj52_k$(VOID, VOID, this.courseBlockList_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).create_axzp9e_k$ = function (courseBlockList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.courseBlockList_1 = courseBlockList;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_axzp9e_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.invoke_swcfs2_k$(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).invoke_86x7m_k$ = function (blockStatuses, $completion) {
    var tmp = this.create_4i0uaa_k$(blockStatuses, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_86x7m_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_tskj52_k$(VOID, VOID, VOID, this.blockStatuses_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).create_4i0uaa_k$ = function (blockStatuses, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.blockStatuses_1 = blockStatuses;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_4i0uaa_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (blockStatuses, $completion) {
      return i.invoke_86x7m_k$(blockStatuses, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).invoke_mab2d_k$ = function (scheduleList, $completion) {
    var tmp = this.create_tz7ao1_k$(scheduleList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_mab2d_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_tskj52_k$(VOID, this.scheduleList_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).create_tz7ao1_k$ = function (scheduleList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.scheduleList_1 = scheduleList;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_tz7ao1_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (scheduleList, $completion) {
      return i.invoke_mab2d_k$(scheduleList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$().findAllCourseBlockByClazzUidAsFlow_kcp6ff_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), false, false, systemTimeInMillis(), this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().statementDao_8y5avx_k$().findStatusForStudentsInClazzAsFlow_qt624z_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), listOf_0(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$()), this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().scheduleDao_2wsqkb_k$().findAllSchedulesByClazzUidAsLiveList_f7bwq9_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_2($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_2).collect_aebrhc_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$51(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_2).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_aebrhc_k$(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).invoke_f29lti_k$ = function (hasViewPermission, $completion) {
    var tmp = this.create_vh5neu_k$(hasViewPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          if (this.hasViewPermission_1) {
            launch(this.$this_launch_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null));
            launch(this.$this_launch_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this.this$0__1, null));
            launch(this.$this_launch_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_4(this.this$0__1, null));
          } else {
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_tskj52_k$(VOID, VOID, emptyList());
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).create_vh5neu_k$ = function (hasViewPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.$this_launch_1, this.this$0__1, completion);
    i.hasViewPermission_1 = hasViewPermission;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function (hasViewPermission, $completion) {
      return i.invoke_f29lti_k$(hasViewPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_tskj52_k$(VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).invoke_qxyd4q_k$ = function (clazzWithDisplayDetails, permissions, $completion) {
    var tmp = this.create_yrobhu_k$(clazzWithDisplayDetails, permissions, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE();
    return this.invoke_qxyd4q_k$(tmp, p2 instanceof PermissionTriple ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.clazzWithDisplayDetails_1;
          var tmp_0;
          if (this.permissions_1.get_firstPermission_y8246u_k$()) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).create_yrobhu_k$ = function (clazzWithDisplayDetails, permissions, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.clazzWithDisplayDetails_1 = clazzWithDisplayDetails;
    i.permissions_1 = permissions;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (clazzWithDisplayDetails, permissions, $completion) {
      return i.invoke_qxyd4q_k$(clazzWithDisplayDetails, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).invoke_sqbspd_k$ = function (it, $completion) {
    var tmp = this.create_nat2l1_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_sqbspd_k$((p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_tskj52_k$(this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          var tmp1_currentTerminologyStrings = this.this$0__1._uiState_1.get_value_j01efc_k$().terminologyStrings_1;
          var tmp0_safe_receiver = this.it_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_terminology_hmih12_k$();
          var tmp3_json = this.this$0__1.get_json_woos35_k$();
          var tmp4_systemImpl = this.this$0__1.get_systemImpl_9jowp4_k$();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this.this$0__1));
          l$ret$3: do {
            var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var tmp0_safe_receiver_0 = this.it_1;
              var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_clazz_ips3zj_k$();
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_clazzName_brsrx6_k$();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).create_nat2l1_k$ = function (it, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_nat2l1_k$((value == null ? true : value instanceof ClazzAndDisplayDetails) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_sqbspd_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).invoke_m6ysgq_k$ = function (value, $completion) {
    var tmp = this.create_8fthgm_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_m6ysgq_k$(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform0__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value1__1 = this.value_1;
            this.set_state_rjd8d0_k$(1);
            var it = this.value1__1;
            suspendResult = this.$this$unsafeTransform0__1.emit_t92u1f_k$(it.get_secondPermission_lfalzo_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).create_8fthgm_k$ = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8fthgm_k$(value instanceof PermissionTriple ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_m6ysgq_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$52(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$52).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_3($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_3).collect_aebrhc_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$52(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_3).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_aebrhc_k$(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).invoke_f29lti_k$ = function (hasEditPermission, $completion) {
    var tmp = this.create_vh5neu_k$(hasEditPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_9ltzmx_k$(prevValue.get_fabState_obl84t_k$().copy$default_kse1yx_k$(this.hasEditPermission_1));
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var nextValue_0 = prevValue_0.copy$default_tskj52_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hasEditPermission_1);
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).create_vh5neu_k$ = function (hasEditPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.hasEditPermission_1 = hasEditPermission;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.invoke_f29lti_k$(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).invoke_m6ysgq_k$ = function (value, $completion) {
    var tmp = this.create_8fthgm_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_m6ysgq_k$(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform0__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value1__1 = this.value_1;
            this.set_state_rjd8d0_k$(1);
            var it = this.value1__1;
            suspendResult = this.$this$unsafeTransform0__1.emit_t92u1f_k$(it.get_thirdPermission_eqk7df_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).create_8fthgm_k$ = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8fthgm_k$(value instanceof PermissionTriple ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_m6ysgq_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$53(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$53).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_4($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_4).collect_aebrhc_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$53(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_4).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_aebrhc_k$(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).invoke_f29lti_k$ = function (canAddStudent, $completion) {
    var tmp = this.create_vh5neu_k$(canAddStudent, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_tskj52_k$(VOID, VOID, VOID, VOID, this.canAddStudent_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).create_vh5neu_k$ = function (canAddStudent, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.this$0__1, completion);
    i.canAddStudent_1 = canAddStudent;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (canAddStudent, $completion) {
      return i.invoke_f29lti_k$(canAddStudent, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = this.$permissionFlow_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_2(this_0));
            suspendResult = collectLatest(tmp_0, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this.$permissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_2($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, $permissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$permissionFlow_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().getClazzWithDisplayDetails_m9nouy_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), systemTimeInMillis(), this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            var tmp_1 = combine(tmp_0, this.$permissionFlow_1, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_2 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this.this$0__1, this.$permissionFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation) {
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = this.$permissionFlow_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_3(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5(this.$permissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_6($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_7($permissionFlow, this$0, resultContinuation) {
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = this.$permissionFlow_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_4(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_7(this.$permissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_8($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_7($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda_1($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this.$permissionFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this.this$0__1, this.$permissionFlow_1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_6(this.$permissionFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_8(this.$permissionFlow_1, this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda_1(this.$this_launch_1, this.$permissionFlow_1, this.this$0__1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_2($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda_1($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get__uiState__8e9jsd_4($this) {
    return $this._uiState_1;
  }
  function _get_setClipboardStringUseCase__31i1s1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.setClipboardStringUseCase$delegate_1;
    setClipboardStringUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get__listRefreshCommandFlow__df6hue($this) {
    return $this._listRefreshCommandFlow_1;
  }
  function _get_copyCourseUseCase__jeltyi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.copyCourseUseCase$delegate_1;
    copyCourseUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function onClickEdit($this) {
    $this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_168().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), $this.get_entityUidArg_hgo6pe_k$().toString()), to(Companion_getInstance_156().get_CLAZZ_ACTION_267bl2_k$(), 'EDIT')]));
  }
  function Companion_105() {
    Companion_instance_105 = this;
    this.DEST_NAME_1 = 'CourseDetailOverviewView';
  }
  protoOf(Companion_105).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_105;
  function Companion_getInstance_166() {
    if (Companion_instance_105 == null)
      new Companion_105();
    return Companion_instance_105;
  }
  function ClazzAction(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_8(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_8).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzDetailOverviewViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit($boundThis);
      return Unit_getInstance();
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ClazzDetailOverviewViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda_1(this$0, $permissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$permissionFlow_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ClazzDetailOverviewViewModel$slambda$slambda_2(this.$this$launch_1, this.$permissionFlow_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda_1(this.this$0__1, this.$permissionFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$slambda_2(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda_1(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().get_clazz_ips3zj_k$();
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.originalClazz0__1 = tmp_1;
            this.originalSchedule1__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().scheduleList_1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_copyCourseUseCase__jeltyi(this.this$0__1).invoke_3zisir_k$(this.originalClazz0__1, this.originalSchedule1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            this_0.get_clazz_ips3zj_k$().set_clazzName_aqdmvj_k$(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_copy_of_h197g8_k$()) + ' ' + this_0.get_clazz_ips3zj_k$().get_clazzName_brsrx6_k$());
            var copyResult = this_0;
            var tmp_2 = this.this$0__1.get_navController_qibdoq_k$();
            var tmp_3 = Companion_getInstance_168().get_DEST_NAME_gmgk7z_k$();
            var tmp_4 = to(Companion_getInstance_156().get_CLAZZ_ACTION_267bl2_k$(), 'COPY');
            var tmp_5 = Companion_getInstance_155().get_ARG_ENTITY_JSON_x3rfse_k$();
            var this_1 = this.this$0__1.get_json_woos35_k$();
            var value = copyResult.get_clazz_ips3zj_k$();
            var this_2 = this_1.get_serializersModule_piitvg_k$();
            var this_3 = serializer(this_2, createKType(getKClass(ClazzWithHolidayCalendarAndAndTerminology), arrayOf([]), false));
            var tmp_6 = to(tmp_5, this_1.encodeToString_k0apqx_k$(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), value));
            var tmp_7 = Companion_getInstance_168().get_STATE_KEY_COURSEBLOCKS_8qo688_k$();
            var this_4 = this.this$0__1.get_json_woos35_k$();
            var value_0 = copyResult.get_courseBlocks_j5kczu_k$();
            var this_5 = this_4.get_serializersModule_piitvg_k$();
            var this_6 = serializer(this_5, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(getKClass(CourseBlockAndEditEntities), arrayOf([]), false))]), false));
            var tmp_8 = to(tmp_7, this_4.encodeToString_k0apqx_k$(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), value_0));
            var tmp_9 = Companion_getInstance_168().get_STATE_KEY_SCHEDULES_k0wlid_k$();
            var this_7 = this.this$0__1.get_json_woos35_k$();
            var value_1 = copyResult.get_schedules_5uu87n_k$();
            var this_8 = this_7.get_serializersModule_piitvg_k$();
            var this_9 = serializer(this_8, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(getKClass(Schedule), arrayOf([]), false))]), false));
            tmp_2.navigate$default_srzzsc_k$(tmp_3, mapOf([tmp_4, tmp_6, tmp_8, to(tmp_9, this_7.encodeToString_k0apqx_k$(isInterface(this_9, KSerializer) ? this_9 : THROW_CCE(), value_1))]));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzDetailOverviewViewModel$onClickCopyCourse$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAction_EDIT_getInstance() {
    ClazzAction_initEntries();
    return ClazzAction_EDIT_instance;
  }
  function ClazzAction_COPY_getInstance() {
    ClazzAction_initEntries();
    return ClazzAction_COPY_instance;
  }
  function ClazzDetailOverviewViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_166();
    destinationName = destinationName === VOID ? 'CourseDetailOverviewView' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    this._uiState_1 = MutableStateFlow(new ClazzDetailOverviewUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.setClipboardStringUseCase$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, setClipboardStringUseCase$factory());
    this._listRefreshCommandFlow_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.listRefreshCommandFlow_1 = asSharedFlow(this._listRefreshCommandFlow_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(CopyCourseUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.copyCourseUseCase$delegate_1 = Instance(this_0, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, copyCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>' call
        var tmp_3 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_wol9w3_k$());
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.copy$default_9ltzmx_k$(new FabUiState(false, tmp_3, tmp_4, ClazzDetailOverviewViewModel$onClickEdit$ref(this)));
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_5, VOID, VOID, ClazzDetailOverviewViewModel$slambda_0(this, null));
    var permissionFlow = shareIn(this.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzTripleAsFlow_8uozny_k$(this.get_activeUserPersonUid_1nlgnz_k$(), this.get_entityUidArg_hgo6pe_k$(), PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$(), PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$()), this.get_viewModelScope_ryv1dz_k$(), Companion_getInstance_38().WhileSubscribed$default_3cgwv5_k$());
    var tmp_6 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_6, VOID, VOID, ClazzDetailOverviewViewModel$slambda_2(this, permissionFlow, null));
  }
  protoOf(ClazzDetailOverviewViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzDetailOverviewViewModel).get_listRefreshCommandFlow_7r39mj_k$ = function () {
    return this.listRefreshCommandFlow_1;
  };
  protoOf(ClazzDetailOverviewViewModel).onClickClazzCode_67sfgy_k$ = function (code) {
    _get_setClipboardStringUseCase__31i1s1(this).invoke_nokysy_k$(code);
    this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_copied_to_clipboard_mjx1bw_k$())));
  };
  protoOf(ClazzDetailOverviewViewModel).onClickCourseBlock_r0u880_k$ = function (courseBlock) {
    var navArgs = mapOf([to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), courseBlock.get_cbUid_iplgso_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.get_entityUidArg_hgo6pe_k$().toString())]);
    var tmp0_subject = courseBlock.get_cbType_bskq4i_k$();
    if (tmp0_subject === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$()) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.onClickCourseBlock.<anonymous>' call
          var nextValue = prevValue.copy$default_tskj52_k$(VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.collapsedBlockUids_1, courseBlock.get_cbUid_iplgso_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this._listRefreshCommandFlow_1.tryEmit_ru0jrz_k$(new RefreshCommand());
    } else if (tmp0_subject === Companion_getInstance_19().get_BLOCK_TEXT_TYPE_61wg5t_k$()) {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_211().get_DEST_NAME_gmgk7z_k$(), navArgs);
    } else if (tmp0_subject === Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$()) {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_181().get_DEST_NAME_gmgk7z_k$(), navArgs);
    } else if (tmp0_subject === Companion_getInstance_19().get_BLOCK_DISCUSSION_TYPE_ghy0om_k$()) {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_218().get_DEST_NAME_gmgk7z_k$(), navArgs);
    } else if (tmp0_subject === Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$()) {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_195().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), courseBlock.get_cbEntityUid_tffl3v_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.get_entityUidArg_hgo6pe_k$().toString()), to(Companion_getInstance_160().get_ARG_COURSE_BLOCK_UID_jgfzis_k$(), courseBlock.get_cbUid_iplgso_k$().toString())]));
    }
  };
  protoOf(ClazzDetailOverviewViewModel).onClickPermissions_i10d85_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_180().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.get_entityUidArg_hgo6pe_k$().toString())));
  };
  protoOf(ClazzDetailOverviewViewModel).onClickCopyCourse_c5isk7_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzDetailOverviewViewModel$onClickCopyCourse$slambda_0(this, null));
  };
  function ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this$0) {
    return function () {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var this_0 = this$0.courseBlockList_1;
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.displayBlockList$delegate.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.get_courseBlock_c2ojbd_k$();
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cbModuleParentBlockUid_kgmwbj_k$();
        if (!this$0.collapsedBlockUids_1.contains_aljjnj_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.add_utx5q5_k$(element);
        }
      }
      return destination;
    };
  }
  function ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) {
    clazzAndDetail = clazzAndDetail === VOID ? null : clazzAndDetail;
    scheduleList = scheduleList === VOID ? emptyList() : scheduleList;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? emptyList() : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? false : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? emptySet() : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? false : managePermissionVisible;
    canAddNewCourse = canAddNewCourse === VOID ? false : canAddNewCourse;
    this.clazzAndDetail_1 = clazzAndDetail;
    this.scheduleList_1 = scheduleList;
    this.courseBlockList_1 = courseBlockList;
    this.blockStatusesForActiveUser_1 = blockStatusesForActiveUser;
    this.clazzCodeVisible_1 = clazzCodeVisible;
    this.collapsedBlockUids_1 = collapsedBlockUids;
    this.terminologyStrings_1 = terminologyStrings;
    this.managePermissionVisible_1 = managePermissionVisible;
    this.canAddNewCourse_1 = canAddNewCourse;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.displayBlockList$delegate_1 = lazy(tmp_0, ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this));
  }
  protoOf(ClazzDetailOverviewUiState).get_clazzAndDetail_ao2zrt_k$ = function () {
    return this.clazzAndDetail_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_scheduleList_nrce8u_k$ = function () {
    return this.scheduleList_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_courseBlockList_rn9gc9_k$ = function () {
    return this.courseBlockList_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_blockStatusesForActiveUser_uep8ru_k$ = function () {
    return this.blockStatusesForActiveUser_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_clazzCodeVisible_mi3lka_k$ = function () {
    return this.clazzCodeVisible_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_collapsedBlockUids_o0w2im_k$ = function () {
    return this.collapsedBlockUids_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_terminologyStrings_8n33mw_k$ = function () {
    return this.terminologyStrings_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_managePermissionVisible_tsv45x_k$ = function () {
    return this.managePermissionVisible_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_canAddNewCourse_9ojby9_k$ = function () {
    return this.canAddNewCourse_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_clazz_ips3zj_k$ = function () {
    var tmp0_safe_receiver = this.clazzAndDetail_1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazz_ips3zj_k$();
  };
  protoOf(ClazzDetailOverviewUiState).get_clazzDateVisible_c8125x_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.clazzAndDetail_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazz_ips3zj_k$();
    if (isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_clazzStartTime_lc1vds_k$())) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.clazzAndDetail_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_clazz_ips3zj_k$();
      tmp = isDateSet(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_clazzEndTime_sxjf8n_k$());
    }
    return tmp;
  };
  protoOf(ClazzDetailOverviewUiState).get_numStudents_si1t5h_k$ = function () {
    var tmp0_safe_receiver = this.clazzAndDetail_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_numStudents_si1t5h_k$();
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).get_numTeachers_u9gdf6_k$ = function () {
    var tmp0_safe_receiver = this.clazzAndDetail_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_numTeachers_u9gdf6_k$();
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).get_hasModules_xqk7bq_k$ = function () {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.courseBlockList_1;
      var tmp;
      if (isInterface(this_0, Collection)) {
        tmp = this_0.isEmpty_y1axqb_k$();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.<get-hasModules>.<anonymous>' call
        var tmp0_safe_receiver = element.get_courseBlock_c2ojbd_k$();
        if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cbType_bskq4i_k$()) === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$()) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  protoOf(ClazzDetailOverviewUiState).get_membersString_tpoxwf_k$ = function () {
    var tmp2_safe_receiver = this.terminologyStrings_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_4ktic3_k$(strings_getInstance().get_teachers_literal_n9taeu_k$());
    var tmp = (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs) + ': ' + this.get_numTeachers_u9gdf6_k$() + ', ';
    var tmp0_safe_receiver = this.terminologyStrings_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_4ktic3_k$(strings_getInstance().get_students_s05gf_k$());
    return tmp + ((tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs) + ': ' + this.get_numStudents_si1t5h_k$());
  };
  protoOf(ClazzDetailOverviewUiState).get_quickActionBarVisible_5z1oyh_k$ = function () {
    return this.managePermissionVisible_1;
  };
  protoOf(ClazzDetailOverviewUiState).get_displayBlockList_5s9pn2_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.displayBlockList$delegate_1;
    displayBlockList$factory();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(ClazzDetailOverviewUiState).component1_7eebsc_k$ = function () {
    return this.clazzAndDetail_1;
  };
  protoOf(ClazzDetailOverviewUiState).component2_7eebsb_k$ = function () {
    return this.scheduleList_1;
  };
  protoOf(ClazzDetailOverviewUiState).component3_7eebsa_k$ = function () {
    return this.courseBlockList_1;
  };
  protoOf(ClazzDetailOverviewUiState).component4_7eebs9_k$ = function () {
    return this.blockStatusesForActiveUser_1;
  };
  protoOf(ClazzDetailOverviewUiState).component5_7eebs8_k$ = function () {
    return this.clazzCodeVisible_1;
  };
  protoOf(ClazzDetailOverviewUiState).component6_7eebs7_k$ = function () {
    return this.collapsedBlockUids_1;
  };
  protoOf(ClazzDetailOverviewUiState).component7_7eebs6_k$ = function () {
    return this.terminologyStrings_1;
  };
  protoOf(ClazzDetailOverviewUiState).component8_7eebs5_k$ = function () {
    return this.managePermissionVisible_1;
  };
  protoOf(ClazzDetailOverviewUiState).component9_7eebs4_k$ = function () {
    return this.canAddNewCourse_1;
  };
  protoOf(ClazzDetailOverviewUiState).copy_ikqr6x_k$ = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) {
    return new ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).copy$default_tskj52_k$ = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse, $super) {
    clazzAndDetail = clazzAndDetail === VOID ? this.clazzAndDetail_1 : clazzAndDetail;
    scheduleList = scheduleList === VOID ? this.scheduleList_1 : scheduleList;
    courseBlockList = courseBlockList === VOID ? this.courseBlockList_1 : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? this.blockStatusesForActiveUser_1 : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? this.clazzCodeVisible_1 : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? this.collapsedBlockUids_1 : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? this.terminologyStrings_1 : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? this.managePermissionVisible_1 : managePermissionVisible;
    canAddNewCourse = canAddNewCourse === VOID ? this.canAddNewCourse_1 : canAddNewCourse;
    return $super === VOID ? this.copy_ikqr6x_k$(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) : $super.copy_ikqr6x_k$.call(this, clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).toString = function () {
    return 'ClazzDetailOverviewUiState(clazzAndDetail=' + this.clazzAndDetail_1 + ', scheduleList=' + this.scheduleList_1 + ', courseBlockList=' + this.courseBlockList_1 + ', blockStatusesForActiveUser=' + this.blockStatusesForActiveUser_1 + ', clazzCodeVisible=' + this.clazzCodeVisible_1 + ', collapsedBlockUids=' + this.collapsedBlockUids_1 + ', terminologyStrings=' + this.terminologyStrings_1 + ', managePermissionVisible=' + this.managePermissionVisible_1 + ', canAddNewCourse=' + this.canAddNewCourse_1 + ')';
  };
  protoOf(ClazzDetailOverviewUiState).hashCode = function () {
    var result = this.clazzAndDetail_1 == null ? 0 : this.clazzAndDetail_1.hashCode();
    result = imul(result, 31) + hashCode(this.scheduleList_1) | 0;
    result = imul(result, 31) + hashCode(this.courseBlockList_1) | 0;
    result = imul(result, 31) + hashCode(this.blockStatusesForActiveUser_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.clazzCodeVisible_1) | 0;
    result = imul(result, 31) + hashCode(this.collapsedBlockUids_1) | 0;
    result = imul(result, 31) + (this.terminologyStrings_1 == null ? 0 : this.terminologyStrings_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.managePermissionVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.canAddNewCourse_1) | 0;
    return result;
  };
  protoOf(ClazzDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.clazzAndDetail_1, tmp0_other_with_cast.clazzAndDetail_1))
      return false;
    if (!equals(this.scheduleList_1, tmp0_other_with_cast.scheduleList_1))
      return false;
    if (!equals(this.courseBlockList_1, tmp0_other_with_cast.courseBlockList_1))
      return false;
    if (!equals(this.blockStatusesForActiveUser_1, tmp0_other_with_cast.blockStatusesForActiveUser_1))
      return false;
    if (!(this.clazzCodeVisible_1 === tmp0_other_with_cast.clazzCodeVisible_1))
      return false;
    if (!equals(this.collapsedBlockUids_1, tmp0_other_with_cast.collapsedBlockUids_1))
      return false;
    if (!equals(this.terminologyStrings_1, tmp0_other_with_cast.terminologyStrings_1))
      return false;
    if (!(this.managePermissionVisible_1 === tmp0_other_with_cast.managePermissionVisible_1))
      return false;
    if (!(this.canAddNewCourse_1 === tmp0_other_with_cast.canAddNewCourse_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function copyCourseUseCase$factory() {
    return getPropertyCallableRef('copyCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_copyCourseUseCase__jeltyi(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_0() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function copyCourseUseCase$factory_0() {
    return getPropertyCallableRef('copyCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_copyCourseUseCase__jeltyi(receiver);
    }, null);
  }
  function displayBlockList$factory() {
    return getPropertyCallableRef('displayBlockList', 1, KProperty1, function (receiver) {
      return receiver.get_displayBlockList_5s9pn2_k$();
    }, null);
  }
  function _get_$childSerializers__r2zwns_19($this) {
    return $this.$childSerializers_1;
  }
  function Companion_106() {
    Companion_instance_106 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, new ArrayListSerializer($serializer_getInstance_5()), new ArrayListSerializer($serializer_getInstance_6())];
  }
  protoOf(Companion_106).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_66();
  };
  var Companion_instance_106;
  function Companion_getInstance_167() {
    if (Companion_instance_106 == null)
      new Companion_106();
    return Companion_instance_106;
  }
  function $serializer_56() {
    $serializer_instance_56 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.detailoverview.CopyCourseUseCase.CopyCourseResult', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('clazz', false);
    tmp0_serialDesc.addElement_5pzumi_k$('courseBlocks', false);
    tmp0_serialDesc.addElement_5pzumi_k$('schedules', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_56).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_56).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_167().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_7(), tmp0_cached[1], tmp0_cached[2]];
  };
  protoOf($serializer_56).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp8_cached = Companion_getInstance_167().$childSerializers_1;
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_7(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 0, $serializer_getInstance_7(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return CopyCourseResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_56).serialize_d7yfko_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_167().$childSerializers_1;
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 0, $serializer_getInstance_7(), value.clazz_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 1, tmp2_cached[1], value.courseBlocks_1);
    tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, tmp2_cached[2], value.schedules_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_56).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_d7yfko_k$(encoder, value instanceof CopyCourseResult ? value : THROW_CCE());
  };
  var $serializer_instance_56;
  function $serializer_getInstance_66() {
    if ($serializer_instance_56 == null)
      new $serializer_56();
    return $serializer_instance_56;
  }
  function CopyCourseResult_init_$Init$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_66().descriptor_1);
    }
    $this.clazz_1 = clazz;
    $this.courseBlocks_1 = courseBlocks;
    $this.schedules_1 = schedules;
    return $this;
  }
  function CopyCourseResult_init_$Create$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker) {
    return CopyCourseResult_init_$Init$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker, objectCreate(protoOf(CopyCourseResult)));
  }
  function _get_repoOrDb__i4l594_2($this) {
    return $this.repoOrDb_1;
  }
  function _get_accountManager__5euyz_1($this) {
    return $this.accountManager_1;
  }
  function CopyCourseResult(clazz, courseBlocks, schedules) {
    Companion_getInstance_167();
    this.clazz_1 = clazz;
    this.courseBlocks_1 = courseBlocks;
    this.schedules_1 = schedules;
  }
  protoOf(CopyCourseResult).get_clazz_ips3zj_k$ = function () {
    return this.clazz_1;
  };
  protoOf(CopyCourseResult).get_courseBlocks_j5kczu_k$ = function () {
    return this.courseBlocks_1;
  };
  protoOf(CopyCourseResult).get_schedules_5uu87n_k$ = function () {
    return this.schedules_1;
  };
  protoOf(CopyCourseResult).component1_7eebsc_k$ = function () {
    return this.clazz_1;
  };
  protoOf(CopyCourseResult).component2_7eebsb_k$ = function () {
    return this.courseBlocks_1;
  };
  protoOf(CopyCourseResult).component3_7eebsa_k$ = function () {
    return this.schedules_1;
  };
  protoOf(CopyCourseResult).copy_ym54f9_k$ = function (clazz, courseBlocks, schedules) {
    return new CopyCourseResult(clazz, courseBlocks, schedules);
  };
  protoOf(CopyCourseResult).copy$default_mbis4h_k$ = function (clazz, courseBlocks, schedules, $super) {
    clazz = clazz === VOID ? this.clazz_1 : clazz;
    courseBlocks = courseBlocks === VOID ? this.courseBlocks_1 : courseBlocks;
    schedules = schedules === VOID ? this.schedules_1 : schedules;
    return $super === VOID ? this.copy_ym54f9_k$(clazz, courseBlocks, schedules) : $super.copy_ym54f9_k$.call(this, clazz, courseBlocks, schedules);
  };
  protoOf(CopyCourseResult).toString = function () {
    return 'CopyCourseResult(clazz=' + this.clazz_1 + ', courseBlocks=' + this.courseBlocks_1 + ', schedules=' + this.schedules_1 + ')';
  };
  protoOf(CopyCourseResult).hashCode = function () {
    var result = this.clazz_1.hashCode();
    result = imul(result, 31) + hashCode(this.courseBlocks_1) | 0;
    result = imul(result, 31) + hashCode(this.schedules_1) | 0;
    return result;
  };
  protoOf(CopyCourseResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CopyCourseResult))
      return false;
    var tmp0_other_with_cast = other instanceof CopyCourseResult ? other : THROW_CCE();
    if (!this.clazz_1.equals(tmp0_other_with_cast.clazz_1))
      return false;
    if (!equals(this.courseBlocks_1, tmp0_other_with_cast.courseBlocks_1))
      return false;
    if (!equals(this.schedules_1, tmp0_other_with_cast.schedules_1))
      return false;
    return true;
  };
  function shallowCopyTo(_this__u8e3s4, $this, target) {
    target.set_clazzName_aqdmvj_k$(_this__u8e3s4.get_clazzName_brsrx6_k$());
    target.set_clazzDesc_gezt3p_k$(_this__u8e3s4.get_clazzDesc_brmh5s_k$());
    target.set_attendanceAverage_9una4v_k$(_this__u8e3s4.get_attendanceAverage_q3uit1_k$());
    target.set_clazzHolidayUMCalendarUid_fam2pr_k$(_this__u8e3s4.get_clazzHolidayUMCalendarUid_diy12p_k$());
    target.set_clazzScheuleUMCalendarUid_f0khzq_k$(_this__u8e3s4.get_clazzScheuleUMCalendarUid_pyne08_k$());
    target.set_isClazzActive_e2j2e6_k$(_this__u8e3s4.get_isClazzActive_pdk9bp_k$());
    target.set_clazzLocationUid_s7jxfi_k$(_this__u8e3s4.get_clazzLocationUid_64jec4_k$());
    target.set_clazzStartTime_dq8pme_k$(_this__u8e3s4.get_clazzStartTime_lc1vds_k$());
    target.set_clazzEndTime_yahlip_k$(_this__u8e3s4.get_clazzEndTime_sxjf8n_k$());
    target.set_clazzFeatures_ypnqy_k$(_this__u8e3s4.get_clazzFeatures_6nf4ac_k$());
    target.set_clazzSchoolUid_sau1vh_k$(_this__u8e3s4.get_clazzSchoolUid_g4bglp_k$());
    target.set_clazzEnrolmentPolicy_gowgj1_k$(_this__u8e3s4.get_clazzEnrolmentPolicy_pv7kzr_k$());
    target.set_clazzTerminologyUid_3itmsa_k$(_this__u8e3s4.get_clazzTerminologyUid_4xpw4_k$());
    target.set_clazzMasterChangeSeqNum_tt8ty_k$(_this__u8e3s4.get_clazzMasterChangeSeqNum_7fn794_k$());
    target.set_clazzLocalChangeSeqNum_l29zef_k$(_this__u8e3s4.get_clazzLocalChangeSeqNum_9hlwk3_k$());
    target.set_clazzLastChangedBy_g3060i_k$(_this__u8e3s4.get_clazzLastChangedBy_wnz9za_k$());
    target.set_clazzLct_l8nosk_k$(_this__u8e3s4.get_clazzLct_k8pu4y_k$());
    target.set_clazzTimeZone_h8a7dv_k$(_this__u8e3s4.get_clazzTimeZone_yu1krs_k$());
    target.set_clazzStudentsPersonGroupUid_d6byqt_k$(_this__u8e3s4.get_clazzStudentsPersonGroupUid_myynpp_k$());
    target.set_clazzTeachersPersonGroupUid_go0bzo_k$(_this__u8e3s4.get_clazzTeachersPersonGroupUid_5xdfqy_k$());
    target.set_clazzPendingStudentsPersonGroupUid_6q00t8_k$(_this__u8e3s4.get_clazzPendingStudentsPersonGroupUid_4kclja_k$());
    target.set_clazzParentsPersonGroupUid_l527ti_k$(_this__u8e3s4.get_clazzParentsPersonGroupUid_gibku8_k$());
    target.set_clazzCode_xzrrf3_k$(_this__u8e3s4.get_clazzCode_brm18c_k$());
  }
  function CopyCourseUseCase$invoke$lambda($newScheduleUid, $clazz) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_scheduleUid_35xeta_k$($newScheduleUid);
      $this$shallowCopy.set_scheduleClazzUid_t953qm_k$($clazz.get_clazzUid_k8pnbz_k$());
      return Unit_getInstance();
    };
  }
  function $invokeCOROUTINE$54(_this__u8e3s4, clazz, scheduleListVal, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.clazz_1 = clazz;
    this.scheduleListVal_1 = scheduleListVal;
  }
  protoOf($invokeCOROUTINE$54).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(11);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.repoOrDb_1.courseBlockDao_msn3sw_k$().findAllCourseBlockByClazzUidAsync_etr9jl_k$(this.clazz_1.get_clazzUid_k8pnbz_k$(), false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.courseBlocksDb0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.repoOrDb_1.peerReviewerAllocationDao_5g43p1_k$().getAllPeerReviewerAllocationsByClazzUid_kb2oiy_k$(this.clazz_1.get_clazzUid_k8pnbz_k$(), false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.assignmentPeerAllocations1__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this._this__u8e3s4__1.repoOrDb_1.clazzDao_bk7qje_k$().findByUidWithHolidayCalendarAsync_dytz84_k$(this.clazz_1.get_clazzUid_k8pnbz_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.tmp0_elvis_lhs2__1 = suspendResult;
            this.clazzWithHolidayCalendarAndAndTerminology3__1 = this.tmp0_elvis_lhs2__1 == null ? new ClazzWithHolidayCalendarAndAndTerminology() : this.tmp0_elvis_lhs2__1;
            var tmp_0 = this;
            var this_0 = this.courseBlocksDb0__1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              var tmp_1 = ensureNotNull(item.get_courseBlock_c2ojbd_k$());
              var tmp0_elvis_lhs = item.get_courseBlockPicture_gnlyiz_k$();
              var tmp_2 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.get_courseBlock_c2ojbd_k$()).get_cbUid_iplgso_k$()) : tmp0_elvis_lhs;
              var tmp_3 = item.get_contentEntry_hwf2de_k$();
              var tmp_4 = item.get_contentEntryLang_jnd1rk_k$();
              var tmp_5 = item.get_assignment_378p7u_k$();
              var tmp_6 = item.get_assignmentCourseGroupSetName_xub873_k$();
              var this_1 = this.assignmentPeerAllocations1__1;
              var destination_0 = ArrayList_init_$Create$();
              var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
              while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator_0.next_20eer_k$();
                var tmp_7 = element.get_praAssignmentUid_gmaw8d_k$();
                var tmp0_safe_receiver = item.get_assignment_378p7u_k$();
                if (tmp_7.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caUid_ipktt5_k$())) {
                  destination_0.add_utx5q5_k$(element);
                }
              }
              destination.add_utx5q5_k$(new CourseBlockAndEditEntities(tmp_1, tmp_2, tmp_3, VOID, VOID, VOID, tmp_4, tmp_5, tmp_6, destination_0));
            }

            tmp_0.courseBlocksMapped4__1 = destination;
            this.primaryKeyManager5__1 = get_doorPrimaryKeyManager(this._this__u8e3s4__1.repoOrDb_1);
            this.set_state_rjd8d0_k$(4);
            suspendResult = this.primaryKeyManager5__1.nextIdAsync_kh60wr_k$(Companion_getInstance_14().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.newClazzUid6__1 = suspendResult;
            this.currentPersonUid7__1 = this._this__u8e3s4__1.accountManager_1.get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$();
            this.set_state_rjd8d0_k$(5);
            suspendResult = this.primaryKeyManager5__1.nextIdAsync_kh60wr_k$(Companion_getInstance_39().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.newScheduleUid8__1 = suspendResult;
            var tmp_8 = this;
            tmp_8.this9__1 = this.courseBlocksMapped4__1;
            var tmp_9 = this;
            tmp_9.this10__1 = this.this9__1;
            var tmp_10 = this;
            tmp_10.destination11__1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.this9__1, 10));
            this.tmp0_iterator12__1 = this.this10__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 6:
            if (!this.tmp0_iterator12__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(10);
              continue $sm;
            }

            this.item13__1 = this.tmp0_iterator12__1.next_20eer_k$();
            var tmp_11 = this;
            tmp_11.block14__1 = this.item13__1;
            this.set_state_rjd8d0_k$(7);
            suspendResult = this.primaryKeyManager5__1.nextIdAsync_kh60wr_k$(Companion_getInstance_19().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.newCourseBlockUid15__1 = suspendResult;
            this.tmp0_safe_receiver16__1 = this.block14__1.get_assignment_378p7u_k$();
            if (this.tmp0_safe_receiver16__1 == null) {
              this.WHEN_RESULT17__1 = null;
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(8);
              suspendResult = this.primaryKeyManager5__1.nextIdAsync_kh60wr_k$(Companion_getInstance_10().get_TABLE_ID_xo2mej_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp1_caUid = suspendResult;
            var tmp2_caMarkingType = Companion_getInstance_10().get_MARKED_BY_COURSE_LEADER_54s4gf_k$();
            this.WHEN_RESULT17__1 = this.tmp0_safe_receiver16__1.copy$default_tuu5g2_k$(tmp1_caUid, VOID, VOID, new Long(0, 0), VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_caMarkingType, VOID, VOID, VOID, VOID, this.newClazzUid6__1);
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            var copiedAssignment = this.WHEN_RESULT17__1;
            var tmp_12 = this.block14__1.get_courseBlock_c2ojbd_k$();
            var tmp4_elvis_lhs = copiedAssignment == null ? null : copiedAssignment.get_caUid_ipktt5_k$();
            var ARGUMENT = this.block14__1.copy$default_8ye1e3_k$(tmp_12.copy$default_rhvmtp_k$(this.newCourseBlockUid15__1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.newClazzUid6__1, VOID, VOID, VOID, tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs), VOID, VOID, VOID, VOID, VOID, VOID, copiedAssignment);
            this.destination11__1.add_utx5q5_k$(ARGUMENT);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 10:
            var courseBlocks = this.destination11__1;
            shallowCopyTo(this.clazz_1, this._this__u8e3s4__1, this.clazzWithHolidayCalendarAndAndTerminology3__1);
            var tmp1_safe_receiver = this.clazzWithHolidayCalendarAndAndTerminology3__1.get_coursePicture_gcf86y_k$();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.copy$default_wvzmdv_k$(this.newClazzUid6__1);
            this.clazzWithHolidayCalendarAndAndTerminology3__1.set_coursePicture_h9sgol_k$(tmp2_elvis_lhs == null ? new CoursePicture(this.newClazzUid6__1) : tmp2_elvis_lhs);
            this.clazzWithHolidayCalendarAndAndTerminology3__1.set_clazzUid_tlygrb_k$(this.newClazzUid6__1);
            this.clazzWithHolidayCalendarAndAndTerminology3__1.set_clazzOwnerPersonUid_jbv4ez_k$(this.currentPersonUid7__1);
            this.clazzWithHolidayCalendarAndAndTerminology3__1.set_clazzUid_tlygrb_k$(this.newClazzUid6__1);
            this.clazzWithHolidayCalendarAndAndTerminology3__1.set_clazzOwnerPersonUid_jbv4ez_k$(this.currentPersonUid7__1);
            var this_2 = this.scheduleListVal_1;
            var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_1 = this_2.iterator_jk1svi_k$();
            while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
              var item_0 = tmp0_iterator_1.next_20eer_k$();
              destination_1.add_utx5q5_k$(shallowCopy_3(item_0, CopyCourseUseCase$invoke$lambda(this.newScheduleUid8__1, this.clazz_1)));
            }

            var schedules = destination_1;
            return new CopyCourseResult(this.clazzWithHolidayCalendarAndAndTerminology3__1, courseBlocks, schedules);
          case 11:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 11) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function CopyCourseUseCase(repoOrDb, accountManager) {
    this.repoOrDb_1 = repoOrDb;
    this.accountManager_1 = accountManager;
  }
  protoOf(CopyCourseUseCase).invoke_3zisir_k$ = function (clazz, scheduleListVal, $completion) {
    var tmp = new $invokeCOROUTINE$54(this, clazz, scheduleListVal, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function ClazzEditViewModel$slambda$slambda$slambda$lambda(this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_coursePicture_h9sgol_k$(new CoursePicture(this$0.get_entityUidArg_hgo6pe_k$()));
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).invoke_mt7ko7_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_mt7ko7_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.it_1.clazzDao_bk7qje_k$();
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.findByUidWithHolidayCalendarAsync_dytz84_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var tmp1_safe_receiver = this.WHEN_RESULT1__1;
            var tmp_2;
            if (tmp1_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var updatedClazz = tmp1_safe_receiver;
              if (tmp1_safe_receiver.get_coursePicture_gcf86y_k$() == null) {
                var tmp_3 = updatedClazz;
                updatedClazz = shallowCopy_4(tmp_3, ClazzEditViewModel$slambda$slambda$slambda$lambda(this.this$0__1));
              }
              tmp_2 = updatedClazz;
            }

            return tmp_2;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_mt7ko7_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).invoke_70ucwa_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_70ucwa_k$($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            tmp_0.this0__1 = new ClazzWithHolidayCalendarAndAndTerminology();
            var tmp_1 = this;
            tmp_1.$this$apply1__1 = this.this0__1;
            this.$this$apply1__1.set_clazzUid_tlygrb_k$(this.this$0__1.effectiveClazzUid_1);
            this.$this$apply1__1.set_clazzName_aqdmvj_k$('');
            this.$this$apply1__1.set_isClazzActive_e2j2e6_k$(true);
            this.$this$apply1__1.set_clazzStartTime_dq8pme_k$(systemTimeInMillis());
            this.$this$apply1__1.set_clazzTimeZone_h8a7dv_k$(getDefaultTimeZoneId());
            var tmp0_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_SCHOOL_UID_lnxx7t_k$());
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            this.$this$apply1__1.set_clazzSchoolUid_sau1vh_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
            var tmp_2 = this;
            var this_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseTerminologyDao_p353oa_k$();
            var tmp_3;
            if (!this.$this$apply1__1.get_clazzTerminologyUid_4xpw4_k$().equals(new Long(0, 0))) {
              tmp_3 = this_0;
            } else {
              tmp_3 = null;
            }

            tmp_2.tmp2_safe_receiver2__1 = tmp_3;
            if (this.tmp2_safe_receiver2__1 == null) {
              this.WHEN_RESULT3__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp2_safe_receiver2__1.findByUidAsync_kys5x5_k$(this.$this$apply1__1.get_clazzTerminologyUid_4xpw4_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT3__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var ARGUMENT = this.WHEN_RESULT3__1;
            this.$this$apply1__1.set_terminology_opn48q_k$(ARGUMENT);
            this.$this$apply1__1.set_coursePicture_h9sgol_k$(new CoursePicture(this.this$0__1.effectiveClazzUid_1));
            this.$this$apply1__1.set_clazzOwnerPersonUid_jbv4ez_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            return this.this0__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.invoke_70ucwa_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).invoke_rmwtf9_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_rmwtf9_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.it_1.scheduleDao_2wsqkb_k$();
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.findAllSchedulesByClazzUidAsync_x3l8bc_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT1__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_rmwtf9_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).invoke_dnd0h4_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_dnd0h4_k$($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return emptyList();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).create_d196fn_k$ = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.invoke_dnd0h4_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).invoke_9afdeh_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9afdeh_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            var tmp_0 = this;
            var this_0 = this.db_1.courseBlockDao_msn3sw_k$();
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.findAllCourseBlockByClazzUidAsync_etr9jl_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.tmp1_elvis_lhs2__1 = this.WHEN_RESULT1__1;
            this.courseBlocksDb3__1 = this.tmp1_elvis_lhs2__1 == null ? emptyList() : this.tmp1_elvis_lhs2__1;
            var tmp_2 = this;
            var this_1 = this.db_1.peerReviewerAllocationDao_5g43p1_k$();
            var tmp_3;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_3 = this_1;
            } else {
              tmp_3 = null;
            }

            tmp_2.tmp2_safe_receiver4__1 = tmp_3;
            if (this.tmp2_safe_receiver4__1 == null) {
              this.WHEN_RESULT5__1 = null;
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              suspendResult = this.tmp2_safe_receiver4__1.getAllPeerReviewerAllocationsByClazzUid_kb2oiy_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.WHEN_RESULT5__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            var tmp3_elvis_lhs = this.WHEN_RESULT5__1;
            var assignmentPeerAllocations = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            var this_2 = this.courseBlocksDb3__1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator = this_2.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              var tmp_4 = ensureNotNull(item.get_courseBlock_c2ojbd_k$());
              var tmp0_elvis_lhs = item.get_courseBlockPicture_gnlyiz_k$();
              var tmp_5 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.get_courseBlock_c2ojbd_k$()).get_cbUid_iplgso_k$()) : tmp0_elvis_lhs;
              var tmp_6 = item.get_contentEntry_hwf2de_k$();
              var tmp_7 = item.get_contentEntryLang_jnd1rk_k$();
              var tmp_8 = item.get_assignment_378p7u_k$();
              var tmp_9 = item.get_assignmentCourseGroupSetName_xub873_k$();
              var destination_0 = ArrayList_init_$Create$();
              var tmp0_iterator_0 = assignmentPeerAllocations.iterator_jk1svi_k$();
              while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator_0.next_20eer_k$();
                var tmp_10 = element.get_praAssignmentUid_gmaw8d_k$();
                var tmp0_safe_receiver = item.get_assignment_378p7u_k$();
                if (tmp_10.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caUid_ipktt5_k$())) {
                  destination_0.add_utx5q5_k$(element);
                }
              }
              destination.add_utx5q5_k$(new CourseBlockAndEditEntities(tmp_4, tmp_5, tmp_6, VOID, VOID, VOID, tmp_7, tmp_8, tmp_9, destination_0));
            }

            return destination;
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).create_9q7izm_k$ = function (db, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_9afdeh_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).invoke_pgygmu_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_pgygmu_k$($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return emptyList();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).create_d196fn_k$ = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_9(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_10(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation);
    var l = function ($completion) {
      return i.invoke_pgygmu_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_1(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_0($returnedSchedule) {
    return function (it) {
      return it.get_scheduleUid_gt0c7k_k$().equals($returnedSchedule.get_scheduleUid_gt0c7k_k$());
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation) {
    this.this$0__1 = this$0;
    this.$newSchedules_1 = $newSchedules;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).invoke_t04clr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_t04clr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(ListSerializer(Companion_getInstance_39().serializer_9w0wvi_k$()), this.$newSchedules_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this.this$0__1, this.$newSchedules_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this$0, $newSchedules, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_t04clr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1 = this.result_2.get_result_iyg5d2_k$();
            var tmp0_elvis_lhs = tmp_1 instanceof Schedule ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.returnedSchedule0__1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.this$0__1._uiState_1.get_value_j01efc_k$().clazzSchedules_1;
            tmp_3.newSchedules1__1 = replaceOrAppend(tmp_4, this.returnedSchedule0__1, ClazzEditViewModel$slambda$slambda$slambda$lambda_0(this.returnedSchedule0__1));
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, VOID, VOID, VOID, VOID, this.newSchedules1__1);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(1);
            var tmp_5 = Dispatchers_getInstance().get_Default_goqax4_k$();
            suspendResult = withContext(tmp_5, ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, this.newSchedules1__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.$savedStateHandle_1.set_wua6pr_k$('schedule', ARGUMENT);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this.this$0__1, this.$savedStateHandle_1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_12(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1 = this.result_2.get_result_iyg5d2_k$();
            var tmp0_elvis_lhs = tmp_1 instanceof CourseBlockAndEditEntities ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.courseBlockResult0__1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.this$0__1._uiState_1.get_value_j01efc_k$().courseBlockList_1;
            var tmp1_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_clazzUid_k8pnbz_k$();
            tmp_3.newCourseBlockList1__1 = this.this$0__1.addOrUpdateCourseBlockUseCase_1.invoke_6n2684_k$(tmp_4, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.courseBlockResult0__1);
            this.set_state_rjd8d0_k$(1);
            suspendResult = updateCourseBlockList(this.this$0__1, this.newCourseBlockList1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_1($timeZoneId) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_clazzTimeZone_h8a7dv_k$($timeZoneId);
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var timeZoneId = tmp_1;
          var tmp1_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_1(timeZoneId));
          }
          this.this$0__1.onEntityChanged_7fqibv_k$(tmp_2);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_2($newTerminology) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_clazzTerminologyUid_3itmsa_k$($newTerminology.get_ctUid_ipwyk6_k$());
      $this$shallowCopy.set_terminology_opn48q_k$($newTerminology);
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = tmp_0 instanceof CourseTerminology ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newTerminology = tmp_1;
          var tmp1_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_2(newTerminology));
          }
          this.this$0__1.onEntityChanged_7fqibv_k$(tmp_2);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_18(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_3($newDescription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_clazzDesc_gezt3p_k$($newDescription);
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDescription = tmp_1;
          var tmp1_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_3(newDescription));
          }
          this.this$0__1.onEntityChanged_7fqibv_k$(tmp_2);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_20(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda).invoke_j15vb8_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_j15vb8_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_40().serializer_9w0wvi_k$();
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_2(this.this$0__1, this.$savedStateHandle_1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEditViewModel$slambda$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            var tmp_3 = Companion_getInstance_158().get_INIT_PIC_URI_ye3my7_k$();
            var tmp1_safe_receiver = this_0 == null ? null : this_0.get_coursePicture_gcf86y_k$();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_coursePictureUri_ji6jte_k$();
            setIfNoValueSetYet(this.$savedStateHandle_1, tmp_3, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            return this_0;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_j15vb8_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_1).invoke_l2f1w2_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_l2f1w2_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = ListSerializer(Companion_getInstance_39().serializer_9w0wvi_k$());
            var tmp_1 = listOf_0('schedule');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_4(this.this$0__1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_0(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this.this$0__1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_l2f1w2_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_3).invoke_drxg04_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_drxg04_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = ListSerializer(Companion_getInstance_41().serializer_9w0wvi_k$());
            var tmp_1 = listOf_0('courseblocks');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_8(this.this$0__1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_10(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_1(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this.this$0__1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_drxg04_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_5).invoke_t04clr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_t04clr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.this$0__1.get_json_woos35_k$();
          var value = this.this$0__1._uiState_1.get_value_j01efc_k$();
          var this_1 = this_0.get_serializersModule_piitvg_k$();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzEditUiState), arrayOf([]), false));
          return this_0.encodeToString_k0apqx_k$(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this.this$0__1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_t04clr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_7).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'Schedule');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_12(this.this$0__1, this.$savedStateHandle_1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_8(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_9).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'courseblock');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_14(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_11).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'timeZone');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_16(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_13).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'terminology');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_18(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_15).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'clazzDescriptionHtml');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_20(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda($clazzUid) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_scheduleClazzUid_t953qm_k$($clazzUid);
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0(it) {
    return it.get_scheduleUid_gt0c7k_k$();
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1(it) {
    return it.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$();
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2(it) {
    return it.get_caUid_ipktt5_k$();
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3(it) {
    return it.get_praUid_i762pm_k$();
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    this.this$0__1 = this$0;
    this.$initEntity_1 = $initEntity;
    this.$updateImage_1 = $updateImage;
    this.$coursePictureVal_1 = $coursePictureVal;
    this.$entity_1 = $entity;
    this.$initState_1 = $initState;
    this.$courseBlockListVal_1 = $courseBlockListVal;
    this.$updatedCourseBlockPictures_1 = $updatedCourseBlockPictures;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(20);
            if (this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = _get_createNewClazzUseCase__mo489e(this.this$0__1).invoke_w16jsk_k$(this.$initEntity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().updateAsync_qhbtgn_k$(this.$initEntity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            if (this.$updateImage_1 ? !(this.$coursePictureVal_1 == null) : false) {
              this.$coursePictureVal_1.set_coursePictureLct_kztyyv_k$(systemTimeInMillis());
              this.$coursePictureVal_1.set_coursePictureUid_cmj704_k$(this.$entity_1.get_clazzUid_k8pnbz_k$());
              this.set_state_rjd8d0_k$(4);
              suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().coursePictureDao_4rldqp_k$().upsertAsync_h5b318_k$(this.$coursePictureVal_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 4:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            this.clazzUid0__1 = this.$entity_1.get_clazzUid_k8pnbz_k$();
            var tmp_0 = this;
            var this_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().clazzSchedules_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              destination.add_utx5q5_k$(shallowCopy_3(item, ClazzEditViewModel$onClickSave$slambda$slambda$lambda(this.clazzUid0__1)));
            }

            tmp_0.schedulesToCommit1__1 = destination;
            this.set_state_rjd8d0_k$(6);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().scheduleDao_2wsqkb_k$().upsertListAsync_bcl2sc_k$(this.schedulesToCommit1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.set_state_rjd8d0_k$(7);
            var tmp_1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().scheduleDao_2wsqkb_k$();
            suspendResult = deactivateByUids(tmp_1, findKeysNotInOtherList(this.$initState_1.clazzSchedules_1, this.schedulesToCommit1__1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.courseBlockModulesToCommit2__1 = this.this$0__1.updateCourseBlocksOnReorderOrCommitUseCase_1.invoke$default_uggsyz_k$(this.$courseBlockListVal_1);
            this.set_state_rjd8d0_k$(8);
            var tmp_2 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$();
            var this_1 = this.courseBlockModulesToCommit2__1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
            var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var item_0 = tmp0_iterator_0.next_20eer_k$();
              destination_0.add_utx5q5_k$(item_0.get_courseBlock_c2ojbd_k$());
            }

            suspendResult = tmp_2.upsertListAsync_z3hvvl_k$(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.set_state_rjd8d0_k$(9);
            var tmp_3 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$();
            suspendResult = deactivateByUids_0(tmp_3, findKeysNotInOtherList(this.$initState_1.courseBlockList_1, this.courseBlockModulesToCommit2__1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            var tmp_4 = this;
            var this_2 = this.$courseBlockListVal_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.iterator_jk1svi_k$();
            while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator_1.next_20eer_k$();
              var tmp0_safe_receiver = element.get_assignment_378p7u_k$();
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_1.add_utx5q5_k$(tmp0_safe_receiver);
              }
            }

            tmp_4.assignmentsToUpsert3__1 = destination_1;
            this.set_state_rjd8d0_k$(10);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzAssignmentDao_ta4cfn_k$().upsertListAsync_y4sc7o_k$(this.assignmentsToUpsert3__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var this_3 = this.$initState_1.courseBlockList_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.iterator_jk1svi_k$();
            while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_2.next_20eer_k$();
              var tmp0_safe_receiver_0 = element_0.get_assignment_378p7u_k$();
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_2.add_utx5q5_k$(tmp0_safe_receiver_0);
              }
            }

            tmp_5.assignmentsToDeactivate4__1 = findKeysNotInOtherList(destination_2, this.assignmentsToUpsert3__1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2);
            var tmp_6 = this;
            var this_4 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzAssignmentDao_ta4cfn_k$();
            var tmp_7;
            if (!this.assignmentsToDeactivate4__1.isEmpty_y1axqb_k$()) {
              tmp_7 = this_4;
            } else {
              tmp_7 = null;
            }

            tmp_6.tmp0_safe_receiver5__1 = tmp_7;
            if (this.tmp0_safe_receiver5__1 == null) {
              this.WHEN_RESULT6__1 = null;
              this.set_state_rjd8d0_k$(12);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(11);
              suspendResult = this.tmp0_safe_receiver5__1.updateActiveByList_ieobpc_k$(this.assignmentsToDeactivate4__1, false, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 11:
            var tmp_8 = this;
            tmp_8.WHEN_RESULT6__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(12);
            continue $sm;
          case 12:
            var tmp_9 = this;
            var this_5 = this.$courseBlockListVal_1;
            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_3 = this_5.iterator_jk1svi_k$();
            while (tmp0_iterator_3.hasNext_bitz1p_k$()) {
              var element_1 = tmp0_iterator_3.next_20eer_k$();
              var list = element_1.get_assignmentPeerAllocations_1edap1_k$();
              addAll(destination_3, list);
            }

            tmp_9.currentPeerReviewAllocations7__1 = destination_3;
            var tmp_10 = this;
            var this_6 = this.$initState_1.courseBlockList_1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_6.iterator_jk1svi_k$();
            while (tmp0_iterator_4.hasNext_bitz1p_k$()) {
              var element_2 = tmp0_iterator_4.next_20eer_k$();
              var list_0 = element_2.get_assignmentPeerAllocations_1edap1_k$();
              addAll(destination_4, list_0);
            }

            tmp_10.prevPeerReviewerAllocations8__1 = destination_4;
            this.set_state_rjd8d0_k$(13);
            var tmp_11 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().peerReviewerAllocationDao_5g43p1_k$();
            suspendResult = deactivateByUids_1(tmp_11, findKeysNotInOtherList(this.prevPeerReviewerAllocations8__1, this.currentPeerReviewAllocations7__1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.set_state_rjd8d0_k$(14);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().peerReviewerAllocationDao_5g43p1_k$().upsertList_cxaqq2_k$(this.currentPeerReviewAllocations7__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 14:
            var tmp_12 = this;
            var this_7 = this.$courseBlockListVal_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_7.iterator_jk1svi_k$();
            while (tmp0_iterator_5.hasNext_bitz1p_k$()) {
              var element_3 = tmp0_iterator_5.next_20eer_k$();
              var tmp0_safe_receiver_1 = element_3.get_contentJobItem_fg7ikg_k$();
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_5.add_utx5q5_k$(tmp0_safe_receiver_1);
              }
            }

            tmp_12.this9__1 = destination_5;
            this.tmp0_iterator10__1 = this.this9__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(15);
            continue $sm;
          case 15:
            if (!this.tmp0_iterator10__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(17);
              continue $sm;
            }

            this.element11__1 = this.tmp0_iterator10__1.next_20eer_k$();
            var tmp_13 = this;
            tmp_13.it12__1 = this.element11__1;
            this.set_state_rjd8d0_k$(16);
            suspendResult = this.this$0__1.importContentUseCase_1.invoke_bt37y5_k$(this.it12__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.set_state_rjd8d0_k$(15);
            continue $sm;
          case 17:
            var tmp_14 = this;
            var this_8 = this.this$0__1.get_activeDb_bu92wd_k$().courseBlockPictureDao_hf3pty_k$();
            var tmp_15;
            if (!this.$updatedCourseBlockPictures_1.isEmpty_y1axqb_k$()) {
              tmp_15 = this_8;
            } else {
              tmp_15 = null;
            }

            tmp_14.tmp1_safe_receiver13__1 = tmp_15;
            if (this.tmp1_safe_receiver13__1 == null) {
              this.WHEN_RESULT14__1 = null;
              this.set_state_rjd8d0_k$(19);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(18);
              suspendResult = this.tmp1_safe_receiver13__1.upsertListAsync_wzra55_k$(this.$updatedCourseBlockPictures_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 18:
            var tmp_16 = this;
            tmp_16.WHEN_RESULT14__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(19);
            continue $sm;
          case 19:
            Napier_getInstance().d$default_a5agxr_k$('onClickSave: transaction block done');
            return Unit_getInstance();
          case 20:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 20) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$initEntity_1, this.$updateImage_1, this.$coursePictureVal_1, this.$entity_1, this.$initState_1, this.$courseBlockListVal_1, this.$updatedCourseBlockPictures_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$onClickSave$slambda$slambda_0(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda$lambda($updatedBlock) {
    return function (it) {
      return it.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$().equals($updatedBlock.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$());
    };
  }
  function _get_addOrUpdateCourseBlockUseCase__ubl6an($this) {
    return $this.addOrUpdateCourseBlockUseCase_1;
  }
  function _get_updateCourseBlocksOnReorderOrCommitUseCase__gloqqo($this) {
    return $this.updateCourseBlocksOnReorderOrCommitUseCase_1;
  }
  function _get_saveContentEntryUseCase__d3hrv4($this) {
    return $this.saveContentEntryUseCase_1;
  }
  function _get_importContentUseCase__l5t7nc($this) {
    return $this.importContentUseCase_1;
  }
  function _get_enqueueSavePictureUseCase__rl1s31_0($this) {
    return $this.enqueueSavePictureUseCase_1;
  }
  function _get__uiState__8e9jsd_5($this) {
    return $this._uiState_1;
  }
  function _get_effectiveClazzUid__kdfey6($this) {
    return $this.effectiveClazzUid_1;
  }
  function _get_createNewClazzUseCase__mo489e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.createNewClazzUseCase$delegate_1;
    createNewClazzUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function updateCourseBlockList($this, newCourseBlockList, $completion) {
    var tmp = new $updateCourseBlockListCOROUTINE$55($this, newCourseBlockList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function hasErrors(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.clazzStartDateError_1 == null) ? true : !(_this__u8e3s4.clazzEndDateError_1 == null)) ? true : !(_this__u8e3s4.clazzNameError_1 == null);
  }
  function updateCourseBlock($this, updatedBlock) {
    var tmp = $this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzEditViewModel$updateCourseBlock$slambda_0($this, updatedBlock, null));
  }
  function Companion_107() {
    Companion_instance_107 = this;
    this.DEST_NAME_1 = 'CourseEdit';
    this.RESULT_KEY_SCHEDULE_1 = 'Schedule';
    this.STATE_KEY_SCHEDULES_1 = 'schedule';
    this.RESULT_KEY_COURSEBLOCK_1 = 'courseblock';
    this.RESULT_KEY_TIMEZONE_1 = 'timeZone';
    this.RESULT_KEY_TERMINOLOGY_1 = 'terminology';
    this.STATE_KEY_COURSEBLOCKS_1 = 'courseblocks';
    this.RESULT_KEY_DESCRIPTION_1 = 'clazzDescriptionHtml';
  }
  protoOf(Companion_107).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_107).get_RESULT_KEY_SCHEDULE_aqe1w0_k$ = function () {
    return this.RESULT_KEY_SCHEDULE_1;
  };
  protoOf(Companion_107).get_STATE_KEY_SCHEDULES_k0wlid_k$ = function () {
    return this.STATE_KEY_SCHEDULES_1;
  };
  protoOf(Companion_107).get_RESULT_KEY_COURSEBLOCK_ye4w7t_k$ = function () {
    return this.RESULT_KEY_COURSEBLOCK_1;
  };
  protoOf(Companion_107).get_RESULT_KEY_TIMEZONE_c27udq_k$ = function () {
    return this.RESULT_KEY_TIMEZONE_1;
  };
  protoOf(Companion_107).get_RESULT_KEY_TERMINOLOGY_47cgvu_k$ = function () {
    return this.RESULT_KEY_TERMINOLOGY_1;
  };
  protoOf(Companion_107).get_STATE_KEY_COURSEBLOCKS_8qo688_k$ = function () {
    return this.STATE_KEY_COURSEBLOCKS_1;
  };
  protoOf(Companion_107).get_RESULT_KEY_DESCRIPTION_77b6ir_k$ = function () {
    return this.RESULT_KEY_DESCRIPTION_1;
  };
  var Companion_instance_107;
  function Companion_getInstance_168() {
    if (Companion_instance_107 == null)
      new Companion_107();
    return Companion_instance_107;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_9(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_9).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda).invoke_pclm39_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.it_1.coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsync2_6hwhkq_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$(), PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.it_1.systemPermissionDao_fl20r8_k$().personHasSystemPermission_tdum2r_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_ADD_COURSE_d9fly6_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 2:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return this.WHEN_RESULT0__1;
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzEditViewModel$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_pclm39_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.$savedStateHandle_1 = $savedStateHandle;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = async(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_0(this.this$0__1, this.$savedStateHandle_1, null));
            var tmp_1 = async(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_2(this.this$0__1, null));
            suspendResult = awaitAll([tmp_0, tmp_1, async(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_4(this.this$0__1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_160().get_KEY_INIT_STATE_mwep3f_k$()) == null) {
              this.ARGUMENT0__1 = Companion_getInstance_160().get_KEY_INIT_STATE_mwep3f_k$();
              this.set_state_rjd8d0_k$(2);
              var tmp_2 = Dispatchers_getInstance().get_Default_goqax4_k$();
              suspendResult = withContext(tmp_2, ClazzEditViewModel$slambda$slambda_6(this.this$0__1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            this.$savedStateHandle_1.set_wua6pr_k$(this.ARGUMENT0__1, ARGUMENT);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_8(this.this$0__1, this.$savedStateHandle_1, null));
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_10(this.this$0__1, null));
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_12(this.this$0__1, null));
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_14(this.this$0__1, null));
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_16(this.this$0__1, null));
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_gvqr5s_k$(true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp_3 = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
                var tmp_4 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, tmp_3, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_4, VOID, ClazzEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEditViewModel$slambda_1(this.$savedStateHandle_1, this.this$0__1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(ClazzEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation) {
    this.this$0__1 = this$0;
    this.$newCourseBlockList_1 = $newCourseBlockList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).invoke_t04clr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_t04clr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(ListSerializer(Companion_getInstance_41().serializer_9w0wvi_k$()), this.$newCourseBlockList_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this.this$0__1, this.$newCourseBlockList_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$updateCourseBlockList$slambda_0(this$0, $newCourseBlockList, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_t04clr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onCheckedAttendanceChanged$lambda($checked) {
    return function ($this$shallowCopy) {
      var tmp;
      if ($checked) {
        tmp = Companion_getInstance_14().get_CLAZZ_FEATURE_ATTENDANCE_h2pzj6_k$();
      } else {
        tmp = new Long(0, 0);
      }
      $this$shallowCopy.set_clazzFeatures_ypnqy_k$(tmp);
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$onClickSave$lambda($initEntity) {
    return function ($this$shallowCopy) {
      var tmp0_safe_receiver = $this$shallowCopy.get_clazzName_brsrx6_k$();
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.text.trim' call
        tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
      }
      $this$shallowCopy.set_clazzName_aqdmvj_k$(tmp);
      var tmp_0 = Companion_getInstance().fromEpochMilliseconds_e2resj_k$($initEntity.get_clazzStartTime_lc1vds_k$());
      // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
      var tmp0_elvis_lhs = $initEntity.get_clazzTimeZone_yu1krs_k$();
      var tmp$ret$1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
      $this$shallowCopy.set_clazzStartTime_dq8pme_k$(toLocalMidnight(tmp_0, tmp$ret$1).toEpochMilliseconds_82cfls_k$());
      var tmp_1;
      if (!$this$shallowCopy.get_clazzEndTime_sxjf8n_k$().equals(Companion_getInstance_11().get_MAX_VALUE_54a9lf_k$())) {
        var tmp_2 = Companion_getInstance().fromEpochMilliseconds_e2resj_k$($initEntity.get_clazzEndTime_sxjf8n_k$());
        // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
        var tmp0_elvis_lhs_0 = $initEntity.get_clazzTimeZone_yu1krs_k$();
        var tmp$ret$2 = tmp0_elvis_lhs_0 == null ? 'UTC' : tmp0_elvis_lhs_0;
        $this$shallowCopy.set_clazzEndTime_yahlip_k$(toLocalEndOfDay(tmp_2, tmp$ret$2).toEpochMilliseconds_82cfls_k$());
        tmp_1 = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$onClickSave$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_gvqr5s_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entity_1 = $entity;
    this.$initEntity_1 = $initEntity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(12);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), Companion_getInstance_160().get_KEY_INIT_STATE_mwep3f_k$(), Companion_getInstance_169().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_elvis_lhs0__1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.tmp0_elvis_lhs0__1 == null) {
              return Unit_getInstance();
            } else {
              tmp_1 = this.tmp0_elvis_lhs0__1;
            }

            tmp_0.initState1__1 = tmp_1;
            Napier_getInstance().d$default_a5agxr_k$('onClickSave: start transaction');
            this.courseBlockListVal2__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().courseBlockList_1;
            this.coursePictureVal3__1 = this.$entity_1.get_coursePicture_gcf86y_k$();
            var tmp_2 = this;
            var tmp_3;
            if (!(this.coursePictureVal3__1 == null)) {
              var tmp_4 = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_158().get_INIT_PIC_URI_ye3my7_k$());
              var tmp1_safe_receiver = this.$entity_1.get_coursePicture_gcf86y_k$();
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_coursePictureUri_ji6jte_k$();
              tmp_3 = !(tmp_4 === (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs));
            } else {
              tmp_3 = false;
            }

            tmp_2.updateImage4__1 = tmp_3;
            var tmp_5 = this;
            var this_0 = this.courseBlockListVal2__1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              var tmp0_safe_receiver = element.get_courseBlockPicture_gnlyiz_k$();
              var imageUriNow = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cbpPictureUri_stohti_k$();
              var tmp$ret$0;
              l$ret$1: do {
                var tmp0_iterator_0 = this.initState1__1.courseBlockList_1.iterator_jk1svi_k$();
                while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                  var element_0 = tmp0_iterator_0.next_20eer_k$();
                  var tmp0_safe_receiver_0 = element_0.get_courseBlockPicture_gnlyiz_k$();
                  var tmp_6 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_cbpUid_bt1uw8_k$();
                  var tmp1_safe_receiver_0 = element.get_courseBlockPicture_gnlyiz_k$();
                  if (equals(tmp_6, tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.get_cbpUid_bt1uw8_k$())) {
                    tmp$ret$0 = element_0;
                    break l$ret$1;
                  }
                }
                tmp$ret$0 = null;
              }
               while (false);
              var tmp1_safe_receiver_1 = tmp$ret$0;
              var tmp2_safe_receiver = tmp1_safe_receiver_1 == null ? null : tmp1_safe_receiver_1.get_courseBlockPicture_gnlyiz_k$();
              var initImageUri = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_cbpPictureUri_stohti_k$();
              var tmp3_safe_receiver = element.get_courseBlockPicture_gnlyiz_k$();
              var tmp_7;
              if (tmp3_safe_receiver == null) {
                tmp_7 = null;
              } else {
                var tmp_8;
                if (!(imageUriNow == initImageUri)) {
                  tmp_8 = tmp3_safe_receiver;
                } else {
                  tmp_8 = null;
                }
                tmp_7 = tmp_8;
              }
              var tmp0_safe_receiver_1 = tmp_7;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.add_utx5q5_k$(tmp0_safe_receiver_1);
              }
            }

            tmp_5.updatedCourseBlockPictures5__1 = destination;
            this.set_state_rjd8d0_k$(2);
            var tmp_9 = this.this$0__1.get_activeDb_bu92wd_k$();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.$initEntity_1, this.updateImage4__1, this.coursePictureVal3__1, this.$entity_1, this.initState1__1, this.courseBlockListVal2__1, this.updatedCourseBlockPictures5__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Napier_getInstance().d$default_a5agxr_k$('onClickSave: transaction done');
            var tmp_10 = this;
            tmp_10.this6__1 = this.courseBlockListVal2__1;
            this.tmp0_iterator7__1 = this.this6__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            if (!this.tmp0_iterator7__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            }

            this.element8__1 = this.tmp0_iterator7__1.next_20eer_k$();
            var tmp_11 = this;
            tmp_11.block9__1 = this.element8__1;
            this.tmp0_safe_receiver10__1 = this.block9__1.get_contentEntry_hwf2de_k$();
            if (this.tmp0_safe_receiver10__1 == null) {
              this.WHEN_RESULT11__1 = null;
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.this12__1 = this.tmp0_safe_receiver10__1;
              var tmp_13 = this;
              tmp_13.contentEntry13__1 = this.this12__1;
              this.set_state_rjd8d0_k$(4);
              var tmp_14 = this.block9__1.get_contentEntryPicture_534nj8_k$();
              var tmp$ret$2;
              l$ret$3: do {
                var tmp0_iterator_1 = this.initState1__1.courseBlockList_1.iterator_jk1svi_k$();
                while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
                  var element_1 = tmp0_iterator_1.next_20eer_k$();
                  var tmp0_safe_receiver_2 = element_1.get_courseBlockPicture_gnlyiz_k$();
                  var tmp_15 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_cbpUid_bt1uw8_k$();
                  var tmp1_safe_receiver_2 = this.block9__1.get_courseBlockPicture_gnlyiz_k$();
                  if (equals(tmp_15, tmp1_safe_receiver_2 == null ? null : tmp1_safe_receiver_2.get_cbpUid_bt1uw8_k$())) {
                    tmp$ret$2 = element_1;
                    break l$ret$3;
                  }
                }
                tmp$ret$2 = null;
              }
               while (false);
              var tmp0_safe_receiver_3 = tmp$ret$2;
              var tmp1_safe_receiver_3 = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.get_courseBlockPicture_gnlyiz_k$();
              suspendResult = this.this$0__1.saveContentEntryUseCase_1.invoke_mh83ng_k$(this.contentEntry13__1, null, tmp_14, tmp1_safe_receiver_3 == null ? null : tmp1_safe_receiver_3.get_cbpPictureUri_stohti_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.WHEN_RESULT11__1 = this.this12__1;
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 6:
            var tmp_16 = this;
            var this_1 = this.this$0__1.enqueueSavePictureUseCase_1;
            var tmp_17;
            if (this.updateImage4__1) {
              tmp_17 = this_1;
            } else {
              tmp_17 = null;
            }

            tmp_16.tmp4_safe_receiver14__1 = tmp_17;
            if (this.tmp4_safe_receiver14__1 == null) {
              this.WHEN_RESULT15__1 = null;
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(7);
              var tmp_18 = this.$entity_1.get_clazzUid_k8pnbz_k$();
              var tmp_19 = Companion_getInstance_42().get_TABLE_ID_xo2mej_k$();
              var tmp3_safe_receiver_0 = this.coursePictureVal3__1;
              suspendResult = this.tmp4_safe_receiver14__1.invoke_xmwesk_k$(tmp_18, tmp_19, tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.get_coursePictureUri_ji6jte_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 7:
            var tmp_20 = this;
            tmp_20.WHEN_RESULT15__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 8:
            var tmp_21 = this;
            tmp_21.this16__1 = this.updatedCourseBlockPictures5__1;
            this.tmp0_iterator17__1 = this.this16__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            if (!this.tmp0_iterator17__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(11);
              continue $sm;
            }

            this.element18__1 = this.tmp0_iterator17__1.next_20eer_k$();
            var tmp_22 = this;
            tmp_22.it19__1 = this.element18__1;
            this.set_state_rjd8d0_k$(10);
            suspendResult = this.this$0__1.enqueueSavePictureUseCase_1.invoke_xmwesk_k$(this.it19__1.get_cbpUid_bt1uw8_k$(), Companion_getInstance_43().get_TABLE_ID_xo2mej_k$(), this.it19__1.get_cbpPictureUri_stohti_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 11:
            Napier_getInstance().d$default_a5agxr_k$('onClickSave: done');
            this.this$0__1.finishWithResult$default_p2obzb_k$(Companion_getInstance_165().get_DEST_NAME_gmgk7z_k$(), this.$entity_1.get_clazzUid_k8pnbz_k$(), this.$entity_1);
            return Unit_getInstance();
          case 12:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 12) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzEditViewModel$onClickSave$slambda(this.this$0__1, this.$entity_1, this.$initEntity_1, completion);
  };
  function ClazzEditViewModel$onClickSave$slambda_0(this$0, $entity, $initEntity, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation) {
    this.this$0__1 = this$0;
    this.$newList_1 = $newList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = updateCourseBlockList(this.this$0__1, this.$newList_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this.this$0__1, this.$newList_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$onCourseBlockMoved$slambda_0(this$0, $newList, resultContinuation) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation) {
    this.this$0__1 = this$0;
    this.$updatedBlock_1 = $updatedBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().courseBlockList_1;
            suspendResult = updateCourseBlockList(this.this$0__1, replace_0(tmp_0, this.$updatedBlock_1, ClazzEditViewModel$updateCourseBlock$slambda$lambda(this.$updatedBlock_1)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this.this$0__1, this.$updatedBlock_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$updateCourseBlock$slambda_0(this$0, $updatedBlock, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation) {
    this.this$0__1 = this$0;
    this.$block_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().courseBlockList_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              if (!element.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$().equals(this.$block_1.get_courseBlock_c2ojbd_k$().get_cbUid_iplgso_k$())) {
                destination.add_utx5q5_k$(element);
              }
            }

            suspendResult = updateCourseBlockList(this.this$0__1, destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this.this$0__1, this.$block_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this$0, $block, resultContinuation) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateCourseBlockListCOROUTINE$55(_this__u8e3s4, newCourseBlockList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.newCourseBlockList_1 = newCourseBlockList;
  }
  protoOf($updateCourseBlockListCOROUTINE$55).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            l$ret$1: do {
              var this_0 = this._this__u8e3s4__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, VOID, VOID, VOID, VOID, VOID, this.newCourseBlockList_1);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.ARGUMENT0__1 = this._this__u8e3s4__1.get_savedStateHandle_xtsxet_k$();
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Dispatchers_getInstance().get_Default_goqax4_k$();
            suspendResult = withContext(tmp_0, ClazzEditViewModel$updateCourseBlockList$slambda_0(this._this__u8e3s4__1, this.newCourseBlockList_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.ARGUMENT0__1.set_wua6pr_k$('courseblocks', ARGUMENT);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzEditViewModel(di, savedStateHandle, addOrUpdateCourseBlockUseCase, updateCourseBlocksOnReorderOrCommitUseCase, saveContentEntryUseCase, importContentUseCase, enqueueSavePictureUseCase) {
    Companion_getInstance_168();
    addOrUpdateCourseBlockUseCase = addOrUpdateCourseBlockUseCase === VOID ? new AddOrUpdateCourseBlockUseCase() : addOrUpdateCourseBlockUseCase;
    updateCourseBlocksOnReorderOrCommitUseCase = updateCourseBlocksOnReorderOrCommitUseCase === VOID ? new UpdateCourseBlocksOnReorderOrCommitUseCase() : updateCourseBlocksOnReorderOrCommitUseCase;
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var this_0 = get_direct(onActiveLearningSpace(di));
      var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
      var tmp_0 = this_0.get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, tag);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = tmp_3.Instance_vwdrk9_k$(tmp$ret$2, null).get_repository_c37cur_k$();
      // Inline function 'org.kodein.di.instance' call
      var tmp_6 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$5 = tmp_6.Instance_vwdrk9_k$(tmp$ret$4, null);
      tmp = new SaveContentEntryUseCase(tmp_2, tmp_5, tmp$ret$5);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_8;
    if (importContentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_9 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_10 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      tmp_8 = tmp_9.Instance_vwdrk9_k$(tmp$ret$0_0, null);
    } else {
      tmp_8 = importContentUseCase;
    }
    importContentUseCase = tmp_8;
    var tmp_11;
    if (enqueueSavePictureUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_12 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$0_1 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      tmp_11 = tmp_12.Instance_vwdrk9_k$(tmp$ret$0_1, null);
    } else {
      tmp_11 = enqueueSavePictureUseCase;
    }
    enqueueSavePictureUseCase = tmp_11;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseEdit');
    this.addOrUpdateCourseBlockUseCase_1 = addOrUpdateCourseBlockUseCase;
    this.updateCourseBlocksOnReorderOrCommitUseCase_1 = updateCourseBlocksOnReorderOrCommitUseCase;
    this.saveContentEntryUseCase_1 = saveContentEntryUseCase;
    this.importContentUseCase_1 = importContentUseCase;
    this.enqueueSavePictureUseCase_1 = enqueueSavePictureUseCase;
    this._uiState_1 = MutableStateFlow(new ClazzEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_14 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_14.effectiveClazzUid_1 = tmp1_elvis_lhs == null ? get_doorPrimaryKeyManager(this.get_activeDb_bu92wd_k$()).nextId_8yjjmy_k$(Companion_getInstance_14().get_TABLE_ID_xo2mej_k$()) : tmp1_elvis_lhs;
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.createNewClazzUseCase$delegate_1 = Instance(this_1, tmp$ret$10, null).provideDelegate_o2qlc1_k$(this, createNewClazzUseCase$factory());
    var tmp_17 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_CLAZZ_ACTION_267bl2_k$());
    var tmp_18;
    if (tmp0_safe_receiver_0 == null) {
      tmp_18 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.clazzAction.<anonymous>' call
      tmp_18 = valueOf_11(tmp0_safe_receiver_0);
    }
    var tmp1_elvis_lhs_0 = tmp_18;
    tmp_17.clazzAction_1 = tmp1_elvis_lhs_0 == null ? ClazzAction_EDIT_getInstance() : tmp1_elvis_lhs_0;
    var title = this.createEditTitle_2tyyvi_k$(strings_getInstance().get_add_a_new_course_83hi5d_k$(), this.clazzAction_1.equals(ClazzAction_COPY_getInstance()) ? strings_getInstance().get_copy_course_1jmgck_k$() : strings_getInstance().get_edit_course_v4swhl_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_145().get_INDETERMINATE_a8koem_k$();
        var nextValue = new AppUiState(VOID, tmp0_loadingState, title, VOID, true);
        if (this_2.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_19 = ClazzEditViewModel$slambda_0(this, null);
    this.launchIfHasPermission$default_l9omam_k$(tmp_19, VOID, VOID, ClazzEditViewModel$slambda_2(savedStateHandle, this, null));
  }
  protoOf(ClazzEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzEditViewModel).get_clazzAction_d1vqyt_k$ = function () {
    return this.clazzAction_1;
  };
  protoOf(ClazzEditViewModel).onEntityChanged_7fqibv_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.entity_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_clazzEndTime_sxjf8n_k$();
        var tmp6_clazzEndDateError = this.updateErrorMessageOnChange_silrgy_k$(tmp, entity == null ? null : entity.get_clazzEndTime_sxjf8n_k$(), prevValue.clazzEndDateError_1);
        var tmp0_safe_receiver = prevValue.entity_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzStartTime_lc1vds_k$();
        var tmp7_clazzStartDateError = this.updateErrorMessageOnChange_silrgy_k$(tmp_0, entity == null ? null : entity.get_clazzStartTime_lc1vds_k$(), prevValue.clazzStartDateError_1);
        var tmp4_safe_receiver = prevValue.entity_1;
        var tmp_1 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_clazzName_brsrx6_k$();
        var tmp8_clazzNameError = this.updateErrorMessageOnChange_silrgy_k$(tmp_1, entity == null ? null : entity.get_clazzName_brsrx6_k$(), prevValue.clazzNameError_1);
        var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, entity, tmp7_clazzStartDateError, tmp6_clazzEndDateError, tmp8_clazzNameError);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_40().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_2, VOID, VOID, ClazzEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(ClazzEditViewModel).onCheckedAttendanceChanged_kzqmxe_k$ = function (checked) {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().entity_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy_4(tmp0_safe_receiver, ClazzEditViewModel$onCheckedAttendanceChanged$lambda(checked));
    }
    this.onEntityChanged_7fqibv_k$(tmp);
  };
  protoOf(ClazzEditViewModel).onClickAddSchedule_lfk8bl_k$ = function () {
    this.navigateForResult$default_qg960j_k$(Companion_getInstance_242().get_DEST_NAME_gmgk7z_k$(), 'Schedule', null, Companion_getInstance_39().serializer_9w0wvi_k$());
  };
  protoOf(ClazzEditViewModel).onClickEditSchedule_y8373y_k$ = function (schedule) {
    this.navigateForResult$default_qg960j_k$(Companion_getInstance_242().get_DEST_NAME_gmgk7z_k$(), 'Schedule', schedule, Companion_getInstance_39().serializer_9w0wvi_k$());
  };
  protoOf(ClazzEditViewModel).onClickDeleteSchedule_jikjof_k$ = function (schedule) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this._uiState_1.get_value_j01efc_k$().clazzSchedules_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
      if (!element.get_scheduleUid_gt0c7k_k$().equals(schedule.get_scheduleUid_gt0c7k_k$())) {
        destination.add_utx5q5_k$(element);
      }
    }
    var newSchedules = destination;
    this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('schedule', this.get_json_woos35_k$().encodeToString_k0apqx_k$(ListSerializer(Companion_getInstance_39().serializer_9w0wvi_k$()), newSchedules));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
        var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, VOID, VOID, VOID, VOID, newSchedules);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzEditViewModel).onClickEditDescription_s23iqh_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().entity_1;
    this.navigateToEditHtml$default_imw6oe_k$(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzDesc_brmh5s_k$(), 'clazzDescriptionHtml', this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_description_emjre5_k$()));
  };
  protoOf(ClazzEditViewModel).onAddCourseBlock_4jn5rs_k$ = function (blockType) {
    if (blockType === Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$()) {
      this.navigateForResult$default_qg960j_k$(Companion_getInstance_204().get_DEST_NAME_gmgk7z_k$(), 'courseblock', null, Companion_getInstance_41().serializer_9w0wvi_k$(), mapOf([to(Companion_getInstance_156().get_ARG_LISTMODE_1jy3rh_k$(), ListViewMode_PICKER_getInstance().toString()), to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.effectiveClazzUid_1.toString()), to(Companion_getInstance_209().get_ARG_BLOCK_TYPE_1o21ry_k$(), Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$().toString()), to(Companion_getInstance_200().get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$(), Companion_getInstance_200().get_GO_TO_COURSE_BLOCK_EDIT_q6h1u2_k$().toString())]));
      return Unit_getInstance();
    }
    var tmp;
    if ((blockType === Companion_getInstance_19().get_BLOCK_DISCUSSION_TYPE_ghy0om_k$() ? true : blockType === Companion_getInstance_19().get_BLOCK_TEXT_TYPE_61wg5t_k$()) ? true : blockType === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$()) {
      tmp = to(Companion_getInstance_209().get_DEST_NAME_gmgk7z_k$(), 'courseblock');
    } else if (blockType === Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$()) {
      tmp = to(Companion_getInstance_185().get_DEST_NAME_gmgk7z_k$(), 'courseblock');
    } else {
      return Unit_getInstance();
    }
    var tmp1_container = tmp;
    var viewName = tmp1_container.component1_7eebsc_k$();
    var keyName = tmp1_container.component2_7eebsb_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_209().get_ARG_BLOCK_TYPE_1o21ry_k$(), blockType.toString());
    this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.effectiveClazzUid_1.toString());
    if (blockType === Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$()) {
      var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().entity_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_terminology_hmih12_k$();
      if (tmp1_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.also' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>.<anonymous>' call
        this_0.put_4fpzoq_k$(Companion_getInstance_185().get_ARG_TERMINOLOGY_f9vilb_k$(), this.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_44().serializer_9w0wvi_k$(), tmp1_safe_receiver));
      }
    }
    var tmp2_args = this_0.build_1k0s4u_k$();
    var tmp3_serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
    this.navigateForResult$default_qg960j_k$(viewName, keyName, null, tmp3_serializer, tmp2_args);
  };
  protoOf(ClazzEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().entity_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var initEntity = tmp;
    if (this.get_loadingState_rpk2ke_k$().equals(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$())) {
      Napier_getInstance().d$default_a5agxr_k$('onClickSave: indeterminate');
      return Unit_getInstance();
    }
    if (initEntity.get_clazzStartTime_lc1vds_k$().equals(new Long(0, 0))) {
      Napier_getInstance().d$default_a5agxr_k$('onClickSave: clazzstarttime = 0');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.copy$default_gvqr5s_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (initEntity.get_clazzEndTime_sxjf8n_k$().compareTo_9jj042_k$(initEntity.get_clazzStartTime_lc1vds_k$()) <= 0) {
      Napier_getInstance().d$default_a5agxr_k$('onClickSave: endbeforestart');
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_1.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_gvqr5s_k$(VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_end_is_before_start_o1i85m_k$()));
          if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_2 = initEntity.get_clazzName_brsrx6_k$();
    // Inline function 'kotlin.contracts.contract' call
    if (this_2 == null ? true : isBlank(this_2)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this._uiState_1;
        while (true) {
          var prevValue_1 = this_3.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.copy$default_gvqr5s_k$(VOID, VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_required_wq3z3c_k$()));
          if (this_3.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (hasErrors(this._uiState_1.get_value_j01efc_k$(), this)) {
      Napier_getInstance().d$default_a5agxr_k$('onClickSave: hasErrors');
      return Unit_getInstance();
    }
    var entity = shallowCopy_4(initEntity, ClazzEditViewModel$onClickSave$lambda(initEntity));
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this._uiState_1;
      while (true) {
        var prevValue_2 = this_4.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
        var nextValue_2 = prevValue_2.copy$default_gvqr5s_k$(VOID, entity);
        if (this_4.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_0 = ClazzEditViewModel$onClickSave$lambda_0(this);
    this.launchWithLoadingIndicator_qcafqw_k$(tmp_0, ClazzEditViewModel$onClickSave$slambda_0(this, entity, initEntity, null));
  };
  protoOf(ClazzEditViewModel).onCourseBlockMoved_u5d9e8_k$ = function (from, to) {
    // Inline function 'kotlin.apply' call
    var this_0 = toMutableList(this._uiState_1.get_value_j01efc_k$().courseBlockList_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onCourseBlockMoved.<anonymous>' call
    this_0.add_dl6gt3_k$(to, this_0.removeAt_6niowx_k$(from));
    var reorderedList = toList(this_0);
    var newList = this.updateCourseBlocksOnReorderOrCommitUseCase_1.invoke_w5qiew_k$(reorderedList, to);
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onCourseBlockMoved$slambda_0(this, newList, null));
  };
  protoOf(ClazzEditViewModel).onClickTimezone_3hglki_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_250().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$(), 'timeZone'), to(Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$(), this.get_destinationName_akz2s0_k$())]));
  };
  protoOf(ClazzEditViewModel).onClickHolidayCalendar_khljr7_k$ = function () {
  };
  protoOf(ClazzEditViewModel).onClickTerminology_3dnl8a_k$ = function () {
    this.navigateForResult$default_qg960j_k$(Companion_getInstance_217().get_DEST_NAME_gmgk7z_k$(), 'terminology', null, Companion_getInstance_44().serializer_9w0wvi_k$());
  };
  protoOf(ClazzEditViewModel).onClickHideBlockPopupMenu_fhkxin_k$ = function (block) {
    updateCourseBlock(this, block.copy$default_8ye1e3_k$(block.get_courseBlock_c2ojbd_k$().copy$default_rhvmtp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true)));
  };
  protoOf(ClazzEditViewModel).onClickUnHideBlockPopupMenu_z437jc_k$ = function (block) {
    updateCourseBlock(this, block.copy$default_8ye1e3_k$(block.get_courseBlock_c2ojbd_k$().copy$default_rhvmtp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false)));
  };
  protoOf(ClazzEditViewModel).onClickIndentBlockPopupMenu_j4xqxz_k$ = function (block) {
    updateCourseBlock(this, block.copy$default_8ye1e3_k$(block.get_courseBlock_c2ojbd_k$().copy$default_rhvmtp_k$(VOID, VOID, block.get_courseBlock_c2ojbd_k$().get_cbIndentLevel_ss1m8_k$() + 1 | 0)));
  };
  protoOf(ClazzEditViewModel).onClickUnIndentBlockPopupMenu_hi564y_k$ = function (block) {
    updateCourseBlock(this, block.copy$default_8ye1e3_k$(block.get_courseBlock_c2ojbd_k$().copy$default_rhvmtp_k$(VOID, VOID, block.get_courseBlock_c2ojbd_k$().get_cbIndentLevel_ss1m8_k$() - 1 | 0)));
  };
  protoOf(ClazzEditViewModel).onClickDeleteCourseBlock_ku8t4s_k$ = function (block) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this, block, null));
  };
  protoOf(ClazzEditViewModel).onClickEditCourseBlock_168dqd_k$ = function (block) {
    var tmp0_subject = block.get_courseBlock_c2ojbd_k$().get_cbType_bskq4i_k$();
    if (((tmp0_subject === Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$() ? true : tmp0_subject === Companion_getInstance_19().get_BLOCK_DISCUSSION_TYPE_ghy0om_k$()) ? true : tmp0_subject === Companion_getInstance_19().get_BLOCK_TEXT_TYPE_61wg5t_k$()) ? true : tmp0_subject === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$()) {
      var tmp1_nextViewName = Companion_getInstance_209().get_DEST_NAME_gmgk7z_k$();
      var tmp2_key = 'courseblock';
      var tmp3_serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
      this.navigateForResult$default_qg960j_k$(tmp1_nextViewName, tmp2_key, block, tmp3_serializer);
    } else if (tmp0_subject === Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$()) {
      var tmp4_nextViewName = Companion_getInstance_185().get_DEST_NAME_gmgk7z_k$();
      var tmp5_key = 'courseblock';
      var tmp6_serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>' call
      this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.effectiveClazzUid_1.toString());
      var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().entity_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_terminology_hmih12_k$();
      if (tmp1_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.also' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>.<anonymous>' call
        this_0.put_4fpzoq_k$(Companion_getInstance_185().get_ARG_TERMINOLOGY_f9vilb_k$(), this.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_44().serializer_9w0wvi_k$(), tmp1_safe_receiver));
      }
      var tmp7_args = this_0.build_1k0s4u_k$();
      this.navigateForResult$default_qg960j_k$(tmp4_nextViewName, tmp5_key, block, tmp6_serializer, tmp7_args);
    }
  };
  function _get_$childSerializers__r2zwns_20($this) {
    return $this.$childSerializers_1;
  }
  function CourseBlockUiState(block) {
    this.block_1 = block;
  }
  protoOf(CourseBlockUiState).get_block_ip8l7o_k$ = function () {
    return this.block_1;
  };
  protoOf(CourseBlockUiState).get_showIndent_c20gha_k$ = function () {
    return !(this.block_1.get_courseBlock_c2ojbd_k$().get_cbType_bskq4i_k$() === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$()) ? this.block_1.get_courseBlock_c2ojbd_k$().get_cbIndentLevel_ss1m8_k$() < 3 : false;
  };
  protoOf(CourseBlockUiState).get_showUnindent_egxxcl_k$ = function () {
    return this.block_1.get_courseBlock_c2ojbd_k$().get_cbIndentLevel_ss1m8_k$() > 0;
  };
  protoOf(CourseBlockUiState).get_showHide_xm8bzc_k$ = function () {
    return !this.block_1.get_courseBlock_c2ojbd_k$().get_cbHidden_xysvqq_k$();
  };
  protoOf(CourseBlockUiState).get_showUnhide_6ded33_k$ = function () {
    return this.block_1.get_courseBlock_c2ojbd_k$().get_cbHidden_xysvqq_k$();
  };
  function Companion_108() {
    Companion_instance_108 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_6()), new ArrayListSerializer($serializer_getInstance_5()), null];
    this.BLOCK_MAX_INDENT_1 = 3;
  }
  protoOf(Companion_108).get_BLOCK_MAX_INDENT_gbpkim_k$ = function () {
    return this.BLOCK_MAX_INDENT_1;
  };
  protoOf(Companion_108).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_67();
  };
  var Companion_instance_108;
  function Companion_getInstance_169() {
    if (Companion_instance_108 == null)
      new Companion_108();
    return Companion_instance_108;
  }
  function $serializer_57() {
    $serializer_instance_57 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditUiState', this, 8);
    tmp0_serialDesc.addElement_5pzumi_k$('fieldsEnabled', true);
    tmp0_serialDesc.addElement_5pzumi_k$('entity', true);
    tmp0_serialDesc.addElement_5pzumi_k$('clazzStartDateError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('clazzEndDateError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('clazzNameError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('clazzSchedules', true);
    tmp0_serialDesc.addElement_5pzumi_k$('courseBlockList', true);
    tmp0_serialDesc.addElement_5pzumi_k$('timeZone', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_57).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_57).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_169().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), get_nullable($serializer_getInstance_7()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), tmp0_cached[5], tmp0_cached[6], StringSerializer_getInstance()];
  };
  protoOf($serializer_57).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp13_cached = Companion_getInstance_169().$childSerializers_1;
    if (tmp12_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp12_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, $serializer_getInstance_7(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 1, $serializer_getInstance_7(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.decodeStringElement_3oenpg_k$(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ClazzEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_57).serialize_2gk8sx_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_169().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.fieldsEnabled_1 === false)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 0, value.fieldsEnabled_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.entity_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 1, $serializer_getInstance_7(), value.entity_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.clazzStartDateError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 2, StringSerializer_getInstance(), value.clazzStartDateError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.clazzEndDateError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.clazzEndDateError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.clazzNameError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, StringSerializer_getInstance(), value.clazzNameError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !equals(value.clazzSchedules_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 5, tmp2_cached[5], value.clazzSchedules_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !equals(value.courseBlockList_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 6, tmp2_cached[6], value.courseBlockList_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 7) ? true : !(value.timeZone_1 === 'UTC')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 7, value.timeZone_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_57).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_2gk8sx_k$(encoder, value instanceof ClazzEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_57;
  function $serializer_getInstance_67() {
    if ($serializer_instance_57 == null)
      new $serializer_57();
    return $serializer_instance_57;
  }
  function ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_67().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.fieldsEnabled_1 = false;
    else
      $this.fieldsEnabled_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.entity_1 = null;
    else
      $this.entity_1 = entity;
    if (0 === (seen1 & 4))
      $this.clazzStartDateError_1 = null;
    else
      $this.clazzStartDateError_1 = clazzStartDateError;
    if (0 === (seen1 & 8))
      $this.clazzEndDateError_1 = null;
    else
      $this.clazzEndDateError_1 = clazzEndDateError;
    if (0 === (seen1 & 16))
      $this.clazzNameError_1 = null;
    else
      $this.clazzNameError_1 = clazzNameError;
    if (0 === (seen1 & 32))
      $this.clazzSchedules_1 = emptyList();
    else
      $this.clazzSchedules_1 = clazzSchedules;
    if (0 === (seen1 & 64))
      $this.courseBlockList_1 = emptyList();
    else
      $this.courseBlockList_1 = courseBlockList;
    if (0 === (seen1 & 128))
      $this.timeZone_1 = 'UTC';
    else
      $this.timeZone_1 = timeZone;
    return $this;
  }
  function ClazzEditUiState_init_$Create$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker) {
    return ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, objectCreate(protoOf(ClazzEditUiState)));
  }
  function ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    Companion_getInstance_169();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    entity = entity === VOID ? null : entity;
    clazzStartDateError = clazzStartDateError === VOID ? null : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? null : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? null : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? emptyList() : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.entity_1 = entity;
    this.clazzStartDateError_1 = clazzStartDateError;
    this.clazzEndDateError_1 = clazzEndDateError;
    this.clazzNameError_1 = clazzNameError;
    this.clazzSchedules_1 = clazzSchedules;
    this.courseBlockList_1 = courseBlockList;
    this.timeZone_1 = timeZone;
  }
  protoOf(ClazzEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.entity_1;
  };
  protoOf(ClazzEditUiState).get_clazzStartDateError_ve8hmh_k$ = function () {
    return this.clazzStartDateError_1;
  };
  protoOf(ClazzEditUiState).get_clazzEndDateError_cu07xq_k$ = function () {
    return this.clazzEndDateError_1;
  };
  protoOf(ClazzEditUiState).get_clazzNameError_xvysb2_k$ = function () {
    return this.clazzNameError_1;
  };
  protoOf(ClazzEditUiState).get_clazzSchedules_b7zpzh_k$ = function () {
    return this.clazzSchedules_1;
  };
  protoOf(ClazzEditUiState).get_courseBlockList_rn9gc9_k$ = function () {
    return this.courseBlockList_1;
  };
  protoOf(ClazzEditUiState).get_timeZone_4vh49u_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzEditUiState).get_clazzEditAttendanceChecked_1tnlgb_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.entity_1;
    if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzFeatures_6nf4ac_k$(), Companion_getInstance_14().get_CLAZZ_FEATURE_ATTENDANCE_h2pzj6_k$())) {
      tmp = Companion_getInstance_14().get_CLAZZ_FEATURE_ATTENDANCE_h2pzj6_k$().equals(Companion_getInstance_14().get_CLAZZ_FEATURE_ATTENDANCE_h2pzj6_k$());
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzEditUiState).courseBlockStateFor_axngjk_k$ = function (courseBlockAndEditEntities) {
    return new CourseBlockUiState(courseBlockAndEditEntities);
  };
  protoOf(ClazzEditUiState).component1_7eebsc_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzEditUiState).component2_7eebsb_k$ = function () {
    return this.entity_1;
  };
  protoOf(ClazzEditUiState).component3_7eebsa_k$ = function () {
    return this.clazzStartDateError_1;
  };
  protoOf(ClazzEditUiState).component4_7eebs9_k$ = function () {
    return this.clazzEndDateError_1;
  };
  protoOf(ClazzEditUiState).component5_7eebs8_k$ = function () {
    return this.clazzNameError_1;
  };
  protoOf(ClazzEditUiState).component6_7eebs7_k$ = function () {
    return this.clazzSchedules_1;
  };
  protoOf(ClazzEditUiState).component7_7eebs6_k$ = function () {
    return this.courseBlockList_1;
  };
  protoOf(ClazzEditUiState).component8_7eebs5_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzEditUiState).copy_3j2bom_k$ = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    return new ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).copy$default_gvqr5s_k$ = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    entity = entity === VOID ? this.entity_1 : entity;
    clazzStartDateError = clazzStartDateError === VOID ? this.clazzStartDateError_1 : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? this.clazzEndDateError_1 : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? this.clazzNameError_1 : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? this.clazzSchedules_1 : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? this.courseBlockList_1 : courseBlockList;
    timeZone = timeZone === VOID ? this.timeZone_1 : timeZone;
    return $super === VOID ? this.copy_3j2bom_k$(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) : $super.copy_3j2bom_k$.call(this, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).toString = function () {
    return 'ClazzEditUiState(fieldsEnabled=' + this.fieldsEnabled_1 + ', entity=' + this.entity_1 + ', clazzStartDateError=' + this.clazzStartDateError_1 + ', clazzEndDateError=' + this.clazzEndDateError_1 + ', clazzNameError=' + this.clazzNameError_1 + ', clazzSchedules=' + this.clazzSchedules_1 + ', courseBlockList=' + this.courseBlockList_1 + ', timeZone=' + this.timeZone_1 + ')';
  };
  protoOf(ClazzEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.fieldsEnabled_1);
    result = imul(result, 31) + (this.entity_1 == null ? 0 : this.entity_1.hashCode()) | 0;
    result = imul(result, 31) + (this.clazzStartDateError_1 == null ? 0 : getStringHashCode(this.clazzStartDateError_1)) | 0;
    result = imul(result, 31) + (this.clazzEndDateError_1 == null ? 0 : getStringHashCode(this.clazzEndDateError_1)) | 0;
    result = imul(result, 31) + (this.clazzNameError_1 == null ? 0 : getStringHashCode(this.clazzNameError_1)) | 0;
    result = imul(result, 31) + hashCode(this.clazzSchedules_1) | 0;
    result = imul(result, 31) + hashCode(this.courseBlockList_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.timeZone_1) | 0;
    return result;
  };
  protoOf(ClazzEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEditUiState ? other : THROW_CCE();
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!equals(this.entity_1, tmp0_other_with_cast.entity_1))
      return false;
    if (!(this.clazzStartDateError_1 == tmp0_other_with_cast.clazzStartDateError_1))
      return false;
    if (!(this.clazzEndDateError_1 == tmp0_other_with_cast.clazzEndDateError_1))
      return false;
    if (!(this.clazzNameError_1 == tmp0_other_with_cast.clazzNameError_1))
      return false;
    if (!equals(this.clazzSchedules_1, tmp0_other_with_cast.clazzSchedules_1))
      return false;
    if (!equals(this.courseBlockList_1, tmp0_other_with_cast.courseBlockList_1))
      return false;
    if (!(this.timeZone_1 === tmp0_other_with_cast.timeZone_1))
      return false;
    return true;
  };
  function createNewClazzUseCase$factory() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function createNewClazzUseCase$factory_0() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function get_COMPLETABLE_BLOCK_TYPES() {
    _init_properties_BlockStatusExt_kt__pb774u();
    return COMPLETABLE_BLOCK_TYPES;
  }
  var COMPLETABLE_BLOCK_TYPES;
  var properties_initialized_BlockStatusExt_kt_h05ldo;
  function _init_properties_BlockStatusExt_kt__pb774u() {
    if (!properties_initialized_BlockStatusExt_kt_h05ldo) {
      properties_initialized_BlockStatusExt_kt_h05ldo = true;
      COMPLETABLE_BLOCK_TYPES = listOf([Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$(), Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$()]);
    }
  }
  function _get_studentListPagingSource__x4pz5d($this) {
    return $this.studentListPagingSource_1;
  }
  function _get_db__ndbzd9_8($this) {
    return $this.db_1;
  }
  function _get_clazzUid__rrng1f($this) {
    return $this.clazzUid_1;
  }
  function _get_accountPersonUid__rlyzcz($this) {
    return $this.accountPersonUid_1;
  }
  function $loadCOROUTINE$56(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.params_1 = params;
  }
  protoOf($loadCOROUTINE$56).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this._this__u8e3s4__1.registerInvalidationCallbackIfNeeded_8aur2g_k$();
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.studentListPagingSource_1.load_tstxu5_k$(this.params_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.studentListResult0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = this._this__u8e3s4__1.db_1.statementDao_8y5avx_k$();
            var tmp_1 = this.studentListResult0__1;
            var tmp0_safe_receiver = tmp_1 instanceof Page ? tmp_1 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_data_wokkxf_k$();
            var tmp_2;
            if (tmp1_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp1_safe_receiver.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                var tmp0_safe_receiver_0 = element.get_person_i0c866_k$();
                var tmp0_safe_receiver_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_personUid_mmhd76_k$();
                if (tmp0_safe_receiver_1 == null)
                  null;
                else {
                  destination.add_utx5q5_k$(tmp0_safe_receiver_1);
                }
              }
              tmp_2 = destination;
            }

            var tmp2_elvis_lhs = tmp_2;
            suspendResult = tmp_0.findStatusForStudentsInClazz_96xzp1_k$(this._this__u8e3s4__1.clazzUid_1, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs, this._this__u8e3s4__1.accountPersonUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var blockResults = suspendResult;
            var tmp3_subject = this.studentListResult0__1;
            var tmp_3;
            if (tmp3_subject instanceof Page) {
              var tmp_4 = this.studentListResult0__1;
              var studentListResultCasted = tmp_4 instanceof Page ? tmp_4 : THROW_CCE();
              var this_0 = studentListResultCasted.get_data_wokkxf_k$();
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
              var tmp0_iterator_0 = this_0.iterator_jk1svi_k$();
              while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                var item = tmp0_iterator_0.next_20eer_k$();
                var destination_1 = ArrayList_init_$Create$();
                var tmp0_iterator_1 = blockResults.iterator_jk1svi_k$();
                while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
                  var element_0 = tmp0_iterator_1.next_20eer_k$();
                  var tmp_5 = element_0.get_sPersonUid_8hhlw1_k$();
                  var tmp0_safe_receiver_2 = item.get_person_i0c866_k$();
                  if (tmp_5.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_personUid_mmhd76_k$())) {
                    destination_1.add_utx5q5_k$(element_0);
                  }
                }
                destination_0.add_utx5q5_k$(new StudentAndBlockStatuses(item, destination_1));
              }
              tmp_3 = new Page(destination_0, studentListResultCasted.get_prevKey_3zwgxp_k$(), studentListResultCasted.get_nextKey_vt8qrn_k$(), studentListResultCasted.get_itemsBefore_6fgn4a_k$(), studentListResultCasted.get_itemsAfter_r9uxl1_k$());
            } else {
              if (tmp3_subject instanceof Error_0) {
                tmp_3 = new Error_0(this.studentListResult0__1.get_throwable_c93gq1_k$());
              } else {
                if (tmp3_subject instanceof Invalid) {
                  tmp_3 = new Invalid();
                } else {
                  throw IllegalStateException_init_$Create$("Cant get here really, but compiler doesn't know that");
                }
              }
            }

            var tmp_6 = tmp_3;
            return tmp_6 instanceof LoadResult ? tmp_6 : THROW_CCE();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $loadHttpCOROUTINE$57(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.params_1 = params;
  }
  protoOf($loadHttpCOROUTINE$57).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var tmp_1 = this._this__u8e3s4__1.studentListPagingSource_1;
            tmp_0.tmp0_safe_receiver0__1 = isInterface(tmp_1, PagingSourceWithHttpLoader) ? tmp_1 : null;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.loadHttp_c9kyrx_k$(this.params_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var tmp1_elvis_lhs = this.WHEN_RESULT1__1;
            return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzGradebookPagingSource(studentListPagingSource, db, clazzUid, accountPersonUid) {
    DelegatedInvalidationPagingSource.call(this, studentListPagingSource);
    this.studentListPagingSource_1 = studentListPagingSource;
    this.db_1 = db;
    this.clazzUid_1 = clazzUid;
    this.accountPersonUid_1 = accountPersonUid;
  }
  protoOf(ClazzGradebookPagingSource).getRefreshKey_i6psxl_k$ = function (state) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = state.get_pages_iwqisb_k$();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.ClazzGradebookPagingSource.getRefreshKey.<anonymous>' call
      // Inline function 'kotlin.collections.map' call
      var this_1 = item.get_data_wokkxf_k$();
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
      var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var item_0 = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.ClazzGradebookPagingSource.getRefreshKey.<anonymous>.<anonymous>' call
        var tmp$ret$0 = item_0.get_student_tt8o8e_k$();
        destination_0.add_utx5q5_k$(tmp$ret$0);
      }
      var tmp$ret$3 = Page_init_$Create$(destination_0, item.get_prevKey_3zwgxp_k$(), item.get_nextKey_vt8qrn_k$());
      destination.add_utx5q5_k$(tmp$ret$3);
    }
    return this.studentListPagingSource_1.getRefreshKey_3flma8_k$(new PagingState(destination, state.get_anchorPosition_9otczr_k$(), state.get_config_c0698r_k$(), 0));
  };
  protoOf(ClazzGradebookPagingSource).getRefreshKey_3flma8_k$ = function (state) {
    return this.getRefreshKey_i6psxl_k$(state);
  };
  protoOf(ClazzGradebookPagingSource).load_z54ba3_k$ = function (params, $completion) {
    var tmp = new $loadCOROUTINE$56(this, params, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookPagingSource).load_tstxu5_k$ = function (params, $completion) {
    return this.load_z54ba3_k$(params, $completion);
  };
  protoOf(ClazzGradebookPagingSource).loadHttp_2m23i6_k$ = function (params, $completion) {
    var tmp = new $loadHttpCOROUTINE$57(this, params, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookPagingSource).loadHttp_c9kyrx_k$ = function (params, $completion) {
    return this.loadHttp_2m23i6_k$(params, $completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).invoke_kmsjgi_k$ = function (courseBlockList, $completion) {
    var tmp = this.create_c3ybna_k$(courseBlockList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_kmsjgi_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_lpfa9q_k$(this.courseBlockList_1, this.this$0__1.studentPagingSource_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).create_c3ybna_k$ = function (courseBlockList, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.courseBlockList_1 = courseBlockList;
    return i;
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_c3ybna_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.invoke_kmsjgi_k$(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).invoke_sndfju_k$ = function (it, $completion) {
    var tmp = this.create_56vlru_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_sndfju_k$((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).create_56vlru_k$ = function (it, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_56vlru_k$((value == null ? true : typeof value === 'string') ? value : THROW_CCE(), completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_sndfju_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$().findByClazzUidAsFlow_dhqahm_k$(this.this$0__1.clazzUid_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().getClazzNameAsFlow_86n6vz_k$(this.this$0__1.clazzUid_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_2(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzGradebookViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, completion);
  };
  function ClazzGradebookViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_clazzUid__rrng1f_0($this) {
    return $this.clazzUid_1;
  }
  function _get_studentPagingSource__nonygf($this) {
    return $this.studentPagingSource_1;
  }
  function Companion_109() {
    Companion_instance_109 = this;
    this.DEST_NAME_1 = 'Gradebook';
  }
  protoOf(Companion_109).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_109;
  function Companion_getInstance_170() {
    if (Companion_instance_109 == null)
      new Companion_109();
    return Companion_instance_109;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_10(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_10).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzGradebookViewModel$studentPagingSource$lambda(this$0) {
    return function () {
      return new ClazzGradebookPagingSource(this$0.get_activeRepoWithFallback_3qnek7_k$().clazzEnrolmentDao_8oyet6_k$().findByClazzUidAndRoleForGradebook_5rskr1_k$(this$0.clazzUid_1, Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_FIRST_NAME_ASC_uiz2kk_k$(), '%', 0, this$0.get_activeUserPersonUid_1nlgnz_k$(), systemTimeInMillis()), this$0.get_activeDb_bu92wd_k$(), this$0.clazzUid_1, this$0.get_activeUserPersonUid_1nlgnz_k$());
    };
  }
  function ClazzGradebookViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzGradebookViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ClazzGradebookViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzGradebookViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzGradebookViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel(di, savedStateHandle) {
    Companion_getInstance_170();
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzGradebookUiState(), 'Gradebook');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.clazzUid_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.studentPagingSource_1 = ClazzGradebookViewModel$studentPagingSource$lambda(this);
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, ClazzGradebookViewModel$slambda_0(this, null));
  }
  protoOf(ClazzGradebookViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  protoOf(ClazzGradebookViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  protoOf(ClazzGradebookViewModel).onClickFullScreen_uahbg_k$ = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.ClazzGradebookViewModel.onClickFullScreen.<anonymous>' call
        var nextValue = prevValue.copy$default_lpfa9q_k$(VOID, VOID, !prevValue.isFullScreen_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var isFullScreen = tmp$ret$1.isFullScreen_1;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.ClazzGradebookViewModel.onClickFullScreen.<anonymous>' call
        var tmp0_navigationVisible = !isFullScreen;
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, tmp0_navigationVisible, isFullScreen, VOID, VOID, VOID, VOID, VOID, isFullScreen);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  };
  protoOf(ClazzGradebookViewModel).onClickZoomIn_5s6m27_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.ClazzGradebookViewModel.onClickZoomIn.<anonymous>' call
        var nextValue = prevValue.copy$default_lpfa9q_k$(VOID, VOID, VOID, prevValue.get_canIncreaseScale_nkz11b_k$() ? prevValue.scale_1 + 0.25 : prevValue.scale_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzGradebookViewModel).onClickZoomOut_szeef6_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.ClazzGradebookViewModel.onClickZoomOut.<anonymous>' call
        var nextValue = prevValue.copy$default_lpfa9q_k$(VOID, VOID, VOID, prevValue.get_canDecreaseScale_ij80rf_k$() ? prevValue.scale_1 - 0.25 : prevValue.scale_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function ClazzGradebookUiState$_init_$lambda_aseg4q() {
    return new EmptyPagingSource();
  }
  function ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale) {
    courseBlocks = courseBlocks === VOID ? emptyList() : courseBlocks;
    var tmp;
    if (results === VOID) {
      tmp = ClazzGradebookUiState$_init_$lambda_aseg4q;
    } else {
      tmp = results;
    }
    results = tmp;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    scale = scale === VOID ? 1.0 : scale;
    this.courseBlocks_1 = courseBlocks;
    this.results_1 = results;
    this.isFullScreen_1 = isFullScreen;
    this.scale_1 = scale;
  }
  protoOf(ClazzGradebookUiState).get_courseBlocks_j5kczu_k$ = function () {
    return this.courseBlocks_1;
  };
  protoOf(ClazzGradebookUiState).get_results_jf06j1_k$ = function () {
    return this.results_1;
  };
  protoOf(ClazzGradebookUiState).get_isFullScreen_r4dejy_k$ = function () {
    return this.isFullScreen_1;
  };
  protoOf(ClazzGradebookUiState).get_scale_iyf28x_k$ = function () {
    return this.scale_1;
  };
  protoOf(ClazzGradebookUiState).get_canDecreaseScale_ij80rf_k$ = function () {
    return this.scale_1 > 0.25;
  };
  protoOf(ClazzGradebookUiState).get_canIncreaseScale_nkz11b_k$ = function () {
    return this.scale_1 < 1.0;
  };
  protoOf(ClazzGradebookUiState).component1_7eebsc_k$ = function () {
    return this.courseBlocks_1;
  };
  protoOf(ClazzGradebookUiState).component2_7eebsb_k$ = function () {
    return this.results_1;
  };
  protoOf(ClazzGradebookUiState).component3_7eebsa_k$ = function () {
    return this.isFullScreen_1;
  };
  protoOf(ClazzGradebookUiState).component4_7eebs9_k$ = function () {
    return this.scale_1;
  };
  protoOf(ClazzGradebookUiState).copy_yznf8i_k$ = function (courseBlocks, results, isFullScreen, scale) {
    return new ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).copy$default_lpfa9q_k$ = function (courseBlocks, results, isFullScreen, scale, $super) {
    courseBlocks = courseBlocks === VOID ? this.courseBlocks_1 : courseBlocks;
    results = results === VOID ? this.results_1 : results;
    isFullScreen = isFullScreen === VOID ? this.isFullScreen_1 : isFullScreen;
    scale = scale === VOID ? this.scale_1 : scale;
    return $super === VOID ? this.copy_yznf8i_k$(courseBlocks, results, isFullScreen, scale) : $super.copy_yznf8i_k$.call(this, courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).toString = function () {
    return 'ClazzGradebookUiState(courseBlocks=' + this.courseBlocks_1 + ', results=' + this.results_1 + ', isFullScreen=' + this.isFullScreen_1 + ', scale=' + this.scale_1 + ')';
  };
  protoOf(ClazzGradebookUiState).hashCode = function () {
    var result = hashCode(this.courseBlocks_1);
    result = imul(result, 31) + hashCode(this.results_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isFullScreen_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.scale_1) | 0;
    return result;
  };
  protoOf(ClazzGradebookUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzGradebookUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzGradebookUiState ? other : THROW_CCE();
    if (!equals(this.courseBlocks_1, tmp0_other_with_cast.courseBlocks_1))
      return false;
    if (!equals(this.results_1, tmp0_other_with_cast.results_1))
      return false;
    if (!(this.isFullScreen_1 === tmp0_other_with_cast.isFullScreen_1))
      return false;
    if (!equals(this.scale_1, tmp0_other_with_cast.scale_1))
      return false;
    return true;
  };
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).invoke_x0eqdm_k$ = function (inviteAndClazz, $completion) {
    var tmp = this.create_vbolpm_k$(inviteAndClazz, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_x0eqdm_k$((p1 == null ? true : p1 instanceof ClazzInviteAndClazz) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp_0;
              var tmp0_safe_receiver = this.inviteAndClazz_1;
              if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzInvite_h0bqqg_k$()) == null)) {
                tmp_0 = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
              } else {
                tmp_0 = Companion_getInstance_145().get_INDETERMINATE_a8koem_k$();
              }
              var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, tmp_0);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var tmp0_safe_receiver_0 = this.inviteAndClazz_1;
              var nextValue_0 = prevValue_0.copy$default_vgfavf_k$(this.inviteAndClazz_1, !((tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_clazzInvite_h0bqqg_k$()) == null));
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).create_vbolpm_k$ = function (inviteAndClazz, completion) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.inviteAndClazz_1 = inviteAndClazz;
    return i;
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vbolpm_k$((value == null ? true : value instanceof ClazzInviteAndClazz) ? value : THROW_CCE(), completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (inviteAndClazz, $completion) {
      return i.invoke_x0eqdm_k$(inviteAndClazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzInviteDao_k3zs5t_k$().findClazzInviteEntityForInviteTokenAsFlow_gngqiw_k$(this.this$0__1.argInviteCode_1);
            var tmp_1 = ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_11(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzInviteRedeemViewModel$lambda$slambda$slambda(this.this$0__1, completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get__uiState__8e9jsd_6($this) {
    return $this._uiState_1;
  }
  function _get_clazzInviteRedeemUseCase__c3cagh_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.clazzInviteRedeemUseCase$delegate_1;
    clazzInviteRedeemUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_argInviteCode__35xrk5($this) {
    return $this.argInviteCode_1;
  }
  function Companion_110() {
    Companion_instance_110 = this;
    this.DEST_NAME_1 = 'ClazzInviteRedeem';
  }
  protoOf(Companion_110).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_110;
  function Companion_getInstance_171() {
    if (Companion_instance_110 == null)
      new Companion_110();
    return Companion_instance_110;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_11(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_11).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ClazzInviteRedeemViewModel$lambda$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, true);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.get_viewModelScope_ryv1dz_k$();
      launch(tmp, VOID, VOID, ClazzInviteRedeemViewModel$lambda$slambda_0(this$0, null));
      return Unit_getInstance();
    };
  }
  function ClazzInviteRedeemViewModel$processDecision$slambda(this$0, $isAccepting, resultContinuation) {
    this.this$0__1 = this$0;
    this.$isAccepting_1 = $isAccepting;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_vgfavf_k$(VOID, false);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_clazzInviteRedeemUseCase__c3cagh_0(this.this$0__1).invoke_idrooo_k$(this.this$0__1.argInviteCode_1, this.$isAccepting_1, this.this$0__1.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(result.get_message_h23axq_k$()));
            this.this$0__1.get_navController_qibdoq_k$().navigate_6urlkw_k$(Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$(), emptyMap(), new UstadGoOptions(VOID, VOID, true));
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              l$ret$3: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_0 = this_1.get_value_j01efc_k$();
                  var tmp0_errorText = stringResourceOrMessage(e, this.this$0__1.get_systemImpl_9jowp4_k$());
                  var nextValue_0 = prevValue_0.copy$default_vgfavf_k$(VOID, true, tmp0_errorText);
                  if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzInviteRedeemViewModel$processDecision$slambda(this.this$0__1, this.$isAccepting_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzInviteRedeemViewModel$processDecision$slambda_0(this$0, $isAccepting, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$processDecision$slambda(this$0, $isAccepting, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel(di, savedStateHandle) {
    Companion_getInstance_171();
    UstadViewModel.call(this, di, savedStateHandle, 'ClazzInviteRedeem');
    this._uiState_1 = MutableStateFlow(new ClazzInviteRedeemUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ClazzInviteRedeemUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.clazzInviteRedeemUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, clazzInviteRedeemUseCase$factory());
    var tmp_1 = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_INVITE_CODE_853xn3_k$());
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('no invite code');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    tmp_1.argInviteCode_1 = tmp_2;
    var tmp_3 = mapOf_0(to(Companion_getInstance_160().get_ARG_INVITE_CODE_853xn3_k$(), this.argInviteCode_1));
    this.ifLoggedInElseNavigateToLoginWithNextDestSet_j3c0kq_k$(false, tmp_3, ClazzInviteRedeemViewModel$lambda(this));
  }
  protoOf(ClazzInviteRedeemViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzInviteRedeemViewModel).processDecision_5m3i9i_k$ = function (isAccepting) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.get_viewModelScope_ryv1dz_k$();
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.processDecision.<anonymous>' call
    if (this._uiState_1.get_value_j01efc_k$().enabled_1) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, VOID, VOID, ClazzInviteRedeemViewModel$processDecision$slambda_0(this, isAccepting, null));
    }
  };
  function ClazzInviteRedeemUiState(clazzInvite, enabled, errorText) {
    clazzInvite = clazzInvite === VOID ? null : clazzInvite;
    enabled = enabled === VOID ? false : enabled;
    errorText = errorText === VOID ? null : errorText;
    this.clazzInvite_1 = clazzInvite;
    this.enabled_1 = enabled;
    this.errorText_1 = errorText;
  }
  protoOf(ClazzInviteRedeemUiState).get_clazzInvite_h0bqqg_k$ = function () {
    return this.clazzInvite_1;
  };
  protoOf(ClazzInviteRedeemUiState).get_enabled_pcr8o8_k$ = function () {
    return this.enabled_1;
  };
  protoOf(ClazzInviteRedeemUiState).get_errorText_dypup8_k$ = function () {
    return this.errorText_1;
  };
  protoOf(ClazzInviteRedeemUiState).get_showButtons_oazv4r_k$ = function () {
    var tmp0_safe_receiver = this.clazzInvite_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzInvite_h0bqqg_k$();
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_inviteStatus_9aj6p0_k$()) === Companion_getInstance_20().get_STATUS_PENDING_ytco25_k$();
  };
  protoOf(ClazzInviteRedeemUiState).get_buttonsEnabled_edolmx_k$ = function () {
    var tmp;
    if (this.enabled_1) {
      var tmp0_safe_receiver = this.clazzInvite_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzInvite_h0bqqg_k$();
      tmp = (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_inviteStatus_9aj6p0_k$()) === Companion_getInstance_20().get_STATUS_PENDING_ytco25_k$();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzInviteRedeemUiState).get_inviteUsed_cx635_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.clazzInvite_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzInvite_h0bqqg_k$()) == null)) {
      var tmp1_safe_receiver = this.clazzInvite_1.get_clazzInvite_h0bqqg_k$();
      tmp = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_inviteStatus_9aj6p0_k$()) === Companion_getInstance_20().get_STATUS_PENDING_ytco25_k$());
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzInviteRedeemUiState).component1_7eebsc_k$ = function () {
    return this.clazzInvite_1;
  };
  protoOf(ClazzInviteRedeemUiState).component2_7eebsb_k$ = function () {
    return this.enabled_1;
  };
  protoOf(ClazzInviteRedeemUiState).component3_7eebsa_k$ = function () {
    return this.errorText_1;
  };
  protoOf(ClazzInviteRedeemUiState).copy_wonw68_k$ = function (clazzInvite, enabled, errorText) {
    return new ClazzInviteRedeemUiState(clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).copy$default_vgfavf_k$ = function (clazzInvite, enabled, errorText, $super) {
    clazzInvite = clazzInvite === VOID ? this.clazzInvite_1 : clazzInvite;
    enabled = enabled === VOID ? this.enabled_1 : enabled;
    errorText = errorText === VOID ? this.errorText_1 : errorText;
    return $super === VOID ? this.copy_wonw68_k$(clazzInvite, enabled, errorText) : $super.copy_wonw68_k$.call(this, clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).toString = function () {
    return 'ClazzInviteRedeemUiState(clazzInvite=' + this.clazzInvite_1 + ', enabled=' + this.enabled_1 + ', errorText=' + this.errorText_1 + ')';
  };
  protoOf(ClazzInviteRedeemUiState).hashCode = function () {
    var result = this.clazzInvite_1 == null ? 0 : this.clazzInvite_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.enabled_1) | 0;
    result = imul(result, 31) + (this.errorText_1 == null ? 0 : getStringHashCode(this.errorText_1)) | 0;
    return result;
  };
  protoOf(ClazzInviteRedeemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteRedeemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteRedeemUiState ? other : THROW_CCE();
    if (!equals(this.clazzInvite_1, tmp0_other_with_cast.clazzInvite_1))
      return false;
    if (!(this.enabled_1 === tmp0_other_with_cast.enabled_1))
      return false;
    if (!(this.errorText_1 == tmp0_other_with_cast.errorText_1))
      return false;
    return true;
  };
  function clazzInviteRedeemUseCase$factory() {
    return getPropertyCallableRef('clazzInviteRedeemUseCase', 1, KProperty1, function (receiver) {
      return _get_clazzInviteRedeemUseCase__c3cagh_0(receiver);
    }, null);
  }
  function clazzInviteRedeemUseCase$factory_0() {
    return getPropertyCallableRef('clazzInviteRedeemUseCase', 1, KProperty1, function (receiver) {
      return _get_clazzInviteRedeemUseCase__c3cagh_0(receiver);
    }, null);
  }
  function Companion_111() {
    Companion_instance_111 = this;
  }
  protoOf(Companion_111).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_68();
  };
  var Companion_instance_111;
  function Companion_getInstance_172() {
    if (Companion_instance_111 == null)
      new Companion_111();
    return Companion_instance_111;
  }
  function $serializer_58() {
    $serializer_instance_58 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.InviteResult', this, 1);
    tmp0_serialDesc.addElement_5pzumi_k$('inviteSent', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_58).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_58).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_58).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp5_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.decodeStringElement_3oenpg_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.endStructure_1xqz0n_k$(tmp0_desc);
    return InviteResult_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_58).serialize_6p40oq_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 0, value.inviteSent_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_58).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_6p40oq_k$(encoder, value instanceof InviteResult ? value : THROW_CCE());
  };
  var $serializer_instance_58;
  function $serializer_getInstance_68() {
    if ($serializer_instance_58 == null)
      new $serializer_58();
    return $serializer_instance_58;
  }
  function InviteResult_init_$Init$(seen1, inviteSent, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_68().descriptor_1);
    }
    $this.inviteSent_1 = inviteSent;
    return $this;
  }
  function InviteResult_init_$Create$(seen1, inviteSent, serializationConstructorMarker) {
    return InviteResult_init_$Init$(seen1, inviteSent, serializationConstructorMarker, objectCreate(protoOf(InviteResult)));
  }
  function _get_parseInviteUseCase__fcfumo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.parseInviteUseCase$delegate_1;
    parseInviteUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_sendClazzInvitesUseCase__utu0z8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.sendClazzInvitesUseCase$delegate_1;
    sendClazzInvitesUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_clazzUid__rrng1f_1($this) {
    return $this.clazzUid_1;
  }
  function _get_personRole__wlg1hc($this) {
    return $this.personRole_1;
  }
  function _get__uiState__8e9jsd_7($this) {
    return $this._uiState_1;
  }
  function _get_hideKeyboardUseCase__8r7d6l($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hideKeyboardUseCase$delegate_1;
    hideKeyboardUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function sendContactsToServer($this, contacts, $completion) {
    var tmp = new $sendContactsToServerCOROUTINE$58($this, contacts, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function Companion_112() {
    Companion_instance_112 = this;
    this.DEST_NAME_1 = 'invite_via_contact';
    this.ARG_ROLE_1 = 'person_role';
    this.ARG_CLAZZ_UID_1 = 'clazz_uid';
  }
  protoOf(Companion_112).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_112).get_ARG_ROLE_q19ne0_k$ = function () {
    return this.ARG_ROLE_1;
  };
  protoOf(Companion_112).get_ARG_CLAZZ_UID_ov15qh_k$ = function () {
    return this.ARG_CLAZZ_UID_1;
  };
  var Companion_instance_112;
  function Companion_getInstance_173() {
    if (Companion_instance_112 == null)
      new Companion_112();
    return Companion_instance_112;
  }
  function InviteResult(inviteSent) {
    Companion_getInstance_172();
    this.inviteSent_1 = inviteSent;
  }
  protoOf(InviteResult).get_inviteSent_cyq7q_k$ = function () {
    return this.inviteSent_1;
  };
  protoOf(InviteResult).component1_7eebsc_k$ = function () {
    return this.inviteSent_1;
  };
  protoOf(InviteResult).copy_a35qlh_k$ = function (inviteSent) {
    return new InviteResult(inviteSent);
  };
  protoOf(InviteResult).copy$default_pcotiz_k$ = function (inviteSent, $super) {
    inviteSent = inviteSent === VOID ? this.inviteSent_1 : inviteSent;
    return $super === VOID ? this.copy_a35qlh_k$(inviteSent) : $super.copy_a35qlh_k$.call(this, inviteSent);
  };
  protoOf(InviteResult).toString = function () {
    return 'InviteResult(inviteSent=' + this.inviteSent_1 + ')';
  };
  protoOf(InviteResult).hashCode = function () {
    return getStringHashCode(this.inviteSent_1);
  };
  protoOf(InviteResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof InviteResult))
      return false;
    var tmp0_other_with_cast = other instanceof InviteResult ? other : THROW_CCE();
    if (!(this.inviteSent_1 === tmp0_other_with_cast.inviteSent_1))
      return false;
    return true;
  };
  function ClazzInviteViaContactViewModel$onClickSend$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSend_5zeam9_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSend';
    return l;
  }
  function ClazzInviteViaContactViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            var tmp0_safe_receiver = _get_hideKeyboardUseCase__8r7d6l(this.this$0__1);
            if (tmp0_safe_receiver == null)
              null;
            else {
              tmp0_safe_receiver.invoke_7s7wko_k$();
            }

            this.contacts0__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().chips_1;
            if (this.contacts0__1.isEmpty_y1axqb_k$()) {
              this.textField1__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().textFieldValue_1;
              var this_0 = this.textField1__1;
              if (!(this_0 == null ? true : isBlank(this_0))) {
                this.parsedTextValue2__1 = _get_parseInviteUseCase__fcfumo(this.this$0__1).invoke_lt562m_k$(this.textField1__1);
                this.set_state_rjd8d0_k$(4);
                suspendResult = sendContactsToServer(this.this$0__1, this.parsedTextValue2__1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(3);
                continue $sm;
              }
            } else {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = sendContactsToServer(this.this$0__1, this.contacts0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            var noContactFoundMessage = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_no_contact_found_iw838u_k$());
            l$ret$1: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_1.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_mjuj49_k$(noContactFoundMessage);
                if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.this$0__1.onContactError_s9mv7_k$(noContactFoundMessage);
            return Unit_getInstance();
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzInviteViaContactViewModel$onClickSend$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzInviteViaContactViewModel$onClickSend$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteViaContactViewModel$onClickSend$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $sendContactsToServerCOROUTINE$58(_this__u8e3s4, contacts, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.contacts_1 = contacts;
  }
  protoOf($sendContactsToServerCOROUTINE$58).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.contacts_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              if (element.isValid_1) {
                destination.add_utx5q5_k$(element);
              }
            }

            tmp_0.validContacts0__1 = destination;
            if (this.validContacts0__1.isEmpty_y1axqb_k$()) {
              var noValidContactFoundMessage = this._this__u8e3s4__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_no_valid_contact_found_dird1x_k$());
              l$ret$1: do {
                var this_1 = this._this__u8e3s4__1._uiState_1;
                while (true) {
                  var prevValue = this_1.get_value_j01efc_k$();
                  var nextValue = prevValue.copy$default_mjuj49_k$(noValidContactFoundMessage);
                  if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this._this__u8e3s4__1.onContactError_s9mv7_k$(noValidContactFoundMessage);
              return Unit_getInstance();
            }

            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = _get_sendClazzInvitesUseCase__utu0z8(this._this__u8e3s4__1);
            var this_2 = this.validContacts0__1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_0 = this_2.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator_0.next_20eer_k$();
              destination_0.add_utx5q5_k$(item.text_1);
            }

            suspendResult = tmp_1.invoke_nn9z1m_k$(new SendClazzInvitesRequest(destination_0, this._this__u8e3s4__1.clazzUid_1, this._this__u8e3s4__1.personRole_1, this._this__u8e3s4__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_personUid_mmhd76_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this._this__u8e3s4__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this._this__u8e3s4__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invitations_sent_qpuk5i_k$())));
            this._this__u8e3s4__1.get_navController_qibdoq_k$().popBackStack_rnnumt_k$(Companion_getInstance_237().get_DEST_NAME_gmgk7z_k$(), true);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_2 = this.get_exception_x0n6w6_k$();
            if (tmp_2 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_3 = this._this__u8e3s4__1.get_snackDispatcher_ifpff8_k$();
              var tmp_4 = this._this__u8e3s4__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$());
              var tmp0_elvis_lhs = e.message;
              tmp_3.showSnackBar_r6iyg6_k$(new Snack(tmp_4 + ': ' + (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  function ClazzInviteViaContactViewModel(di, savedStateHandle) {
    Companion_getInstance_173();
    UstadViewModel.call(this, di, savedStateHandle, 'invite_via_contact');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ParseInviteUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.parseInviteUseCase$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, parseInviteUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.sendClazzInvitesUseCase$delegate_1 = Instance(this_0, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, sendClazzInvitesUseCase$factory());
    var tmp_3 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$('clazz_uid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_4 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$('person_role');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_4.personRole_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    this._uiState_1 = MutableStateFlow(new ClazzInviteViaContactUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(HideKeyboardUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.hideKeyboardUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, hideKeyboardUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invite_to_course_byriq6_k$()), VOID, true);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.<anonymous>' call
        var tmp_7 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_send_wou8k1_k$());
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, ClazzInviteViaContactViewModel$onClickSend$ref(this)));
        if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzInviteViaContactViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzInviteViaContactViewModel).onClickSend_5zeam9_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzInviteViaContactViewModel$onClickSend$slambda_0(this, null));
  };
  protoOf(ClazzInviteViaContactViewModel).onContactError_s9mv7_k$ = function (error) {
    this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(error));
  };
  protoOf(ClazzInviteViaContactViewModel).onClickChipSubmit_u04snh_k$ = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onClickChipSubmit.<anonymous>' call
        var nextValue = prevValue.copy$default_mjuj49_k$(VOID, plus(prevValue.chips_1, _get_parseInviteUseCase__fcfumo(this).invoke_lt562m_k$(text)));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    return last(tmp$ret$1.chips_1);
  };
  protoOf(ClazzInviteViaContactViewModel).onChipsRemoved_td0k2i_k$ = function (removedChipTexts) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this._uiState_1.get_value_j01efc_k$().chips_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onChipsRemoved.<anonymous>' call
      if (!removedChipTexts.contains_aljjnj_k$(element.text_1)) {
        destination.add_utx5q5_k$(element);
      }
    }
    var newChips = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onChipsRemoved.<anonymous>' call
        var nextValue = prevValue.copy$default_mjuj49_k$(VOID, newChips);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzInviteViaContactViewModel).onTextFieldValueChanged_nexarr_k$ = function (newValue) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onTextFieldValueChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_mjuj49_k$(VOID, VOID, newValue);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzInviteViaContactViewModel).onValueChanged_3tq4s2_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onValueChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_mjuj49_k$(null);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function ClazzInviteViaContactUiState(contactError, chips, textFieldValue) {
    contactError = contactError === VOID ? null : contactError;
    chips = chips === VOID ? emptyList() : chips;
    textFieldValue = textFieldValue === VOID ? null : textFieldValue;
    this.contactError_1 = contactError;
    this.chips_1 = chips;
    this.textFieldValue_1 = textFieldValue;
  }
  protoOf(ClazzInviteViaContactUiState).get_contactError_pa2ryp_k$ = function () {
    return this.contactError_1;
  };
  protoOf(ClazzInviteViaContactUiState).get_chips_ipppq6_k$ = function () {
    return this.chips_1;
  };
  protoOf(ClazzInviteViaContactUiState).get_textFieldValue_tettub_k$ = function () {
    return this.textFieldValue_1;
  };
  protoOf(ClazzInviteViaContactUiState).component1_7eebsc_k$ = function () {
    return this.contactError_1;
  };
  protoOf(ClazzInviteViaContactUiState).component2_7eebsb_k$ = function () {
    return this.chips_1;
  };
  protoOf(ClazzInviteViaContactUiState).component3_7eebsa_k$ = function () {
    return this.textFieldValue_1;
  };
  protoOf(ClazzInviteViaContactUiState).copy_9h89pc_k$ = function (contactError, chips, textFieldValue) {
    return new ClazzInviteViaContactUiState(contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).copy$default_mjuj49_k$ = function (contactError, chips, textFieldValue, $super) {
    contactError = contactError === VOID ? this.contactError_1 : contactError;
    chips = chips === VOID ? this.chips_1 : chips;
    textFieldValue = textFieldValue === VOID ? this.textFieldValue_1 : textFieldValue;
    return $super === VOID ? this.copy_9h89pc_k$(contactError, chips, textFieldValue) : $super.copy_9h89pc_k$.call(this, contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).toString = function () {
    return 'ClazzInviteViaContactUiState(contactError=' + this.contactError_1 + ', chips=' + this.chips_1 + ', textFieldValue=' + this.textFieldValue_1 + ')';
  };
  protoOf(ClazzInviteViaContactUiState).hashCode = function () {
    var result = this.contactError_1 == null ? 0 : getStringHashCode(this.contactError_1);
    result = imul(result, 31) + hashCode(this.chips_1) | 0;
    result = imul(result, 31) + (this.textFieldValue_1 == null ? 0 : getStringHashCode(this.textFieldValue_1)) | 0;
    return result;
  };
  protoOf(ClazzInviteViaContactUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteViaContactUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteViaContactUiState ? other : THROW_CCE();
    if (!(this.contactError_1 == tmp0_other_with_cast.contactError_1))
      return false;
    if (!equals(this.chips_1, tmp0_other_with_cast.chips_1))
      return false;
    if (!(this.textFieldValue_1 == tmp0_other_with_cast.textFieldValue_1))
      return false;
    return true;
  };
  function InviteViaContactChip(text, isValid, inviteType) {
    this.text_1 = text;
    this.isValid_1 = isValid;
    this.inviteType_1 = inviteType;
  }
  protoOf(InviteViaContactChip).get_text_wouvsm_k$ = function () {
    return this.text_1;
  };
  protoOf(InviteViaContactChip).get_isValid_zh4f7b_k$ = function () {
    return this.isValid_1;
  };
  protoOf(InviteViaContactChip).get_inviteType_cxod0_k$ = function () {
    return this.inviteType_1;
  };
  protoOf(InviteViaContactChip).component1_7eebsc_k$ = function () {
    return this.text_1;
  };
  protoOf(InviteViaContactChip).component2_7eebsb_k$ = function () {
    return this.isValid_1;
  };
  protoOf(InviteViaContactChip).component3_7eebsa_k$ = function () {
    return this.inviteType_1;
  };
  protoOf(InviteViaContactChip).copy_3jss94_k$ = function (text, isValid, inviteType) {
    return new InviteViaContactChip(text, isValid, inviteType);
  };
  protoOf(InviteViaContactChip).copy$default_hz08kq_k$ = function (text, isValid, inviteType, $super) {
    text = text === VOID ? this.text_1 : text;
    isValid = isValid === VOID ? this.isValid_1 : isValid;
    inviteType = inviteType === VOID ? this.inviteType_1 : inviteType;
    return $super === VOID ? this.copy_3jss94_k$(text, isValid, inviteType) : $super.copy_3jss94_k$.call(this, text, isValid, inviteType);
  };
  protoOf(InviteViaContactChip).toString = function () {
    return 'InviteViaContactChip(text=' + this.text_1 + ', isValid=' + this.isValid_1 + ', inviteType=' + this.inviteType_1 + ')';
  };
  protoOf(InviteViaContactChip).hashCode = function () {
    var result = getStringHashCode(this.text_1);
    result = imul(result, 31) + getBooleanHashCode(this.isValid_1) | 0;
    result = imul(result, 31) + this.inviteType_1 | 0;
    return result;
  };
  protoOf(InviteViaContactChip).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof InviteViaContactChip))
      return false;
    var tmp0_other_with_cast = other instanceof InviteViaContactChip ? other : THROW_CCE();
    if (!(this.text_1 === tmp0_other_with_cast.text_1))
      return false;
    if (!(this.isValid_1 === tmp0_other_with_cast.isValid_1))
      return false;
    if (!(this.inviteType_1 === tmp0_other_with_cast.inviteType_1))
      return false;
    return true;
  };
  function parseInviteUseCase$factory() {
    return getPropertyCallableRef('parseInviteUseCase', 1, KProperty1, function (receiver) {
      return _get_parseInviteUseCase__fcfumo(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8(receiver);
    }, null);
  }
  function hideKeyboardUseCase$factory() {
    return getPropertyCallableRef('hideKeyboardUseCase', 1, KProperty1, function (receiver) {
      return _get_hideKeyboardUseCase__8r7d6l(receiver);
    }, null);
  }
  function parseInviteUseCase$factory_0() {
    return getPropertyCallableRef('parseInviteUseCase', 1, KProperty1, function (receiver) {
      return _get_parseInviteUseCase__fcfumo(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory_0() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8(receiver);
    }, null);
  }
  function hideKeyboardUseCase$factory_0() {
    return getPropertyCallableRef('hideKeyboardUseCase', 1, KProperty1, function (receiver) {
      return _get_hideKeyboardUseCase__8r7d6l(receiver);
    }, null);
  }
  function _get__uiState__8e9jsd_8($this) {
    return $this._uiState_1;
  }
  function _get_makeLinkUseCase__qbv742($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.makeLinkUseCase$delegate_1;
    makeLinkUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_argInviteCode__35xrk5_0($this) {
    return $this.argInviteCode_1;
  }
  function _get_setClipboardStringUseCase__31i1s1_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.setClipboardStringUseCase$delegate_1;
    setClipboardStringUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_shareTextUseCase__god44g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.shareTextUseCase$delegate_1;
    shareTextUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_inviteLink__eo6820($this) {
    return $this.inviteLink_1;
  }
  function Companion_113() {
    Companion_instance_113 = this;
    this.DEST_NAME_1 = 'InviteWithLink';
  }
  protoOf(Companion_113).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_113;
  function Companion_getInstance_174() {
    if (Companion_instance_113 == null)
      new Companion_113();
    return Companion_instance_113;
  }
  function ClazzInviteViaLinkViewModel(di, savedStateHandle) {
    Companion_getInstance_174();
    UstadViewModel.call(this, di, savedStateHandle, 'InviteWithLink');
    this._uiState_1 = MutableStateFlow(new ClazzInviteViaLinkUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.makeLinkUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, makeLinkUseCase$factory());
    var tmp_1 = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_INVITE_CODE_853xn3_k$());
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('no invite code');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    tmp_1.argInviteCode_1 = tmp_2;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.setClipboardStringUseCase$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, setClipboardStringUseCase$factory_1());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(ShareTextUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.shareTextUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, shareTextUseCase$factory());
    this.inviteLink_1 = _get_makeLinkUseCase__qbv742(this).invoke_owu7o6_k$(Companion_getInstance_175().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_INVITE_CODE_853xn3_k$(), this.argInviteCode_1)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.ClazzInviteViaLinkViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invite_with_link_z9d1y2_k$()));
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.ClazzInviteViaLinkViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy_5ieh9z_k$(this.inviteLink_1, !(_get_shareTextUseCase__god44g(this) == null));
        if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzInviteViaLinkViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzInviteViaLinkViewModel).onClickCopy_enm5si_k$ = function () {
    _get_setClipboardStringUseCase__31i1s1_0(this).invoke_nokysy_k$(this.inviteLink_1);
    this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_copied_to_clipboard_mjx1bw_k$())));
  };
  protoOf(ClazzInviteViaLinkViewModel).onClickShare_pfosii_k$ = function () {
    var tmp0_safe_receiver = _get_shareTextUseCase__god44g(this);
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.invoke_nokysy_k$(this.inviteLink_1);
    }
  };
  function ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton) {
    inviteLink = inviteLink === VOID ? null : inviteLink;
    showShareLinkButton = showShareLinkButton === VOID ? false : showShareLinkButton;
    this.inviteLink_1 = inviteLink;
    this.showShareLinkButton_1 = showShareLinkButton;
  }
  protoOf(ClazzInviteViaLinkUiState).get_inviteLink_d345w_k$ = function () {
    return this.inviteLink_1;
  };
  protoOf(ClazzInviteViaLinkUiState).get_showShareLinkButton_p1yy3f_k$ = function () {
    return this.showShareLinkButton_1;
  };
  protoOf(ClazzInviteViaLinkUiState).component1_7eebsc_k$ = function () {
    return this.inviteLink_1;
  };
  protoOf(ClazzInviteViaLinkUiState).component2_7eebsb_k$ = function () {
    return this.showShareLinkButton_1;
  };
  protoOf(ClazzInviteViaLinkUiState).copy_5ieh9z_k$ = function (inviteLink, showShareLinkButton) {
    return new ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton);
  };
  protoOf(ClazzInviteViaLinkUiState).copy$default_r6oaiz_k$ = function (inviteLink, showShareLinkButton, $super) {
    inviteLink = inviteLink === VOID ? this.inviteLink_1 : inviteLink;
    showShareLinkButton = showShareLinkButton === VOID ? this.showShareLinkButton_1 : showShareLinkButton;
    return $super === VOID ? this.copy_5ieh9z_k$(inviteLink, showShareLinkButton) : $super.copy_5ieh9z_k$.call(this, inviteLink, showShareLinkButton);
  };
  protoOf(ClazzInviteViaLinkUiState).toString = function () {
    return 'ClazzInviteViaLinkUiState(inviteLink=' + this.inviteLink_1 + ', showShareLinkButton=' + this.showShareLinkButton_1 + ')';
  };
  protoOf(ClazzInviteViaLinkUiState).hashCode = function () {
    var result = this.inviteLink_1 == null ? 0 : getStringHashCode(this.inviteLink_1);
    result = imul(result, 31) + getBooleanHashCode(this.showShareLinkButton_1) | 0;
    return result;
  };
  protoOf(ClazzInviteViaLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteViaLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteViaLinkUiState ? other : THROW_CCE();
    if (!(this.inviteLink_1 == tmp0_other_with_cast.inviteLink_1))
      return false;
    if (!(this.showShareLinkButton_1 === tmp0_other_with_cast.showShareLinkButton_1))
      return false;
    return true;
  };
  function makeLinkUseCase$factory() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_1() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function makeLinkUseCase$factory_0() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_2() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory_0() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function _get__uiState__8e9jsd_9($this) {
    return $this._uiState_1;
  }
  function _get_requestEnrolmentUseCase__62wq8f($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.requestEnrolmentUseCase$delegate_1;
    requestEnrolmentUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function Companion_114() {
    Companion_instance_114 = this;
    this.DEST_NAME_1 = 'JoinWithCode';
  }
  protoOf(Companion_114).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_114;
  function Companion_getInstance_175() {
    if (Companion_instance_114 == null)
      new Companion_114();
    return Companion_instance_114;
  }
  function JoinWithCodeViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this$0.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_join_existing_course_wzv2ir_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function JoinWithCodeViewModel$onClickJoin$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onClickJoin.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_91em0m_k$(VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_requestEnrolmentUseCase__62wq8f(this.this$0__1).invoke_wzar5l_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().code_1, this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$(), Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_request_submitted_b6k9eq_k$())));
            if (!(this.this$0__1.get_expectedResultDest_cc1yyo_k$() == null)) {
              this.this$0__1.finishWithResult_jlqwtj_k$(null);
            } else {
              this.this$0__1.get_navController_qibdoq_k$().navigate_6urlkw_k$(Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$(), emptyMap(), new UstadGoOptions(VOID, VOID, true));
            }

            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_1;
              if (e instanceof IllegalArgumentException) {
                tmp_1 = strings_getInstance().get_invalid_invite_code_k16xma_k$();
              } else {
                if (e instanceof AlreadyHasPendingRequestException) {
                  tmp_1 = strings_getInstance().get_request_to_enrol_already_pending_lm7luc_k$();
                } else {
                  if (e instanceof AlreadyEnroledInClassException) {
                    tmp_1 = strings_getInstance().get_you_are_already_in_class_ke0bq1_k$();
                  } else {
                    tmp_1 = strings_getInstance().get_error_iqzvfj_k$();
                  }
                }
              }
              var errorMessage = tmp_1;
              l$ret$1: do {
                var this_0 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_0.get_value_j01efc_k$();
                  var tmp_2 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(errorMessage);
                  var tmp0_safe_receiver = e.message;
                  var tmp_3;
                  if (tmp0_safe_receiver == null) {
                    tmp_3 = null;
                  } else {
                    tmp_3 = ' :' + tmp0_safe_receiver;
                  }
                  var tmp1_elvis_lhs = tmp_3;
                  var nextValue = prevValue.copy$default_91em0m_k$(tmp_2 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs));
                  if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).create_d196fn_k$ = function (completion) {
    return new JoinWithCodeViewModel$onClickJoin$slambda(this.this$0__1, completion);
  };
  function JoinWithCodeViewModel$onClickJoin$slambda_0(this$0, resultContinuation) {
    var i = new JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function JoinWithCodeViewModel(di, savedStateHandle) {
    Companion_getInstance_175();
    UstadViewModel.call(this, di, savedStateHandle, 'JoinWithCode');
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_INVITE_CODE_853xn3_k$());
    tmp._uiState_1 = MutableStateFlow(new JoinWithCodeUiState(VOID, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.requestEnrolmentUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, requestEnrolmentUseCase$factory());
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_1 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>' call
    this.putFromSavedStateIfPresent_891b9h_k$(this_1, Companion_getInstance_160().get_ARG_INVITE_CODE_853xn3_k$());
    var tmp_2 = this_1.build_1k0s4u_k$();
    this.ifLoggedInElseNavigateToLoginWithNextDestSet$default_9n4rd6_k$(VOID, tmp_2, JoinWithCodeViewModel$lambda(this));
  }
  protoOf(JoinWithCodeViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(JoinWithCodeViewModel).onCodeValueChange_3k86az_k$ = function (codeVal) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onCodeValueChange.<anonymous>' call
        var nextValue = prevValue.copy$default_91em0m_k$(null, codeVal);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(JoinWithCodeViewModel).onClickJoin_kcc1cz_k$ = function () {
    var tmp = JoinWithCodeViewModel$onClickJoin$lambda(this);
    this.launchWithLoadingIndicator_qcafqw_k$(tmp, JoinWithCodeViewModel$onClickJoin$slambda_0(this, null));
  };
  function JoinWithCodeUiState(codeError, code, fieldsEnabled) {
    codeError = codeError === VOID ? null : codeError;
    code = code === VOID ? '' : code;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.codeError_1 = codeError;
    this.code_1 = code;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(JoinWithCodeUiState).get_codeError_aisvpq_k$ = function () {
    return this.codeError_1;
  };
  protoOf(JoinWithCodeUiState).get_code_wok7xy_k$ = function () {
    return this.code_1;
  };
  protoOf(JoinWithCodeUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(JoinWithCodeUiState).component1_7eebsc_k$ = function () {
    return this.codeError_1;
  };
  protoOf(JoinWithCodeUiState).component2_7eebsb_k$ = function () {
    return this.code_1;
  };
  protoOf(JoinWithCodeUiState).component3_7eebsa_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(JoinWithCodeUiState).copy_o471zt_k$ = function (codeError, code, fieldsEnabled) {
    return new JoinWithCodeUiState(codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).copy$default_91em0m_k$ = function (codeError, code, fieldsEnabled, $super) {
    codeError = codeError === VOID ? this.codeError_1 : codeError;
    code = code === VOID ? this.code_1 : code;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_o471zt_k$(codeError, code, fieldsEnabled) : $super.copy_o471zt_k$.call(this, codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).toString = function () {
    return 'JoinWithCodeUiState(codeError=' + this.codeError_1 + ', code=' + this.code_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(JoinWithCodeUiState).hashCode = function () {
    var result = this.codeError_1 == null ? 0 : getStringHashCode(this.codeError_1);
    result = imul(result, 31) + getStringHashCode(this.code_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(JoinWithCodeUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof JoinWithCodeUiState))
      return false;
    var tmp0_other_with_cast = other instanceof JoinWithCodeUiState ? other : THROW_CCE();
    if (!(this.codeError_1 == tmp0_other_with_cast.codeError_1))
      return false;
    if (!(this.code_1 === tmp0_other_with_cast.code_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function requestEnrolmentUseCase$factory() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function requestEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda).invoke_f29lti_k$ = function (hasPermission, $completion) {
    var tmp = this.create_vh5neu_k$(hasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_newClazzListOptionVisible = this.hasPermission_1 ? this.this$0__1.get_listMode_9jw63a_k$().equals(ListViewMode_PICKER_getInstance()) : false;
              var nextValue = prevValue.copy$default_fdvbp3_k$(tmp0_newClazzListOptionVisible, VOID, VOID, VOID, VOID, VOID, this.hasPermission_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).create_vh5neu_k$ = function (hasPermission, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.hasPermission_1 = hasPermission;
    return i;
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermission, $completion) {
      return i.invoke_f29lti_k$(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermissionAsFlow_ryvoyl_k$(this.this$0__1.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$(), PermissionFlags_getInstance().get_ADD_COURSE_d9fly6_k$()));
            var tmp_1 = ClazzListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzListViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function ClazzListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).invoke_7t4o6c_k$ = function (it, $completion) {
    var tmp = this.create_z105eo_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_7t4o6c_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_fdvbp3_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).create_z105eo_k$ = function (it, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_z105eo_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_7t4o6c_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda_1).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().enrolmentRequestDao_hchxfd_k$().findRequestsForUserAsFlow_huzxep_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), Companion_getInstance_17().get_STATUS_PENDING_ytco25_k$());
            var tmp_1 = ClazzListViewModel$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzListViewModel$slambda$slambda_1(this.this$0__1, completion);
  };
  function ClazzListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_filterAlreadySelectedList__1ojn3s($this) {
    return $this.filterAlreadySelectedList_1;
  }
  function _get_filterByPermission__2lpn3h($this) {
    return $this.filterByPermission_1;
  }
  function _get_pagingSourceFactory__6w06ky($this) {
    return $this.pagingSourceFactory_1;
  }
  function Companion_115() {
    Companion_instance_115 = this;
    this.DEST_NAME_1 = 'CourseList';
    this.DEST_NAME_HOME_1 = 'CourseListHome';
    this.ALL_DEST_NAMES_1 = listOf(['CourseList', 'CourseListHome']);
    this.ARG_FILTER_EXCLUDE_SELECTED_CLASS_LIST_1 = 'excludeAlreadySelectedClazzList';
  }
  protoOf(Companion_115).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_115).get_DEST_NAME_HOME_lftflt_k$ = function () {
    return this.DEST_NAME_HOME_1;
  };
  protoOf(Companion_115).get_ALL_DEST_NAMES_l2cmjy_k$ = function () {
    return this.ALL_DEST_NAMES_1;
  };
  protoOf(Companion_115).get_ARG_FILTER_EXCLUDE_SELECTED_CLASS_LIST_z1q10v_k$ = function () {
    return this.ARG_FILTER_EXCLUDE_SELECTED_CLASS_LIST_1;
  };
  var Companion_instance_115;
  function Companion_getInstance_176() {
    if (Companion_instance_115 == null)
      new Companion_115();
    return Companion_instance_115;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_12(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_12).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().findClazzesWithPermission_k4ai68_k$(toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$()), this$0.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$(), this$0.filterAlreadySelectedList_1, this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().activeSortOrderOption_1.get_flag_wom2lx_k$(), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedChipId_1, systemTimeInMillis(), this$0.filterByPermission_1);
    };
  }
  function ClazzListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ClazzListViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzListViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ClazzListViewModel$slambda$slambda_2(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzListViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation) {
    this.this$0__1 = this$0;
    this.$enrolmentRequest_1 = $enrolmentRequest;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().enrolmentRequestDao_hchxfd_k$().updateStatus_14sbte_k$(this.$enrolmentRequest_1.get_erUid_iqz9ru_k$(), Companion_getInstance_17().get_STATUS_CANCELED_l1v92b_k$(), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_canceled_enrolment_request_6denpz_k$())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this.this$0__1, this.$enrolmentRequest_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this$0, $enrolmentRequest, resultContinuation) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_176();
    destinationName = destinationName === VOID ? 'CourseList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$('excludeAlreadySelectedClazzList');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, [',']);
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.add_utx5q5_k$(element);
        }
      }
      tmp_0 = destination;
    }
    var tmp2_safe_receiver = tmp_0;
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.add_utx5q5_k$(tmp$ret$5);
      }
      tmp_1 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_2 = emptyList();
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    tmp.filterAlreadySelectedList_1 = tmp_2;
    var tmp_3 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_FILTER_BY_PERMISSION_hsjuse_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_3.filterByPermission_1 = tmp1_elvis_lhs == null ? PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$() : tmp1_elvis_lhs;
    var tmp_4 = this;
    tmp_4.pagingSourceFactory_1 = ClazzListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        var tmp0_searchState = this.createSearchEnabledState$default_7v3uai_k$();
        var tmp1_title = this.listTitle_mhmhkq_k$(strings_getInstance().get_courses_h3w43z_k$(), strings_getInstance().get_courses_h3w43z_k$());
        var tmp2_fabState = this.createFabState$default_wd281f_k$(!this.get_activeUserPersonUid_1nlgnz_k$().equals(new Long(0, 0)), strings_getInstance().get_course_c0azac_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element_0 = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$11 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(get_dayStringResource(element_0));
          result.put_4fpzoq_k$(element_0, tmp$ret$11);
        }
        var tmp1_clazzList = this.pagingSourceFactory_1;
        var nextValue_0 = prevValue_0.copy$default_fdvbp3_k$(VOID, tmp1_clazzList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_5 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_5, VOID, VOID, ClazzListViewModel$slambda_0(this, null));
    var tmp_6 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_6, VOID, VOID, ClazzListViewModel$slambda_2(this, null));
  }
  protoOf(ClazzListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).onClickAdd_cbqifs_k$ = function () {
    this.navigateToCreateNew$default_bv6w7d_k$(Companion_getInstance_168().get_DEST_NAME_gmgk7z_k$());
  };
  protoOf(ClazzListViewModel).onClickJoinExistingClazz_xwihu2_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_175().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_CODE_TABLE_eia99u_k$(), Companion_getInstance_14().get_TABLE_ID_xo2mej_k$().toString())));
  };
  protoOf(ClazzListViewModel).onClickEntry_mpixja_k$ = function (entry) {
    this.navigateOnItemClicked$default_l754h1_k$(Companion_getInstance_165().get_DEST_NAME_gmgk7z_k$(), entry.get_clazzUid_k8pnbz_k$(), entry);
  };
  protoOf(ClazzListViewModel).onSortOrderChanged_cgn689_k$ = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_fdvbp3_k$(VOID, VOID, VOID, sortOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).onClickFilterChip_r5dzw9_k$ = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.copy$default_fdvbp3_k$(VOID, VOID, VOID, VOID, VOID, filterOption.get_value_j01efc_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).onClickCancelEnrolmentRequest_wr2d8y_k$ = function (enrolmentRequest) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this, enrolmentRequest, null));
  };
  function Companion_116() {
    Companion_instance_116 = this;
    this.DEFAULT_SORT_OTIONS_1 = listOf([new SortOrderOption(strings_getInstance().get_name_key_1cwo7g_k$(), ClazzDaoCommon_getInstance().get_SORT_CLAZZNAME_ASC_mih9j7_k$(), true), new SortOrderOption(strings_getInstance().get_name_key_1cwo7g_k$(), ClazzDaoCommon_getInstance().get_SORT_CLAZZNAME_DESC_ceaz8l_k$(), false), new SortOrderOption(strings_getInstance().get_attendance_b7eliq_k$(), ClazzDaoCommon_getInstance().get_SORT_ATTENDANCE_ASC_bs29ub_k$(), true), new SortOrderOption(strings_getInstance().get_attendance_b7eliq_k$(), ClazzDaoCommon_getInstance().get_SORT_ATTENDANCE_DESC_a0fu8f_k$(), false)]);
  }
  protoOf(Companion_116).get_DEFAULT_SORT_OTIONS_3i2tpy_k$ = function () {
    return this.DEFAULT_SORT_OTIONS_1;
  };
  var Companion_instance_116;
  function Companion_getInstance_177() {
    if (Companion_instance_116 == null)
      new Companion_116();
    return Companion_instance_116;
  }
  function ClazzListUiState$_init_$lambda_r0y0x0() {
    return new EmptyPagingSource();
  }
  function ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    Companion_getInstance_177();
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? true : newClazzListOptionVisible;
    var tmp;
    if (clazzList === VOID) {
      tmp = ClazzListUiState$_init_$lambda_r0y0x0;
    } else {
      tmp = clazzList;
    }
    clazzList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_177().DEFAULT_SORT_OTIONS_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? ClazzDaoCommon_getInstance().get_FILTER_CURRENTLY_ENROLLED_wepg78_k$() : selectedChipId;
    canAddNewCourse = canAddNewCourse === VOID ? false : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? emptyList() : pendingEnrolments;
    filterOptions = filterOptions === VOID ? listOf([new MessageIdOption2(strings_getInstance().get_currently_enrolled_sbmaft_k$(), ClazzDaoCommon_getInstance().get_FILTER_CURRENTLY_ENROLLED_wepg78_k$()), new MessageIdOption2(strings_getInstance().get_all_18j9hk_k$(), 0)]) : filterOptions;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    this.newClazzListOptionVisible_1 = newClazzListOptionVisible;
    this.clazzList_1 = clazzList;
    this.sortOptions_1 = sortOptions;
    this.activeSortOrderOption_1 = activeSortOrderOption;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.selectedChipId_1 = selectedChipId;
    this.canAddNewCourse_1 = canAddNewCourse;
    this.pendingEnrolments_1 = pendingEnrolments;
    this.filterOptions_1 = filterOptions;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
    this.localDateTimeNow_1 = localDateTimeNow;
  }
  protoOf(ClazzListUiState).get_newClazzListOptionVisible_ew7tge_k$ = function () {
    return this.newClazzListOptionVisible_1;
  };
  protoOf(ClazzListUiState).get_clazzList_brro19_k$ = function () {
    return this.clazzList_1;
  };
  protoOf(ClazzListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ClazzListUiState).get_activeSortOrderOption_750yy_k$ = function () {
    return this.activeSortOrderOption_1;
  };
  protoOf(ClazzListUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzListUiState).get_selectedChipId_ens6id_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzListUiState).get_canAddNewCourse_9ojby9_k$ = function () {
    return this.canAddNewCourse_1;
  };
  protoOf(ClazzListUiState).get_pendingEnrolments_hl48rh_k$ = function () {
    return this.pendingEnrolments_1;
  };
  protoOf(ClazzListUiState).get_filterOptions_xfykv7_k$ = function () {
    return this.filterOptions_1;
  };
  protoOf(ClazzListUiState).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ClazzListUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzListUiState).component1_7eebsc_k$ = function () {
    return this.newClazzListOptionVisible_1;
  };
  protoOf(ClazzListUiState).component2_7eebsb_k$ = function () {
    return this.clazzList_1;
  };
  protoOf(ClazzListUiState).component3_7eebsa_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ClazzListUiState).component4_7eebs9_k$ = function () {
    return this.activeSortOrderOption_1;
  };
  protoOf(ClazzListUiState).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzListUiState).component6_7eebs7_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzListUiState).component7_7eebs6_k$ = function () {
    return this.canAddNewCourse_1;
  };
  protoOf(ClazzListUiState).component8_7eebs5_k$ = function () {
    return this.pendingEnrolments_1;
  };
  protoOf(ClazzListUiState).component9_7eebs4_k$ = function () {
    return this.filterOptions_1;
  };
  protoOf(ClazzListUiState).component10_gazzfo_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ClazzListUiState).component11_gazzfn_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzListUiState).copy_vl2ucc_k$ = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    return new ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).copy$default_fdvbp3_k$ = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow, $super) {
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? this.newClazzListOptionVisible_1 : newClazzListOptionVisible;
    clazzList = clazzList === VOID ? this.clazzList_1 : clazzList;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.activeSortOrderOption_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.selectedChipId_1 : selectedChipId;
    canAddNewCourse = canAddNewCourse === VOID ? this.canAddNewCourse_1 : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? this.pendingEnrolments_1 : pendingEnrolments;
    filterOptions = filterOptions === VOID ? this.filterOptions_1 : filterOptions;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    return $super === VOID ? this.copy_vl2ucc_k$(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) : $super.copy_vl2ucc_k$.call(this, newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).toString = function () {
    return 'ClazzListUiState(newClazzListOptionVisible=' + this.newClazzListOptionVisible_1 + ', clazzList=' + this.clazzList_1 + ', sortOptions=' + this.sortOptions_1 + ', activeSortOrderOption=' + this.activeSortOrderOption_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', selectedChipId=' + this.selectedChipId_1 + ', canAddNewCourse=' + this.canAddNewCourse_1 + ', pendingEnrolments=' + this.pendingEnrolments_1 + ', filterOptions=' + this.filterOptions_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ')';
  };
  protoOf(ClazzListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.newClazzListOptionVisible_1);
    result = imul(result, 31) + hashCode(this.clazzList_1) | 0;
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.activeSortOrderOption_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + this.selectedChipId_1 | 0;
    result = imul(result, 31) + getBooleanHashCode(this.canAddNewCourse_1) | 0;
    result = imul(result, 31) + hashCode(this.pendingEnrolments_1) | 0;
    result = imul(result, 31) + hashCode(this.filterOptions_1) | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    return result;
  };
  protoOf(ClazzListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzListUiState ? other : THROW_CCE();
    if (!(this.newClazzListOptionVisible_1 === tmp0_other_with_cast.newClazzListOptionVisible_1))
      return false;
    if (!equals(this.clazzList_1, tmp0_other_with_cast.clazzList_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.activeSortOrderOption_1.equals(tmp0_other_with_cast.activeSortOrderOption_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.selectedChipId_1 === tmp0_other_with_cast.selectedChipId_1))
      return false;
    if (!(this.canAddNewCourse_1 === tmp0_other_with_cast.canAddNewCourse_1))
      return false;
    if (!equals(this.pendingEnrolments_1, tmp0_other_with_cast.pendingEnrolments_1))
      return false;
    if (!equals(this.filterOptions_1, tmp0_other_with_cast.filterOptions_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    return true;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).invoke_fpk99_k$ = function (entity, permissions, $completion) {
    var tmp = this.create_76uezs_k$(entity, permissions, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CoursePermission) ? p1 : THROW_CCE();
    return this.invoke_fpk99_k$(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.entity_1;
          var tmp_0;
          if (this.permissions_1.get_firstPermission_y8246u_k$()) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return new Pair(tmp_0, this.permissions_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).create_76uezs_k$ = function (entity, permissions, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.entity_1 = entity;
    i.permissions_1 = permissions;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.invoke_fpk99_k$(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_9xztmz_k$ = function (it, $completion) {
    var tmp = this.create_8mfi4v_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9xztmz_k$(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.tmp0_container0__1 = this.it_1;
            this.entity1__1 = this.tmp0_container0__1.component1_7eebsc_k$();
            this.permissionPair2__1 = this.tmp0_container0__1.component2_7eebsb_k$();
            this.tmp1_container3__1 = this.permissionPair2__1;
            this.hasEditPermission4__1 = this.tmp1_container3__1.component2_7eebsb_k$();
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_0;
                if (!(this.entity1__1 == null)) {
                  tmp_0 = CoursePermissionConstants_getInstance().get_COURSE_PERMISSIONS_LABELS_i2xsjv_k$();
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.copy_c3xerg_k$(this.entity1__1, tmp_0);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(prevValue_0.get_fabState_obl84t_k$().copy$default_kse1yx_k$(this.hasEditPermission4__1));
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.entity1__1 == null)) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = getTitleForCoursePermission(this.this$0__1, this.entity1__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$5: do {
              var this_2 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_1 = this_2.get_value_j01efc_k$();
                var nextValue_1 = prevValue_1.copy$default_9ltzmx_k$(VOID, VOID, title);
                if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).create_8mfi4v_k$ = function (it, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8mfi4v_k$(value instanceof Pair ? value : THROW_CCE(), completion);
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_9xztmz_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.$entityFlow_1 = $entityFlow;
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(combine(this.$entityFlow_1, this.$permissionFlow_1, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            suspendResult = collectLatest(tmp_0, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda(this.$entityFlow_1, this.$permissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.$entityFlow_1 = $entityFlow;
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, CoursePermissionDetailViewModel$slambda$slambda$slambda_0(this.$entityFlow_1, this.$permissionFlow_1, this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new CoursePermissionDetailViewModel$slambda$slambda(this.$this_launch_1, this.$entityFlow_1, this.$permissionFlow_1, this.this$0__1, completion);
  };
  function CoursePermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get__uiState__8e9jsd_10($this) {
    return $this._uiState_1;
  }
  function _get_clazzUid__rrng1f_2($this) {
    return $this.clazzUid_1;
  }
  function onClickEdit_0($this) {
    var tmp = $this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_179().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.onClickEdit.<anonymous>' call
    var tmp_1 = Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$();
    var tmp0_safe_receiver = $this._uiState_1.get_value_j01efc_k$().coursePermission_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cpUid_ipuem2_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this_0.put_4fpzoq_k$(tmp_1, tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs);
    $this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  }
  function Companion_117() {
    Companion_instance_117 = this;
    this.DEST_NAME_1 = 'CoursePermissionDetail';
  }
  protoOf(Companion_117).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_117;
  function Companion_getInstance_178() {
    if (Companion_instance_117 == null)
      new Companion_117();
    return Companion_instance_117;
  }
  function CoursePermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_0($boundThis);
      return Unit_getInstance();
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entityFlow_1 = $entityFlow;
    this.$permissionFlow_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, CoursePermissionDetailViewModel$slambda$slambda_0(this.$this$launch_1, this.$entityFlow_1, this.$permissionFlow_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda(this.this$0__1, this.$entityFlow_1, this.$permissionFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CoursePermissionDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CoursePermissionDetailViewModel$slambda_0(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_178();
    DetailViewModel.call(this, di, savedStateHandle, 'CoursePermissionDetail');
    this._uiState_1 = MutableStateFlow(new CoursePermissionDetailUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var entityFlow = this.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().findByUidAndClazzUidAsFlow_nrf1o1_k$(this.get_entityUidArg_hgo6pe_k$(), this.clazzUid_1);
    var permissionFlow = this.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzPairAsFlow_gv7o5k_k$(this.get_activeUserPersonUid_1nlgnz_k$(), this.clazzUid_1, PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$(), PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.<anonymous>' call
        var tmp_0 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_wol9w3_k$());
        var tmp_1 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.copy$default_9ltzmx_k$(new FabUiState(VOID, tmp_0, tmp_1, CoursePermissionDetailViewModel$onClickEdit$ref(this)));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, CoursePermissionDetailViewModel$slambda_0(this, entityFlow, permissionFlow, null));
  }
  protoOf(CoursePermissionDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function CoursePermissionDetailUiState(coursePermission, permissionLabels) {
    coursePermission = coursePermission === VOID ? null : coursePermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.coursePermission_1 = coursePermission;
    this.permissionLabels_1 = permissionLabels;
  }
  protoOf(CoursePermissionDetailUiState).get_coursePermission_y7ay25_k$ = function () {
    return this.coursePermission_1;
  };
  protoOf(CoursePermissionDetailUiState).get_permissionLabels_z06ky1_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(CoursePermissionDetailUiState).component1_7eebsc_k$ = function () {
    return this.coursePermission_1;
  };
  protoOf(CoursePermissionDetailUiState).component2_7eebsb_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(CoursePermissionDetailUiState).copy_c3xerg_k$ = function (coursePermission, permissionLabels) {
    return new CoursePermissionDetailUiState(coursePermission, permissionLabels);
  };
  protoOf(CoursePermissionDetailUiState).copy$default_10jb43_k$ = function (coursePermission, permissionLabels, $super) {
    coursePermission = coursePermission === VOID ? this.coursePermission_1 : coursePermission;
    permissionLabels = permissionLabels === VOID ? this.permissionLabels_1 : permissionLabels;
    return $super === VOID ? this.copy_c3xerg_k$(coursePermission, permissionLabels) : $super.copy_c3xerg_k$.call(this, coursePermission, permissionLabels);
  };
  protoOf(CoursePermissionDetailUiState).toString = function () {
    return 'CoursePermissionDetailUiState(coursePermission=' + this.coursePermission_1 + ', permissionLabels=' + this.permissionLabels_1 + ')';
  };
  protoOf(CoursePermissionDetailUiState).hashCode = function () {
    var result = this.coursePermission_1 == null ? 0 : this.coursePermission_1.hashCode();
    result = imul(result, 31) + hashCode(this.permissionLabels_1) | 0;
    return result;
  };
  protoOf(CoursePermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.coursePermission_1, tmp0_other_with_cast.coursePermission_1))
      return false;
    if (!equals(this.permissionLabels_1, tmp0_other_with_cast.permissionLabels_1))
      return false;
    return true;
  };
  function CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda).invoke_9ardgc_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9ardgc_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.coursePermissionDao_t5l7mw_k$().findByUidAndClazzUid_eeyf7i_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.this$0__1.clazzUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CoursePermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_9ardgc_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).invoke_8pmw9z_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_8pmw9z_k$($completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_16().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            var tmp0_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_0 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp2_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$('grantToRole');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toInt(tmp2_safe_receiver);
            var tmp_1 = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;
            var tmp4_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_PERSON_UID_8uotmw_k$());
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
            return new CoursePermission(ARGUMENT, VOID, tmp_0, tmp_1, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new CoursePermissionEditViewModel$slambda$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
  };
  function CoursePermissionEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.invoke_8pmw9z_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_doivc9_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CoursePermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entity_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().upsertAsync_hy84ux_k$(this.$entity_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$entity_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_11($this) {
    return $this._uiState_1;
  }
  function _get_clazzUid__rrng1f_3($this) {
    return $this.clazzUid_1;
  }
  function Companion_118() {
    Companion_instance_118 = this;
    this.DEST_NAME_1 = 'CoursePermissionEdit';
    this.ARG_GRANT_TO_ROLE_1 = 'grantToRole';
  }
  protoOf(Companion_118).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_118).get_ARG_GRANT_TO_ROLE_1fpu9x_k$ = function () {
    return this.ARG_GRANT_TO_ROLE_1;
  };
  var Companion_instance_118;
  function Companion_getInstance_179() {
    if (Companion_instance_118 == null)
      new Companion_118();
    return Companion_instance_118;
  }
  function CoursePermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda).invoke_pclm39_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.it_1.coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsync2_6hwhkq_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new CoursePermissionEditViewModel$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CoursePermissionEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CoursePermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_pclm39_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_doivc9_k$(VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_16().serializer_9w0wvi_k$();
            var tmp_1 = CoursePermissionEditViewModel$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = CoursePermissionEditViewModel$slambda$slambda_2(this.this$0__1, this.$savedStateHandle_1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, CoursePermissionEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.entity0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = getTitleForCoursePermission(this.this$0__1, this.entity0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, CoursePermissionEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_doivc9_k$(VOID, true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new CoursePermissionEditViewModel$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CoursePermissionEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_doivc9_k$(VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.entity0__1 = tmp_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_2 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.entity0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var popUpToOnFinish = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$());
            if (!(popUpToOnFinish == null)) {
              this.this$0__1.get_navController_qibdoq_k$().popBackStack_rnnumt_k$(popUpToOnFinish, false);
            } else {
              this.this$0__1.finishWithResult$default_p2obzb_k$(Companion_getInstance_178().get_DEST_NAME_gmgk7z_k$(), this.entity0__1.get_cpUid_ipuem2_k$(), this.entity0__1);
            }

            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).create_d196fn_k$ = function (completion) {
    return new CoursePermissionEditViewModel$onClickSave$slambda(this.this$0__1, completion);
  };
  function CoursePermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel(di, savedStateHandle) {
    Companion_getInstance_179();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CoursePermissionEdit');
    this._uiState_1 = MutableStateFlow(new CoursePermissionEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_doivc9_k$(VOID, VOID, CoursePermissionConstants_getInstance().get_COURSE_PERMISSIONS_LABELS_i2xsjv_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, true);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = CoursePermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = CoursePermissionEditViewModel$lambda(this);
    this.launchIfHasPermission$default_l9omam_k$(tmp_0, VOID, tmp_1, CoursePermissionEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(CoursePermissionEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(CoursePermissionEditViewModel).onTogglePermission_snjy04_k$ = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onTogglePermission.<anonymous>' call
        var entityVal = prevValue.entity_1;
        var tmp;
        if (!(entityVal == null)) {
          tmp = prevValue.copy$default_doivc9_k$(entityVal.copy$default_ibykj_k$(VOID, VOID, VOID, VOID, VOID, VOID, toggleFlag(entityVal.get_cpPermissionsFlag_9dskau_k$(), flag)));
        } else {
          tmp = prevValue;
        }
        var nextValue = tmp;
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(CoursePermissionEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp = CoursePermissionEditViewModel$onClickSave$lambda(this);
    this.launchWithLoadingIndicator_qcafqw_k$(tmp, CoursePermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.entity_1 = entity;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.permissionLabels_1 = permissionLabels;
  }
  protoOf(CoursePermissionEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.entity_1;
  };
  protoOf(CoursePermissionEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CoursePermissionEditUiState).get_permissionLabels_z06ky1_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(CoursePermissionEditUiState).component1_7eebsc_k$ = function () {
    return this.entity_1;
  };
  protoOf(CoursePermissionEditUiState).component2_7eebsb_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CoursePermissionEditUiState).component3_7eebsa_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(CoursePermissionEditUiState).copy_63ymox_k$ = function (entity, fieldsEnabled, permissionLabels) {
    return new CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).copy$default_doivc9_k$ = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.entity_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.permissionLabels_1 : permissionLabels;
    return $super === VOID ? this.copy_63ymox_k$(entity, fieldsEnabled, permissionLabels) : $super.copy_63ymox_k$.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).toString = function () {
    return 'CoursePermissionEditUiState(entity=' + this.entity_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', permissionLabels=' + this.permissionLabels_1 + ')';
  };
  protoOf(CoursePermissionEditUiState).hashCode = function () {
    var result = this.entity_1 == null ? 0 : this.entity_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + hashCode(this.permissionLabels_1) | 0;
    return result;
  };
  protoOf(CoursePermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.entity_1, tmp0_other_with_cast.entity_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!equals(this.permissionLabels_1, tmp0_other_with_cast.permissionLabels_1))
      return false;
    return true;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).invoke_tixz4u_k$ = function (it, $completion) {
    var tmp = this.create_syqk0m_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_tixz4u_k$(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_container = this.it_1;
          var hasViewPermission = tmp0_container.component1_7eebsc_k$();
          var hasEditPermission = tmp0_container.component2_7eebsb_k$();
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp1_permissionLabels = CoursePermissionConstants_getInstance().get_COURSE_PERMISSIONS_LABELS_i2xsjv_k$();
              var this_1 = this.this$0__1.pagingSource_1;
              var tmp_0;
              if (hasViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var tmp_1;
              if (tmp0_elvis_lhs == null) {
                tmp_1 = CoursePermissionListViewModel$slambda$slambda$slambda$lambda;
              } else {
                tmp_1 = tmp0_elvis_lhs;
              }
              var tmp2_permissionsList = tmp_1;
              var nextValue = prevValue.copy$default_p0t7tg_k$(tmp2_permissionsList, tmp1_permissionLabels, VOID, hasEditPermission);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_2.get_value_j01efc_k$();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(prevValue_0.get_fabState_obl84t_k$().copy$default_kse1yx_k$(hasEditPermission));
              if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).create_syqk0m_k$ = function (it, completion) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_syqk0m_k$(value instanceof PermissionPair ? value : THROW_CCE(), completion);
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_tixz4u_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzPairAsFlow_gv7o5k_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$(), PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$()));
            var tmp_1 = CoursePermissionListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_13(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new CoursePermissionListViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function CoursePermissionListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_clazzUid__rrng1f_4($this) {
    return $this.clazzUid_1;
  }
  function _get_pagingSource__jffp98($this) {
    return $this.pagingSource_1;
  }
  function Companion_119() {
    Companion_instance_119 = this;
    this.DEST_NAME_1 = 'CoursePermissionList';
    this.RESULT_KEY_PERMISSION_1 = 'permissionResult';
  }
  protoOf(Companion_119).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_119).get_RESULT_KEY_PERMISSION_hso6q0_k$ = function () {
    return this.RESULT_KEY_PERMISSION_1;
  };
  var Companion_instance_119;
  function Companion_getInstance_180() {
    if (Companion_instance_119 == null)
      new Companion_119();
    return Companion_instance_119;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_13(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_13).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function CoursePermissionListViewModel$pagingSource$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().findByClazzUidAsPagingSource_nzywk8_k$(this$0.clazzUid_1, false);
    };
  }
  function CoursePermissionListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.onClickAdd_cbqifs_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CoursePermissionListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, CoursePermissionListViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CoursePermissionListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CoursePermissionListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation) {
    this.this$0__1 = this$0;
    this.$coursePermission_1 = $coursePermission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().setDeleted_fijhxl_k$(this.$coursePermission_1.get_cpUid_ipuem2_k$(), true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this.this$0__1, this.$coursePermission_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this$0, $coursePermission, resultContinuation) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel(di, savedStateHandle) {
    Companion_getInstance_180();
    UstadListViewModel.call(this, di, savedStateHandle, new CoursePermissionListUiState(), 'CoursePermissionList');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.clazzUid_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.pagingSource_1 = CoursePermissionListViewModel$pagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.<anonymous>' call
        var tmp3_title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_permissions_wn6gpn_k$());
        var tmp0_text = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_permissions_wn6gpn_k$());
        var tmp1_icon = FabIcon_ADD_getInstance();
        var tmp2_onClick = CoursePermissionListViewModel$onClickAdd$ref(this);
        var tmp4_fabState = new FabUiState(false, tmp0_text, tmp1_icon, tmp2_onClick);
        var nextValue = prevValue.copy$default_9ltzmx_k$(tmp4_fabState, VOID, tmp3_title);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, CoursePermissionListViewModel$slambda_0(this, null));
  }
  protoOf(CoursePermissionListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  protoOf(CoursePermissionListViewModel).onClickAdd_cbqifs_k$ = function () {
    var goToOnPersonSelectedArg = appendQueryArgs(Companion_getInstance_179().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString()), to(Companion_getInstance_156().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$(), this.get_destinationName_akz2s0_k$())]));
    var tmp = Companion_getInstance_237().get_DEST_NAME_gmgk7z_k$();
    var tmp_0 = Companion_getInstance_16().serializer_9w0wvi_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickAdd.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_LISTMODE_1jy3rh_k$(), ListViewMode_PICKER_getInstance().get_mode_woqlt8_k$());
    this_0.put_4fpzoq_k$(PersonViewModelConstants_getInstance().get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$(), goToOnPersonSelectedArg);
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    this.navigateForResult$default_qg960j_k$(tmp, 'permissionResult', null, tmp_0, tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).onClickEntry_4l15sm_k$ = function (coursePermission) {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_178().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickEntry.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), coursePermission.get_cpUid_ipuem2_k$().toString());
    this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).onClickDeleteEntry_qv18ht_k$ = function (coursePermission) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this, coursePermission, null));
  };
  function CoursePermissionListUiState$_init_$lambda_czupre() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    var tmp;
    if (permissionsList === VOID) {
      tmp = CoursePermissionListUiState$_init_$lambda_czupre;
    } else {
      tmp = permissionsList;
    }
    permissionsList = tmp;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? false : showDeleteOption;
    this.permissionsList_1 = permissionsList;
    this.permissionLabels_1 = permissionLabels;
    this.courseTerminology_1 = courseTerminology;
    this.showDeleteOption_1 = showDeleteOption;
  }
  protoOf(CoursePermissionListUiState).get_permissionsList_d7cl09_k$ = function () {
    return this.permissionsList_1;
  };
  protoOf(CoursePermissionListUiState).get_permissionLabels_z06ky1_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(CoursePermissionListUiState).get_courseTerminology_pxom3z_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(CoursePermissionListUiState).get_showDeleteOption_d4v0ka_k$ = function () {
    return this.showDeleteOption_1;
  };
  protoOf(CoursePermissionListUiState).component1_7eebsc_k$ = function () {
    return this.permissionsList_1;
  };
  protoOf(CoursePermissionListUiState).component2_7eebsb_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(CoursePermissionListUiState).component3_7eebsa_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(CoursePermissionListUiState).component4_7eebs9_k$ = function () {
    return this.showDeleteOption_1;
  };
  protoOf(CoursePermissionListUiState).copy_drshqn_k$ = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    return new CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).copy$default_p0t7tg_k$ = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption, $super) {
    permissionsList = permissionsList === VOID ? this.permissionsList_1 : permissionsList;
    permissionLabels = permissionLabels === VOID ? this.permissionLabels_1 : permissionLabels;
    courseTerminology = courseTerminology === VOID ? this.courseTerminology_1 : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? this.showDeleteOption_1 : showDeleteOption;
    return $super === VOID ? this.copy_drshqn_k$(permissionsList, permissionLabels, courseTerminology, showDeleteOption) : $super.copy_drshqn_k$.call(this, permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).toString = function () {
    return 'CoursePermissionListUiState(permissionsList=' + this.permissionsList_1 + ', permissionLabels=' + this.permissionLabels_1 + ', courseTerminology=' + this.courseTerminology_1 + ', showDeleteOption=' + this.showDeleteOption_1 + ')';
  };
  protoOf(CoursePermissionListUiState).hashCode = function () {
    var result = hashCode(this.permissionsList_1);
    result = imul(result, 31) + hashCode(this.permissionLabels_1) | 0;
    result = imul(result, 31) + (this.courseTerminology_1 == null ? 0 : hashCode(this.courseTerminology_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showDeleteOption_1) | 0;
    return result;
  };
  protoOf(CoursePermissionListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionListUiState ? other : THROW_CCE();
    if (!equals(this.permissionsList_1, tmp0_other_with_cast.permissionsList_1))
      return false;
    if (!equals(this.permissionLabels_1, tmp0_other_with_cast.permissionLabels_1))
      return false;
    if (!equals(this.courseTerminology_1, tmp0_other_with_cast.courseTerminology_1))
      return false;
    if (!(this.showDeleteOption_1 === tmp0_other_with_cast.showDeleteOption_1))
      return false;
    return true;
  };
  function asBlobOpenItem(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.get_casaUri_afucon_k$();
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.get_casaMimeType_4l2wpv_k$();
    var tmp_0 = tmp1_elvis_lhs == null ? 'application/octet-stream' : tmp1_elvis_lhs;
    var tmp2_elvis_lhs = _this__u8e3s4.get_casaFileName_ffvt18_k$();
    return new OpenBlobItem(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, toLong(_this__u8e3s4.get_casaSize_vigstm_k$()));
  }
  function submissionStatusFor(markList, submissionList) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!markList.isEmpty_y1axqb_k$()) {
      tmp = Companion_getInstance_12().get_MARKED_vdkqd_k$();
    } else {
      // Inline function 'kotlin.collections.isNotEmpty' call
      if (!submissionList.isEmpty_y1axqb_k$()) {
        tmp = Companion_getInstance_12().get_SUBMITTED_anxgi6_k$();
      } else {
        tmp = Companion_getInstance_12().get_NOT_SUBMITTED_j0kqw6_k$();
      }
    }
    return tmp;
  }
  function latestUniqueMarksByMarker(_this__u8e3s4) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>' call
      // Inline function 'kotlin.collections.maxOf' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = _this__u8e3s4.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var element_0 = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element_0.get_courseAssignmentMark_wrnnge_k$();
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMarkerSubmitterUid_4ixg61_k$();
        var tmp1_safe_receiver = element.get_courseAssignmentMark_wrnnge_k$();
        if (equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_camMarkerSubmitterUid_4ixg61_k$())) {
          destination_0.add_utx5q5_k$(element_0);
        }
      }
      var iterator = destination_0.iterator_jk1svi_k$();
      if (!iterator.hasNext_bitz1p_k$())
        throw NoSuchElementException_init_$Create$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = iterator.next_20eer_k$().get_courseAssignmentMark_wrnnge_k$();
      var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_camLct_bsfyjb_k$();
      var maxValue = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
      while (iterator.hasNext_bitz1p_k$()) {
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver_1 = iterator.next_20eer_k$().get_courseAssignmentMark_wrnnge_k$();
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.get_camLct_bsfyjb_k$();
        var v = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        if (compareTo(maxValue, v) < 0) {
          maxValue = v;
        }
      }
      var mostRecentTsForSubmitterUid = maxValue;
      var tmp0_safe_receiver_2 = element.get_courseAssignmentMark_wrnnge_k$();
      if (equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_camLct_bsfyjb_k$(), mostRecentTsForSubmitterUid)) {
        destination.add_utx5q5_k$(element);
      }
    }
    return destination;
  }
  function hasUpdatedMarks(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      // Inline function 'kotlin.collections.groupingBy' call
      var tmp$ret$0 = new _no_name_provided__qut3iv_5(_this__u8e3s4);
      var this_0 = eachCount(tmp$ret$0);
      if (this_0.isEmpty_y1axqb_k$()) {
        tmp$ret$1 = false;
        break $l$block_0;
      }
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = this_0.get_entries_p20ztl_k$().iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
        if (element.get_value_j01efc_k$() > 1) {
          tmp$ret$1 = true;
          break $l$block_0;
        }
      }
      tmp$ret$1 = false;
    }
    return tmp$ret$1;
  }
  function averageMark(_this__u8e3s4) {
    var latestUnique = latestUniqueMarksByMarker(_this__u8e3s4);
    if (latestUnique.isEmpty_y1axqb_k$())
      return null;
    // Inline function 'kotlin.apply' call
    var this_0 = new AverageCourseAssignmentMark();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>' call
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUnique.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      var tmp = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.get_courseAssignmentMark_wrnnge_k$();
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMark_ac72ab_k$();
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    var tmp$ret$1 = sum;
    this_0.set_averageScore_9emdai_k$(tmp$ret$1 / latestUnique.get_size_woubt6_k$());
    // Inline function 'kotlin.collections.sumOf' call
    var sum_0 = 0.0;
    var tmp0_iterator_0 = latestUnique.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var element_0 = tmp0_iterator_0.next_20eer_k$();
      var tmp_0 = sum_0;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = element_0.get_courseAssignmentMark_wrnnge_k$();
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_camPenalty_ch6xtp_k$();
      var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0;
      sum_0 = tmp_0 + (tmp2_elvis_lhs_0 == null ? 0.0 : tmp2_elvis_lhs_0);
    }
    var tmp$ret$3 = sum_0;
    this_0.set_averagePenalty_87iz7l_k$(roundToInt(tmp$ret$3 / latestUnique.get_size_woubt6_k$()));
    return this_0;
  }
  function _no_name_provided__qut3iv_5($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_5).sourceIterator_2zqxcn_k$ = function () {
    return this.$this_1.iterator_jk1svi_k$();
  };
  protoOf(_no_name_provided__qut3iv_5).keyOf_4kyetf_k$ = function (element) {
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
    var tmp0_safe_receiver = element.get_courseAssignmentMark_wrnnge_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMarkerSubmitterUid_4ixg61_k$();
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  };
  protoOf(_no_name_provided__qut3iv_5).keyOf_d1fr09_k$ = function (element) {
    return this.keyOf_4kyetf_k$(element instanceof CourseAssignmentMarkAndMarkerName ? element : THROW_CCE());
  };
  function combineWithSubmissionFiles(_this__u8e3s4, submissionFiles) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = submissionFiles.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.get_submissionFile_er578x_k$();
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_casaSubmissionUid_1x308f_k$(), item.get_casUid_bsjz9g_k$())) {
          destination_0.add_utx5q5_k$(element);
        }
      }
      var tmp$ret$3 = new SubmissionAndFiles(item, destination_0);
      destination.add_utx5q5_k$(tmp$ret$3);
    }
    return destination;
  }
  function UstadAssignmentSubmissionHeaderUiState(block, assignmentMark, assignmentStatus) {
    block = block === VOID ? null : block;
    assignmentMark = assignmentMark === VOID ? null : assignmentMark;
    assignmentStatus = assignmentStatus === VOID ? null : assignmentStatus;
    this.block_1 = block;
    this.assignmentMark_1 = assignmentMark;
    this.assignmentStatus_1 = assignmentStatus;
  }
  protoOf(UstadAssignmentSubmissionHeaderUiState).get_block_ip8l7o_k$ = function () {
    return this.block_1;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).get_assignmentMark_u2h399_k$ = function () {
    return this.assignmentMark_1;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).get_assignmentStatus_gn1mg8_k$ = function () {
    return this.assignmentStatus_1;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).get_showPoints_8q1xdj_k$ = function () {
    return !(this.assignmentMark_1 == null);
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).get_submissionStatusIconVisible_j31f2_k$ = function () {
    return !(this.assignmentStatus_1 === Companion_getInstance_12().get_NOT_SUBMITTED_j0kqw6_k$());
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).get_latePenaltyVisible_g5zc08_k$ = function () {
    return (this.get_showPoints_8q1xdj_k$() ? !(this.assignmentMark_1 == null) : false) ? !(this.assignmentMark_1.get_averagePenalty_h42i4r_k$() === 0) : false;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).component1_7eebsc_k$ = function () {
    return this.block_1;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).component2_7eebsb_k$ = function () {
    return this.assignmentMark_1;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).component3_7eebsa_k$ = function () {
    return this.assignmentStatus_1;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).copy_3it52_k$ = function (block, assignmentMark, assignmentStatus) {
    return new UstadAssignmentSubmissionHeaderUiState(block, assignmentMark, assignmentStatus);
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).copy$default_j7b1oi_k$ = function (block, assignmentMark, assignmentStatus, $super) {
    block = block === VOID ? this.block_1 : block;
    assignmentMark = assignmentMark === VOID ? this.assignmentMark_1 : assignmentMark;
    assignmentStatus = assignmentStatus === VOID ? this.assignmentStatus_1 : assignmentStatus;
    return $super === VOID ? this.copy_3it52_k$(block, assignmentMark, assignmentStatus) : $super.copy_3it52_k$.call(this, block, assignmentMark, assignmentStatus);
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).toString = function () {
    return 'UstadAssignmentSubmissionHeaderUiState(block=' + this.block_1 + ', assignmentMark=' + this.assignmentMark_1 + ', assignmentStatus=' + this.assignmentStatus_1 + ')';
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).hashCode = function () {
    var result = this.block_1 == null ? 0 : this.block_1.hashCode();
    result = imul(result, 31) + (this.assignmentMark_1 == null ? 0 : this.assignmentMark_1.hashCode()) | 0;
    result = imul(result, 31) + (this.assignmentStatus_1 == null ? 0 : this.assignmentStatus_1) | 0;
    return result;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadAssignmentSubmissionHeaderUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadAssignmentSubmissionHeaderUiState ? other : THROW_CCE();
    if (!equals(this.block_1, tmp0_other_with_cast.block_1))
      return false;
    if (!equals(this.assignmentMark_1, tmp0_other_with_cast.assignmentMark_1))
      return false;
    if (!(this.assignmentStatus_1 == tmp0_other_with_cast.assignmentStatus_1))
      return false;
    return true;
  };
  function UstadCourseAssignmentMarkListItemUiState(mark, localDateTimeNow, dayOfWeekStrings) {
    mark = mark === VOID ? new CourseAssignmentMarkAndMarkerName() : mark;
    this.mark_1 = mark;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
  }
  protoOf(UstadCourseAssignmentMarkListItemUiState).get_mark_woqbrq_k$ = function () {
    return this.mark_1;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).get_peerGroupNumber_2yskjh_k$ = function () {
    var tmp0_safe_receiver = this.mark_1.get_courseAssignmentMark_wrnnge_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMarkerSubmitterUid_4ixg61_k$();
    var markerSubmitterUid = tmp1_elvis_lhs == null ? Companion_getInstance_11().get_MAX_VALUE_54a9lf_k$() : tmp1_elvis_lhs;
    var tmp;
    if (markerSubmitterUid.compareTo_9jj042_k$(toLong(Companion_getInstance_12().get_MIN_SUBMITTER_UID_FOR_PERSON_uk2rru_k$())) < 0) {
      tmp = markerSubmitterUid.toInt_1tsl84_k$();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).get_markerName_1qa4ya_k$ = function () {
    var tmp0_elvis_lhs = this.mark_1.get_markerFirstNames_x53m6z_k$();
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = this.mark_1.get_markerLastName_ho5qvw_k$();
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).get_markerGroupNameVisible_n6m52t_k$ = function () {
    return !(this.get_peerGroupNumber_2yskjh_k$() === 0);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).get_camPenaltyVisible_h1lykx_k$ = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.mark_1.get_courseAssignmentMark_wrnnge_k$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.UstadCourseAssignmentMarkListItemUiState.<get-camPenaltyVisible>.<anonymous>' call
    var it = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camPenalty_ch6xtp_k$();
    return !(it == null) ? !(it === 0.0) : false;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).component1_7eebsc_k$ = function () {
    return this.mark_1;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).component2_7eebsb_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).component3_7eebsa_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).copy_g1k3kc_k$ = function (mark, localDateTimeNow, dayOfWeekStrings) {
    return new UstadCourseAssignmentMarkListItemUiState(mark, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).copy$default_edexi0_k$ = function (mark, localDateTimeNow, dayOfWeekStrings, $super) {
    mark = mark === VOID ? this.mark_1 : mark;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    return $super === VOID ? this.copy_g1k3kc_k$(mark, localDateTimeNow, dayOfWeekStrings) : $super.copy_g1k3kc_k$.call(this, mark, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).toString = function () {
    return 'UstadCourseAssignmentMarkListItemUiState(mark=' + this.mark_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ')';
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).hashCode = function () {
    var result = this.mark_1.hashCode();
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    return result;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadCourseAssignmentMarkListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadCourseAssignmentMarkListItemUiState ? other : THROW_CCE();
    if (!this.mark_1.equals(tmp0_other_with_cast.mark_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    return true;
  };
  function _get_clazzUid__rrng1f_5($this) {
    return $this.clazzUid_1;
  }
  function Companion_120() {
    Companion_instance_120 = this;
    this.DEST_NAME_1 = 'CourseAssignment';
  }
  protoOf(Companion_120).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_120;
  function Companion_getInstance_181() {
    if (Companion_instance_120 == null)
      new Companion_120();
    return Companion_instance_120;
  }
  function ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailViewModel$slambda).invoke_sdzls3_k$ = function (clazzAssignment, permissionPair, $completion) {
    var tmp = this.create_8c886j_k$(clazzAssignment, permissionPair, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAssignment) ? p1 : THROW_CCE();
    return this.invoke_sdzls3_k$(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_container = this.permissionPair_1;
          var hasCourseViewPermission = tmp0_container.component1_7eebsc_k$();
          var hasLearnerRecordPermission = tmp0_container.component2_7eebsb_k$();
          var tmp_0;
          if (hasCourseViewPermission) {
            var tmp_1;
            var tmp1_safe_receiver = this.clazzAssignment_1;
            if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caMarkingType_qumoa0_k$()) === Companion_getInstance_10().get_MARKED_BY_PEERS_w4tbtf_k$()) {
              tmp_1 = true;
            } else {
              tmp_1 = hasLearnerRecordPermission;
            }
            var hasSubmissionsTab = tmp_1;
            var tabArgs = mapOf([to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.this$0__1.clazzUid_1.toString())]);
            var tabs = mutableListOf([new TabItem(Companion_getInstance_184().get_DEST_NAME_gmgk7z_k$(), tabArgs, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_clazz_assignment_7veu5f_k$()))]);
            if (hasSubmissionsTab) {
              var tmp_2;
              var tmp_3;
              if (!hasLearnerRecordPermission) {
                var tmp2_safe_receiver = this.clazzAssignment_1;
                tmp_3 = (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_caMarkingType_qumoa0_k$()) === Companion_getInstance_10().get_MARKED_BY_PEERS_w4tbtf_k$();
              } else {
                tmp_3 = false;
              }
              if (tmp_3) {
                tmp_2 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_peers_to_review_m88o8r_k$());
              } else {
                tmp_2 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_submissions_elud6m_k$());
              }
              var tabName = tmp_2;
              tabs.add_utx5q5_k$(new TabItem(Companion_getInstance_182().get_DEST_NAME_gmgk7z_k$(), tabArgs, tabName));
            }
            tmp_0 = new ClazzAssignmentDetailUiState(toList(tabs));
          } else {
            tmp_0 = new ClazzAssignmentDetailUiState(emptyList());
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).create_8c886j_k$ = function (clazzAssignment, permissionPair, completion) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this.this$0__1, completion);
    i.clazzAssignment_1 = clazzAssignment;
    i.permissionPair_1 = permissionPair;
    return i;
  };
  function ClazzAssignmentDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation);
    var l = function (clazzAssignment, permissionPair, $completion) {
      return i.invoke_sdzls3_k$(clazzAssignment, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_181();
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var assignmentFlow = this.get_activeRepoWithFallback_3qnek7_k$().clazzAssignmentDao_ta4cfn_k$().findByUidAndClazzUidAsFlow_nrf1o1_k$(this.get_entityUidArg_hgo6pe_k$(), this.clazzUid_1);
    var permissionFlow = distinctUntilChanged(this.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzPairAsFlow_gv7o5k_k$(this.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$(), this.clazzUid_1, PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$(), PermissionFlags_getInstance().get_COURSE_LEARNINGRECORD_VIEW_conusm_k$()));
    var tmp_0 = this;
    tmp_0.uiState_1 = combine(assignmentFlow, permissionFlow, ClazzAssignmentDetailViewModel$slambda_0(this, null));
  }
  protoOf(ClazzAssignmentDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function ClazzAssignmentDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.tabs_1 = tabs;
  }
  protoOf(ClazzAssignmentDetailUiState).get_tabs_wousav_k$ = function () {
    return this.tabs_1;
  };
  protoOf(ClazzAssignmentDetailUiState).component1_7eebsc_k$ = function () {
    return this.tabs_1;
  };
  protoOf(ClazzAssignmentDetailUiState).copy_y53k8x_k$ = function (tabs) {
    return new ClazzAssignmentDetailUiState(tabs);
  };
  protoOf(ClazzAssignmentDetailUiState).copy$default_no11s8_k$ = function (tabs, $super) {
    tabs = tabs === VOID ? this.tabs_1 : tabs;
    return $super === VOID ? this.copy_y53k8x_k$(tabs) : $super.copy_y53k8x_k$.call(this, tabs);
  };
  protoOf(ClazzAssignmentDetailUiState).toString = function () {
    return 'ClazzAssignmentDetailUiState(tabs=' + this.tabs_1 + ')';
  };
  protoOf(ClazzAssignmentDetailUiState).hashCode = function () {
    return hashCode(this.tabs_1);
  };
  protoOf(ClazzAssignmentDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailUiState ? other : THROW_CCE();
    if (!equals(this.tabs_1, tmp0_other_with_cast.tabs_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).invoke_ef18t3_k$ = function (it, $completion) {
    var tmp = this.create_2gtfrf_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_ef18t3_k$((p1 == null ? true : p1 instanceof AssignmentProgressSummary) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_s9ra0o_k$(this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).create_2gtfrf_k$ = function (it, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_2gtfrf_k$((value == null ? true : value instanceof AssignmentProgressSummary) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_ef18t3_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzAssignmentDao_ta4cfn_k$().getProgressSummaryForAssignment_eztqm7_k$(this.this$0__1.argEntityUid_1, this.this$0__1.argClazzUid_1, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_group_is3eja_k$()));
            var tmp_1 = ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_14(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, title);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseTerminologyDao_p353oa_k$().getTerminologyForAssignment_794t4m_k$(this.this$0__1.argEntityUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_s9ra0o_k$(VOID, VOID, VOID, VOID, terminology);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          launchSetTitleFromClazzUid(this.this$0__1, this.this$0__1.argClazzUid_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this.this$0__1));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1(this.$this_launch_1, this.this$0__1, completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2($this_launch, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_argEntityUid__gqewss($this) {
    return $this.argEntityUid_1;
  }
  function _get_argClazzUid__sptekj($this) {
    return $this.argClazzUid_1;
  }
  function _get_pagingSourceFactory__6w06ky_0($this) {
    return $this.pagingSourceFactory_1;
  }
  function Companion_121() {
    Companion_instance_121 = this;
    this.DEST_NAME_1 = 'CourseAssignmentSubmissionsTab';
  }
  protoOf(Companion_121).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_121;
  function Companion_getInstance_182() {
    if (Companion_instance_121 == null)
      new Companion_121();
    return Companion_instance_121;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_14(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_14).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().clazzAssignmentDao_ta4cfn_k$().getAssignmentSubmitterSummaryListForAssignment_l6ngse_k$(this$0.argEntityUid_1, this$0.argClazzUid_1, this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_group_is3eja_k$()), toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$()), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().sortOption_1.get_flag_wom2lx_k$());
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            launch(this.$this$launch_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this.this$0__1, null));
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel(di, savedStateHandle) {
    Companion_getInstance_182();
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzAssignmentDetailSubmissionsTabUiState(), Companion_getInstance_181().get_DEST_NAME_gmgk7z_k$());
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.argEntityUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_1;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No ClazzUid provided');
    } else {
      tmp_1 = tmp1_elvis_lhs_0;
    }
    tmp_0.argClazzUid_1 = tmp_1;
    var tmp_2 = this;
    tmp_2.pagingSourceFactory_1 = ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_s9ra0o_k$(VOID, this.pagingSourceFactory_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.createSearchEnabledState$default_7v3uai_k$());
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_3, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this, null));
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).onClickSubmitter_zg6r5r_k$ = function (assignmentSubmitter) {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_188().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_188().get_ARG_ASSIGNMENT_UID_qhfjww_k$(), this.argEntityUid_1.toString()), to(Companion_getInstance_188().get_ARG_SUBMITTER_UID_10b754_k$(), assignmentSubmitter.get_submitterUid_tbcwmo_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.argClazzUid_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).onChangeSortOption_l82mxi_k$ = function (sortOrderOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.onChangeSortOption.<anonymous>' call
        var nextValue = prevValue.copy$default_s9ra0o_k$(VOID, VOID, VOID, sortOrderOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  function Companion_122() {
    Companion_instance_122 = this;
    this.DEFAULT_SORT_OPTIONS_1 = listOf([new SortOrderOption(strings_getInstance().get_name_key_1cwo7g_k$(), ClazzAssignmentDaoCommon_getInstance().get_SORT_NAME_ASC_byiy2d_k$(), true), new SortOrderOption(strings_getInstance().get_name_key_1cwo7g_k$(), ClazzAssignmentDaoCommon_getInstance().get_SORT_NAME_DESC_fksp65_k$(), false)]);
  }
  protoOf(Companion_122).get_DEFAULT_SORT_OPTIONS_vrjybo_k$ = function () {
    return this.DEFAULT_SORT_OPTIONS_1;
  };
  var Companion_instance_122;
  function Companion_getInstance_183() {
    if (Companion_instance_122 == null)
      new Companion_122();
    return Companion_instance_122;
  }
  function ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    Companion_getInstance_183();
    progressSummary = progressSummary === VOID ? null : progressSummary;
    var tmp;
    if (assignmentSubmitterList === VOID) {
      tmp = ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q;
    } else {
      tmp = assignmentSubmitterList;
    }
    assignmentSubmitterList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_183().DEFAULT_SORT_OPTIONS_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    this.progressSummary_1 = progressSummary;
    this.assignmentSubmitterList_1 = assignmentSubmitterList;
    this.sortOptions_1 = sortOptions;
    this.sortOption_1 = sortOption;
    this.courseTerminology_1 = courseTerminology;
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).get_progressSummary_91008g_k$ = function () {
    return this.progressSummary_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).get_assignmentSubmitterList_nej6hd_k$ = function () {
    return this.assignmentSubmitterList_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).get_sortOption_xx8b7o_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).get_courseTerminology_pxom3z_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).component1_7eebsc_k$ = function () {
    return this.progressSummary_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).component2_7eebsb_k$ = function () {
    return this.assignmentSubmitterList_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).component3_7eebsa_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).component4_7eebs9_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).component5_7eebs8_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).copy_dp8rug_k$ = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    return new ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).copy$default_s9ra0o_k$ = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology, $super) {
    progressSummary = progressSummary === VOID ? this.progressSummary_1 : progressSummary;
    assignmentSubmitterList = assignmentSubmitterList === VOID ? this.assignmentSubmitterList_1 : assignmentSubmitterList;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    sortOption = sortOption === VOID ? this.sortOption_1 : sortOption;
    courseTerminology = courseTerminology === VOID ? this.courseTerminology_1 : courseTerminology;
    return $super === VOID ? this.copy_dp8rug_k$(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) : $super.copy_dp8rug_k$.call(this, progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).toString = function () {
    return 'ClazzAssignmentDetailSubmissionsTabUiState(progressSummary=' + this.progressSummary_1 + ', assignmentSubmitterList=' + this.assignmentSubmitterList_1 + ', sortOptions=' + this.sortOptions_1 + ', sortOption=' + this.sortOption_1 + ', courseTerminology=' + this.courseTerminology_1 + ')';
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).hashCode = function () {
    var result = this.progressSummary_1 == null ? 0 : hashCode(this.progressSummary_1);
    result = imul(result, 31) + hashCode(this.assignmentSubmitterList_1) | 0;
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.sortOption_1.hashCode() | 0;
    result = imul(result, 31) + (this.courseTerminology_1 == null ? 0 : hashCode(this.courseTerminology_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailSubmissionsTabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailSubmissionsTabUiState ? other : THROW_CCE();
    if (!equals(this.progressSummary_1, tmp0_other_with_cast.progressSummary_1))
      return false;
    if (!equals(this.assignmentSubmitterList_1, tmp0_other_with_cast.assignmentSubmitterList_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.sortOption_1.equals(tmp0_other_with_cast.sortOption_1))
      return false;
    if (!equals(this.courseTerminology_1, tmp0_other_with_cast.courseTerminology_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).invoke_loxtj4_k$ = function (it, $completion) {
    var tmp = this.create_h5keyk_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.it_1.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubmissionHtml = tmp_1;
          this.this$0__1.onChangeSubmissionText_2gpade_k$(newSubmissionHtml);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).create_h5keyk_k$ = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_loxtj4_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).invoke_x1v7f6_k$ = function (assignmentData, $completion) {
    var tmp = this.create_debzju_k$(assignmentData, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_x1v7f6_k$((p1 == null ? true : p1 instanceof ClazzAssignmentCourseBlockAndSubmitterUid) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver = this.assignmentData_1;
              var isEnrolledButNotInGroup = equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_submitterUid_tbcwmo_k$(), Companion_getInstance_12().get_SUBMITTER_ENROLLED_BUT_NOT_IN_GROUP_ldit4a_k$());
              var tmp1_safe_receiver = this.assignmentData_1;
              var tmp9_assignment = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_clazzAssignment_l29hss_k$();
              var tmp2_safe_receiver = this.assignmentData_1;
              var tmp10_courseBlock = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_courseBlock_c2ojbd_k$();
              var tmp3_safe_receiver = this.assignmentData_1;
              var tmp11_courseBlockPicture = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_courseBlockPicture_gnlyiz_k$();
              var tmp5_safe_receiver = this.assignmentData_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.get_submitterUid_tbcwmo_k$();
              var tmp12_submitterUid = tmp6_elvis_lhs == null ? new Long(0, 0) : tmp6_elvis_lhs;
              var tmp4_safe_receiver = this.assignmentData_1;
              var tmp13_courseGroupSet = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_courseGroupSet_txhi1z_k$();
              var tmp_0;
              if (isEnrolledButNotInGroup) {
                tmp_0 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_unassigned_error_spk9on_k$());
              } else {
                tmp_0 = null;
              }
              var tmp14_unassignedError = tmp_0;
              var tmp7_safe_receiver = this.assignmentData_1;
              var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.get_hasModeratePermission_rdln0d_k$();
              var tmp15_showModerateOptions = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
              var nextValue = prevValue.copy$default_4g8ztp_k$(tmp9_assignment, tmp10_courseBlock, tmp11_courseBlockPicture, tmp13_courseGroupSet, tmp12_submitterUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp14_unassignedError, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp15_showModerateOptions);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).create_debzju_k$ = function (assignmentData, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.assignmentData_1 = assignmentData;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_debzju_k$((value == null ? true : value instanceof ClazzAssignmentCourseBlockAndSubmitterUid) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (assignmentData, $completion) {
      return i.invoke_x1v7f6_k$(assignmentData, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).invoke_89ouf3_k$ = function (submissions, submissionFiles, $completion) {
    var tmp = this.create_gi1gpz_k$(submissions, submissionFiles, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.invoke_89ouf3_k$(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return combineWithSubmissionFiles(this.submissions_1, this.submissionFiles_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).create_gi1gpz_k$ = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.submissions_1 = submissions;
    i.submissionFiles_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.invoke_89ouf3_k$(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).invoke_72ldhh_k$ = function (it, $completion) {
    var tmp = this.create_8g5jux_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_72ldhh_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).create_8g5jux_k$ = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8g5jux_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_72ldhh_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).invoke_6yrqxi_k$ = function (it, $completion) {
    var tmp = this.create_yz6olm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_6yrqxi_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).create_yz6olm_k$ = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_yz6olm_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_6yrqxi_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).invoke_rcydpb_k$ = function (value, $completion) {
    var tmp = this.create_ht0kcz_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_rcydpb_k$(p1 instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform0__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value1__1 = this.value_1;
            this.set_state_rjd8d0_k$(1);
            var tmp0_safe_receiver = this.value1__1.editableSubmission_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_casUid_bsjz9g_k$();
            suspendResult = this.$this$unsafeTransform0__1.emit_t92u1f_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).create_ht0kcz_k$ = function (value, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_ht0kcz_k$(value instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_rcydpb_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$59(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$59).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).invoke_w6a5xg_k$ = function (it, $completion) {
    var tmp = this.create_4xor60_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_w6a5xg_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).create_4xor60_k$ = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_4xor60_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_w6a5xg_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_6($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_6).collect_66xcap_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$59(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_6).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_66xcap_k$(collector, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).invoke_gc8owv_k$ = function (submissionUid, $completion) {
    var tmp = this.create_65p97n_k$(submissionUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_gc8owv_k$(p1 instanceof Long ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeDb_bu92wd_k$().courseAssignmentSubmissionFileDao_spskde_k$().getBySubmissionUid_umttft_k$(this.submissionUid_1));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).create_65p97n_k$ = function (submissionUid, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.this$0__1, completion);
    i.submissionUid_1 = submissionUid;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_65p97n_k$(value instanceof Long ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (submissionUid, $completion) {
      return i.invoke_gc8owv_k$(submissionUid, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation) {
    this.$entityFlow_1 = $entityFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = this.$entityFlow_1.collect_ve9kyv_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1(this.$entityFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2($entityFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, title);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.submissionFlow0__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseAssignmentSubmissionDao_y3yq7y_k$().findByAssignmentUidAndAccountPersonUid_6sz576_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$());
            this.submissionFilesFlow1__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseAssignmentSubmissionFileDao_spskde_k$().getByAssignmentUidAndPersonUid_3hqs56_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$());
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(combine(this.submissionFlow0__1, this.submissionFilesFlow1__1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseAssignmentMarkDao_6irrq5_k$().getAllMarksForUserAsFlow_x6aw07_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = this.this$0__1._editableSubmissionUiState_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_6(this_0));
            suspendResult = collectLatest(tmp_0, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_navResultReturner_jwjn90_k$(), 'submissionHtml');
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    this.$entityFlow_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2(this.$entityFlow_1, this.this$0__1, null));
          launchSetTitleFromClazzUid(this.this$0__1, this.this$0__1.clazzUid_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this.this$0__1));
          launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1(this.$this_launch_1, this.this$0__1, this.$entityFlow_1, completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2($this_launch, this$0, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation) {
    this.this$0__1 = this$0;
    this.$file_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseAssignmentSubmissionFileDao_spskde_k$();
            var tmp0_safe_receiver = this.$file_1.get_submissionFile_er578x_k$();
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_casaUid_afucgr_k$();
            suspendResult = tmp_0.setDeleted_fijhxl_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this.this$0__1, this.$file_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get_submitAssignmentUseCase__h06z0f($this) {
    return $this.submitAssignmentUseCase_1;
  }
  function _get__uiState__8e9jsd_12($this) {
    return $this._uiState_1;
  }
  function _get__editableSubmissionUiState__bp7o9v($this) {
    return $this._editableSubmissionUiState_1;
  }
  function _get__newPrivateCommentText__144lr3($this) {
    return $this._newPrivateCommentText_1;
  }
  function _get__newCourseCommentText__dztnz5($this) {
    return $this._newCourseCommentText_1;
  }
  function _get_privateCommentsPagingSourceFactory__bd2bq7($this) {
    return $this.privateCommentsPagingSourceFactory_1;
  }
  function _get_courseCommentsPagingSourceFactory__9hfgot($this) {
    return $this.courseCommentsPagingSourceFactory_1;
  }
  function _set_savedSubmissionJob__wj2ncj($this, _set____db54di) {
    $this.savedSubmissionJob_1 = _set____db54di;
  }
  function _get_savedSubmissionJob__4k63i9($this) {
    return $this.savedSubmissionJob_1;
  }
  function _get_clazzUid__rrng1f_6($this) {
    return $this.clazzUid_1;
  }
  function _get_saveAndUploadUseCase__bjy5rj($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.saveAndUploadUseCase$delegate_1;
    saveAndUploadUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_cancelTransferJobUseCase__o6e2y4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cancelTransferJobUseCase$delegate_1;
    cancelTransferJobUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_openBlobUiUseCase__fzusqz($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.openBlobUiUseCase$delegate_1;
    openBlobUiUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _set_openBlobJob__r74v4f($this, _set____db54di) {
    $this.openBlobJob_1 = _set____db54di;
  }
  function _get_openBlobJob__djl0it($this) {
    return $this.openBlobJob_1;
  }
  function _get_ustadAccountManager__el9prc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ustadAccountManager$delegate_1;
    ustadAccountManager$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_showSocialWarningUseCase__ft8jc6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.showSocialWarningUseCase$delegate_1;
    showSocialWarningUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_dismissSocialWarningUseCase__st8mv5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dismissSocialWarningUseCase$delegate_1;
    dismissSocialWarningUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_openExternalLinkUseCase__ku5z07_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.openExternalLinkUseCase$delegate_1;
    openExternalLinkUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function newCourseAssignmentSubmission($this) {
    var tmp0_casUid = get_doorPrimaryKeyManager($this.get_activeDb_bu92wd_k$()).nextId_8yjjmy_k$(Companion_getInstance_12().get_TABLE_ID_xo2mej_k$());
    var tmp1_casAssignmentUid = $this.get_entityUidArg_hgo6pe_k$();
    var tmp2_casClazzUid = $this.clazzUid_1;
    var tmp3_casSubmitterPersonUid = $this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_personUid_mmhd76_k$();
    return new CourseAssignmentSubmission(tmp0_casUid, tmp1_casAssignmentUid, VOID, tmp3_casSubmitterPersonUid, '', VOID, VOID, tmp2_casClazzUid);
  }
  function openSubmissionFileAsBlob($this, file, intent) {
    var tmp0_elvis_lhs = file.get_submissionFile_er578x_k$();
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.openBlobJob_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.get_viewModelScope_ryv1dz_k$();
    tmp_0.openBlobJob_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_123() {
    Companion_instance_123 = this;
    this.STATE_EDITABLE_SUBMISSION_1 = 'latestSubmission';
    this.KEY_SUBMISSION_HTML_1 = 'submissionHtml';
    this.DEST_NAME_1 = 'CourseAssignmentDetailOverviewView';
  }
  protoOf(Companion_123).get_STATE_EDITABLE_SUBMISSION_pdd4ds_k$ = function () {
    return this.STATE_EDITABLE_SUBMISSION_1;
  };
  protoOf(Companion_123).get_KEY_SUBMISSION_HTML_jawg4r_k$ = function () {
    return this.KEY_SUBMISSION_HTML_1;
  };
  protoOf(Companion_123).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_123;
  function Companion_getInstance_184() {
    if (Companion_instance_123 == null)
      new Companion_123();
    return Companion_instance_123;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_15(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_15).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$().findPrivateCommentsForUserByAssignmentUid_sfw2hb_k$(this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.get_entityUidArg_hgo6pe_k$(), false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$().findCourseCommentsByAssignmentUid_9j56pn_k$(this$0.get_entityUidArg_hgo6pe_k$(), false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    this.$entityFlow_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, 'latestSubmission', Companion_getInstance_12().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_elvis_lhs0__1 = suspendResult;
            this.editableSubmission1__1 = this.tmp0_elvis_lhs0__1 == null ? newCourseAssignmentSubmission(this.this$0__1) : this.tmp0_elvis_lhs0__1;
            l$ret$1: do {
              var this_0 = this.this$0__1._editableSubmissionUiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy_ixe4zv_k$(this.editableSubmission1__1);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.$this$launch_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this.this$0__1, null));
            this.set_state_rjd8d0_k$(2);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2(this.$this$launch_1, this.this$0__1, this.$entityFlow_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, this.$entityFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          _get_dismissSocialWarningUseCase__st8mv5(this.this$0__1).invoke_nokysy_k$(toString_1(_get_ustadAccountManager__el9prc(this.this$0__1).get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_username_ytz5i7_k$()));
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda($text) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_casText_o0fpqq_k$($text);
      return Unit_getInstance();
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation) {
    this.$submissionToSave_1 = $submissionToSave;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$submissionToSave_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.setJson_jnpl42_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'latestSubmission', Companion_getInstance_12().serializer_9w0wvi_k$(), this.$submissionToSave_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda(this.$submissionToSave_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0($submissionToSave, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$submitterUid_1 = $submitterUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$();
            var this_0 = new Comments();
            this_0.set_commentsForSubmitterUid_kngio1_k$(this.$submitterUid_1);
            this_0.set_commentsFromPersonUid_5ww49q_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            this_0.set_commentsFromSubmitterUid_brso5g_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().submitterUid_1);
            this_0.set_commentsEntityUid_efls2q_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            this_0.set_commentsText_l77wpl_k$(this.this$0__1._newPrivateCommentText_1.get_value_j01efc_k$());
            this_0.set_commentsDateTimeAdded_w1vh7a_k$(systemTimeInMillis());
            suspendResult = tmp_0.insertAsync_p6r5iz_k$(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.this$0__1._newPrivateCommentText_1.set_value_v1vabv_k$('');
            tmp_1.tmp$ret$00__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(5);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            throw t;
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this.this$0__1, this.$submitterUid_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this$0, $submitterUid, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$();
            var this_0 = new Comments();
            this_0.set_commentsForSubmitterUid_kngio1_k$(new Long(0, 0));
            this_0.set_commentsFromPersonUid_5ww49q_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            this_0.set_commentsEntityUid_efls2q_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            this_0.set_commentsText_l77wpl_k$(this.this$0__1._newCourseCommentText_1.get_value_j01efc_k$());
            this_0.set_commentsDateTimeAdded_w1vh7a_k$(systemTimeInMillis());
            suspendResult = tmp_0.insertAsync_p6r5iz_k$(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.this$0__1._newCourseCommentText_1.set_value_v1vabv_k$('');
            tmp_1.tmp$ret$00__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(5);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            throw t;
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    this.this$0__1 = this$0;
    this.$size_1 = $size;
    this.$mimeType_1 = $mimeType;
    this.$fileName_1 = $fileName;
    this.$uri_1 = $uri;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_13().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp2_casaUid0__1 = suspendResult;
            var tmp_0 = this;
            var tmp0_safe_receiver = this.this$0__1._editableSubmissionUiState_1.get_value_j01efc_k$().editableSubmission_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_casUid_bsjz9g_k$();
            tmp_0.tmp3_casaSubmissionUid1__1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.tmp4_casaSubmitterUid2__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().submitterUid_1;
            this.tmp5_casaSize3__1 = this.$size_1.toInt_1tsl84_k$();
            this.tmp6_casaCaUid4__1 = this.this$0__1.get_entityUidArg_hgo6pe_k$();
            this.tmp7_casaClazzUid5__1 = this.this$0__1.clazzUid_1;
            this.newAttachment6__1 = new CourseAssignmentSubmissionFile(this.tmp2_casaUid0__1, this.tmp3_casaSubmissionUid1__1, this.tmp4_casaSubmitterUid2__1, this.tmp6_casaCaUid4__1, this.tmp7_casaClazzUid5__1, this.$mimeType_1, this.$fileName_1, this.$uri_1, this.tmp5_casaSize3__1);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().courseAssignmentSubmissionFileDao_spskde_k$().insertListAsync_fqfk1z_k$(listOf_0(this.newAttachment6__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(3);
            suspendResult = _get_saveAndUploadUseCase__bjy5rj(this.this$0__1).invoke_dc98oa_k$(listOf_0(new SaveLocalUriAsBlobItem(this.$uri_1, this.newAttachment6__1.get_casaUid_afucgr_k$(), Companion_getInstance_13().get_TABLE_ID_xo2mej_k$(), this.$mimeType_1, VOID, true)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_1 = this.get_exception_x0n6w6_k$();
            if (tmp_1 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              Napier_getInstance().w$default_p42du4_k$('WARNING: Exception attempting to save/enqueue submission file', e);
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 5:
            this.set_exceptionState_fex74n_k$(6);
            return Unit_getInstance();
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this.this$0__1, this.$size_1, this.$mimeType_1, this.$fileName_1, this.$uri_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation) {
    this.this$0__1 = this$0;
    this.$submission_1 = $submission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(6);
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.submitAssignmentUseCase_1.invoke_fjkoiw_k$(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$(), this.this$0__1._uiState_1.get_value_j01efc_k$().submitterUid_1, this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_personUid_mmhd76_k$(), this.$submission_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_0 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.this$0__1._editableSubmissionUiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy_ixe4zv_k$(newCourseAssignmentSubmission(this.this$0__1));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_0.submissionToSave1__1 = tmp$ret$0.editableSubmission_1;
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.submissionToSave1__1 == null)) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = this.this$0__1.setJson_jnpl42_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'latestSubmission', Companion_getInstance_12().serializer_9w0wvi_k$(), this.submissionToSave1__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            var tmp_1 = this;
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_submitted_key_eetxbm_k$())));
            tmp_1.tmp$ret$40__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 5:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_2 = this.get_exception_x0n6w6_k$();
            if (tmp_2 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_3 = this;
              Napier_getInstance().e$default_pvzj32_k$('Exception submitting assignment: ' + e, e);
              l$ret$7: do {
                var this_2 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_1 = this_2.get_value_j01efc_k$();
                  var nextValue_1 = prevValue_1.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, e.message);
                  if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              tmp_3.tmp$ret$40__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(7);
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 6:
            this.set_exceptionState_fex74n_k$(7);
            var t = this.get_exception_x0n6w6_k$();
            l$ret$9: do {
              var this_3 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_2 = this_3.get_value_j01efc_k$();
                var nextValue_2 = prevValue_2.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_3.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            throw t;
          case 7:
            throw this.get_exception_x0n6w6_k$();
          case 8:
            this.set_exceptionState_fex74n_k$(7);
            l$ret$11: do {
              var this_4 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_3 = this_4.get_value_j01efc_k$();
                var nextValue_3 = prevValue_3.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_4.compareAndSet_l3595a_k$(prevValue_3, nextValue_3)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 7) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this.this$0__1, this.$submission_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this$0, $submission, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation) {
    this.this$0__1 = this$0;
    this.$file_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this.this$0__1, this.$file_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp0_safe_receiver = this.$file_1.get_transferJobItem_v1bvfo_k$();
            tmp_1.tmp1_safe_receiver0__1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_tjiTjUid_hem380_k$();
            if (this.tmp1_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.this2__1 = this.tmp1_safe_receiver0__1;
              var tmp_3 = this;
              tmp_3.transferJobId3__1 = this.this2__1;
              this.tmp0_safe_receiver4__1 = _get_cancelTransferJobUseCase__o6e2y4(this.this$0__1);
              if (this.tmp0_safe_receiver4__1 == null) {
                this.WHEN_RESULT5__1 = null;
                this.set_state_rjd8d0_k$(3);
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(2);
                suspendResult = this.tmp0_safe_receiver4__1.invoke_upy66h_k$(this.transferJobId3__1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 2:
            var tmp_4 = this;
            tmp_4.WHEN_RESULT5__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.WHEN_RESULT1__1 = this.this2__1;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this.this$0__1, this.$file_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.this$0__1 = this$0;
    this.$submissionFile_1 = $submissionFile;
    this.$intent_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.tmp0_safe_receiver0__1 = _get_openBlobUiUseCase__fzusqz(this.this$0__1);
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              var tmp_0 = asBlobOpenItem(this.$submissionFile_1);
              suspendResult = this.tmp0_safe_receiver0__1.invoke_thxto7_k$(tmp_0, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this.this$0__1), this.$intent_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.WHEN_RESULT1__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this.this$0__1, this.$submissionFile_1, this.$intent_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.this$0__1 = this$0;
    this.$comments_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$().updateDeletedByCommentUid_djs5vs_k$(this.$comments_1.get_commentsUid_mbzbu5_k$(), true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_deleted_qwnqy8_k$())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this.this$0__1, this.$comments_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel(di, savedStateHandle, submitAssignmentUseCase) {
    Companion_getInstance_184();
    var tmp;
    if (submitAssignmentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, null);
      tmp = new SubmitAssignmentUseCase(tmp$ret$1);
    } else {
      tmp = submitAssignmentUseCase;
    }
    submitAssignmentUseCase = tmp;
    DetailViewModel.call(this, di, savedStateHandle, Companion_getInstance_181().get_DEST_NAME_gmgk7z_k$());
    this.submitAssignmentUseCase_1 = submitAssignmentUseCase;
    this._uiState_1 = MutableStateFlow(new ClazzAssignmentDetailOverviewUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getDayOfWeekStrings_62j2s1_k$()));
    this.uiState_1 = asStateFlow(this._uiState_1);
    this._editableSubmissionUiState_1 = MutableStateFlow(new ClazzAssignmentDetailoverviewSubmissionUiState());
    this.editableSubmissionUiState_1 = asStateFlow(this._editableSubmissionUiState_1);
    this._newPrivateCommentText_1 = MutableStateFlow('');
    this.newPrivateCommentText_1 = asStateFlow(this._newPrivateCommentText_1);
    this._newCourseCommentText_1 = MutableStateFlow('');
    this.newCourseCommentText_1 = asStateFlow(this._newCourseCommentText_1);
    var tmp_2 = this;
    tmp_2.privateCommentsPagingSourceFactory_1 = ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_3 = this;
    tmp_3.courseCommentsPagingSourceFactory_1 = ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this);
    this.savedSubmissionJob_1 = null;
    var tmp_4 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_5;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('clazzUid arg is required');
    } else {
      tmp_5 = tmp1_elvis_lhs;
    }
    tmp_4.clazzUid_1 = tmp_5;
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.saveAndUploadUseCase$delegate_1 = Instance(this_0, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, saveAndUploadUseCase$factory());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(CancelBlobUploadClientUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.cancelTransferJobUseCase$delegate_1 = InstanceOrNull(this_1, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, cancelTransferJobUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_2 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.openBlobUiUseCase$delegate_1 = InstanceOrNull(this_2, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, openBlobUiUseCase$factory());
    this.openBlobJob_1 = null;
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.ustadAccountManager$delegate_1 = Instance(di, tmp$ret$8, null).provideDelegate_o2qlc1_k$(this, ustadAccountManager$factory());
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_15 = typeToken(createKType(getKClass(ShowSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
    tmp_14.showSocialWarningUseCase$delegate_1 = Instance(di, tmp$ret$10, null).provideDelegate_o2qlc1_k$(this, showSocialWarningUseCase$factory());
    var tmp_16 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_17 = typeToken(createKType(getKClass(DismissSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    tmp_16.dismissSocialWarningUseCase$delegate_1 = Instance(di, tmp$ret$12, null).provideDelegate_o2qlc1_k$(this, dismissSocialWarningUseCase$factory());
    var tmp_18 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    tmp_18.openExternalLinkUseCase$delegate_1 = Instance(di, tmp$ret$14, null).provideDelegate_o2qlc1_k$(this, openExternalLinkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this._uiState_1;
      while (true) {
        var prevValue = this_3.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp_20 = this.get_activeUserPersonUid_1nlgnz_k$();
        var tmp_21 = this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().fullName_m0cs6y_k$();
        var tmp0_safe_receiver_0 = this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_personPicture_te1agw_k$();
        var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_20, tmp_21, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_personPictureUri_r3scj8_k$(), VOID, VOID, VOID, VOID, VOID, VOID, _get_showSocialWarningUseCase__ft8jc6(this).invoke_lt562m_k$(toString_1(_get_ustadAccountManager__el9prc(this).get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_username_ytz5i7_k$())));
        if (this_3.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var entityFlow = shareIn(this.get_activeRepoWithFallback_3qnek7_k$().clazzAssignmentDao_ta4cfn_k$().findAssignmentCourseBlockAndSubmitterUidAsFlow_pyqyxo_k$(this.get_entityUidArg_hgo6pe_k$(), this.clazzUid_1, this.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$()), this.get_viewModelScope_ryv1dz_k$(), Companion_getInstance_38().WhileSubscribed$default_3cgwv5_k$());
    var tmp_22 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_22, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda_0(this, savedStateHandle, entityFlow, null));
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_4.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp0_privateComments = this.privateCommentsPagingSourceFactory_1;
        var tmp1_courseComments = this.courseCommentsPagingSourceFactory_1;
        var nextValue_0 = prevValue_0.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_courseComments, tmp0_privateComments);
        if (this_4.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).get_editableSubmissionUiState_ti6tac_k$ = function () {
    return this.editableSubmissionUiState_1;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).get_newPrivateCommentText_sywsw0_k$ = function () {
    return this.newPrivateCommentText_1;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).get_newCourseCommentText_2lr1wm_k$ = function () {
    return this.newCourseCommentText_1;
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onWarningDismiss_ro008t_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onLearnMoreClicked_hhstb1_k$ = function () {
    _get_openExternalLinkUseCase__ku5z07_0(this).invoke_ts1gt6_k$(Companion_getInstance_118().get_SOCIAL_WARNING_WEB_URL_soql6w_k$(), LinkTarget_BLANK_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onClickMarksFilterChip_af3y7v_k$ = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickMarksFilterChip.<anonymous>' call
        var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.get_value_j01efc_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onClickEditSubmissionText_mk0kw4_k$ = function () {
    var tmp0_safe_receiver = this._editableSubmissionUiState_1.get_value_j01efc_k$().editableSubmission_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_casText_afmdvd_k$();
    this.navigateToEditHtml$default_imw6oe_k$(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs, 'submissionHtml');
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onChangeSubmissionText_2gpade_k$ = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._editableSubmissionUiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onChangeSubmissionText.<anonymous>' call
        var tmp0_safe_receiver = prevValue.editableSubmission_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_0(tmp0_safe_receiver, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda(text));
        }
        var nextValue = prevValue.copy_ixe4zv_k$(tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var submissionToSave = tmp$ret$1.editableSubmission_1;
    var tmp0_safe_receiver_0 = this.savedSubmissionJob_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_0 = this;
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    tmp_0.savedSubmissionJob_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0(submissionToSave, this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onChangePrivateCommentText_q59q9e_k$ = function (text) {
    this._newPrivateCommentText_1.set_value_v1vabv_k$(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onClickSubmitPrivateComment_i0459v_k$ = function () {
    var submitterUid = this._uiState_1.get_value_j01efc_k$().submitterUid_1;
    if (submitterUid.compareTo_9jj042_k$(new Long(0, 0)) <= 0)
      return Unit_getInstance();
    if (this.get_loadingState_rpk2ke_k$().equals(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()))
      return Unit_getInstance();
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this, submitterUid, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onChangeCourseCommentText_tth7g8_k$ = function (text) {
    this._newCourseCommentText_1.set_value_v1vabv_k$(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onClickSubmitCourseComment_dz4g0j_k$ = function () {
    if (this.get_loadingState_rpk2ke_k$().equals(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()))
      return Unit_getInstance();
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onAddSubmissionFile_ds2tjm_k$ = function (uri, fileName, mimeType, size) {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().assignment_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caSizeLimit_60e6st_k$();
    var assignmentSizeLimit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (size.compareTo_9jj042_k$(toLong(imul(imul(assignmentSizeLimit, 1024), 1024))) > 0) {
      this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_import_link_big_size_8lyczw_k$())));
      return Unit_getInstance();
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this, size, mimeType, fileName, uri, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onClickSubmit_go64y9_k$ = function () {
    if (!this._uiState_1.get_value_j01efc_k$().fieldsEnabled_1)
      return Unit_getInstance();
    var tmp0_elvis_lhs = this._editableSubmissionUiState_1.get_value_j01efc_k$().editableSubmission_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submission = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickSubmit.<anonymous>' call
        var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this, submission, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onToggleSubmissionExpandCollapse_6uv8zn_k$ = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.collapsedSubmissions_1, submission.get_casUid_bsjz9g_k$()));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onClickCourseGroupSet_t8ds6h_k$ = function () {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_212().get_DEST_NAME_gmgk7z_k$();
    var tmp_1 = Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$();
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().courseGroupSet_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cgsUid_bvuqtm_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    tmp.navigate$default_srzzsc_k$(tmp_0, mapOf([to(tmp_1, tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onRemoveSubmissionFile_8bkxva_k$ = function (file) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this, file, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onSendSubmissionFile_24elve_k$ = function (file) {
    openSubmissionFileAsBlob(this, file, OpenBlobIntent_SEND_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onOpenSubmissionFile_6grtac_k$ = function (file) {
    openSubmissionFileAsBlob(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onDismissOpenFileSubmission_ofkjqr_k$ = function () {
    var tmp0_safe_receiver = this.openBlobJob_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onDismissOpenFileSubmission.<anonymous>' call
        var nextValue = prevValue.copy$default_4g8ztp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).onDeleteComment_f0outo_k$ = function (comments) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq($this) {
    return latestUniqueMarksByMarker($this.markList_1);
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) {
    assignment = assignment === VOID ? null : assignment;
    courseBlock = courseBlock === VOID ? null : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? null : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    submitterUid = submitterUid === VOID ? new Long(0, 0) : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? emptyList() : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? false : submissionTooLong;
    submissions = submissions === VOID ? emptyList() : submissions;
    markList = markList === VOID ? emptyList() : markList;
    var tmp;
    if (courseComments === VOID) {
      tmp = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn;
    } else {
      tmp = courseComments;
    }
    courseComments = tmp;
    var tmp_0;
    if (privateComments === VOID) {
      tmp_0 = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0;
    } else {
      tmp_0 = privateComments;
    }
    privateComments = tmp_0;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_RECENT_SCORES_5p7cq8_k$() : selectedChipId;
    gradeFilterChips = gradeFilterChips === VOID ? listOf([new MessageIdOption2(strings_getInstance().get_most_recent_sd0x5e_k$(), CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_RECENT_SCORES_5p7cq8_k$()), new MessageIdOption2(strings_getInstance().get_all_18j9hk_k$(), CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_ALL_SCORES_fjmn8s_k$())]) : gradeFilterChips;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? new UstadAssignmentSubmissionHeaderUiState() : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? null : unassignedError;
    submissionError = submissionError === VOID ? null : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? emptyMap() : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? null : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.assignment_1 = assignment;
    this.courseBlock_1 = courseBlock;
    this.courseBlockPicture_1 = courseBlockPicture;
    this.courseGroupSet_1 = courseGroupSet;
    this.submitterUid_1 = submitterUid;
    this.editableSubmissionFiles_1 = editableSubmissionFiles;
    this.submissionTooLong_1 = submissionTooLong;
    this.submissions_1 = submissions;
    this.markList_1 = markList;
    this.courseComments_1 = courseComments;
    this.privateComments_1 = privateComments;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.selectedChipId_1 = selectedChipId;
    this.gradeFilterChips_1 = gradeFilterChips;
    this.submissionHeaderUiState_1 = submissionHeaderUiState;
    this.unassignedError_1 = unassignedError;
    this.submissionError_1 = submissionError;
    this.activeUserPersonUid_1 = activeUserPersonUid;
    this.activeUserPersonName_1 = activeUserPersonName;
    this.activeUserPictureUri_1 = activeUserPictureUri;
    this.courseTerminology_1 = courseTerminology;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.dayOfWeekStringMap_1 = dayOfWeekStringMap;
    this.collapsedSubmissions_1 = collapsedSubmissions;
    this.openingFileSubmissionState_1 = openingFileSubmissionState;
    this.showModerateOptions_1 = showModerateOptions;
    this.showSocialWarning_1 = showSocialWarning;
  }
  protoOf(ClazzAssignmentDetailOverviewUiState).get_assignment_378p7u_k$ = function () {
    return this.assignment_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_courseBlock_c2ojbd_k$ = function () {
    return this.courseBlock_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_courseBlockPicture_gnlyiz_k$ = function () {
    return this.courseBlockPicture_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_courseGroupSet_txhi1z_k$ = function () {
    return this.courseGroupSet_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submitterUid_tbcwmo_k$ = function () {
    return this.submitterUid_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_editableSubmissionFiles_ura6_k$ = function () {
    return this.editableSubmissionFiles_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submissionTooLong_75zjqd_k$ = function () {
    return this.submissionTooLong_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submissions_elud6m_k$ = function () {
    return this.submissions_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_markList_rqcfn0_k$ = function () {
    return this.markList_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_courseComments_blct2w_k$ = function () {
    return this.courseComments_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_privateComments_lrtub2_k$ = function () {
    return this.privateComments_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_selectedChipId_ens6id_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_gradeFilterChips_59ma9t_k$ = function () {
    return this.gradeFilterChips_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submissionHeaderUiState_85ez7p_k$ = function () {
    return this.submissionHeaderUiState_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_unassignedError_urf308_k$ = function () {
    return this.unassignedError_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submissionError_v6ezw3_k$ = function () {
    return this.submissionError_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_activeUserPersonUid_1nlgnz_k$ = function () {
    return this.activeUserPersonUid_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_activeUserPersonName_jpi2sa_k$ = function () {
    return this.activeUserPersonName_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_activeUserPictureUri_he93ko_k$ = function () {
    return this.activeUserPictureUri_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_courseTerminology_pxom3z_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_dayOfWeekStringMap_u6nhd9_k$ = function () {
    return this.dayOfWeekStringMap_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_collapsedSubmissions_hfga93_k$ = function () {
    return this.collapsedSubmissions_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_openingFileSubmissionState_fih6l6_k$ = function () {
    return this.openingFileSubmissionState_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_showModerateOptions_2rhvyj_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_showSocialWarning_ygvdbr_k$ = function () {
    return this.showSocialWarning_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_caDescriptionVisible_g0gctf_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.courseBlock_1;
    var this_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cbDescription_asqepg_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_cbDeadlineDateVisible_s8srxg_k$ = function () {
    var tmp0_safe_receiver = this.courseBlock_1;
    return isDateSet(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cbDeadlineDate_nvh1aq_k$());
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submitSubmissionButtonVisible_bemdt9_k$ = function () {
    return this.get_activeUserCanSubmit_f7wok2_k$();
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_unassignedErrorVisible_6hwoti_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = this.unassignedError_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_showClassComments_jo65ga_k$ = function () {
    var tmp0_safe_receiver = this.assignment_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caClassCommentEnabled_cfaj2r_k$()) === true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_activeUserIsSubmitter_48t0yt_k$ = function () {
    return this.submitterUid_1.compareTo_9jj042_k$(new Long(0, 0)) > 0;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_showPrivateComments_cta6pd_k$ = function () {
    var tmp;
    if (this.get_activeUserIsSubmitter_48t0yt_k$()) {
      var tmp0_safe_receiver = this.assignment_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caPrivateCommentsEnabled_l0k0vl_k$()) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_isWithinDeadlineOrGracePeriod_vb1wyo_k$ = function () {
    var timeNow = systemTimeInMillis();
    var tmp0_safe_receiver = this.courseBlock_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cbDeadlineDate_nvh1aq_k$();
    if (timeNow.compareTo_9jj042_k$(tmp1_elvis_lhs == null ? get_UNSET_DISTANT_FUTURE() : tmp1_elvis_lhs) < 0) {
      return true;
    }
    var tmp;
    var tmp2_safe_receiver = this.courseBlock_1;
    if (isDateSet(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_cbGracePeriodDate_kapsrj_k$())) {
      var tmp3_safe_receiver = this.courseBlock_1;
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_cbGracePeriodDate_kapsrj_k$();
      tmp = timeNow.compareTo_9jj042_k$(tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs) <= 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      return true;
    }
    return false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_activeUserCanSubmit_f7wok2_k$ = function () {
    if (!this.get_activeUserIsSubmitter_48t0yt_k$())
      return false;
    if (!this.get_isWithinDeadlineOrGracePeriod_vb1wyo_k$())
      return false;
    var tmp;
    var tmp0_safe_receiver = this.assignment_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caSubmissionPolicy_6vp9k5_k$()) === Companion_getInstance_10().get_SUBMISSION_POLICY_SUBMIT_ALL_AT_ONCE_iohkb_k$()) {
      // Inline function 'kotlin.collections.isNotEmpty' call
      tmp = !this.submissions_1.isEmpty_y1axqb_k$();
    } else {
      tmp = false;
    }
    if (tmp) {
      return false;
    }
    return true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_canEditSubmissionText_rqvrii_k$ = function () {
    var tmp;
    if (this.get_activeUserCanSubmit_f7wok2_k$()) {
      var tmp0_safe_receiver = this.assignment_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caRequireTextSubmission_bngh2v_k$()) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_addFileSubmissionVisible_fpqm7i_k$ = function () {
    var tmp;
    var tmp_0;
    if (this.get_activeUserCanSubmit_f7wok2_k$()) {
      var tmp0_safe_receiver = this.assignment_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caRequireFileSubmission_w8j1mu_k$()) === true;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.editableSubmissionFiles_1.get_size_woubt6_k$() < this.assignment_1.get_caNumberOfFiles_gm3yhc_k$();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submissionStatus_l98b89_k$ = function () {
    return this.get_activeUserIsSubmitter_48t0yt_k$() ? submissionStatusFor(this.markList_1, this.submissions_1) : null;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_privateCommentSectionVisible_jtdo5u_k$ = function () {
    return this.get_activeUserIsSubmitter_48t0yt_k$() ? this.unassignedError_1 == null : false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submitPrivateCommentVisible_fw1iqz_k$ = function () {
    var tmp;
    if (this.get_privateCommentSectionVisible_jtdo5u_k$()) {
      var tmp0_safe_receiver = this.assignment_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caPrivateCommentsEnabled_l0k0vl_k$()) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_pointsVisible_3h6k86_k$ = function () {
    return !(this.get_submissionMark_er9ide_k$() == null);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_latePenaltyVisible_g5zc08_k$ = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-latePenaltyVisible>.<anonymous>' call
    var it = this.get_submissionMark_er9ide_k$();
    return !(it == null) ? !(it.get_averagePenalty_h42i4r_k$() === 0) : false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submissionTextFieldVisible_e5pgm_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.assignment_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caRequireTextSubmission_bngh2v_k$()) === true) {
      tmp = this.get_activeUserCanSubmit_f7wok2_k$();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_visibleMarks_c5dml_k$ = function () {
    var tmp;
    if (this.selectedChipId_1 === CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_RECENT_SCORES_5p7cq8_k$()) {
      tmp = _get_latestUniqueMarksByMarker__e0a3pq(this);
    } else {
      tmp = this.markList_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_gradeFilterChipsVisible_8j75ip_k$ = function () {
    return hasUpdatedMarks(this.markList_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_submissionMark_er9ide_k$ = function () {
    return averageMark(this.markList_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).get_isGroupSubmission_uwd8g8_k$ = function () {
    var tmp0_safe_receiver = this.assignment_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_caGroupUid_zf52s8_k$();
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-isGroupSubmission>.<anonymous>' call
      tmp = !tmp1_safe_receiver.equals(new Long(0, 0));
    }
    var tmp2_elvis_lhs = tmp;
    return tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component1_7eebsc_k$ = function () {
    return this.assignment_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component2_7eebsb_k$ = function () {
    return this.courseBlock_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component3_7eebsa_k$ = function () {
    return this.courseBlockPicture_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component4_7eebs9_k$ = function () {
    return this.courseGroupSet_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component5_7eebs8_k$ = function () {
    return this.submitterUid_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component6_7eebs7_k$ = function () {
    return this.editableSubmissionFiles_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component7_7eebs6_k$ = function () {
    return this.submissionTooLong_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component8_7eebs5_k$ = function () {
    return this.submissions_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component9_7eebs4_k$ = function () {
    return this.markList_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component10_gazzfo_k$ = function () {
    return this.courseComments_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component11_gazzfn_k$ = function () {
    return this.privateComments_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component12_gazzfm_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component13_gazzfl_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component14_gazzfk_k$ = function () {
    return this.gradeFilterChips_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component15_gazzfj_k$ = function () {
    return this.submissionHeaderUiState_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component16_gazzfi_k$ = function () {
    return this.unassignedError_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component17_gazzfh_k$ = function () {
    return this.submissionError_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component18_gazzfg_k$ = function () {
    return this.activeUserPersonUid_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component19_gazzff_k$ = function () {
    return this.activeUserPersonName_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component20_gazzet_k$ = function () {
    return this.activeUserPictureUri_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component21_gazzes_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component22_gazzer_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component23_gazzeq_k$ = function () {
    return this.dayOfWeekStringMap_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component24_gazzep_k$ = function () {
    return this.collapsedSubmissions_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component25_gazzeo_k$ = function () {
    return this.openingFileSubmissionState_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component26_gazzen_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).component27_gazzem_k$ = function () {
    return this.showSocialWarning_1;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).copy_vil1s0_k$ = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) {
    return new ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).copy$default_4g8ztp_k$ = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning, $super) {
    assignment = assignment === VOID ? this.assignment_1 : assignment;
    courseBlock = courseBlock === VOID ? this.courseBlock_1 : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? this.courseBlockPicture_1 : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? this.courseGroupSet_1 : courseGroupSet;
    submitterUid = submitterUid === VOID ? this.submitterUid_1 : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? this.editableSubmissionFiles_1 : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? this.submissionTooLong_1 : submissionTooLong;
    submissions = submissions === VOID ? this.submissions_1 : submissions;
    markList = markList === VOID ? this.markList_1 : markList;
    courseComments = courseComments === VOID ? this.courseComments_1 : courseComments;
    privateComments = privateComments === VOID ? this.privateComments_1 : privateComments;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.selectedChipId_1 : selectedChipId;
    gradeFilterChips = gradeFilterChips === VOID ? this.gradeFilterChips_1 : gradeFilterChips;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? this.submissionHeaderUiState_1 : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? this.unassignedError_1 : unassignedError;
    submissionError = submissionError === VOID ? this.submissionError_1 : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.activeUserPersonUid_1 : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? this.activeUserPersonName_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.activeUserPictureUri_1 : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? this.courseTerminology_1 : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? this.dayOfWeekStringMap_1 : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.collapsedSubmissions_1 : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? this.openingFileSubmissionState_1 : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? this.showModerateOptions_1 : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? this.showSocialWarning_1 : showSocialWarning;
    return $super === VOID ? this.copy_vil1s0_k$(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) : $super.copy_vil1s0_k$.call(this, assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).toString = function () {
    return 'ClazzAssignmentDetailOverviewUiState(assignment=' + this.assignment_1 + ', courseBlock=' + this.courseBlock_1 + ', courseBlockPicture=' + this.courseBlockPicture_1 + ', courseGroupSet=' + this.courseGroupSet_1 + ', submitterUid=' + this.submitterUid_1.toString() + ', editableSubmissionFiles=' + this.editableSubmissionFiles_1 + ', submissionTooLong=' + this.submissionTooLong_1 + ', submissions=' + this.submissions_1 + ', markList=' + this.markList_1 + ', courseComments=' + this.courseComments_1 + ', privateComments=' + this.privateComments_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', selectedChipId=' + this.selectedChipId_1 + ', gradeFilterChips=' + this.gradeFilterChips_1 + ', submissionHeaderUiState=' + this.submissionHeaderUiState_1 + ', unassignedError=' + this.unassignedError_1 + ', submissionError=' + this.submissionError_1 + ', activeUserPersonUid=' + this.activeUserPersonUid_1.toString() + ', activeUserPersonName=' + this.activeUserPersonName_1 + ', activeUserPictureUri=' + this.activeUserPictureUri_1 + ', courseTerminology=' + this.courseTerminology_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', dayOfWeekStringMap=' + this.dayOfWeekStringMap_1 + ', collapsedSubmissions=' + this.collapsedSubmissions_1 + ', openingFileSubmissionState=' + this.openingFileSubmissionState_1 + ', showModerateOptions=' + this.showModerateOptions_1 + ', showSocialWarning=' + this.showSocialWarning_1 + ')';
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hashCode = function () {
    var result = this.assignment_1 == null ? 0 : this.assignment_1.hashCode();
    result = imul(result, 31) + (this.courseBlock_1 == null ? 0 : this.courseBlock_1.hashCode()) | 0;
    result = imul(result, 31) + (this.courseBlockPicture_1 == null ? 0 : this.courseBlockPicture_1.hashCode()) | 0;
    result = imul(result, 31) + (this.courseGroupSet_1 == null ? 0 : hashCode(this.courseGroupSet_1)) | 0;
    result = imul(result, 31) + this.submitterUid_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.editableSubmissionFiles_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.submissionTooLong_1) | 0;
    result = imul(result, 31) + hashCode(this.submissions_1) | 0;
    result = imul(result, 31) + hashCode(this.markList_1) | 0;
    result = imul(result, 31) + hashCode(this.courseComments_1) | 0;
    result = imul(result, 31) + hashCode(this.privateComments_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + this.selectedChipId_1 | 0;
    result = imul(result, 31) + hashCode(this.gradeFilterChips_1) | 0;
    result = imul(result, 31) + this.submissionHeaderUiState_1.hashCode() | 0;
    result = imul(result, 31) + (this.unassignedError_1 == null ? 0 : getStringHashCode(this.unassignedError_1)) | 0;
    result = imul(result, 31) + (this.submissionError_1 == null ? 0 : getStringHashCode(this.submissionError_1)) | 0;
    result = imul(result, 31) + this.activeUserPersonUid_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.activeUserPersonName_1) | 0;
    result = imul(result, 31) + (this.activeUserPictureUri_1 == null ? 0 : getStringHashCode(this.activeUserPictureUri_1)) | 0;
    result = imul(result, 31) + (this.courseTerminology_1 == null ? 0 : hashCode(this.courseTerminology_1)) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStringMap_1) | 0;
    result = imul(result, 31) + hashCode(this.collapsedSubmissions_1) | 0;
    result = imul(result, 31) + (this.openingFileSubmissionState_1 == null ? 0 : this.openingFileSubmissionState_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showModerateOptions_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showSocialWarning_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.assignment_1, tmp0_other_with_cast.assignment_1))
      return false;
    if (!equals(this.courseBlock_1, tmp0_other_with_cast.courseBlock_1))
      return false;
    if (!equals(this.courseBlockPicture_1, tmp0_other_with_cast.courseBlockPicture_1))
      return false;
    if (!equals(this.courseGroupSet_1, tmp0_other_with_cast.courseGroupSet_1))
      return false;
    if (!this.submitterUid_1.equals(tmp0_other_with_cast.submitterUid_1))
      return false;
    if (!equals(this.editableSubmissionFiles_1, tmp0_other_with_cast.editableSubmissionFiles_1))
      return false;
    if (!(this.submissionTooLong_1 === tmp0_other_with_cast.submissionTooLong_1))
      return false;
    if (!equals(this.submissions_1, tmp0_other_with_cast.submissions_1))
      return false;
    if (!equals(this.markList_1, tmp0_other_with_cast.markList_1))
      return false;
    if (!equals(this.courseComments_1, tmp0_other_with_cast.courseComments_1))
      return false;
    if (!equals(this.privateComments_1, tmp0_other_with_cast.privateComments_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.selectedChipId_1 === tmp0_other_with_cast.selectedChipId_1))
      return false;
    if (!equals(this.gradeFilterChips_1, tmp0_other_with_cast.gradeFilterChips_1))
      return false;
    if (!this.submissionHeaderUiState_1.equals(tmp0_other_with_cast.submissionHeaderUiState_1))
      return false;
    if (!(this.unassignedError_1 == tmp0_other_with_cast.unassignedError_1))
      return false;
    if (!(this.submissionError_1 == tmp0_other_with_cast.submissionError_1))
      return false;
    if (!this.activeUserPersonUid_1.equals(tmp0_other_with_cast.activeUserPersonUid_1))
      return false;
    if (!(this.activeUserPersonName_1 === tmp0_other_with_cast.activeUserPersonName_1))
      return false;
    if (!(this.activeUserPictureUri_1 == tmp0_other_with_cast.activeUserPictureUri_1))
      return false;
    if (!equals(this.courseTerminology_1, tmp0_other_with_cast.courseTerminology_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!equals(this.dayOfWeekStringMap_1, tmp0_other_with_cast.dayOfWeekStringMap_1))
      return false;
    if (!equals(this.collapsedSubmissions_1, tmp0_other_with_cast.collapsedSubmissions_1))
      return false;
    if (!equals(this.openingFileSubmissionState_1, tmp0_other_with_cast.openingFileSubmissionState_1))
      return false;
    if (!(this.showModerateOptions_1 === tmp0_other_with_cast.showModerateOptions_1))
      return false;
    if (!(this.showSocialWarning_1 === tmp0_other_with_cast.showSocialWarning_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission) {
    editableSubmission = editableSubmission === VOID ? null : editableSubmission;
    this.editableSubmission_1 = editableSubmission;
  }
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).get_editableSubmission_xhwyhz_k$ = function () {
    return this.editableSubmission_1;
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).component1_7eebsc_k$ = function () {
    return this.editableSubmission_1;
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).copy_ixe4zv_k$ = function (editableSubmission) {
    return new ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission);
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).copy$default_kw28sq_k$ = function (editableSubmission, $super) {
    editableSubmission = editableSubmission === VOID ? this.editableSubmission_1 : editableSubmission;
    return $super === VOID ? this.copy_ixe4zv_k$(editableSubmission) : $super.copy_ixe4zv_k$.call(this, editableSubmission);
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).toString = function () {
    return 'ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission=' + this.editableSubmission_1 + ')';
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).hashCode = function () {
    return this.editableSubmission_1 == null ? 0 : this.editableSubmission_1.hashCode();
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailoverviewSubmissionUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? other : THROW_CCE();
    if (!equals(this.editableSubmission_1, tmp0_other_with_cast.editableSubmission_1))
      return false;
    return true;
  };
  function saveAndUploadUseCase$factory() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function ustadAccountManager$factory() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_0(receiver);
    }, null);
  }
  function saveAndUploadUseCase$factory_0() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory_0() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_0() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function ustadAccountManager$factory_0() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_0() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_0() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_0() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_0(receiver);
    }, null);
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).invoke_f29lti_k$ = function (noSubmissions, $completion) {
    var tmp = this.create_vh5neu_k$(noSubmissions, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          if (!this.noSubmissions_1 ? this.this$0__1._uiState_1.get_value_j01efc_k$().groupSetEnabled_1 : false) {
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, false);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).create_vh5neu_k$ = function (noSubmissions, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.noSubmissions_1 = noSubmissions;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (noSubmissions, $completion) {
      return i.invoke_f29lti_k$(noSubmissions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeDb_bu92wd_k$().courseAssignmentSubmissionDao_y3yq7y_k$();
            var tmp0_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caUid_ipktt5_k$();
            var tmp_1 = tmp_0.checkNoSubmissionsMadeFlow_jyb7jn_k$(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this.this$0__1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_courseBlock_c2ojbd_k$();
          this.this$0__1.onCourseBlockChanged_5agehr_k$(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.copy$default_rhvmtp_k$(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda($groupSet) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_caGroupUid_zfz5m6_k$($groupSet.get_cgsUid_bvuqtm_k$());
      return Unit_getInstance();
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = tmp_0 instanceof CourseGroupSet ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var groupSet = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp3_safe_receiver = prevValue.get_entity_cxtlv0_k$();
              var tmp_2;
              if (tmp3_safe_receiver == null) {
                tmp_2 = null;
              } else {
                var tmp0_safe_receiver = prevValue.get_entity_cxtlv0_k$();
                var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
                var tmp_3;
                if (tmp1_safe_receiver == null) {
                  tmp_3 = null;
                } else {
                  tmp_3 = shallowCopy_5(tmp1_safe_receiver, ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda(groupSet));
                }
                var tmp_4 = tmp_3;
                var tmp_5;
                if (!groupSet.get_cgsUid_bvuqtm_k$().equals(new Long(0, 0))) {
                  tmp_5 = groupSet;
                } else {
                  tmp_5 = null;
                }
                var tmp2_safe_receiver = tmp_5;
                tmp_2 = tmp3_safe_receiver.copy$default_8ye1e3_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_4, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_cgsName_d9s72p_k$());
              }
              var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.courseBlockEditUiState_1.copy$default_9sg25b_k$(tmp_2), VOID, null);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.this$0__1;
          var entity = newState.get_entity_cxtlv0_k$();
          var serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
          var commitDelay = new Long(200, 0);
          var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
          var tmp0_safe_receiver_0 = this_1.get_saveStateJob_pa13yq_k$();
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.cancel$default_8haxne_k$();
          }
          var tmp_6 = this_1.get_viewModelScope_ryv1dz_k$();
          this_1.set_saveStateJob_g1ttuu_k$(launch(tmp_6, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2(commitDelay, entity, this_1, key, serializer, null)));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? isInterface(tmp_0, List) : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var allocations = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver = prevValue.courseBlockEditUiState_1.get_block_ip8l7o_k$();
              var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.courseBlockEditUiState_1.copy$default_9sg25b_k$(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_8ye1e3_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, allocations)));
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.this$0__1;
          var entity = newState.get_entity_cxtlv0_k$();
          var serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
          var commitDelay = new Long(200, 0);
          var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
          var tmp0_safe_receiver_0 = this_1.get_saveStateJob_pa13yq_k$();
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.cancel$default_8haxne_k$();
          }
          var tmp_2 = this_1.get_viewModelScope_ryv1dz_k$();
          this_1.set_saveStateJob_g1ttuu_k$(launch(tmp_2, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4(commitDelay, entity, this_1, key, serializer, null)));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).create_h5keyk_k$ = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).invoke_u6an3_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_u6an3_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_u6an3_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).invoke_48r9su_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_48r9su_k$($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var assignmentUid = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextId_8yjjmy_k$(Companion_getInstance_10().get_TABLE_ID_xo2mej_k$());
          var this_0 = new CourseBlock();
          this_0.set_cbUid_qoojw6_k$(get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextId_8yjjmy_k$(Companion_getInstance_19().get_TABLE_ID_xo2mej_k$()));
          this_0.set_cbType_tflke_k$(Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$());
          this_0.set_cbEntityUid_m0t7oz_k$(assignmentUid);
          this_0.set_cbCompletionCriteria_jl4izz_k$(Companion_getInstance_10().get_COMPLETION_CRITERIA_GRADED_kqi9ot_k$());
          this_0.set_cbMaxPoints_fbqjqu_k$(10.0);
          this_0.set_cbMinPoints_5fzt3w_k$(0.0);
          var this_1 = new ClazzAssignment();
          this_1.set_caUid_qwqlvb_k$(assignmentUid);
          this_1.set_caClazzUid_5omoyd_k$(this.this$0__1.clazzUid_1);
          return new CourseBlockAndEditEntities(this_0, VOID, VOID, VOID, VOID, VOID, VOID, this_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda_1(this.this$0__1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_48r9su_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$lambda($savedStateHandle, this$0, $courseTerminology) {
    return function (it) {
      var groupSubmissionOn = $savedStateHandle.get_6bo4tg_k$('groupSubmissionOn');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = prevValue.courseBlockEditUiState_1.copy$default_9sg25b_k$(it);
          var tmp4_elvis_lhs = groupSubmissionOn == null ? null : toBoolean(groupSubmissionOn);
          var tmp_0;
          if (tmp4_elvis_lhs == null) {
            var tmp2_safe_receiver = it == null ? null : it.get_assignment_378p7u_k$();
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_caGroupUid_zf52s8_k$();
            var tmp_1;
            if (tmp3_safe_receiver == null) {
              tmp_1 = null;
            } else {
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
              tmp_1 = !tmp3_safe_receiver.equals(new Long(0, 0));
            }
            tmp_0 = tmp_1;
          } else {
            tmp_0 = tmp4_elvis_lhs;
          }
          var tmp5_elvis_lhs = tmp_0;
          var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, $courseTerminology, VOID, VOID, tmp, tmp5_elvis_lhs == null ? false : tmp5_elvis_lhs);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).invoke_t04clr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_t04clr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.this$0__1.get_json_woos35_k$();
          var value = this.this$0__1._uiState_1.get_value_j01efc_k$();
          var this_1 = this_0.get_serializersModule_piitvg_k$();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzAssignmentEditUiState), arrayOf([]), false));
          return this_0.encodeToString_k0apqx_k$(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this.this$0__1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_t04clr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_navResultReturner_jwjn90_k$(), Companion_getInstance_209().get_KEY_HTML_DESCRIPTION_ylwexd_k$());
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_navResultReturner_jwjn90_k$(), 'groupSet');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_navResultReturner_jwjn90_k$(), 'peerAllocationsResult');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation) {
    this.this$0__1 = this$0;
    this.$initStateJson_1 = $initStateJson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).invoke_x6cd8n_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_x6cd8n_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return this.this$0__1.get_json_woos35_k$().decodeFromString_jwu9sq_k$(Companion_getInstance_186().serializer_9w0wvi_k$(), this.$initStateJson_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$initStateJson_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this$0, $initStateJson, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_x6cd8n_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$lambda($this$shallowCopy) {
    $this$shallowCopy.set_caGroupUid_zfz5m6_k$(new Long(0, 0));
    return Unit_getInstance();
  }
  function _get__uiState__8e9jsd_13($this) {
    return $this._uiState_1;
  }
  function _get_snackDisaptcher__bp310a($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.snackDisaptcher$delegate_1;
    snackDisaptcher$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_clazzUid__rrng1f_7($this) {
    return $this.clazzUid_1;
  }
  function hasErrors_0(_this__u8e3s4, $this) {
    return ((((((!(_this__u8e3s4.submissionRequiredError_1 == null) ? true : !(_this__u8e3s4.courseBlockEditUiState_1.get_caMaxPointsError_df0hpk_k$() == null)) ? true : !(_this__u8e3s4.courseBlockEditUiState_1.get_caDeadlineError_lep2qf_k$() == null)) ? true : !(_this__u8e3s4.courseBlockEditUiState_1.get_caGracePeriodError_weo8ay_k$() == null)) ? true : !(_this__u8e3s4.reviewerCountError_1 == null)) ? true : !(_this__u8e3s4.sizeLimitError_1 == null)) ? true : !(_this__u8e3s4.groupSetError_1 == null)) ? true : _this__u8e3s4.courseBlockEditUiState_1.get_hasErrors_2nabd0_k$();
  }
  function checkNoSubmissionsMade($this, $completion) {
    var tmp = $this.get_activeDb_bu92wd_k$().courseAssignmentSubmissionDao_y3yq7y_k$();
    var tmp0_safe_receiver = $this._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caUid_ipktt5_k$();
    return tmp.checkNoSubmissionsMadeAsync_wzh4fv_k$(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, $completion);
  }
  function Companion_124() {
    Companion_instance_124 = this;
    this.RESULT_KEY_GROUPSET_1 = 'groupSet';
    this.RESULT_KEY_PEER_REVIEW_ALLOCATIONS_1 = 'peerAllocationsResult';
    this.ARG_TERMINOLOGY_1 = 'terminology';
    this.DEST_NAME_1 = 'CourseAssignmentEdit';
    this.ATTACHMENT_LIMIT_MIN_1 = 5;
    this.ATTACHMENT_LIMIT_MAX_1 = 100;
    this.STATE_KEY_GROUP_SUBMISSION_ON_1 = 'groupSubmissionOn';
  }
  protoOf(Companion_124).get_RESULT_KEY_GROUPSET_uneews_k$ = function () {
    return this.RESULT_KEY_GROUPSET_1;
  };
  protoOf(Companion_124).get_RESULT_KEY_PEER_REVIEW_ALLOCATIONS_cucb5c_k$ = function () {
    return this.RESULT_KEY_PEER_REVIEW_ALLOCATIONS_1;
  };
  protoOf(Companion_124).get_ARG_TERMINOLOGY_f9vilb_k$ = function () {
    return this.ARG_TERMINOLOGY_1;
  };
  protoOf(Companion_124).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_124).get_ATTACHMENT_LIMIT_MIN_u7um3_k$ = function () {
    return this.ATTACHMENT_LIMIT_MIN_1;
  };
  protoOf(Companion_124).get_ATTACHMENT_LIMIT_MAX_u7ufh_k$ = function () {
    return this.ATTACHMENT_LIMIT_MAX_1;
  };
  protoOf(Companion_124).get_STATE_KEY_GROUP_SUBMISSION_ON_dhr6jf_k$ = function () {
    return this.STATE_KEY_GROUP_SUBMISSION_ON_1;
  };
  var Companion_instance_124;
  function Companion_getInstance_185() {
    if (Companion_instance_124 == null)
      new Companion_124();
    return Companion_instance_124;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_16(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_16).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzAssignmentEditViewModel$_init_$lambda_wdhfey(db, systemImpl) {
    return new UpdatePeerReviewAllocationUseCase(db, systemImpl);
  }
  function ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, 'terminology', Companion_getInstance_44().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.courseTerminology0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = Companion_getInstance_41().serializer_9w0wvi_k$();
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda_2(this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzAssignmentEditViewModel$slambda$lambda(this.$savedStateHandle_1, this.this$0__1, this.courseTerminology0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_160().get_KEY_INIT_STATE_mwep3f_k$()) == null) {
              this.ARGUMENT1__1 = Companion_getInstance_160().get_KEY_INIT_STATE_mwep3f_k$();
              this.set_state_rjd8d0_k$(3);
              var tmp_3 = Dispatchers_getInstance().get_Default_goqax4_k$();
              suspendResult = withContext(tmp_3, ClazzAssignmentEditViewModel$slambda$slambda_4(this.this$0__1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.$savedStateHandle_1.set_wua6pr_k$(this.ARGUMENT1__1, ARGUMENT);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copyWithFieldsEnabledSet_2mddww_k$(true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp_4 = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
                var tmp_5 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_done_wokv63_k$());
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, tmp_4, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, ClazzAssignmentEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.$this$launch_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_6(this.this$0__1, null));
            launch(this.$this$launch_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_8(this.this$0__1, null));
            launch(this.$this$launch_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_10(this.this$0__1, null));
            launch(this.$this$launch_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_12(this.this$0__1, null));
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copyWithFieldsEnabledSet_2mddww_k$(true);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(11);
            this.tmp0_safe_receiver0__1 = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_KEY_INIT_STATE_mwep3f_k$());
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.this2__1 = this.tmp0_safe_receiver0__1;
              var tmp_1 = this;
              tmp_1.initStateJson3__1 = this.this2__1;
              this.set_state_rjd8d0_k$(1);
              var tmp_2 = Dispatchers_getInstance().get_Default_goqax4_k$();
              suspendResult = withContext(tmp_2, ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.initStateJson3__1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.tmp1_elvis_lhs4__1 = this.WHEN_RESULT1__1;
            var tmp_3 = this;
            var tmp_4;
            if (this.tmp1_elvis_lhs4__1 == null) {
              return Unit_getInstance();
            } else {
              tmp_4 = this.tmp1_elvis_lhs4__1;
            }

            tmp_3.initState5__1 = tmp_4;
            var tmp_5 = this;
            var tmp2_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_assignment_378p7u_k$();
            var tmp_6;
            if (tmp3_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_6 = tmp3_elvis_lhs;
            }

            tmp_5.assignment6__1 = tmp_6;
            var tmp_7 = this;
            var tmp4_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_courseBlock_c2ojbd_k$();
            var tmp_8;
            if (tmp5_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_8 = tmp5_elvis_lhs;
            }

            tmp_7.courseBlock7__1 = tmp_8;
            if (!this.assignment6__1.get_caRequireFileSubmission_w8j1mu_k$() ? !this.assignment6__1.get_caRequireTextSubmission_bngh2v_k$() : false) {
              l$ret$1: do {
                var this_0 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_0.get_value_j01efc_k$();
                  var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_text_file_submission_error_ngib3j_k$()));
                  if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            }

            var it = this.courseBlock7__1.get_cbMaxPoints_s83kbl_k$();
            if (it == null ? true : it <= 0.0) {
              l$ret$3: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_0 = this_1.get_value_j01efc_k$();
                  var nextValue_0 = prevValue_0.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.courseBlockEditUiState_1.copy$default_9sg25b_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$())));
                  if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.courseBlock7__1.get_cbDeadlineDate_nvh1aq_k$().compareTo_9jj042_k$(this.courseBlock7__1.get_cbHideUntilDate_7s19tu_k$()) <= 0) {
              l$ret$5: do {
                var this_2 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_1 = this_2.get_value_j01efc_k$();
                  var nextValue_1 = prevValue_1.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.courseBlockEditUiState_1.copy$default_9sg25b_k$(VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_end_is_before_start_error_iebdqr_k$())));
                  if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
            }

            if (this.courseBlock7__1.get_cbGracePeriodDate_kapsrj_k$().compareTo_9jj042_k$(this.courseBlock7__1.get_cbDeadlineDate_nvh1aq_k$()) < 0) {
              l$ret$7: do {
                var this_3 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_2 = this_3.get_value_j01efc_k$();
                  var nextValue_2 = prevValue_2.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_2.courseBlockEditUiState_1.copy$default_9sg25b_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_after_deadline_date_error_9ovwtu_k$())));
                  if (this_3.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
            }

            var containsArg = this.assignment6__1.get_caSizeLimit_60e6st_k$();
            if (!(5 <= containsArg ? containsArg <= 100 : false)) {
              l$ret$9: do {
                var this_4 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_3 = this_4.get_value_j01efc_k$();
                  var nextValue_3 = prevValue_3.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().formatString_qr9zmw_k$(strings_getInstance().get_size_limit_error_z4ombz_k$(), ['5', '100']));
                  if (this_4.compareAndSet_l3595a_k$(prevValue_3, nextValue_3)) {
                    break l$ret$9;
                  }
                }
              }
               while (false);
            }

            var this_5 = this.courseBlock7__1.get_cbTitle_ag03f4_k$();
            if (this_5 == null ? true : isBlank(this_5)) {
              l$ret$11: do {
                var this_6 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_4 = this_6.get_value_j01efc_k$();
                  var nextValue_4 = prevValue_4.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_4.courseBlockEditUiState_1.copy$default_9sg25b_k$(VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_required_wq3z3c_k$())));
                  if (this_6.compareAndSet_l3595a_k$(prevValue_4, nextValue_4)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
            }

            if (this.this$0__1._uiState_1.get_value_j01efc_k$().groupSubmissionOn_1 ? this.assignment6__1.get_caGroupUid_zf52s8_k$().equals(new Long(0, 0)) : false) {
              l$ret$13: do {
                var this_7 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_5 = this_7.get_value_j01efc_k$();
                  var nextValue_5 = prevValue_5.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
                  if (this_7.compareAndSet_l3595a_k$(prevValue_5, nextValue_5)) {
                    break l$ret$13;
                  }
                }
              }
               while (false);
            }

            this.errorSnack8__1 = null;
            var tmp6_safe_receiver = this.initState5__1.get_entity_cxtlv0_k$();
            var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.get_assignment_378p7u_k$();
            if (!equals(tmp7_safe_receiver == null ? null : tmp7_safe_receiver.get_caGroupUid_zf52s8_k$(), this.assignment6__1.get_caGroupUid_zf52s8_k$())) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = checkNoSubmissionsMade(this.this$0__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT9__1 = false;
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            this.ARGUMENT10__1 = suspendResult;
            this.WHEN_RESULT9__1 = !this.ARGUMENT10__1;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            if (this.WHEN_RESULT9__1) {
              this.errorSnack8__1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) + 'Cannot change groups after submissions made';
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 5:
            var tmp_9;
            var tmp8_safe_receiver = this.initState5__1.get_entity_cxtlv0_k$();
            var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.get_assignment_378p7u_k$();
            if (!((tmp9_safe_receiver == null ? null : tmp9_safe_receiver.get_caMarkingType_qumoa0_k$()) === this.assignment6__1.get_caMarkingType_qumoa0_k$())) {
              tmp_9 = this.errorSnack8__1 == null;
            } else {
              tmp_9 = false;
            }

            if (tmp_9) {
              this.set_state_rjd8d0_k$(6);
              suspendResult = checkNoSubmissionsMade(this.this$0__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT11__1 = false;
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

          case 6:
            this.ARGUMENT12__1 = suspendResult;
            this.WHEN_RESULT11__1 = !this.ARGUMENT12__1;
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            if (this.WHEN_RESULT11__1) {
              this.errorSnack8__1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) + 'Cannot change marking type after submissions made';
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            }

          case 8:
            if (this.assignment6__1.get_caMarkingType_qumoa0_k$() === Companion_getInstance_10().get_MARKED_BY_PEERS_w4tbtf_k$() ? this.assignment6__1.get_caPeerReviewerCount_xdajq7_k$() < 1 : false) {
              l$ret$15: do {
                var this_8 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_6 = this_8.get_value_j01efc_k$();
                  var nextValue_6 = prevValue_6.copy$default_brzekt_k$(VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_score_greater_than_zero_vlrrqj_k$()));
                  if (this_8.compareAndSet_l3595a_k$(prevValue_6, nextValue_6)) {
                    break l$ret$15;
                  }
                }
              }
               while (false);
            }

            this.errorSnackVal13__1 = this.errorSnack8__1;
            if (hasErrors_0(this.this$0__1._uiState_1.get_value_j01efc_k$(), this.this$0__1) ? true : !(this.errorSnackVal13__1 == null)) {
              var tmp10_safe_receiver = this.errorSnackVal13__1;
              if (tmp10_safe_receiver == null)
                null;
              else {
                _get_snackDisaptcher__bp310a(this.this$0__1).showSnackBar_r6iyg6_k$(new Snack(tmp10_safe_receiver));
              }
              return Unit_getInstance();
            }

            var tmp_10;
            if (this.assignment6__1.get_caMarkingType_qumoa0_k$() === Companion_getInstance_10().get_MARKED_BY_PEERS_w4tbtf_k$()) {
              var tmp11_safe_receiver = this.initState5__1.get_entity_cxtlv0_k$();
              var tmp12_safe_receiver = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.get_assignment_378p7u_k$();
              tmp_10 = !((tmp12_safe_receiver == null ? null : tmp12_safe_receiver.get_caPeerReviewerCount_xdajq7_k$()) === this.assignment6__1.get_caPeerReviewerCount_xdajq7_k$());
            } else {
              tmp_10 = false;
            }

            if (tmp_10) {
              this.set_state_rjd8d0_k$(9);
              var tmp_11 = this.this$0__1.peerReviewAllocationUseCaseFactory_1(this.this$0__1.get_activeDb_bu92wd_k$(), this.this$0__1.get_systemImpl_9jowp4_k$());
              var tmp13_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
              var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.get_assignmentPeerAllocations_1edap1_k$();
              suspendResult = tmp_11.invoke$default_2sne0i_k$(tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs, this.assignment6__1.get_caGroupUid_zf52s8_k$(), this.assignment6__1.get_caClazzUid_wf7rj5_k$(), this.assignment6__1.get_caUid_ipktt5_k$(), this.assignment6__1.get_caPeerReviewerCount_xdajq7_k$(), true, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(10);
              continue $sm;
            }

          case 9:
            var newAllocations = suspendResult;
            l$ret$17: do {
              var this_9 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_7 = this_9.get_value_j01efc_k$();
                var tmp0_safe_receiver = prevValue_7.courseBlockEditUiState_1.get_block_ip8l7o_k$();
                var nextValue_7 = prevValue_7.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_7.courseBlockEditUiState_1.copy$default_9sg25b_k$(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_8ye1e3_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, newAllocations)));
                if (this_9.compareAndSet_l3595a_k$(prevValue_7, nextValue_7)) {
                  break l$ret$17;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(10);
            continue $sm;
          case 10:
            var this_10 = this.this$0__1._uiState_1;
            var tmp_12;
            var tmp_13;
            var tmp0_safe_receiver_0 = this_10.get_value_j01efc_k$().get_entity_cxtlv0_k$();
            var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_assignment_378p7u_k$();
            if (!equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caGroupUid_zf52s8_k$(), new Long(0, 0))) {
              tmp_13 = !this_10.get_value_j01efc_k$().groupSubmissionOn_1;
            } else {
              tmp_13 = false;
            }

            if (tmp_13) {
              tmp_12 = this_10;
            } else {
              tmp_12 = null;
            }

            var tmp15_safe_receiver = tmp_12;
            if (tmp15_safe_receiver == null)
              null;
            else {
              l$ret$19: do {
                while (true) {
                  var prevValue_8 = tmp15_safe_receiver.get_value_j01efc_k$();
                  var tmp1_safe_receiver_0 = prevValue_8.courseBlockEditUiState_1.get_block_ip8l7o_k$();
                  var tmp_14;
                  if (tmp1_safe_receiver_0 == null) {
                    tmp_14 = null;
                  } else {
                    var tmp0_safe_receiver_1 = prevValue_8.courseBlockEditUiState_1.get_block_ip8l7o_k$().get_assignment_378p7u_k$();
                    var tmp_15;
                    if (tmp0_safe_receiver_1 == null) {
                      tmp_15 = null;
                    } else {
                      tmp_15 = shallowCopy_5(tmp0_safe_receiver_1, ClazzAssignmentEditViewModel$onClickSave$slambda$lambda);
                    }
                    tmp_14 = tmp1_safe_receiver_0.copy$default_8ye1e3_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_15, null);
                  }
                  var nextValue_8 = prevValue_8.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_8.courseBlockEditUiState_1.copy$default_9sg25b_k$(tmp_14));
                  if (tmp15_safe_receiver.compareAndSet_l3595a_k$(prevValue_8, nextValue_8)) {
                    break l$ret$19;
                  }
                }
              }
               while (false);
            }

            this.this$0__1.finishWithResult_jlqwtj_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$());
            return Unit_getInstance();
          case 11:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 11) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzAssignmentEditViewModel$onClickSave$slambda(this.this$0__1, completion);
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel(di, savedStateHandle, peerReviewAllocationUseCaseFactory) {
    Companion_getInstance_185();
    var tmp;
    if (peerReviewAllocationUseCaseFactory === VOID) {
      tmp = ClazzAssignmentEditViewModel$_init_$lambda_wdhfey;
    } else {
      tmp = peerReviewAllocationUseCaseFactory;
    }
    peerReviewAllocationUseCaseFactory = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseAssignmentEdit');
    this.peerReviewAllocationUseCaseFactory_1 = peerReviewAllocationUseCaseFactory;
    var tmp_0 = this;
    var tmp0_completionCriteriaOptions = Companion_getInstance_186().ASSIGNMENT_COMPLETION_CRITERIAS_1;
    var tmp1_timeZone = Companion_getInstance_35().currentSystemDefault_9rduv_k$().get_id_kntnx8_k$();
    tmp_0._uiState_1 = MutableStateFlow(new ClazzAssignmentEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, new CourseBlockEditUiState(VOID, VOID, tmp0_completionCriteriaOptions, VOID, VOID, VOID, VOID, VOID, true, VOID, tmp1_timeZone)));
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.snackDisaptcher$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, snackDisaptcher$factory());
    var tmp_3 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_145().get_INDETERMINATE_a8koem_k$();
        var tmp1_title = this.createEditTitle_2tyyvi_k$(strings_getInstance().get_new_assignment_lyov1n_k$(), strings_getInstance().get_edit_assignment_38q7nd_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, tmp0_loadingState, tmp1_title, VOID, true, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_4 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_4, VOID, VOID, ClazzAssignmentEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ClazzAssignmentEditViewModel).get_peerReviewAllocationUseCaseFactory_rkfo3a_k$ = function () {
    return this.peerReviewAllocationUseCaseFactory_1;
  };
  protoOf(ClazzAssignmentEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzAssignmentEditViewModel).onClickEditDescription_s23iqh_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
    this.navigateToEditHtml$default_imw6oe_k$(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cbDescription_asqepg_k$(), Companion_getInstance_209().get_KEY_HTML_DESCRIPTION_ylwexd_k$(), this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_description_emjre5_k$()));
  };
  protoOf(ClazzAssignmentEditViewModel).onGroupSubmissionOnChanged_ujn3f0_k$ = function (groupSubmissionOn) {
    this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('groupSubmissionOn', groupSubmissionOn.toString());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onGroupSubmissionOnChanged.<anonymous>' call
        var tmp;
        if (!(prevValue.groupSetError_1 == null) ? groupSubmissionOn : false) {
          tmp = prevValue.groupSetError_1;
        } else {
          tmp = null;
        }
        var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, groupSubmissionOn, tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentEditViewModel).onAssignmentChanged_be0413_k$ = function (assignment) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onAssignmentChanged.<anonymous>' call
        var tmp8_safe_receiver = prevValue.courseBlockEditUiState_1.get_block_ip8l7o_k$();
        var tmp9_courseBlockEditUiState = prevValue.courseBlockEditUiState_1.copy$default_9sg25b_k$(tmp8_safe_receiver == null ? null : tmp8_safe_receiver.copy$default_8ye1e3_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, assignment));
        var tmp;
        var tmp_0;
        if (!(prevValue.sizeLimitError_1 == null)) {
          var tmp_1 = assignment == null ? null : assignment.get_caSizeLimit_60e6st_k$();
          var tmp6_safe_receiver = prevValue.get_entity_cxtlv0_k$();
          var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.get_assignment_378p7u_k$();
          tmp_0 = tmp_1 == (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.get_caSizeLimit_60e6st_k$());
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.sizeLimitError_1;
        } else {
          tmp = null;
        }
        var tmp10_sizeLimitError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.submissionRequiredError_1 == null)) {
          tmp_4 = (assignment == null ? null : assignment.get_caRequireFileSubmission_w8j1mu_k$()) === false;
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = !assignment.get_caRequireTextSubmission_bngh2v_k$();
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.submissionRequiredError_1;
        } else {
          tmp_2 = null;
        }
        var tmp11_submissionRequiredError = tmp_2;
        var tmp_5;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.reviewerCountError_1 == null)) {
          var tmp_8 = assignment == null ? null : assignment.get_caPeerReviewerCount_xdajq7_k$();
          var tmp1_safe_receiver = prevValue.get_entity_cxtlv0_k$();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_assignment_378p7u_k$();
          tmp_7 = tmp_8 == (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_caPeerReviewerCount_xdajq7_k$());
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          tmp_6 = (assignment == null ? null : assignment.get_caMarkingType_qumoa0_k$()) === Companion_getInstance_10().get_MARKED_BY_PEERS_w4tbtf_k$();
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = prevValue.reviewerCountError_1;
        } else {
          tmp_5 = null;
        }
        var tmp12_reviewerCountError = tmp_5;
        var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, tmp12_reviewerCountError, VOID, tmp11_submissionRequiredError, tmp10_sizeLimitError, tmp9_courseBlockEditUiState);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.get_entity_cxtlv0_k$();
    var serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp_9 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_9, VOID, VOID, ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(ClazzAssignmentEditViewModel).onCourseBlockChanged_5agehr_k$ = function (courseBlock) {
    if (courseBlock == null) {
      Napier_getInstance().w$default_p42du4_k$('Change courseblock shoudl not really be null');
      return Unit_getInstance();
    }
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onCourseBlockChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.get_entity_cxtlv0_k$();
        var prevBlock = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
        var tmp8_$this = prevValue.courseBlockEditUiState_1;
        var tmp1_safe_receiver = prevValue.get_entity_cxtlv0_k$();
        var tmp9_block = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.copy$default_8ye1e3_k$(courseBlock);
        var tmp5_safe_receiver = prevValue.courseBlockEditUiState_1.get_block_ip8l7o_k$();
        var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.get_courseBlock_c2ojbd_k$();
        var tmp10_caMaxPointsError = this.updateErrorMessageOnChange_silrgy_k$(tmp6_safe_receiver == null ? null : tmp6_safe_receiver.get_cbMaxPoints_s83kbl_k$(), courseBlock.get_cbMaxPoints_s83kbl_k$(), prevValue.courseBlockEditUiState_1.get_caMaxPointsError_df0hpk_k$());
        var tmp;
        var tmp_0;
        var tmp_1;
        if (!(prevValue.courseBlockEditUiState_1.get_caDeadlineError_lep2qf_k$() == null)) {
          tmp_1 = equals(prevBlock == null ? null : prevBlock.get_cbDeadlineDate_nvh1aq_k$(), courseBlock.get_cbDeadlineDate_nvh1aq_k$());
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp_0 = prevBlock.get_cbHideUntilDate_7s19tu_k$().equals(courseBlock.get_cbHideUntilDate_7s19tu_k$());
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.courseBlockEditUiState_1.get_caDeadlineError_lep2qf_k$();
        } else {
          tmp = null;
        }
        var tmp11_caDeadlineError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.courseBlockEditUiState_1.get_caGracePeriodError_weo8ay_k$() == null)) {
          tmp_4 = equals(prevBlock == null ? null : prevBlock.get_cbDeadlineDate_nvh1aq_k$(), courseBlock.get_cbDeadlineDate_nvh1aq_k$());
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = prevBlock.get_cbGracePeriodDate_kapsrj_k$().equals(courseBlock.get_cbGracePeriodDate_kapsrj_k$());
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.courseBlockEditUiState_1.get_caGracePeriodError_weo8ay_k$();
        } else {
          tmp_2 = null;
        }
        var tmp12_caGracePeriodError = tmp_2;
        var tmp2_safe_receiver = prevValue.courseBlockEditUiState_1.get_block_ip8l7o_k$();
        var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_courseBlock_c2ojbd_k$();
        var tmp13_caTitleError = this.updateErrorMessageOnChange_silrgy_k$(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_cbTitle_ag03f4_k$(), courseBlock.get_cbTitle_ag03f4_k$(), prevValue.courseBlockEditUiState_1.get_caTitleError_zef6eh_k$());
        var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp8_$this.copy$default_9sg25b_k$(tmp9_block, VOID, VOID, VOID, VOID, tmp13_caTitleError, tmp11_caDeadlineError, tmp10_caMaxPointsError, VOID, tmp12_caGracePeriodError));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.get_entity_cxtlv0_k$();
    var serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_5 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_5, VOID, VOID, ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(ClazzAssignmentEditViewModel).onPictureChanged_tcb4ji_k$ = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.courseBlockEditUiState_1.get_block_ip8l7o_k$();
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.courseBlockEditUiState_1.get_block_ip8l7o_k$().get_courseBlockPicture_gnlyiz_k$();
          tmp = tmp1_safe_receiver.copy$default_8ye1e3_k$(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_gigcpw_k$(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.copy$default_brzekt_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.courseBlockEditUiState_1.copy$default_9sg25b_k$(tmp));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.get_entity_cxtlv0_k$();
    var serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_0, VOID, VOID, ClazzAssignmentEditViewModel$onPictureChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(ClazzAssignmentEditViewModel).onClickSubmissionType_2nzfvj_k$ = function () {
    var tmp = Companion_getInstance_214().get_DEST_NAME_gmgk7z_k$();
    var tmp_0 = serializer_0(StringCompanionObject_getInstance());
    var tmp_1 = Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$();
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caClazzUid_wf7rj5_k$();
    this.navigateForResult$default_qg960j_k$(tmp, 'groupSet', null, tmp_0, mapOf_0(to(tmp_1, (tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs).toString())));
  };
  protoOf(ClazzAssignmentEditViewModel).onClickAssignReviewers_eckzja_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
    var tmp;
    if (tmp1_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var assignmentVal = tmp;
    var tmp_0 = Companion_getInstance_187().get_DEST_NAME_gmgk7z_k$();
    var tmp_1 = ListSerializer(Companion_getInstance_21().serializer_9w0wvi_k$());
    var tmp_2 = Companion_getInstance_187().get_ARG_ALLOCATIONS_u72qyp_k$();
    var tmp_3 = this.get_json_woos35_k$();
    var tmp_4 = ListSerializer(Companion_getInstance_21().serializer_9w0wvi_k$());
    var tmp2_safe_receiver = this._uiState_1.get_value_j01efc_k$().get_entity_cxtlv0_k$();
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_assignmentPeerAllocations_1edap1_k$();
    this.navigateForResult$default_qg960j_k$(tmp_0, 'peerAllocationsResult', null, tmp_1, mapOf([to(tmp_2, tmp_3.encodeToString_k0apqx_k$(tmp_4, tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs)), to(Companion_getInstance_187().get_ARG_GROUP_SET_UID_hs1yox_k$(), assignmentVal.get_caGroupUid_zf52s8_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), assignmentVal.get_caClazzUid_wf7rj5_k$().toString()), to(Companion_getInstance_187().get_ARG_NUM_REVIEWERS_PER_SUBMITTER_4th9rp_k$(), assignmentVal.get_caPeerReviewerCount_xdajq7_k$().toString()), to(Companion_getInstance_156().get_ARG_CLAZZ_ASSIGNMENT_UID_n6bn4n_k$(), assignmentVal.get_caUid_ipktt5_k$().toString())]));
  };
  protoOf(ClazzAssignmentEditViewModel).onClickSave_ncak3a_k$ = function () {
    if (!this._uiState_1.get_value_j01efc_k$().fieldsEnabled_1)
      return Unit_getInstance();
    var tmp = ClazzAssignmentEditViewModel$onClickSave$lambda(this);
    this.launchWithLoadingIndicator_qcafqw_k$(tmp, ClazzAssignmentEditViewModel$onClickSave$slambda_0(this, null));
  };
  function Companion_125() {
    Companion_instance_125 = this;
    this.ASSIGNMENT_COMPLETION_CRITERIAS_1 = listOf([CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()]);
  }
  protoOf(Companion_125).get_ASSIGNMENT_COMPLETION_CRITERIAS_5furga_k$ = function () {
    return this.ASSIGNMENT_COMPLETION_CRITERIAS_1;
  };
  protoOf(Companion_125).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_69();
  };
  var Companion_instance_125;
  function Companion_getInstance_186() {
    if (Companion_instance_125 == null)
      new Companion_125();
    return Companion_instance_125;
  }
  function $serializer_59() {
    $serializer_instance_59 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditUiState', this, 10);
    tmp0_serialDesc.addElement_5pzumi_k$('fieldsEnabled', true);
    tmp0_serialDesc.addElement_5pzumi_k$('markingTypeEnabled', true);
    tmp0_serialDesc.addElement_5pzumi_k$('groupSetEnabled', true);
    tmp0_serialDesc.addElement_5pzumi_k$('reviewerCountError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('courseTerminology', true);
    tmp0_serialDesc.addElement_5pzumi_k$('submissionRequiredError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('sizeLimitError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('courseBlockEditUiState', true);
    tmp0_serialDesc.addElement_5pzumi_k$('groupSubmissionOn', true);
    tmp0_serialDesc.addElement_5pzumi_k$('groupSetError', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_59).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_59).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_8()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_71(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_59).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = false;
    var tmp6_local2 = false;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp14_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, $serializer_getInstance_8(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp14_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 7, $serializer_getInstance_71(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp14_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, $serializer_getInstance_8(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp14_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 7, $serializer_getInstance_71(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp14_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp14_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp14_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ClazzAssignmentEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null);
  };
  protoOf($serializer_59).serialize_gfpq9b_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.fieldsEnabled_1 === false)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 0, value.fieldsEnabled_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.markingTypeEnabled_1 === true)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 1, value.markingTypeEnabled_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.groupSetEnabled_1 === true)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 2, value.groupSetEnabled_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.reviewerCountError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 3, StringSerializer_getInstance(), value.reviewerCountError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.courseTerminology_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, $serializer_getInstance_8(), value.courseTerminology_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.submissionRequiredError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, StringSerializer_getInstance(), value.submissionRequiredError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !(value.sizeLimitError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 6, StringSerializer_getInstance(), value.sizeLimitError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 7) ? true : !value.courseBlockEditUiState_1.equals(new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_186().ASSIGNMENT_COMPLETION_CRITERIAS_1))) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 7, $serializer_getInstance_71(), value.courseBlockEditUiState_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 8) ? true : !(value.groupSubmissionOn_1 === false)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 8, value.groupSubmissionOn_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 9) ? true : !(value.groupSetError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 9, StringSerializer_getInstance(), value.groupSetError_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_59).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_gfpq9b_k$(encoder, value instanceof ClazzAssignmentEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_59;
  function $serializer_getInstance_69() {
    if ($serializer_instance_59 == null)
      new $serializer_59();
    return $serializer_instance_59;
  }
  function ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_69().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.fieldsEnabled_1 = false;
    else
      $this.fieldsEnabled_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.markingTypeEnabled_1 = true;
    else
      $this.markingTypeEnabled_1 = markingTypeEnabled;
    if (0 === (seen1 & 4))
      $this.groupSetEnabled_1 = true;
    else
      $this.groupSetEnabled_1 = groupSetEnabled;
    if (0 === (seen1 & 8))
      $this.reviewerCountError_1 = null;
    else
      $this.reviewerCountError_1 = reviewerCountError;
    if (0 === (seen1 & 16))
      $this.courseTerminology_1 = null;
    else
      $this.courseTerminology_1 = courseTerminology;
    if (0 === (seen1 & 32))
      $this.submissionRequiredError_1 = null;
    else
      $this.submissionRequiredError_1 = submissionRequiredError;
    if (0 === (seen1 & 64))
      $this.sizeLimitError_1 = null;
    else
      $this.sizeLimitError_1 = sizeLimitError;
    if (0 === (seen1 & 128))
      $this.courseBlockEditUiState_1 = new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_186().ASSIGNMENT_COMPLETION_CRITERIAS_1);
    else
      $this.courseBlockEditUiState_1 = courseBlockEditUiState;
    if (0 === (seen1 & 256))
      $this.groupSubmissionOn_1 = false;
    else
      $this.groupSubmissionOn_1 = groupSubmissionOn;
    if (0 === (seen1 & 512))
      $this.groupSetError_1 = null;
    else
      $this.groupSetError_1 = groupSetError;
    return $this;
  }
  function ClazzAssignmentEditUiState_init_$Create$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker) {
    return ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, objectCreate(protoOf(ClazzAssignmentEditUiState)));
  }
  function ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    Companion_getInstance_186();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? true : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? true : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? null : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? null : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? null : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_186().ASSIGNMENT_COMPLETION_CRITERIAS_1) : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? false : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? null : groupSetError;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.markingTypeEnabled_1 = markingTypeEnabled;
    this.groupSetEnabled_1 = groupSetEnabled;
    this.reviewerCountError_1 = reviewerCountError;
    this.courseTerminology_1 = courseTerminology;
    this.submissionRequiredError_1 = submissionRequiredError;
    this.sizeLimitError_1 = sizeLimitError;
    this.courseBlockEditUiState_1 = courseBlockEditUiState;
    this.groupSubmissionOn_1 = groupSubmissionOn;
    this.groupSetError_1 = groupSetError;
  }
  protoOf(ClazzAssignmentEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_markingTypeEnabled_35zr3v_k$ = function () {
    return this.markingTypeEnabled_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_groupSetEnabled_anx9it_k$ = function () {
    return this.groupSetEnabled_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_reviewerCountError_776opz_k$ = function () {
    return this.reviewerCountError_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_courseTerminology_pxom3z_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_submissionRequiredError_mhrd1w_k$ = function () {
    return this.submissionRequiredError_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_sizeLimitError_fpljav_k$ = function () {
    return this.sizeLimitError_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_courseBlockEditUiState_aichau_k$ = function () {
    return this.courseBlockEditUiState_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_groupSubmissionOn_r982wx_k$ = function () {
    return this.groupSubmissionOn_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_groupSetError_fabmx0_k$ = function () {
    return this.groupSetError_1;
  };
  protoOf(ClazzAssignmentEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.courseBlockEditUiState_1.get_block_ip8l7o_k$();
  };
  protoOf(ClazzAssignmentEditUiState).get_peerMarkingVisible_qd8h8o_k$ = function () {
    var tmp0_safe_receiver = this.get_entity_cxtlv0_k$();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caMarkingType_qumoa0_k$()) === Companion_getInstance_10().get_MARKED_BY_PEERS_w4tbtf_k$();
  };
  protoOf(ClazzAssignmentEditUiState).get_textSubmissionVisible_mk8e5s_k$ = function () {
    var tmp0_safe_receiver = this.get_entity_cxtlv0_k$();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caRequireTextSubmission_bngh2v_k$()) === true;
  };
  protoOf(ClazzAssignmentEditUiState).get_fileSubmissionVisible_6d6mo1_k$ = function () {
    var tmp0_safe_receiver = this.get_entity_cxtlv0_k$();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_assignment_378p7u_k$();
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_caRequireFileSubmission_w8j1mu_k$()) === true;
  };
  protoOf(ClazzAssignmentEditUiState).copyWithFieldsEnabledSet_2mddww_k$ = function (fieldsEnabled) {
    return this.copy$default_brzekt_k$(fieldsEnabled, VOID, VOID, VOID, VOID, VOID, VOID, this.courseBlockEditUiState_1.copy$default_9sg25b_k$(VOID, VOID, VOID, fieldsEnabled));
  };
  protoOf(ClazzAssignmentEditUiState).component1_7eebsc_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzAssignmentEditUiState).component2_7eebsb_k$ = function () {
    return this.markingTypeEnabled_1;
  };
  protoOf(ClazzAssignmentEditUiState).component3_7eebsa_k$ = function () {
    return this.groupSetEnabled_1;
  };
  protoOf(ClazzAssignmentEditUiState).component4_7eebs9_k$ = function () {
    return this.reviewerCountError_1;
  };
  protoOf(ClazzAssignmentEditUiState).component5_7eebs8_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzAssignmentEditUiState).component6_7eebs7_k$ = function () {
    return this.submissionRequiredError_1;
  };
  protoOf(ClazzAssignmentEditUiState).component7_7eebs6_k$ = function () {
    return this.sizeLimitError_1;
  };
  protoOf(ClazzAssignmentEditUiState).component8_7eebs5_k$ = function () {
    return this.courseBlockEditUiState_1;
  };
  protoOf(ClazzAssignmentEditUiState).component9_7eebs4_k$ = function () {
    return this.groupSubmissionOn_1;
  };
  protoOf(ClazzAssignmentEditUiState).component10_gazzfo_k$ = function () {
    return this.groupSetError_1;
  };
  protoOf(ClazzAssignmentEditUiState).copy_forumd_k$ = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    return new ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).copy$default_brzekt_k$ = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? this.markingTypeEnabled_1 : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? this.groupSetEnabled_1 : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? this.reviewerCountError_1 : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? this.courseTerminology_1 : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? this.submissionRequiredError_1 : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? this.sizeLimitError_1 : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.courseBlockEditUiState_1 : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? this.groupSubmissionOn_1 : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? this.groupSetError_1 : groupSetError;
    return $super === VOID ? this.copy_forumd_k$(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) : $super.copy_forumd_k$.call(this, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).toString = function () {
    return 'ClazzAssignmentEditUiState(fieldsEnabled=' + this.fieldsEnabled_1 + ', markingTypeEnabled=' + this.markingTypeEnabled_1 + ', groupSetEnabled=' + this.groupSetEnabled_1 + ', reviewerCountError=' + this.reviewerCountError_1 + ', courseTerminology=' + this.courseTerminology_1 + ', submissionRequiredError=' + this.submissionRequiredError_1 + ', sizeLimitError=' + this.sizeLimitError_1 + ', courseBlockEditUiState=' + this.courseBlockEditUiState_1 + ', groupSubmissionOn=' + this.groupSubmissionOn_1 + ', groupSetError=' + this.groupSetError_1 + ')';
  };
  protoOf(ClazzAssignmentEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.fieldsEnabled_1);
    result = imul(result, 31) + getBooleanHashCode(this.markingTypeEnabled_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.groupSetEnabled_1) | 0;
    result = imul(result, 31) + (this.reviewerCountError_1 == null ? 0 : getStringHashCode(this.reviewerCountError_1)) | 0;
    result = imul(result, 31) + (this.courseTerminology_1 == null ? 0 : hashCode(this.courseTerminology_1)) | 0;
    result = imul(result, 31) + (this.submissionRequiredError_1 == null ? 0 : getStringHashCode(this.submissionRequiredError_1)) | 0;
    result = imul(result, 31) + (this.sizeLimitError_1 == null ? 0 : getStringHashCode(this.sizeLimitError_1)) | 0;
    result = imul(result, 31) + this.courseBlockEditUiState_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.groupSubmissionOn_1) | 0;
    result = imul(result, 31) + (this.groupSetError_1 == null ? 0 : getStringHashCode(this.groupSetError_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentEditUiState ? other : THROW_CCE();
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.markingTypeEnabled_1 === tmp0_other_with_cast.markingTypeEnabled_1))
      return false;
    if (!(this.groupSetEnabled_1 === tmp0_other_with_cast.groupSetEnabled_1))
      return false;
    if (!(this.reviewerCountError_1 == tmp0_other_with_cast.reviewerCountError_1))
      return false;
    if (!equals(this.courseTerminology_1, tmp0_other_with_cast.courseTerminology_1))
      return false;
    if (!(this.submissionRequiredError_1 == tmp0_other_with_cast.submissionRequiredError_1))
      return false;
    if (!(this.sizeLimitError_1 == tmp0_other_with_cast.sizeLimitError_1))
      return false;
    if (!this.courseBlockEditUiState_1.equals(tmp0_other_with_cast.courseBlockEditUiState_1))
      return false;
    if (!(this.groupSubmissionOn_1 === tmp0_other_with_cast.groupSubmissionOn_1))
      return false;
    if (!(this.groupSetError_1 == tmp0_other_with_cast.groupSetError_1))
      return false;
    return true;
  };
  function snackDisaptcher$factory() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function snackDisaptcher$factory_0() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    this.$primaryKeyManager_1 = $primaryKeyManager;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).invoke_1s4azi_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_1s4azi_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(9);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, 'allocations', ListSerializer(Companion_getInstance_21().serializer_9w0wvi_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.allocations0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.db_1.clazzAssignmentDao_ta4cfn_k$().getSubmitterUidsAndNameByClazzOrGroupSetUid_2jt2i_k$(this.this$0__1.clazzUid_1, this.this$0__1.groupUid_1, systemTimeInMillis(), this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_group_is3eja_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.submittersAndNames1__1 = suspendResult;
            Napier_getInstance().d$default_a5agxr_k$('Number of submitters: ' + this.submittersAndNames1__1.get_size_woubt6_k$());
            var tmp_0 = this;
            tmp_0.this2__1 = this.submittersAndNames1__1;
            var tmp_1 = this;
            tmp_1.this3__1 = this.this2__1;
            var tmp_2 = this;
            tmp_2.destination4__1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.this2__1, 10));
            this.tmp0_iterator5__1 = this.this3__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            if (!this.tmp0_iterator5__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            }

            this.item6__1 = this.tmp0_iterator5__1.next_20eer_k$();
            var tmp_3 = this;
            tmp_3.submitterAndName7__1 = this.item6__1;
            this.ARGUMENT8__1 = new AssignmentSubmitterSummary(this.submitterAndName7__1.get_submitterUid_tbcwmo_k$(), this.submitterAndName7__1.get_name_woqyms_k$());
            var tmp_4 = this;
            var tmp0_safe_receiver = this.allocations0__1;
            var tmp_5;
            if (tmp0_safe_receiver == null) {
              tmp_5 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp0_safe_receiver.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                if (element.get_praToMarkerSubmitterUid_7d07wy_k$().equals(this.submitterAndName7__1.get_submitterUid_tbcwmo_k$())) {
                  destination.add_utx5q5_k$(element);
                }
              }
              tmp_5 = destination;
            }

            var tmp1_elvis_lhs = tmp_5;
            tmp_4.this9__1 = trimToSize(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.this$0__1.numReviewersPerSubmitter_1);
            var tmp_6 = this;
            tmp_6.minSize10__1 = this.this$0__1.numReviewersPerSubmitter_1;
            if (this.this9__1.get_size_woubt6_k$() < this.minSize10__1) {
              var tmp_7 = this;
              tmp_7.this12__1 = until(this.this9__1.get_size_woubt6_k$(), this.minSize10__1);
              var tmp_8 = this;
              tmp_8.this13__1 = this.this12__1;
              var tmp_9 = this;
              tmp_9.destination14__1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.this12__1, 10));
              this.tmp0_iterator15__1 = this.this13__1.iterator_jk1svi_k$();
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.WHEN_RESULT11__1 = this.this9__1;
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

          case 4:
            if (!this.tmp0_iterator15__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            }

            this.item16__1 = this.tmp0_iterator15__1.next_20eer_k$();
            var tmp_11 = this;
            tmp_11.it17__1 = this.item16__1;
            this.set_state_rjd8d0_k$(5);
            suspendResult = this.$primaryKeyManager_1.nextIdAsync_kh60wr_k$(Companion_getInstance_21().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = new PeerReviewerAllocation(ARGUMENT, VOID, this.submitterAndName7__1.get_submitterUid_tbcwmo_k$(), this.this$0__1.assignmentUid_1);
            this.destination14__1.add_utx5q5_k$(ARGUMENT_0);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 6:
            var ARGUMENT_1 = this.destination14__1;
            this.WHEN_RESULT11__1 = plus(this.this9__1, ARGUMENT_1);
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            var ARGUMENT_2 = this.WHEN_RESULT11__1;
            var ARGUMENT_3 = new AssignmentSubmitterAndAllocations(this.ARGUMENT8__1, ARGUMENT_2);
            this.destination4__1.add_utx5q5_k$(ARGUMENT_3);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 8:
            return this.destination4__1;
          case 9:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 9) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this.this$0__1, this.$savedStateHandle_1, this.$primaryKeyManager_1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_1s4azi_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).invoke_lwgxnj_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_lwgxnj_k$($completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new PeerReviewerAllocationEditViewModel$slambda$slambda_1(completion);
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_lwgxnj_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy_i28csk_k$(it == null ? emptyList() : it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function PeerReviewerAllocationEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get_updatePeerReviewAllocationUseCase__1na81p($this) {
    return $this.updatePeerReviewAllocationUseCase_1;
  }
  function _get__uiState__8e9jsd_14($this) {
    return $this._uiState_1;
  }
  function _get_clazzUid__rrng1f_8($this) {
    return $this.clazzUid_1;
  }
  function _get_numReviewersPerSubmitter__evpo5z($this) {
    return $this.numReviewersPerSubmitter_1;
  }
  function _get_assignmentUid__gakoha($this) {
    return $this.assignmentUid_1;
  }
  function _get_groupUid__o3fq($this) {
    return $this.groupUid_1;
  }
  function Companion_126() {
    Companion_instance_126 = this;
    this.ARG_ALLOCATIONS_1 = 'allocations';
    this.ARG_GROUP_SET_UID_1 = 'groupSetUid';
    this.ARG_NUM_REVIEWERS_PER_SUBMITTER_1 = 'numReviewers';
    this.DEST_NAME_1 = 'PeerReviewerAllocationEdit';
  }
  protoOf(Companion_126).get_ARG_ALLOCATIONS_u72qyp_k$ = function () {
    return this.ARG_ALLOCATIONS_1;
  };
  protoOf(Companion_126).get_ARG_GROUP_SET_UID_hs1yox_k$ = function () {
    return this.ARG_GROUP_SET_UID_1;
  };
  protoOf(Companion_126).get_ARG_NUM_REVIEWERS_PER_SUBMITTER_4th9rp_k$ = function () {
    return this.ARG_NUM_REVIEWERS_PER_SUBMITTER_1;
  };
  protoOf(Companion_126).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_126;
  function Companion_getInstance_187() {
    if (Companion_instance_126 == null)
      new Companion_126();
    return Companion_instance_126;
  }
  function PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.primaryKeyManager0__1 = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$());
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = ListSerializer(Companion_getInstance_45().serializer_9w0wvi_k$());
            var tmp_1 = PeerReviewerAllocationEditViewModel$slambda$slambda_0(this.this$0__1, this.$savedStateHandle_1, this.primaryKeyManager0__1, null);
            var tmp_2 = PeerReviewerAllocationEditViewModel$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, PeerReviewerAllocationEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_done_wokv63_k$());
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, true, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, PeerReviewerAllocationEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PeerReviewerAllocationEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda($allocation) {
    return function (it) {
      return it.get_praUid_i762pm_k$().equals($allocation.get_praUid_i762pm_k$());
    };
  }
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().submitterListWithAllocations_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              var list = element.get_allocations_rufsiy_k$();
              addAll(destination, list);
            }

            suspendResult = this.this$0__1.updatePeerReviewAllocationUseCase_1.invoke_i55ofl_k$(destination, this.this$0__1.groupUid_1, this.this$0__1.clazzUid_1, this.this$0__1.assignmentUid_1, this.this$0__1.numReviewersPerSubmitter_1, true, true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newAllocations = suspendResult;
            l$ret$1: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_1.get_value_j01efc_k$();
                var this_2 = prevValue.submitterListWithAllocations_1;
                var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_0 = this_2.iterator_jk1svi_k$();
                while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                  var item = tmp0_iterator_0.next_20eer_k$();
                  var tmp_0 = item.get_submitter_ea476o_k$();
                  var destination_1 = ArrayList_init_$Create$();
                  var tmp0_iterator_1 = newAllocations.iterator_jk1svi_k$();
                  while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
                    var element_0 = tmp0_iterator_1.next_20eer_k$();
                    if (element_0.get_praToMarkerSubmitterUid_7d07wy_k$().equals(item.get_submitter_ea476o_k$().get_submitterUid_tbcwmo_k$())) {
                      destination_1.add_utx5q5_k$(element_0);
                    }
                  }
                  destination_0.add_utx5q5_k$(new AssignmentSubmitterAndAllocations(tmp_0, destination_1));
                }
                var nextValue = prevValue.copy_i28csk_k$(destination_0);
                if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this$0, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel(di, savedStateHandle, updatePeerReviewAllocationUseCase) {
    Companion_getInstance_187();
    var tmp;
    if (updatePeerReviewAllocationUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var this_0 = get_direct(onActiveLearningSpace(di));
      var tag = Companion_getInstance_3().get_TAG_DB_46ibfw_k$();
      var tmp_0 = this_0.get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, tag);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(di).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.Instance_vwdrk9_k$(tmp$ret$2, null);
      tmp = new UpdatePeerReviewAllocationUseCase(tmp_2, tmp$ret$3);
    } else {
      tmp = updatePeerReviewAllocationUseCase;
    }
    updatePeerReviewAllocationUseCase = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'PeerReviewerAllocationEdit');
    this.updatePeerReviewAllocationUseCase_1 = updatePeerReviewAllocationUseCase;
    this._uiState_1 = MutableStateFlow(new PeerReviewerAllocationEditUIState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_5 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_5.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_6 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$('numReviewers');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0);
    tmp_6.numReviewersPerSubmitter_1 = tmp1_elvis_lhs_0 == null ? 1 : tmp1_elvis_lhs_0;
    var tmp_7 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZ_ASSIGNMENT_UID_n6bn4n_k$());
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_7.assignmentUid_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_8 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.get_6bo4tg_k$('groupSetUid');
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_8.groupUid_1 = tmp1_elvis_lhs_2 == null ? new Long(0, 0) : tmp1_elvis_lhs_2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_assign_reviewers_lxs493_k$()));
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_9, VOID, VOID, PeerReviewerAllocationEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(PeerReviewerAllocationEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(PeerReviewerAllocationEditViewModel).onAllocationChanged_22x4yv_k$ = function (allocation) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.submitterListWithAllocations_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.iterator_jk1svi_k$();
        while (tmp0_iterator.hasNext_bitz1p_k$()) {
          var item = tmp0_iterator.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>.<anonymous>' call
          var tmp;
          if (item.get_submitter_ea476o_k$().get_submitterUid_tbcwmo_k$().equals(allocation.get_praToMarkerSubmitterUid_7d07wy_k$())) {
            var tmp_0 = item.get_allocations_rufsiy_k$();
            tmp = item.copy$default_sgybhn_k$(VOID, replace_0(tmp_0, allocation, PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda(allocation)));
          } else {
            tmp = item;
          }
          var tmp$ret$0 = tmp;
          destination.add_utx5q5_k$(tmp$ret$0);
        }
        var nextValue = prevValue.copy_i28csk_k$(destination);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PeerReviewerAllocationEditViewModel).onAssignRandomReviewers_lqznzh_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this, null));
  };
  protoOf(PeerReviewerAllocationEditViewModel).onClickSave_ncak3a_k$ = function () {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var this_0 = this._uiState_1.get_value_j01efc_k$().submitterListWithAllocations_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onClickSave.<anonymous>' call
      var list = element.get_allocations_rufsiy_k$();
      addAll(destination, list);
    }
    this.finishWithResult_jlqwtj_k$(destination);
  };
  function PeerReviewerAllocationEditUIState(submitterListWithAllocations) {
    submitterListWithAllocations = submitterListWithAllocations === VOID ? emptyList() : submitterListWithAllocations;
    this.submitterListWithAllocations_1 = submitterListWithAllocations;
  }
  protoOf(PeerReviewerAllocationEditUIState).get_submitterListWithAllocations_dr2msv_k$ = function () {
    return this.submitterListWithAllocations_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).reviewerOptionsForAllocation_dt4ytg_k$ = function (allocation) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.submitterListWithAllocations_1.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
        if (element.get_submitter_ea476o_k$().get_submitterUid_tbcwmo_k$().equals(allocation.get_praToMarkerSubmitterUid_7d07wy_k$())) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_allocations_rufsiy_k$();
    var existingAllocationsForSubmitter = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator_0 = existingAllocationsForSubmitter.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var element_0 = tmp0_iterator_0.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_0.get_praUid_i762pm_k$().equals(allocation.get_praUid_i762pm_k$())) {
        destination.add_utx5q5_k$(element_0);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_1 = destination.iterator_jk1svi_k$();
    while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator_1.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      var tmp$ret$5 = item.get_praMarkerSubmitterUid_mj8ypj_k$();
      destination_0.add_utx5q5_k$(tmp$ret$5);
    }
    var otherMarkersAlreadySelected = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.submitterListWithAllocations_1;
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_2 = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator_2.hasNext_bitz1p_k$()) {
      var element_1 = tmp0_iterator_2.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_1.get_submitter_ea476o_k$().get_submitterUid_tbcwmo_k$().equals(allocation.get_praToMarkerSubmitterUid_7d07wy_k$()) ? !otherMarkersAlreadySelected.contains_aljjnj_k$(element_1.get_submitter_ea476o_k$().get_submitterUid_tbcwmo_k$()) : false) {
        destination_1.add_utx5q5_k$(element_1);
      }
    }
    return destination_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).component1_7eebsc_k$ = function () {
    return this.submitterListWithAllocations_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).copy_i28csk_k$ = function (submitterListWithAllocations) {
    return new PeerReviewerAllocationEditUIState(submitterListWithAllocations);
  };
  protoOf(PeerReviewerAllocationEditUIState).copy$default_pdmgwc_k$ = function (submitterListWithAllocations, $super) {
    submitterListWithAllocations = submitterListWithAllocations === VOID ? this.submitterListWithAllocations_1 : submitterListWithAllocations;
    return $super === VOID ? this.copy_i28csk_k$(submitterListWithAllocations) : $super.copy_i28csk_k$.call(this, submitterListWithAllocations);
  };
  protoOf(PeerReviewerAllocationEditUIState).toString = function () {
    return 'PeerReviewerAllocationEditUIState(submitterListWithAllocations=' + this.submitterListWithAllocations_1 + ')';
  };
  protoOf(PeerReviewerAllocationEditUIState).hashCode = function () {
    return hashCode(this.submitterListWithAllocations_1);
  };
  protoOf(PeerReviewerAllocationEditUIState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PeerReviewerAllocationEditUIState))
      return false;
    var tmp0_other_with_cast = other instanceof PeerReviewerAllocationEditUIState ? other : THROW_CCE();
    if (!equals(this.submitterListWithAllocations_1, tmp0_other_with_cast.submitterListWithAllocations_1))
      return false;
    return true;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).invoke_gf7jjw_k$ = function (it, $completion) {
    var tmp = this.create_z5we60_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_gf7jjw_k$((p1 == null ? true : p1 instanceof CourseBlockAndAssignment) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_bmkike_k$(VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).create_z5we60_k$ = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_z5we60_k$((value == null ? true : value instanceof CourseBlockAndAssignment) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_gf7jjw_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$().findCourseBlockByAssignmentUid_b29grf_k$(this.this$0__1.assignmentUid_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).invoke_89ouf3_k$ = function (submissions, submissionFiles, $completion) {
    var tmp = this.create_gi1gpz_k$(submissions, submissionFiles, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.invoke_89ouf3_k$(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return combineWithSubmissionFiles(this.submissions_1, this.submissionFiles_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).create_gi1gpz_k$ = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(completion);
    i.submissions_1 = submissions;
    i.submissionFiles_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.invoke_89ouf3_k$(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).invoke_72ldhh_k$ = function (it, $completion) {
    var tmp = this.create_8g5jux_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_72ldhh_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).create_8g5jux_k$ = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8g5jux_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_72ldhh_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).invoke_6yrqxi_k$ = function (it, $completion) {
    var tmp = this.create_yz6olm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_6yrqxi_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).create_yz6olm_k$ = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_yz6olm_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_6yrqxi_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_assignmentSubmitterNameUseCase__ts4wyt(this.this$0__1).invoke_3dl2hf_k$(this.this$0__1.submitterUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var submitterName = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, submitterName);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this$launch_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.submissionsFlow0__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseAssignmentSubmissionDao_y3yq7y_k$().getAllSubmissionsFromSubmitterAsFlow_7bm519_k$(this.this$0__1.submitterUid_1, this.this$0__1.assignmentUid_1);
            this.submissionFilesFlow1__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseAssignmentSubmissionFileDao_spskde_k$().getAllSubmissionFilesFromSubmitterAsFlow_h3tgh_k$(this.this$0__1.submitterUid_1, this.this$0__1.assignmentUid_1);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(combine(this.submissionsFlow0__1, this.submissionFilesFlow1__1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseAssignmentMarkDao_6irrq5_k$().getAllMarksForSubmitterAsFlow_hpag2j_k$(this.this$0__1.submitterUid_1, this.this$0__1.assignmentUid_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation) {
    this.this$0__1 = this$0;
    this.$this_launch_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).invoke_kr9uci_k$ = function (permissionPair, $completion) {
    var tmp = this.create_y1cuam_k$(permissionPair, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_kr9uci_k$(p1 instanceof AssignmentPermissionAndActiveUserSubmitterUid ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          if (this.permissionPair_1.get_canView_acwre4_k$()) {
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp0_privateCommentsList = this.this$0__1.privateCommentsPagingSourceFactory_1;
                var tmp1_activeUserPersonUid = this.this$0__1.get_activeUserPersonUid_1nlgnz_k$();
                var tmp2_activeUserSubmitterId = this.permissionPair_1.get_activeUserSubmitterUid_p45sm9_k$();
                var tmp_0;
                if (this.permissionPair_1.get_canMark_acquvo_k$()) {
                  var this_1 = new CourseAssignmentMark();
                  this_1.set_camMark_87svl5_k$(-1.0);
                  tmp_0 = this_1;
                } else {
                  tmp_0 = null;
                }
                var tmp3_draftMark = tmp_0;
                var tmp4_showModerateOptions = this.permissionPair_1.get_canModerate_5wl27q_k$();
                var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, tmp3_draftMark, VOID, VOID, VOID, VOID, VOID, tmp0_privateCommentsList, true, tmp1_activeUserPersonUid, tmp2_activeUserSubmitterId, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_showModerateOptions);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null));
            launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.this$0__1, null));
            launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this.this$0__1, null));
            launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this.this$0__1, null));
          } else {
            l$ret$3: do {
              var this_2 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_2.get_value_j01efc_k$();
                var tmp0_submissionList = emptyList();
                var tmp1_marks = emptyList();
                var nextValue_0 = prevValue_0.copy$default_bmkike_k$(VOID, null, VOID, tmp0_submissionList, VOID, tmp1_marks, VOID, VOID, VOID, VOID, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda, false, VOID, new Long(0, 0));
                if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).create_y1cuam_k$ = function (permissionPair, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this.this$0__1, this.$this_launch_1, completion);
    i.permissionPair_1 = permissionPair;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_y1cuam_k$(value instanceof AssignmentPermissionAndActiveUserSubmitterUid ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, $this_launch, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.invoke_kr9uci_k$(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.$permissionFlow_1);
            suspendResult = collectLatest(tmp_0, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, this.$this$launch_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda(this.$permissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0(this.$permissionFlow_1, this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda(this.$this_launch_1, this.$permissionFlow_1, this.this$0__1, completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get__uiState__8e9jsd_15($this) {
    return $this._uiState_1;
  }
  function _get__newPrivateCommentText__144lr3_0($this) {
    return $this._newPrivateCommentText_1;
  }
  function _get_assignmentUid__gakoha_0($this) {
    return $this.assignmentUid_1;
  }
  function _get_submitterUid__bj7lic($this) {
    return $this.submitterUid_1;
  }
  function _get_clazzUid__rrng1f_9($this) {
    return $this.clazzUid_1;
  }
  function _get_privateCommentsPagingSourceFactory__bd2bq7_0($this) {
    return $this.privateCommentsPagingSourceFactory_1;
  }
  function _get_assignmentSubmitterNameUseCase__ts4wyt($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.assignmentSubmitterNameUseCase$delegate_1;
    assignmentSubmitterNameUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _set_openBlobJob__r74v4f_0($this, _set____db54di) {
    $this.openBlobJob_1 = _set____db54di;
  }
  function _get_openBlobJob__djl0it_0($this) {
    return $this.openBlobJob_1;
  }
  function _get_openBlobUiUseCase__fzusqz_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.openBlobUiUseCase$delegate_1;
    openBlobUiUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_submitMarkUseCase__y8b5kx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.submitMarkUseCase$delegate_1;
    submitMarkUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function openSubmissionFileAsBlob_0($this, file, intent) {
    var tmp0_elvis_lhs = file.get_submissionFile_er578x_k$();
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.openBlobJob_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.get_viewModelScope_ryv1dz_k$();
    tmp_0.openBlobJob_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_127() {
    Companion_instance_127 = this;
    this.ARG_ASSIGNMENT_UID_1 = 'assignmentUid';
    this.ARG_SUBMITTER_UID_1 = 'submitterUid';
    this.DEST_NAME_1 = 'CourseAssignmentSubmitter';
  }
  protoOf(Companion_127).get_ARG_ASSIGNMENT_UID_qhfjww_k$ = function () {
    return this.ARG_ASSIGNMENT_UID_1;
  };
  protoOf(Companion_127).get_ARG_SUBMITTER_UID_10b754_k$ = function () {
    return this.ARG_SUBMITTER_UID_1;
  };
  protoOf(Companion_127).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_127;
  function Companion_getInstance_188() {
    if (Companion_instance_127 == null)
      new Companion_127();
    return Companion_instance_127;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_17(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_17).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$().findPrivateCommentsForSubmitterByAssignmentUid_c99dxz_k$(this$0.submitterUid_1, this$0.assignmentUid_1, false);
    };
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$permissionFlow_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0(this.$this$launch_1, this.$permissionFlow_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this.this$0__1, this.$permissionFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda_0(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$();
            var this_0 = new Comments();
            this_0.set_commentsForSubmitterUid_kngio1_k$(this.this$0__1.submitterUid_1);
            this_0.set_commentsFromSubmitterUid_brso5g_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().activeUserSubmitterId_1);
            this_0.set_commentsFromPersonUid_5ww49q_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            this_0.set_commentsEntityUid_efls2q_k$(this.this$0__1.assignmentUid_1);
            this_0.set_commentsText_l77wpl_k$(this.this$0__1._newPrivateCommentText_1.get_value_j01efc_k$());
            this_0.set_commentsDateTimeAdded_w1vh7a_k$(systemTimeInMillis());
            suspendResult = tmp_0.insertAsync_p6r5iz_k$(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.this$0__1._newPrivateCommentText_1.set_value_v1vabv_k$('');
            tmp_1.tmp$ret$00__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(5);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            throw t;
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    this.this$0__1 = this$0;
    this.$assignment_1 = $assignment;
    this.$draftMark_1 = $draftMark;
    this.$submissions_1 = $submissions;
    this.$courseBlock_1 = $courseBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = _get_submitMarkUseCase__y8b5kx(this.this$0__1);
            var tmp_1 = this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$();
            var this_0 = this.$submissions_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              destination.add_utx5q5_k$(item.get_submission_gidiad_k$());
            }

            suspendResult = tmp_0.invoke_91peif_k$(tmp_1, this.$assignment_1, this.this$0__1.clazzUid_1, this.this$0__1.submitterUid_1, this.$draftMark_1, destination, this.$courseBlock_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_2 = this;
            l$ret$1: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_1.get_value_j01efc_k$();
                var this_2 = new CourseAssignmentMark();
                this_2.set_camMark_87svl5_k$(-1.0);
                var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, this_2);
                if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_2.tmp$ret$20__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_3 = this.get_exception_x0n6w6_k$();
            if (tmp_3 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_4 = this;
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack('Error: ' + e.message));
              Napier_getInstance().w$default_p42du4_k$('Exception submitting mark:', e);
              tmp_4.tmp$ret$20__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(5);
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var t = this.get_exception_x0n6w6_k$();
            l$ret$5: do {
              var this_3 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_3.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_3.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.get_exception_x0n6w6_k$();
          case 6:
            this.set_exceptionState_fex74n_k$(5);
            l$ret$7: do {
              var this_4 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_1 = this_4.get_value_j01efc_k$();
                var nextValue_1 = prevValue_1.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_4.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this.this$0__1, this.$assignment_1, this.$draftMark_1, this.$submissions_1, this.$courseBlock_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.this$0__1 = this$0;
    this.$submissionFile_1 = $submissionFile;
    this.$intent_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.tmp0_safe_receiver0__1 = _get_openBlobUiUseCase__fzusqz_0(this.this$0__1);
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              var tmp_0 = asBlobOpenItem(this.$submissionFile_1);
              suspendResult = this.tmp0_safe_receiver0__1.invoke_thxto7_k$(tmp_0, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this.this$0__1), this.$intent_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.WHEN_RESULT1__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this.this$0__1, this.$submissionFile_1, this.$intent_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.this$0__1 = this$0;
    this.$comments_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().commentsDao_ysx4hq_k$().updateDeletedByCommentUid_djs5vs_k$(this.$comments_1.get_commentsUid_mbzbu5_k$(), true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_deleted_qwnqy8_k$())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this.this$0__1, this.$comments_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_188();
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignmentSubmitter');
    this._uiState_1 = MutableStateFlow(new ClazzAssignmentSubmitterDetailUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getDayOfWeekStrings_62j2s1_k$()));
    this.uiState_1 = asStateFlow(this._uiState_1);
    this._newPrivateCommentText_1 = MutableStateFlow('');
    this.newPrivateCommentText_1 = asStateFlow(this._newPrivateCommentText_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$('assignmentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No assignmentUid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.assignmentUid_1 = tmp_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$('submitterUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_2;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No submitter uid');
    } else {
      tmp_2 = tmp1_elvis_lhs_0;
    }
    tmp_1.submitterUid_1 = tmp_2;
    var tmp_3 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    var tmp_4;
    if (tmp1_elvis_lhs_1 == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid');
    } else {
      tmp_4 = tmp1_elvis_lhs_1;
    }
    tmp_3.clazzUid_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.privateCommentsPagingSourceFactory_1 = ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_7 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$1 = tmp_7.invoke_4wgfc3_k$(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_6.assignmentSubmitterNameUseCase$delegate_1 = Instance(this_0, tmp$ret$3, null).provideDelegate_o2qlc1_k$(this, assignmentSubmitterNameUseCase$factory());
    this.openBlobJob_1 = null;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.openBlobUiUseCase$delegate_1 = InstanceOrNull(this_1, tmp$ret$5, null).provideDelegate_o2qlc1_k$(this, openBlobUiUseCase$factory_1());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.submitMarkUseCase$delegate_1 = Instance(this_2, tmp$ret$7, null).provideDelegate_o2qlc1_k$(this, submitMarkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this._uiState_1;
      while (true) {
        var prevValue = this_3.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.<anonymous>' call
        var tmp_14 = this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().fullName_m0cs6y_k$();
        var tmp0_safe_receiver_2 = this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_personPicture_te1agw_k$();
        var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_14, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_personPictureThumbnailUri_sx3gg_k$());
        if (this_3.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var permissionFlow = this.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().userPermissionsForAssignmentSubmitterUid_6yih9g_k$(this.get_activeUserPersonUid_1nlgnz_k$(), this.assignmentUid_1, this.clazzUid_1, this.submitterUid_1);
    var tmp_15 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_15, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).get_newPrivateCommentText_sywsw0_k$ = function () {
    return this.newPrivateCommentText_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onChangePrivateComment_avmjhb_k$ = function (text) {
    this._newPrivateCommentText_1.set_value_v1vabv_k$(text);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onSubmitPrivateComment_30dvb1_k$ = function () {
    if (this.get_loadingState_rpk2ke_k$().equals(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()))
      return Unit_getInstance();
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onChangeDraftMark_hxy8oe_k$ = function (draftMark) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onChangeDraftMark.<anonymous>' call
        var tmp;
        var tmp0_safe_receiver = prevValue.draftMark_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMark_ac72ab_k$();
        if (tmp_0 == (draftMark == null ? null : draftMark.get_camMark_ac72ab_k$())) {
          tmp = prevValue.submitMarkError_1;
        } else {
          tmp = null;
        }
        var tmp2_submitMarkError = tmp;
        var nextValue = prevValue.copy$default_bmkike_k$(tmp2_submitMarkError, VOID, VOID, VOID, VOID, VOID, draftMark);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onClickSubmitMark_j6q8e6_k$ = function () {
    if (!this._uiState_1.get_value_j01efc_k$().get_markFieldsEnabled_sms27i_k$())
      return Unit_getInstance();
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().draftMark_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var draftMark = tmp;
    var submissions = this._uiState_1.get_value_j01efc_k$().submissionList_1;
    var tmp1_elvis_lhs = this._uiState_1.get_value_j01efc_k$().block_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var block = tmp_0;
    var tmp2_elvis_lhs = block.get_courseBlock_c2ojbd_k$();
    var tmp_1;
    if (tmp2_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_1 = tmp2_elvis_lhs;
    }
    var courseBlock = tmp_1;
    var tmp3_elvis_lhs = block.get_assignment_378p7u_k$();
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    var assignment = tmp_2;
    if (draftMark.get_camMark_ac72ab_k$() === -1.0) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
          var nextValue = prevValue.copy$default_bmkike_k$(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    } else {
      if (draftMark.get_camMark_ac72ab_k$() < 0.0) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_1 = this._uiState_1;
          while (true) {
            var prevValue_0 = this_1.get_value_j01efc_k$();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
            var nextValue_0 = prevValue_0.copy$default_bmkike_k$(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_score_greater_than_zero_vlrrqj_k$()));
            if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_getInstance();
      } else {
        var tmp_3 = draftMark.get_camMark_ac72ab_k$();
        var tmp4_elvis_lhs = courseBlock.get_cbMaxPoints_s83kbl_k$();
        if (tmp_3 > (tmp4_elvis_lhs == null ? 0.0 : tmp4_elvis_lhs)) {
          $l$block_1: {
            // Inline function 'kotlinx.coroutines.flow.update' call
            var this_2 = this._uiState_1;
            while (true) {
              var prevValue_1 = this_2.get_value_j01efc_k$();
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
              var nextValue_1 = prevValue_1.copy$default_bmkike_k$(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_too_high_mrs22e_k$()));
              if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                break $l$block_1;
              }
            }
          }
          return Unit_getInstance();
        }
      }
    }
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this._uiState_1;
      while (true) {
        var prevValue_2 = this_3.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
        var nextValue_2 = prevValue_2.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_3.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_4 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_4, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this, assignment, draftMark, submissions, courseBlock, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onClickSubmitMarkAndGoNext_gj58l0_k$ = function () {
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onClickGradeFilterChip_438sqc_k$ = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickGradeFilterChip.<anonymous>' call
        var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.get_value_j01efc_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onToggleSubmissionExpandCollapse_6uv8zn_k$ = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.collapsedSubmissions_1, submission.get_casUid_bsjz9g_k$()));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onSendSubmissionFile_24elve_k$ = function (file) {
    openSubmissionFileAsBlob_0(this, file, OpenBlobIntent_SEND_getInstance());
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onOpenSubmissionFile_6grtac_k$ = function (file) {
    openSubmissionFileAsBlob_0(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onDismissOpenFileSubmission_ofkjqr_k$ = function () {
    var tmp0_safe_receiver = this.openBlobJob_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onDismissOpenFileSubmission.<anonymous>' call
        var nextValue = prevValue.copy$default_bmkike_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).onDeleteComment_f0outo_k$ = function (comments) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq_0($this) {
    return latestUniqueMarksByMarker($this.marks_1);
  }
  function sam$kotlin_Comparator$0_1(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_1).compare_bczr_k$ = function (a, b) {
    return this.function_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {
    return this.compare_bczr_k$(a, b);
  };
  function ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver = b.get_courseAssignmentMark_wrnnge_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camLct_bsfyjb_k$();
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver_0 = a.get_courseAssignmentMark_wrnnge_k$();
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_camLct_bsfyjb_k$();
    var tmp$ret$1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    submitMarkError = submitMarkError === VOID ? null : submitMarkError;
    block = block === VOID ? null : block;
    gradeFilterChips = gradeFilterChips === VOID ? emptyList() : gradeFilterChips;
    submissionList = submissionList === VOID ? emptyList() : submissionList;
    submissionAttachments = submissionAttachments === VOID ? emptyList() : submissionAttachments;
    marks = marks === VOID ? emptyList() : marks;
    draftMark = draftMark === VOID ? null : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? false : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? true : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    markListSelectedChipId = markListSelectedChipId === VOID ? CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_RECENT_SCORES_5p7cq8_k$() : markListSelectedChipId;
    markListFilterOptions = markListFilterOptions === VOID ? listOf([new MessageIdOption2(strings_getInstance().get_most_recent_sd0x5e_k$(), CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_RECENT_SCORES_5p7cq8_k$()), new MessageIdOption2(strings_getInstance().get_all_18j9hk_k$(), CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_ALL_SCORES_fjmn8s_k$())]) : markListFilterOptions;
    var tmp;
    if (privateCommentsList === VOID) {
      tmp = ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher;
    } else {
      tmp = privateCommentsList;
    }
    privateCommentsList = tmp;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? false : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? new Long(0, 0) : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? null : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    this.submitMarkError_1 = submitMarkError;
    this.block_1 = block;
    this.gradeFilterChips_1 = gradeFilterChips;
    this.submissionList_1 = submissionList;
    this.submissionAttachments_1 = submissionAttachments;
    this.marks_1 = marks;
    this.draftMark_1 = draftMark;
    this.markSubmissionInProgress_1 = markSubmissionInProgress;
    this.markNextStudentVisible_1 = markNextStudentVisible;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.markListSelectedChipId_1 = markListSelectedChipId;
    this.markListFilterOptions_1 = markListFilterOptions;
    this.privateCommentsList_1 = privateCommentsList;
    this.newPrivateCommentTextVisible_1 = newPrivateCommentTextVisible;
    this.activeUserPersonUid_1 = activeUserPersonUid;
    this.activeUserSubmitterId_1 = activeUserSubmitterId;
    this.activeUserPersonName_1 = activeUserPersonName;
    this.activeUserPictureUri_1 = activeUserPictureUri;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
    this.collapsedSubmissions_1 = collapsedSubmissions;
    this.openingFileState_1 = openingFileState;
    this.showModerateOptions_1 = showModerateOptions;
  }
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_submitMarkError_ikupk6_k$ = function () {
    return this.submitMarkError_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_block_ip8l7o_k$ = function () {
    return this.block_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_gradeFilterChips_59ma9t_k$ = function () {
    return this.gradeFilterChips_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_submissionList_er91cj_k$ = function () {
    return this.submissionList_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_submissionAttachments_wkpuvv_k$ = function () {
    return this.submissionAttachments_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_marks_iv3db1_k$ = function () {
    return this.marks_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_draftMark_36zn8l_k$ = function () {
    return this.draftMark_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_markSubmissionInProgress_lsed5g_k$ = function () {
    return this.markSubmissionInProgress_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_markNextStudentVisible_tbqaps_k$ = function () {
    return this.markNextStudentVisible_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_markListSelectedChipId_pi6k8m_k$ = function () {
    return this.markListSelectedChipId_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_markListFilterOptions_4ngsj2_k$ = function () {
    return this.markListFilterOptions_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_privateCommentsList_8ay4d0_k$ = function () {
    return this.privateCommentsList_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_newPrivateCommentTextVisible_ty0nam_k$ = function () {
    return this.newPrivateCommentTextVisible_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_activeUserPersonUid_1nlgnz_k$ = function () {
    return this.activeUserPersonUid_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_activeUserSubmitterId_jt7ys6_k$ = function () {
    return this.activeUserSubmitterId_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_activeUserPersonName_jpi2sa_k$ = function () {
    return this.activeUserPersonName_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_activeUserPictureUri_he93ko_k$ = function () {
    return this.activeUserPictureUri_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_collapsedSubmissions_hfga93_k$ = function () {
    return this.collapsedSubmissions_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_openingFileState_pxocvu_k$ = function () {
    return this.openingFileState_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_showModerateOptions_2rhvyj_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_markFieldsEnabled_sms27i_k$ = function () {
    var tmp;
    if (!this.markSubmissionInProgress_1) {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-markFieldsEnabled>.<anonymous>' call
      var it = this.block_1;
      var tmp_0;
      if (!((it == null ? null : it.get_assignment_378p7u_k$()) == null)) {
        tmp_0 = !(it.get_courseBlock_c2ojbd_k$() == null);
      } else {
        tmp_0 = false;
      }
      tmp = tmp_0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_submissionStatus_l98b89_k$ = function () {
    return submissionStatusFor(this.marks_1, this.submissionList_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_averageScore_ov15fi_k$ = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>' call
    var latestUniqueMarks = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUniqueMarks.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      var tmp = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.get_courseAssignmentMark_wrnnge_k$();
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMark_ac72ab_k$();
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    var tmp_0 = sum;
    // Inline function 'kotlin.math.max' call
    var a = latestUniqueMarks.get_size_woubt6_k$();
    return tmp_0 / Math.max(a, 1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).markListItemUiState_jv6nga_k$ = function (mark) {
    return new UstadCourseAssignmentMarkListItemUiState(mark, this.localDateTimeNow_1, this.dayOfWeekStrings_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_submitGradeButtonMessageId_u4es2u_k$ = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.marks_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.isEmpty_y1axqb_k$();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.get_courseAssignmentMark_wrnnge_k$();
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMarkerSubmitterUid_4ixg61_k$(), this.activeUserSubmitterId_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().get_update_grade_5iue3a_k$();
    } else {
      tmp = strings_getInstance().get_submit_grade_vswx15_k$();
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_submitGradeButtonAndGoNextMessageId_dsvs8_k$ = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.marks_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.isEmpty_y1axqb_k$();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonAndGoNextMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.get_courseAssignmentMark_wrnnge_k$();
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_camMarkerSubmitterUid_4ixg61_k$(), this.activeUserSubmitterId_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().get_update_grade_and_mark_next_tzaxlk_k$();
    } else {
      tmp = strings_getInstance().get_submit_grade_and_mark_next_rjnnih_k$();
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_visibleMarks_c5dml_k$ = function () {
    var tmp;
    if (this.markListSelectedChipId_1 === CourseAssignmentMarkDaoCommon_getInstance().get_ARG_FILTER_RECENT_SCORES_5p7cq8_k$()) {
      // Inline function 'kotlin.collections.sortedByDescending' call
      var this_0 = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
      // Inline function 'kotlin.comparisons.compareByDescending' call
      var tmp_0 = ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk;
      var tmp$ret$0 = new sam$kotlin_Comparator$0_1(tmp_0);
      tmp = sortedWith(this_0, tmp$ret$0);
    } else {
      tmp = this.marks_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_markListFilterChipsVisible_clpw0n_k$ = function () {
    return hasUpdatedMarks(this.marks_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).get_scoreSummaryVisible_2jzqrv_k$ = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.marks_1.isEmpty_y1axqb_k$();
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component1_7eebsc_k$ = function () {
    return this.submitMarkError_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component2_7eebsb_k$ = function () {
    return this.block_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component3_7eebsa_k$ = function () {
    return this.gradeFilterChips_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component4_7eebs9_k$ = function () {
    return this.submissionList_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component5_7eebs8_k$ = function () {
    return this.submissionAttachments_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component6_7eebs7_k$ = function () {
    return this.marks_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component7_7eebs6_k$ = function () {
    return this.draftMark_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component8_7eebs5_k$ = function () {
    return this.markSubmissionInProgress_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component9_7eebs4_k$ = function () {
    return this.markNextStudentVisible_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component10_gazzfo_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component11_gazzfn_k$ = function () {
    return this.markListSelectedChipId_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component12_gazzfm_k$ = function () {
    return this.markListFilterOptions_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component13_gazzfl_k$ = function () {
    return this.privateCommentsList_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component14_gazzfk_k$ = function () {
    return this.newPrivateCommentTextVisible_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component15_gazzfj_k$ = function () {
    return this.activeUserPersonUid_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component16_gazzfi_k$ = function () {
    return this.activeUserSubmitterId_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component17_gazzfh_k$ = function () {
    return this.activeUserPersonName_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component18_gazzfg_k$ = function () {
    return this.activeUserPictureUri_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component19_gazzff_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component20_gazzet_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component21_gazzes_k$ = function () {
    return this.collapsedSubmissions_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component22_gazzer_k$ = function () {
    return this.openingFileState_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).component23_gazzeq_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).copy_9ioelh_k$ = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    return new ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).copy$default_bmkike_k$ = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions, $super) {
    submitMarkError = submitMarkError === VOID ? this.submitMarkError_1 : submitMarkError;
    block = block === VOID ? this.block_1 : block;
    gradeFilterChips = gradeFilterChips === VOID ? this.gradeFilterChips_1 : gradeFilterChips;
    submissionList = submissionList === VOID ? this.submissionList_1 : submissionList;
    submissionAttachments = submissionAttachments === VOID ? this.submissionAttachments_1 : submissionAttachments;
    marks = marks === VOID ? this.marks_1 : marks;
    draftMark = draftMark === VOID ? this.draftMark_1 : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? this.markSubmissionInProgress_1 : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? this.markNextStudentVisible_1 : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    markListSelectedChipId = markListSelectedChipId === VOID ? this.markListSelectedChipId_1 : markListSelectedChipId;
    markListFilterOptions = markListFilterOptions === VOID ? this.markListFilterOptions_1 : markListFilterOptions;
    privateCommentsList = privateCommentsList === VOID ? this.privateCommentsList_1 : privateCommentsList;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? this.newPrivateCommentTextVisible_1 : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.activeUserPersonUid_1 : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? this.activeUserSubmitterId_1 : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? this.activeUserPersonName_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.activeUserPictureUri_1 : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.collapsedSubmissions_1 : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? this.openingFileState_1 : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? this.showModerateOptions_1 : showModerateOptions;
    return $super === VOID ? this.copy_9ioelh_k$(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) : $super.copy_9ioelh_k$.call(this, submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).toString = function () {
    return 'ClazzAssignmentSubmitterDetailUiState(submitMarkError=' + this.submitMarkError_1 + ', block=' + this.block_1 + ', gradeFilterChips=' + this.gradeFilterChips_1 + ', submissionList=' + this.submissionList_1 + ', submissionAttachments=' + this.submissionAttachments_1 + ', marks=' + this.marks_1 + ', draftMark=' + this.draftMark_1 + ', markSubmissionInProgress=' + this.markSubmissionInProgress_1 + ', markNextStudentVisible=' + this.markNextStudentVisible_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', markListSelectedChipId=' + this.markListSelectedChipId_1 + ', markListFilterOptions=' + this.markListFilterOptions_1 + ', privateCommentsList=' + this.privateCommentsList_1 + ', newPrivateCommentTextVisible=' + this.newPrivateCommentTextVisible_1 + ', activeUserPersonUid=' + this.activeUserPersonUid_1.toString() + ', activeUserSubmitterId=' + this.activeUserSubmitterId_1.toString() + ', activeUserPersonName=' + this.activeUserPersonName_1 + ', activeUserPictureUri=' + this.activeUserPictureUri_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ', collapsedSubmissions=' + this.collapsedSubmissions_1 + ', openingFileState=' + this.openingFileState_1 + ', showModerateOptions=' + this.showModerateOptions_1 + ')';
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).hashCode = function () {
    var result = this.submitMarkError_1 == null ? 0 : getStringHashCode(this.submitMarkError_1);
    result = imul(result, 31) + (this.block_1 == null ? 0 : this.block_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.gradeFilterChips_1) | 0;
    result = imul(result, 31) + hashCode(this.submissionList_1) | 0;
    result = imul(result, 31) + hashCode(this.submissionAttachments_1) | 0;
    result = imul(result, 31) + hashCode(this.marks_1) | 0;
    result = imul(result, 31) + (this.draftMark_1 == null ? 0 : hashCode(this.draftMark_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.markSubmissionInProgress_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.markNextStudentVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + this.markListSelectedChipId_1 | 0;
    result = imul(result, 31) + hashCode(this.markListFilterOptions_1) | 0;
    result = imul(result, 31) + hashCode(this.privateCommentsList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.newPrivateCommentTextVisible_1) | 0;
    result = imul(result, 31) + this.activeUserPersonUid_1.hashCode() | 0;
    result = imul(result, 31) + this.activeUserSubmitterId_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.activeUserPersonName_1) | 0;
    result = imul(result, 31) + (this.activeUserPictureUri_1 == null ? 0 : getStringHashCode(this.activeUserPictureUri_1)) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    result = imul(result, 31) + hashCode(this.collapsedSubmissions_1) | 0;
    result = imul(result, 31) + (this.openingFileState_1 == null ? 0 : this.openingFileState_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showModerateOptions_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentSubmitterDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentSubmitterDetailUiState ? other : THROW_CCE();
    if (!(this.submitMarkError_1 == tmp0_other_with_cast.submitMarkError_1))
      return false;
    if (!equals(this.block_1, tmp0_other_with_cast.block_1))
      return false;
    if (!equals(this.gradeFilterChips_1, tmp0_other_with_cast.gradeFilterChips_1))
      return false;
    if (!equals(this.submissionList_1, tmp0_other_with_cast.submissionList_1))
      return false;
    if (!equals(this.submissionAttachments_1, tmp0_other_with_cast.submissionAttachments_1))
      return false;
    if (!equals(this.marks_1, tmp0_other_with_cast.marks_1))
      return false;
    if (!equals(this.draftMark_1, tmp0_other_with_cast.draftMark_1))
      return false;
    if (!(this.markSubmissionInProgress_1 === tmp0_other_with_cast.markSubmissionInProgress_1))
      return false;
    if (!(this.markNextStudentVisible_1 === tmp0_other_with_cast.markNextStudentVisible_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.markListSelectedChipId_1 === tmp0_other_with_cast.markListSelectedChipId_1))
      return false;
    if (!equals(this.markListFilterOptions_1, tmp0_other_with_cast.markListFilterOptions_1))
      return false;
    if (!equals(this.privateCommentsList_1, tmp0_other_with_cast.privateCommentsList_1))
      return false;
    if (!(this.newPrivateCommentTextVisible_1 === tmp0_other_with_cast.newPrivateCommentTextVisible_1))
      return false;
    if (!this.activeUserPersonUid_1.equals(tmp0_other_with_cast.activeUserPersonUid_1))
      return false;
    if (!this.activeUserSubmitterId_1.equals(tmp0_other_with_cast.activeUserSubmitterId_1))
      return false;
    if (!(this.activeUserPersonName_1 === tmp0_other_with_cast.activeUserPersonName_1))
      return false;
    if (!(this.activeUserPictureUri_1 == tmp0_other_with_cast.activeUserPictureUri_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    if (!equals(this.collapsedSubmissions_1, tmp0_other_with_cast.collapsedSubmissions_1))
      return false;
    if (!equals(this.openingFileState_1, tmp0_other_with_cast.openingFileState_1))
      return false;
    if (!(this.showModerateOptions_1 === tmp0_other_with_cast.showModerateOptions_1))
      return false;
    return true;
  };
  function assignmentSubmitterNameUseCase$factory() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_1() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function assignmentSubmitterNameUseCase$factory_0() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_2() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory_0() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__uiState_8tkbd_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_2glf5a_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).invoke_9nmcg7_k$ = function (nameAndTerminology, $completion) {
    var tmp = this.create_gvq6gd_k$(nameAndTerminology, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9nmcg7_k$((p1 == null ? true : p1 instanceof ClazzNameAndTerminology) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp1_currentTerminologyStrings = this.this$0__1.get__uiState_8tkbd_k$().get_value_j01efc_k$().terminologyStrings_1;
          var tmp0_safe_receiver = this.nameAndTerminology_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_terminology_hmih12_k$();
          var tmp3_json = this.this$0__1.get_json_woos35_k$();
          var tmp4_systemImpl = this.this$0__1.get_systemImpl_9jowp4_k$();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this.this$0__1));
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver_0 = this.nameAndTerminology_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_clazzName_brsrx6_k$();
              var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).create_gvq6gd_k$ = function (nameAndTerminology, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.nameAndTerminology_1 = nameAndTerminology;
    return i;
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_gvq6gd_k$((value == null ? true : value instanceof ClazzNameAndTerminology) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (nameAndTerminology, $completion) {
      return i.invoke_9nmcg7_k$(nameAndTerminology, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).invoke_tixz4u_k$ = function (it, $completion) {
    var tmp = this.create_syqk0m_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_tixz4u_k$(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_2glf5a_k$(VOID, VOID, VOID, VOID, this.it_1.get_firstPermission_y8246u_k$(), this.it_1.get_secondPermission_lfalzo_k$(), this.it_1.get_secondPermission_lfalzo_k$());
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).create_syqk0m_k$ = function (it, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_syqk0m_k$(value instanceof PermissionPair ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_tixz4u_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().getClazzNameAndTerminologyAsFlow_b37obf_k$(this.this$0__1.clazzUid_1);
            var tmp_1 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeDb_bu92wd_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzPairAsFlow_gv7o5k_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_MANAGE_TEACHER_ENROLMENT_2dgmjc_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$()));
            var tmp_1 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda(this$0, $this_launch, resultContinuation) {
    this.this$0__1 = this$0;
    this.$this_launch_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_2glf5a_k$(VOID, VOID, VOID, this.this$0__1.pendingInvitesPagingSource_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          launch(this.$this_launch_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_2(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzMemberListViewModel$slambda$slambda(this.this$0__1, this.$this_launch_1, completion);
  };
  function ClazzMemberListViewModel$slambda$slambda_0(this$0, $this_launch, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda(this$0, $this_launch, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).invoke_cuty2t_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_cuty2t_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.it_1.clazzDao_bk7qje_k$().findByUidAsync_ttwvyf_k$(this.this$0__1.clazzUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzCode_brm18c_k$();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_cuty2t_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_sendClazzInvitesUseCase__utu0z8_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.sendClazzInvitesUseCase$delegate_1;
    sendClazzInvitesUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.approveOrDeclinePendingEnrolmentUseCase$delegate_1;
    approveOrDeclinePendingEnrolmentUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_clazzUid__rrng1f_10($this) {
    return $this.clazzUid_1;
  }
  function getMembersAsPagingSource($this, roleId) {
    var tmp0_$this = $this.get_activeRepoWithFallback_3qnek7_k$().clazzEnrolmentDao_8oyet6_k$();
    var tmp1_clazzUid = $this.clazzUid_1;
    var tmp2_sortOrder = $this.get__uiState_8tkbd_k$().get_value_j01efc_k$().activeSortOrderOption_1.get_flag_wom2lx_k$();
    var tmp3_filter = $this.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedChipId_1;
    var tmp4_searchText = toQueryLikeParam($this.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$());
    var tmp5_accountPersonUid = $this.get_activeUserPersonUid_1nlgnz_k$();
    var tmp6_currentTime = systemTimeInMillis();
    var tmp7_permission = PermissionFlags_getInstance().get_PERSON_VIEW_s2u8t6_k$();
    return tmp0_$this.findByClazzUidAndRole_s0w7co_k$(tmp1_clazzUid, roleId, tmp2_sortOrder, tmp4_searchText, tmp3_filter, tmp5_accountPersonUid, tmp6_currentTime, tmp7_permission);
  }
  function _get_teacherListPagingSource__z0v0bu($this) {
    return $this.teacherListPagingSource_1;
  }
  function _get_studentListPagingSource__x4pz5d_0($this) {
    return $this.studentListPagingSource_1;
  }
  function _get_pendingInvitesPagingSource__evnp81($this) {
    return $this.pendingInvitesPagingSource_1;
  }
  function _get_pendingStudentListPagingSource__981sde($this) {
    return $this.pendingStudentListPagingSource_1;
  }
  function Companion_128() {
    Companion_instance_128 = this;
    this.DEST_NAME_1 = 'CourseMembers';
  }
  protoOf(Companion_128).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_128;
  function Companion_getInstance_189() {
    if (Companion_instance_128 == null)
      new Companion_128();
    return Companion_instance_128;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_18(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_18).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzMemberListViewModel$teacherListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, Companion_getInstance_15().get_ROLE_TEACHER_obiog2_k$());
    };
  }
  function ClazzMemberListViewModel$studentListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$());
    };
  }
  function ClazzMemberListViewModel$pendingInvitesPagingSource$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().clazzInviteDao_k3zs5t_k$().findPendingInviteByPersonUid_93piup_k$(this$0.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_userSession_tatogu_k$().get_usPersonUid_p037ak_k$(), this$0.clazzUid_1, systemTimeInMillis());
    };
  }
  function ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this$0) {
    return function () {
      var tmp0_$this = this$0.get_activeRepoWithFallback_3qnek7_k$().enrolmentRequestDao_hchxfd_k$();
      var tmp1_clazzUid = this$0.clazzUid_1;
      var tmp2_searchText = toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$());
      var tmp3_statusFilter = Companion_getInstance_17().get_STATUS_PENDING_ytco25_k$();
      var tmp4_sortOrder = this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().activeSortOrderOption_1.get_flag_wom2lx_k$();
      return tmp0_$this.findPendingEnrolmentsForCourse_y6fpmg_k$(tmp1_clazzUid, false, tmp3_statusFilter, tmp2_searchText, tmp4_sortOrder);
    };
  }
  function ClazzMemberListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ClazzMemberListViewModel$slambda$slambda_0(this.this$0__1, this.$this$launch_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzMemberListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation) {
    this.this$0__1 = this$0;
    this.$enrolmentDetails_1 = $enrolmentDetails;
    this.$approved_1 = $approved;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(this.this$0__1).invoke_rfy5y2_k$(this.$enrolmentDetails_1, this.$approved_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this.this$0__1.get_snackDispatcher_ifpff8_k$();
            var tmp_1 = this.this$0__1.get_systemImpl_9jowp4_k$();
            var tmp_2 = this.$approved_1 ? strings_getInstance().get_enroled_into_name_43dp6h_k$() : strings_getInstance().get_declined_request_from_name_oynzew_k$();
            var tmp0_elvis_lhs = this.$enrolmentDetails_1.get_erPersonFullname_ldr2sl_k$();
            tmp_0.showSnackBar_r6iyg6_k$(new Snack(tmp_1.formatString_qr9zmw_k$(tmp_2, [tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs])));
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_3 = this.get_exception_x0n6w6_k$();
            if (tmp_3 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_4 = this.this$0__1.get_snackDispatcher_ifpff8_k$();
              var tmp_5 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$());
              var tmp1_elvis_lhs = e.message;
              tmp_4.showSnackBar_r6iyg6_k$(new Snack(tmp_5 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs)));
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this.this$0__1, this.$enrolmentDetails_1, this.$approved_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this$0, $enrolmentDetails, $approved, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation) {
    this.this$0__1 = this$0;
    this.$role_1 = $role;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.this$0__1.get_activeRepo_dmmom9_k$();
            var tmp_1;
            if (this.$role_1 === Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$()) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = localFirstThenRepoIfNull(this.tmp0_safe_receiver0__1, ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this.this$0__1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var clazzCode = this.WHEN_RESULT1__1;
            var tmp_2;
            if (this.$role_1 === Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$()) {
              tmp_2 = strings_getInstance().get_add_a_student_x7zms6_k$();
            } else {
              tmp_2 = strings_getInstance().get_add_a_teacher_ujexqb_k$();
            }

            var titleStringResource = tmp_2;
            var tmp1_safe_receiver = this.this$0__1.get__uiState_8tkbd_k$().get_value_j01efc_k$().terminologyStrings_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_4ktic3_k$(titleStringResource);
            var title = tmp2_elvis_lhs == null ? this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(titleStringResource) : tmp2_elvis_lhs;
            var goToOnPersonSelectedArg = appendQueryArgs(Companion_getInstance_190().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.this$0__1.clazzUid_1.toString()), to(Companion_getInstance_156().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$(), this.this$0__1.get_destinationName_akz2s0_k$()), to(Companion_getInstance_190().get_ARG_ROLE_q19ne0_k$(), this.$role_1.toString())]));
            var this_1 = LinkedHashMap_init_$Create$_0();
            this_1.put_4fpzoq_k$(Companion_getInstance_237().get_ARG_FILTER_EXCLUDE_MEMBERSOFCLAZZ_44kua_k$(), this.this$0__1.clazzUid_1.toString());
            this_1.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_LISTMODE_1jy3rh_k$(), ListViewMode_PICKER_getInstance().get_mode_woqlt8_k$());
            this_1.put_4fpzoq_k$(PersonViewModelConstants_getInstance().get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$(), goToOnPersonSelectedArg);
            this_1.put_4fpzoq_k$(Companion_getInstance_237().get_ARG_SHOW_ADD_VIA_CONTACT_9u4tep_k$(), 'true');
            this_1.put_4fpzoq_k$(Companion_getInstance_237().get_ARG_ROLE_q19ne0_k$(), this.$role_1.toString());
            this_1.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_TITLE_ps2gqu_k$(), title);
            this_1.put_4fpzoq_k$(Companion_getInstance_237().get_ARG_REQUIRE_PERMISSION_TO_SHOW_LIST_bg6c68_k$(), PermissionFlags_getInstance().get_DIRECT_ENROL_255jxj_k$().toString());
            if (!(clazzCode == null)) {
              this_1.put_4fpzoq_k$(Companion_getInstance_237().get_ARG_SHOW_ADD_VIA_INVITE_LINK_CODE_h52gkl_k$(), clazzCode);
            }

            var args = this_1.build_1k0s4u_k$();
            this.this$0__1.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_237().get_DEST_NAME_gmgk7z_k$(), args);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this.this$0__1, this.$role_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this$0, $role, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickRevokeInvite$slambda(this$0, $contact, resultContinuation) {
    this.this$0__1 = this$0;
    this.$contact_1 = $contact;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzInviteDao_k3zs5t_k$().updateClazzInviteToRevokeInvite_v1r5y9_k$(this.$contact_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickRevokeInvite$slambda(this.this$0__1, this.$contact_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$onClickRevokeInvite$slambda_0(this$0, $contact, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickRevokeInvite$slambda(this$0, $contact, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickResendInvite$slambda(this$0, $clazzInvite, resultContinuation) {
    this.this$0__1 = this$0;
    this.$clazzInvite_1 = $clazzInvite;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_sendClazzInvitesUseCase__utu0z8_0(this.this$0__1).invoke_nn9z1m_k$(new SendClazzInvitesRequest(listOf_0(this.$clazzInvite_1.get_inviteContact_jz11ea_k$()), this.$clazzInvite_1.get_ciClazzUid_ckca1z_k$(), this.$clazzInvite_1.get_ciRoleId_ir56o_k$(), this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_personUid_mmhd76_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invitation_sent_55cot1_k$())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickResendInvite$slambda(this.this$0__1, this.$clazzInvite_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzMemberListViewModel$onClickResendInvite$slambda_0(this$0, $clazzInvite, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickResendInvite$slambda(this$0, $clazzInvite, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel(di, savedStateHandle) {
    Companion_getInstance_189();
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzMemberListUiState(), Companion_getInstance_165().get_DEST_NAME_gmgk7z_k$());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.sendClazzInvitesUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, sendClazzInvitesUseCase$factory_1());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_2 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.invoke_4wgfc3_k$(tmp$ret$2, context);
    var this_1 = On(this, tmp$ret$3, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_1.approveOrDeclinePendingEnrolmentUseCase$delegate_1 = Instance(this_1, tmp$ret$5, null).provideDelegate_o2qlc1_k$(this, approveOrDeclinePendingEnrolmentUseCase$factory());
    var tmp_5 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_6;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_6 = tmp1_elvis_lhs;
    }
    tmp_5.clazzUid_1 = tmp_6;
    var tmp_7 = this;
    tmp_7.teacherListPagingSource_1 = ClazzMemberListViewModel$teacherListPagingSource$lambda(this);
    var tmp_8 = this;
    tmp_8.studentListPagingSource_1 = ClazzMemberListViewModel$studentListPagingSource$lambda(this);
    var tmp_9 = this;
    tmp_9.pendingInvitesPagingSource_1 = ClazzMemberListViewModel$pendingInvitesPagingSource$lambda(this);
    var tmp_10 = this;
    tmp_10.pendingStudentListPagingSource_1 = ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_3 = values();
        var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(this_3.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_3.length;
        while (inductionVariable < last) {
          var element = this_3[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$7 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(get_dayStringResource(element));
          result.put_4fpzoq_k$(element, tmp$ret$7);
        }
        var nextValue = prevValue.copy$default_2glf5a_k$(this.studentListPagingSource_1, this.teacherListPagingSource_1, this.pendingStudentListPagingSource_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_2.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_4.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, true, VOID, VOID, VOID, this.createSearchEnabledState$default_7v3uai_k$(), new ActionBarButtonUiState(false));
        if (this_4.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_11 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_11, VOID, VOID, ClazzMemberListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzMemberListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  protoOf(ClazzMemberListViewModel).onClickFilterChip_r5dzw9_k$ = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.copy$default_2glf5a_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, filterOption.get_value_j01efc_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).onClickRespondToPendingEnrolment_9rlwz3_k$ = function (enrolmentDetails, approved) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this, enrolmentDetails, approved, null));
  };
  protoOf(ClazzMemberListViewModel).onClickAddNewMember_vbi2nu_k$ = function (role) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this, role, null));
  };
  protoOf(ClazzMemberListViewModel).onClickEntry_t2zszx_k$ = function (entry) {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_191().get_DEST_NAME_gmgk7z_k$();
    var tmp_1 = Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$();
    var tmp0_safe_receiver = entry.get_person_i0c866_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personUid_mmhd76_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, mapOf([to(tmp_1, (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString()), to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())]));
  };
  protoOf(ClazzMemberListViewModel).onSortOrderChanged_cgn689_k$ = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_2glf5a_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, sortOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).onClickRevokeInvite_mdw5ji_k$ = function (contact) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRevokeInvite$slambda_0(this, contact, null));
  };
  protoOf(ClazzMemberListViewModel).onClickResendInvite_8tosr1_k$ = function (clazzInvite) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickResendInvite$slambda_0(this, clazzInvite, null));
  };
  function ClazzMemberListUiState$_init_$lambda_dc27oi() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_0() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_1() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_2() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (studentList === VOID) {
      tmp = ClazzMemberListUiState$_init_$lambda_dc27oi;
    } else {
      tmp = studentList;
    }
    studentList = tmp;
    var tmp_0;
    if (teacherList === VOID) {
      tmp_0 = ClazzMemberListUiState$_init_$lambda_dc27oi_0;
    } else {
      tmp_0 = teacherList;
    }
    teacherList = tmp_0;
    var tmp_1;
    if (pendingStudentList === VOID) {
      tmp_1 = ClazzMemberListUiState$_init_$lambda_dc27oi_1;
    } else {
      tmp_1 = pendingStudentList;
    }
    pendingStudentList = tmp_1;
    var tmp_2;
    if (pendingInviteList === VOID) {
      tmp_2 = ClazzMemberListUiState$_init_$lambda_dc27oi_2;
    } else {
      tmp_2 = pendingInviteList;
    }
    pendingInviteList = tmp_2;
    addTeacherVisible = addTeacherVisible === VOID ? false : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? false : addStudentVisible;
    pendingInviteListVisible = pendingInviteListVisible === VOID ? false : pendingInviteListVisible;
    sortOptions = sortOptions === VOID ? listOf([new SortOrderOption(strings_getInstance().get_first_name_mu3jr1_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_FIRST_NAME_ASC_uiz2kk_k$(), true), new SortOrderOption(strings_getInstance().get_first_name_mu3jr1_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_FIRST_NAME_DESC_mxs51a_k$(), false), new SortOrderOption(strings_getInstance().get_last_name_t811qt_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_LAST_NAME_ASC_qs7cum_k$(), true), new SortOrderOption(strings_getInstance().get_last_name_t811qt_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_LAST_NAME_DESC_m2yybw_k$(), false), new SortOrderOption(strings_getInstance().get_date_enroll_tg6mem_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_DATE_REGISTERED_ASC_cdy0er_k$(), true), new SortOrderOption(strings_getInstance().get_date_enroll_tg6mem_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_DATE_REGISTERED_DESC_suoft7_k$(), false), new SortOrderOption(strings_getInstance().get_date_left_4e7psf_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_DATE_LEFT_ASC_bkyss2_k$(), true), new SortOrderOption(strings_getInstance().get_date_left_4e7psf_k$(), ClazzEnrolmentDaoCommon_getInstance().get_SORT_DATE_LEFT_DESC_3wg5ao_k$(), false)]) : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? ClazzEnrolmentDaoCommon_getInstance().get_FILTER_ACTIVE_ONLY_23n62h_k$() : selectedChipId;
    filterOptions = filterOptions === VOID ? listOf([new MessageIdOption2(strings_getInstance().get_active_avldsf_k$(), ClazzEnrolmentDaoCommon_getInstance().get_FILTER_ACTIVE_ONLY_23n62h_k$()), new MessageIdOption2(strings_getInstance().get_all_18j9hk_k$(), 0)]) : filterOptions;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.studentList_1 = studentList;
    this.teacherList_1 = teacherList;
    this.pendingStudentList_1 = pendingStudentList;
    this.pendingInviteList_1 = pendingInviteList;
    this.addTeacherVisible_1 = addTeacherVisible;
    this.addStudentVisible_1 = addStudentVisible;
    this.pendingInviteListVisible_1 = pendingInviteListVisible;
    this.sortOptions_1 = sortOptions;
    this.activeSortOrderOption_1 = activeSortOrderOption;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.selectedChipId_1 = selectedChipId;
    this.filterOptions_1 = filterOptions;
    this.terminologyStrings_1 = terminologyStrings;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
  }
  protoOf(ClazzMemberListUiState).get_studentList_i7bs34_k$ = function () {
    return this.studentList_1;
  };
  protoOf(ClazzMemberListUiState).get_teacherList_tox1vt_k$ = function () {
    return this.teacherList_1;
  };
  protoOf(ClazzMemberListUiState).get_pendingStudentList_r10r8r_k$ = function () {
    return this.pendingStudentList_1;
  };
  protoOf(ClazzMemberListUiState).get_pendingInviteList_zgr4id_k$ = function () {
    return this.pendingInviteList_1;
  };
  protoOf(ClazzMemberListUiState).get_addTeacherVisible_uh7o8o_k$ = function () {
    return this.addTeacherVisible_1;
  };
  protoOf(ClazzMemberListUiState).get_addStudentVisible_keb67_k$ = function () {
    return this.addStudentVisible_1;
  };
  protoOf(ClazzMemberListUiState).get_pendingInviteListVisible_fvyajn_k$ = function () {
    return this.pendingInviteListVisible_1;
  };
  protoOf(ClazzMemberListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ClazzMemberListUiState).get_activeSortOrderOption_750yy_k$ = function () {
    return this.activeSortOrderOption_1;
  };
  protoOf(ClazzMemberListUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzMemberListUiState).get_selectedChipId_ens6id_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzMemberListUiState).get_filterOptions_xfykv7_k$ = function () {
    return this.filterOptions_1;
  };
  protoOf(ClazzMemberListUiState).get_terminologyStrings_8n33mw_k$ = function () {
    return this.terminologyStrings_1;
  };
  protoOf(ClazzMemberListUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzMemberListUiState).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ClazzMemberListUiState).component1_7eebsc_k$ = function () {
    return this.studentList_1;
  };
  protoOf(ClazzMemberListUiState).component2_7eebsb_k$ = function () {
    return this.teacherList_1;
  };
  protoOf(ClazzMemberListUiState).component3_7eebsa_k$ = function () {
    return this.pendingStudentList_1;
  };
  protoOf(ClazzMemberListUiState).component4_7eebs9_k$ = function () {
    return this.pendingInviteList_1;
  };
  protoOf(ClazzMemberListUiState).component5_7eebs8_k$ = function () {
    return this.addTeacherVisible_1;
  };
  protoOf(ClazzMemberListUiState).component6_7eebs7_k$ = function () {
    return this.addStudentVisible_1;
  };
  protoOf(ClazzMemberListUiState).component7_7eebs6_k$ = function () {
    return this.pendingInviteListVisible_1;
  };
  protoOf(ClazzMemberListUiState).component8_7eebs5_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ClazzMemberListUiState).component9_7eebs4_k$ = function () {
    return this.activeSortOrderOption_1;
  };
  protoOf(ClazzMemberListUiState).component10_gazzfo_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzMemberListUiState).component11_gazzfn_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzMemberListUiState).component12_gazzfm_k$ = function () {
    return this.filterOptions_1;
  };
  protoOf(ClazzMemberListUiState).component13_gazzfl_k$ = function () {
    return this.terminologyStrings_1;
  };
  protoOf(ClazzMemberListUiState).component14_gazzfk_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ClazzMemberListUiState).component15_gazzfj_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ClazzMemberListUiState).copy_jxe4n7_k$ = function (studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    return new ClazzMemberListUiState(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).copy$default_2glf5a_k$ = function (studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings, $super) {
    studentList = studentList === VOID ? this.studentList_1 : studentList;
    teacherList = teacherList === VOID ? this.teacherList_1 : teacherList;
    pendingStudentList = pendingStudentList === VOID ? this.pendingStudentList_1 : pendingStudentList;
    pendingInviteList = pendingInviteList === VOID ? this.pendingInviteList_1 : pendingInviteList;
    addTeacherVisible = addTeacherVisible === VOID ? this.addTeacherVisible_1 : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? this.addStudentVisible_1 : addStudentVisible;
    pendingInviteListVisible = pendingInviteListVisible === VOID ? this.pendingInviteListVisible_1 : pendingInviteListVisible;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.activeSortOrderOption_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.selectedChipId_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.filterOptions_1 : filterOptions;
    terminologyStrings = terminologyStrings === VOID ? this.terminologyStrings_1 : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    return $super === VOID ? this.copy_jxe4n7_k$(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) : $super.copy_jxe4n7_k$.call(this, studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).toString = function () {
    return 'ClazzMemberListUiState(studentList=' + this.studentList_1 + ', teacherList=' + this.teacherList_1 + ', pendingStudentList=' + this.pendingStudentList_1 + ', pendingInviteList=' + this.pendingInviteList_1 + ', addTeacherVisible=' + this.addTeacherVisible_1 + ', addStudentVisible=' + this.addStudentVisible_1 + ', pendingInviteListVisible=' + this.pendingInviteListVisible_1 + ', sortOptions=' + this.sortOptions_1 + ', activeSortOrderOption=' + this.activeSortOrderOption_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', selectedChipId=' + this.selectedChipId_1 + ', filterOptions=' + this.filterOptions_1 + ', terminologyStrings=' + this.terminologyStrings_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ')';
  };
  protoOf(ClazzMemberListUiState).hashCode = function () {
    var result = hashCode(this.studentList_1);
    result = imul(result, 31) + hashCode(this.teacherList_1) | 0;
    result = imul(result, 31) + hashCode(this.pendingStudentList_1) | 0;
    result = imul(result, 31) + hashCode(this.pendingInviteList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.addTeacherVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.addStudentVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pendingInviteListVisible_1) | 0;
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.activeSortOrderOption_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + this.selectedChipId_1 | 0;
    result = imul(result, 31) + hashCode(this.filterOptions_1) | 0;
    result = imul(result, 31) + (this.terminologyStrings_1 == null ? 0 : this.terminologyStrings_1.hashCode()) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    return result;
  };
  protoOf(ClazzMemberListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzMemberListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzMemberListUiState ? other : THROW_CCE();
    if (!equals(this.studentList_1, tmp0_other_with_cast.studentList_1))
      return false;
    if (!equals(this.teacherList_1, tmp0_other_with_cast.teacherList_1))
      return false;
    if (!equals(this.pendingStudentList_1, tmp0_other_with_cast.pendingStudentList_1))
      return false;
    if (!equals(this.pendingInviteList_1, tmp0_other_with_cast.pendingInviteList_1))
      return false;
    if (!(this.addTeacherVisible_1 === tmp0_other_with_cast.addTeacherVisible_1))
      return false;
    if (!(this.addStudentVisible_1 === tmp0_other_with_cast.addStudentVisible_1))
      return false;
    if (!(this.pendingInviteListVisible_1 === tmp0_other_with_cast.pendingInviteListVisible_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.activeSortOrderOption_1.equals(tmp0_other_with_cast.activeSortOrderOption_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.selectedChipId_1 === tmp0_other_with_cast.selectedChipId_1))
      return false;
    if (!equals(this.filterOptions_1, tmp0_other_with_cast.filterOptions_1))
      return false;
    if (!equals(this.terminologyStrings_1, tmp0_other_with_cast.terminologyStrings_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    return true;
  };
  function sendClazzInvitesUseCase$factory_1() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8_0(receiver);
    }, null);
  }
  function approveOrDeclinePendingEnrolmentUseCase$factory() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory_2() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8_0(receiver);
    }, null);
  }
  function approveOrDeclinePendingEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).invoke_pm5a4_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pm5a4_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.db_1.clazzEnrolmentDao_8oyet6_k$();
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.findEnrolmentWithLeavingReason_lv06cu_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT1__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pm5a4_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.$savedStateHandle_1 = $savedStateHandle;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).invoke_fiwndr_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_fiwndr_k$($completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.this0__1 = new ClazzEnrolmentWithLeavingReason();
            var tmp_1 = this;
            tmp_1.$this$apply1__1 = this.this0__1;
            var tmp0_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$());
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_2;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No clazzUid for enrolment!');
            } else {
              tmp_2 = tmp1_elvis_lhs;
            }

            this.$this$apply1__1.set_clazzEnrolmentClazzUid_1nipul_k$(tmp_2);
            var tmp2_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$());
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            var tmp_3;
            if (tmp3_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No personuid for enrolment!');
            } else {
              tmp_3 = tmp3_elvis_lhs;
            }

            this.$this$apply1__1.set_clazzEnrolmentPersonUid_qntlsc_k$(tmp_3);
            this.$this$apply1__1.set_clazzEnrolmentDateJoined_miq3em_k$(systemTimeInMillis());
            var tmp4_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$('role');
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toInt(tmp4_safe_receiver);
            this.$this$apply1__1.set_clazzEnrolmentRole_38vbyv_k$(tmp5_elvis_lhs == null ? Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$() : tmp5_elvis_lhs);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().getClazzTimeZoneByClazzUidAsync_rra6gu_k$(this.$this$apply1__1.get_clazzEnrolmentClazzUid_5dtar_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp6_elvis_lhs = suspendResult;
            var tmp_4;
            if (tmp6_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not find timezone for clazzUid');
            } else {
              tmp_4 = tmp6_elvis_lhs;
            }

            var ARGUMENT = tmp_4;
            this.$this$apply1__1.set_timeZone_fxensv_k$(ARGUMENT);
            return this.this0__1;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzEnrolmentEditViewModel$slambda$slambda_1(this.$savedStateHandle_1, this.this$0__1, completion);
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_fiwndr_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_lp4xg5_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).invoke_58ujx5_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_58ujx5_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseTerminologyDao_p353oa_k$();
            var tmp0_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().clazzEnrolment_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzEnrolmentClazzUid_5dtar_k$();
            suspendResult = tmp_0.getTerminologyForClazz_jhzbsn_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this.this$0__1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_58ujx5_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get__uiState__8e9jsd_16($this) {
    return $this._uiState_1;
  }
  function _get_enrolIntoCourseUseCase__jh2n4b_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.enrolIntoCourseUseCase$delegate_1;
    enrolIntoCourseUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function hasErrors_1(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.roleSelectedError_1 == null) ? true : !(_this__u8e3s4.startDateError_1 == null)) ? true : !(_this__u8e3s4.endDateError_1 == null);
  }
  function Companion_129() {
    Companion_instance_129 = this;
    this.DEST_NAME_1 = 'EnrolmentEdit';
    this.ARG_ROLE_1 = 'role';
  }
  protoOf(Companion_129).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_129).get_ARG_ROLE_q19ne0_k$ = function () {
    return this.ARG_ROLE_1;
  };
  var Companion_instance_129;
  function Companion_getInstance_190() {
    if (Companion_instance_129 == null)
      new Companion_129();
    return Companion_instance_129;
  }
  function ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda).invoke_pclm39_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.coursePermissionDao_t5l7mw_k$().userHasEnrolmentEditPermission_xp854e_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pclm39_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_46().serializer_9w0wvi_k$();
            var tmp_1 = ClazzEnrolmentEditViewModel$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = ClazzEnrolmentEditViewModel$slambda$slambda_2(this.$savedStateHandle_1, this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEnrolmentEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            var tmp_3 = this.this$0__1.get_activeDb_bu92wd_k$().coursePermissionDao_t5l7mw_k$();
            var tmp_4 = this.this$0__1.get_activeUserPersonUid_1nlgnz_k$();
            var tmp0_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().clazzEnrolment_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzEnrolmentClazzUid_5dtar_k$();
            suspendResult = tmp_3.personHasPermissionWithClazzPairAsync_lowfqo_k$(tmp_4, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_TEACHER_ENROLMENT_2dgmjc_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.tmp2_container0__1 = suspendResult;
            this.canManageStudentEnrolment1__1 = this.tmp2_container0__1.component1_7eebsc_k$();
            this.canManageTeacherEnrolment2__1 = this.tmp2_container0__1.component2_7eebsb_k$();
            var tmp_5 = this;
            tmp_5.terminology3__1 = async(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda$slambda_4(this.this$0__1, null));
            var tmp_6 = this;
            var this_0 = ArrayList_init_$Create$();
            if (this.canManageStudentEnrolment1__1) {
              this_0.add_utx5q5_k$(Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$());
            }

            if (this.canManageTeacherEnrolment2__1) {
              this_0.add_utx5q5_k$(Companion_getInstance_15().get_ROLE_TEACHER_obiog2_k$());
            }

            tmp_6.roleOptions4__1 = this_0.build_1k0s4u_k$();
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.terminology3__1.await_4rdzbx_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_safe_receiver = suspendResult;
            var tmp_7;
            if (tmp3_safe_receiver == null) {
              tmp_7 = null;
            } else {
              tmp_7 = CourseTerminologyStrings_init_$Create$(tmp3_safe_receiver, this.this$0__1.get_systemImpl_9jowp4_k$(), this.this$0__1.get_json_woos35_k$());
            }

            var terminologyStrings = tmp_7;
            l$ret$1: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_1.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_lp4xg5_k$(VOID, VOID, VOID, VOID, true, terminologyStrings, this.roleOptions4__1);
                if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_2 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_2.get_value_j01efc_k$();
                var tmp_8 = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
                var tmp_9 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, tmp_8, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_9, VOID, ClazzEnrolmentEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entity_1 = $entity;
    this.$timeZoneVal_1 = $timeZoneVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            if (this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = _get_enrolIntoCourseUseCase__jh2n4b_0(this.this$0__1).invoke_fu5zz0_k$(this.$entity_1, this.$timeZoneVal_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().clazzEnrolmentDao_8oyet6_k$().updateAsync_vdvqtl_k$(this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            var popUpToOnFinish = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$());
            if (!(popUpToOnFinish == null)) {
              this.this$0__1.get_navController_qibdoq_k$().popBackStack_rnnumt_k$(popUpToOnFinish, false);
            } else {
              this.this$0__1.finishWithResult_jlqwtj_k$(this.$entity_1);
            }

            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this.this$0__1, this.$entity_1, this.$timeZoneVal_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this$0, $entity, $timeZoneVal, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel(di, savedStateHandle) {
    Companion_getInstance_190();
    UstadEditViewModel.call(this, di, savedStateHandle, 'EnrolmentEdit');
    this._uiState_1 = MutableStateFlow(new ClazzEnrolmentEditUiState(VOID, VOID, VOID, VOID, false));
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.enrolIntoCourseUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, enrolIntoCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_INDETERMINATE_a8koem_k$(), this.createEditTitle_2tyyvi_k$(strings_getInstance().get_new_enrolment_cnesdg_k$(), strings_getInstance().get_edit_enrolment_xzlzp4_k$()));
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzEnrolmentEditViewModel$slambda_0(this, null);
    this.launchIfHasPermission$default_l9omam_k$(tmp_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ClazzEnrolmentEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzEnrolmentEditViewModel).onEntityChanged_egoie2_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.clazzEnrolment_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzEnrolmentRole_ttzs6t_k$();
        var tmp_0 = this.updateErrorMessageOnChange_silrgy_k$(tmp, entity == null ? null : entity.get_clazzEnrolmentRole_ttzs6t_k$(), prevValue.roleSelectedError_1);
        var tmp2_safe_receiver = prevValue.clazzEnrolment_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_clazzEnrolmentDateJoined_r9j21g_k$();
        var nextValue = prevValue.copy$default_lp4xg5_k$(entity, tmp_0, this.updateErrorMessageOnChange_silrgy_k$(tmp_1, entity == null ? null : entity.get_clazzEnrolmentDateJoined_r9j21g_k$(), prevValue.startDateError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_46().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_2, VOID, VOID, ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(ClazzEnrolmentEditViewModel).onClickSave_ncak3a_k$ = function () {
    if (this.get_loadingState_rpk2ke_k$().equals(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()))
      return Unit_getInstance();
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().clazzEnrolment_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    var timeZoneVal = entity.get_timeZone_4vh49u_k$();
    if (timeZoneVal == null) {
      this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack('Error: no time zone for course'));
      return Unit_getInstance();
    }
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.copy$default_lp4xg5_k$(VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (entity.get_clazzEnrolmentRole_ttzs6t_k$() === 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_1.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_lp4xg5_k$(VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    if (entity.get_clazzEnrolmentDateJoined_r9j21g_k$().compareTo_9jj042_k$(toLong(imul(get_MS_PER_HOUR(), 24))) <= 0) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this._uiState_1;
        while (true) {
          var prevValue_1 = this_2.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.copy$default_lp4xg5_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (entity.get_clazzEnrolmentDateLeft_hxlqp6_k$().compareTo_9jj042_k$(entity.get_clazzEnrolmentDateJoined_r9j21g_k$()) <= 0) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this._uiState_1;
        while (true) {
          var prevValue_2 = this_3.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.copy$default_lp4xg5_k$(VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_end_is_before_start_error_iebdqr_k$()));
          if (this_3.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
    }
    if (hasErrors_1(this._uiState_1.get_value_j01efc_k$(), this)) {
      $l$block_3: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this._uiState_1;
        while (true) {
          var prevValue_3 = this_4.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_3 = prevValue_3.copy$default_lp4xg5_k$(VOID, VOID, VOID, VOID, true);
          if (this_4.compareAndSet_l3595a_k$(prevValue_3, nextValue_3)) {
            break $l$block_3;
          }
        }
      }
      return Unit_getInstance();
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this, entity, timeZoneVal, null));
  };
  function ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    clazzEnrolment = clazzEnrolment === VOID ? null : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? null : roleSelectedError;
    startDateError = startDateError === VOID ? null : startDateError;
    endDateError = endDateError === VOID ? null : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    roleOptions = roleOptions === VOID ? listOf([Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$(), Companion_getInstance_15().get_ROLE_TEACHER_obiog2_k$()]) : roleOptions;
    this.clazzEnrolment_1 = clazzEnrolment;
    this.roleSelectedError_1 = roleSelectedError;
    this.startDateError_1 = startDateError;
    this.endDateError_1 = endDateError;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.courseTerminology_1 = courseTerminology;
    this.roleOptions_1 = roleOptions;
  }
  protoOf(ClazzEnrolmentEditUiState).get_clazzEnrolment_p0dax7_k$ = function () {
    return this.clazzEnrolment_1;
  };
  protoOf(ClazzEnrolmentEditUiState).get_roleSelectedError_a2m7gy_k$ = function () {
    return this.roleSelectedError_1;
  };
  protoOf(ClazzEnrolmentEditUiState).get_startDateError_mzigu9_k$ = function () {
    return this.startDateError_1;
  };
  protoOf(ClazzEnrolmentEditUiState).get_endDateError_6rr3h4_k$ = function () {
    return this.endDateError_1;
  };
  protoOf(ClazzEnrolmentEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzEnrolmentEditUiState).get_courseTerminology_pxom3z_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzEnrolmentEditUiState).get_roleOptions_3o19en_k$ = function () {
    return this.roleOptions_1;
  };
  protoOf(ClazzEnrolmentEditUiState).get_outcomeVisible_ks155_k$ = function () {
    var tmp0_safe_receiver = this.clazzEnrolment_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzEnrolmentRole_ttzs6t_k$()) === Companion_getInstance_15().get_ROLE_STUDENT_h1t6zf_k$();
  };
  protoOf(ClazzEnrolmentEditUiState).component1_7eebsc_k$ = function () {
    return this.clazzEnrolment_1;
  };
  protoOf(ClazzEnrolmentEditUiState).component2_7eebsb_k$ = function () {
    return this.roleSelectedError_1;
  };
  protoOf(ClazzEnrolmentEditUiState).component3_7eebsa_k$ = function () {
    return this.startDateError_1;
  };
  protoOf(ClazzEnrolmentEditUiState).component4_7eebs9_k$ = function () {
    return this.endDateError_1;
  };
  protoOf(ClazzEnrolmentEditUiState).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzEnrolmentEditUiState).component6_7eebs7_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzEnrolmentEditUiState).component7_7eebs6_k$ = function () {
    return this.roleOptions_1;
  };
  protoOf(ClazzEnrolmentEditUiState).copy_q6jss_k$ = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    return new ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).copy$default_lp4xg5_k$ = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions, $super) {
    clazzEnrolment = clazzEnrolment === VOID ? this.clazzEnrolment_1 : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? this.roleSelectedError_1 : roleSelectedError;
    startDateError = startDateError === VOID ? this.startDateError_1 : startDateError;
    endDateError = endDateError === VOID ? this.endDateError_1 : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? this.courseTerminology_1 : courseTerminology;
    roleOptions = roleOptions === VOID ? this.roleOptions_1 : roleOptions;
    return $super === VOID ? this.copy_q6jss_k$(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) : $super.copy_q6jss_k$.call(this, clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).toString = function () {
    return 'ClazzEnrolmentEditUiState(clazzEnrolment=' + this.clazzEnrolment_1 + ', roleSelectedError=' + this.roleSelectedError_1 + ', startDateError=' + this.startDateError_1 + ', endDateError=' + this.endDateError_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', courseTerminology=' + this.courseTerminology_1 + ', roleOptions=' + this.roleOptions_1 + ')';
  };
  protoOf(ClazzEnrolmentEditUiState).hashCode = function () {
    var result = this.clazzEnrolment_1 == null ? 0 : hashCode(this.clazzEnrolment_1);
    result = imul(result, 31) + (this.roleSelectedError_1 == null ? 0 : getStringHashCode(this.roleSelectedError_1)) | 0;
    result = imul(result, 31) + (this.startDateError_1 == null ? 0 : getStringHashCode(this.startDateError_1)) | 0;
    result = imul(result, 31) + (this.endDateError_1 == null ? 0 : getStringHashCode(this.endDateError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + (this.courseTerminology_1 == null ? 0 : this.courseTerminology_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.roleOptions_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentEditUiState ? other : THROW_CCE();
    if (!equals(this.clazzEnrolment_1, tmp0_other_with_cast.clazzEnrolment_1))
      return false;
    if (!(this.roleSelectedError_1 == tmp0_other_with_cast.roleSelectedError_1))
      return false;
    if (!(this.startDateError_1 == tmp0_other_with_cast.startDateError_1))
      return false;
    if (!(this.endDateError_1 == tmp0_other_with_cast.endDateError_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!equals(this.courseTerminology_1, tmp0_other_with_cast.courseTerminology_1))
      return false;
    if (!equals(this.roleOptions_1, tmp0_other_with_cast.roleOptions_1))
      return false;
    return true;
  };
  function enrolIntoCourseUseCase$factory() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b_0(receiver);
    }, null);
  }
  function enrolIntoCourseUseCase$factory_0() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b_0(receiver);
    }, null);
  }
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).invoke_m6ysgq_k$ = function (value, $completion) {
    var tmp = this.create_8fthgm_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_m6ysgq_k$(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform0__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value1__1 = this.value_1;
            this.set_state_rjd8d0_k$(1);
            var it = this.value1__1;
            suspendResult = this.$this$unsafeTransform0__1.emit_t92u1f_k$(it.get_thirdPermission_eqk7df_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).create_8fthgm_k$ = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8fthgm_k$(value instanceof PermissionTriple ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_m6ysgq_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$60(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$60).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).invoke_m6ysgq_k$ = function (it, $completion) {
    var tmp = this.create_8fthgm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_m6ysgq_k$(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_container = this.it_1;
          var canEditTeacherEnrolments = tmp0_container.component1_7eebsc_k$();
          var canEditStudentEnrolments = tmp0_container.component2_7eebsb_k$();
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_vbjilf_k$(VOID, VOID, VOID, canEditTeacherEnrolments, canEditStudentEnrolments);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).create_8fthgm_k$ = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_8fthgm_k$(value instanceof PermissionTriple ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_m6ysgq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).invoke_yuhn6m_k$ = function (it, $completion) {
    var tmp = this.create_2mikkq_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_yuhn6m_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_vbjilf_k$(this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).create_2mikkq_k$ = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_2mikkq_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_yuhn6m_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).invoke_f29lti_k$ = function (canViewMembers, $completion) {
    var tmp = this.create_vh5neu_k$(canViewMembers, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1;
            if (this.canViewMembers_1) {
              tmp_1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzEnrolmentDao_8oyet6_k$().findAllEnrolmentsByPersonAndClazzUid_gp5yes_k$(this.this$0__1.argPersonUid_1, this.this$0__1.argClazzUid_1);
            } else {
              tmp_1 = flowOf(emptyList());
            }

            tmp_0.enrolmentsListFlow0__1 = tmp_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_2 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = this.enrolmentsListFlow0__1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).create_vh5neu_k$ = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.canViewMembers_1 = canViewMembers;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.invoke_f29lti_k$(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.$$this$unsafeFlow_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).invoke_f29lti_k$ = function (value, $completion) {
    var tmp = this.create_vh5neu_k$(value, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.$this$unsafeTransform1__1 = this.$$this$unsafeFlow_1;
            var tmp_1 = this;
            tmp_1.value2__1 = this.value_1;
            if (this.value2__1) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = this.$this$unsafeTransform1__1.emit_t92u1f_k$(this.value2__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 2:
            if (false) {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 3:
            this.tmp$ret$00__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).create_vh5neu_k$ = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda(this.$$this$unsafeFlow_1, completion);
    i.value_1 = value;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.invoke_f29lti_k$(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$61(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.collector_1 = collector;
  }
  protoOf($collectCOROUTINE$61).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.$this$unsafeFlow0__1 = this.collector_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.$this$unsafeFlow0__1, null);
            suspendResult = this._this__u8e3s4__1.$this_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_7($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_7).collect_aebrhc_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$61(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_7).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_aebrhc_k$(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).invoke_f29lti_k$ = function (canViewMembers, $completion) {
    var tmp = this.create_vh5neu_k$(canViewMembers, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (this.canViewMembers_1) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzEnrolmentDao_8oyet6_k$().getClazzNameAndPersonName_hz03dx_k$(this.this$0__1.argPersonUid_1, this.this$0__1.argClazzUid_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            var courseAndPersonName = suspendResult;
            var tmp_0 = courseAndPersonName == null ? null : courseAndPersonName.get_firstNames_n3o3y7_k$();
            var personName = '' + tmp_0 + ' ' + (courseAndPersonName == null ? null : courseAndPersonName.get_lastName_f360wa_k$());
            l$ret$1: do {
              var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_vbjilf_k$(VOID, personName, courseAndPersonName == null ? null : courseAndPersonName.get_clazzName_brsrx6_k$());
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, personName);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).create_vh5neu_k$ = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.canViewMembers_1 = canViewMembers;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.invoke_f29lti_k$(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseTerminologyDao_p353oa_k$().getTerminologyForClazz_jhzbsn_k$(this.this$0__1.argClazzUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_vbjilf_k$(VOID, VOID, VOID, VOID, VOID, terminology);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.$permissionFlow_1 = $permissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.$permissionFlow_1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1(this.$permissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_2($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation) {
    this.$canViewMembersFlow_1 = $canViewMembersFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.$canViewMembersFlow_1);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3(this.$canViewMembersFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_4($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation) {
    this.$canViewMembersFlow_1 = $canViewMembersFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = distinctUntilChanged(this.$canViewMembersFlow_1);
            var tmp_0 = new _no_name_provided__qut3iv_7(this_0);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5(this.$canViewMembersFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_6($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_8($this) {
    this.$this_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_8).collect_aebrhc_k$ = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$60(this, collector, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(_no_name_provided__qut3iv_8).collect_aksokr_k$ = function (collector, $completion) {
    return this.collect_aebrhc_k$(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    this.$permissionFlow_1 = $permissionFlow;
    this.$canViewMembersFlow_1 = $canViewMembersFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_2(this.$permissionFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_4(this.$canViewMembersFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_6(this.$canViewMembersFlow_1, this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzEnrolmentListViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, this.$permissionFlow_1, this.$canViewMembersFlow_1, completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda_0($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_argClazzUid__sptekj_0($this) {
    return $this.argClazzUid_1;
  }
  function _get_argPersonUid__j0lhba($this) {
    return $this.argPersonUid_1;
  }
  function Companion_130() {
    Companion_instance_130 = this;
    this.DEST_NAME_1 = 'CourseEnrolments';
  }
  protoOf(Companion_130).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_130;
  function Companion_getInstance_191() {
    if (Companion_instance_130 == null)
      new Companion_130();
    return Companion_instance_130;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_19(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_19).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.permissionFlow0__1 = shareIn(this.this$0__1.get_activeDb_bu92wd_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzTripleAsFlow_8uozny_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.argClazzUid_1, PermissionFlags_getInstance().get_COURSE_MANAGE_TEACHER_ENROLMENT_2dgmjc_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$(), PermissionFlags_getInstance().get_PERSON_VIEW_s2u8t6_k$()), this.this$0__1.get_viewModelScope_ryv1dz_k$(), Companion_getInstance_38().WhileSubscribed$default_3cgwv5_k$());
            var tmp_0 = this;
            var this_0 = this.permissionFlow0__1;
            tmp_0.canViewMembersFlow1__1 = new _no_name_provided__qut3iv_8(this_0);
            this.set_state_rjd8d0_k$(1);
            var tmp_1 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_1, ClazzEnrolmentListViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, this.permissionFlow0__1, this.canViewMembersFlow1__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzEnrolmentListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel(di, savedStateHandle) {
    Companion_getInstance_191();
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzEnrolmentListUiState(), 'CourseEnrolments');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.argClazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$());
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.argPersonUid_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzEnrolmentListViewModel).onClickEditEnrolment_lfi2au_k$ = function (enrolment) {
    this.navigateForResult$default_qg960j_k$(Companion_getInstance_190().get_DEST_NAME_gmgk7z_k$(), '', null, Companion_getInstance_46().serializer_9w0wvi_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), enrolment.get_clazzEnrolmentUid_xeo3a3_k$().toString())), VOID, true);
  };
  protoOf(ClazzEnrolmentListViewModel).onClickViewProfile_e6vos5_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_234().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), this.argPersonUid_1.toString())));
  };
  protoOf(ClazzEnrolmentListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  protoOf(ClazzEnrolmentListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  function ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    enrolmentList = enrolmentList === VOID ? emptyList() : enrolmentList;
    personName = personName === VOID ? null : personName;
    courseName = courseName === VOID ? null : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? false : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? false : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.enrolmentList_1 = enrolmentList;
    this.personName_1 = personName;
    this.courseName_1 = courseName;
    this.canEditTeacherEnrolments_1 = canEditTeacherEnrolments;
    this.canEditStudentEnrolments_1 = canEditStudentEnrolments;
    this.courseTerminology_1 = courseTerminology;
    this.timeZone_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListUiState).get_enrolmentList_1pdxmh_k$ = function () {
    return this.enrolmentList_1;
  };
  protoOf(ClazzEnrolmentListUiState).get_personName_8yat4n_k$ = function () {
    return this.personName_1;
  };
  protoOf(ClazzEnrolmentListUiState).set_courseName_q0dn58_k$ = function (_set____db54di) {
    this.courseName_1 = _set____db54di;
  };
  protoOf(ClazzEnrolmentListUiState).get_courseName_l0m6dr_k$ = function () {
    return this.courseName_1;
  };
  protoOf(ClazzEnrolmentListUiState).get_canEditTeacherEnrolments_opxym8_k$ = function () {
    return this.canEditTeacherEnrolments_1;
  };
  protoOf(ClazzEnrolmentListUiState).get_canEditStudentEnrolments_6qnpuh_k$ = function () {
    return this.canEditStudentEnrolments_1;
  };
  protoOf(ClazzEnrolmentListUiState).get_courseTerminology_pxom3z_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzEnrolmentListUiState).get_timeZone_4vh49u_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzEnrolmentListUiState).enrolmentItemUiState_w8vx3p_k$ = function (enrolment) {
    var tmp;
    if (enrolment.get_clazzEnrolmentRole_ttzs6t_k$() === Companion_getInstance_15().get_ROLE_TEACHER_obiog2_k$()) {
      tmp = this.canEditTeacherEnrolments_1;
    } else {
      tmp = this.canEditTeacherEnrolments_1;
    }
    var tmp0_canEdit = tmp;
    var tmp1_timeZone = this.timeZone_1;
    return new ClazzEnrolmentListItemUiState(tmp0_canEdit, enrolment, tmp1_timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).component1_7eebsc_k$ = function () {
    return this.enrolmentList_1;
  };
  protoOf(ClazzEnrolmentListUiState).component2_7eebsb_k$ = function () {
    return this.personName_1;
  };
  protoOf(ClazzEnrolmentListUiState).component3_7eebsa_k$ = function () {
    return this.courseName_1;
  };
  protoOf(ClazzEnrolmentListUiState).component4_7eebs9_k$ = function () {
    return this.canEditTeacherEnrolments_1;
  };
  protoOf(ClazzEnrolmentListUiState).component5_7eebs8_k$ = function () {
    return this.canEditStudentEnrolments_1;
  };
  protoOf(ClazzEnrolmentListUiState).component6_7eebs7_k$ = function () {
    return this.courseTerminology_1;
  };
  protoOf(ClazzEnrolmentListUiState).component7_7eebs6_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzEnrolmentListUiState).copy_lya7vm_k$ = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    return new ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).copy$default_vbjilf_k$ = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone, $super) {
    enrolmentList = enrolmentList === VOID ? this.enrolmentList_1 : enrolmentList;
    personName = personName === VOID ? this.personName_1 : personName;
    courseName = courseName === VOID ? this.courseName_1 : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? this.canEditTeacherEnrolments_1 : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? this.canEditStudentEnrolments_1 : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? this.courseTerminology_1 : courseTerminology;
    timeZone = timeZone === VOID ? this.timeZone_1 : timeZone;
    return $super === VOID ? this.copy_lya7vm_k$(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) : $super.copy_lya7vm_k$.call(this, enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).toString = function () {
    return 'ClazzEnrolmentListUiState(enrolmentList=' + this.enrolmentList_1 + ', personName=' + this.personName_1 + ', courseName=' + this.courseName_1 + ', canEditTeacherEnrolments=' + this.canEditTeacherEnrolments_1 + ', canEditStudentEnrolments=' + this.canEditStudentEnrolments_1 + ', courseTerminology=' + this.courseTerminology_1 + ', timeZone=' + this.timeZone_1 + ')';
  };
  protoOf(ClazzEnrolmentListUiState).hashCode = function () {
    var result = hashCode(this.enrolmentList_1);
    result = imul(result, 31) + (this.personName_1 == null ? 0 : getStringHashCode(this.personName_1)) | 0;
    result = imul(result, 31) + (this.courseName_1 == null ? 0 : getStringHashCode(this.courseName_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.canEditTeacherEnrolments_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.canEditStudentEnrolments_1) | 0;
    result = imul(result, 31) + (this.courseTerminology_1 == null ? 0 : hashCode(this.courseTerminology_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.timeZone_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListUiState ? other : THROW_CCE();
    if (!equals(this.enrolmentList_1, tmp0_other_with_cast.enrolmentList_1))
      return false;
    if (!(this.personName_1 == tmp0_other_with_cast.personName_1))
      return false;
    if (!(this.courseName_1 == tmp0_other_with_cast.courseName_1))
      return false;
    if (!(this.canEditTeacherEnrolments_1 === tmp0_other_with_cast.canEditTeacherEnrolments_1))
      return false;
    if (!(this.canEditStudentEnrolments_1 === tmp0_other_with_cast.canEditStudentEnrolments_1))
      return false;
    if (!equals(this.courseTerminology_1, tmp0_other_with_cast.courseTerminology_1))
      return false;
    if (!(this.timeZone_1 === tmp0_other_with_cast.timeZone_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListItemUiState(canEdit, enrolment, timeZone) {
    canEdit = canEdit === VOID ? false : canEdit;
    this.canEdit_1 = canEdit;
    this.enrolment_1 = enrolment;
    this.timeZone_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListItemUiState).get_canEdit_aclt01_k$ = function () {
    return this.canEdit_1;
  };
  protoOf(ClazzEnrolmentListItemUiState).get_enrolment_udisp1_k$ = function () {
    return this.enrolment_1;
  };
  protoOf(ClazzEnrolmentListItemUiState).get_timeZone_4vh49u_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzEnrolmentListItemUiState).component1_7eebsc_k$ = function () {
    return this.canEdit_1;
  };
  protoOf(ClazzEnrolmentListItemUiState).component2_7eebsb_k$ = function () {
    return this.enrolment_1;
  };
  protoOf(ClazzEnrolmentListItemUiState).component3_7eebsa_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzEnrolmentListItemUiState).copy_19668f_k$ = function (canEdit, enrolment, timeZone) {
    return new ClazzEnrolmentListItemUiState(canEdit, enrolment, timeZone);
  };
  protoOf(ClazzEnrolmentListItemUiState).copy$default_tvrird_k$ = function (canEdit, enrolment, timeZone, $super) {
    canEdit = canEdit === VOID ? this.canEdit_1 : canEdit;
    enrolment = enrolment === VOID ? this.enrolment_1 : enrolment;
    timeZone = timeZone === VOID ? this.timeZone_1 : timeZone;
    return $super === VOID ? this.copy_19668f_k$(canEdit, enrolment, timeZone) : $super.copy_19668f_k$.call(this, canEdit, enrolment, timeZone);
  };
  protoOf(ClazzEnrolmentListItemUiState).toString = function () {
    return 'ClazzEnrolmentListItemUiState(canEdit=' + this.canEdit_1 + ', enrolment=' + this.enrolment_1 + ', timeZone=' + this.timeZone_1 + ')';
  };
  protoOf(ClazzEnrolmentListItemUiState).hashCode = function () {
    var result = getBooleanHashCode(this.canEdit_1);
    result = imul(result, 31) + hashCode(this.enrolment_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.timeZone_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListItemUiState ? other : THROW_CCE();
    if (!(this.canEdit_1 === tmp0_other_with_cast.canEdit_1))
      return false;
    if (!equals(this.enrolment_1, tmp0_other_with_cast.enrolment_1))
      return false;
    if (!(this.timeZone_1 === tmp0_other_with_cast.timeZone_1))
      return false;
    return true;
  };
  var RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  var RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  function values_13() {
    return [RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance(), RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance()];
  }
  function valueOf_12(value) {
    switch (value) {
      case 'RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE':
        return RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance();
      case 'RECORD_ATTENDANCE_NEW_SCHEDULE':
        return RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance();
      default:
        RecordAttendanceOption_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_12() {
    if ($ENTRIES_12 == null)
      $ENTRIES_12 = enumEntries(values_13());
    return $ENTRIES_12;
  }
  var RecordAttendanceOption_entriesInitialized;
  function RecordAttendanceOption_initEntries() {
    if (RecordAttendanceOption_entriesInitialized)
      return Unit_getInstance();
    RecordAttendanceOption_entriesInitialized = true;
    RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE', 0, strings_getInstance().get_record_attendance_for_most_recent_occurrence_hei2sg_k$());
    RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_NEW_SCHEDULE', 1, strings_getInstance().get_add_a_new_occurrence_lz04np_k$());
  }
  var $ENTRIES_12;
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).invoke_io5239_k$ = function (clazz, $completion) {
    var tmp = this.create_pum8v3_k$(clazz, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_io5239_k$((p1 == null ? true : p1 instanceof Clazz) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
          var tmp_0;
          var tmp_1 = this_0.get_value_j01efc_k$().timeZoneId_1;
          var tmp0_safe_receiver = this.clazz_1;
          if (!(tmp_1 === (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzTimeZone_yu1krs_k$()))) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver_0 = tmp_0;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver_0.get_value_j01efc_k$();
                var tmp0_safe_receiver_1 = this.clazz_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.get_clazzTimeZone_yu1krs_k$();
                var nextValue = prevValue.copy$default_3huijw_k$(VOID, tmp1_elvis_lhs == null ? 'UTC' : tmp1_elvis_lhs);
                if (tmp0_safe_receiver_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
          var tmp_2;
          var tmp_3 = this_1.get_value_j01efc_k$().get_title_iz32un_k$();
          var tmp0_safe_receiver_2 = this.clazz_1;
          if (!(tmp_3 == (tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_clazzName_brsrx6_k$()))) {
            tmp_2 = this_1;
          } else {
            tmp_2 = null;
          }
          var tmp1_safe_receiver = tmp_2;
          if (tmp1_safe_receiver == null)
            null;
          else {
            l$ret$3: do {
              while (true) {
                var prevValue_0 = tmp1_safe_receiver.get_value_j01efc_k$();
                var tmp0_safe_receiver_3 = this.clazz_1;
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.get_clazzName_brsrx6_k$());
                if (tmp1_safe_receiver.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).create_pum8v3_k$ = function (clazz, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.clazz_1 = clazz;
    return i;
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_pum8v3_k$((value == null ? true : value instanceof Clazz) ? value : THROW_CCE(), completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (clazz, $completion) {
      return i.invoke_io5239_k$(clazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda($options, this$0) {
    return function () {
      var tmp;
      if ($options.get_size_woubt6_k$() > 1) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0.get__uiState_8tkbd_k$();
          while (true) {
            var prevValue = this_0.get_value_j01efc_k$();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.copy$default_3huijw_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
            if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
              tmp$ret$1 = Unit_getInstance();
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      } else {
        this$0.onClickRecordAttendance_erink7_k$(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).invoke_ttn524_k$ = function (hasPermission, hasLogs, $completion) {
    var tmp = this.create_lbsj03_k$(hasPermission, hasLogs, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE();
    return this.invoke_ttn524_k$(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return new PermissionAndExistingLogs(this.hasPermission_1, this.hasLogs_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).create_lbsj03_k$ = function (hasPermission, hasLogs, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.hasPermission_1 = hasPermission;
    i.hasLogs_1 = hasLogs;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (hasPermission, hasLogs, $completion) {
      return i.invoke_ttn524_k$(hasPermission, hasLogs, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).invoke_mb4s76_k$ = function (it, $completion) {
    var tmp = this.create_2te3be_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_mb4s76_k$(p1 instanceof PermissionAndExistingLogs ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = ArrayList_init_$Create$();
          if (this.it_1.hasRecordPermission_1) {
            this_0.add_utx5q5_k$(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
          }
          if (this.it_1.hasRecordPermission_1 ? this.it_1.hasExistingLogs_1 : false) {
            this_0.add_utx5q5_k$(RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance());
          }
          var options = this_0.build_1k0s4u_k$();
          l$ret$1: do {
            var this_1 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_1.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_3huijw_k$(VOID, VOID, options);
              if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_2.get_value_j01efc_k$();
              var tmp_0 = !options.isEmpty_y1axqb_k$();
              var tmp_1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_record_attendance_7e5gxa_k$());
              var tmp_2 = FabIcon_ADD_getInstance();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(new FabUiState(tmp_0, tmp_1, tmp_2, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda(options, this.this$0__1)));
              if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).create_2te3be_k$ = function (it, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_2te3be_k$(value instanceof PermissionAndExistingLogs ? value : THROW_CCE(), completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_mb4s76_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().findByUidAsFlow_fzg2cy_k$(this.this$0__1.clazzUid_1);
            var tmp_1 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.hasPermissionFlow0__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsFlow2_ih3l4q_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_ATTENDANCE_RECORD_ggo5xo_k$());
            this.hasExistingLogs1__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzLogDao_4jisyu_k$().clazzHasScheduleLive_14kfm7_k$(this.this$0__1.clazzUid_1, Companion_getInstance_47().get_STATUS_RESCHEDULED_ob487e_k$());
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = combine(this.hasPermissionFlow0__1, this.hasExistingLogs1__1, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_1 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ClazzLogListAttendanceViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function RecordAttendanceOption(name, ordinal, stringResource) {
    Enum.call(this, name, ordinal);
    this.stringResource_1 = stringResource;
  }
  protoOf(RecordAttendanceOption).get_stringResource_4df0w8_k$ = function () {
    return this.stringResource_1;
  };
  function AttendanceGraphData(percentageAttendedSeries, percentageLateSeries, graphDateRange) {
    this.percentageAttendedSeries_1 = percentageAttendedSeries;
    this.percentageLateSeries_1 = percentageLateSeries;
    this.graphDateRange_1 = graphDateRange;
  }
  protoOf(AttendanceGraphData).get_percentageAttendedSeries_46qxlf_k$ = function () {
    return this.percentageAttendedSeries_1;
  };
  protoOf(AttendanceGraphData).get_percentageLateSeries_82kq80_k$ = function () {
    return this.percentageLateSeries_1;
  };
  protoOf(AttendanceGraphData).get_graphDateRange_ik1w22_k$ = function () {
    return this.graphDateRange_1;
  };
  protoOf(AttendanceGraphData).component1_7eebsc_k$ = function () {
    return this.percentageAttendedSeries_1;
  };
  protoOf(AttendanceGraphData).component2_7eebsb_k$ = function () {
    return this.percentageLateSeries_1;
  };
  protoOf(AttendanceGraphData).component3_7eebsa_k$ = function () {
    return this.graphDateRange_1;
  };
  protoOf(AttendanceGraphData).copy_6z4eec_k$ = function (percentageAttendedSeries, percentageLateSeries, graphDateRange) {
    return new AttendanceGraphData(percentageAttendedSeries, percentageLateSeries, graphDateRange);
  };
  protoOf(AttendanceGraphData).copy$default_ey3whr_k$ = function (percentageAttendedSeries, percentageLateSeries, graphDateRange, $super) {
    percentageAttendedSeries = percentageAttendedSeries === VOID ? this.percentageAttendedSeries_1 : percentageAttendedSeries;
    percentageLateSeries = percentageLateSeries === VOID ? this.percentageLateSeries_1 : percentageLateSeries;
    graphDateRange = graphDateRange === VOID ? this.graphDateRange_1 : graphDateRange;
    return $super === VOID ? this.copy_6z4eec_k$(percentageAttendedSeries, percentageLateSeries, graphDateRange) : $super.copy_6z4eec_k$.call(this, percentageAttendedSeries, percentageLateSeries, graphDateRange);
  };
  protoOf(AttendanceGraphData).toString = function () {
    return 'AttendanceGraphData(percentageAttendedSeries=' + this.percentageAttendedSeries_1 + ', percentageLateSeries=' + this.percentageLateSeries_1 + ', graphDateRange=' + this.graphDateRange_1 + ')';
  };
  protoOf(AttendanceGraphData).hashCode = function () {
    var result = hashCode(this.percentageAttendedSeries_1);
    result = imul(result, 31) + hashCode(this.percentageLateSeries_1) | 0;
    result = imul(result, 31) + this.graphDateRange_1.hashCode() | 0;
    return result;
  };
  protoOf(AttendanceGraphData).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AttendanceGraphData))
      return false;
    var tmp0_other_with_cast = other instanceof AttendanceGraphData ? other : THROW_CCE();
    if (!equals(this.percentageAttendedSeries_1, tmp0_other_with_cast.percentageAttendedSeries_1))
      return false;
    if (!equals(this.percentageLateSeries_1, tmp0_other_with_cast.percentageLateSeries_1))
      return false;
    if (!this.graphDateRange_1.equals(tmp0_other_with_cast.graphDateRange_1))
      return false;
    return true;
  };
  function _get_clazzUid__rrng1f_11($this) {
    return $this.clazzUid_1;
  }
  function _get_pagingSourceFactory__6w06ky_1($this) {
    return $this.pagingSourceFactory_1;
  }
  function PermissionAndExistingLogs(hasRecordPermission, hasExistingLogs) {
    this.hasRecordPermission_1 = hasRecordPermission;
    this.hasExistingLogs_1 = hasExistingLogs;
  }
  protoOf(PermissionAndExistingLogs).get_hasRecordPermission_icwbbl_k$ = function () {
    return this.hasRecordPermission_1;
  };
  protoOf(PermissionAndExistingLogs).get_hasExistingLogs_1c86z9_k$ = function () {
    return this.hasExistingLogs_1;
  };
  protoOf(PermissionAndExistingLogs).component1_7eebsc_k$ = function () {
    return this.hasRecordPermission_1;
  };
  protoOf(PermissionAndExistingLogs).component2_7eebsb_k$ = function () {
    return this.hasExistingLogs_1;
  };
  protoOf(PermissionAndExistingLogs).copy_ccyf2t_k$ = function (hasRecordPermission, hasExistingLogs) {
    return new PermissionAndExistingLogs(hasRecordPermission, hasExistingLogs);
  };
  protoOf(PermissionAndExistingLogs).copy$default_jx4puk_k$ = function (hasRecordPermission, hasExistingLogs, $super) {
    hasRecordPermission = hasRecordPermission === VOID ? this.hasRecordPermission_1 : hasRecordPermission;
    hasExistingLogs = hasExistingLogs === VOID ? this.hasExistingLogs_1 : hasExistingLogs;
    return $super === VOID ? this.copy_ccyf2t_k$(hasRecordPermission, hasExistingLogs) : $super.copy_ccyf2t_k$.call(this, hasRecordPermission, hasExistingLogs);
  };
  protoOf(PermissionAndExistingLogs).toString = function () {
    return 'PermissionAndExistingLogs(hasRecordPermission=' + this.hasRecordPermission_1 + ', hasExistingLogs=' + this.hasExistingLogs_1 + ')';
  };
  protoOf(PermissionAndExistingLogs).hashCode = function () {
    var result = getBooleanHashCode(this.hasRecordPermission_1);
    result = imul(result, 31) + getBooleanHashCode(this.hasExistingLogs_1) | 0;
    return result;
  };
  protoOf(PermissionAndExistingLogs).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PermissionAndExistingLogs))
      return false;
    var tmp0_other_with_cast = other instanceof PermissionAndExistingLogs ? other : THROW_CCE();
    if (!(this.hasRecordPermission_1 === tmp0_other_with_cast.hasRecordPermission_1))
      return false;
    if (!(this.hasExistingLogs_1 === tmp0_other_with_cast.hasExistingLogs_1))
      return false;
    return true;
  };
  function Companion_131() {
    Companion_instance_131 = this;
    this.DEST_NAME_1 = 'CourseLogListAttendanceView';
  }
  protoOf(Companion_131).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_131;
  function Companion_getInstance_192() {
    if (Companion_instance_131 == null)
      new Companion_131();
    return Companion_instance_131;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_20(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_20).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().clazzLogDao_4jisyu_k$().findByClazzUidAsFactory_11prtm_k$(this$0.clazzUid_1, Companion_getInstance_47().get_STATUS_RESCHEDULED_ob487e_k$());
    };
  }
  function ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ClazzLogListAttendanceViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogListAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzLogDao_4jisyu_k$().findMostRecentClazzLogToEditUid_r4rsjt_k$(this.this$0__1.clazzUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var mostRecentLogUid = suspendResult;
            var this_0 = this.this$0__1.get_navController_qibdoq_k$();
            var tmp_0;
            if (!mostRecentLogUid.equals(new Long(0, 0))) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver == null)
              null;
            else {
              tmp0_safe_receiver.navigate$default_srzzsc_k$(Companion_getInstance_194().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), mostRecentLogUid.toString())));
            }

            this.this$0__1.onDismissCreateNewOptions_rkt8nf_k$();
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  }
  function ClazzLogListAttendanceViewModel(di, savedStateHandle) {
    Companion_getInstance_192();
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzLogListAttendanceUiState(), Companion_getInstance_165().get_DEST_NAME_gmgk7z_k$());
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid specified');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.clazzUid_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.pagingSourceFactory_1 = ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_3huijw_k$(VOID, VOID, VOID, this.pagingSourceFactory_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, ClazzLogListAttendanceViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogListAttendanceViewModel).onDismissCreateNewOptions_rkt8nf_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.copy$default_3huijw_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  protoOf(ClazzLogListAttendanceViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  protoOf(ClazzLogListAttendanceViewModel).onClickRecordAttendance_erink7_k$ = function (option) {
    var tmp0 = option.get_ordinal_ip24qg_k$();
    if (tmp0 === 1) {
      this.navigateToCreateNew_mwxhbu_k$(Companion_getInstance_193().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_160().get_ARG_TIME_ZONE_r1nmdw_k$(), this.get__uiState_8tkbd_k$().get_value_j01efc_k$().timeZoneId_1), to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())]));
      this.onDismissCreateNewOptions_rkt8nf_k$();
    } else if (tmp0 === 0) {
      if (this.get_loadingState_rpk2ke_k$().equals(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()))
        return Unit_getInstance();
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
      var tmp = this.get_viewModelScope_ryv1dz_k$();
      launch(tmp, VOID, VOID, ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this, null));
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).onClickEntry_ykngbc_k$ = function (clazzLog) {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_194().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), clazzLog.get_clazzLogUid_ifqem3_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())]));
  };
  function ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v() {
    return new EmptyPagingSource();
  }
  function ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    graphData = graphData === VOID ? null : graphData;
    timeZoneId = timeZoneId === VOID ? Companion_getInstance_35().currentSystemDefault_9rduv_k$().get_id_kntnx8_k$() : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? emptyList() : recordAttendanceOptions;
    var tmp;
    if (clazzLogsList === VOID) {
      tmp = ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v;
    } else {
      tmp = clazzLogsList;
    }
    clazzLogsList = tmp;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? 7 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? listOf([new MessageIdOption2(strings_getInstance().get_last_week_t7v830_k$(), 7), new MessageIdOption2(strings_getInstance().get_last_month_hh9e00_k$(), 30), new MessageIdOption2(strings_getInstance().get_last_three_months_4pbpbg_k$(), 90)]) : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    this.graphData_1 = graphData;
    this.timeZoneId_1 = timeZoneId;
    this.recordAttendanceOptions_1 = recordAttendanceOptions;
    this.clazzLogsList_1 = clazzLogsList;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.selectedChipId_1 = selectedChipId;
    this.viewIdToNumDays_1 = viewIdToNumDays;
    this.createNewOptionsVisible_1 = createNewOptionsVisible;
  }
  protoOf(ClazzLogListAttendanceUiState).get_graphData_awjf69_k$ = function () {
    return this.graphData_1;
  };
  protoOf(ClazzLogListAttendanceUiState).get_timeZoneId_3tgi1v_k$ = function () {
    return this.timeZoneId_1;
  };
  protoOf(ClazzLogListAttendanceUiState).get_recordAttendanceOptions_dlvcn9_k$ = function () {
    return this.recordAttendanceOptions_1;
  };
  protoOf(ClazzLogListAttendanceUiState).get_clazzLogsList_vqtxdo_k$ = function () {
    return this.clazzLogsList_1;
  };
  protoOf(ClazzLogListAttendanceUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzLogListAttendanceUiState).get_selectedChipId_ens6id_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzLogListAttendanceUiState).get_viewIdToNumDays_eucrdz_k$ = function () {
    return this.viewIdToNumDays_1;
  };
  protoOf(ClazzLogListAttendanceUiState).get_createNewOptionsVisible_1ltbu7_k$ = function () {
    return this.createNewOptionsVisible_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component1_7eebsc_k$ = function () {
    return this.graphData_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component2_7eebsb_k$ = function () {
    return this.timeZoneId_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component3_7eebsa_k$ = function () {
    return this.recordAttendanceOptions_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component4_7eebs9_k$ = function () {
    return this.clazzLogsList_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component6_7eebs7_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component7_7eebs6_k$ = function () {
    return this.viewIdToNumDays_1;
  };
  protoOf(ClazzLogListAttendanceUiState).component8_7eebs5_k$ = function () {
    return this.createNewOptionsVisible_1;
  };
  protoOf(ClazzLogListAttendanceUiState).copy_widwas_k$ = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    return new ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).copy$default_3huijw_k$ = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible, $super) {
    graphData = graphData === VOID ? this.graphData_1 : graphData;
    timeZoneId = timeZoneId === VOID ? this.timeZoneId_1 : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? this.recordAttendanceOptions_1 : recordAttendanceOptions;
    clazzLogsList = clazzLogsList === VOID ? this.clazzLogsList_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.selectedChipId_1 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? this.viewIdToNumDays_1 : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.createNewOptionsVisible_1 : createNewOptionsVisible;
    return $super === VOID ? this.copy_widwas_k$(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) : $super.copy_widwas_k$.call(this, graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).toString = function () {
    return 'ClazzLogListAttendanceUiState(graphData=' + this.graphData_1 + ', timeZoneId=' + this.timeZoneId_1 + ', recordAttendanceOptions=' + this.recordAttendanceOptions_1 + ', clazzLogsList=' + this.clazzLogsList_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', selectedChipId=' + this.selectedChipId_1 + ', viewIdToNumDays=' + this.viewIdToNumDays_1 + ', createNewOptionsVisible=' + this.createNewOptionsVisible_1 + ')';
  };
  protoOf(ClazzLogListAttendanceUiState).hashCode = function () {
    var result = this.graphData_1 == null ? 0 : this.graphData_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.timeZoneId_1) | 0;
    result = imul(result, 31) + hashCode(this.recordAttendanceOptions_1) | 0;
    result = imul(result, 31) + hashCode(this.clazzLogsList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + this.selectedChipId_1 | 0;
    result = imul(result, 31) + hashCode(this.viewIdToNumDays_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.createNewOptionsVisible_1) | 0;
    return result;
  };
  protoOf(ClazzLogListAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogListAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogListAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.graphData_1, tmp0_other_with_cast.graphData_1))
      return false;
    if (!(this.timeZoneId_1 === tmp0_other_with_cast.timeZoneId_1))
      return false;
    if (!equals(this.recordAttendanceOptions_1, tmp0_other_with_cast.recordAttendanceOptions_1))
      return false;
    if (!equals(this.clazzLogsList_1, tmp0_other_with_cast.clazzLogsList_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.selectedChipId_1 === tmp0_other_with_cast.selectedChipId_1))
      return false;
    if (!equals(this.viewIdToNumDays_1, tmp0_other_with_cast.viewIdToNumDays_1))
      return false;
    if (!(this.createNewOptionsVisible_1 === tmp0_other_with_cast.createNewOptionsVisible_1))
      return false;
    return true;
  };
  function AttendanceGraphData_0(percentageAttendedSeries, percentageLateSeries, graphDateRange) {
    this.percentageAttendedSeries_1 = percentageAttendedSeries;
    this.percentageLateSeries_1 = percentageLateSeries;
    this.graphDateRange_1 = graphDateRange;
  }
  protoOf(AttendanceGraphData_0).get_percentageAttendedSeries_46qxlf_k$ = function () {
    return this.percentageAttendedSeries_1;
  };
  protoOf(AttendanceGraphData_0).get_percentageLateSeries_82kq80_k$ = function () {
    return this.percentageLateSeries_1;
  };
  protoOf(AttendanceGraphData_0).get_graphDateRange_ik1w22_k$ = function () {
    return this.graphDateRange_1;
  };
  protoOf(AttendanceGraphData_0).component1_7eebsc_k$ = function () {
    return this.percentageAttendedSeries_1;
  };
  protoOf(AttendanceGraphData_0).component2_7eebsb_k$ = function () {
    return this.percentageLateSeries_1;
  };
  protoOf(AttendanceGraphData_0).component3_7eebsa_k$ = function () {
    return this.graphDateRange_1;
  };
  protoOf(AttendanceGraphData_0).copy_6z4eec_k$ = function (percentageAttendedSeries, percentageLateSeries, graphDateRange) {
    return new AttendanceGraphData_0(percentageAttendedSeries, percentageLateSeries, graphDateRange);
  };
  protoOf(AttendanceGraphData_0).copy$default_6ozjj0_k$ = function (percentageAttendedSeries, percentageLateSeries, graphDateRange, $super) {
    percentageAttendedSeries = percentageAttendedSeries === VOID ? this.percentageAttendedSeries_1 : percentageAttendedSeries;
    percentageLateSeries = percentageLateSeries === VOID ? this.percentageLateSeries_1 : percentageLateSeries;
    graphDateRange = graphDateRange === VOID ? this.graphDateRange_1 : graphDateRange;
    return $super === VOID ? this.copy_6z4eec_k$(percentageAttendedSeries, percentageLateSeries, graphDateRange) : $super.copy_6z4eec_k$.call(this, percentageAttendedSeries, percentageLateSeries, graphDateRange);
  };
  protoOf(AttendanceGraphData_0).toString = function () {
    return 'AttendanceGraphData(percentageAttendedSeries=' + this.percentageAttendedSeries_1 + ', percentageLateSeries=' + this.percentageLateSeries_1 + ', graphDateRange=' + this.graphDateRange_1 + ')';
  };
  protoOf(AttendanceGraphData_0).hashCode = function () {
    var result = hashCode(this.percentageAttendedSeries_1);
    result = imul(result, 31) + hashCode(this.percentageLateSeries_1) | 0;
    result = imul(result, 31) + this.graphDateRange_1.hashCode() | 0;
    return result;
  };
  protoOf(AttendanceGraphData_0).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AttendanceGraphData_0))
      return false;
    var tmp0_other_with_cast = other instanceof AttendanceGraphData_0 ? other : THROW_CCE();
    if (!equals(this.percentageAttendedSeries_1, tmp0_other_with_cast.percentageAttendedSeries_1))
      return false;
    if (!equals(this.percentageLateSeries_1, tmp0_other_with_cast.percentageLateSeries_1))
      return false;
    if (!this.graphDateRange_1.equals(tmp0_other_with_cast.graphDateRange_1))
      return false;
    return true;
  };
  function ClazzLogEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda).invoke_w7fgyi_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_w7fgyi_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzLogEditViewModel$slambda$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_w7fgyi_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).invoke_9k91av_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_9k91av_k$($completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = new ClazzLog();
          this_0.set_clazzLogClazzUid_g2lcqr_k$(this.this$0__1.argClazzUid_1);
          this_0.set_logDate_dvs32h_k$(systemTimeInMillis());
          return this_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzLogEditViewModel$slambda$slambda_1(this.this$0__1, completion);
  };
  function ClazzLogEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_9k91av_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_35f7k1_k$(VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzLogEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get_timeZone__p18m36($this) {
    return $this.timeZone_1;
  }
  function _get__uiState__8e9jsd_17($this) {
    return $this._uiState_1;
  }
  function _get_argClazzUid__sptekj_1($this) {
    return $this.argClazzUid_1;
  }
  function Companion_132() {
    Companion_instance_132 = this;
    this.DEST_NAME_1 = 'ClazzLogEdit';
  }
  protoOf(Companion_132).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_132;
  function Companion_getInstance_193() {
    if (Companion_instance_132 == null)
      new Companion_132();
    return Companion_instance_132;
  }
  function ClazzLogEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_47().serializer_9w0wvi_k$();
            var tmp_1 = ClazzLogEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzLogEditViewModel$slambda$slambda_2(this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzLogEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_next_wor1vg_k$());
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ClazzLogEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_35f7k1_k$(true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onClickSave$lambda($this$shallowCopy) {
    $this$shallowCopy.set_clazzLogUid_ks9wuh_k$(generateUid($this$shallowCopy));
    return Unit_getInstance();
  }
  function ClazzLogEditViewModel(di, savedStateHandle) {
    Companion_getInstance_193();
    UstadEditViewModel.call(this, di, savedStateHandle, 'ClazzLogEdit');
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_TIME_ZONE_r1nmdw_k$());
    tmp.timeZone_1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
    this._uiState_1 = MutableStateFlow(new ClazzLogEditUiState(VOID, VOID, this.timeZone_1));
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_0 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.argClazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_add_a_new_occurrence_lz04np_k$()));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzLogEditViewModel).onEntityChanged_f5mt6y_k$ = function (clazzLog) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.clazzLog_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_logDate_6wppgp_k$();
        var nextValue = prevValue.copy$default_35f7k1_k$(VOID, clazzLog, VOID, this.updateErrorMessageOnChange_silrgy_k$(tmp, clazzLog == null ? null : clazzLog.get_logDate_6wppgp_k$(), prevValue.dateError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_47().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_0, VOID, VOID, ClazzLogEditViewModel$onEntityChanged$slambda_0(commitDelay, clazzLog, this, key, serializer, null)));
  };
  protoOf(ClazzLogEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().clazzLog_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var clazzLog = tmp;
    var errorMsg = !isDateSet(clazzLog.get_logDate_6wppgp_k$()) ? strings_getInstance().get_field_required_prompt_keky22_k$() : clazzLog.get_logDate_6wppgp_k$().compareTo_9jj042_k$(systemTimeInMillis()) > 0 ? strings_getInstance().get_cannot_record_attendance_for_future_date_time_jg5kul_k$() : null;
    if (!(errorMsg == null)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.copy$default_35f7k1_k$(VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(errorMsg));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    }
    var clazzLogWithUid = shallowCopy_6(clazzLog, ClazzLogEditViewModel$onClickSave$lambda);
    var newClazzLogJson = this.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_47().serializer_9w0wvi_k$(), clazzLogWithUid);
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_194().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_194().get_ARG_NEW_CLAZZLOG_t8hq7x_k$(), newClazzLogJson), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.argClazzUid_1.toString())]));
  };
  function ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError) {
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    clazzLog = clazzLog === VOID ? null : clazzLog;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    dateError = dateError === VOID ? null : dateError;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.clazzLog_1 = clazzLog;
    this.timeZone_1 = timeZone;
    this.dateError_1 = dateError;
  }
  protoOf(ClazzLogEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzLogEditUiState).get_clazzLog_k8ptuz_k$ = function () {
    return this.clazzLog_1;
  };
  protoOf(ClazzLogEditUiState).get_timeZone_4vh49u_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzLogEditUiState).get_dateError_40164x_k$ = function () {
    return this.dateError_1;
  };
  protoOf(ClazzLogEditUiState).component1_7eebsc_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzLogEditUiState).component2_7eebsb_k$ = function () {
    return this.clazzLog_1;
  };
  protoOf(ClazzLogEditUiState).component3_7eebsa_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzLogEditUiState).component4_7eebs9_k$ = function () {
    return this.dateError_1;
  };
  protoOf(ClazzLogEditUiState).copy_kp36lx_k$ = function (fieldsEnabled, clazzLog, timeZone, dateError) {
    return new ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).copy$default_35f7k1_k$ = function (fieldsEnabled, clazzLog, timeZone, dateError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    clazzLog = clazzLog === VOID ? this.clazzLog_1 : clazzLog;
    timeZone = timeZone === VOID ? this.timeZone_1 : timeZone;
    dateError = dateError === VOID ? this.dateError_1 : dateError;
    return $super === VOID ? this.copy_kp36lx_k$(fieldsEnabled, clazzLog, timeZone, dateError) : $super.copy_kp36lx_k$.call(this, fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).toString = function () {
    return 'ClazzLogEditUiState(fieldsEnabled=' + this.fieldsEnabled_1 + ', clazzLog=' + this.clazzLog_1 + ', timeZone=' + this.timeZone_1 + ', dateError=' + this.dateError_1 + ')';
  };
  protoOf(ClazzLogEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.fieldsEnabled_1);
    result = imul(result, 31) + (this.clazzLog_1 == null ? 0 : this.clazzLog_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.timeZone_1) | 0;
    result = imul(result, 31) + (this.dateError_1 == null ? 0 : getStringHashCode(this.dateError_1)) | 0;
    return result;
  };
  protoOf(ClazzLogEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditUiState ? other : THROW_CCE();
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!equals(this.clazzLog_1, tmp0_other_with_cast.clazzLog_1))
      return false;
    if (!(this.timeZone_1 === tmp0_other_with_cast.timeZone_1))
      return false;
    if (!(this.dateError_1 == tmp0_other_with_cast.dateError_1))
      return false;
    return true;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.get_logDate_6wppgp_k$();
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.get_logDate_6wppgp_k$();
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation) {
    this.this$0__1 = this$0;
    this.$newClazzLogVal_1 = $newClazzLogVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).invoke_99szz4_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_99szz4_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.clazzLogDao_4jisyu_k$().findByClazzUidAsync_yumxyy_k$(this.this$0__1.clazzUid_1, Companion_getInstance_47().get_STATUS_RESCHEDULED_ob487e_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var dbLogList = suspendResult;
            var tmp_0;
            if (!(this.$newClazzLogVal_1 == null)) {
              var this_0 = plus(dbLogList, listOf_0(this.$newClazzLogVal_1));
              var tmp_1 = ClazzLogEditAttendanceViewModel$slambda$slambda$lambda;
              tmp_0 = sortedWith(this_0, new sam$kotlin_Comparator$0_2(tmp_1));
            } else {
              tmp_0 = dbLogList;
            }

            var list = tmp_0;
            return list;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this.this$0__1, this.$newClazzLogVal_1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_0(this$0, $newClazzLogVal, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_99szz4_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).invoke_kh183n_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_kh183n_k$($completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return emptyList();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ClazzLogEditAttendanceViewModel$slambda$slambda_1(completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_kh183n_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$lambda(this$0, $hasEditPermission) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_incj2s_k$(VOID, VOID, it == null ? emptyList() : it, VOID, $hasEditPermission);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzDao_bk7qje_k$().getClazzTimeZoneByClazzUidAsync_rra6gu_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().get_currentClazzLog_hj93zw_k$().get_clazzLogClazzUid_p2tbpp_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var timeZone = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_incj2s_k$(VOID, VOID, VOID, VOID, VOID, timeZone == null ? 'UTC' : timeZone);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda($logRecords) {
    return function ($this$shallowCopy) {
      var tmp$ret$0;
      $l$block: {
        // Inline function 'kotlin.collections.count' call
        var this_0 = $logRecords;
        var tmp;
        if (isInterface(this_0, Collection)) {
          tmp = this_0.isEmpty_y1axqb_k$();
        } else {
          tmp = false;
        }
        if (tmp) {
          tmp$ret$0 = 0;
          break $l$block;
        }
        var count = 0;
        var tmp0_iterator = this_0.iterator_jk1svi_k$();
        while (tmp0_iterator.hasNext_bitz1p_k$()) {
          var element = tmp0_iterator.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          if (element.get_attendanceStatus_noqiv8_k$() === Companion_getInstance_48().get_STATUS_ATTENDED_a1e2df_k$()) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      $this$shallowCopy.set_clazzLogNumPresent_oia4y2_k$(tmp$ret$0);
      var tmp$ret$2;
      $l$block_0: {
        // Inline function 'kotlin.collections.count' call
        var this_1 = $logRecords;
        var tmp_0;
        if (isInterface(this_1, Collection)) {
          tmp_0 = this_1.isEmpty_y1axqb_k$();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$2 = 0;
          break $l$block_0;
        }
        var count_0 = 0;
        var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
        while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
          var element_0 = tmp0_iterator_0.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          if (element_0.get_attendanceStatus_noqiv8_k$() === Companion_getInstance_48().get_STATUS_ABSENT_f54nib_k$()) {
            count_0 = count_0 + 1 | 0;
            checkCountOverflow(count_0);
          }
        }
        tmp$ret$2 = count_0;
      }
      $this$shallowCopy.set_clazzLogNumAbsent_m3kfwu_k$(tmp$ret$2);
      var tmp$ret$4;
      $l$block_1: {
        // Inline function 'kotlin.collections.count' call
        var this_2 = $logRecords;
        var tmp_1;
        if (isInterface(this_2, Collection)) {
          tmp_1 = this_2.isEmpty_y1axqb_k$();
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp$ret$4 = 0;
          break $l$block_1;
        }
        var count_1 = 0;
        var tmp0_iterator_1 = this_2.iterator_jk1svi_k$();
        while (tmp0_iterator_1.hasNext_bitz1p_k$()) {
          var element_1 = tmp0_iterator_1.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          if (element_1.get_attendanceStatus_noqiv8_k$() === Companion_getInstance_48().get_STATUS_PARTIAL_ye2a71_k$()) {
            count_1 = count_1 + 1 | 0;
            checkCountOverflow(count_1);
          }
        }
        tmp$ret$4 = count_1;
      }
      $this$shallowCopy.set_clazzLogNumPartial_5wqx38_k$(tmp$ret$4);
      return Unit_getInstance();
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    this.this$0__1 = this$0;
    this.$clazzLogsToSave_1 = $clazzLogsToSave;
    this.$attendanceRecordsToSave_1 = $attendanceRecordsToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzLogDao_4jisyu_k$().upsertListAsync_pb1a2h_k$(this.$clazzLogsToSave_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzLogAttendanceRecordDao_6kuhbg_k$().upsertListAsync_9oirw3_k$(this.$attendanceRecordsToSave_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$clazzLogsToSave_1, this.$attendanceRecordsToSave_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_18($this) {
    return $this._uiState_1;
  }
  function _get_newClazzLog__zdra0r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.newClazzLog$delegate_1;
    newClazzLog$factory();
    return this_0.get_value_j01efc_k$();
  }
  function _set_currentClazzLogIndex__l00dbq($this, value) {
    $this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('activeIndex', toString_1(value));
  }
  function _get_currentClazzLogIndex__yy31c2($this) {
    var tmp0_safe_receiver = $this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$('activeIndex');
    return tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
  }
  function _set_loadClazzLogJob__ksec0q($this, _set____db54di) {
    $this.loadClazzLogJob_1 = _set____db54di;
  }
  function _get_loadClazzLogJob__uw4jja($this) {
    return $this.loadClazzLogJob_1;
  }
  function _get_saveAttendanceRecordsMutex__m8grtk($this) {
    return $this.saveAttendanceRecordsMutex_1;
  }
  function _get_clazzUid__rrng1f_12($this) {
    return $this.clazzUid_1;
  }
  function savePersonAndAttendanceRecords($this, clazzLogUid, records, $completion) {
    var tmp = new $savePersonAndAttendanceRecordsCOROUTINE$62($this, clazzLogUid, records, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function commitAttendanceRecordsToState($this, $completion) {
    var tmp = new $commitAttendanceRecordsToStateCOROUTINE$63($this, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function Companion_133() {
    Companion_instance_133 = this;
    this.ARG_NEW_CLAZZLOG_1 = 'newclazzlog';
    this.DEST_NAME_1 = 'EditAttendance';
    this.STATE_KEY_CURRENT_LOG_INDEX_1 = 'activeIndex';
    this.STATE_KEY_LOG_PREFIX_1 = 'log_';
    this.STATE_KEY_LOGS_TO_SAVE_TO_DB_1 = 'logsToSave';
  }
  protoOf(Companion_133).get_ARG_NEW_CLAZZLOG_t8hq7x_k$ = function () {
    return this.ARG_NEW_CLAZZLOG_1;
  };
  protoOf(Companion_133).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_133).get_STATE_KEY_CURRENT_LOG_INDEX_pywwqi_k$ = function () {
    return this.STATE_KEY_CURRENT_LOG_INDEX_1;
  };
  protoOf(Companion_133).get_STATE_KEY_LOG_PREFIX_3z62g4_k$ = function () {
    return this.STATE_KEY_LOG_PREFIX_1;
  };
  protoOf(Companion_133).get_STATE_KEY_LOGS_TO_SAVE_TO_DB_ce3qwl_k$ = function () {
    return this.STATE_KEY_LOGS_TO_SAVE_TO_DB_1;
  };
  var Companion_instance_133;
  function Companion_getInstance_194() {
    if (Companion_instance_133 == null)
      new Companion_133();
    return Companion_instance_133;
  }
  function sam$kotlin_Comparator$0_2(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_2).compare_bczr_k$ = function (a, b) {
    return this.function_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {
    return this.compare_bczr_k$(a, b);
  };
  function ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda($savedStateHandle, this$0) {
    return function () {
      var tmp0_safe_receiver = $savedStateHandle.get_6bo4tg_k$('newclazzlog');
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.newClazzLog$delegate.<anonymous>.<anonymous>' call
        tmp = this$0.get_json_woos35_k$().decodeFromString_jwu9sq_k$(Companion_getInstance_47().serializer_9w0wvi_k$(), tmp0_safe_receiver);
      }
      return tmp;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda).invoke_pclm39_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsync2_6hwhkq_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_ATTENDANCE_VIEW_cozdgg_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pclm39_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.newClazzLogVal0__1 = _get_newClazzLog__zdra0r(this.this$0__1);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsync2_6hwhkq_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_ATTENDANCE_RECORD_ggo5xo_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hasEditPermission1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = ListSerializer(Companion_getInstance_47().serializer_9w0wvi_k$());
            var tmp_1 = ClazzLogEditAttendanceViewModel$slambda$slambda_0(this.this$0__1, this.newClazzLogVal0__1, null);
            var tmp_2 = ClazzLogEditAttendanceViewModel$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzLogEditAttendanceViewModel$slambda$lambda(this.this$0__1, this.hasEditPermission1__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda$slambda_4(this.this$0__1, null));
            var currentClazzLogIndexVal = _get_currentClazzLogIndex__yy31c2(this.this$0__1);
            var tmp_3;
            if (!(currentClazzLogIndexVal == null)) {
              tmp_3 = currentClazzLogIndexVal;
            } else if (!(this.newClazzLogVal0__1 == null)) {
              var tmp0_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().indexOfClazzLogUid_9dk12r_k$(this.newClazzLogVal0__1.get_clazzLogUid_ifqem3_k$());
              tmp_3 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
            } else if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              var tmp1_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().indexOfClazzLogUid_9dk12r_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
              tmp_3 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            } else {
              tmp_3 = this.this$0__1._uiState_1.get_value_j01efc_k$().clazzLogsList_1.get_size_woubt6_k$() - 1 | 0;
            }

            var startIndex = tmp_3;
            this.this$0__1.onChangeClazzLog_4wvzcl_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().clazzLogsList_1.get_c1px32_k$(startIndex), true);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation) {
    this.$clazzLog_1 = $clazzLog;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(9);
            this.savedStateKey0__1 = 'log_' + this.$clazzLog_1.get_clazzLogUid_ifqem3_k$().toString();
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), this.savedStateKey0__1, ListSerializer(Companion_getInstance_49().serializer_9w0wvi_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_elvis_lhs1__1 = suspendResult;
            if (this.tmp0_elvis_lhs1__1 == null) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().clazzLogAttendanceRecordDao_6kuhbg_k$().findByClazzAndTime_e5b96n_k$(this.$clazzLog_1.get_clazzLogClazzUid_p2tbpp_k$(), this.$clazzLog_1.get_clazzLogUid_ifqem3_k$(), this.$clazzLog_1.get_logDate_6wppgp_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT2__1 = this.tmp0_elvis_lhs1__1;
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            }

          case 2:
            this.this3__1 = suspendResult;
            var tmp_0 = this;
            tmp_0.this4__1 = this.this3__1;
            var tmp_1 = this;
            tmp_1.destination5__1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.this3__1, 10));
            this.tmp0_iterator6__1 = this.this4__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            if (!this.tmp0_iterator6__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            }

            this.item7__1 = this.tmp0_iterator6__1.next_20eer_k$();
            var tmp_2 = this;
            tmp_2.it8__1 = this.item7__1;
            if (this.it8__1.get_attendanceRecord_mzh5r7_k$() == null) {
              this.tmp0_person10__1 = this.it8__1.get_person_i0c866_k$();
              var tmp_3 = this;
              tmp_3.this11__1 = new ClazzLogAttendanceRecord();
              var tmp_4 = this;
              tmp_4.$this$apply12__1 = this.this11__1;
              this.set_state_rjd8d0_k$(4);
              suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_48().get_TABLE_ID_xo2mej_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_5 = this;
              tmp_5.WHEN_RESULT9__1 = this.it8__1;
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 4:
            this.ARGUMENT13__1 = suspendResult;
            this.$this$apply12__1.set_clazzLogAttendanceRecordUid_u3gxm9_k$(this.ARGUMENT13__1);
            var tmp0_safe_receiver = this.it8__1.get_person_i0c866_k$();
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personUid_mmhd76_k$();
            this.$this$apply12__1.set_clazzLogAttendanceRecordPersonUid_tldzbu_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
            this.$this$apply12__1.set_clazzLogAttendanceRecordClazzLogUid_ln2yg3_k$(this.$clazzLog_1.get_clazzLogUid_ifqem3_k$());
            this.tmp1_attendanceRecord14__1 = this.this11__1;
            this.tmp2_personPicture15__1 = this.it8__1.get_personPicture_te1agw_k$();
            this.WHEN_RESULT9__1 = new PersonAndClazzLogAttendanceRecord(this.tmp0_person10__1, this.tmp2_personPicture15__1, this.tmp1_attendanceRecord14__1);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            this.ARGUMENT16__1 = this.WHEN_RESULT9__1;
            this.destination5__1.add_utx5q5_k$(this.ARGUMENT16__1);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 6:
            this.this17__1 = this.destination5__1;
            var tmp_6 = this;
            tmp_6.personAndAttendanceRecordsList18__1 = this.this17__1;
            this.set_state_rjd8d0_k$(7);
            suspendResult = savePersonAndAttendanceRecords(this.this$0__1, this.$clazzLog_1.get_clazzLogUid_ifqem3_k$(), this.personAndAttendanceRecordsList18__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.WHEN_RESULT2__1 = this.this17__1;
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 8:
            var personAndAttendanceRecords = this.WHEN_RESULT2__1;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_incj2s_k$(personAndAttendanceRecords, VOID, VOID, true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp_7;
                if (!prevValue_0.get_actionBarButtonState_cgbrez_k$().get_visible_8zfvk9_k$()) {
                  var tmp_8 = this.this$0__1._uiState_1.get_value_j01efc_k$().canEdit_1;
                  var tmp_9 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                  tmp_7 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(tmp_8, tmp_9, VOID, ClazzLogEditAttendanceViewModel$onClickSave$ref(this.this$0__1)));
                } else {
                  tmp_7 = prevValue_0;
                }
                var nextValue_0 = tmp_7;
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 9:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 9) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda(this.$clazzLog_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0($clazzLog, this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda($record) {
    return function (it) {
      var tmp0_safe_receiver = it.get_person_i0c866_k$();
      var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personUid_mmhd76_k$();
      var tmp1_safe_receiver = $record.get_person_i0c866_k$();
      return equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_personUid_mmhd76_k$());
    };
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = commitAttendanceRecordsToState(this.this$0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda($status) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_attendanceStatus_scnmkw_k$($status);
      return Unit_getInstance();
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = commitAttendanceRecordsToState(this.this$0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(11);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(new Long(100, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.this0__1 = this.this$0__1.saveAttendanceRecordsMutex_1;
            var tmp_1 = this;
            tmp_1.owner1__1 = null;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this0__1.lock_ugrcvf_k$(this.owner1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(10);
            var tmp_2 = this;
            tmp_2.clazzLogsToSave3__1 = ArrayList_init_$Create$();
            var tmp_3 = this;
            tmp_3.attendanceRecordsToSave4__1 = ArrayList_init_$Create$();
            this.set_state_rjd8d0_k$(4);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_11())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.tmp0_elvis_lhs5__1 = suspendResult;
            this.recordUidsToSave6__1 = this.tmp0_elvis_lhs5__1 == null ? emptyList() : this.tmp0_elvis_lhs5__1;
            var tmp_4 = this;
            tmp_4.this7__1 = this.recordUidsToSave6__1;
            this.tmp0_iterator8__1 = this.this7__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            if (!this.tmp0_iterator8__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

            this.element9__1 = this.tmp0_iterator8__1.next_20eer_k$();
            var tmp_5 = this;
            tmp_5.clazzLogUid10__1 = this.element9__1;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.this$0__1._uiState_1.get_value_j01efc_k$().clazzLogsList_1.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                if (element.get_clazzLogUid_ifqem3_k$().equals(this.clazzLogUid10__1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
            }
             while (false);
            tmp_6.clazzLog11__1 = tmp$ret$0;
            this.set_state_rjd8d0_k$(6);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'log_' + this.clazzLogUid10__1.toString(), ListSerializer(Companion_getInstance_49().serializer_9w0wvi_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.tmp0_safe_receiver12__1 = suspendResult;
            var tmp_7 = this;
            var tmp_8;
            if (this.tmp0_safe_receiver12__1 == null) {
              tmp_8 = null;
            } else {
              var this_0 = this.tmp0_safe_receiver12__1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator_0 = this_0.iterator_jk1svi_k$();
              while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                var element_0 = tmp0_iterator_0.next_20eer_k$();
                var tmp0_safe_receiver = element_0.get_attendanceRecord_mzh5r7_k$();
                if (tmp0_safe_receiver == null)
                  null;
                else {
                  destination.add_utx5q5_k$(tmp0_safe_receiver);
                }
              }
              tmp_8 = destination;
            }

            tmp_7.tmp1_elvis_lhs13__1 = tmp_8;
            this.logRecords14__1 = this.tmp1_elvis_lhs13__1 == null ? emptyList() : this.tmp1_elvis_lhs13__1;
            var this_1 = this.clazzLogsToSave3__1;
            var element_1 = shallowCopy_6(this.clazzLog11__1, ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda(this.logRecords14__1));
            this_1.add_utx5q5_k$(element_1);
            var this_2 = this.attendanceRecordsToSave4__1;
            var elements = this.logRecords14__1;
            addAll(this_2, elements);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 7:
            this.set_state_rjd8d0_k$(8);
            var tmp_9 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.clazzLogsToSave3__1, this.attendanceRecordsToSave4__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.tmp$ret$22__1 = suspendResult;
            this.set_exceptionState_fex74n_k$(11);
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            this.set_exceptionState_fex74n_k$(11);
            this.this0__1.unlock_ulcrcl_k$(this.owner1__1);
            if (!(_get_newClazzLog__zdra0r(this.this$0__1) == null)) {
              this.this$0__1.get_navController_qibdoq_k$().popBackStack_rnnumt_k$(Companion_getInstance_193().get_DEST_NAME_gmgk7z_k$(), true);
            } else {
              this.this$0__1.finishWithResult_jlqwtj_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().get_currentClazzLog_hj93zw_k$());
            }

            return Unit_getInstance();
          case 10:
            this.set_exceptionState_fex74n_k$(11);
            var t = this.get_exception_x0n6w6_k$();
            this.this0__1.unlock_ulcrcl_k$(this.owner1__1);
            throw t;
          case 11:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 11) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $savePersonAndAttendanceRecordsCOROUTINE$62(_this__u8e3s4, clazzLogUid, records, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.clazzLogUid_1 = clazzLogUid;
    this.records_1 = records;
  }
  protoOf($savePersonAndAttendanceRecordsCOROUTINE$62).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.savedStateKey0__1 = 'log_' + this.clazzLogUid_1.toString();
            this.set_state_rjd8d0_k$(1);
            suspendResult = this._this__u8e3s4__1.setJson_jnpl42_k$(this._this__u8e3s4__1.get_savedStateHandle_xtsxet_k$(), this.savedStateKey0__1, ListSerializer(Companion_getInstance_49().serializer_9w0wvi_k$()), this.records_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = this._this__u8e3s4__1.getJson_t7vwf3_k$(this._this__u8e3s4__1.get_savedStateHandle_xtsxet_k$(), 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_11())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.tmp0_safe_receiver1__1 = suspendResult;
            this.tmp1_elvis_lhs2__1 = this.tmp0_safe_receiver1__1 == null ? null : toSet(this.tmp0_safe_receiver1__1);
            this.currentLogList3__1 = this.tmp1_elvis_lhs2__1 == null ? emptySet() : this.tmp1_elvis_lhs2__1;
            if (!this.currentLogList3__1.contains_aljjnj_k$(this.clazzLogUid_1)) {
              this.newLogList4__1 = plus_1(this.currentLogList3__1, this.clazzLogUid_1);
              this.set_state_rjd8d0_k$(3);
              suspendResult = this._this__u8e3s4__1.setJson_jnpl42_k$(this._this__u8e3s4__1.get_savedStateHandle_xtsxet_k$(), 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_11())), toList(this.newLogList4__1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $commitAttendanceRecordsToStateCOROUTINE$63(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
  }
  protoOf($commitAttendanceRecordsToStateCOROUTINE$63).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_0 = this;
            tmp_0.this0__1 = this._this__u8e3s4__1.saveAttendanceRecordsMutex_1;
            var tmp_1 = this;
            tmp_1.owner1__1 = null;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this0__1.lock_ugrcvf_k$(this.owner1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(3);
            suspendResult = savePersonAndAttendanceRecords(this._this__u8e3s4__1, this._this__u8e3s4__1._uiState_1.get_value_j01efc_k$().get_currentClazzLog_hj93zw_k$().get_clazzLogUid_ifqem3_k$(), this._this__u8e3s4__1._uiState_1.get_value_j01efc_k$().clazzLogAttendanceRecordList_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.tmp$ret$02__1 = suspendResult;
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(6);
            this.this0__1.unlock_ulcrcl_k$(this.owner1__1);
            return Unit_getInstance();
          case 5:
            this.set_exceptionState_fex74n_k$(6);
            var t = this.get_exception_x0n6w6_k$();
            this.this0__1.unlock_ulcrcl_k$(this.owner1__1);
            throw t;
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ClazzLogEditAttendanceViewModel(di, savedStateHandle) {
    Companion_getInstance_194();
    UstadEditViewModel.call(this, di, savedStateHandle, 'EditAttendance');
    this._uiState_1 = MutableStateFlow(new ClazzLogEditAttendanceUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    tmp.newClazzLog$delegate_1 = lazy_0(ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda(savedStateHandle, this));
    this.loadClazzLogJob_1 = null;
    this.saveAttendanceRecordsMutex_1 = Mutex();
    var tmp_0 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_record_attendance_7e5gxa_k$()));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzLogEditAttendanceViewModel$slambda_0(this, null);
    this.launchIfHasPermission$default_l9omam_k$(tmp_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda_2(this, null));
  }
  protoOf(ClazzLogEditAttendanceViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ClazzLogEditAttendanceViewModel).onChangeClazzLog_4wvzcl_k$ = function (clazzLog, forceLoad) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this._uiState_1.get_value_j01efc_k$().clazzLogsList_1.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        if (item.get_clazzLogUid_ifqem3_k$().equals(clazzLog.get_clazzLogUid_ifqem3_k$())) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var logIndex = tmp$ret$1;
    if (!forceLoad ? logIndex === this._uiState_1.get_value_j01efc_k$().currentClazzLogIndex_1 : false)
      return Unit_getInstance();
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        _set_currentClazzLogIndex__l00dbq(this, logIndex);
        var tmp$ret$3;
        $l$block_0: {
          // Inline function 'kotlin.collections.indexOfFirst' call
          var index_0 = 0;
          var tmp0_iterator_0 = prevValue.clazzLogsList_1.iterator_jk1svi_k$();
          while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
            var item_0 = tmp0_iterator_0.next_20eer_k$();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>.<anonymous>' call
            if (item_0.get_clazzLogUid_ifqem3_k$().equals(clazzLog.get_clazzLogUid_ifqem3_k$())) {
              tmp$ret$3 = index_0;
              break $l$block_0;
            }
            index_0 = index_0 + 1 | 0;
          }
          tmp$ret$3 = -1;
        }
        var nextValue = prevValue.copy$default_incj2s_k$(VOID, tmp$ret$3, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block_1;
        }
      }
    }
    var tmp0_safe_receiver = this.loadClazzLogJob_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = this;
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    tmp.loadClazzLogJob_1 = launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0(clazzLog, this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).onChangeClazzLog$default_r8cy5o_k$ = function (clazzLog, forceLoad, $super) {
    forceLoad = forceLoad === VOID ? false : forceLoad;
    var tmp;
    if ($super === VOID) {
      this.onChangeClazzLog_4wvzcl_k$(clazzLog, forceLoad);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.onChangeClazzLog_4wvzcl_k$.call(this, clazzLog, forceLoad);
    }
    return tmp;
  };
  protoOf(ClazzLogEditAttendanceViewModel).onClazzLogAttendanceChanged_djsko_k$ = function (record) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClazzLogAttendanceChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_incj2s_k$(replace_0(prevValue.clazzLogAttendanceRecordList_1, record, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda(record)));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).onClickMarkAll_95qzst_k$ = function (status) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.clazzLogAttendanceRecordList_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.iterator_jk1svi_k$();
        while (tmp0_iterator.hasNext_bitz1p_k$()) {
          var item = tmp0_iterator.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver = item.get_attendanceRecord_mzh5r7_k$();
          var tmp;
          if (tmp0_safe_receiver == null) {
            tmp = null;
          } else {
            tmp = shallowCopy_7(tmp0_safe_receiver, ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda(status));
          }
          var tmp$ret$0 = item.copy$default_c1o9l2_k$(VOID, VOID, tmp);
          destination.add_utx5q5_k$(tmp$ret$0);
        }
        var nextValue = prevValue.copy$default_incj2s_k$(destination);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this, null));
  };
  function ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? emptyList() : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? 0 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? emptyList() : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    canEdit = canEdit === VOID ? false : canEdit;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.clazzLogAttendanceRecordList_1 = clazzLogAttendanceRecordList;
    this.currentClazzLogIndex_1 = currentClazzLogIndex;
    this.clazzLogsList_1 = clazzLogsList;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.canEdit_1 = canEdit;
    this.timeZone_1 = timeZone;
  }
  protoOf(ClazzLogEditAttendanceUiState).get_clazzLogAttendanceRecordList_vulqib_k$ = function () {
    return this.clazzLogAttendanceRecordList_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).get_currentClazzLogIndex_62pkcq_k$ = function () {
    return this.currentClazzLogIndex_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).get_clazzLogsList_vqtxdo_k$ = function () {
    return this.clazzLogsList_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).get_canEdit_aclt01_k$ = function () {
    return this.canEdit_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).get_timeZone_4vh49u_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).indexOfClazzLogUid_9dk12r_k$ = function (clazzLogUid) {
    // Inline function 'kotlin.let' call
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.clazzLogsList_1.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
        if (item.get_clazzLogUid_ifqem3_k$().equals(clazzLogUid)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
    var it = tmp$ret$1;
    return it >= 0 ? it : null;
  };
  protoOf(ClazzLogEditAttendanceUiState).get_currentClazzLog_hj93zw_k$ = function () {
    return this.clazzLogsList_1.get_c1px32_k$(this.currentClazzLogIndex_1);
  };
  protoOf(ClazzLogEditAttendanceUiState).component1_7eebsc_k$ = function () {
    return this.clazzLogAttendanceRecordList_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).component2_7eebsb_k$ = function () {
    return this.currentClazzLogIndex_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).component3_7eebsa_k$ = function () {
    return this.clazzLogsList_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).component4_7eebs9_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).component5_7eebs8_k$ = function () {
    return this.canEdit_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).component6_7eebs7_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(ClazzLogEditAttendanceUiState).copy_7sw54c_k$ = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    return new ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).copy$default_incj2s_k$ = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone, $super) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? this.clazzLogAttendanceRecordList_1 : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? this.currentClazzLogIndex_1 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? this.clazzLogsList_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    canEdit = canEdit === VOID ? this.canEdit_1 : canEdit;
    timeZone = timeZone === VOID ? this.timeZone_1 : timeZone;
    return $super === VOID ? this.copy_7sw54c_k$(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) : $super.copy_7sw54c_k$.call(this, clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).toString = function () {
    return 'ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList=' + this.clazzLogAttendanceRecordList_1 + ', currentClazzLogIndex=' + this.currentClazzLogIndex_1 + ', clazzLogsList=' + this.clazzLogsList_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', canEdit=' + this.canEdit_1 + ', timeZone=' + this.timeZone_1 + ')';
  };
  protoOf(ClazzLogEditAttendanceUiState).hashCode = function () {
    var result = hashCode(this.clazzLogAttendanceRecordList_1);
    result = imul(result, 31) + this.currentClazzLogIndex_1 | 0;
    result = imul(result, 31) + hashCode(this.clazzLogsList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.canEdit_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.timeZone_1) | 0;
    return result;
  };
  protoOf(ClazzLogEditAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.clazzLogAttendanceRecordList_1, tmp0_other_with_cast.clazzLogAttendanceRecordList_1))
      return false;
    if (!(this.currentClazzLogIndex_1 === tmp0_other_with_cast.currentClazzLogIndex_1))
      return false;
    if (!equals(this.clazzLogsList_1, tmp0_other_with_cast.clazzLogsList_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.canEdit_1 === tmp0_other_with_cast.canEdit_1))
      return false;
    if (!(this.timeZone_1 === tmp0_other_with_cast.timeZone_1))
      return false;
    return true;
  };
  function newClazzLog$factory() {
    return getPropertyCallableRef('newClazzLog', 1, KProperty1, function (receiver) {
      return _get_newClazzLog__zdra0r(receiver);
    }, null);
  }
  function _get_PASS_THROUGH_ARGS__odhm7o($this) {
    return $this.PASS_THROUGH_ARGS_1;
  }
  function _get__uiState__8e9jsd_19($this) {
    return $this._uiState_1;
  }
  function Companion_134() {
    Companion_instance_134 = this;
    this.DEST_NAME_1 = 'ContentEntry';
    this.PASS_THROUGH_ARGS_1 = listOf([Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$(), Companion_getInstance_160().get_ARG_COURSE_BLOCK_UID_jgfzis_k$()]);
  }
  protoOf(Companion_134).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_134;
  function Companion_getInstance_195() {
    if (Companion_instance_134 == null)
      new Companion_134();
    return Companion_instance_134;
  }
  function ContentEntryDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_195();
    DetailViewModel.call(this, di, savedStateHandle, Companion_getInstance_199().get_DEST_NAME_gmgk7z_k$());
    var tmp = this;
    var tmp_0 = Companion_getInstance_199().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.detail.ContentEntryDetailViewModel._uiState.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_195().PASS_THROUGH_ARGS_1);
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    var tmp_1 = new TabItem(tmp_0, tmp$ret$2, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_overview_n1bike_k$()));
    var tmp_2 = Companion_getInstance_196().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_1 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.detail.ContentEntryDetailViewModel._uiState.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_1, Companion_getInstance_195().PASS_THROUGH_ARGS_1);
    var tmp$ret$5 = this_1.build_1k0s4u_k$();
    tmp._uiState_1 = MutableStateFlow(new ContentEntryDetailUiState(listOf([tmp_1, new TabItem(tmp_2, tmp$ret$5, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_attempts_mtsz5d_k$()))])));
    this.uiState_1 = asStateFlow(this._uiState_1);
  }
  protoOf(ContentEntryDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function ContentEntryDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.tabs_1 = tabs;
  }
  protoOf(ContentEntryDetailUiState).get_tabs_wousav_k$ = function () {
    return this.tabs_1;
  };
  protoOf(ContentEntryDetailUiState).component1_7eebsc_k$ = function () {
    return this.tabs_1;
  };
  protoOf(ContentEntryDetailUiState).copy_y53k8x_k$ = function (tabs) {
    return new ContentEntryDetailUiState(tabs);
  };
  protoOf(ContentEntryDetailUiState).copy$default_ackubc_k$ = function (tabs, $super) {
    tabs = tabs === VOID ? this.tabs_1 : tabs;
    return $super === VOID ? this.copy_y53k8x_k$(tabs) : $super.copy_y53k8x_k$.call(this, tabs);
  };
  protoOf(ContentEntryDetailUiState).toString = function () {
    return 'ContentEntryDetailUiState(tabs=' + this.tabs_1 + ')';
  };
  protoOf(ContentEntryDetailUiState).hashCode = function () {
    return hashCode(this.tabs_1);
  };
  protoOf(ContentEntryDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailUiState ? other : THROW_CCE();
    if (!equals(this.tabs_1, tmp0_other_with_cast.tabs_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).invoke_7b88ga_k$ = function (contentEntry, $completion) {
    var tmp = this.create_ic4o5i_k$(contentEntry, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_7b88ga_k$((p1 == null ? true : p1 instanceof ContentEntry) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver = this.contentEntry_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_title_iz32un_k$();
              var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).create_ic4o5i_k$ = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.contentEntry_1 = contentEntry;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_ic4o5i_k$((value == null ? true : value instanceof ContentEntry) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (contentEntry, $completion) {
      return i.invoke_7b88ga_k$(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().findLiveContentEntry_5bv7w0_k$(this.this$0__1.entityUidArg_1);
            var tmp_1 = ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_entityUidArg__tz7ola($this) {
    return $this.entityUidArg_1;
  }
  function _get_attemptsPersonListPagingSource__m5lh3p($this) {
    return $this.attemptsPersonListPagingSource_1;
  }
  function buildSortOptions($this, db, $completion) {
    var tmp = new $buildSortOptionsCOROUTINE$64($this, db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function Companion_135() {
    Companion_instance_135 = this;
    this.DEST_NAME_1 = 'ContentEntryDetailAttemptsPersonList';
  }
  protoOf(Companion_135).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_135;
  function Companion_getInstance_196() {
    if (Companion_instance_135 == null)
      new Companion_135();
    return Companion_instance_135;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_21(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_21).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().statementDao_8y5avx_k$().findPersonsWithAttempts_5xkx72_k$(this$0.entityUidArg_1, this$0.get_activeUserPersonUid_1nlgnz_k$(), toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$()), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().sortOption_1.get_flag_wom2lx_k$());
    };
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            tmp_0.this0__1 = filterNotNull(listOf([this.this$0__1.get_activeDb_bu92wd_k$(), this.this$0__1.get_activeRepo_dmmom9_k$()]));
            this.tmp0_iterator1__1 = this.this0__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            if (!this.tmp0_iterator1__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

            this.element2__1 = this.tmp0_iterator1__1.next_20eer_k$();
            var tmp_1 = this;
            tmp_1.db3__1 = this.element2__1;
            this.set_state_rjd8d0_k$(2);
            suspendResult = buildSortOptions(this.this$0__1, this.db3__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var sortOptions = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_ijgai6_k$(VOID, sortOptions);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $buildSortOptionsCOROUTINE$64(_this__u8e3s4, db, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.db_1 = db;
  }
  protoOf($buildSortOptionsCOROUTINE$64).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.statementDao_8y5avx_k$().scoreOrProgressDataExistsForContent_or4jlz_k$(this._this__u8e3s4__1.entityUidArg_1, this._this__u8e3s4__1.get_activeUserPersonUid_1nlgnz_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var list = suspendResult;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_0;
              if (isInterface(list, Collection)) {
                tmp_0 = list.isEmpty_y1axqb_k$();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = list.iterator_jk1svi_k$();
              while (tmp0_iterator.hasNext_bitz1p_k$()) {
                var element = tmp0_iterator.next_20eer_k$();
                if (!(element.get_extensionProgress_sopfj7_k$() == null)) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            var tmp_1 = tmp$ret$0;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp_2;
              if (isInterface(list, Collection)) {
                tmp_2 = list.isEmpty_y1axqb_k$();
              } else {
                tmp_2 = false;
              }
              if (tmp_2) {
                tmp$ret$2 = false;
                break l$ret$3;
              }
              var tmp0_iterator_0 = list.iterator_jk1svi_k$();
              while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                var element_0 = tmp0_iterator_0.next_20eer_k$();
                if (!(element_0.get_resultScoreScaled_3to03e_k$() == null)) {
                  tmp$ret$2 = true;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = false;
            }
             while (false);
            var tmp0_container = new Pair(tmp_1, tmp$ret$2);
            var hasProgressData = tmp0_container.component1_7eebsc_k$();
            var hasScoreData = tmp0_container.component2_7eebsb_k$();
            var this_0 = ArrayList_init_$Create$();
            this_0.addAll_4lagoh_k$(listOf([new SortOrderOption(strings_getInstance().get_first_name_mu3jr1_k$(), AttemptsPersonListConst_getInstance().get_SORT_FIRST_NAME_ASC_uiz2kk_k$(), true), new SortOrderOption(strings_getInstance().get_first_name_mu3jr1_k$(), AttemptsPersonListConst_getInstance().get_SORT_FIRST_NAME_DESC_mxs51a_k$(), false), new SortOrderOption(strings_getInstance().get_last_name_t811qt_k$(), AttemptsPersonListConst_getInstance().get_SORT_LAST_NAME_ASC_qs7cum_k$(), true), new SortOrderOption(strings_getInstance().get_last_name_t811qt_k$(), AttemptsPersonListConst_getInstance().get_SORT_LAST_NAME_DESC_m2yybw_k$(), false)]));
            if (hasScoreData) {
              this_0.addAll_4lagoh_k$(listOf([new SortOrderOption(strings_getInstance().get_by_score_1dqhl9_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_SCORE_ASC_lodoj8_k$(), true), new SortOrderOption(strings_getInstance().get_by_score_1dqhl9_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_SCORE_DESC_wpt9se_k$(), false)]));
            }

            if (hasProgressData) {
              this_0.addAll_4lagoh_k$(listOf([new SortOrderOption(strings_getInstance().get_progress_key_gezyja_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_COMPLETION_ASC_4tz666_k$(), true), new SortOrderOption(strings_getInstance().get_progress_key_gezyja_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_COMPLETION_DESC_7r3udg_k$(), false)]));
            }

            this_0.addAll_4lagoh_k$(listOf([new SortOrderOption(strings_getInstance().get_most_recent_sd0x5e_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_RECENT_ATTEMPT_DESC_vmx8w9_k$(), null), new SortOrderOption(strings_getInstance().get_least_recent_l4iwg6_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_RECENT_ATTEMPT_ASC_srlh7v_k$(), null)]));
            return this_0.build_1k0s4u_k$();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function ContentEntryDetailAttemptsPersonListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_196();
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsPersonList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsPersonListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.entityUidArg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.attemptsPersonListPagingSource_1 = ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.createSearchEnabledState$default_7v3uai_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_ijgai6_k$(this.attemptsPersonListPagingSource_1);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_1, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_0(this, null));
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_2(this, null));
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).onClickEntry_272cxe_k$ = function (entry) {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_197().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$(), entry.get_person_i0c866_k$().get_personUid_mmhd76_k$().toString()), to(Companion_getInstance_156().get_ARG_CONTENT_ENTRY_UID_tla4x7_k$(), this.entityUidArg_1.toString())]));
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).onSortOrderChanged_cgn689_k$ = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_ijgai6_k$(VOID, VOID, sortOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  function ContentEntryDetailAttemptsPersonListUiState$_init_$lambda_s6nk3z() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList, sortOptions, sortOption, showSortOptions) {
    var tmp;
    if (attemptsPersonList === VOID) {
      tmp = ContentEntryDetailAttemptsPersonListUiState$_init_$lambda_s6nk3z;
    } else {
      tmp = attemptsPersonList;
    }
    attemptsPersonList = tmp;
    sortOptions = sortOptions === VOID ? listOf([new SortOrderOption(strings_getInstance().get_most_recent_sd0x5e_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_RECENT_ATTEMPT_DESC_vmx8w9_k$(), null), new SortOrderOption(strings_getInstance().get_least_recent_l4iwg6_k$(), AttemptsPersonListConst_getInstance().get_SORT_BY_RECENT_ATTEMPT_ASC_srlh7v_k$(), null)]) : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    this.attemptsPersonList_1 = attemptsPersonList;
    this.sortOptions_1 = sortOptions;
    this.sortOption_1 = sortOption;
    this.showSortOptions_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsPersonListUiState).get_attemptsPersonList_tq4f0e_k$ = function () {
    return this.attemptsPersonList_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).get_sortOption_xx8b7o_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).get_showSortOptions_4kx2wq_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).component1_7eebsc_k$ = function () {
    return this.attemptsPersonList_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).component2_7eebsb_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).component3_7eebsa_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).component4_7eebs9_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).copy_j5uvd9_k$ = function (attemptsPersonList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).copy$default_ijgai6_k$ = function (attemptsPersonList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsPersonList = attemptsPersonList === VOID ? this.attemptsPersonList_1 : attemptsPersonList;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    sortOption = sortOption === VOID ? this.sortOption_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.showSortOptions_1 : showSortOptions;
    return $super === VOID ? this.copy_j5uvd9_k$(attemptsPersonList, sortOptions, sortOption, showSortOptions) : $super.copy_j5uvd9_k$.call(this, attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList=' + this.attemptsPersonList_1 + ', sortOptions=' + this.sortOptions_1 + ', sortOption=' + this.sortOption_1 + ', showSortOptions=' + this.showSortOptions_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).hashCode = function () {
    var result = hashCode(this.attemptsPersonList_1);
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.sortOption_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showSortOptions_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsPersonListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsPersonListUiState ? other : THROW_CCE();
    if (!equals(this.attemptsPersonList_1, tmp0_other_with_cast.attemptsPersonList_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.sortOption_1.equals(tmp0_other_with_cast.sortOption_1))
      return false;
    if (!(this.showSortOptions_1 === tmp0_other_with_cast.showSortOptions_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).invoke_ag23k1_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_ag23k1_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = firstOrNull_1(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().getNamesByUid_owsdl3_k$(this.this$0__1.argPersonUid_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this.this$0__1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_ag23k1_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).invoke_yvvfxs_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_yvvfxs_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = firstOrNull_1(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().findLiveContentEntry_5bv7w0_k$(this.this$0__1.entityUidArg_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this.this$0__1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_yvvfxs_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_entityUidArg__tz7ola_0($this) {
    return $this.entityUidArg_1;
  }
  function _get_argPersonUid__j0lhba_0($this) {
    return $this.argPersonUid_1;
  }
  function _get_attemptsSessionListPagingSource__a9gecc($this) {
    return $this.attemptsSessionListPagingSource_1;
  }
  function Companion_136() {
    Companion_instance_136 = this;
    this.DEST_NAME_1 = 'ContentEntryDetailAttemptsSessionList';
  }
  protoOf(Companion_136).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_136;
  function Companion_getInstance_197() {
    if (Companion_instance_136 == null)
      new Companion_136();
    return Companion_instance_136;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().statementDao_8y5avx_k$().findSessionsByPersonAndContent_et9scu_k$(this$0.entityUidArg_1, this$0.argPersonUid_1, this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().sortOption_1.get_flag_wom2lx_k$());
    };
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            tmp_0.personNamesDeferred0__1 = async(this.$this$launch_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_0(this.this$0__1, null));
            var tmp_1 = this;
            tmp_1.contentEntryDeferred1__1 = async(this.$this$launch_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_2(this.this$0__1, null));
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.personNamesDeferred0__1.await_4rdzbx_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.personNames2__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.contentEntryDeferred1__1.await_4rdzbx_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var contentEntry = suspendResult;
            var tmp0_safe_receiver = this.personNames2__1;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_firstNames_n3o3y7_k$();
            var tmp1_safe_receiver = this.personNames2__1;
            var tmp_3 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_lastName_f360wa_k$();
            var tmp3_elvis_lhs = contentEntry == null ? null : contentEntry.get_title_iz32un_k$();
            var combinedTitle = '' + tmp_2 + ' ' + tmp_3 + ' - ' + (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs);
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, combinedTitle);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsSessionListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_197();
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsSessionList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsSessionListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CONTENT_ENTRY_UID_tla4x7_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.entityUidArg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$());
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.argPersonUid_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.attemptsSessionListPagingSource_1 = ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_51pw0c_k$(this.attemptsSessionListPagingSource_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).onClickEntry_x1mbkl_k$ = function (entry) {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_198().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$(), this.argPersonUid_1.toString()), to(Companion_getInstance_156().get_ARG_CONTENT_ENTRY_UID_tla4x7_k$(), this.entityUidArg_1.toString()), to(Companion_getInstance_156().get_ARG_CONTEXT_REGISTRATION_ID_HI_sl43y9_k$(), entry.get_contextRegistrationHi_dkx0jk_k$().toString()), to(Companion_getInstance_156().get_ARG_CONTEXT_REGISTRATION_ID_LO_sl441v_k$(), entry.get_contextRegistrationLo_dkx0fy_k$().toString())]));
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).onSortOrderChanged_cgn689_k$ = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsSessionList = this.attemptsSessionListPagingSource_1;
        var nextValue = prevValue.copy$default_51pw0c_k$(tmp0_attemptsSessionList, VOID, sortOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  function ContentEntryDetailAttemptsSessionListUiState$_init_$lambda_970utq() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList, sortOptions, sortOption, showSortOptions) {
    var tmp;
    if (attemptsSessionList === VOID) {
      tmp = ContentEntryDetailAttemptsSessionListUiState$_init_$lambda_970utq;
    } else {
      tmp = attemptsSessionList;
    }
    attemptsSessionList = tmp;
    sortOptions = sortOptions === VOID ? listOf([new SortOrderOption(strings_getInstance().get_most_recent_sd0x5e_k$(), SessionTimeAndProgressInfoConst_getInstance().get_SORT_BY_TIMESTAMP_DESC_ubbcqe_k$(), null), new SortOrderOption(strings_getInstance().get_least_recent_l4iwg6_k$(), SessionTimeAndProgressInfoConst_getInstance().get_SORT_BY_TIMESTAMP_ASC_v3mbco_k$(), null), new SortOrderOption(strings_getInstance().get_by_score_1dqhl9_k$(), SessionTimeAndProgressInfoConst_getInstance().get_SORT_BY_SCORE_ASC_lodoj8_k$(), true), new SortOrderOption(strings_getInstance().get_by_score_1dqhl9_k$(), SessionTimeAndProgressInfoConst_getInstance().get_SORT_BY_SCORE_DESC_wpt9se_k$(), false), new SortOrderOption(strings_getInstance().get_by_completion_3pe4kb_k$(), SessionTimeAndProgressInfoConst_getInstance().get_SORT_BY_COMPLETION_ASC_4tz666_k$(), true), new SortOrderOption(strings_getInstance().get_by_completion_3pe4kb_k$(), SessionTimeAndProgressInfoConst_getInstance().get_SORT_BY_COMPLETION_DESC_7r3udg_k$(), false)]) : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    this.attemptsSessionList_1 = attemptsSessionList;
    this.sortOptions_1 = sortOptions;
    this.sortOption_1 = sortOption;
    this.showSortOptions_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsSessionListUiState).get_attemptsSessionList_8v5f45_k$ = function () {
    return this.attemptsSessionList_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).get_sortOption_xx8b7o_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).get_showSortOptions_4kx2wq_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).component1_7eebsc_k$ = function () {
    return this.attemptsSessionList_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).component2_7eebsb_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).component3_7eebsa_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).component4_7eebs9_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).copy_6fq89a_k$ = function (attemptsSessionList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).copy$default_51pw0c_k$ = function (attemptsSessionList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsSessionList = attemptsSessionList === VOID ? this.attemptsSessionList_1 : attemptsSessionList;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    sortOption = sortOption === VOID ? this.sortOption_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.showSortOptions_1 : showSortOptions;
    return $super === VOID ? this.copy_6fq89a_k$(attemptsSessionList, sortOptions, sortOption, showSortOptions) : $super.copy_6fq89a_k$.call(this, attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList=' + this.attemptsSessionList_1 + ', sortOptions=' + this.sortOptions_1 + ', sortOption=' + this.sortOption_1 + ', showSortOptions=' + this.showSortOptions_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).hashCode = function () {
    var result = hashCode(this.attemptsSessionList_1);
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.sortOption_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showSortOptions_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsSessionListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsSessionListUiState ? other : THROW_CCE();
    if (!equals(this.attemptsSessionList_1, tmp0_other_with_cast.attemptsSessionList_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.sortOption_1.equals(tmp0_other_with_cast.sortOption_1))
      return false;
    if (!(this.showSortOptions_1 === tmp0_other_with_cast.showSortOptions_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).invoke_mbbydw_k$ = function (verbs, $completion) {
    var tmp = this.create_jqlk4w_k$(verbs, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_mbbydw_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_m2y7hn_k$(VOID, VOID, VOID, VOID, this.verbs_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).create_jqlk4w_k$ = function (verbs, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.verbs_1 = verbs;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_jqlk4w_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (verbs, $completion) {
      return i.invoke_mbbydw_k$(verbs, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).invoke_7b88ga_k$ = function (contentEntry, $completion) {
    var tmp = this.create_ic4o5i_k$(contentEntry, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_7b88ga_k$((p1 == null ? true : p1 instanceof ContentEntry) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver = this.contentEntry_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_title_iz32un_k$();
              var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).create_ic4o5i_k$ = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.contentEntry_1 = contentEntry;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_ic4o5i_k$((value == null ? true : value instanceof ContentEntry) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (contentEntry, $completion) {
      return i.invoke_7b88ga_k$(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().statementDao_8y5avx_k$().getUniqueVerbsForSession_3y3dye_k$(this.this$0__1.argContextRegistrationIdHi_1, this.this$0__1.argContextRegistrationIdLo_1, this.this$0__1.argPersonUid_1, this.this$0__1.argContentEntryUid_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_22(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().findLiveContentEntry_5bv7w0_k$(this.this$0__1.argContentEntryUid_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_22(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_2(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_argPersonUid__j0lhba_1($this) {
    return $this.argPersonUid_1;
  }
  function _get_argContextRegistrationIdHi__ximu3h($this) {
    return $this.argContextRegistrationIdHi_1;
  }
  function _get_argContextRegistrationIdLo__ximx7f($this) {
    return $this.argContextRegistrationIdLo_1;
  }
  function _get_argContentEntryUid__ycmiwm($this) {
    return $this.argContentEntryUid_1;
  }
  function _get_formatStatementResponseUseCase__m72qwj($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.formatStatementResponseUseCase$delegate_1;
    formatStatementResponseUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_attemptsStatementListPagingSource__brna1v($this) {
    return $this.attemptsStatementListPagingSource_1;
  }
  function Companion_137() {
    Companion_instance_137 = this;
    this.DEST_NAME_1 = 'ContentEntryDetailAttemptsStatementList';
  }
  protoOf(Companion_137).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_137;
  function Companion_getInstance_198() {
    if (Companion_instance_137 == null)
      new Companion_137();
    return Companion_instance_137;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_22(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_22).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().statementDao_8y5avx_k$().findStatementsBySession_149c38_k$(this$0.argContextRegistrationIdHi_1, this$0.argContextRegistrationIdLo_1, this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.argPersonUid_1, this$0.argContentEntryUid_1, toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$()), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().sortOption_1.get_flag_wom2lx_k$(), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().deselectedVerbUids_1);
    };
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_198();
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsStatementList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsStatementListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.argPersonUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CONTEXT_REGISTRATION_ID_HI_sl43y9_k$());
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.argContextRegistrationIdHi_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CONTEXT_REGISTRATION_ID_LO_sl441v_k$());
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_1.argContextRegistrationIdLo_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_2 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CONTENT_ENTRY_UID_tla4x7_k$());
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_2.argContentEntryUid_1 = tmp1_elvis_lhs_2 == null ? new Long(0, 0) : tmp1_elvis_lhs_2;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(FormatStatementResponseUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.formatStatementResponseUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, formatStatementResponseUseCase$factory());
    var tmp_5 = this;
    tmp_5.attemptsStatementListPagingSource_1 = ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_m2y7hn_k$(this.attemptsStatementListPagingSource_1);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.createSearchEnabledState_l9ncdt_k$(true));
        if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_6, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).onSortOrderChanged_cgn689_k$ = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsStatementList = this.attemptsStatementListPagingSource_1;
        var nextValue = prevValue.copy$default_m2y7hn_k$(tmp0_attemptsStatementList, VOID, sortOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).onVerbFilterToggled_viup8u_k$ = function (verbEntity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onVerbFilterToggled.<anonymous>' call
        var nextValue = prevValue.copy$default_m2y7hn_k$(VOID, VOID, VOID, VOID, VOID, toggle(prevValue.deselectedVerbUids_1, verbEntity.get_verbUid_72kurs_k$()));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).formattedStatementResponse_artbzv_k$ = function (statementEntity) {
    return _get_formatStatementResponseUseCase__m72qwj(this).invoke_93cvjr_k$(statementEntity.get_statementEntity_xknex5_k$(), statementEntity.get_activity_bu9714_k$());
  };
  function ContentEntryDetailAttemptsStatementListUiState$_init_$lambda_o4i91x() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) {
    var tmp;
    if (attemptsStatementList === VOID) {
      tmp = ContentEntryDetailAttemptsStatementListUiState$_init_$lambda_o4i91x;
    } else {
      tmp = attemptsStatementList;
    }
    attemptsStatementList = tmp;
    sortOptions = sortOptions === VOID ? listOf([new SortOrderOption(strings_getInstance().get_by_timestamp_3m0707_k$(), StatementConst_getInstance().get_SORT_BY_TIMESTAMP_DESC_ubbcqe_k$(), true), new SortOrderOption(strings_getInstance().get_by_timestamp_3m0707_k$(), StatementConst_getInstance().get_SORT_BY_TIMESTAMP_ASC_v3mbco_k$(), false), new SortOrderOption(strings_getInstance().get_by_score_1dqhl9_k$(), StatementConst_getInstance().get_SORT_BY_SCORE_DESC_wpt9se_k$(), false), new SortOrderOption(strings_getInstance().get_by_score_1dqhl9_k$(), StatementConst_getInstance().get_SORT_BY_SCORE_ASC_lodoj8_k$(), true)]) : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    availableVerbs = availableVerbs === VOID ? emptyList() : availableVerbs;
    deselectedVerbUids = deselectedVerbUids === VOID ? emptyList() : deselectedVerbUids;
    this.attemptsStatementList_1 = attemptsStatementList;
    this.sortOptions_1 = sortOptions;
    this.sortOption_1 = sortOption;
    this.showSortOptions_1 = showSortOptions;
    this.availableVerbs_1 = availableVerbs;
    this.deselectedVerbUids_1 = deselectedVerbUids;
  }
  protoOf(ContentEntryDetailAttemptsStatementListUiState).get_attemptsStatementList_8e4lpa_k$ = function () {
    return this.attemptsStatementList_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).get_sortOption_xx8b7o_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).get_showSortOptions_4kx2wq_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).get_availableVerbs_r31n0_k$ = function () {
    return this.availableVerbs_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).get_deselectedVerbUids_v9e46f_k$ = function () {
    return this.deselectedVerbUids_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).component1_7eebsc_k$ = function () {
    return this.attemptsStatementList_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).component2_7eebsb_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).component3_7eebsa_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).component4_7eebs9_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).component5_7eebs8_k$ = function () {
    return this.availableVerbs_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).component6_7eebs7_k$ = function () {
    return this.deselectedVerbUids_1;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).copy_cvatrc_k$ = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) {
    return new ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).copy$default_m2y7hn_k$ = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids, $super) {
    attemptsStatementList = attemptsStatementList === VOID ? this.attemptsStatementList_1 : attemptsStatementList;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    sortOption = sortOption === VOID ? this.sortOption_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.showSortOptions_1 : showSortOptions;
    availableVerbs = availableVerbs === VOID ? this.availableVerbs_1 : availableVerbs;
    deselectedVerbUids = deselectedVerbUids === VOID ? this.deselectedVerbUids_1 : deselectedVerbUids;
    return $super === VOID ? this.copy_cvatrc_k$(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) : $super.copy_cvatrc_k$.call(this, attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList=' + this.attemptsStatementList_1 + ', sortOptions=' + this.sortOptions_1 + ', sortOption=' + this.sortOption_1 + ', showSortOptions=' + this.showSortOptions_1 + ', availableVerbs=' + this.availableVerbs_1 + ', deselectedVerbUids=' + this.deselectedVerbUids_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).hashCode = function () {
    var result = hashCode(this.attemptsStatementList_1);
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.sortOption_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showSortOptions_1) | 0;
    result = imul(result, 31) + hashCode(this.availableVerbs_1) | 0;
    result = imul(result, 31) + hashCode(this.deselectedVerbUids_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsStatementListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsStatementListUiState ? other : THROW_CCE();
    if (!equals(this.attemptsStatementList_1, tmp0_other_with_cast.attemptsStatementList_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.sortOption_1.equals(tmp0_other_with_cast.sortOption_1))
      return false;
    if (!(this.showSortOptions_1 === tmp0_other_with_cast.showSortOptions_1))
      return false;
    if (!equals(this.availableVerbs_1, tmp0_other_with_cast.availableVerbs_1))
      return false;
    if (!equals(this.deselectedVerbUids_1, tmp0_other_with_cast.deselectedVerbUids_1))
      return false;
    return true;
  };
  function formatStatementResponseUseCase$factory() {
    return getPropertyCallableRef('formatStatementResponseUseCase', 1, KProperty1, function (receiver) {
      return _get_formatStatementResponseUseCase__m72qwj(receiver);
    }, null);
  }
  function formatStatementResponseUseCase$factory_0() {
    return getPropertyCallableRef('formatStatementResponseUseCase', 1, KProperty1, function (receiver) {
      return _get_formatStatementResponseUseCase__m72qwj(receiver);
    }, null);
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).invoke_9dxwuv_k$ = function (it, $completion) {
    var tmp = this.create_cyqcpv_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9dxwuv_k$((p1 == null ? true : p1 instanceof ContentEntryAndDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).create_cyqcpv_k$ = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_cyqcpv_k$((value == null ? true : value instanceof ContentEntryAndDetail) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_9dxwuv_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).invoke_cuty2t_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_cuty2t_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.contentEntryDao_5ggc49_k$().findTitleByUidAsync_9gda26_k$(this.this$0__1.parentEntryUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).create_9q7izm_k$ = function (db, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_cuty2t_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).invoke_x61vg_k$ = function (it, $completion) {
    var tmp = this.create_f4o13c_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_x61vg_k$((p1 == null ? true : p1 instanceof ContentEntryVersion) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).create_f4o13c_k$ = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_f4o13c_k$((value == null ? true : value instanceof ContentEntryVersion) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_x61vg_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).invoke_78j3u5_k$ = function (it, $completion) {
    var tmp = this.create_jdypo1_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_78j3u5_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).create_jdypo1_k$ = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_jdypo1_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_78j3u5_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).invoke_fm36a7_k$ = function (it, $completion) {
    var tmp = this.create_35wqw5_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_fm36a7_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).create_35wqw5_k$ = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_35wqw5_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_fm36a7_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).invoke_9p36l4_k$ = function (it, $completion) {
    var tmp = this.create_1r7nfg_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9p36l4_k$((p1 == null ? true : p1 instanceof OfflineItemAndState) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).create_1r7nfg_k$ = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).create_wyq9v6_k$ = function (value, completion) {
    return this.create_1r7nfg_k$((value == null ? true : value instanceof OfflineItemAndState) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_9p36l4_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda() {
    return 'Could not get list of jobs';
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$();
            var tmp_1 = this.this$0__1.get_entityUidArg_hgo6pe_k$();
            var tmp0_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_COURSE_BLOCK_UID_jgfzis_k$());
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_2 = tmp_0.findByContentEntryUidWithDetailsAsFlow_i93hu3_k$(tmp_1, this.this$0__1.clazzUid_1, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            var tmp_3 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_2.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (this.this$0__1.parentEntryUid_1.equals(Companion_getInstance_204().get_LIBRARY_ROOT_CONTENT_ENTRY_UID_9enlar_k$())) {
              var tmp_0 = this;
              tmp_0.WHEN_RESULT0__1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_library_40idhu_k$());
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              var tmp_1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
              suspendResult = localFirstThenRepoIfNull(tmp_1, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var parentTitle = this.WHEN_RESULT0__1;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, parentTitle);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, title);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().contentEntryVersionDao_66n0fn_k$().findLatestByContentEntryUidAsFlow_l9rxde_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeDb_bu92wd_k$().transferJobDao_mx6734_k$().findByContentEntryUidWithTotalsAsFlow_xx462u_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), Companion_getInstance_50().get_TYPE_BLOB_UPLOAD_1cnl5l_k$());
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeDb_bu92wd_k$().contentEntryImportJobDao_bjpy9f_k$().findInProgressJobsByContentEntryUid_3k6kmp_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeDb_bu92wd_k$().offlineItemDao_rdbxlw_k$().findByContentEntryUid_dzug3r_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.this$0__1.get_nodeIdAndAuth_rm3fy1_k$().get_nodeId_h7ho7a_k$());
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.this0__1 = _get_httpClient__2ty1zc_4(this.this$0__1);
            var tmp_1 = this;
            tmp_1.urlString1__1 = this.this$0__1.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$() + 'api/contententryimportjob/importjobs';
            var tmp_2 = this;
            tmp_2.this2__1 = this.this0__1;
            var tmp_3 = this;
            tmp_3.this3__1 = this.this2__1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString1__1);
            parameter(this_0, 'contententryuid', this.this$0__1.get_entityUidArg_hgo6pe_k$().toString());
            header(this_0, 'cache-control', 'no-store');
            tmp_4.builder4__1 = this_0;
            this.builder4__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_5 = this;
            tmp_5.this5__1 = this.this3__1;
            var tmp_6 = this;
            tmp_6.builder6__1 = this.builder4__1;
            this.set_state_rjd8d0_k$(2);
            suspendResult = (new HttpStatement(this.builder6__1, this.this5__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ARGUMENT7__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            suspendResult = bodyAsDecodedText(this.ARGUMENT7__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var remoteImportJobsJson = suspendResult;
            var remoteImportJobs = this.this$0__1.get_json_woos35_k$().decodeFromString_jwu9sq_k$(ListSerializer(Companion_getInstance_51().serializer_9w0wvi_k$()), remoteImportJobsJson);
            var tmp$ret$0;
            l$ret$1: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_1.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, remoteImportJobs);
                if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            var state = tmp$ret$0;
            if (!state.remoteImportJobs_1.isEmpty_y1axqb_k$()) {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 5:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_7 = this.get_exception_x0n6w6_k$();
            if (tmp_7 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_8 = Napier_getInstance();
              tmp_8.d$default_iccotn_k$(VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda);
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 6:
            throw this.get_exception_x0n6w6_k$();
          case 7:
            this.set_exceptionState_fex74n_k$(6);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this.this$0__1, this.$savedStateHandle_1, null));
          if (this.this$0__1.clazzUid_1.equals(new Long(0, 0)) ? !this.this$0__1.parentEntryUid_1.equals(new Long(0, 0)) : false) {
            launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this.this$0__1, null));
          }
          launchSetTitleFromClazzUid(this.this$0__1, this.this$0__1.clazzUid_1, ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this.this$0__1));
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ContentEntryDetailOverviewViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, this.$savedStateHandle_1, completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda_0($this_launch, this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).invoke_7lig3_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_7lig3_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.it_1.contentEntryVersionDao_66n0fn_k$().findLatestVersionUidByContentEntryUidEntity_a61tgv_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_7lig3_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda() {
    return 'ContentEntryDetailoverview: could not dismiss remote error message';
  }
  function _get__uiState__8e9jsd_20($this) {
    return $this._uiState_1;
  }
  function _get_makeContentEntryAvailableOfflineUseCase__dvw4p1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.makeContentEntryAvailableOfflineUseCase$delegate_1;
    makeContentEntryAvailableOfflineUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_cancelDownloadUseCase__t8wbc4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cancelDownloadUseCase$delegate_1;
    cancelDownloadUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_defaultLaunchContentEntryUseCase__lyydsx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.defaultLaunchContentEntryUseCase$delegate_1;
    defaultLaunchContentEntryUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_launchXapiUseCase__jmtlap($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.launchXapiUseCase$delegate_1;
    launchXapiUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_launchEpubUseCase__sunqd7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.launchEpubUseCase$delegate_1;
    launchEpubUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_target__ccs42i($this) {
    return $this.target_1;
  }
  function _get_cancelImportContentEntryUseCase__kqom1e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cancelImportContentEntryUseCase$delegate_1;
    cancelImportContentEntryUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_cancelRemoteContentEntryImportUseCase__8yb0xk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cancelRemoteContentEntryImportUseCase$delegate_1;
    cancelRemoteContentEntryImportUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dismissRemoteContentEntryImportErrorUseCase$delegate_1;
    dismissRemoteContentEntryImportErrorUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_httpClient__2ty1zc_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.httpClient$delegate_1;
    httpClient$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_clazzUid__rrng1f_13($this) {
    return $this.clazzUid_1;
  }
  function _get_parentEntryUid__2win99($this) {
    return $this.parentEntryUid_1;
  }
  function Companion_138() {
    Companion_instance_138 = this;
    this.DEST_NAME_1 = 'ContentEntryDetailOverviewView';
    this.ARG_TARGET_1 = 'target';
  }
  protoOf(Companion_138).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_138).get_ARG_TARGET_hpg30j_k$ = function () {
    return this.ARG_TARGET_1;
  };
  var Companion_instance_138;
  function Companion_getInstance_199() {
    if (Companion_instance_138 == null)
      new Companion_138();
    return Companion_instance_138;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_23(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_23).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, ContentEntryDetailOverviewViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, this.$savedStateHandle_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOffline$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOffline$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOffline$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOffline$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.offlineItemAndStateVal0__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().offlineItemAndState_1;
            var tmp_0 = this;
            var tmp0_safe_receiver = this.offlineItemAndStateVal0__1;
            tmp_0.offlineItemVal1__1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_offlineItem_v8pcml_k$();
            var tmp_1 = this;
            var tmp1_safe_receiver = this.offlineItemAndStateVal0__1;
            tmp_1.activeDownload2__1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_activeDownload_kjmj7b_k$();
            if (this.offlineItemVal1__1 == null ? true : !this.offlineItemVal1__1.get_oiActive_i11m7r_k$()) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(this.this$0__1).invoke_gc8owv_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (!(this.activeDownload2__1 == null)) {
                this.set_state_rjd8d0_k$(2);
                var tmp_2 = _get_cancelDownloadUseCase__t8wbc4(this.this$0__1);
                var tmp2_safe_receiver = this.activeDownload2__1.get_transferJob_jbsot3_k$();
                var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_tjUid_iz32s1_k$();
                suspendResult = tmp_2.invoke_agzws7_k$(tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs, this.offlineItemVal1__1.get_oiUid_iwbgtp_k$(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                if (this.offlineItemAndStateVal0__1.get_readyForOffline_dggwek_k$()) {
                  this.set_state_rjd8d0_k$(1);
                  suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().offlineItemDao_rdbxlw_k$().updateActiveByOfflineItemUid_w1ia1s_k$(this.offlineItemVal1__1.get_oiUid_iwbgtp_k$(), false, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.set_state_rjd8d0_k$(4);
                  continue $sm;
                }
              }
            }

          case 1:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            return Unit_getInstance();
          case 5:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOffline$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOffline$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOffline$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onClickOffline$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOffline$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(6);
            this.set_exceptionState_fex74n_k$(5);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
            Napier_getInstance().d$default_a5agxr_k$('ContentEntryDetailOverviewViewModel: onClickOpen launched');
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = localFirstThenRepoIfNull(tmp_0, ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.latestContentEntryVersion1__1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.this$0__1.target_1;
            var tmp_2;
            if (tmp0_safe_receiver == null) {
              tmp_2 = null;
            } else {
              tmp_2 = Companion_getInstance_112().of_5gnbr7_k$(tmp0_safe_receiver);
            }

            var tmp1_elvis_lhs = tmp_2;
            tmp_1.openTarget2__1 = tmp1_elvis_lhs == null ? LinkTarget_DEFAULT_getInstance() : tmp1_elvis_lhs;
            if (!(this.latestContentEntryVersion1__1 == null)) {
              var tmp_3 = this;
              var tmp2_subject = this.latestContentEntryVersion1__1.get_cevContentType_gzbvyw_k$();
              tmp_3.contentSpecificLauncher3__1 = tmp2_subject === Companion_getInstance_9().get_TYPE_XAPI_7cn5sy_k$() ? _get_launchXapiUseCase__jmtlap(this.this$0__1) : tmp2_subject === Companion_getInstance_9().get_TYPE_EPUB_7cyzbg_k$() ? _get_launchEpubUseCase__sunqd7(this.this$0__1) : null;
              var tmp_4 = this;
              var tmp3_elvis_lhs = this.contentSpecificLauncher3__1;
              tmp_4.launcher4__1 = tmp3_elvis_lhs == null ? _get_defaultLaunchContentEntryUseCase__lyydsx(this.this$0__1) : tmp3_elvis_lhs;
              Napier_getInstance().d$default_a5agxr_k$('ContentEntryDetailOverviewViewModel: onClickOpen : Launching using ' + this.launcher4__1);
              this.set_state_rjd8d0_k$(3);
              var tmp_5 = this.this$0__1.get_navController_qibdoq_k$();
              var tmp4_safe_receiver = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_ARG_COURSE_BLOCK_UID_jgfzis_k$());
              var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
              suspendResult = this.launcher4__1.invoke_12n9zo_k$(this.latestContentEntryVersion1__1, tmp_5, this.this$0__1.clazzUid_1, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs, this.openTarget2__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              Napier_getInstance().d$default_a5agxr_k$('ContentEntryDetailOverviewViewModel: onClickOpen: latestContentEntryVersion = null');
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_content_not_ready_try_later_2wybsf_k$())));
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.tmp$ret$20__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 5:
            this.set_exceptionState_fex74n_k$(6);
            var tmp_6 = this.get_exception_x0n6w6_k$();
            if (tmp_6 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_7 = this;
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) + (':' + e.message)));
              Napier_getInstance().w$default_p42du4_k$('ContentEntryDetailOverview: Exception opening content', e);
              tmp_7.tmp$ret$20__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(7);
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 6:
            this.set_exceptionState_fex74n_k$(7);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$5: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 7:
            throw this.get_exception_x0n6w6_k$();
          case 8:
            this.set_exceptionState_fex74n_k$(7);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$7: do {
              var this_2 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_1 = this_2.get_value_j01efc_k$();
                var nextValue_1 = prevValue_1.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 7) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onCancelImport$slambda(this$0, $jobUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$jobUid_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onCancelImport$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelImport$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelImport$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_safe_receiver = _get_cancelImportContentEntryUseCase__kqom1e(this.this$0__1);
          if (tmp0_safe_receiver == null)
            null;
          else {
            tmp0_safe_receiver.invoke_asmnxi_k$(this.$jobUid_1);
          }
          this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_canceled_xu9s4e_k$())));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelImport$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelImport$slambda(this.this$0__1, this.$jobUid_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelImport$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onCancelImport$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelImport$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$jobUid_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_cancelRemoteContentEntryImportUseCase__8yb0xk(this.this$0__1).invoke_vbh80v_k$(this.$jobUid_1, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_canceled_xu9s4e_k$())));
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$())));
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this.this$0__1, this.$jobUid_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissImportError$slambda(this$0, $jobUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$jobUid_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onDismissImportError$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissImportError$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissImportError$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().contentEntryImportJobDao_bjpy9f_k$().updateErrorDismissed_hxlga2_k$(this.$jobUid_1, true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissImportError$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissImportError$slambda(this.this$0__1, this.$jobUid_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissImportError$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onDismissImportError$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissImportError$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$jobUid_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(this.this$0__1).invoke_vbh80v_k$(this.$jobUid_1, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_1 = Napier_getInstance();
              tmp_1.w$default_89dk3s_k$(VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda);
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$())));
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this.this$0__1, this.$jobUid_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda(this$0, $jobUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$jobUid_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().transferJobErrorDao_bf4uho_k$().dismissErrorByJobId_3aq6op_k$(this.$jobUid_1, true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda(this.this$0__1, this.$jobUid_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel(di, savedStateHandle) {
    Companion_getInstance_199();
    DetailViewModel.call(this, di, savedStateHandle, 'ContentEntryDetailOverviewView');
    this._uiState_1 = MutableStateFlow(new ContentEntryDetailOverviewUiState());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeContentEntryAvailableOfflineUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.makeContentEntryAvailableOfflineUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, makeContentEntryAvailableOfflineUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(CancelDownloadUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.cancelDownloadUseCase$delegate_1 = Instance(this_1, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, cancelDownloadUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.nodeIdAndAuth$delegate_1 = Instance(this_2, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, nodeIdAndAuth$factory());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(LaunchContentEntryVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.defaultLaunchContentEntryUseCase$delegate_1 = Instance(this_3, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, defaultLaunchContentEntryUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_4 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.launchXapiUseCase$delegate_1 = InstanceOrNull(this_4, tmp$ret$8, null).provideDelegate_o2qlc1_k$(this, launchXapiUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_5 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(LaunchEpubUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.launchEpubUseCase$delegate_1 = InstanceOrNull(this_5, tmp$ret$10, null).provideDelegate_o2qlc1_k$(this, launchEpubUseCase$factory());
    this.target_1 = savedStateHandle.get_6bo4tg_k$('target');
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_6 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(CancelImportContentEntryUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.cancelImportContentEntryUseCase$delegate_1 = InstanceOrNull(this_6, tmp$ret$12, null).provideDelegate_o2qlc1_k$(this, cancelImportContentEntryUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_7 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.cancelRemoteContentEntryImportUseCase$delegate_1 = Instance(this_7, tmp$ret$14, null).provideDelegate_o2qlc1_k$(this, cancelRemoteContentEntryImportUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_8 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.dismissRemoteContentEntryImportErrorUseCase$delegate_1 = Instance(this_8, tmp$ret$16, null).provideDelegate_o2qlc1_k$(this, dismissRemoteContentEntryImportErrorUseCase$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.httpClient$delegate_1 = Instance(di, tmp$ret$18, null).provideDelegate_o2qlc1_k$(this, httpClient$factory_1());
    var tmp_19 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_19.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_20 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$());
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_20.parentEntryUid_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_9 = this._uiState_1;
      while (true) {
        var prevValue = this_9.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_2d6uoi_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.get_activeUserPersonUid_1nlgnz_k$());
        if (this_9.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_21 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_21, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ContentEntryDetailOverviewViewModel).get_nodeIdAndAuth_rm3fy1_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.nodeIdAndAuth$delegate_1;
    nodeIdAndAuth$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(ContentEntryDetailOverviewViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ContentEntryDetailOverviewViewModel).onClickOffline_500nx2_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onClickOffline$slambda_0(this, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).onClickOpen_wi1pfh_k$ = function () {
    Napier_getInstance().d$default_a5agxr_k$('ContentEntryDetailOverviewViewModel: onClickOpen');
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).onCancelImport_tmpk68_k$ = function (jobUid) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onCancelImport$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).onCancelRemoteImport_mas9ty_k$ = function (jobUid) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).onDismissImportError_sewacm_k$ = function (jobUid) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissImportError$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).onDismissRemoteImportError_q1vmgk_k$ = function (jobUid) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).onDismissUploadError_di7oz0_k$ = function (jobUid) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissUploadError$slambda_0(this, jobUid, null));
  };
  function ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) {
    scoreProgress = scoreProgress === VOID ? null : scoreProgress;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? null : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? null : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? false : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? false : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? false : translationVisibile;
    availableTranslations = availableTranslations === VOID ? emptyList() : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? emptyList() : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? emptyList() : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? emptyList() : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? null : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? true : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    this.scoreProgress_1 = scoreProgress;
    this.contentEntry_1 = contentEntry;
    this.latestContentEntryVersion_1 = latestContentEntryVersion;
    this.contentEntryButtons_1 = contentEntryButtons;
    this.locallyAvailable_1 = locallyAvailable;
    this.markCompleteVisible_1 = markCompleteVisible;
    this.translationVisibile_1 = translationVisibile;
    this.availableTranslations_1 = availableTranslations;
    this.activeImportJobs_1 = activeImportJobs;
    this.remoteImportJobs_1 = remoteImportJobs;
    this.activeUploadJobs_1 = activeUploadJobs;
    this.offlineItemAndState_1 = offlineItemAndState;
    this.openButtonEnabled_1 = openButtonEnabled;
    this.activeUserPersonUid_1 = activeUserPersonUid;
  }
  protoOf(ContentEntryDetailOverviewUiState).get_scoreProgress_jmwytm_k$ = function () {
    return this.scoreProgress_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_contentEntry_hwf2de_k$ = function () {
    return this.contentEntry_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_latestContentEntryVersion_ldxm6p_k$ = function () {
    return this.latestContentEntryVersion_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_contentEntryButtons_8gjdjz_k$ = function () {
    return this.contentEntryButtons_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_locallyAvailable_e1smy_k$ = function () {
    return this.locallyAvailable_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_markCompleteVisible_4zeigz_k$ = function () {
    return this.markCompleteVisible_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_translationVisibile_sjr701_k$ = function () {
    return this.translationVisibile_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_availableTranslations_jzikv6_k$ = function () {
    return this.availableTranslations_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_activeImportJobs_19p1iu_k$ = function () {
    return this.activeImportJobs_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_remoteImportJobs_18e79m_k$ = function () {
    return this.remoteImportJobs_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_activeUploadJobs_uldc2u_k$ = function () {
    return this.activeUploadJobs_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_offlineItemAndState_pb3yh3_k$ = function () {
    return this.offlineItemAndState_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_openButtonEnabled_9t23hg_k$ = function () {
    return this.openButtonEnabled_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_activeUserPersonUid_1nlgnz_k$ = function () {
    return this.activeUserPersonUid_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_scoreProgressVisible_opdi5g_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.scoreProgress_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_progress_mo5qeu_k$()) == null)) {
      tmp = this.scoreProgress_1.get_progress_mo5qeu_k$() > 0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_authorVisible_qnu2te_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.contentEntry_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_entry_iqxd1l_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_author_b5hnkk_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).get_publisherVisible_k473vl_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.contentEntry_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_entry_iqxd1l_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_publisher_wg9par_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).get_licenseNameVisible_bgrpxt_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.contentEntry_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_entry_iqxd1l_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_licenseName_3af6yr_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).get_fileSizeVisible_j2hmp8_k$ = function () {
    return false;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_scoreResultVisible_84pys4_k$ = function () {
    return !(this.scoreProgress_1 == null);
  };
  protoOf(ContentEntryDetailOverviewUiState).get_openButtonVisible_oj50r1_k$ = function () {
    return true;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_compressedSizeVisible_y5fbuv_k$ = function () {
    var tmp0_safe_receiver = this.latestContentEntryVersion_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-compressedSizeVisible>.<anonymous>' call
      tmp = (tmp0_safe_receiver.get_cevStorageSize_j8l0wf_k$().compareTo_9jj042_k$(new Long(0, 0)) > 0 ? tmp0_safe_receiver.get_cevStorageSize_j8l0wf_k$().compareTo_9jj042_k$(new Long(0, 0)) > 0 : false) ? tmp0_safe_receiver.get_cevStorageSize_j8l0wf_k$().compareTo_9jj042_k$(tmp0_safe_receiver.get_cevOriginalSize_7fv18j_k$()) < 0 : false;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).get_sizeVisible_tj2oy0_k$ = function () {
    var tmp0_safe_receiver = this.latestContentEntryVersion_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-sizeVisible>.<anonymous>' call
      tmp = tmp0_safe_receiver.get_cevStorageSize_j8l0wf_k$().compareTo_9jj042_k$(new Long(0, 0)) > 0;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).canCancelRemoteImportJob_pybt2s_k$ = function (importJobProgress) {
    return importJobProgress.get_cjiOwnerPersonUid_7yysrl_k$().equals(this.activeUserPersonUid_1);
  };
  protoOf(ContentEntryDetailOverviewUiState).component1_7eebsc_k$ = function () {
    return this.scoreProgress_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component2_7eebsb_k$ = function () {
    return this.contentEntry_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component3_7eebsa_k$ = function () {
    return this.latestContentEntryVersion_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component4_7eebs9_k$ = function () {
    return this.contentEntryButtons_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component5_7eebs8_k$ = function () {
    return this.locallyAvailable_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component6_7eebs7_k$ = function () {
    return this.markCompleteVisible_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component7_7eebs6_k$ = function () {
    return this.translationVisibile_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component8_7eebs5_k$ = function () {
    return this.availableTranslations_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component9_7eebs4_k$ = function () {
    return this.activeImportJobs_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component10_gazzfo_k$ = function () {
    return this.remoteImportJobs_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component11_gazzfn_k$ = function () {
    return this.activeUploadJobs_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component12_gazzfm_k$ = function () {
    return this.offlineItemAndState_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component13_gazzfl_k$ = function () {
    return this.openButtonEnabled_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).component14_gazzfk_k$ = function () {
    return this.activeUserPersonUid_1;
  };
  protoOf(ContentEntryDetailOverviewUiState).copy_idr7a9_k$ = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) {
    return new ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).copy$default_2d6uoi_k$ = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, $super) {
    scoreProgress = scoreProgress === VOID ? this.scoreProgress_1 : scoreProgress;
    contentEntry = contentEntry === VOID ? this.contentEntry_1 : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? this.latestContentEntryVersion_1 : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? this.contentEntryButtons_1 : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? this.locallyAvailable_1 : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? this.markCompleteVisible_1 : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? this.translationVisibile_1 : translationVisibile;
    availableTranslations = availableTranslations === VOID ? this.availableTranslations_1 : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? this.activeImportJobs_1 : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? this.remoteImportJobs_1 : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? this.activeUploadJobs_1 : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? this.offlineItemAndState_1 : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? this.openButtonEnabled_1 : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.activeUserPersonUid_1 : activeUserPersonUid;
    return $super === VOID ? this.copy_idr7a9_k$(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) : $super.copy_idr7a9_k$.call(this, scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).toString = function () {
    return 'ContentEntryDetailOverviewUiState(scoreProgress=' + this.scoreProgress_1 + ', contentEntry=' + this.contentEntry_1 + ', latestContentEntryVersion=' + this.latestContentEntryVersion_1 + ', contentEntryButtons=' + this.contentEntryButtons_1 + ', locallyAvailable=' + this.locallyAvailable_1 + ', markCompleteVisible=' + this.markCompleteVisible_1 + ', translationVisibile=' + this.translationVisibile_1 + ', availableTranslations=' + this.availableTranslations_1 + ', activeImportJobs=' + this.activeImportJobs_1 + ', remoteImportJobs=' + this.remoteImportJobs_1 + ', activeUploadJobs=' + this.activeUploadJobs_1 + ', offlineItemAndState=' + this.offlineItemAndState_1 + ', openButtonEnabled=' + this.openButtonEnabled_1 + ', activeUserPersonUid=' + this.activeUserPersonUid_1.toString() + ')';
  };
  protoOf(ContentEntryDetailOverviewUiState).hashCode = function () {
    var result = this.scoreProgress_1 == null ? 0 : this.scoreProgress_1.hashCode();
    result = imul(result, 31) + (this.contentEntry_1 == null ? 0 : this.contentEntry_1.hashCode()) | 0;
    result = imul(result, 31) + (this.latestContentEntryVersion_1 == null ? 0 : this.latestContentEntryVersion_1.hashCode()) | 0;
    result = imul(result, 31) + (this.contentEntryButtons_1 == null ? 0 : hashCode(this.contentEntryButtons_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.locallyAvailable_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.markCompleteVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.translationVisibile_1) | 0;
    result = imul(result, 31) + hashCode(this.availableTranslations_1) | 0;
    result = imul(result, 31) + hashCode(this.activeImportJobs_1) | 0;
    result = imul(result, 31) + hashCode(this.remoteImportJobs_1) | 0;
    result = imul(result, 31) + hashCode(this.activeUploadJobs_1) | 0;
    result = imul(result, 31) + (this.offlineItemAndState_1 == null ? 0 : this.offlineItemAndState_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.openButtonEnabled_1) | 0;
    result = imul(result, 31) + this.activeUserPersonUid_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.scoreProgress_1, tmp0_other_with_cast.scoreProgress_1))
      return false;
    if (!equals(this.contentEntry_1, tmp0_other_with_cast.contentEntry_1))
      return false;
    if (!equals(this.latestContentEntryVersion_1, tmp0_other_with_cast.latestContentEntryVersion_1))
      return false;
    if (!equals(this.contentEntryButtons_1, tmp0_other_with_cast.contentEntryButtons_1))
      return false;
    if (!(this.locallyAvailable_1 === tmp0_other_with_cast.locallyAvailable_1))
      return false;
    if (!(this.markCompleteVisible_1 === tmp0_other_with_cast.markCompleteVisible_1))
      return false;
    if (!(this.translationVisibile_1 === tmp0_other_with_cast.translationVisibile_1))
      return false;
    if (!equals(this.availableTranslations_1, tmp0_other_with_cast.availableTranslations_1))
      return false;
    if (!equals(this.activeImportJobs_1, tmp0_other_with_cast.activeImportJobs_1))
      return false;
    if (!equals(this.remoteImportJobs_1, tmp0_other_with_cast.remoteImportJobs_1))
      return false;
    if (!equals(this.activeUploadJobs_1, tmp0_other_with_cast.activeUploadJobs_1))
      return false;
    if (!equals(this.offlineItemAndState_1, tmp0_other_with_cast.offlineItemAndState_1))
      return false;
    if (!(this.openButtonEnabled_1 === tmp0_other_with_cast.openButtonEnabled_1))
      return false;
    if (!this.activeUserPersonUid_1.equals(tmp0_other_with_cast.activeUserPersonUid_1))
      return false;
    return true;
  };
  function makeContentEntryAvailableOfflineUseCase$factory() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.get_nodeIdAndAuth_rm3fy1_k$();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_1() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function makeContentEntryAvailableOfflineUseCase$factory_0() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory_0() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory_0() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.get_nodeIdAndAuth_rm3fy1_k$();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory_0() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory_0() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory_0() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory_0() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_2() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function _get_KEY_TITLE__w48tev($this) {
    return $this.KEY_TITLE_1;
  }
  function ContentEntryEditViewModel$slambda$slambda$lambda($newContentEntryUid, this$0, $savedStateHandle) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_contentEntryUid_82c9uk_k$($newContentEntryUid);
      var tmp;
      if (this$0.goingToCourseBlockEdit_1) {
        $this$shallowCopy.set_contentOwnerType_rj9ic7_k$(Companion_getInstance_52().get_OWNER_TYPE_COURSE_9nvo9h_k$());
        var tmp0_safe_receiver = $savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        $this$shallowCopy.set_contentOwner_87csqv_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
        tmp = Unit_getInstance();
      } else {
        $this$shallowCopy.set_contentOwnerType_rj9ic7_k$(Companion_getInstance_52().get_OWNER_TYPE_LIBRARY_sj7et1_k$());
        $this$shallowCopy.set_contentOwner_87csqv_k$(this$0.get_activeUserPersonUid_1nlgnz_k$());
        tmp = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda($newDecription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_description_s1386w_k$($newDecription);
      return Unit_getInstance();
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).invoke_loxtj4_k$ = function (it, $completion) {
    var tmp = this.create_h5keyk_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.it_1.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDecription = tmp_1;
          var tmp1_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_entry_iqxd1l_k$();
          var tmp_2;
          if (tmp2_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_8(tmp2_safe_receiver, ContentEntryEditViewModel$slambda$slambda$slambda$lambda(newDecription));
          }
          this.this$0__1.onContentEntryChanged_5bsipz_k$(tmp_2);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).create_h5keyk_k$ = function (it, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_loxtj4_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack) {
    return function (it) {
      return it.get_uri_18iuil_k$() === $newSubtitleTrack.get_uri_18iuil_k$();
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0($newSubtitleTrack) {
    return function (prev) {
      return replaceOrAppend(prev, $newSubtitleTrack, ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack));
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).invoke_loxtj4_k$ = function (navResult, $completion) {
    var tmp = this.create_h5keyk_k$(navResult, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.navResult_1.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = tmp_0 instanceof SubtitleTrack ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubtitleTrack = tmp_1;
          updateSubtitles(this.this$0__1, ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0(newSubtitleTrack));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).create_h5keyk_k$ = function (navResult, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.navResult_1 = navResult;
    return i;
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (navResult, $completion) {
      return i.invoke_loxtj4_k$(navResult, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda).invoke_ygzq4r_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_ygzq4r_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.db_1;
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.tmp1_safe_receiver0__1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.contentEntryDao_5ggc49_k$();
            if (this.tmp1_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp1_safe_receiver0__1.findByUidWithEditDetails_rcs30q_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var tmp2_safe_receiver = this.WHEN_RESULT1__1;
            var tmp_2;
            if (tmp2_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var tmp_3;
              if (!(tmp2_safe_receiver.get_entry_iqxd1l_k$() == null)) {
                var tmp_4 = tmp2_safe_receiver.get_entry_iqxd1l_k$();
                var tmp0_elvis_lhs = tmp2_safe_receiver.get_picture_8af27f_k$();
                tmp_3 = new ContentEntryAndContentJob(tmp_4, VOID, VOID, tmp0_elvis_lhs == null ? new ContentEntryPicture2(this.this$0__1.get_entityUidArg_hgo6pe_k$()) : tmp0_elvis_lhs);
              } else {
                tmp_3 = null;
              }
              tmp_2 = tmp_3;
            }

            return tmp_2;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_ygzq4r_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).invoke_ie4d5k_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_ie4d5k_k$($completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.newContentEntryUid0__1 = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextId_8yjjmy_k$(Companion_getInstance_52().get_TABLE_ID_xo2mej_k$());
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, 'metadata', Companion_getInstance_96().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var importedMetaData = suspendResult;
            var tmp_0;
            if (!(importedMetaData == null)) {
              var tmp0_safe_receiver = importedMetaData.get_picture_8af27f_k$();
              var pictureUri = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cepPictureUri_z88ker_k$();
              if (!(pictureUri == null)) {
                this.$savedStateHandle_1.set_wua6pr_k$(Companion_getInstance_158().get_INIT_PIC_URI_ye3my7_k$(), '');
              }
              var tmp_1 = importedMetaData.get_entry_iqxd1l_k$();
              var tmp_2 = shallowCopy_8(tmp_1, ContentEntryEditViewModel$slambda$slambda$lambda(this.newContentEntryUid0__1, this.this$0__1, this.$savedStateHandle_1));
              var tmp1_cjiPluginId = importedMetaData.get_importerId_ezdm52_k$();
              var tmp2_sourceUri = importedMetaData.get_entry_iqxd1l_k$().get_sourceUrl_jko7yt_k$();
              var tmp3_cjiOriginalFilename = importedMetaData.get_originalFilename_a9k85b_k$();
              var tmp4_cjiOwnerPersonUid = this.this$0__1.get_activeUserPersonUid_1nlgnz_k$();
              var tmp_3 = new ContentEntryImportJob(VOID, tmp2_sourceUri, tmp3_cjiOriginalFilename, this.newContentEntryUid0__1, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_cjiPluginId, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_cjiOwnerPersonUid);
              var tmp5_safe_receiver = importedMetaData.get_picture_8af27f_k$();
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.copy$default_mj71ff_k$(this.newContentEntryUid0__1);
              var this_0 = new ContentEntryAndContentJob(tmp_2, VOID, tmp_3, tmp6_elvis_lhs == null ? new ContentEntryPicture2(this.newContentEntryUid0__1) : tmp6_elvis_lhs);
              var tmp_4 = this.this$0__1.get_systemImpl_9jowp4_k$();
              var tmp_5 = strings_getInstance().get_importing_52djzo_k$();
              var tmp0_elvis_lhs = importedMetaData.get_originalFilename_a9k85b_k$();
              var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? importedMetaData.get_entry_iqxd1l_k$().get_sourceUrl_jko7yt_k$() : tmp0_elvis_lhs;
              this.$savedStateHandle_1.set_wua6pr_k$('savedTitle', tmp_4.formatString_qr9zmw_k$(tmp_5, [tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs]));
              tmp_0 = this_0;
            } else {
              var this_1 = new ContentEntry();
              this_1.set_contentEntryUid_82c9uk_k$(this.newContentEntryUid0__1);
              var tmp0_safe_receiver_0 = this.$savedStateHandle_1.get_6bo4tg_k$('leaf');
              this_1.set_leaf_nt94be_k$((tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0)) === true);
              this_1.set_contentOwner_87csqv_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
              tmp_0 = new ContentEntryAndContentJob(this_1, VOID, VOID, new ContentEntryPicture2(this.newContentEntryUid0__1));
            }

            return tmp_0;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ContentEntryEditViewModel$slambda$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
  };
  function ContentEntryEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.invoke_ie4d5k_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp1_safe_receiver = it == null ? null : it.get_contentJobItem_fg7ikg_k$();
          var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramSubtitles(tmp1_safe_receiver, this$0.get_json_woos35_k$());
          var nextValue = prevValue.copy$default_be81ng_k$(it, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ContentEntryEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_navResultReturner_jwjn90_k$(), 'contentEntryDesc');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_navResultReturner_jwjn90_k$(), 'subtitleKey');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_saveContentEntryUseCase__d3hrv4_0($this) {
    return $this.saveContentEntryUseCase_1;
  }
  function _get_enqueueContentEntryImportUseCase__5rf206($this) {
    return $this.enqueueContentEntryImportUseCase_1;
  }
  function _get__uiState__8e9jsd_21($this) {
    return $this._uiState_1;
  }
  function _get_goToOnContentEntryDone__afnpoy($this) {
    return $this.goToOnContentEntryDone_1;
  }
  function _get_goingToCourseBlockEdit__5kss64($this) {
    return $this.goingToCourseBlockEdit_1;
  }
  function updateSubtitles($this, function_0) {
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>' call
        var updatedSubtitles = function_0(prevValue.subtitles_1);
        var tmp0_safe_receiver = prevValue.entity_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_contentJobItem_fg7ikg_k$();
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramMap(tmp1_safe_receiver, $this.get_json_woos35_k$());
        var prevContentJobParamMap = tmp2_elvis_lhs == null ? emptyMap() : tmp2_elvis_lhs;
        // Inline function 'kotlin.also' call
        var this_1 = toMutableMap(prevContentJobParamMap);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>.<anonymous>' call
        // Inline function 'kotlin.collections.set' call
        var key = Companion_getInstance_33().get_PARAM_KEY_SUBTITLES_95z14w_k$();
        var value = $this.get_json_woos35_k$().encodeToString_k0apqx_k$(ListSerializer(Companion_getInstance_95().serializer_9w0wvi_k$()), updatedSubtitles);
        this_1.put_4fpzoq_k$(key, value);
        var contentJobParam = this_1;
        var tmp4_safe_receiver = prevValue.entity_1;
        var tmp;
        if (tmp4_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp3_safe_receiver = prevValue.entity_1.get_contentJobItem_fg7ikg_k$();
          tmp = tmp4_safe_receiver.copy$default_uhdblk_k$(VOID, VOID, tmp3_safe_receiver == null ? null : tmp3_safe_receiver.copy$default_kp0j0x_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.get_json_woos35_k$().encodeToString_k0apqx_k$(MapSerializer(serializer_0(StringCompanionObject_getInstance()), serializer_0(StringCompanionObject_getInstance())), contentJobParam)));
        }
        var tmp5_entity = tmp;
        var nextValue = prevValue.copy$default_be81ng_k$(tmp5_entity, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, updatedSubtitles);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$2 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$2;
    scheduleEntityCommit($this, updatedState.entity_1);
  }
  function scheduleEntityCommit($this, entity) {
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_53().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver = $this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = $this.get_viewModelScope_ryv1dz_k$();
    $this.set_saveStateJob_g1ttuu_k$(launch(tmp, VOID, VOID, ContentEntryEditViewModel$scheduleEntityCommit$slambda_0(commitDelay, entity, $this, key, serializer, null)));
  }
  function hasErrors_2(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.titleError_1 == null);
  }
  function Companion_139() {
    Companion_instance_139 = this;
    this.ARG_LEAF_1 = 'leaf';
    this.ARG_COURSEBLOCK_1 = 'courseBlock';
    this.DEST_NAME_1 = 'ContentEntryEdit';
    this.ARG_IMPORTED_METADATA_1 = 'metadata';
    this.KEY_TITLE_1 = 'savedTitle';
    this.ARG_GO_TO_ON_CONTENT_ENTRY_DONE_1 = 'goToOnContentEntryDone';
    this.KEY_HTML_DESCRIPTION_1 = 'contentEntryDesc';
    this.KEY_RESULT_SUBTITLE_1 = 'subtitleKey';
    this.GO_TO_COURSE_BLOCK_EDIT_1 = 1;
    this.FINISH_WITHOUT_SAVE_TO_DB_1 = 2;
  }
  protoOf(Companion_139).get_ARG_LEAF_q15lsg_k$ = function () {
    return this.ARG_LEAF_1;
  };
  protoOf(Companion_139).get_ARG_COURSEBLOCK_ewwwqo_k$ = function () {
    return this.ARG_COURSEBLOCK_1;
  };
  protoOf(Companion_139).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_139).get_ARG_IMPORTED_METADATA_e73aqg_k$ = function () {
    return this.ARG_IMPORTED_METADATA_1;
  };
  protoOf(Companion_139).get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$ = function () {
    return this.ARG_GO_TO_ON_CONTENT_ENTRY_DONE_1;
  };
  protoOf(Companion_139).get_KEY_HTML_DESCRIPTION_ylwexd_k$ = function () {
    return this.KEY_HTML_DESCRIPTION_1;
  };
  protoOf(Companion_139).get_KEY_RESULT_SUBTITLE_ehx21d_k$ = function () {
    return this.KEY_RESULT_SUBTITLE_1;
  };
  protoOf(Companion_139).get_GO_TO_COURSE_BLOCK_EDIT_q6h1u2_k$ = function () {
    return this.GO_TO_COURSE_BLOCK_EDIT_1;
  };
  protoOf(Companion_139).get_FINISH_WITHOUT_SAVE_TO_DB_gk7p4q_k$ = function () {
    return this.FINISH_WITHOUT_SAVE_TO_DB_1;
  };
  var Companion_instance_139;
  function Companion_getInstance_200() {
    if (Companion_instance_139 == null)
      new Companion_139();
    return Companion_instance_139;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_24(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_24).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ContentEntryEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda).invoke_pclm39_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (this.this$0__1.goingToCourseBlockEdit_1) {
              this.WHEN_RESULT0__1 = true;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.db_1.systemPermissionDao_fl20r8_k$().personHasSystemPermission_tdum2r_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_EDIT_LIBRARY_CONTENT_bhq3m1_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT0__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ContentEntryEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pclm39_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_53().serializer_9w0wvi_k$();
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = ContentEntryEditViewModel$slambda$slambda_2(this.this$0__1, this.$savedStateHandle_1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, ContentEntryEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            var tmp_3 = Companion_getInstance_158().get_INIT_PIC_URI_ye3my7_k$();
            var tmp1_safe_receiver = it == null ? null : it.get_picture_8af27f_k$();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cepPictureUri_z88ker_k$();
            setIfNoValueSetYet(this.$savedStateHandle_1, tmp_3, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            var tmp0_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
            var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_entry_iqxd1l_k$();
            var isLeaf = (tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.get_leaf_woprc7_k$()) === true;
            var savedStateTitle = this.$savedStateHandle_1.get_6bo4tg_k$('savedTitle');
            var title = !(savedStateTitle == null) ? savedStateTitle : (this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0)) ? !isLeaf : false) ? this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_content_editor_create_new_category_4kvsf7_k$()) : (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0)) ? !isLeaf : false) ? this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_folder_tpu2w6_k$()) : this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_content_t6v899_k$());
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_4 = this.this$0__1.get_systemImpl_9jowp4_k$();
                var tmp0_subject = this.this$0__1.goToOnContentEntryDone_1;
                var tmp_5 = tmp_4.getString_a9yhoi_k$(tmp0_subject === 1 ? strings_getInstance().get_next_wor1vg_k$() : tmp0_subject === 2 ? strings_getInstance().get_done_wokv63_k$() : strings_getInstance().get_save_wou5s6_k$());
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, ContentEntryEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_be81ng_k$(VOID, VOID, VOID, VOID, true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_4(this.this$0__1, null));
            launch(this.$this$launchIfHasPermission_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_6(this.this$0__1, null));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new ContentEntryEditViewModel$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(ContentEntryEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda($subtitleTrack) {
    return function (prev) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = prev.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickDeleteSubtitleTrack.<anonymous>.<anonymous>' call
        if (!(element.get_uri_18iuil_k$() === $subtitleTrack.get_uri_18iuil_k$())) {
          destination.add_utx5q5_k$(element);
        }
      }
      return destination;
    };
  }
  function ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    this.this$0__1 = this$0;
    this.$contentEntryVal_1 = $contentEntryVal;
    this.$entityVal_1 = $entityVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp0_safe_receiver = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$());
            tmp_0.parentUidArg0__1 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.saveContentEntryUseCase_1.invoke_mh83ng_k$(this.$contentEntryVal_1, this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0)) ? this.parentUidArg0__1 : null, this.$entityVal_1.get_picture_8af27f_k$(), this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_158().get_INIT_PIC_URI_ye3my7_k$()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.contentJobItemVal1__1 = this.$entityVal_1.get_contentJobItem_fg7ikg_k$();
            if (!(this.contentJobItemVal1__1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.enqueueContentEntryImportUseCase_1.invoke_bt37y5_k$(this.contentJobItemVal1__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            var popUpToOnFinish = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$());
            if (!(this.this$0__1.get_expectedResultDest_cc1yyo_k$() == null)) {
              this.this$0__1.finishWithResult_jlqwtj_k$(this.$contentEntryVal_1);
            } else {
              var tmp_1 = this.this$0__1.get_navController_qibdoq_k$();
              tmp_1.popBackStack_rnnumt_k$(popUpToOnFinish == null ? this.this$0__1.get_destinationName_akz2s0_k$() : popUpToOnFinish, true);
            }

            if (hasErrors_2(this.this$0__1._uiState_1.get_value_j01efc_k$(), this.this$0__1)) {
              this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
              l$ret$1: do {
                var this_0 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_0.get_value_j01efc_k$();
                  var nextValue = prevValue.copy$default_be81ng_k$(VOID, VOID, VOID, VOID, true);
                  if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              return Unit_getInstance();
            }

            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this.this$0__1, this.$contentEntryVal_1, this.$entityVal_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryEditViewModel$onClickSave$slambda_0(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel(di, savedStateHandle, saveContentEntryUseCase, enqueueContentEntryImportUseCase) {
    Companion_getInstance_200();
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, null);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_2;
    if (enqueueContentEntryImportUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      tmp_2 = tmp_3.Instance_vwdrk9_k$(tmp$ret$0_0, null);
    } else {
      tmp_2 = enqueueContentEntryImportUseCase;
    }
    enqueueContentEntryImportUseCase = tmp_2;
    UstadEditViewModel.call(this, di, savedStateHandle, 'ContentEntryEdit');
    this.saveContentEntryUseCase_1 = saveContentEntryUseCase;
    this.enqueueContentEntryImportUseCase_1 = enqueueContentEntryImportUseCase;
    this._uiState_1 = MutableStateFlow(new ContentEntryEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_5 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$('goToOnContentEntryDone');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp_5.goToOnContentEntryDone_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    this.goingToCourseBlockEdit_1 = this.goToOnContentEntryDone_1 === 1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, true);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_6 = ContentEntryEditViewModel$slambda_0(this, null);
    this.launchIfHasPermission$default_l9omam_k$(tmp_6, VOID, VOID, ContentEntryEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ContentEntryEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ContentEntryEditViewModel).onContentEntryChanged_5bsipz_k$ = function (contentEntry) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onContentEntryChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.entity_1;
        var nextValue = prevValue.copy$default_be81ng_k$(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_uhdblk_k$(contentEntry));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.entity_1);
  };
  protoOf(ContentEntryEditViewModel).onPictureChanged_tcb4ji_k$ = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.entity_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.entity_1.get_picture_8af27f_k$();
          tmp = tmp1_safe_receiver.copy$default_uhdblk_k$(VOID, VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_mj71ff_k$(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.copy$default_be81ng_k$(tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.entity_1);
  };
  protoOf(ContentEntryEditViewModel).onEditDescriptionInNewWindow_mlm8aw_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().entity_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_entry_iqxd1l_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_description_emjre5_k$();
    this.navigateToEditHtml$default_imw6oe_k$(tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, 'contentEntryDesc', this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_description_emjre5_k$()));
  };
  protoOf(ContentEntryEditViewModel).onSetCompressionLevel_5fojun_k$ = function (compressionLevel) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSetCompressionLevel.<anonymous>' call
        var tmp1_safe_receiver = prevValue.entity_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.entity_1.get_contentJobItem_fg7ikg_k$();
          tmp = tmp1_safe_receiver.copy$default_uhdblk_k$(VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_kp0j0x_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, compressionLevel.get_value_j01efc_k$()));
        }
        var nextValue = prevValue.copy$default_be81ng_k$(tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryEditViewModel).onSubtitleFileAdded_96yqpp_k$ = function (uri, fileName) {
    var tmp = Companion_getInstance_202().get_DEST_NAME_gmgk7z_k$();
    var tmp_0 = Companion_getInstance_95().serializer_9w0wvi_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSubtitleFileAdded.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    var key = Companion_getInstance_207().get_ARG_URI_u8i56_k$();
    this_0.put_4fpzoq_k$(key, uri);
    // Inline function 'kotlin.collections.set' call
    var key_0 = Companion_getInstance_207().get_ARG_FILENAME_z23ayh_k$();
    this_0.put_4fpzoq_k$(key_0, fileName);
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    this.navigateForResult$default_qg960j_k$(tmp, 'subtitleKey', null, tmp_0, tmp$ret$2);
  };
  protoOf(ContentEntryEditViewModel).onClickEditSubtitleTrack_kr9dy0_k$ = function (subtitleTrack) {
    this.navigateForResult$default_qg960j_k$(Companion_getInstance_207().get_DEST_NAME_gmgk7z_k$(), 'subtitleKey', subtitleTrack, Companion_getInstance_95().serializer_9w0wvi_k$());
  };
  protoOf(ContentEntryEditViewModel).onClickDeleteSubtitleTrack_qv6kcp_k$ = function (subtitleTrack) {
    updateSubtitles(this, ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda(subtitleTrack));
  };
  protoOf(ContentEntryEditViewModel).onClickSave_ncak3a_k$ = function () {
    var entityVal = this._uiState_1.get_value_j01efc_k$().entity_1;
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().entity_1;
    var contentEntry = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_entry_iqxd1l_k$();
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var tmp;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_1 = contentEntry == null ? null : contentEntry.get_title_iz32un_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : isBlank(this_1)) {
          tmp = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_required_wq3z3c_k$());
        } else {
          tmp = null;
        }
        var nextValue = prevValue.copy$default_be81ng_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_2(this._uiState_1.get_value_j01efc_k$(), this)) {
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_2.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_be81ng_k$(VOID, VOID, VOID, VOID, true);
          if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_getInstance();
    }
    var tmp2_elvis_lhs = entityVal == null ? null : entityVal.get_entry_iqxd1l_k$();
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var contentEntryVal = tmp_0;
    if (!this._uiState_1.get_value_j01efc_k$().fieldsEnabled_1) {
      return Unit_getInstance();
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this._uiState_1;
      while (true) {
        var prevValue_1 = this_3.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var nextValue_1 = prevValue_1.copy$default_be81ng_k$(VOID, VOID, VOID, VOID, false);
        if (this_3.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (this.goToOnContentEntryDone_1 === 1) {
      var tmp_1 = this.get_navController_qibdoq_k$();
      var tmp_2 = Companion_getInstance_209().get_DEST_NAME_gmgk7z_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_4 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      var key = Companion_getInstance_209().get_ARG_SELECTED_CONTENT_ENTRY_i9aghy_k$();
      var value = this.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_53().serializer_9w0wvi_k$(), entityVal);
      this_4.put_4fpzoq_k$(key, value);
      this.putAllFromSavedStateIfPresent_yspo74_k$(this_4, Companion_getInstance_209().get_COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_68n2cb_k$());
      var tmp$ret$9 = this_4.build_1k0s4u_k$();
      tmp_1.navigate$default_srzzsc_k$(tmp_2, tmp$ret$9);
    } else if (this.goToOnContentEntryDone_1 === 2) {
      this.finishWithResult_jlqwtj_k$(entityVal);
    } else {
      var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
      launch(tmp_3, VOID, VOID, ContentEntryEditViewModel$onClickSave$slambda_0(this, contentEntryVal, entityVal, null));
    }
  };
  function ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    entity = entity === VOID ? null : entity;
    licenceOptions = licenceOptions === VOID ? emptyList() : licenceOptions;
    storageOptions = storageOptions === VOID ? emptyList() : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState() : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? false : updateContentVisible;
    importError = importError === VOID ? null : importError;
    titleError = titleError === VOID ? null : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? null : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? null : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? false : compressionEnabled;
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.entity_1 = entity;
    this.licenceOptions_1 = licenceOptions;
    this.storageOptions_1 = storageOptions;
    this.courseBlockEditUiState_1 = courseBlockEditUiState;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.updateContentVisible_1 = updateContentVisible;
    this.importError_1 = importError;
    this.titleError_1 = titleError;
    this.selectedContainerStorageDir_1 = selectedContainerStorageDir;
    this.metadataResult_1 = metadataResult;
    this.compressionEnabled_1 = compressionEnabled;
    this.subtitles_1 = subtitles;
  }
  protoOf(ContentEntryEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.entity_1;
  };
  protoOf(ContentEntryEditUiState).get_licenceOptions_m6cp9m_k$ = function () {
    return this.licenceOptions_1;
  };
  protoOf(ContentEntryEditUiState).get_storageOptions_3vch1w_k$ = function () {
    return this.storageOptions_1;
  };
  protoOf(ContentEntryEditUiState).get_courseBlockEditUiState_aichau_k$ = function () {
    return this.courseBlockEditUiState_1;
  };
  protoOf(ContentEntryEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ContentEntryEditUiState).get_updateContentVisible_7l4s2z_k$ = function () {
    return this.updateContentVisible_1;
  };
  protoOf(ContentEntryEditUiState).get_importError_x8mvpi_k$ = function () {
    return this.importError_1;
  };
  protoOf(ContentEntryEditUiState).get_titleError_l4pwyh_k$ = function () {
    return this.titleError_1;
  };
  protoOf(ContentEntryEditUiState).get_selectedContainerStorageDir_qg9cpd_k$ = function () {
    return this.selectedContainerStorageDir_1;
  };
  protoOf(ContentEntryEditUiState).get_metadataResult_4yuhu3_k$ = function () {
    return this.metadataResult_1;
  };
  protoOf(ContentEntryEditUiState).get_compressionEnabled_8ojhx8_k$ = function () {
    return this.compressionEnabled_1;
  };
  protoOf(ContentEntryEditUiState).get_subtitles_hlfe0i_k$ = function () {
    return this.subtitles_1;
  };
  protoOf(ContentEntryEditUiState).get_canModifySubtitles_w2v6w6_k$ = function () {
    var tmp0_safe_receiver = this.entity_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_contentJobItem_fg7ikg_k$();
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cjiPluginId_mr5gsn_k$()) === Companion_getInstance_65().get_VIDEO_IMPORTER_PLUGIN_ID_4v1es9_k$();
  };
  protoOf(ContentEntryEditUiState).component1_7eebsc_k$ = function () {
    return this.entity_1;
  };
  protoOf(ContentEntryEditUiState).component2_7eebsb_k$ = function () {
    return this.licenceOptions_1;
  };
  protoOf(ContentEntryEditUiState).component3_7eebsa_k$ = function () {
    return this.storageOptions_1;
  };
  protoOf(ContentEntryEditUiState).component4_7eebs9_k$ = function () {
    return this.courseBlockEditUiState_1;
  };
  protoOf(ContentEntryEditUiState).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ContentEntryEditUiState).component6_7eebs7_k$ = function () {
    return this.updateContentVisible_1;
  };
  protoOf(ContentEntryEditUiState).component7_7eebs6_k$ = function () {
    return this.importError_1;
  };
  protoOf(ContentEntryEditUiState).component8_7eebs5_k$ = function () {
    return this.titleError_1;
  };
  protoOf(ContentEntryEditUiState).component9_7eebs4_k$ = function () {
    return this.selectedContainerStorageDir_1;
  };
  protoOf(ContentEntryEditUiState).component10_gazzfo_k$ = function () {
    return this.metadataResult_1;
  };
  protoOf(ContentEntryEditUiState).component11_gazzfn_k$ = function () {
    return this.compressionEnabled_1;
  };
  protoOf(ContentEntryEditUiState).component12_gazzfm_k$ = function () {
    return this.subtitles_1;
  };
  protoOf(ContentEntryEditUiState).copy_uh6hko_k$ = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    return new ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).copy$default_be81ng_k$ = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles, $super) {
    entity = entity === VOID ? this.entity_1 : entity;
    licenceOptions = licenceOptions === VOID ? this.licenceOptions_1 : licenceOptions;
    storageOptions = storageOptions === VOID ? this.storageOptions_1 : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.courseBlockEditUiState_1 : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? this.updateContentVisible_1 : updateContentVisible;
    importError = importError === VOID ? this.importError_1 : importError;
    titleError = titleError === VOID ? this.titleError_1 : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? this.selectedContainerStorageDir_1 : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? this.metadataResult_1 : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? this.compressionEnabled_1 : compressionEnabled;
    subtitles = subtitles === VOID ? this.subtitles_1 : subtitles;
    return $super === VOID ? this.copy_uh6hko_k$(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) : $super.copy_uh6hko_k$.call(this, entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).toString = function () {
    return 'ContentEntryEditUiState(entity=' + this.entity_1 + ', licenceOptions=' + this.licenceOptions_1 + ', storageOptions=' + this.storageOptions_1 + ', courseBlockEditUiState=' + this.courseBlockEditUiState_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', updateContentVisible=' + this.updateContentVisible_1 + ', importError=' + this.importError_1 + ', titleError=' + this.titleError_1 + ', selectedContainerStorageDir=' + this.selectedContainerStorageDir_1 + ', metadataResult=' + this.metadataResult_1 + ', compressionEnabled=' + this.compressionEnabled_1 + ', subtitles=' + this.subtitles_1 + ')';
  };
  protoOf(ContentEntryEditUiState).hashCode = function () {
    var result = this.entity_1 == null ? 0 : this.entity_1.hashCode();
    result = imul(result, 31) + hashCode(this.licenceOptions_1) | 0;
    result = imul(result, 31) + hashCode(this.storageOptions_1) | 0;
    result = imul(result, 31) + this.courseBlockEditUiState_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.updateContentVisible_1) | 0;
    result = imul(result, 31) + (this.importError_1 == null ? 0 : getStringHashCode(this.importError_1)) | 0;
    result = imul(result, 31) + (this.titleError_1 == null ? 0 : getStringHashCode(this.titleError_1)) | 0;
    result = imul(result, 31) + (this.selectedContainerStorageDir_1 == null ? 0 : hashCode(this.selectedContainerStorageDir_1)) | 0;
    result = imul(result, 31) + (this.metadataResult_1 == null ? 0 : this.metadataResult_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.compressionEnabled_1) | 0;
    result = imul(result, 31) + hashCode(this.subtitles_1) | 0;
    return result;
  };
  protoOf(ContentEntryEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryEditUiState ? other : THROW_CCE();
    if (!equals(this.entity_1, tmp0_other_with_cast.entity_1))
      return false;
    if (!equals(this.licenceOptions_1, tmp0_other_with_cast.licenceOptions_1))
      return false;
    if (!equals(this.storageOptions_1, tmp0_other_with_cast.storageOptions_1))
      return false;
    if (!this.courseBlockEditUiState_1.equals(tmp0_other_with_cast.courseBlockEditUiState_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.updateContentVisible_1 === tmp0_other_with_cast.updateContentVisible_1))
      return false;
    if (!(this.importError_1 == tmp0_other_with_cast.importError_1))
      return false;
    if (!(this.titleError_1 == tmp0_other_with_cast.titleError_1))
      return false;
    if (!equals(this.selectedContainerStorageDir_1, tmp0_other_with_cast.selectedContainerStorageDir_1))
      return false;
    if (!equals(this.metadataResult_1, tmp0_other_with_cast.metadataResult_1))
      return false;
    if (!(this.compressionEnabled_1 === tmp0_other_with_cast.compressionEnabled_1))
      return false;
    if (!equals(this.subtitles_1, tmp0_other_with_cast.subtitles_1))
      return false;
    return true;
  };
  function ContentEntryGetMetadataViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.getmetadata.ContentEntryGetMetadataViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy_fozejc_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get_contentEntryGetMetaDataFromUriUseCase__i2tj1s($this) {
    return $this.contentEntryGetMetaDataFromUriUseCase_1;
  }
  function _get__uiState__8e9jsd_22($this) {
    return $this._uiState_1;
  }
  function Companion_140() {
    Companion_instance_140 = this;
    this.ARG_URI_1 = 'uri';
    this.ARG_FILENAME_1 = 'filename';
    this.DEST_NAME_1 = 'ContentEntryGetMetadata';
  }
  protoOf(Companion_140).get_ARG_URI_u8i56_k$ = function () {
    return this.ARG_URI_1;
  };
  protoOf(Companion_140).get_ARG_FILENAME_z23ayh_k$ = function () {
    return this.ARG_FILENAME_1;
  };
  protoOf(Companion_140).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_140;
  function Companion_getInstance_201() {
    if (Companion_instance_140 == null)
      new Companion_140();
    return Companion_instance_140;
  }
  function ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation) {
    this.this$0__1 = this$0;
    this.$uriArg_1 = $uriArg;
    this.$fileName_1 = $fileName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryGetMetadataViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.tmp0_$this0__1 = this.this$0__1.contentEntryGetMetaDataFromUriUseCase_1;
            this.tmp1_contentUri1__1 = Companion_getInstance_25().parse_pc1q8p_k$(this.$uriArg_1);
            this.tmp2_learningSpace2__1 = this.this$0__1.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.tmp0_$this0__1.invoke_tjbp9q_k$(this.tmp1_contentUri1__1, this.$fileName_1, this.tmp2_learningSpace2__1, ContentEntryGetMetadataViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var metadataResult = suspendResult;
            var tmp_0 = this.this$0__1.get_navController_qibdoq_k$();
            var tmp_1 = Companion_getInstance_200().get_DEST_NAME_gmgk7z_k$();
            var this_0 = LinkedHashMap_init_$Create$_0();
            this_0.put_4fpzoq_k$(Companion_getInstance_200().get_ARG_IMPORTED_METADATA_e73aqg_k$(), this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_96().serializer_9w0wvi_k$(), metadataResult));
            this.this$0__1.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_209().get_COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_68n2cb_k$());
            this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$());
            this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$());
            this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$());
            tmp_0.navigate_6urlkw_k$(tmp_1, this_0.build_1k0s4u_k$(), new UstadGoOptions('ContentEntryGetMetadata', true));
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_2 = this.get_exception_x0n6w6_k$();
            if (tmp_2 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_3;
              if (e instanceof InvalidContentException) {
                tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_file_d97i8d_k$()) + ' : ' + e.message;
              } else {
                if (e instanceof UnsupportedContentException) {
                  var tmp_4 = this.this$0__1.get_systemImpl_9jowp4_k$();
                  var tmp_5 = strings_getInstance().get_unsupported_file_type_e13bfa_k$();
                  var tmp3_elvis_lhs = e.message;
                  tmp_3 = tmp_4.formatString_qr9zmw_k$(tmp_5, [tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs]);
                } else {
                  tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) + ' : other: ' + e.message;
                }
              }
              var errorMessage = tmp_3;
              l$ret$1: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_1.get_value_j01efc_k$();
                  var nextValue = prevValue.copy_fozejc_k$(prevValue.status_1.copy$default_3bs9ie_k$(VOID, errorMessage));
                  if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this.this$0__1, this.$uriArg_1, this.$fileName_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryGetMetadataViewModel$slambda_0(this$0, $uriArg, $fileName, resultContinuation) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryGetMetadataViewModel(di, savedStateHandle, contentEntryGetMetaDataFromUriUseCase) {
    Companion_getInstance_201();
    var tmp;
    if (contentEntryGetMetaDataFromUriUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, null);
    } else {
      tmp = contentEntryGetMetaDataFromUriUseCase;
    }
    contentEntryGetMetaDataFromUriUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryGetMetadata');
    this.contentEntryGetMetaDataFromUriUseCase_1 = contentEntryGetMetaDataFromUriUseCase;
    this._uiState_1 = MutableStateFlow(new ContentEntryGetMetadataUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$('uri');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No uri');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    var uriArg = tmp_2;
    var fileName = savedStateHandle.get_6bo4tg_k$('filename');
    var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_3, VOID, VOID, ContentEntryGetMetadataViewModel$slambda_0(this, uriArg, fileName, null));
  }
  protoOf(ContentEntryGetMetadataViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function ContentEntryGetMetadataUiState(status) {
    status = status === VOID ? new ContentEntryGetMetadataStatus() : status;
    this.status_1 = status;
  }
  protoOf(ContentEntryGetMetadataUiState).get_status_jnf6d7_k$ = function () {
    return this.status_1;
  };
  protoOf(ContentEntryGetMetadataUiState).component1_7eebsc_k$ = function () {
    return this.status_1;
  };
  protoOf(ContentEntryGetMetadataUiState).copy_fozejc_k$ = function (status) {
    return new ContentEntryGetMetadataUiState(status);
  };
  protoOf(ContentEntryGetMetadataUiState).copy$default_e0renb_k$ = function (status, $super) {
    status = status === VOID ? this.status_1 : status;
    return $super === VOID ? this.copy_fozejc_k$(status) : $super.copy_fozejc_k$.call(this, status);
  };
  protoOf(ContentEntryGetMetadataUiState).toString = function () {
    return 'ContentEntryGetMetadataUiState(status=' + this.status_1 + ')';
  };
  protoOf(ContentEntryGetMetadataUiState).hashCode = function () {
    return this.status_1.hashCode();
  };
  protoOf(ContentEntryGetMetadataUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataUiState ? other : THROW_CCE();
    if (!this.status_1.equals(tmp0_other_with_cast.status_1))
      return false;
    return true;
  };
  function _get__uiState__8e9jsd_23($this) {
    return $this._uiState_1;
  }
  function _get_getSubtitleTrackUseCase__ux9onr($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getSubtitleTrackUseCase$delegate_1;
    getSubtitleTrackUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function Companion_141() {
    Companion_instance_141 = this;
    this.DEST_NAME_1 = 'GetSubtitle';
  }
  protoOf(Companion_141).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_141;
  function Companion_getInstance_202() {
    if (Companion_instance_141 == null)
      new Companion_141();
    return Companion_instance_141;
  }
  function GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetSubtitleViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(GetSubtitleViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetSubtitleViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_getSubtitleTrackUseCase__ux9onr(this.this$0__1).invoke$default_bhek8t_k$(Companion_getInstance_25().parse_pc1q8p_k$(require_0(this.$savedStateHandle_1, Companion_getInstance_207().get_ARG_URI_u8i56_k$())), require_0(this.$savedStateHandle_1, Companion_getInstance_207().get_ARG_FILENAME_z23ayh_k$()), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var subtitleTrack = suspendResult;
            var tmp_0 = this.this$0__1.get_navController_qibdoq_k$();
            var tmp_1 = Companion_getInstance_207().get_DEST_NAME_gmgk7z_k$();
            var this_0 = LinkedHashMap_init_$Create$_0();
            this_0.put_4fpzoq_k$(Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$(), this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_95().serializer_9w0wvi_k$(), subtitleTrack));
            this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$());
            this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_RESULT_DEST_KEY_eanr0y_k$());
            tmp_0.navigate_6urlkw_k$(tmp_1, this_0.build_1k0s4u_k$(), new UstadGoOptions('GetSubtitle', true));
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_2 = this.get_exception_x0n6w6_k$();
            if (tmp_2 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              l$ret$1: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_1.get_value_j01efc_k$();
                  var nextValue = prevValue.copy_q202ni_k$(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) + ': ' + e.message);
                  if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(GetSubtitleViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new GetSubtitleViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(GetSubtitleViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function GetSubtitleViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function GetSubtitleViewModel(di, savedStateHandle) {
    Companion_getInstance_202();
    UstadViewModel.call(this, di, savedStateHandle, 'GetSubtitle');
    this._uiState_1 = MutableStateFlow(new GetSubtitleUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.invoke_4wgfc3_k$(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.getSubtitleTrackUseCase$delegate_1 = Instance(this_0, tmp$ret$3, null).provideDelegate_o2qlc1_k$(this, getSubtitleTrackUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.getsubtitle.GetSubtitleViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_importing_52djzo_k$()));
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_3, VOID, VOID, GetSubtitleViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(GetSubtitleViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function GetSubtitleUiState(error) {
    error = error === VOID ? null : error;
    this.error_1 = error;
  }
  protoOf(GetSubtitleUiState).get_error_iqzvfj_k$ = function () {
    return this.error_1;
  };
  protoOf(GetSubtitleUiState).component1_7eebsc_k$ = function () {
    return this.error_1;
  };
  protoOf(GetSubtitleUiState).copy_q202ni_k$ = function (error) {
    return new GetSubtitleUiState(error);
  };
  protoOf(GetSubtitleUiState).copy$default_5y5plo_k$ = function (error, $super) {
    error = error === VOID ? this.error_1 : error;
    return $super === VOID ? this.copy_q202ni_k$(error) : $super.copy_q202ni_k$.call(this, error);
  };
  protoOf(GetSubtitleUiState).toString = function () {
    return 'GetSubtitleUiState(error=' + this.error_1 + ')';
  };
  protoOf(GetSubtitleUiState).hashCode = function () {
    return this.error_1 == null ? 0 : getStringHashCode(this.error_1);
  };
  protoOf(GetSubtitleUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof GetSubtitleUiState))
      return false;
    var tmp0_other_with_cast = other instanceof GetSubtitleUiState ? other : THROW_CCE();
    if (!(this.error_1 == tmp0_other_with_cast.error_1))
      return false;
    return true;
  };
  function getSubtitleTrackUseCase$factory() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function getSubtitleTrackUseCase$factory_0() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function _get_STATE_KEY_IMPORTURL__5z4t9n($this) {
    return $this.STATE_KEY_IMPORTURL_1;
  }
  function _get__uiState__8e9jsd_24($this) {
    return $this._uiState_1;
  }
  function _get_httpClient__2ty1zc_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.httpClient$delegate_1;
    httpClient$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function _set_commitLinkToSavedStateJob__5ftm5a($this, _set____db54di) {
    $this.commitLinkToSavedStateJob_1 = _set____db54di;
  }
  function _get_commitLinkToSavedStateJob__36z36y($this) {
    return $this.commitLinkToSavedStateJob_1;
  }
  function _get_nextDest__qt9nt6($this) {
    return $this.nextDest_1;
  }
  function Companion_142() {
    Companion_instance_142 = this;
    this.DEST_NAME_1 = 'ContentEntryImportLink';
    this.STATE_KEY_IMPORTURL_1 = 'importUrl';
  }
  protoOf(Companion_142).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_142;
  function Companion_getInstance_203() {
    if (Companion_instance_142 == null)
      new Companion_142();
    return Companion_instance_142;
  }
  function ContentEntryImportLinkViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.onClickNext_jwdi98_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation) {
    this.this$0__1 = this$0;
    this.$url_1 = $url;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('importUrl', this.$url_1);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this.this$0__1, this.$url_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this$0, $url, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(9);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(8);
            this.set_exceptionState_fex74n_k$(7);
            var tmp_0 = this;
            tmp_0.this2__1 = _get_httpClient__2ty1zc_5(this.this$0__1);
            var tmp_1 = this;
            tmp_1.this3__1 = this.this2__1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.this$0__1.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$() + 'api/import/validateLink');
            parameter(this_0, 'url', this.this$0__1._uiState_1.get_value_j01efc_k$().url_1);
            set_expectSuccess(this_0, false);
            tmp_2.builder4__1 = this_0;
            this.builder4__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Post_wo83k9_k$());
            var tmp_3 = this;
            tmp_3.this5__1 = this.this3__1;
            var tmp_4 = this;
            tmp_4.builder6__1 = this.builder4__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = (new HttpStatement(this.builder6__1, this.this5__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.response7__1 = suspendResult;
            if (!this.response7__1.get_status_jnf6d7_k$().equals(Companion_getInstance_6().get_OK_kntokb_k$())) {
              l$ret$1: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_1.get_value_j01efc_k$();
                  var nextValue = prevValue.copy$default_w3ezx0_k$(VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_link_d9bc7f_k$()), true);
                  if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.tmp$ret$21__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(9);
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 4:
            var tmp_5 = this;
            tmp_5.this8__1 = this.this$0__1.get_json_woos35_k$();
            this.set_state_rjd8d0_k$(5);
            suspendResult = bodyAsText(this.response7__1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var string = suspendResult;
            var this_2 = this.this8__1.get_serializersModule_piitvg_k$();
            var this_3 = serializer(this_2, createKType(getKClass(MetadataResult), arrayOf([]), false));
            var metadataResult = this.this8__1.decodeFromString_jwu9sq_k$(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            var tmp_6 = this;
            var tmp_7;
            if (this.this$0__1.nextDest_1 === Companion_getInstance_200().get_DEST_NAME_gmgk7z_k$()) {
              var tmp_8 = this.this$0__1.get_navController_qibdoq_k$();
              var tmp_9 = Companion_getInstance_200().get_DEST_NAME_gmgk7z_k$();
              var this_4 = LinkedHashMap_init_$Create$_0();
              this_4.put_4fpzoq_k$(Companion_getInstance_200().get_ARG_IMPORTED_METADATA_e73aqg_k$(), this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_96().serializer_9w0wvi_k$(), metadataResult));
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_4, Companion_getInstance_200().get_ARG_COURSEBLOCK_ewwwqo_k$());
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_4, Companion_getInstance_200().get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$());
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_4, Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$());
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_4, Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$());
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_4, Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$());
              this_4.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$(), 'ContentEntryImportLink');
              tmp_8.navigate$default_srzzsc_k$(tmp_9, this_4.build_1k0s4u_k$());
              tmp_7 = Unit_getInstance();
            } else {
              this.this$0__1.finishWithResult_jlqwtj_k$(metadataResult);
              tmp_7 = Unit_getInstance();
            }

            tmp_6.tmp$ret$40__1 = tmp_7;
            this.set_exceptionState_fex74n_k$(9);
            this.set_state_rjd8d0_k$(10);
            continue $sm;
          case 6:
            this.set_exceptionState_fex74n_k$(9);
            l$ret$9: do {
              var this_5 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_5.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_w3ezx0_k$(VOID, VOID, true);
                if (this_5.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 7:
            this.set_exceptionState_fex74n_k$(8);
            var tmp_10 = this.get_exception_x0n6w6_k$();
            if (tmp_10 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_11 = this;
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) + (': ' + e)));
              tmp_11.tmp$ret$40__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(9);
              this.set_state_rjd8d0_k$(10);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 8:
            this.set_exceptionState_fex74n_k$(9);
            var t = this.get_exception_x0n6w6_k$();
            l$ret$7: do {
              var this_6 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_1 = this_6.get_value_j01efc_k$();
                var nextValue_1 = prevValue_1.copy$default_w3ezx0_k$(VOID, VOID, true);
                if (this_6.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 9:
            throw this.get_exception_x0n6w6_k$();
          case 10:
            this.set_exceptionState_fex74n_k$(9);
            l$ret$11: do {
              var this_7 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_2 = this_7.get_value_j01efc_k$();
                var nextValue_2 = prevValue_2.copy$default_w3ezx0_k$(VOID, VOID, true);
                if (this_7.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 9) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryImportLinkViewModel$onClickNext$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel(di, savedStateHandle) {
    Companion_getInstance_203();
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryImportLink');
    this._uiState_1 = MutableStateFlow(new ContentEntryImportLinkUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.httpClient$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, httpClient$factory_3());
    this.commitLinkToSavedStateJob_1 = null;
    this.nextDest_1 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    var tmp_1 = this.get__appUiState_rulqry_k$();
    var tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_activity_import_link_a2xt3n_k$());
    var tmp_3 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_next_wor1vg_k$());
    tmp_1.set_value_v1vabv_k$(new AppUiState(VOID, VOID, tmp_2, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ContentEntryImportLinkViewModel$onClickNext$ref(this))));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$('importUrl');
        var nextValue = prevValue.copy$default_w3ezx0_k$(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(ContentEntryImportLinkViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ContentEntryImportLinkViewModel).onChangeLink_hqhy4f_k$ = function (url) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onChangeLink.<anonymous>' call
        var nextValue = prevValue.copy$default_w3ezx0_k$(url, !(url === prevValue.url_1) ? null : prevValue.linkError_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.commitLinkToSavedStateJob_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = this;
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    tmp.commitLinkToSavedStateJob_1 = launch(tmp_0, VOID, VOID, ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this, url, null));
  };
  protoOf(ContentEntryImportLinkViewModel).onClickNext_jwdi98_k$ = function () {
    if (!this._uiState_1.get_value_j01efc_k$().fieldsEnabled_1) {
      return Unit_getInstance();
    }
    if (isBlank(this._uiState_1.get_value_j01efc_k$().url_1)) {
      Napier_getInstance().d$default_a5agxr_k$('link is blank');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.copy$default_w3ezx0_k$(VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_w3ezx0_k$(VOID, VOID, false);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.commitLinkToSavedStateJob_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('importUrl', this._uiState_1.get_value_j01efc_k$().url_1);
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryImportLinkViewModel$onClickNext$slambda_0(this, null));
  };
  function ContentEntryImportLinkUiState(url, linkError, fieldsEnabled) {
    url = url === VOID ? '' : url;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.url_1 = url;
    this.linkError_1 = linkError;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(ContentEntryImportLinkUiState).get_url_18iuii_k$ = function () {
    return this.url_1;
  };
  protoOf(ContentEntryImportLinkUiState).get_linkError_iqv4or_k$ = function () {
    return this.linkError_1;
  };
  protoOf(ContentEntryImportLinkUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ContentEntryImportLinkUiState).component1_7eebsc_k$ = function () {
    return this.url_1;
  };
  protoOf(ContentEntryImportLinkUiState).component2_7eebsb_k$ = function () {
    return this.linkError_1;
  };
  protoOf(ContentEntryImportLinkUiState).component3_7eebsa_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ContentEntryImportLinkUiState).copy_xj27if_k$ = function (url, linkError, fieldsEnabled) {
    return new ContentEntryImportLinkUiState(url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).copy$default_w3ezx0_k$ = function (url, linkError, fieldsEnabled, $super) {
    url = url === VOID ? this.url_1 : url;
    linkError = linkError === VOID ? this.linkError_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_xj27if_k$(url, linkError, fieldsEnabled) : $super.copy_xj27if_k$.call(this, url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).toString = function () {
    return 'ContentEntryImportLinkUiState(url=' + this.url_1 + ', linkError=' + this.linkError_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(ContentEntryImportLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.url_1);
    result = imul(result, 31) + (this.linkError_1 == null ? 0 : getStringHashCode(this.linkError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(ContentEntryImportLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryImportLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryImportLinkUiState ? other : THROW_CCE();
    if (!(this.url_1 === tmp0_other_with_cast.url_1))
      return false;
    if (!(this.linkError_1 == tmp0_other_with_cast.linkError_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function httpClient$factory_3() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function httpClient$factory_4() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function _get_KEY_FILTER_CHIP_ID__mq99do($this) {
    return $this.KEY_FILTER_CHIP_ID_1;
  }
  function ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).invoke_f29lti_k$ = function (hasNewContentPermission, $completion) {
    var tmp = this.create_vh5neu_k$(hasNewContentPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp_0;
              if (!(prevValue.hasWritePermission_1 === this.hasNewContentPermission_1)) {
                tmp_0 = prevValue.copy$default_gnwnx1_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hasNewContentPermission_1);
              } else {
                tmp_0 = prevValue;
              }
              var nextValue = tmp_0;
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(prevValue_0.get_fabState_obl84t_k$().copy$default_kse1yx_k$(this.hasNewContentPermission_1 ? !this.this$0__1.showSelectFolderButton_1 : false));
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).create_vh5neu_k$ = function (hasNewContentPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.hasNewContentPermission_1 = hasNewContentPermission;
    return i;
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasNewContentPermission, $completion) {
      return i.invoke_f29lti_k$(hasNewContentPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$hasPermissionFlow_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (!this.this$0__1.hasCourseBlockArg_1) {
              this.set_state_rjd8d0_k$(2);
              var tmp_0 = ContentEntryListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
              suspendResult = this.$hasPermissionFlow_1.collect_ve9kyv_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_25(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

          case 1:
            return Unit_getInstance();
          case 2:
            throwKotlinNothingValueException();
            break;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new ContentEntryListViewModel$slambda$slambda(this.this$0__1, this.$hasPermissionFlow_1, completion);
  };
  function ContentEntryListViewModel$slambda$slambda_0(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.$savedStateHandle_1 = $savedStateHandle;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_1).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp_1 = this.result_2.get_result_iyg5d2_k$();
            var tmp0_elvis_lhs = tmp_1 instanceof ContentEntry ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.destContentEntry0__1 = tmp_2;
            var tmp_3 = this;
            var tmp1_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$('entriesToMove');
            var tmp_4;
            if (tmp1_safe_receiver == null) {
              tmp_4 = null;
            } else {
              tmp_4 = this.this$0__1.get_json_woos35_k$().decodeFromString_jwu9sq_k$(ListSerializer(Companion_getInstance_206().serializer_9w0wvi_k$()), tmp1_safe_receiver);
            }

            var tmp2_elvis_lhs = tmp_4;
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_3.selectedEntriesToMove1__1 = tmp_5;
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_moveContentEntriesUseCase__fb3hfi(this.this$0__1).invoke_v7rmhy_k$(this.destContentEntry0__1, toSet(this.selectedEntriesToMove1__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().formatString_qr9zmw_k$(strings_getInstance().get_moved_x_entries_fps5zo_k$(), [this.selectedEntriesToMove1__1.get_size_woubt6_k$().toString()])));
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_6 = this.get_exception_x0n6w6_k$();
            if (tmp_6 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              Napier_getInstance().w$default_p42du4_k$('Could not move entries', e);
              var tmp_7 = this.this$0__1.get_snackDispatcher_ifpff8_k$();
              var tmp3_elvis_lhs = e.message;
              tmp_7.showSnackBar_r6iyg6_k$(new Snack(tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            this.set_exceptionState_fex74n_k$(4);
            setSelectedItems(this.this$0__1, emptySet());
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).create_h5keyk_k$ = function (result, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_1(this.$savedStateHandle_1, this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$onClickMoveAction$ref($boundThis) {
    var l = function () {
      onClickMoveAction($boundThis);
      return Unit_getInstance();
    };
    l.callableName = 'onClickMoveAction';
    return l;
  }
  function ContentEntryListViewModel$onClickDeleteAction$ref($boundThis) {
    var l = function () {
      onClickDeleteAction($boundThis);
      return Unit_getInstance();
    };
    l.callableName = 'onClickDeleteAction';
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_3).invoke_yd1s71_k$ = function (uiState, hasPermission, $completion) {
    var tmp = this.create_xfu1pk_k$(uiState, hasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = p1 instanceof ContentEntryListUiState ? p1 : THROW_CCE();
    return this.invoke_yd1s71_k$(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return new Pair(this.uiState_1, this.hasPermission_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).create_xfu1pk_k$ = function (uiState, hasPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(completion);
    i.uiState_1 = uiState;
    i.hasPermission_1 = hasPermission;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_4(resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(resultContinuation);
    var l = function (uiState, hasPermission, $completion) {
      return i.invoke_yd1s71_k$(uiState, hasPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_5).invoke_ms1a0z_k$ = function (it, $completion) {
    var tmp = this.create_cwyjsh_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_ms1a0z_k$(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0;
          if (!this.it_1.get_first_irdx8n_k$().selectedEntries_1.isEmpty_y1axqb_k$()) {
            tmp_0 = this.it_1.get_second_jf7fjx_k$();
          } else {
            tmp_0 = false;
          }
          var showMoveIcon = tmp_0;
          if (!(showMoveIcon === !this.this$0__1.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_actionButtons_pqgvuq_k$().isEmpty_y1axqb_k$())) {
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_1;
                if (showMoveIcon) {
                  var tmp_2 = AppStateIcon_MOVE_getInstance();
                  var tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_move_woqm8q_k$());
                  var tmp_4 = new AppActionButton(tmp_2, tmp_3, ContentEntryListViewModel$onClickMoveAction$ref(this.this$0__1), 'action_move');
                  var tmp_5 = AppStateIcon_DELETE_getInstance();
                  var tmp_6 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_delete_cbon90_k$());
                  tmp_1 = listOf([tmp_4, new AppActionButton(tmp_5, tmp_6, ContentEntryListViewModel$onClickDeleteAction$ref(this.this$0__1), 'action_delete')]);
                } else {
                  tmp_1 = emptyList();
                }
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_1);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).create_cwyjsh_k$ = function (it, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_cwyjsh_k$(value instanceof Pair ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_ms1a0z_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_parentEntryUid__2win99_0($this) {
    return $this.parentEntryUid_1;
  }
  function _get_hasCourseBlockArg__bmqg43($this) {
    return $this.hasCourseBlockArg_1;
  }
  function _get_selectFolderMode__7yke8u($this) {
    return $this.selectFolderMode_1;
  }
  function _get_pagingSourceFactory__6w06ky_2($this) {
    return $this.pagingSourceFactory_1;
  }
  function _set_defaultTitle__3ftysg($this, _set____db54di) {
    $this.defaultTitle_1 = _set____db54di;
  }
  function _get_defaultTitle__c3wrro($this) {
    return $this.defaultTitle_1;
  }
  function _get_showSelectFolderButton__82dtse($this) {
    return $this.showSelectFolderButton_1;
  }
  function _get_moveContentEntriesUseCase__fb3hfi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.moveContentEntriesUseCase$delegate_1;
    moveContentEntriesUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_deleteEntriesUseCase__hkwqc9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.deleteEntriesUseCase$delegate_1;
    deleteEntriesUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function setSelectedItems($this, selectedEntries) {
    $this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('selectedEntries', $this.get_json_woos35_k$().encodeToString_k0apqx_k$(ListSerializer(Companion_getInstance_206().serializer_9w0wvi_k$()), toList(selectedEntries)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var nextValue = prevValue.copy$default_gnwnx1_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, selectedEntries);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var numItemsSelected = $this.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedEntries_1.get_size_woubt6_k$();
    var hasSelectedItems = numItemsSelected > 0;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = $this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var tmp0_userAccountIconVisible = !hasSelectedItems;
        var tmp;
        if (hasSelectedItems) {
          tmp = $this.get_systemImpl_9jowp4_k$().formatPlural_14zeos_k$(plurals_getInstance().get_items_selected_okkgcd_k$(), numItemsSelected);
        } else {
          tmp = $this.defaultTitle_1;
        }
        var tmp1_title = tmp;
        var tmp_0;
        if (hasSelectedItems) {
          var tmp_1 = AppStateIcon_CLOSE_getInstance();
          var tmp_2 = $this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_clear_selection_c1zwa9_k$());
          tmp_0 = new AppActionButton(tmp_1, tmp_2, ContentEntryListViewModel$setSelectedItems$lambda($this), 'clear_selection');
        } else {
          tmp_0 = null;
        }
        var tmp2_leadingActionButton = tmp_0;
        var tmp3_appBarColors = hasSelectedItems ? AppBarColors_SELECTION_MODE_getInstance() : AppBarColors_STANDARD_getInstance();
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp1_title, VOID, VOID, hasSelectedItems, tmp0_userAccountIconVisible, VOID, VOID, VOID, VOID, VOID, tmp2_leadingActionButton, tmp3_appBarColors);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  function selectDestinationToMoveEntries($this, entries) {
    $this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('entriesToMove', $this.get_json_woos35_k$().encodeToString_k0apqx_k$(ListSerializer(Companion_getInstance_206().serializer_9w0wvi_k$()), toList(entries)));
    $this.navigateForResult$default_qg960j_k$('PickContentEntry', 'moveToDestinationResult', null, Companion_getInstance_52().serializer_9w0wvi_k$(), mapOf([to(Companion_getInstance_159().get_ARG_LISTMODE_1jy3rh_k$(), ListViewMode_PICKER_getInstance().get_mode_woqlt8_k$()), to('selectFolder', 'true')]));
  }
  function onClickMoveAction($this) {
    selectDestinationToMoveEntries($this, $this.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedEntries_1);
  }
  function launchDeleteEntries($this, entries) {
    var tmp = $this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ContentEntryListViewModel$launchDeleteEntries$slambda_0($this, entries, null));
  }
  function onClickDeleteAction($this) {
    launchDeleteEntries($this, $this.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedEntries_1);
  }
  function Companion_143() {
    Companion_instance_143 = this;
    this.DEST_NAME_1 = 'ContentEntries';
    this.DEST_NAME_HOME_1 = 'ContentEntryListHome';
    this.DEST_NAME_PICKER_1 = 'PickContentEntry';
    this.ALL_DEST_NAMES_1 = listOf(['ContentEntries', 'ContentEntryListHome', 'PickContentEntry']);
    this.ARG_FILTER_1 = 'filter';
    this.FILTER_BY_PARENT_UID_1 = 1;
    this.FILTER_MY_CONTENT_1 = 2;
    this.FILTER_FROM_MY_COURSES_1 = 3;
    this.FILTER_FROM_LIBRARY_1 = 4;
    this.LIBRARY_ROOT_CONTENT_ENTRY_UID_1 = new Long(1, 0);
    this.KEY_FILTER_CHIP_ID_1 = 'chipId';
    this.KEY_RESULT_MOVE_TO_DESTINATION_FOLDER_1 = 'moveToDestinationResult';
    this.ARG_SELECT_FOLDER_MODE_1 = 'selectFolder';
    this.KEY_SAVED_STATE_SELECTED_ENTRIES_1 = 'selectedEntries';
    this.KEY_SAVED_STATE_ENTRIES_TO_MOVE_1 = 'entriesToMove';
  }
  protoOf(Companion_143).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_143).get_DEST_NAME_HOME_lftflt_k$ = function () {
    return this.DEST_NAME_HOME_1;
  };
  protoOf(Companion_143).get_DEST_NAME_PICKER_l5ocy_k$ = function () {
    return this.DEST_NAME_PICKER_1;
  };
  protoOf(Companion_143).get_ALL_DEST_NAMES_l2cmjy_k$ = function () {
    return this.ALL_DEST_NAMES_1;
  };
  protoOf(Companion_143).get_ARG_FILTER_b745yi_k$ = function () {
    return this.ARG_FILTER_1;
  };
  protoOf(Companion_143).get_FILTER_BY_PARENT_UID_1meczf_k$ = function () {
    return this.FILTER_BY_PARENT_UID_1;
  };
  protoOf(Companion_143).get_FILTER_MY_CONTENT_jhxgvw_k$ = function () {
    return this.FILTER_MY_CONTENT_1;
  };
  protoOf(Companion_143).get_FILTER_FROM_MY_COURSES_ckdblw_k$ = function () {
    return this.FILTER_FROM_MY_COURSES_1;
  };
  protoOf(Companion_143).get_FILTER_FROM_LIBRARY_w3r75w_k$ = function () {
    return this.FILTER_FROM_LIBRARY_1;
  };
  protoOf(Companion_143).get_LIBRARY_ROOT_CONTENT_ENTRY_UID_9enlar_k$ = function () {
    return this.LIBRARY_ROOT_CONTENT_ENTRY_UID_1;
  };
  protoOf(Companion_143).get_KEY_RESULT_MOVE_TO_DESTINATION_FOLDER_hxz8gi_k$ = function () {
    return this.KEY_RESULT_MOVE_TO_DESTINATION_FOLDER_1;
  };
  protoOf(Companion_143).get_ARG_SELECT_FOLDER_MODE_eh1tfh_k$ = function () {
    return this.ARG_SELECT_FOLDER_MODE_1;
  };
  protoOf(Companion_143).get_KEY_SAVED_STATE_SELECTED_ENTRIES_kpn2wr_k$ = function () {
    return this.KEY_SAVED_STATE_SELECTED_ENTRIES_1;
  };
  protoOf(Companion_143).get_KEY_SAVED_STATE_ENTRIES_TO_MOVE_3jmmvd_k$ = function () {
    return this.KEY_SAVED_STATE_ENTRIES_TO_MOVE_1;
  };
  var Companion_instance_143;
  function Companion_getInstance_204() {
    if (Companion_instance_143 == null)
      new Companion_143();
    return Companion_instance_143;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_25(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_25).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function createContextMenuItemsForEntry$entriesToAction(this$0, rightClickedItem) {
    var selectedEntries = this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedEntries_1;
    var tmp;
    var tmp_0;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!selectedEntries.isEmpty_y1axqb_k$()) {
      tmp_0 = !selectedEntries.contains_aljjnj_k$(rightClickedItem);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      // Inline function 'kotlin.also' call
      var this_0 = toSet(plus_1(selectedEntries, rightClickedItem));
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.createContextMenuItemsForEntry.entriesToAction.<anonymous>' call
      setSelectedItems(this$0, this_0);
      tmp = this_0;
    } else {
      if (selectedEntries.isEmpty_y1axqb_k$()) {
        tmp = setOf_0(rightClickedItem);
      } else {
        tmp = selectedEntries;
      }
    }
    return tmp;
  }
  function ContentEntryListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp;
      switch (this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedChipId_1) {
        case 2:
          tmp = this$0.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().getContentByOwner_4zkl6d_k$(this$0.get_activeUserPersonUid_1nlgnz_k$());
          break;
        case 3:
          tmp = this$0.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().getContentFromMyCourses_mc08lt_k$(this$0.get_activeUserPersonUid_1nlgnz_k$());
          break;
        case 4:
          tmp = this$0.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().getChildrenByParentUidWithCategoryFilterOrderByName_zadow7_k$(this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.parentEntryUid_1, new Long(0, 0), new Long(0, 0), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().activeSortOption_1.get_flag_wom2lx_k$(), false);
          break;
        case 1:
          tmp = this$0.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().getChildrenByParentUidWithCategoryFilterOrderByName_zadow7_k$(this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.parentEntryUid_1, new Long(0, 0), new Long(0, 0), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().activeSortOption_1.get_flag_wom2lx_k$(), false);
          break;
        default:
          tmp = new EmptyPagingSource();
          break;
      }
      return tmp;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$ref($boundThis) {
    var l = function (p0) {
      return $boundThis.createContextMenuItemsForEntry_cihflo_k$(p0);
    };
    l.callableName = 'createContextMenuItemsForEntry';
    return l;
  }
  function ContentEntryListViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__uiState_8tkbd_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_gnwnx1_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function ContentEntryListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (!(this.this$0__1.get_expectedResultDest_cc1yyo_k$() == null) ? !this.this$0__1.selectFolderMode_1 : false) {
              this.WHEN_RESULT0__1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_select_content_vqvtbz_k$());
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              if (this.this$0__1.parentEntryUid_1.equals(new Long(1, 0))) {
                this.WHEN_RESULT0__1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_library_40idhu_k$());
                this.set_state_rjd8d0_k$(2);
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(1);
                suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().contentEntryDao_5ggc49_k$().findTitleByUidAsync_9gda26_k$(this.this$0__1.parentEntryUid_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp0_elvis_lhs = suspendResult;
            this.WHEN_RESULT0__1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            var ARGUMENT = this.WHEN_RESULT0__1;
            this.this$0__1.defaultTitle_1 = ARGUMENT;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.this$0__1.defaultTitle_1);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$hasPermissionFlow_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, ContentEntryListViewModel$slambda$slambda_0(this.this$0__1, this.$hasPermissionFlow_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_1(this.this$0__1, this.$hasPermissionFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryListViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$slambda_2(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'moveToDestinationResult');
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_2(this.$savedStateHandle_1, this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_25(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_3(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryListViewModel$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$slambda_4(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$hasPermissionFlow_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            var tmp_1 = combine(tmp_0, this.$hasPermissionFlow_1, ContentEntryListViewModel$slambda$slambda_4(null));
            var tmp_2 = ContentEntryListViewModel$slambda$slambda_6(this.this$0__1, null);
            suspendResult = tmp_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_25(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_5(this.this$0__1, this.$hasPermissionFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryListViewModel$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$slambda_6(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this$0, $rightClickedItem) {
    return function () {
      selectDestinationToMoveEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_getInstance();
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this$0, $rightClickedItem) {
    return function () {
      launchDeleteEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_getInstance();
    };
  }
  function ContentEntryListViewModel$setSelectedItems$lambda(this$0) {
    return function () {
      setSelectedItems(this$0, emptySet());
      return Unit_getInstance();
    };
  }
  function ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entries_1 = $entries;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_deleteEntriesUseCase__hkwqc9(this.this$0__1).invoke_hz2azg_k$(this.$entries_1, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            setSelectedItems(this.this$0__1, emptySet());
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().formatPlural_14zeos_k$(plurals_getInstance().get_items_deleted_us0hvz_k$(), this.$entries_1.get_size_woubt6_k$())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this.this$0__1, this.$entries_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ContentEntryListViewModel$launchDeleteEntries$slambda_0(this$0, $entries, resultContinuation) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_204();
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryListUiState(), destName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.parentEntryUid_1 = tmp1_elvis_lhs == null ? new Long(1, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_200().get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$());
    tmp_0.hasCourseBlockArg_1 = (tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0)) === Companion_getInstance_200().get_GO_TO_COURSE_BLOCK_EDIT_q6h1u2_k$();
    var tmp_1 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.get_6bo4tg_k$('selectFolder');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toBoolean(tmp0_safe_receiver_1);
    tmp_1.selectFolderMode_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_2 = this;
    tmp_2.pagingSourceFactory_1 = ContentEntryListViewModel$pagingSourceFactory$lambda(this);
    this.defaultTitle_1 = '';
    this.showSelectFolderButton_1 = this.selectFolderMode_1 ? this.get_listMode_9jw63a_k$().equals(ListViewMode_PICKER_getInstance()) : false;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.moveContentEntriesUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, moveContentEntriesUseCase$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.deleteEntriesUseCase$delegate_1 = Instance(this_1, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, deleteEntriesUseCase$factory());
    var tmp0_safe_receiver_2 = savedStateHandle.get_6bo4tg_k$('selectedEntries');
    var tmp_7;
    if (tmp0_safe_receiver_2 == null) {
      tmp_7 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
      tmp_7 = this.get_json_woos35_k$().decodeFromString_jwu9sq_k$(ListSerializer(Companion_getInstance_206().serializer_9w0wvi_k$()), tmp0_safe_receiver_2);
    }
    var tmp1_safe_receiver = tmp_7;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toSet(tmp1_safe_receiver);
    var savedStateSelectedEntries = tmp2_elvis_lhs == null ? emptySet() : tmp2_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp0_contentEntryList = this.pagingSourceFactory_1;
        var tmp1_showSelectFolderButton = this.showSelectFolderButton_1;
        var tmp2_contextMenuItems = ContentEntryListViewModel$createContextMenuItemsForEntry$ref(this);
        var nextValue = prevValue.copy$default_gnwnx1_k$(VOID, tmp0_contentEntryList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, savedStateSelectedEntries, tmp1_showSelectFolderButton, tmp2_contextMenuItems);
        if (this_2.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_3.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp_8 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_content_h02jrk_k$());
        var tmp_9 = FabIcon_ADD_getInstance();
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(new FabUiState(false, tmp_8, tmp_9, ContentEntryListViewModel$lambda(this)), VOID, VOID, VOID, this.get_listMode_9jw63a_k$().equals(ListViewMode_PICKER_getInstance()));
        if (this_3.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    if (this.hasCourseBlockArg_1 ? this.parentEntryUid_1.equals(new Long(1, 0)) : false) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.get__uiState_8tkbd_k$();
        while (true) {
          var prevValue_1 = this_4.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
          var tmp0_safe_receiver_3 = savedStateHandle.get_6bo4tg_k$('chipId');
          var tmp1_elvis_lhs_1 = tmp0_safe_receiver_3 == null ? null : toInt(tmp0_safe_receiver_3);
          var tmp2_selectedChipId = tmp1_elvis_lhs_1 == null ? 2 : tmp1_elvis_lhs_1;
          var tmp3_filterOptions = listOf([new MessageIdOption2(strings_getInstance().get_my_content_twxi8h_k$(), 2), new MessageIdOption2(strings_getInstance().get_from_my_courses_hhdte7_k$(), 3), new MessageIdOption2(strings_getInstance().get_library_40idhu_k$(), 4)]);
          var nextValue_1 = prevValue_1.copy$default_gnwnx1_k$(VOID, VOID, tmp2_selectedChipId, tmp3_filterOptions, VOID, VOID, VOID, VOID, false, true, true);
          if (this_4.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    var hasPermissionFlow = shareIn(this.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermissionAsFlow_ryvoyl_k$(this.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$(), PermissionFlags_getInstance().get_EDIT_LIBRARY_CONTENT_bhq3m1_k$()), this.get_viewModelScope_ryv1dz_k$(), Companion_getInstance_38().WhileSubscribed$default_3cgwv5_k$());
    var tmp_10 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_10, VOID, VOID, ContentEntryListViewModel$slambda_0(this, null));
    var tmp_11 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_11, VOID, VOID, ContentEntryListViewModel$slambda_2(this, hasPermissionFlow, null));
    var tmp_12 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_12, VOID, VOID, ContentEntryListViewModel$slambda_4(this, savedStateHandle, null));
    var tmp_13 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_13, VOID, VOID, ContentEntryListViewModel$slambda_6(this, hasPermissionFlow, null));
  }
  protoOf(ContentEntryListViewModel).createContextMenuItemsForEntry_cihflo_k$ = function (entry) {
    var uiStateVal = this.get__uiState_8tkbd_k$().get_value_j01efc_k$();
    var tmp;
    if (uiStateVal.hasWritePermission_1 ? this.get_listMode_9jw63a_k$().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var rightClickedItem = asSelectedItem(entry);
      if (!uiStateVal.selectedEntries_1.contains_aljjnj_k$(rightClickedItem)) {
        setSelectedItems(this, emptySet());
      }
      var tmp_0 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_move_to_ltxxog_k$());
      var tmp_1 = new UstadContextMenuItem(tmp_0, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this, rightClickedItem));
      var tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_delete_cbon90_k$());
      tmp = listOf([tmp_1, new UstadContextMenuItem(tmp_2, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this, rightClickedItem))]);
    } else {
      tmp = emptyList();
    }
    return tmp;
  };
  protoOf(ContentEntryListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  protoOf(ContentEntryListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  protoOf(ContentEntryListViewModel).onDismissCreateNewOptions_rkt8nf_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.copy$default_gnwnx1_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).onClickNewFolder_6cynpn_k$ = function () {
    this.onDismissCreateNewOptions_rkt8nf_k$();
    var tmp = Companion_getInstance_200().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickNewFolder.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_200().get_ARG_LEAF_q15lsg_k$(), 'false');
    this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$(), this.parentEntryUid_1.toString());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    this.navigateToCreateNew_mwxhbu_k$(tmp, tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).onClickImportFromLink_vfesxu_k$ = function () {
    this.onDismissCreateNewOptions_rkt8nf_k$();
    var tmp = Companion_getInstance_203().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickImportFromLink.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_200().get_ARG_LEAF_q15lsg_k$(), 'true');
    this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$(), this.parentEntryUid_1.toString());
    this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), Companion_getInstance_200().get_DEST_NAME_gmgk7z_k$());
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_209().get_COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_68n2cb_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    this.navigateToCreateNew_mwxhbu_k$(tmp, tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).onImportFile_x0lic0_k$ = function (fileUri, fileName) {
    this.onDismissCreateNewOptions_rkt8nf_k$();
    var tmp = Companion_getInstance_201().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onImportFile.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_201().get_ARG_URI_u8i56_k$(), fileUri);
    this_0.put_4fpzoq_k$(Companion_getInstance_201().get_ARG_FILENAME_z23ayh_k$(), fileName);
    this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$(), this.parentEntryUid_1.toString());
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_209().get_COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_68n2cb_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    this.navigateToCreateNew_mwxhbu_k$(tmp, tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).onClickEntry_ffmxrg_k$ = function (entry) {
    if (entry == null)
      return Unit_getInstance();
    var tmp0_safe_receiver = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_200().get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    var goToOnContentEntryEdit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (entry.get_leaf_woprc7_k$() ? this.showSelectFolderButton_1 : false)
      return Unit_getInstance();
    else if ((this.get_listMode_9jw63a_k$().equals(ListViewMode_PICKER_getInstance()) ? entry.get_leaf_woprc7_k$() : false) ? goToOnContentEntryEdit === Companion_getInstance_200().get_GO_TO_COURSE_BLOCK_EDIT_q6h1u2_k$() : false) {
      var tmp2_nextViewName = Companion_getInstance_209().get_DEST_NAME_gmgk7z_k$();
      var tmp3_key = Companion_getInstance_168().get_RESULT_KEY_COURSEBLOCK_ye4w7t_k$();
      var tmp4_serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
      this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_209().get_COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_68n2cb_k$());
      this_0.put_4fpzoq_k$(Companion_getInstance_209().get_ARG_SELECTED_CONTENT_ENTRY_i9aghy_k$(), this.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_53().serializer_9w0wvi_k$(), new ContentEntryAndContentJob(entry)));
      var tmp5_args = this_0.build_1k0s4u_k$();
      this.navigateForResult$default_qg960j_k$(tmp2_nextViewName, tmp3_key, null, tmp4_serializer, tmp5_args, VOID, false);
    } else if (entry.get_leaf_woprc7_k$()) {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_195().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), entry.get_contentEntryUid_pu6bbm_k$().toString()), to(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$(), this.parentEntryUid_1.toString())]));
    } else {
      var tmp = this.get_navController_qibdoq_k$();
      var tmp_0;
      if (this.get_destinationName_akz2s0_k$() === 'ContentEntryListHome') {
        tmp_0 = 'ContentEntries';
      } else {
        tmp_0 = this.get_destinationName_akz2s0_k$();
      }
      var tmp_1 = tmp_0;
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_1 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
      this_1.put_4fpzoq_k$('filter', '1');
      this_1.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_PARENT_UID_o4figj_k$(), entry.get_contentEntryUid_pu6bbm_k$().toString());
      this.putFromSavedStateIfPresent_891b9h_k$(this_1, Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$());
      this.putFromSavedStateIfPresent_891b9h_k$(this_1, Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$());
      this.putFromSavedStateIfPresent_891b9h_k$(this_1, 'selectFolder');
      this.putFromSavedStateIfPresent_891b9h_k$(this_1, Companion_getInstance_200().get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$());
      var tmp$ret$5 = this_1.build_1k0s4u_k$();
      tmp.navigate$default_srzzsc_k$(tmp_1, tmp$ret$5);
    }
  };
  protoOf(ContentEntryListViewModel).onClickSelectThisFolder_2ik7pd_k$ = function () {
    // Inline function 'kotlin.apply' call
    var this_0 = new ContentEntry();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickSelectThisFolder.<anonymous>' call
    this_0.set_contentEntryUid_82c9uk_k$(this.parentEntryUid_1);
    this.finishWithResult_jlqwtj_k$(this_0);
  };
  protoOf(ContentEntryListViewModel).onSetSelected_7ouwqo_k$ = function (entry, selected) {
    var currentSelection = this.get__uiState_8tkbd_k$().get_value_j01efc_k$().selectedEntries_1;
    var tmp;
    if (selected) {
      tmp = toSet(plus_1(currentSelection, asSelectedItem(entry)));
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = currentSelection.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onSetSelected.<anonymous>' call
        var tmp0_safe_receiver = entry.get_contentEntry_hwf2de_k$();
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_contentEntryUid_pu6bbm_k$();
        if (!element.contentEntryUid_1.equals(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.add_utx5q5_k$(element);
        }
      }
      tmp = toSet(destination);
    }
    setSelectedItems(this, tmp);
  };
  protoOf(ContentEntryListViewModel).onClickFilterChip_r5dzw9_k$ = function (filterOption) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.get__uiState_8tkbd_k$();
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
    if (!(this_0.get_value_j01efc_k$().selectedChipId_1 === filterOption.get_value_j01efc_k$())) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
          var nextValue = prevValue.copy$default_gnwnx1_k$(VOID, VOID, filterOption.get_value_j01efc_k$());
          if (tmp0_safe_receiver.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('chipId', filterOption.get_value_j01efc_k$().toString());
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  function Companion_144() {
    Companion_instance_144 = this;
    this.DEFAULT_SORT_OPTIONS_1 = listOf([new SortOrderOption(strings_getInstance().get_title_iz32un_k$(), ContentEntryDaoCommon_getInstance().get_SORT_TITLE_ASC_uf63jm_k$(), true), new SortOrderOption(strings_getInstance().get_title_iz32un_k$(), ContentEntryDaoCommon_getInstance().get_SORT_TITLE_DESC_jntz80_k$(), false)]);
  }
  protoOf(Companion_144).get_DEFAULT_SORT_OPTIONS_vrjybo_k$ = function () {
    return this.DEFAULT_SORT_OPTIONS_1;
  };
  var Companion_instance_144;
  function Companion_getInstance_205() {
    if (Companion_instance_144 == null)
      new Companion_144();
    return Companion_instance_144;
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3() {
    return new EmptyPagingSource();
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3_0(it) {
    return emptyList();
  }
  function ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    Companion_getInstance_205();
    filterMode = filterMode === VOID ? 1 : filterMode;
    var tmp;
    if (contentEntryList === VOID) {
      tmp = ContentEntryListUiState$_init_$lambda_76lpy3;
    } else {
      tmp = contentEntryList;
    }
    contentEntryList = tmp;
    selectedChipId = selectedChipId === VOID ? 1 : selectedChipId;
    var tmp_0;
    if (filterOptions === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_0 = emptyList();
    } else {
      tmp_0 = filterOptions;
    }
    filterOptions = tmp_0;
    showHiddenEntries = showHiddenEntries === VOID ? false : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? false : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? Companion_getInstance_205().DEFAULT_SORT_OPTIONS_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? first_0(sortOptions) : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? false : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? false : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? false : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? emptySet() : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? false : showSelectFolderButton;
    var tmp_1;
    if (contextMenuItems === VOID) {
      tmp_1 = ContentEntryListUiState$_init_$lambda_76lpy3_0;
    } else {
      tmp_1 = contextMenuItems;
    }
    contextMenuItems = tmp_1;
    hasWritePermission = hasWritePermission === VOID ? false : hasWritePermission;
    this.filterMode_1 = filterMode;
    this.contentEntryList_1 = contentEntryList;
    this.selectedChipId_1 = selectedChipId;
    this.filterOptions_1 = filterOptions;
    this.showHiddenEntries_1 = showHiddenEntries;
    this.onlyFolderFilter_1 = onlyFolderFilter;
    this.sortOptions_1 = sortOptions;
    this.activeSortOption_1 = activeSortOption;
    this.createNewFolderItemVisible_1 = createNewFolderItemVisible;
    this.importFromLinkItemVisible_1 = importFromLinkItemVisible;
    this.importFromFileItemVisible_1 = importFromFileItemVisible;
    this.createNewOptionsVisible_1 = createNewOptionsVisible;
    this.selectedEntries_1 = selectedEntries;
    this.showSelectFolderButton_1 = showSelectFolderButton;
    this.contextMenuItems_1 = contextMenuItems;
    this.hasWritePermission_1 = hasWritePermission;
    var tmp_2 = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.selectedEntries_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListUiState.selectedEntryUids.<anonymous>' call
      var tmp$ret$1 = item.contentEntryUid_1;
      destination.add_utx5q5_k$(tmp$ret$1);
    }
    tmp_2.selectedEntryUids_1 = toSet(destination);
  }
  protoOf(ContentEntryListUiState).get_filterMode_p630zo_k$ = function () {
    return this.filterMode_1;
  };
  protoOf(ContentEntryListUiState).get_contentEntryList_jncvpc_k$ = function () {
    return this.contentEntryList_1;
  };
  protoOf(ContentEntryListUiState).get_selectedChipId_ens6id_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ContentEntryListUiState).get_filterOptions_xfykv7_k$ = function () {
    return this.filterOptions_1;
  };
  protoOf(ContentEntryListUiState).get_showHiddenEntries_runr34_k$ = function () {
    return this.showHiddenEntries_1;
  };
  protoOf(ContentEntryListUiState).get_onlyFolderFilter_vu4z6j_k$ = function () {
    return this.onlyFolderFilter_1;
  };
  protoOf(ContentEntryListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryListUiState).get_activeSortOption_kvadcy_k$ = function () {
    return this.activeSortOption_1;
  };
  protoOf(ContentEntryListUiState).get_createNewFolderItemVisible_iin4a_k$ = function () {
    return this.createNewFolderItemVisible_1;
  };
  protoOf(ContentEntryListUiState).get_importFromLinkItemVisible_oerz71_k$ = function () {
    return this.importFromLinkItemVisible_1;
  };
  protoOf(ContentEntryListUiState).get_importFromFileItemVisible_drwtuz_k$ = function () {
    return this.importFromFileItemVisible_1;
  };
  protoOf(ContentEntryListUiState).get_createNewOptionsVisible_1ltbu7_k$ = function () {
    return this.createNewOptionsVisible_1;
  };
  protoOf(ContentEntryListUiState).get_selectedEntries_42kp70_k$ = function () {
    return this.selectedEntries_1;
  };
  protoOf(ContentEntryListUiState).get_showSelectFolderButton_vb6xc2_k$ = function () {
    return this.showSelectFolderButton_1;
  };
  protoOf(ContentEntryListUiState).get_contextMenuItems_ko2uez_k$ = function () {
    return this.contextMenuItems_1;
  };
  protoOf(ContentEntryListUiState).get_hasWritePermission_pcnkgz_k$ = function () {
    return this.hasWritePermission_1;
  };
  protoOf(ContentEntryListUiState).get_showChips_nea03j_k$ = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.filterOptions_1.isEmpty_y1axqb_k$();
  };
  protoOf(ContentEntryListUiState).get_selectedEntryUids_69vvzl_k$ = function () {
    return this.selectedEntryUids_1;
  };
  protoOf(ContentEntryListUiState).component1_7eebsc_k$ = function () {
    return this.filterMode_1;
  };
  protoOf(ContentEntryListUiState).component2_7eebsb_k$ = function () {
    return this.contentEntryList_1;
  };
  protoOf(ContentEntryListUiState).component3_7eebsa_k$ = function () {
    return this.selectedChipId_1;
  };
  protoOf(ContentEntryListUiState).component4_7eebs9_k$ = function () {
    return this.filterOptions_1;
  };
  protoOf(ContentEntryListUiState).component5_7eebs8_k$ = function () {
    return this.showHiddenEntries_1;
  };
  protoOf(ContentEntryListUiState).component6_7eebs7_k$ = function () {
    return this.onlyFolderFilter_1;
  };
  protoOf(ContentEntryListUiState).component7_7eebs6_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ContentEntryListUiState).component8_7eebs5_k$ = function () {
    return this.activeSortOption_1;
  };
  protoOf(ContentEntryListUiState).component9_7eebs4_k$ = function () {
    return this.createNewFolderItemVisible_1;
  };
  protoOf(ContentEntryListUiState).component10_gazzfo_k$ = function () {
    return this.importFromLinkItemVisible_1;
  };
  protoOf(ContentEntryListUiState).component11_gazzfn_k$ = function () {
    return this.importFromFileItemVisible_1;
  };
  protoOf(ContentEntryListUiState).component12_gazzfm_k$ = function () {
    return this.createNewOptionsVisible_1;
  };
  protoOf(ContentEntryListUiState).component13_gazzfl_k$ = function () {
    return this.selectedEntries_1;
  };
  protoOf(ContentEntryListUiState).component14_gazzfk_k$ = function () {
    return this.showSelectFolderButton_1;
  };
  protoOf(ContentEntryListUiState).component15_gazzfj_k$ = function () {
    return this.contextMenuItems_1;
  };
  protoOf(ContentEntryListUiState).component16_gazzfi_k$ = function () {
    return this.hasWritePermission_1;
  };
  protoOf(ContentEntryListUiState).copy_lwsmbf_k$ = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    return new ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).copy$default_gnwnx1_k$ = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission, $super) {
    filterMode = filterMode === VOID ? this.filterMode_1 : filterMode;
    contentEntryList = contentEntryList === VOID ? this.contentEntryList_1 : contentEntryList;
    selectedChipId = selectedChipId === VOID ? this.selectedChipId_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.filterOptions_1 : filterOptions;
    showHiddenEntries = showHiddenEntries === VOID ? this.showHiddenEntries_1 : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? this.onlyFolderFilter_1 : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? this.activeSortOption_1 : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? this.createNewFolderItemVisible_1 : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? this.importFromLinkItemVisible_1 : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? this.importFromFileItemVisible_1 : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.createNewOptionsVisible_1 : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? this.selectedEntries_1 : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? this.showSelectFolderButton_1 : showSelectFolderButton;
    contextMenuItems = contextMenuItems === VOID ? this.contextMenuItems_1 : contextMenuItems;
    hasWritePermission = hasWritePermission === VOID ? this.hasWritePermission_1 : hasWritePermission;
    return $super === VOID ? this.copy_lwsmbf_k$(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) : $super.copy_lwsmbf_k$.call(this, filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).toString = function () {
    return 'ContentEntryListUiState(filterMode=' + this.filterMode_1 + ', contentEntryList=' + this.contentEntryList_1 + ', selectedChipId=' + this.selectedChipId_1 + ', filterOptions=' + this.filterOptions_1 + ', showHiddenEntries=' + this.showHiddenEntries_1 + ', onlyFolderFilter=' + this.onlyFolderFilter_1 + ', sortOptions=' + this.sortOptions_1 + ', activeSortOption=' + this.activeSortOption_1 + ', createNewFolderItemVisible=' + this.createNewFolderItemVisible_1 + ', importFromLinkItemVisible=' + this.importFromLinkItemVisible_1 + ', importFromFileItemVisible=' + this.importFromFileItemVisible_1 + ', createNewOptionsVisible=' + this.createNewOptionsVisible_1 + ', selectedEntries=' + this.selectedEntries_1 + ', showSelectFolderButton=' + this.showSelectFolderButton_1 + ', contextMenuItems=' + this.contextMenuItems_1 + ', hasWritePermission=' + this.hasWritePermission_1 + ')';
  };
  protoOf(ContentEntryListUiState).hashCode = function () {
    var result = this.filterMode_1;
    result = imul(result, 31) + hashCode(this.contentEntryList_1) | 0;
    result = imul(result, 31) + this.selectedChipId_1 | 0;
    result = imul(result, 31) + hashCode(this.filterOptions_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showHiddenEntries_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.onlyFolderFilter_1) | 0;
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.activeSortOption_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.createNewFolderItemVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.importFromLinkItemVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.importFromFileItemVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.createNewOptionsVisible_1) | 0;
    result = imul(result, 31) + hashCode(this.selectedEntries_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showSelectFolderButton_1) | 0;
    result = imul(result, 31) + hashCode(this.contextMenuItems_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hasWritePermission_1) | 0;
    return result;
  };
  protoOf(ContentEntryListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListUiState ? other : THROW_CCE();
    if (!(this.filterMode_1 === tmp0_other_with_cast.filterMode_1))
      return false;
    if (!equals(this.contentEntryList_1, tmp0_other_with_cast.contentEntryList_1))
      return false;
    if (!(this.selectedChipId_1 === tmp0_other_with_cast.selectedChipId_1))
      return false;
    if (!equals(this.filterOptions_1, tmp0_other_with_cast.filterOptions_1))
      return false;
    if (!(this.showHiddenEntries_1 === tmp0_other_with_cast.showHiddenEntries_1))
      return false;
    if (!(this.onlyFolderFilter_1 === tmp0_other_with_cast.onlyFolderFilter_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.activeSortOption_1.equals(tmp0_other_with_cast.activeSortOption_1))
      return false;
    if (!(this.createNewFolderItemVisible_1 === tmp0_other_with_cast.createNewFolderItemVisible_1))
      return false;
    if (!(this.importFromLinkItemVisible_1 === tmp0_other_with_cast.importFromLinkItemVisible_1))
      return false;
    if (!(this.importFromFileItemVisible_1 === tmp0_other_with_cast.importFromFileItemVisible_1))
      return false;
    if (!(this.createNewOptionsVisible_1 === tmp0_other_with_cast.createNewOptionsVisible_1))
      return false;
    if (!equals(this.selectedEntries_1, tmp0_other_with_cast.selectedEntries_1))
      return false;
    if (!(this.showSelectFolderButton_1 === tmp0_other_with_cast.showSelectFolderButton_1))
      return false;
    if (!equals(this.contextMenuItems_1, tmp0_other_with_cast.contextMenuItems_1))
      return false;
    if (!(this.hasWritePermission_1 === tmp0_other_with_cast.hasWritePermission_1))
      return false;
    return true;
  };
  function Companion_145() {
    Companion_instance_145 = this;
  }
  protoOf(Companion_145).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_70();
  };
  var Companion_instance_145;
  function Companion_getInstance_206() {
    if (Companion_instance_145 == null)
      new Companion_145();
    return Companion_instance_145;
  }
  function $serializer_60() {
    $serializer_instance_60 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListSelectedItem', this, 3);
    tmp0_serialDesc.addElement_5pzumi_k$('contentEntryUid', false);
    tmp0_serialDesc.addElement_5pzumi_k$('contentEntryParentChildJoinUid', false);
    tmp0_serialDesc.addElement_5pzumi_k$('parentContentEntryUid', false);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_60).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_60).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_60).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = new Long(0, 0);
    var tmp7_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp7_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp7_input.decodeLongElement_994anb_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.decodeLongElement_994anb_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.decodeLongElement_994anb_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.decodeLongElement_994anb_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.endStructure_1xqz0n_k$(tmp0_desc);
    return ContentEntryListSelectedItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_60).serialize_j5ezx0_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 0, value.contentEntryUid_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 1, value.contentEntryParentChildJoinUid_1);
    tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 2, value.parentContentEntryUid_1);
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_60).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_j5ezx0_k$(encoder, value instanceof ContentEntryListSelectedItem ? value : THROW_CCE());
  };
  var $serializer_instance_60;
  function $serializer_getInstance_70() {
    if ($serializer_instance_60 == null)
      new $serializer_60();
    return $serializer_instance_60;
  }
  function ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_70().descriptor_1);
    }
    $this.contentEntryUid_1 = contentEntryUid;
    $this.contentEntryParentChildJoinUid_1 = contentEntryParentChildJoinUid;
    $this.parentContentEntryUid_1 = parentContentEntryUid;
    return $this;
  }
  function ContentEntryListSelectedItem_init_$Create$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker) {
    return ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, objectCreate(protoOf(ContentEntryListSelectedItem)));
  }
  function ContentEntryListSelectedItem(contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid) {
    Companion_getInstance_206();
    this.contentEntryUid_1 = contentEntryUid;
    this.contentEntryParentChildJoinUid_1 = contentEntryParentChildJoinUid;
    this.parentContentEntryUid_1 = parentContentEntryUid;
  }
  protoOf(ContentEntryListSelectedItem).get_contentEntryUid_pu6bbm_k$ = function () {
    return this.contentEntryUid_1;
  };
  protoOf(ContentEntryListSelectedItem).get_contentEntryParentChildJoinUid_cwji6i_k$ = function () {
    return this.contentEntryParentChildJoinUid_1;
  };
  protoOf(ContentEntryListSelectedItem).get_parentContentEntryUid_k0n1lw_k$ = function () {
    return this.parentContentEntryUid_1;
  };
  protoOf(ContentEntryListSelectedItem).component1_7eebsc_k$ = function () {
    return this.contentEntryUid_1;
  };
  protoOf(ContentEntryListSelectedItem).component2_7eebsb_k$ = function () {
    return this.contentEntryParentChildJoinUid_1;
  };
  protoOf(ContentEntryListSelectedItem).component3_7eebsa_k$ = function () {
    return this.parentContentEntryUid_1;
  };
  protoOf(ContentEntryListSelectedItem).copy_irvfc7_k$ = function (contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid) {
    return new ContentEntryListSelectedItem(contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid);
  };
  protoOf(ContentEntryListSelectedItem).copy$default_b00kg3_k$ = function (contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, $super) {
    contentEntryUid = contentEntryUid === VOID ? this.contentEntryUid_1 : contentEntryUid;
    contentEntryParentChildJoinUid = contentEntryParentChildJoinUid === VOID ? this.contentEntryParentChildJoinUid_1 : contentEntryParentChildJoinUid;
    parentContentEntryUid = parentContentEntryUid === VOID ? this.parentContentEntryUid_1 : parentContentEntryUid;
    return $super === VOID ? this.copy_irvfc7_k$(contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid) : $super.copy_irvfc7_k$.call(this, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid);
  };
  protoOf(ContentEntryListSelectedItem).toString = function () {
    return 'ContentEntryListSelectedItem(contentEntryUid=' + this.contentEntryUid_1.toString() + ', contentEntryParentChildJoinUid=' + this.contentEntryParentChildJoinUid_1.toString() + ', parentContentEntryUid=' + this.parentContentEntryUid_1.toString() + ')';
  };
  protoOf(ContentEntryListSelectedItem).hashCode = function () {
    var result = this.contentEntryUid_1.hashCode();
    result = imul(result, 31) + this.contentEntryParentChildJoinUid_1.hashCode() | 0;
    result = imul(result, 31) + this.parentContentEntryUid_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryListSelectedItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListSelectedItem))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListSelectedItem ? other : THROW_CCE();
    if (!this.contentEntryUid_1.equals(tmp0_other_with_cast.contentEntryUid_1))
      return false;
    if (!this.contentEntryParentChildJoinUid_1.equals(tmp0_other_with_cast.contentEntryParentChildJoinUid_1))
      return false;
    if (!this.parentContentEntryUid_1.equals(tmp0_other_with_cast.parentContentEntryUid_1))
      return false;
    return true;
  };
  function asSelectedItem(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.get_contentEntry_hwf2de_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_contentEntryUid_pu6bbm_k$();
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp2_safe_receiver = _this__u8e3s4.get_contentEntryParentChildJoin_47uvra_k$();
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_cepcjUid_pthbj8_k$();
    var tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.get_contentEntryParentChildJoin_47uvra_k$();
    var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_cepcjParentContentEntryUid_27xw81_k$();
    return new ContentEntryListSelectedItem(tmp, tmp_0, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
  }
  function moveContentEntriesUseCase$factory() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function moveContentEntriesUseCase$factory_0() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory_0() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function SubtitleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda).invoke_oidg8h_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_oidg8h_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new SubtitleEditViewModel$slambda$slambda(completion);
    i.db_1 = db;
    return i;
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SubtitleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_oidg8h_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.$savedStateHandle_1 = $savedStateHandle;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda_1).invoke_98wxbm_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_98wxbm_k$($completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_elvis_lhs = this.$savedStateHandle_1.get_6bo4tg_k$('uri');
          var tmp2_uri = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
          var tmp1_elvis_lhs = this.$savedStateHandle_1.get_6bo4tg_k$('filename');
          var tmp3_title = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
          var tmp4_langCode = _get_supportedLanguagesConfig__bd0744(this.this$0__1).get_displayedLocale_vlg2wi_k$();
          return new SubtitleTrack(tmp2_uri, 'text/vtt', tmp4_langCode, tmp3_title);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new SubtitleEditViewModel$slambda$slambda_1(this.$savedStateHandle_1, this.this$0__1, completion);
  };
  function SubtitleEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_98wxbm_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SubtitleEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_jcb3fw_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get_supportedLanguagesConfig__bd0744($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.supportedLanguagesConfig$delegate_1;
    supportedLanguagesConfig$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get__uiState__8e9jsd_25($this) {
    return $this._uiState_1;
  }
  function Companion_146() {
    Companion_instance_146 = this;
    this.ARG_URI_1 = 'uri';
    this.ARG_FILENAME_1 = 'filename';
    this.DEST_NAME_1 = 'SubtitleEdit';
  }
  protoOf(Companion_146).get_ARG_URI_u8i56_k$ = function () {
    return this.ARG_URI_1;
  };
  protoOf(Companion_146).get_ARG_FILENAME_z23ayh_k$ = function () {
    return this.ARG_FILENAME_1;
  };
  protoOf(Companion_146).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_146;
  function Companion_getInstance_207() {
    if (Companion_instance_146 == null)
      new Companion_146();
    return Companion_instance_146;
  }
  function SubtitleEditViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.onClickDone_9vldqd_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SubtitleEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_95().serializer_9w0wvi_k$();
            var tmp_1 = SubtitleEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SubtitleEditViewModel$slambda$slambda_2(this.$savedStateHandle_1, this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, SubtitleEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_jcb3fw_k$(VOID, VOID, true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.get_actionBarButtonState_cgbrez_k$().copy$default_km9zbw_k$(true));
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SubtitleEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SubtitleEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SubtitleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel(di, savedStateHandle) {
    Companion_getInstance_207();
    UstadEditViewModel.call(this, di, savedStateHandle, 'SubtitleEdit');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.supportedLanguagesConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, supportedLanguagesConfig$factory());
    this._uiState_1 = MutableStateFlow(new SubtitleEditUiState());
    this.uiState_1 = asSharedFlow(this._uiState_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>' call
        var tmp_1 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_subtitles_axg4fj_k$());
        var tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_done_wokv63_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp_1, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(VOID, tmp_2, VOID, SubtitleEditViewModel$onClickDone$ref(this)));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_3, VOID, VOID, SubtitleEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(SubtitleEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(SubtitleEditViewModel).onEntityChanged_6195xr_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_jcb3fw_k$(entity);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_95().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp, VOID, VOID, SubtitleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(SubtitleEditViewModel).onClickDone_9vldqd_k$ = function () {
    this.finishWithResult_jlqwtj_k$(this._uiState_1.get_value_j01efc_k$().entity_1);
  };
  function SubtitleEditUiState(entity, titleError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    titleError = titleError === VOID ? null : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.entity_1 = entity;
    this.titleError_1 = titleError;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(SubtitleEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.entity_1;
  };
  protoOf(SubtitleEditUiState).get_titleError_l4pwyh_k$ = function () {
    return this.titleError_1;
  };
  protoOf(SubtitleEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(SubtitleEditUiState).component1_7eebsc_k$ = function () {
    return this.entity_1;
  };
  protoOf(SubtitleEditUiState).component2_7eebsb_k$ = function () {
    return this.titleError_1;
  };
  protoOf(SubtitleEditUiState).component3_7eebsa_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(SubtitleEditUiState).copy_wofvug_k$ = function (entity, titleError, fieldsEnabled) {
    return new SubtitleEditUiState(entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).copy$default_jcb3fw_k$ = function (entity, titleError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.entity_1 : entity;
    titleError = titleError === VOID ? this.titleError_1 : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_wofvug_k$(entity, titleError, fieldsEnabled) : $super.copy_wofvug_k$.call(this, entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).toString = function () {
    return 'SubtitleEditUiState(entity=' + this.entity_1 + ', titleError=' + this.titleError_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(SubtitleEditUiState).hashCode = function () {
    var result = this.entity_1 == null ? 0 : this.entity_1.hashCode();
    result = imul(result, 31) + (this.titleError_1 == null ? 0 : getStringHashCode(this.titleError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(SubtitleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleEditUiState ? other : THROW_CCE();
    if (!equals(this.entity_1, tmp0_other_with_cast.entity_1))
      return false;
    if (!(this.titleError_1 == tmp0_other_with_cast.titleError_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function supportedLanguagesConfig$factory() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function supportedLanguagesConfig$factory_0() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function _get_$cachedSerializer__te6jhj_2($this) {
    return $this.$cachedSerializer$delegate_1.get_value_j01efc_k$();
  }
  function CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9() {
    return createSimpleEnumSerializer('com.ustadmobile.core.viewmodel.courseblock.CourseBlockViewModelConstants.CompletionCriteria', values_14());
  }
  var CompletionCriteria_AUTOMATIC_instance;
  var CompletionCriteria_MIN_SCORE_instance;
  var CompletionCriteria_STUDENT_SELF_MARKS_instance;
  var CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  var CompletionCriteria_ASSIGNMENT_GRADED_instance;
  function Companion_147() {
    Companion_instance_147 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.$cachedSerializer$delegate_1 = lazy(tmp_0, CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9);
  }
  protoOf(Companion_147).valueOf_t43jdc_k$ = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var indexedObject = values_14();
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var element = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.Companion.valueOf.<anonymous>' call
        if (element.value_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? first_2(values_14()) : tmp0_elvis_lhs;
  };
  protoOf(Companion_147).serializer_9w0wvi_k$ = function () {
    return _get_$cachedSerializer__te6jhj_2(this);
  };
  protoOf(Companion_147).serializer_nv39qc_k$ = function (typeParamsSerializers) {
    return this.serializer_9w0wvi_k$();
  };
  var Companion_instance_147;
  function Companion_getInstance_208() {
    CompletionCriteria_initEntries();
    if (Companion_instance_147 == null)
      new Companion_147();
    return Companion_instance_147;
  }
  function values_14() {
    return [CompletionCriteria_AUTOMATIC_getInstance(), CompletionCriteria_MIN_SCORE_getInstance(), CompletionCriteria_STUDENT_SELF_MARKS_getInstance(), CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()];
  }
  function valueOf_13(value) {
    switch (value) {
      case 'AUTOMATIC':
        return CompletionCriteria_AUTOMATIC_getInstance();
      case 'MIN_SCORE':
        return CompletionCriteria_MIN_SCORE_getInstance();
      case 'STUDENT_SELF_MARKS':
        return CompletionCriteria_STUDENT_SELF_MARKS_getInstance();
      case 'ASSIGNMENT_SUBMITTED':
        return CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance();
      case 'ASSIGNMENT_GRADED':
        return CompletionCriteria_ASSIGNMENT_GRADED_getInstance();
      default:
        CompletionCriteria_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries_13() {
    if ($ENTRIES_13 == null)
      $ENTRIES_13 = enumEntries(values_14());
    return $ENTRIES_13;
  }
  var CompletionCriteria_entriesInitialized;
  function CompletionCriteria_initEntries() {
    if (CompletionCriteria_entriesInitialized)
      return Unit_getInstance();
    CompletionCriteria_entriesInitialized = true;
    CompletionCriteria_AUTOMATIC_instance = new CompletionCriteria('AUTOMATIC', 0, strings_getInstance().get_automatic_yu4nsu_k$(), Companion_getInstance_52().get_COMPLETION_CRITERIA_AUTOMATIC_i3k6gr_k$());
    CompletionCriteria_MIN_SCORE_instance = new CompletionCriteria('MIN_SCORE', 1, strings_getInstance().get_minimum_score_olcv7s_k$(), Companion_getInstance_52().get_COMPLETION_CRITERIA_MIN_SCORE_lqhbxd_k$());
    CompletionCriteria_STUDENT_SELF_MARKS_instance = new CompletionCriteria('STUDENT_SELF_MARKS', 2, strings_getInstance().get_student_marks_content_5v0z83_k$(), Companion_getInstance_52().get_COMPLETION_CRITERIA_MARKED_BY_STUDENT_9ahw80_k$());
    CompletionCriteria_ASSIGNMENT_SUBMITTED_instance = new CompletionCriteria('ASSIGNMENT_SUBMITTED', 3, strings_getInstance().get_submitted_key_eetxbm_k$(), Companion_getInstance_10().get_COMPLETION_CRITERIA_SUBMIT_f0aleq_k$());
    CompletionCriteria_ASSIGNMENT_GRADED_instance = new CompletionCriteria('ASSIGNMENT_GRADED', 4, strings_getInstance().get_graded_dxrs6u_k$(), Companion_getInstance_10().get_COMPLETION_CRITERIA_GRADED_kqi9ot_k$());
    Companion_getInstance_208();
  }
  var $ENTRIES_13;
  function CompletionCriteria(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.stringResource_1 = stringResource;
    this.value_1 = value;
  }
  protoOf(CompletionCriteria).get_stringResource_4df0w8_k$ = function () {
    return this.stringResource_1;
  };
  protoOf(CompletionCriteria).get_value_j01efc_k$ = function () {
    return this.value_1;
  };
  function CompletionCriteria_AUTOMATIC_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_AUTOMATIC_instance;
  }
  function CompletionCriteria_MIN_SCORE_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_MIN_SCORE_instance;
  }
  function CompletionCriteria_STUDENT_SELF_MARKS_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_STUDENT_SELF_MARKS_instance;
  }
  function CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  }
  function CompletionCriteria_ASSIGNMENT_GRADED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_GRADED_instance;
  }
  function CourseBlockViewModelConstants() {
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().block_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_courseBlock_c2ojbd_k$();
          this.this$0__1.onEntityChanged_ubjyog_k$(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.copy$default_rhvmtp_k$(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).create_h5keyk_k$ = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp_0 = this.result_2.get_result_iyg5d2_k$();
          var tmp0_elvis_lhs = tmp_0 instanceof ContentEntryAndContentJob ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_getInstance();
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var contentEntryResult = tmp_1;
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver = prevValue.block_1;
              var nextValue = prevValue.copy$default_9sg25b_k$(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_8ye1e3_k$(VOID, VOID, contentEntryResult.get_entry_iqxd1l_k$(), VOID, contentEntryResult.get_contentJobItem_fg7ikg_k$(), contentEntryResult.get_contentJob_fsr8c3_k$()));
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          this.$savedStateHandle_1.set_wua6pr_k$('SavedSelectedContentEntry', this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_53().serializer_9w0wvi_k$(), contentEntryResult));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).create_h5keyk_k$ = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda).invoke_u6an3_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_u6an3_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_u6an3_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    this.$selectedContentEntry_1 = $selectedContentEntry;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).invoke_48r9su_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_48r9su_k$($completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_19().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            var this_0 = new CourseBlock();
            this_0.set_cbUid_qoojw6_k$(newUid);
            this_0.set_cbActive_isa26r_k$(true);
            var tmp0_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$('blockType');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
            this_0.set_cbType_tflke_k$(tmp1_elvis_lhs == null ? Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$() : tmp1_elvis_lhs);
            var tmp2_safe_receiver = this.$selectedContentEntry_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_entry_iqxd1l_k$();
            this_0.set_cbTitle_bruk91_k$(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_title_iz32un_k$());
            var tmp4_safe_receiver = this.$selectedContentEntry_1;
            var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_entry_iqxd1l_k$();
            this_0.set_cbDescription_l0w0bt_k$(tmp5_safe_receiver == null ? null : tmp5_safe_receiver.get_description_emjre5_k$());
            if (!(this.$selectedContentEntry_1 == null)) {
              var tmp6_safe_receiver = this.$selectedContentEntry_1.get_entry_iqxd1l_k$();
              var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.get_contentEntryUid_pu6bbm_k$();
              this_0.set_cbEntityUid_m0t7oz_k$(tmp7_elvis_lhs == null ? new Long(0, 0) : tmp7_elvis_lhs);
              this_0.set_cbType_tflke_k$(Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$());
            }

            var tmp0_safe_receiver_0 = this.$selectedContentEntry_1;
            var tmp5_contentEntry = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_entry_iqxd1l_k$();
            var tmp3_safe_receiver_0 = this.$selectedContentEntry_1;
            var tmp6_contentJob = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.get_contentJob_fsr8c3_k$();
            var tmp2_safe_receiver_0 = this.$selectedContentEntry_1;
            var tmp7_contentJobItem = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.get_contentJobItem_fg7ikg_k$();
            var tmp8_courseBlockPicture = new CourseBlockPicture(newUid);
            var tmp1_safe_receiver = this.$selectedContentEntry_1;
            var tmp9_contentEntryPicture = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_picture_8af27f_k$();
            return new CourseBlockAndEditEntities(this_0, tmp8_courseBlockPicture, tmp5_contentEntry, tmp9_contentEntryPicture, tmp7_contentJobItem, tmp6_contentJob);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new CourseBlockEditViewModel$slambda$slambda_1(this.this$0__1, this.$savedStateHandle_1, this.$selectedContentEntry_1, completion);
  };
  function CourseBlockEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation);
    var l = function ($completion) {
      return i.invoke_48r9su_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseBlockEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9sg25b_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CourseBlockEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'courseBlockDesc');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'courseBlockEditContentEntry');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_2(this.this$0__1, this.$savedStateHandle_1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$slambda$slambda_6(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_26($this) {
    return $this._uiState_1;
  }
  function Companion_148() {
    Companion_instance_148 = this;
    this.DEST_NAME_1 = 'CourseBlockEdit';
    this.ARG_SELECTED_CONTENT_ENTRY_1 = 'SelectedContentEntry';
    this.ARG_BLOCK_TYPE_1 = 'blockType';
    this.KEY_HTML_DESCRIPTION_1 = 'courseBlockDesc';
    this.KEY_CONTENT_ENTRY_EDIT_RESULT_1 = 'courseBlockEditContentEntry';
    this.KEY_SAVED_STATE_SELECTED_CONTENT_ENTRY_1 = 'SavedSelectedContentEntry';
    this.COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_1 = listOf(['blockType', Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), Companion_getInstance_200().get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$(), 'blockType', Companion_getInstance_156().get_ARG_RESULT_DEST_VIEWNAME_8buuo3_k$(), Companion_getInstance_156().get_ARG_RESULT_DEST_KEY_eanr0y_k$(), Companion_getInstance_159().get_ARG_LISTMODE_1jy3rh_k$()]);
  }
  protoOf(Companion_148).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_148).get_ARG_SELECTED_CONTENT_ENTRY_i9aghy_k$ = function () {
    return this.ARG_SELECTED_CONTENT_ENTRY_1;
  };
  protoOf(Companion_148).get_ARG_BLOCK_TYPE_1o21ry_k$ = function () {
    return this.ARG_BLOCK_TYPE_1;
  };
  protoOf(Companion_148).get_KEY_HTML_DESCRIPTION_ylwexd_k$ = function () {
    return this.KEY_HTML_DESCRIPTION_1;
  };
  protoOf(Companion_148).get_KEY_CONTENT_ENTRY_EDIT_RESULT_8syzgq_k$ = function () {
    return this.KEY_CONTENT_ENTRY_EDIT_RESULT_1;
  };
  protoOf(Companion_148).get_KEY_SAVED_STATE_SELECTED_CONTENT_ENTRY_m0ryk7_k$ = function () {
    return this.KEY_SAVED_STATE_SELECTED_CONTENT_ENTRY_1;
  };
  protoOf(Companion_148).get_COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_68n2cb_k$ = function () {
    return this.COURSE_BLOCK_CONTENT_ENTRY_PASS_THROUGH_ARGS_1;
  };
  var Companion_instance_148;
  function Companion_getInstance_209() {
    if (Companion_instance_148 == null)
      new Companion_148();
    return Companion_instance_148;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_26(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_26).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, 'SelectedContentEntry', Companion_getInstance_53().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.selectedContentEntry0__1 = suspendResult;
            this.tmp0_serializer1__1 = Companion_getInstance_41().serializer_9w0wvi_k$();
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = CourseBlockEditViewModel$slambda$slambda_0(null);
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda_2(this.this$0__1, this.$savedStateHandle_1, this.selectedContentEntry0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(this.tmp0_serializer1__1, VOID, VOID, tmp_0, tmp_1, CourseBlockEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.loadedEntity2__1 = suspendResult;
            var tmp_2 = this;
            var tmp1_safe_receiver = this.loadedEntity2__1;
            tmp_2.contentEntryVal3__1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_contentEntry_hwf2de_k$();
            var tmp_3 = this;
            var tmp2_safe_receiver = this.loadedEntity2__1;
            tmp_3.blockVal4__1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_courseBlock_c2ojbd_k$();
            if (!(this.contentEntryVal3__1 == null) ? !(this.blockVal4__1 == null) : false) {
              if (this.$savedStateHandle_1.get_6bo4tg_k$(Companion_getInstance_155().get_ARG_ENTITY_JSON_x3rfse_k$()) == null) {
                this.WHEN_RESULT5__1 = false;
                this.set_state_rjd8d0_k$(4);
                continue $sm;
              } else {
                if (this.contentEntryVal3__1.get_contentOwnerType_bfan1f_k$() === Companion_getInstance_52().get_OWNER_TYPE_COURSE_9nvo9h_k$() ? this.contentEntryVal3__1.get_contentOwner_i22mf7_k$().equals(this.blockVal4__1.get_cbUid_iplgso_k$()) : false) {
                  var tmp_4 = this;
                  tmp_4.WHEN_RESULT5__1 = true;
                  this.set_state_rjd8d0_k$(4);
                  continue $sm;
                } else {
                  if (this.contentEntryVal3__1.get_contentOwnerType_bfan1f_k$() === Companion_getInstance_52().get_OWNER_TYPE_COURSE_9nvo9h_k$()) {
                    this.set_state_rjd8d0_k$(3);
                    suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsync2_6hwhkq_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.contentEntryVal3__1.get_contentOwner_i22mf7_k$(), PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$(), this);
                    if (suspendResult === get_COROUTINE_SUSPENDED()) {
                      return suspendResult;
                    }
                    continue $sm;
                  } else {
                    this.WHEN_RESULT5__1 = false;
                    this.set_state_rjd8d0_k$(4);
                    continue $sm;
                  }
                }
              }
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 3:
            this.WHEN_RESULT5__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            var canEditContentEntry = this.WHEN_RESULT5__1;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9sg25b_k$(VOID, canEditContentEntry);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_9sg25b_k$(VOID, VOID, VOID, true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            l$ret$5: do {
              var this_2 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_1 = this_2.get_value_j01efc_k$();
                var tmp0_safe_receiver = this.blockVal4__1;
                var tmp1_subject = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cbType_bskq4i_k$();
                var tmp_5 = tmp1_subject === Companion_getInstance_19().get_BLOCK_MODULE_TYPE_bb862a_k$() ? this.this$0__1.createEditTitle_2tyyvi_k$(strings_getInstance().get_add_module_ayzwb7_k$(), strings_getInstance().get_edit_module_qenh9k_k$()) : tmp1_subject === Companion_getInstance_19().get_BLOCK_TEXT_TYPE_61wg5t_k$() ? this.this$0__1.createEditTitle_2tyyvi_k$(strings_getInstance().get_add_text_ise85w_k$(), strings_getInstance().get_edit_text_mcgi1z_k$()) : tmp1_subject === Companion_getInstance_19().get_BLOCK_DISCUSSION_TYPE_ghy0om_k$() ? this.this$0__1.createEditTitle_2tyyvi_k$(strings_getInstance().get_add_discussion_pagynl_k$(), strings_getInstance().get_edit_discussion_21dqp8_k$()) : tmp1_subject === Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$() ? this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_content_block_yqlra3_k$()) : '';
                var tmp_6 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_done_wokv63_k$());
                var nextValue_1 = prevValue_1.copy$default_9ltzmx_k$(VOID, VOID, tmp_5, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_6, VOID, CourseBlockEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            launch(this.$this$launch_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_4(this.this$0__1, null));
            launch(this.$this$launch_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_6(this.this$0__1, this.$savedStateHandle_1, null));
            return Unit_getInstance();
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseBlockEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseBlockEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel(di, savedStateHandle) {
    Companion_getInstance_209();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseBlockEdit');
    this._uiState_1 = MutableStateFlow(new CourseBlockEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_getInstance_35().currentSystemDefault_9rduv_k$().get_id_kntnx8_k$()));
    this.uiState_1 = asStateFlow(this._uiState_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, true, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, CourseBlockEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(CourseBlockEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(CourseBlockEditViewModel).onEntityChanged_ubjyog_k$ = function (courseBlock) {
    if (courseBlock == null)
      return Unit_getInstance();
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.block_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_8ye1e3_k$(courseBlock);
        var tmp1_safe_receiver = prevValue.block_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_courseBlock_c2ojbd_k$();
        var nextValue = prevValue.copy$default_9sg25b_k$(tmp, VOID, VOID, VOID, VOID, this.updateErrorMessageOnChange_silrgy_k$(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_cbTitle_ag03f4_k$(), courseBlock.get_cbTitle_ag03f4_k$(), prevValue.caTitleError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.block_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
    var commitDelay = Companion_getInstance_155().get_DEFAULT_COMMIT_DELAY_oeb5ky_k$();
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_0, VOID, VOID, CourseBlockEditViewModel$onEntityChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null)));
  };
  protoOf(CourseBlockEditViewModel).onClickEditDescription_s23iqh_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().block_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
    this.navigateToEditHtml$default_imw6oe_k$(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cbDescription_asqepg_k$(), 'courseBlockDesc', this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_description_emjre5_k$()));
  };
  protoOf(CourseBlockEditViewModel).onClickEditContentEntry_orwu90_k$ = function () {
    var tmp = Companion_getInstance_200().get_DEST_NAME_gmgk7z_k$();
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().block_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.asContentEntryAndJob_liljbl_k$();
    var tmp_1 = Companion_getInstance_53().serializer_9w0wvi_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>' call
    var tmp0_safe_receiver_0 = this._uiState_1.get_value_j01efc_k$().block_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      var key = Companion_getInstance_200().get_ARG_COURSEBLOCK_ewwwqo_k$();
      var value = this.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_19().serializer_9w0wvi_k$(), tmp0_safe_receiver_0.get_courseBlock_c2ojbd_k$());
      this_0.put_4fpzoq_k$(key, value);
      // Inline function 'kotlin.collections.set' call
      var key_0 = Companion_getInstance_200().get_ARG_GO_TO_ON_CONTENT_ENTRY_DONE_hbb6ne_k$();
      var value_0 = Companion_getInstance_200().get_FINISH_WITHOUT_SAVE_TO_DB_gk7p4q_k$().toString();
      this_0.put_4fpzoq_k$(key_0, value_0);
    }
    var tmp$ret$3 = this_0.build_1k0s4u_k$();
    this.navigateForResult$default_qg960j_k$(tmp, 'courseBlockEditContentEntry', tmp_0, tmp_1, tmp$ret$3);
  };
  protoOf(CourseBlockEditViewModel).onPictureChanged_tcb4ji_k$ = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.block_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.block_1.get_courseBlockPicture_gnlyiz_k$();
          tmp = tmp1_safe_receiver.copy$default_8ye1e3_k$(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_gigcpw_k$(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.copy$default_9sg25b_k$(tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.block_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_41().serializer_9w0wvi_k$();
    var commitDelay = Companion_getInstance_155().get_DEFAULT_COMMIT_DELAY_oeb5ky_k$();
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_0, VOID, VOID, CourseBlockEditViewModel$onPictureChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null)));
  };
  protoOf(CourseBlockEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().block_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseBlockVal = tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = courseBlockVal.get_courseBlock_c2ojbd_k$().get_cbTitle_ag03f4_k$();
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : isBlank(this_0)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this._uiState_1;
        while (true) {
          var prevValue = this_1.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.copy$default_9sg25b_k$(VOID, VOID, VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_required_wq3z3c_k$()));
          if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (this._uiState_1.get_value_j01efc_k$().get_hasErrors_2nabd0_k$())
      return Unit_getInstance();
    this.finishWithResult_jlqwtj_k$(this._uiState_1.get_value_j01efc_k$().block_1);
  };
  function _get_$childSerializers__r2zwns_21($this) {
    return $this.$childSerializers_1;
  }
  function Companion_149() {
    Companion_instance_149 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, new ArrayListSerializer(Companion_getInstance_208().serializer_9w0wvi_k$()), null, null, null, null, null, null, null, null];
  }
  protoOf(Companion_149).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_71();
  };
  var Companion_instance_149;
  function Companion_getInstance_210() {
    if (Companion_instance_149 == null)
      new Companion_149();
    return Companion_instance_149;
  }
  function $serializer_61() {
    $serializer_instance_61 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditUiState', this, 11);
    tmp0_serialDesc.addElement_5pzumi_k$('block', true);
    tmp0_serialDesc.addElement_5pzumi_k$('canEditSelectedContentEntry', true);
    tmp0_serialDesc.addElement_5pzumi_k$('completionCriteriaOptions', true);
    tmp0_serialDesc.addElement_5pzumi_k$('fieldsEnabled', true);
    tmp0_serialDesc.addElement_5pzumi_k$('caHideUntilDateError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('caTitleError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('caDeadlineError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('caMaxPointsError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('maxPointsRequired', true);
    tmp0_serialDesc.addElement_5pzumi_k$('caGracePeriodError', true);
    tmp0_serialDesc.addElement_5pzumi_k$('timeZone', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_61).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_61).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_210().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_5()), BooleanSerializer_getInstance(), tmp0_cached[2], BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_61).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = false;
    var tmp6_local2 = null;
    var tmp7_local3 = false;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp16_cached = Companion_getInstance_210().$childSerializers_1;
    if (tmp15_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp15_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp15_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp15_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp15_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp15_input.decodeStringElement_3oenpg_k$(tmp0_desc, 10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp15_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp15_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp15_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp15_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp15_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp15_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp15_input.decodeStringElement_3oenpg_k$(tmp0_desc, 10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp15_input.endStructure_1xqz0n_k$(tmp0_desc);
    return CourseBlockEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, null);
  };
  protoOf($serializer_61).serialize_k90bin_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_210().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.block_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 0, $serializer_getInstance_5(), value.block_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.canEditSelectedContentEntry_1 === false)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 1, value.canEditSelectedContentEntry_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !equals(value.completionCriteriaOptions_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 2, tmp2_cached[2], value.completionCriteriaOptions_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.fieldsEnabled_1 === false)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 3, value.fieldsEnabled_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.caHideUntilDateError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, StringSerializer_getInstance(), value.caHideUntilDateError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 5) ? true : !(value.caTitleError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 5, StringSerializer_getInstance(), value.caTitleError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 6) ? true : !(value.caDeadlineError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 6, StringSerializer_getInstance(), value.caDeadlineError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 7) ? true : !(value.caMaxPointsError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 7, StringSerializer_getInstance(), value.caMaxPointsError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 8) ? true : !(value.maxPointsRequired_1 === false)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 8, value.maxPointsRequired_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 9) ? true : !(value.caGracePeriodError_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 9, StringSerializer_getInstance(), value.caGracePeriodError_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 10) ? true : !(value.timeZone_1 === 'UTC')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 10, value.timeZone_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_61).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_k90bin_k$(encoder, value instanceof CourseBlockEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_61;
  function $serializer_getInstance_71() {
    if ($serializer_instance_61 == null)
      new $serializer_61();
    return $serializer_instance_61;
  }
  function CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_71().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.block_1 = null;
    else
      $this.block_1 = block;
    if (0 === (seen1 & 2))
      $this.canEditSelectedContentEntry_1 = false;
    else
      $this.canEditSelectedContentEntry_1 = canEditSelectedContentEntry;
    if (0 === (seen1 & 4))
      $this.completionCriteriaOptions_1 = emptyList();
    else
      $this.completionCriteriaOptions_1 = completionCriteriaOptions;
    if (0 === (seen1 & 8))
      $this.fieldsEnabled_1 = false;
    else
      $this.fieldsEnabled_1 = fieldsEnabled;
    if (0 === (seen1 & 16))
      $this.caHideUntilDateError_1 = null;
    else
      $this.caHideUntilDateError_1 = caHideUntilDateError;
    if (0 === (seen1 & 32))
      $this.caTitleError_1 = null;
    else
      $this.caTitleError_1 = caTitleError;
    if (0 === (seen1 & 64))
      $this.caDeadlineError_1 = null;
    else
      $this.caDeadlineError_1 = caDeadlineError;
    if (0 === (seen1 & 128))
      $this.caMaxPointsError_1 = null;
    else
      $this.caMaxPointsError_1 = caMaxPointsError;
    if (0 === (seen1 & 256))
      $this.maxPointsRequired_1 = false;
    else
      $this.maxPointsRequired_1 = maxPointsRequired;
    if (0 === (seen1 & 512))
      $this.caGracePeriodError_1 = null;
    else
      $this.caGracePeriodError_1 = caGracePeriodError;
    if (0 === (seen1 & 1024))
      $this.timeZone_1 = 'UTC';
    else
      $this.timeZone_1 = timeZone;
    return $this;
  }
  function CourseBlockEditUiState_init_$Create$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker) {
    return CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, objectCreate(protoOf(CourseBlockEditUiState)));
  }
  function CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    Companion_getInstance_210();
    block = block === VOID ? null : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? false : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? emptyList() : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? null : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? null : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? null : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? null : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? false : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? null : caGracePeriodError;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.block_1 = block;
    this.canEditSelectedContentEntry_1 = canEditSelectedContentEntry;
    this.completionCriteriaOptions_1 = completionCriteriaOptions;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.caHideUntilDateError_1 = caHideUntilDateError;
    this.caTitleError_1 = caTitleError;
    this.caDeadlineError_1 = caDeadlineError;
    this.caMaxPointsError_1 = caMaxPointsError;
    this.maxPointsRequired_1 = maxPointsRequired;
    this.caGracePeriodError_1 = caGracePeriodError;
    this.timeZone_1 = timeZone;
  }
  protoOf(CourseBlockEditUiState).get_block_ip8l7o_k$ = function () {
    return this.block_1;
  };
  protoOf(CourseBlockEditUiState).get_canEditSelectedContentEntry_nofq8r_k$ = function () {
    return this.canEditSelectedContentEntry_1;
  };
  protoOf(CourseBlockEditUiState).get_completionCriteriaOptions_hz3qp2_k$ = function () {
    return this.completionCriteriaOptions_1;
  };
  protoOf(CourseBlockEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CourseBlockEditUiState).get_caHideUntilDateError_ggrxb9_k$ = function () {
    return this.caHideUntilDateError_1;
  };
  protoOf(CourseBlockEditUiState).get_caTitleError_zef6eh_k$ = function () {
    return this.caTitleError_1;
  };
  protoOf(CourseBlockEditUiState).get_caDeadlineError_lep2qf_k$ = function () {
    return this.caDeadlineError_1;
  };
  protoOf(CourseBlockEditUiState).get_caMaxPointsError_df0hpk_k$ = function () {
    return this.caMaxPointsError_1;
  };
  protoOf(CourseBlockEditUiState).get_maxPointsRequired_8cy0sj_k$ = function () {
    return this.maxPointsRequired_1;
  };
  protoOf(CourseBlockEditUiState).get_caGracePeriodError_weo8ay_k$ = function () {
    return this.caGracePeriodError_1;
  };
  protoOf(CourseBlockEditUiState).get_timeZone_4vh49u_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(CourseBlockEditUiState).get_minScoreVisible_vo2eix_k$ = function () {
    var tmp0_safe_receiver = this.block_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cbCompletionCriteria_u1vf4z_k$()) === Companion_getInstance_52().get_COMPLETION_CRITERIA_MIN_SCORE_lqhbxd_k$();
  };
  protoOf(CourseBlockEditUiState).get_gracePeriodVisible_ad13qa_k$ = function () {
    var tmp;
    if (this.get_deadlineVisible_oshc7l_k$()) {
      var tmp0_safe_receiver = this.block_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cbDeadlineDate_nvh1aq_k$());
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).get_latePenaltyVisible_g5zc08_k$ = function () {
    var tmp;
    if (this.get_gracePeriodVisible_ad13qa_k$()) {
      var tmp0_safe_receiver = this.block_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cbGracePeriodDate_kapsrj_k$());
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).get_completionCriteriaVisible_aeoru6_k$ = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.completionCriteriaOptions_1.isEmpty_y1axqb_k$();
  };
  protoOf(CourseBlockEditUiState).get_deadlineVisible_oshc7l_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.block_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
    if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cbType_bskq4i_k$()) === Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$()) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.block_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_courseBlock_c2ojbd_k$();
      tmp = (tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_cbType_bskq4i_k$()) === Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$();
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).get_maxPointsVisible_vak370_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.block_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_courseBlock_c2ojbd_k$();
    if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_cbType_bskq4i_k$()) === Companion_getInstance_19().get_BLOCK_ASSIGNMENT_TYPE_9x3ld_k$()) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.block_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_courseBlock_c2ojbd_k$();
      tmp = (tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_cbType_bskq4i_k$()) === Companion_getInstance_19().get_BLOCK_CONTENT_TYPE_w45ev9_k$();
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).get_hasErrors_2nabd0_k$ = function () {
    return ((!(this.caTitleError_1 == null) ? true : !(this.caDeadlineError_1 == null)) ? true : !(this.caGracePeriodError_1 == null)) ? true : !(this.caMaxPointsError_1 == null);
  };
  protoOf(CourseBlockEditUiState).component1_7eebsc_k$ = function () {
    return this.block_1;
  };
  protoOf(CourseBlockEditUiState).component2_7eebsb_k$ = function () {
    return this.canEditSelectedContentEntry_1;
  };
  protoOf(CourseBlockEditUiState).component3_7eebsa_k$ = function () {
    return this.completionCriteriaOptions_1;
  };
  protoOf(CourseBlockEditUiState).component4_7eebs9_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CourseBlockEditUiState).component5_7eebs8_k$ = function () {
    return this.caHideUntilDateError_1;
  };
  protoOf(CourseBlockEditUiState).component6_7eebs7_k$ = function () {
    return this.caTitleError_1;
  };
  protoOf(CourseBlockEditUiState).component7_7eebs6_k$ = function () {
    return this.caDeadlineError_1;
  };
  protoOf(CourseBlockEditUiState).component8_7eebs5_k$ = function () {
    return this.caMaxPointsError_1;
  };
  protoOf(CourseBlockEditUiState).component9_7eebs4_k$ = function () {
    return this.maxPointsRequired_1;
  };
  protoOf(CourseBlockEditUiState).component10_gazzfo_k$ = function () {
    return this.caGracePeriodError_1;
  };
  protoOf(CourseBlockEditUiState).component11_gazzfn_k$ = function () {
    return this.timeZone_1;
  };
  protoOf(CourseBlockEditUiState).copy_p7apd2_k$ = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    return new CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).copy$default_9sg25b_k$ = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, $super) {
    block = block === VOID ? this.block_1 : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? this.canEditSelectedContentEntry_1 : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? this.completionCriteriaOptions_1 : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? this.caHideUntilDateError_1 : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? this.caTitleError_1 : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? this.caDeadlineError_1 : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? this.caMaxPointsError_1 : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? this.maxPointsRequired_1 : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? this.caGracePeriodError_1 : caGracePeriodError;
    timeZone = timeZone === VOID ? this.timeZone_1 : timeZone;
    return $super === VOID ? this.copy_p7apd2_k$(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) : $super.copy_p7apd2_k$.call(this, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).toString = function () {
    return 'CourseBlockEditUiState(block=' + this.block_1 + ', canEditSelectedContentEntry=' + this.canEditSelectedContentEntry_1 + ', completionCriteriaOptions=' + this.completionCriteriaOptions_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', caHideUntilDateError=' + this.caHideUntilDateError_1 + ', caTitleError=' + this.caTitleError_1 + ', caDeadlineError=' + this.caDeadlineError_1 + ', caMaxPointsError=' + this.caMaxPointsError_1 + ', maxPointsRequired=' + this.maxPointsRequired_1 + ', caGracePeriodError=' + this.caGracePeriodError_1 + ', timeZone=' + this.timeZone_1 + ')';
  };
  protoOf(CourseBlockEditUiState).hashCode = function () {
    var result = this.block_1 == null ? 0 : this.block_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.canEditSelectedContentEntry_1) | 0;
    result = imul(result, 31) + hashCode(this.completionCriteriaOptions_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + (this.caHideUntilDateError_1 == null ? 0 : getStringHashCode(this.caHideUntilDateError_1)) | 0;
    result = imul(result, 31) + (this.caTitleError_1 == null ? 0 : getStringHashCode(this.caTitleError_1)) | 0;
    result = imul(result, 31) + (this.caDeadlineError_1 == null ? 0 : getStringHashCode(this.caDeadlineError_1)) | 0;
    result = imul(result, 31) + (this.caMaxPointsError_1 == null ? 0 : getStringHashCode(this.caMaxPointsError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.maxPointsRequired_1) | 0;
    result = imul(result, 31) + (this.caGracePeriodError_1 == null ? 0 : getStringHashCode(this.caGracePeriodError_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.timeZone_1) | 0;
    return result;
  };
  protoOf(CourseBlockEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseBlockEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseBlockEditUiState ? other : THROW_CCE();
    if (!equals(this.block_1, tmp0_other_with_cast.block_1))
      return false;
    if (!(this.canEditSelectedContentEntry_1 === tmp0_other_with_cast.canEditSelectedContentEntry_1))
      return false;
    if (!equals(this.completionCriteriaOptions_1, tmp0_other_with_cast.completionCriteriaOptions_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.caHideUntilDateError_1 == tmp0_other_with_cast.caHideUntilDateError_1))
      return false;
    if (!(this.caTitleError_1 == tmp0_other_with_cast.caTitleError_1))
      return false;
    if (!(this.caDeadlineError_1 == tmp0_other_with_cast.caDeadlineError_1))
      return false;
    if (!(this.caMaxPointsError_1 == tmp0_other_with_cast.caMaxPointsError_1))
      return false;
    if (!(this.maxPointsRequired_1 === tmp0_other_with_cast.maxPointsRequired_1))
      return false;
    if (!(this.caGracePeriodError_1 == tmp0_other_with_cast.caGracePeriodError_1))
      return false;
    if (!(this.timeZone_1 === tmp0_other_with_cast.timeZone_1))
      return false;
    return true;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).invoke_581fsx_k$ = function (it, $completion) {
    var tmp = this.create_mohwct_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_581fsx_k$((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy_u1isph_k$(this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).create_mohwct_k$ = function (it, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_mohwct_k$((value == null ? true : value instanceof CourseBlockAndPicture) ? value : THROW_CCE(), completion);
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_581fsx_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$().findByUidWithPictureAsFlow_n0b42e_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_27(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.textblockdetail.TextBlockDetailViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, title);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, TextBlockDetailViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          launchSetTitleFromClazzUid(this.this$0__1, this.this$0__1.clazzUid_1, TextBlockDetailViewModel$slambda$slambda$lambda(this.this$0__1));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new TextBlockDetailViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, completion);
  };
  function TextBlockDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get__uiState__8e9jsd_27($this) {
    return $this._uiState_1;
  }
  function _get_clazzUid__rrng1f_14($this) {
    return $this.clazzUid_1;
  }
  function Companion_150() {
    Companion_instance_150 = this;
    this.DEST_NAME_1 = 'CourseText';
  }
  protoOf(Companion_150).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_150;
  function Companion_getInstance_211() {
    if (Companion_instance_150 == null)
      new Companion_150();
    return Companion_instance_150;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_27(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_27).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function TextBlockDetailViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TextBlockDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, TextBlockDetailViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(TextBlockDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function TextBlockDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_211();
    DetailViewModel.call(this, di, savedStateHandle, 'CourseText');
    this._uiState_1 = MutableStateFlow(new TextBlockDetailUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, TextBlockDetailViewModel$slambda_0(this, null));
  }
  protoOf(TextBlockDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function TextBlockDetailUiState(courseBlock) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    this.courseBlock_1 = courseBlock;
  }
  protoOf(TextBlockDetailUiState).get_courseBlock_c2ojbd_k$ = function () {
    return this.courseBlock_1;
  };
  protoOf(TextBlockDetailUiState).component1_7eebsc_k$ = function () {
    return this.courseBlock_1;
  };
  protoOf(TextBlockDetailUiState).copy_u1isph_k$ = function (courseBlock) {
    return new TextBlockDetailUiState(courseBlock);
  };
  protoOf(TextBlockDetailUiState).copy$default_d2y4zy_k$ = function (courseBlock, $super) {
    courseBlock = courseBlock === VOID ? this.courseBlock_1 : courseBlock;
    return $super === VOID ? this.copy_u1isph_k$(courseBlock) : $super.copy_u1isph_k$.call(this, courseBlock);
  };
  protoOf(TextBlockDetailUiState).toString = function () {
    return 'TextBlockDetailUiState(courseBlock=' + this.courseBlock_1 + ')';
  };
  protoOf(TextBlockDetailUiState).hashCode = function () {
    return this.courseBlock_1 == null ? 0 : this.courseBlock_1.hashCode();
  };
  protoOf(TextBlockDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TextBlockDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TextBlockDetailUiState ? other : THROW_CCE();
    if (!equals(this.courseBlock_1, tmp0_other_with_cast.courseBlock_1))
      return false;
    return true;
  };
  function CourseGroupSetDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.onClickEdit_d3bakd_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).invoke_2dd0cb_k$ = function (entity, permissionPair, $completion) {
    var tmp = this.create_v74rnb_k$(entity, permissionPair, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.invoke_2dd0cb_k$(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return to(this.entity_1, this.permissionPair_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).create_v74rnb_k$ = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.entity_1 = entity;
    i.permissionPair_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.invoke_2dd0cb_k$(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_nwcmm4_k$ = function (it, $completion) {
    var tmp = this.create_3891fk_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_nwcmm4_k$(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_container = this.it_1.get_second_jf7fjx_k$();
          var hasCourseViewPermission = tmp0_container.component1_7eebsc_k$();
          var hasManageStudentPermission = tmp0_container.component2_7eebsb_k$();
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var this_1 = this.it_1.get_first_irdx8n_k$();
              var tmp_0;
              if (hasCourseViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var nextValue = prevValue.copy$default_5m8dng_k$(VOID, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_2.get_value_j01efc_k$();
              var tmp_1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_wol9w3_k$());
              var tmp_2 = FabIcon_EDIT_getInstance();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(new FabUiState(hasManageStudentPermission, tmp_1, tmp_2, CourseGroupSetDetailViewModel$onClickEdit$ref(this.this$0__1)));
              if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).create_3891fk_k$ = function (it, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_3891fk_k$(value instanceof Pair ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_nwcmm4_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).invoke_ni23iq_k$ = function (entity, permissionPair, $completion) {
    var tmp = this.create_bxv5c4_k$(entity, permissionPair, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE();
    return this.invoke_ni23iq_k$(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.entity_1;
          var tmp_0;
          if (this.permissionPair_1.get_firstPermission_y8246u_k$()) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).create_bxv5c4_k$ = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(completion);
    i.entity_1 = entity;
    i.permissionPair_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.invoke_ni23iq_k$(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).invoke_kj8vwl_k$ = function (courseGroupSet, $completion) {
    var tmp = this.create_fod3gh_k$(courseGroupSet, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_kj8vwl_k$((p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_5m8dng_k$(this.courseGroupSet_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var tmp0_safe_receiver = this.courseGroupSet_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cgsName_d9s72p_k$();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).create_fod3gh_k$ = function (courseGroupSet, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.courseGroupSet_1 = courseGroupSet;
    return i;
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_fod3gh_k$((value == null ? true : value instanceof CourseGroupSet) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (courseGroupSet, $completion) {
      return i.invoke_kj8vwl_k$(courseGroupSet, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    this.$memberListFlow_1 = $memberListFlow;
    this.$permissionsFlow_1 = $permissionsFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(combine(this.$memberListFlow_1, this.$permissionsFlow_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_28(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda(this.$memberListFlow_1, this.$permissionsFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_0($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    this.$entityFlow_1 = $entityFlow;
    this.$permissionsFlow_1 = $permissionsFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = combine(this.$entityFlow_1, this.$permissionsFlow_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(null));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_28(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1(this.$entityFlow_1, this.$permissionsFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_2($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.$memberListFlow_1 = $memberListFlow;
    this.$permissionsFlow_1 = $permissionsFlow;
    this.this$0__1 = this$0;
    this.$entityFlow_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_0(this.$memberListFlow_1, this.$permissionsFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_2(this.$entityFlow_1, this.$permissionsFlow_1, this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new CourseGroupSetDetailViewModel$slambda$slambda(this.$this_launch_1, this.$memberListFlow_1, this.$permissionsFlow_1, this.this$0__1, this.$entityFlow_1, completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda_0($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get__uiState__8e9jsd_28($this) {
    return $this._uiState_1;
  }
  function Companion_151() {
    Companion_instance_151 = this;
    this.DEST_NAME_1 = 'CourseGroupSet';
  }
  protoOf(Companion_151).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_151;
  function Companion_getInstance_212() {
    if (Companion_instance_151 == null)
      new Companion_151();
    return Companion_instance_151;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_28(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_28).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.permissionsFlow0__1 = shareIn(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzPairAsFlow_gv7o5k_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.argClazzUid_1, PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$()), this.this$0__1.get_viewModelScope_ryv1dz_k$(), Companion_getInstance_38().WhileSubscribed$default_3cgwv5_k$());
            this.memberListFlow1__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseGroupMemberDao_da0s0k_k$().findByCourseGroupSetAndClazzAsFlow_4ra83v_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.this$0__1.argClazzUid_1, systemTimeInMillis(), 0, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            this.entityFlow2__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseGroupSetDao_romfis_k$().findByUidAsFlow_fzg2cy_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, CourseGroupSetDetailViewModel$slambda$slambda_0(this.$this$launch_1, this.memberListFlow1__1, this.permissionsFlow0__1, this.this$0__1, this.entityFlow2__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_212();
    DetailViewModel.call(this, di, savedStateHandle, 'CourseGroupSet');
    this._uiState_1 = MutableStateFlow(new CourseGroupSetDetailUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.argClazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, CourseGroupSetDetailViewModel$slambda_0(this, null));
  }
  protoOf(CourseGroupSetDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(CourseGroupSetDetailViewModel).get_argClazzUid_g89nmt_k$ = function () {
    return this.argClazzUid_1;
  };
  protoOf(CourseGroupSetDetailViewModel).onClickEdit_d3bakd_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_213().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), this.get_entityUidArg_hgo6pe_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.argClazzUid_1.toString())]));
  };
  function CourseGroupSetDetailUiState(courseGroupSet, membersList) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    this.courseGroupSet_1 = courseGroupSet;
    this.membersList_1 = membersList;
  }
  protoOf(CourseGroupSetDetailUiState).get_courseGroupSet_txhi1z_k$ = function () {
    return this.courseGroupSet_1;
  };
  protoOf(CourseGroupSetDetailUiState).get_membersList_xyl9n6_k$ = function () {
    return this.membersList_1;
  };
  protoOf(CourseGroupSetDetailUiState).component1_7eebsc_k$ = function () {
    return this.courseGroupSet_1;
  };
  protoOf(CourseGroupSetDetailUiState).component2_7eebsb_k$ = function () {
    return this.membersList_1;
  };
  protoOf(CourseGroupSetDetailUiState).copy_d293aa_k$ = function (courseGroupSet, membersList) {
    return new CourseGroupSetDetailUiState(courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).copy$default_5m8dng_k$ = function (courseGroupSet, membersList, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.courseGroupSet_1 : courseGroupSet;
    membersList = membersList === VOID ? this.membersList_1 : membersList;
    return $super === VOID ? this.copy_d293aa_k$(courseGroupSet, membersList) : $super.copy_d293aa_k$.call(this, courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).toString = function () {
    return 'CourseGroupSetDetailUiState(courseGroupSet=' + this.courseGroupSet_1 + ', membersList=' + this.membersList_1 + ')';
  };
  protoOf(CourseGroupSetDetailUiState).hashCode = function () {
    var result = this.courseGroupSet_1 == null ? 0 : hashCode(this.courseGroupSet_1);
    result = imul(result, 31) + hashCode(this.membersList_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetDetailUiState ? other : THROW_CCE();
    if (!equals(this.courseGroupSet_1, tmp0_other_with_cast.courseGroupSet_1))
      return false;
    if (!equals(this.membersList_1, tmp0_other_with_cast.membersList_1))
      return false;
    return true;
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$courseGroupSetUid_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).invoke_g1bwrc_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g1bwrc_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.courseGroupMemberDao_da0s0k_k$().findByCourseGroupSetAndClazz_7y65w5_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.this$0__1.clazzUidArg_1, systemTimeInMillis(), 0, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this0__1 = suspendResult;
            var tmp_0 = this;
            tmp_0.this1__1 = this.this0__1;
            var tmp_1 = this;
            tmp_1.destination2__1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.this0__1, 10));
            this.tmp0_iterator3__1 = this.this1__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (!this.tmp0_iterator3__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

            this.item4__1 = this.tmp0_iterator3__1.next_20eer_k$();
            var tmp_2 = this;
            tmp_2.it5__1 = this.item4__1;
            if (this.it5__1.get_cgm_18j84g_k$() == null) {
              var tmp_3 = this;
              tmp_3.this7__1 = new CourseGroupMemberAndName();
              var tmp_4 = this;
              tmp_4.$this$apply8__1 = this.this7__1;
              this.$this$apply8__1.set_name_wkmnld_k$(this.it5__1.get_name_woqyms_k$());
              this.$this$apply8__1.set_enrolmentIsActive_qmxdoi_k$(this.it5__1.get_enrolmentIsActive_5hix1x_k$());
              this.$this$apply8__1.set_personUid_j3idds_k$(this.it5__1.get_personUid_mmhd76_k$());
              this.$this$apply8__1.set_pictureUri_ldxxh0_k$(this.it5__1.get_pictureUri_oz22hj_k$());
              var tmp_5 = this;
              tmp_5.this9__1 = new CourseGroupMember();
              var tmp_6 = this;
              tmp_6.$this$apply10__1 = this.this9__1;
              this.set_state_rjd8d0_k$(3);
              suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_54().get_TABLE_ID_xo2mej_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.WHEN_RESULT6__1 = this.it5__1;
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.$this$apply10__1.set_cgmUid_ev2k12_k$(ARGUMENT);
            this.$this$apply10__1.set_cgmSetUid_59g4u4_k$(this.$courseGroupSetUid_1);
            this.$this$apply10__1.set_cgmPersonUid_6dl15b_k$(this.it5__1.get_personUid_mmhd76_k$());
            var ARGUMENT_0 = this.this9__1;
            this.$this$apply8__1.set_cgm_8hk7qi_k$(ARGUMENT_0);
            this.WHEN_RESULT6__1 = this.this7__1;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            var ARGUMENT_1 = this.WHEN_RESULT6__1;
            this.destination2__1.add_utx5q5_k$(ARGUMENT_1);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 5:
            return this.destination2__1;
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this.this$0__1, this.$courseGroupSetUid_1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_g1bwrc_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).invoke_8v7gzv_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_8v7gzv_k$($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return emptyList();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_2(resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_8v7gzv_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda(this$0) {
    return function (memberList) {
      var tmp;
      if (!(memberList == null)) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0._uiState_1;
          while (true) {
            var prevValue = this_0.get_value_j01efc_k$();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.copy$default_e65wn6_k$(VOID, memberList);
            if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
              tmp$ret$1 = Unit_getInstance();
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      }
      return Unit_getInstance();
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).invoke_s6c9rs_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_s6c9rs_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.db_1;
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.tmp1_safe_receiver0__1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.courseGroupSetDao_romfis_k$();
            if (this.tmp1_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp1_safe_receiver0__1.findByUidAsync_1hmhhx_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT1__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).create_9q7izm_k$ = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_s6c9rs_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation) {
    this.$courseGroupSetUid_1 = $courseGroupSetUid;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).invoke_b78jk5_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_b78jk5_k$($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = new CourseGroupSet();
          this_0.set_cgsUid_diq868_k$(this.$courseGroupSetUid_1);
          this_0.set_cgsClazzUid_5es9x0_k$(this.this$0__1.clazzUidArg_1);
          return this_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).create_d196fn_k$ = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_5(this.$courseGroupSetUid_1, this.this$0__1, completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_6($courseGroupSetUid, this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_b78jk5_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_e65wn6_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$courseGroupSetUid_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).invoke_1a7flx_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_1a7flx_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = ListSerializer(Companion_getInstance_55().serializer_9w0wvi_k$());
            var tmp_1 = listOf_0('courseGroupMembers');
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this.this$0__1, this.$courseGroupSetUid_1, null);
            var tmp_3 = CourseGroupSetEditViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, tmp_1, VOID, tmp_2, tmp_3, CourseGroupSetEditViewModel$slambda$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this.this$0__1, this.$courseGroupSetUid_1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_1a7flx_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation) {
    this.this$0__1 = this$0;
    this.$courseGroupSetUid_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).invoke_jk5dx1_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_jk5dx1_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_56().serializer_9w0wvi_k$();
            var tmp_1 = CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this.this$0__1, null);
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_6(this.$courseGroupSetUid_1, this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this.this$0__1, this.$courseGroupSetUid_1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda_2(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_jk5dx1_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.this$0__1 = this$0;
    this.$courseGroupSet_1 = $courseGroupSet;
    this.$membersToSave_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseGroupSetDao_romfis_k$().upsertAsync_eds9cj_k$(this.$courseGroupSet_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseGroupMemberDao_da0s0k_k$().upsertListAsync_5ptt71_k$(this.$membersToSave_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$courseGroupSet_1, this.$membersToSave_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_29($this) {
    return $this._uiState_1;
  }
  function _get_clazzUidArg__d97bw3($this) {
    return $this.clazzUidArg_1;
  }
  function Companion_152() {
    Companion_instance_152 = this;
    this.DEST_NAME_1 = 'CourseGroupsEdit';
    this.KEY_COURSEGROUPMEMBERS_1 = 'courseGroupMembers';
  }
  protoOf(Companion_152).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_152).get_KEY_COURSEGROUPMEMBERS_74f80u_k$ = function () {
    return this.KEY_COURSEGROUPMEMBERS_1;
  };
  var Companion_instance_152;
  function Companion_getInstance_213() {
    if (Companion_instance_152 == null)
      new Companion_152();
    return Companion_instance_152;
  }
  function CourseGroupSetEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda).invoke_pclm39_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsync2_6hwhkq_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUidArg_1, PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pclm39_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              this.WHEN_RESULT0__1 = this.this$0__1.get_entityUidArg_hgo6pe_k$();
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_56().get_TABLE_ID_xo2mej_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.courseGroupSetUid1__1 = this.WHEN_RESULT0__1;
            this.set_state_rjd8d0_k$(3);
            var tmp_0 = async(this.$this$launchIfHasPermission_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_0(this.this$0__1, this.courseGroupSetUid1__1, null));
            suspendResult = awaitAll([tmp_0, async(this.$this$launchIfHasPermission_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_2(this.this$0__1, this.courseGroupSetUid1__1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_1, true, CourseGroupSetEditViewModel$onClickSave$ref(this.this$0__1));
                var tmp1_loadingState = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_e65wn6_k$(VOID, VOID, VOID, VOID, true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda($groupNumber) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_cgmGroupNumber_dn01qs_k$($groupNumber);
      return Unit_getInstance();
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0($personUid) {
    return function (it) {
      return it.get_personUid_mmhd76_k$().equals($personUid);
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation) {
    this.this$0__1 = this$0;
    this.$newState_1 = $newState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.setJson_jnpl42_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'courseGroupMembers', ListSerializer(Companion_getInstance_55().serializer_9w0wvi_k$()), this.$newState_1.membersList_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this.this$0__1, this.$newState_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this$0, $newState, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$lambda($shuffledPersonUidList, $it, $totalGroups) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_cgmGroupNumber_dn01qs_k$(($shuffledPersonUidList.indexOf_si1fv9_k$($it.get_personUid_mmhd76_k$()) % $totalGroups | 0) + 1 | 0);
      return Unit_getInstance();
    };
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation) {
    this.this$0__1 = this$0;
    this.$newMemberList_1 = $newMemberList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.setJson_jnpl42_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'courseGroupMembers', ListSerializer(Companion_getInstance_55().serializer_9w0wvi_k$()), this.$newMemberList_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this.this$0__1, this.$newMemberList_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this$0, $newMemberList, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.this$0__1 = this$0;
    this.$courseGroupSet_1 = $courseGroupSet;
    this.$membersToSave_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.$courseGroupSet_1, this.$membersToSave_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.finishWithResult_lyhkrz_k$(Companion_getInstance_212().get_DEST_NAME_gmgk7z_k$(), this.$courseGroupSet_1.get_cgsUid_bvuqtm_k$(), this.$courseGroupSet_1, mapOf_0(to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.this$0__1.clazzUidArg_1.toString())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this.this$0__1, this.$courseGroupSet_1, this.$membersToSave_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel(di, savedStateHandle) {
    Companion_getInstance_213();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseGroupsEdit');
    this._uiState_1 = MutableStateFlow(new CourseGroupSetEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.clazzUidArg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>' call
        var tmp0_title = this.createEditTitle_2tyyvi_k$(strings_getInstance().get_add_new_groups_uckp52_k$(), strings_getInstance().get_edit_groups_t72sw0_k$());
        var tmp1_loadingState = Companion_getInstance_145().get_INDETERMINATE_a8koem_k$();
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, tmp1_loadingState, tmp0_title, VOID, true);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = CourseGroupSetEditViewModel$slambda_0(this, null);
    this.launchIfHasPermission$default_l9omam_k$(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(CourseGroupSetEditViewModel).onEntityChanged_5lq32g_k$ = function (courseGroupSet) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.courseGroupSet_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cgsName_d9s72p_k$();
        var tmp_0 = this.updateErrorMessageOnChange_silrgy_k$(tmp, courseGroupSet == null ? null : courseGroupSet.get_cgsName_d9s72p_k$(), prevValue.courseTitleError_1);
        var tmp2_safe_receiver = prevValue.courseGroupSet_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_cgsTotalGroups_qhxh6a_k$();
        var nextValue = prevValue.copy$default_e65wn6_k$(courseGroupSet, VOID, tmp_0, this.updateErrorMessageOnChange_silrgy_k$(tmp_1, courseGroupSet == null ? null : courseGroupSet.get_cgsTotalGroups_qhxh6a_k$(), prevValue.numOfGroupsError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_56().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_2, VOID, VOID, CourseGroupSetEditViewModel$onEntityChanged$slambda_0(commitDelay, courseGroupSet, this, key, serializer, null)));
  };
  protoOf(CourseGroupSetEditViewModel).onChangeGroupAssignment_qbdtzr_k$ = function (personUid, groupNumber) {
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>' call
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlin.collections.first' call
          var tmp0_iterator = prevValue.membersList_1.iterator_jk1svi_k$();
          while (tmp0_iterator.hasNext_bitz1p_k$()) {
            var element = tmp0_iterator.next_20eer_k$();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>.<anonymous>' call
            if (element.get_personUid_mmhd76_k$().equals(personUid)) {
              tmp$ret$1 = element;
              break $l$block;
            }
          }
          throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
        }
        var currentGroupMemberAndName = tmp$ret$1;
        var tmp0_safe_receiver = currentGroupMemberAndName.get_cgm_18j84g_k$();
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_9(tmp0_safe_receiver, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda(groupNumber));
        }
        var tmp_0 = currentGroupMemberAndName.copy$default_e6q3c8_k$(tmp);
        var nextValue = prevValue.copy$default_e65wn6_k$(VOID, replace_0(prevValue.membersList_1, tmp_0, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0(personUid)));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$3 = nextValue;
          break $l$block_0;
        }
      }
    }
    var newState = tmp$ret$3;
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this, newState, null));
  };
  protoOf(CourseGroupSetEditViewModel).onClickAssignRandomly_pzdbmg_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().courseGroupSet_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_cgsTotalGroups_qhxh6a_k$();
    var totalGroups = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this._uiState_1.get_value_j01efc_k$().membersList_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp$ret$0 = item.get_personUid_mmhd76_k$();
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    var shuffledPersonUidList = shuffled(destination);
    // Inline function 'kotlin.collections.map' call
    var this_1 = this._uiState_1.get_value_j01efc_k$().membersList_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
    var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
    while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
      var item_0 = tmp0_iterator_0.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp0_safe_receiver_0 = item_0.get_cgm_18j84g_k$();
      var tmp;
      if (tmp0_safe_receiver_0 == null) {
        tmp = null;
      } else {
        tmp = shallowCopy_9(tmp0_safe_receiver_0, CourseGroupSetEditViewModel$onClickAssignRandomly$lambda(shuffledPersonUidList, item_0, totalGroups));
      }
      var tmp$ret$3 = item_0.copy$default_e6q3c8_k$(tmp);
      destination_0.add_utx5q5_k$(tmp$ret$3);
    }
    var newMemberList = destination_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this._uiState_1;
      while (true) {
        var prevValue = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
        var nextValue = prevValue.copy$default_e65wn6_k$(VOID, newMemberList);
        if (this_2.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this, newMemberList, null));
  };
  protoOf(CourseGroupSetEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().courseGroupSet_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseGroupSet = tmp;
    // Inline function 'kotlin.collections.mapNotNull' call
    // Inline function 'kotlin.collections.mapNotNullTo' call
    var this_0 = this._uiState_1.get_value_j01efc_k$().membersList_1;
    var destination = ArrayList_init_$Create$();
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
      var tmp0_safe_receiver = element.get_cgm_18j84g_k$();
      if (tmp0_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        destination.add_utx5q5_k$(tmp0_safe_receiver);
      }
    }
    var membersToSave = destination;
    var tmp$ret$4;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(membersToSave, Collection)) {
        tmp_0 = membersToSave.isEmpty_y1axqb_k$();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$4 = false;
        break $l$block_0;
      }
      var tmp0_iterator_0 = membersToSave.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var element_0 = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
        if (element_0.get_cgmGroupNumber_t9dymw_k$() > courseGroupSet.get_cgsTotalGroups_qhxh6a_k$()) {
          tmp$ret$4 = true;
          break $l$block_0;
        }
      }
      tmp$ret$4 = false;
    }
    var hasInvalidAssignments = tmp$ret$4;
    if (hasInvalidAssignments) {
      this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$())));
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_1 = courseGroupSet.get_cgsName_d9s72p_k$();
    // Inline function 'kotlin.contracts.contract' call
    if (this_1 == null ? true : isBlank(this_1)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this._uiState_1;
        while (true) {
          var prevValue = this_2.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.copy$default_e65wn6_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_2.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block_1;
          }
        }
      }
    }
    if (courseGroupSet.get_cgsTotalGroups_qhxh6a_k$() < 1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_3.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_e65wn6_k$(VOID, VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_score_greater_than_zero_vlrrqj_k$()));
          if (this_3.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if ((hasInvalidAssignments ? true : !(this._uiState_1.get_value_j01efc_k$().numOfGroupsError_1 == null)) ? true : !(this._uiState_1.get_value_j01efc_k$().courseTitleError_1 == null)) {
      return Unit_getInstance();
    }
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onClickSave$slambda_0(this, courseGroupSet, membersToSave, null));
  };
  function CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    courseTitleError = courseTitleError === VOID ? null : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? null : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.courseGroupSet_1 = courseGroupSet;
    this.membersList_1 = membersList;
    this.courseTitleError_1 = courseTitleError;
    this.numOfGroupsError_1 = numOfGroupsError;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(CourseGroupSetEditUiState).get_courseGroupSet_txhi1z_k$ = function () {
    return this.courseGroupSet_1;
  };
  protoOf(CourseGroupSetEditUiState).get_membersList_xyl9n6_k$ = function () {
    return this.membersList_1;
  };
  protoOf(CourseGroupSetEditUiState).get_courseTitleError_fnueac_k$ = function () {
    return this.courseTitleError_1;
  };
  protoOf(CourseGroupSetEditUiState).get_numOfGroupsError_484rts_k$ = function () {
    return this.numOfGroupsError_1;
  };
  protoOf(CourseGroupSetEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CourseGroupSetEditUiState).component1_7eebsc_k$ = function () {
    return this.courseGroupSet_1;
  };
  protoOf(CourseGroupSetEditUiState).component2_7eebsb_k$ = function () {
    return this.membersList_1;
  };
  protoOf(CourseGroupSetEditUiState).component3_7eebsa_k$ = function () {
    return this.courseTitleError_1;
  };
  protoOf(CourseGroupSetEditUiState).component4_7eebs9_k$ = function () {
    return this.numOfGroupsError_1;
  };
  protoOf(CourseGroupSetEditUiState).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CourseGroupSetEditUiState).copy_2akxf3_k$ = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    return new CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).copy$default_e65wn6_k$ = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.courseGroupSet_1 : courseGroupSet;
    membersList = membersList === VOID ? this.membersList_1 : membersList;
    courseTitleError = courseTitleError === VOID ? this.courseTitleError_1 : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? this.numOfGroupsError_1 : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_2akxf3_k$(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) : $super.copy_2akxf3_k$.call(this, courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).toString = function () {
    return 'CourseGroupSetEditUiState(courseGroupSet=' + this.courseGroupSet_1 + ', membersList=' + this.membersList_1 + ', courseTitleError=' + this.courseTitleError_1 + ', numOfGroupsError=' + this.numOfGroupsError_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(CourseGroupSetEditUiState).hashCode = function () {
    var result = this.courseGroupSet_1 == null ? 0 : hashCode(this.courseGroupSet_1);
    result = imul(result, 31) + hashCode(this.membersList_1) | 0;
    result = imul(result, 31) + (this.courseTitleError_1 == null ? 0 : getStringHashCode(this.courseTitleError_1)) | 0;
    result = imul(result, 31) + (this.numOfGroupsError_1 == null ? 0 : getStringHashCode(this.numOfGroupsError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetEditUiState ? other : THROW_CCE();
    if (!equals(this.courseGroupSet_1, tmp0_other_with_cast.courseGroupSet_1))
      return false;
    if (!equals(this.membersList_1, tmp0_other_with_cast.membersList_1))
      return false;
    if (!(this.courseTitleError_1 == tmp0_other_with_cast.courseTitleError_1))
      return false;
    if (!(this.numOfGroupsError_1 == tmp0_other_with_cast.numOfGroupsError_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function CourseGroupSetListViewModel$slambda$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzAsFlow2_ih3l4q_k$(this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.clazzUid_1, PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$());
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda$lambda($visible) {
    return function () {
      return 'CourseGroupSetList: set showAddItem visible = ' + $visible;
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda_0(this$0) {
    return function (visible) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__uiState_8tkbd_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = Napier_getInstance();
          tmp.v$default_i2q2w7_k$(VOID, VOID, CourseGroupSetListViewModel$slambda$lambda$lambda(visible));
          var nextValue = prevValue.copy$default_eac54x_k$(visible);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = collectClazzNameAndUpdateTitle(this.this$0__1.clazzUid_1, this.this$0__1.get_activeDb_bu92wd_k$(), this.this$0__1.get__appUiState_rulqry_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, CourseGroupSetListViewModel$slambda$slambda$slambda_0(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new CourseGroupSetListViewModel$slambda$slambda(this.$this_launch_1, this.this$0__1, completion);
  };
  function CourseGroupSetListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_clazzUid__rrng1f_15($this) {
    return $this.clazzUid_1;
  }
  function _get_pagingSourceFactory__6w06ky_3($this) {
    return $this.pagingSourceFactory_1;
  }
  function Companion_153() {
    Companion_instance_153 = this;
    this.DEST_NAME_1 = 'CourseGroups';
  }
  protoOf(Companion_153).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_153;
  function Companion_getInstance_214() {
    if (Companion_instance_153 == null)
      new Companion_153();
    return Companion_instance_153;
  }
  function CourseGroupSetListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().courseGroupSetDao_romfis_k$().findAllCourseGroupSetForClazz_4klmtz_k$(this$0.clazzUid_1, toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$()), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().sortOption_1.get_flag_wom2lx_k$());
    };
  }
  function CourseGroupSetListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = CourseGroupSetListViewModel$slambda$lambda(this.this$0__1);
            var tmp_1 = strings_getInstance().get_groups_dy12vx_k$();
            suspendResult = this.this$0__1.collectHasPermissionFlowAndSetAddNewItemUiState_pzgxi3_k$(tmp_0, tmp_1, CourseGroupSetListViewModel$slambda$lambda_0(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, CourseGroupSetListViewModel$slambda$slambda_0(this.$this$launch_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseGroupSetListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel(di, savedStateHandle) {
    Companion_getInstance_214();
    UstadListViewModel.call(this, di, savedStateHandle, new CourseGroupSetListUiState(), 'CourseGroups');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.pagingSourceFactory_1 = CourseGroupSetListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_eac54x_k$(VOID, this.pagingSourceFactory_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, true, VOID, VOID, VOID, this.createSearchEnabledState$default_7v3uai_k$());
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_1, VOID, VOID, CourseGroupSetListViewModel$slambda_0(this, null));
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, CourseGroupSetListViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).onSortOptionChanged_o77dl6_k$ = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.onSortOptionChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_eac54x_k$(VOID, VOID, VOID, sortOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).onClickAdd_cbqifs_k$ = function () {
    this.navigateToCreateNew_mwxhbu_k$(Companion_getInstance_213().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())));
  };
  protoOf(CourseGroupSetListViewModel).onClickEntry_vlpuei_k$ = function (entry) {
    this.navigateOnItemClicked_y77ane_k$(Companion_getInstance_212().get_DEST_NAME_gmgk7z_k$(), entry.get_cgsUid_bvuqtm_k$(), entry, mapOf_0(to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())));
  };
  function Companion_154() {
    Companion_instance_154 = this;
    this.DEFAULT_SORT_OPTIONS_1 = listOf([new SortOrderOption(strings_getInstance().get_name_key_1cwo7g_k$(), CourseGroupSetDaoConstants_getInstance().get_SORT_NAME_ASC_byiy2d_k$(), true), new SortOrderOption(strings_getInstance().get_name_key_1cwo7g_k$(), CourseGroupSetDaoConstants_getInstance().get_SORT_NAME_DESC_fksp65_k$(), false)]);
  }
  protoOf(Companion_154).get_DEFAULT_SORT_OPTIONS_vrjybo_k$ = function () {
    return this.DEFAULT_SORT_OPTIONS_1;
  };
  var Companion_instance_154;
  function Companion_getInstance_215() {
    if (Companion_instance_154 == null)
      new Companion_154();
    return Companion_instance_154;
  }
  function CourseGroupSetListUiState$_init_$lambda_2d65m2() {
    return new EmptyPagingSource();
  }
  function CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption) {
    Companion_getInstance_215();
    showAddItem = showAddItem === VOID ? false : showAddItem;
    var tmp;
    if (courseGroupSets === VOID) {
      tmp = CourseGroupSetListUiState$_init_$lambda_2d65m2;
    } else {
      tmp = courseGroupSets;
    }
    courseGroupSets = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_215().DEFAULT_SORT_OPTIONS_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    this.showAddItem_1 = showAddItem;
    this.courseGroupSets_1 = courseGroupSets;
    this.sortOptions_1 = sortOptions;
    this.sortOption_1 = sortOption;
  }
  protoOf(CourseGroupSetListUiState).get_showAddItem_1b9xri_k$ = function () {
    return this.showAddItem_1;
  };
  protoOf(CourseGroupSetListUiState).get_courseGroupSets_4flu3w_k$ = function () {
    return this.courseGroupSets_1;
  };
  protoOf(CourseGroupSetListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(CourseGroupSetListUiState).get_sortOption_xx8b7o_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(CourseGroupSetListUiState).component1_7eebsc_k$ = function () {
    return this.showAddItem_1;
  };
  protoOf(CourseGroupSetListUiState).component2_7eebsb_k$ = function () {
    return this.courseGroupSets_1;
  };
  protoOf(CourseGroupSetListUiState).component3_7eebsa_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(CourseGroupSetListUiState).component4_7eebs9_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(CourseGroupSetListUiState).copy_sp2l1_k$ = function (showAddItem, courseGroupSets, sortOptions, sortOption) {
    return new CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).copy$default_eac54x_k$ = function (showAddItem, courseGroupSets, sortOptions, sortOption, $super) {
    showAddItem = showAddItem === VOID ? this.showAddItem_1 : showAddItem;
    courseGroupSets = courseGroupSets === VOID ? this.courseGroupSets_1 : courseGroupSets;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    sortOption = sortOption === VOID ? this.sortOption_1 : sortOption;
    return $super === VOID ? this.copy_sp2l1_k$(showAddItem, courseGroupSets, sortOptions, sortOption) : $super.copy_sp2l1_k$.call(this, showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).toString = function () {
    return 'CourseGroupSetListUiState(showAddItem=' + this.showAddItem_1 + ', courseGroupSets=' + this.courseGroupSets_1 + ', sortOptions=' + this.sortOptions_1 + ', sortOption=' + this.sortOption_1 + ')';
  };
  protoOf(CourseGroupSetListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.showAddItem_1);
    result = imul(result, 31) + hashCode(this.courseGroupSets_1) | 0;
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.sortOption_1.hashCode() | 0;
    return result;
  };
  protoOf(CourseGroupSetListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetListUiState ? other : THROW_CCE();
    if (!(this.showAddItem_1 === tmp0_other_with_cast.showAddItem_1))
      return false;
    if (!equals(this.courseGroupSets_1, tmp0_other_with_cast.courseGroupSets_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.sortOption_1.equals(tmp0_other_with_cast.sortOption_1))
      return false;
    return true;
  };
  function CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).invoke_8ktjd6_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_8ktjd6_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.it_1.courseTerminologyDao_p353oa_k$();
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.findByUidAsync_kys5x5_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT1__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function CourseTerminologyEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_8ktjd6_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).invoke_ihflil_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_ihflil_k$($completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.this0__1 = new CourseTerminology();
            var tmp_1 = this;
            tmp_1.$this$apply1__1 = this.this0__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_44().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.$this$apply1__1.set_ctUid_mnnkbo_k$(ARGUMENT);
            return this.this0__1;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new CourseTerminologyEditViewModel$slambda$slambda_1(this.this$0__1, completion);
  };
  function CourseTerminologyEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_ihflil_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$lambda(this$0) {
    return function (terminology) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_j784ns_k$(VOID, terminology, VOID, toTerminologyEntries(terminology, this$0.get_json_woos35_k$(), this$0.get_systemImpl_9jowp4_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get__uiState__8e9jsd_30($this) {
    return $this._uiState_1;
  }
  function Companion_155() {
    Companion_instance_155 = this;
    this.DEST_NAME_1 = 'CourseTerminologyEdit';
  }
  protoOf(Companion_155).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_155;
  function Companion_getInstance_216() {
    if (Companion_instance_155 == null)
      new Companion_155();
    return Companion_instance_155;
  }
  function CourseTerminologyEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseTerminologyEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.tmp0_serializer0__1 = Companion_getInstance_44().serializer_9w0wvi_k$();
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = CourseTerminologyEditViewModel$slambda$slambda_0(this.this$0__1, null);
            var tmp_1 = CourseTerminologyEditViewModel$slambda$slambda_2(this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(this.tmp0_serializer0__1, VOID, VOID, tmp_0, tmp_1, CourseTerminologyEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_j784ns_k$(VOID, VOID, true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp_2 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, VOID, CourseTerminologyEditViewModel$onClickSave$ref(this.this$0__1));
                var tmp1_loadingState = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseTerminologyEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseTerminologyEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseTerminologyEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda($terminologyEntry) {
    return function (it) {
      return it.get_stringResource_4df0w8_k$().equals($terminologyEntry.get_stringResource_4df0w8_k$());
    };
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0($newTermList, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_ctTerminology_932opa_k$(encodeToStringMap($newTermList, this$0.get_json_woos35_k$()));
      return Unit_getInstance();
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.terminology0__1 = tmp_1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseTerminologyDao_p353oa_k$().upsertAsync_ilthfb_k$(this.terminology0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_j784ns_k$(VOID, VOID, true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.this$0__1.finishWithResult_jlqwtj_k$(this.terminology0__1);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseTerminologyEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel(di, savedStateHandle) {
    Companion_getInstance_216();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseTerminologyEdit');
    this._uiState_1 = MutableStateFlow(new CourseTerminologyEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>' call
        var tmp0_title = this.createEditTitle_2tyyvi_k$(strings_getInstance().get_add_new_terminology_xte25v_k$(), strings_getInstance().get_edit_terminology_uysc3d_k$());
        var tmp1_loadingState = Companion_getInstance_145().get_INDETERMINATE_a8koem_k$();
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, tmp1_loadingState, tmp0_title);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(CourseTerminologyEditViewModel).onEntityChanged_c37hqu_k$ = function (courseTerminology) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_j784ns_k$(VOID, courseTerminology);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_44().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$onEntityChanged$slambda_0(commitDelay, courseTerminology, this, key, serializer, null)));
  };
  protoOf(CourseTerminologyEditViewModel).onTerminologyTermChanged_fnwjt7_k$ = function (terminologyEntry) {
    var tmp = this._uiState_1.get_value_j01efc_k$().terminologyTermList_1;
    var newTermList = replace_0(tmp, terminologyEntry, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda(terminologyEntry));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onTerminologyTermChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_j784ns_k$(VOID, VOID, VOID, newTermList);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().entity_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      tmp_0 = shallowCopy_10(tmp0_safe_receiver, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0(newTermList, this));
    }
    this.onEntityChanged_c37hqu_k$(tmp_0);
  };
  protoOf(CourseTerminologyEditViewModel).onClickSave_ncak3a_k$ = function () {
    if (!this._uiState_1.get_value_j01efc_k$().fieldsEnabled_1)
      return Unit_getInstance();
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.copy$default_j784ns_k$(VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList) {
    titleError = titleError === VOID ? null : titleError;
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? emptyList() : terminologyTermList;
    this.titleError_1 = titleError;
    this.entity_1 = entity;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.terminologyTermList_1 = terminologyTermList;
  }
  protoOf(CourseTerminologyEditUiState).get_titleError_l4pwyh_k$ = function () {
    return this.titleError_1;
  };
  protoOf(CourseTerminologyEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.entity_1;
  };
  protoOf(CourseTerminologyEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CourseTerminologyEditUiState).get_terminologyTermList_wzq2r0_k$ = function () {
    return this.terminologyTermList_1;
  };
  protoOf(CourseTerminologyEditUiState).component1_7eebsc_k$ = function () {
    return this.titleError_1;
  };
  protoOf(CourseTerminologyEditUiState).component2_7eebsb_k$ = function () {
    return this.entity_1;
  };
  protoOf(CourseTerminologyEditUiState).component3_7eebsa_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(CourseTerminologyEditUiState).component4_7eebs9_k$ = function () {
    return this.terminologyTermList_1;
  };
  protoOf(CourseTerminologyEditUiState).copy_py0kqy_k$ = function (titleError, entity, fieldsEnabled, terminologyTermList) {
    return new CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).copy$default_j784ns_k$ = function (titleError, entity, fieldsEnabled, terminologyTermList, $super) {
    titleError = titleError === VOID ? this.titleError_1 : titleError;
    entity = entity === VOID ? this.entity_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? this.terminologyTermList_1 : terminologyTermList;
    return $super === VOID ? this.copy_py0kqy_k$(titleError, entity, fieldsEnabled, terminologyTermList) : $super.copy_py0kqy_k$.call(this, titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).toString = function () {
    return 'CourseTerminologyEditUiState(titleError=' + this.titleError_1 + ', entity=' + this.entity_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', terminologyTermList=' + this.terminologyTermList_1 + ')';
  };
  protoOf(CourseTerminologyEditUiState).hashCode = function () {
    var result = this.titleError_1 == null ? 0 : getStringHashCode(this.titleError_1);
    result = imul(result, 31) + (this.entity_1 == null ? 0 : hashCode(this.entity_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + hashCode(this.terminologyTermList_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyEditUiState ? other : THROW_CCE();
    if (!(this.titleError_1 == tmp0_other_with_cast.titleError_1))
      return false;
    if (!equals(this.entity_1, tmp0_other_with_cast.entity_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!equals(this.terminologyTermList_1, tmp0_other_with_cast.terminologyTermList_1))
      return false;
    return true;
  };
  function CourseTerminologyListViewModel$slambda$lambda() {
    return flowOf(true);
  }
  function CourseTerminologyListViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__uiState_8tkbd_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_qvqrhd_k$(VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get_pagingSourceFactory__6w06ky_4($this) {
    return $this.pagingSourceFactory_1;
  }
  function Companion_156() {
    Companion_instance_156 = this;
    this.DEST_NAME_1 = 'CourseTerminologyList';
  }
  protoOf(Companion_156).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_156;
  function Companion_getInstance_217() {
    if (Companion_instance_156 == null)
      new Companion_156();
    return Companion_instance_156;
  }
  function CourseTerminologyListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().courseTerminologyDao_p353oa_k$().findAllCourseTerminologyPagingSource_idosaf_k$();
    };
  }
  function CourseTerminologyListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseTerminologyListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = CourseTerminologyListViewModel$slambda$lambda;
            var tmp_1 = strings_getInstance().get_terminology_hmih12_k$();
            suspendResult = this.this$0__1.collectHasPermissionFlowAndSetAddNewItemUiState_pzgxi3_k$(tmp_0, tmp_1, CourseTerminologyListViewModel$slambda$lambda_0(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseTerminologyListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseTerminologyListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseTerminologyListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyListViewModel(di, savedStateHandle) {
    Companion_getInstance_217();
    UstadListViewModel.call(this, di, savedStateHandle, new CourseTerminologyListUiState(), 'CourseTerminologyList');
    var tmp = this;
    tmp.pagingSourceFactory_1 = CourseTerminologyListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.listTitle_mhmhkq_k$(strings_getInstance().get_terminology_hmih12_k$(), strings_getInstance().get_select_terminology_3njcef_k$()));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_qvqrhd_k$(this.pagingSourceFactory_1);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, CourseTerminologyListViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyListViewModel).onClickAdd_cbqifs_k$ = function () {
    this.navigateToCreateNew$default_bv6w7d_k$(Companion_getInstance_216().get_DEST_NAME_gmgk7z_k$());
  };
  protoOf(CourseTerminologyListViewModel).onClickEntry_kl2ghm_k$ = function (entry) {
    this.navigateOnItemClicked$default_l754h1_k$(Companion_getInstance_216().get_DEST_NAME_gmgk7z_k$(), entry.get_ctUid_ipwyk6_k$(), entry);
  };
  protoOf(CourseTerminologyListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  function CourseTerminologyListUiState$_init_$lambda_k6bmuc() {
    return new EmptyPagingSource();
  }
  function CourseTerminologyListUiState(terminologyList, showAddItemInList) {
    var tmp;
    if (terminologyList === VOID) {
      tmp = CourseTerminologyListUiState$_init_$lambda_k6bmuc;
    } else {
      tmp = terminologyList;
    }
    terminologyList = tmp;
    showAddItemInList = showAddItemInList === VOID ? false : showAddItemInList;
    this.terminologyList_1 = terminologyList;
    this.showAddItemInList_1 = showAddItemInList;
  }
  protoOf(CourseTerminologyListUiState).get_terminologyList_n5oo3c_k$ = function () {
    return this.terminologyList_1;
  };
  protoOf(CourseTerminologyListUiState).get_showAddItemInList_l3msx_k$ = function () {
    return this.showAddItemInList_1;
  };
  protoOf(CourseTerminologyListUiState).component1_7eebsc_k$ = function () {
    return this.terminologyList_1;
  };
  protoOf(CourseTerminologyListUiState).component2_7eebsb_k$ = function () {
    return this.showAddItemInList_1;
  };
  protoOf(CourseTerminologyListUiState).copy_fctkqb_k$ = function (terminologyList, showAddItemInList) {
    return new CourseTerminologyListUiState(terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).copy$default_qvqrhd_k$ = function (terminologyList, showAddItemInList, $super) {
    terminologyList = terminologyList === VOID ? this.terminologyList_1 : terminologyList;
    showAddItemInList = showAddItemInList === VOID ? this.showAddItemInList_1 : showAddItemInList;
    return $super === VOID ? this.copy_fctkqb_k$(terminologyList, showAddItemInList) : $super.copy_fctkqb_k$.call(this, terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).toString = function () {
    return 'CourseTerminologyListUiState(terminologyList=' + this.terminologyList_1 + ', showAddItemInList=' + this.showAddItemInList_1 + ')';
  };
  protoOf(CourseTerminologyListUiState).hashCode = function () {
    var result = hashCode(this.terminologyList_1);
    result = imul(result, 31) + getBooleanHashCode(this.showAddItemInList_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyListUiState ? other : THROW_CCE();
    if (!equals(this.terminologyList_1, tmp0_other_with_cast.terminologyList_1))
      return false;
    if (!(this.showAddItemInList_1 === tmp0_other_with_cast.showAddItemInList_1))
      return false;
    return true;
  };
  function CourseDiscussionDetailViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.onClickAdd_cbqifs_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).invoke_581fsx_k$ = function (it, $completion) {
    var tmp = this.create_mohwct_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_581fsx_k$((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_yualf9_k$(this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).create_mohwct_k$ = function (it, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_mohwct_k$((value == null ? true : value instanceof CourseBlockAndPicture) ? value : THROW_CCE(), completion);
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_581fsx_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).invoke_tixz4u_k$ = function (permissionPair, $completion) {
    var tmp = this.create_syqk0m_k$(permissionPair, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_tixz4u_k$(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.tmp0_container0__1 = this.permissionPair_1;
            this.hasViewPermission1__1 = this.tmp0_container0__1.component1_7eebsc_k$();
            this.hasModeratePermission2__1 = this.tmp0_container0__1.component2_7eebsb_k$();
            if (this.hasViewPermission1__1) {
              l$ret$1: do {
                var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
                while (true) {
                  var prevValue = this_0.get_value_j01efc_k$();
                  var tmp_0 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_post_wosj55_k$());
                  var tmp_1 = FabIcon_ADD_getInstance();
                  var nextValue = prevValue.copy$default_9ltzmx_k$(new FabUiState(true, tmp_0, tmp_1, CourseDiscussionDetailViewModel$onClickAdd$ref(this.this$0__1)));
                  if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              l$ret$3: do {
                var this_1 = this.this$0__1.get__uiState_8tkbd_k$();
                while (true) {
                  var prevValue_0 = this_1.get_value_j01efc_k$();
                  var nextValue_0 = prevValue_0.copy$default_yualf9_k$(VOID, this.this$0__1.pagingSourceFactory_1, this.hasModeratePermission2__1, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getDayOfWeekStrings_62j2s1_k$());
                  if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(1);
              var tmp_2 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$().findByUidWithPictureAsFlow_n0b42e_k$(this.this$0__1.courseBlockUid_1);
              var tmp_3 = CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
              suspendResult = tmp_2.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_29(tmp_3), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$5: do {
                var this_2 = this.this$0__1.get__appUiState_rulqry_k$();
                while (true) {
                  var prevValue_1 = this_2.get_value_j01efc_k$();
                  var nextValue_1 = prevValue_1.copy$default_9ltzmx_k$(new FabUiState());
                  if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              l$ret$7: do {
                var this_3 = this.this$0__1.get__uiState_8tkbd_k$();
                while (true) {
                  var prevValue_2 = this_3.get_value_j01efc_k$();
                  var nextValue_2 = prevValue_2.copy$default_yualf9_k$(null, CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda, false);
                  if (this_3.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).create_syqk0m_k$ = function (permissionPair, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.permissionPair_1 = permissionPair;
    return i;
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_syqk0m_k$(value instanceof PermissionPair ? value : THROW_CCE(), completion);
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.invoke_tixz4u_k$(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzPairAsFlow_gv7o5k_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$(), PermissionFlags_getInstance().get_COURSE_MODERATE_rl1ttu_k$()));
            suspendResult = collectLatest(tmp_0, CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new CourseDiscussionDetailViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function CourseDiscussionDetailViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_courseBlockUid__b5d2pf($this) {
    return $this.courseBlockUid_1;
  }
  function _get_clazzUid__rrng1f_16($this) {
    return $this.clazzUid_1;
  }
  function _get_pagingSourceFactory__6w06ky_5($this) {
    return $this.pagingSourceFactory_1;
  }
  function Companion_157() {
    Companion_instance_157 = this;
    this.DEST_NAME_1 = 'CourseDiscussion';
  }
  protoOf(Companion_157).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_157;
  function Companion_getInstance_218() {
    if (Companion_instance_157 == null)
      new Companion_157();
    return Companion_instance_157;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_29(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_29).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().discussionPostDao_z4okmu_k$().getTopLevelPostsByCourseBlockUid_z1reuy_k$(this$0.courseBlockUid_1, false);
    };
  }
  function CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, CourseDiscussionDetailViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseDiscussionDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.courediscussiondetail.CourseDiscussionDetailViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, title);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.this$0__1 = this$0;
    this.$post_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().discussionPostDao_z4okmu_k$().setDeletedAsync_olc1s5_k$(this.$post_1.get_discussionPostUid_6yxxgf_k$(), true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_deleted_qwnqy8_k$())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this.this$0__1, this.$post_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_218();
    UstadListViewModel.call(this, di, savedStateHandle, new CourseDiscussionDetailUiState(), 'CourseDiscussion');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.courseBlockUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.clazzUid_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.pagingSourceFactory_1 = CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this);
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, CourseDiscussionDetailViewModel$slambda_0(this, null));
    launchSetTitleFromClazzUid(this, this.clazzUid_1, CourseDiscussionDetailViewModel$lambda(this));
  }
  protoOf(CourseDiscussionDetailViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
  };
  protoOf(CourseDiscussionDetailViewModel).onClickAdd_cbqifs_k$ = function () {
    this.navigateToCreateNew_mwxhbu_k$(Companion_getInstance_220().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_160().get_ARG_COURSE_BLOCK_UID_jgfzis_k$(), this.courseBlockUid_1.toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).onClickPost_f08gvk_k$ = function (post) {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_219().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$(), post.get_discussionPostUid_6yxxgf_k$().toString()), to(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$(), this.clazzUid_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).onDeletePost_ca8tzn_k$ = function (post) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function CourseDiscussionDetailUiState$_init_$lambda_ogyezm() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    var tmp;
    if (posts === VOID) {
      tmp = CourseDiscussionDetailUiState$_init_$lambda_ogyezm;
    } else {
      tmp = posts;
    }
    posts = tmp;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.courseBlock_1 = courseBlock;
    this.posts_1 = posts;
    this.showModerateOptions_1 = showModerateOptions;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
  }
  protoOf(CourseDiscussionDetailUiState).get_courseBlock_c2ojbd_k$ = function () {
    return this.courseBlock_1;
  };
  protoOf(CourseDiscussionDetailUiState).get_posts_iwzpuy_k$ = function () {
    return this.posts_1;
  };
  protoOf(CourseDiscussionDetailUiState).get_showModerateOptions_2rhvyj_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(CourseDiscussionDetailUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(CourseDiscussionDetailUiState).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(CourseDiscussionDetailUiState).component1_7eebsc_k$ = function () {
    return this.courseBlock_1;
  };
  protoOf(CourseDiscussionDetailUiState).component2_7eebsb_k$ = function () {
    return this.posts_1;
  };
  protoOf(CourseDiscussionDetailUiState).component3_7eebsa_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(CourseDiscussionDetailUiState).component4_7eebs9_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(CourseDiscussionDetailUiState).component5_7eebs8_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(CourseDiscussionDetailUiState).copy_tjpqe9_k$ = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).copy$default_yualf9_k$ = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    courseBlock = courseBlock === VOID ? this.courseBlock_1 : courseBlock;
    posts = posts === VOID ? this.posts_1 : posts;
    showModerateOptions = showModerateOptions === VOID ? this.showModerateOptions_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    return $super === VOID ? this.copy_tjpqe9_k$(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.copy_tjpqe9_k$.call(this, courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).toString = function () {
    return 'CourseDiscussionDetailUiState(courseBlock=' + this.courseBlock_1 + ', posts=' + this.posts_1 + ', showModerateOptions=' + this.showModerateOptions_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ')';
  };
  protoOf(CourseDiscussionDetailUiState).hashCode = function () {
    var result = this.courseBlock_1 == null ? 0 : this.courseBlock_1.hashCode();
    result = imul(result, 31) + hashCode(this.posts_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showModerateOptions_1) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    return result;
  };
  protoOf(CourseDiscussionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseDiscussionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseDiscussionDetailUiState ? other : THROW_CCE();
    if (!equals(this.courseBlock_1, tmp0_other_with_cast.courseBlock_1))
      return false;
    if (!equals(this.posts_1, tmp0_other_with_cast.posts_1))
      return false;
    if (!(this.showModerateOptions_1 === tmp0_other_with_cast.showModerateOptions_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    return true;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1 = this.result_2.get_result_iyg5d2_k$();
            var tmp0_elvis_lhs = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.replyText0__1 = tmp_2;
            this.set_state_rjd8d0_k$(1);
            suspendResult = submitReply(this.this$0__1, this.replyText0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).create_h5keyk_k$ = function (result, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).invoke_sndfju_k$ = function (postTitle, $completion) {
    var tmp = this.create_56vlru_k$(postTitle, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_sndfju_k$((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
          var tmp_0;
          if (!(this_0.get_value_j01efc_k$().get_title_iz32un_k$() == this.postTitle_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.postTitle_1);
                if (tmp0_safe_receiver.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).create_56vlru_k$ = function (postTitle, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.postTitle_1 = postTitle;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_56vlru_k$((value == null ? true : typeof value === 'string') ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (postTitle, $completion) {
      return i.invoke_sndfju_k$(postTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_resultReturner_b7x1wd_k$(), 'replyTextResult');
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().discussionPostDao_z4okmu_k$().getTitleByUidAsFlow_bp2lxl_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    this.$this_launch_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).invoke_tixz4u_k$ = function (permissionPair, $completion) {
    var tmp = this.create_syqk0m_k$(permissionPair, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_tixz4u_k$(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_container = this.permissionPair_1;
          var hasViewPermission = tmp0_container.component1_7eebsc_k$();
          var hasModeratePermission = tmp0_container.component2_7eebsb_k$();
          if (hasViewPermission) {
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_0 = this.this$0__1.get_activeUserPersonUid_1nlgnz_k$();
                var tmp_1 = this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().fullName_m0cs6y_k$();
                var tmp0_safe_receiver = this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_personPicture_te1agw_k$();
                var nextValue = prevValue.copy$default_ik0lua_k$(this.this$0__1.pagingSourceFactory_1, tmp_0, tmp_1, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personPictureThumbnailUri_sx3gg_k$(), VOID, hasModeratePermission);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp1_elvis_lhs = this.$savedStateHandle_1.get_6bo4tg_k$('replyText');
            this.this$0__1._replyText_1.set_value_v1vabv_k$(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            launch(this.$this_launch_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this.this$0__1, null));
            launch(this.$this_launch_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null));
          } else {
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp_2 = DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda;
                var tmp_3 = this.this$0__1.get_activeUserPersonUid_1nlgnz_k$();
                var tmp_4 = this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().fullName_m0cs6y_k$();
                var tmp0_safe_receiver_0 = this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_personPicture_te1agw_k$();
                var nextValue_0 = prevValue_0.copy$default_ik0lua_k$(tmp_2, tmp_3, tmp_4, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_personPictureThumbnailUri_sx3gg_k$(), VOID, false);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp2_elvis_lhs = this.$savedStateHandle_1.get_6bo4tg_k$('replyText');
            this.this$0__1._replyText_1.set_value_v1vabv_k$(tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
          }
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).create_syqk0m_k$ = function (permissionPair, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this.this$0__1, this.$savedStateHandle_1, this.$this_launch_1, completion);
    i.permissionPair_1 = permissionPair;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_syqk0m_k$(value instanceof PermissionPair ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.invoke_tixz4u_k$(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    this.$this_launch_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().coursePermissionDao_t5l7mw_k$().personHasPermissionWithClazzPairAsFlow_gv7o5k_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.clazzUid_1, PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$(), PermissionFlags_getInstance().get_COURSE_MODERATE_rl1ttu_k$()));
            suspendResult = collectLatest(tmp_0, DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this.this$0__1, this.$savedStateHandle_1, this.$this_launch_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new DiscussionPostDetailViewModel$slambda$slambda(this.this$0__1, this.$savedStateHandle_1, this.$this_launch_1, completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_pagingSourceFactory__6w06ky_6($this) {
    return $this.pagingSourceFactory_1;
  }
  function _get__uiState__8e9jsd_31($this) {
    return $this._uiState_1;
  }
  function _get__replyText__mgdfzh($this) {
    return $this._replyText_1;
  }
  function _set_saveReplyJob__aziatj($this, _set____db54di) {
    $this.saveReplyJob_1 = _set____db54di;
  }
  function _get_saveReplyJob__qj91dn($this) {
    return $this.saveReplyJob_1;
  }
  function _get_clazzUid__rrng1f_17($this) {
    return $this.clazzUid_1;
  }
  function submitReply($this, replyText, $completion) {
    var tmp = new $submitReplyCOROUTINE$65($this, replyText, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function Companion_158() {
    Companion_instance_158 = this;
    this.RESULT_KEY_REPLY_TEXT_1 = 'replyTextResult';
    this.STATE_KEY_REPLY_TEXT_1 = 'replyText';
    this.DEST_NAME_1 = 'CourseDiscussionPost';
  }
  protoOf(Companion_158).get_RESULT_KEY_REPLY_TEXT_hrh4fv_k$ = function () {
    return this.RESULT_KEY_REPLY_TEXT_1;
  };
  protoOf(Companion_158).get_STATE_KEY_REPLY_TEXT_fq9dbb_k$ = function () {
    return this.STATE_KEY_REPLY_TEXT_1;
  };
  protoOf(Companion_158).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_158;
  function Companion_getInstance_219() {
    if (Companion_instance_158 == null)
      new Companion_158();
    return Companion_instance_158;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_30(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_30).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().discussionPostDao_z4okmu_k$().findByPostIdWithAllReplies_qj5mpd_k$(this$0.get_entityUidArg_hgo6pe_k$(), false);
    };
  }
  function DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, DiscussionPostDetailViewModel$slambda$slambda_0(this.this$0__1, this.$savedStateHandle_1, this.$this$launch_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation) {
    this.this$0__1 = this$0;
    this.$replyText_1 = $replyText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$('replyText', this.$replyText_1);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this.this$0__1, this.$replyText_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this$0, $replyText, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = submitReply(this.this$0__1, this.this$0__1._replyText_1.get_value_j01efc_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    this.this$0__1 = this$0;
    this.$replyText_1 = $replyText;
    this.$clazzAndBlockUids_1 = $clazzAndBlockUids;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().discussionPostDao_z4okmu_k$();
            var this_0 = new DiscussionPost();
            this_0.set_discussionPostStartDate_vk83wt_k$(systemTimeInMillis());
            this_0.set_discussionPostReplyToPostUid_ev5bbi_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$());
            this_0.set_discussionPostMessage_7toqr9_k$(this.$replyText_1);
            this_0.set_discussionPostStartedPersonUid_buzem9_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            this_0.set_discussionPostClazzUid_2q88rl_k$(this.$clazzAndBlockUids_1.get_clazzUid_k8pnbz_k$());
            this_0.set_discussionPostCourseBlockUid_9jjim3_k$(this.$clazzAndBlockUids_1.get_courseBlockUid_akc5af_k$());
            suspendResult = tmp_0.insertAsync(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.onChangeReplyText_a71oo2_k$('');
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this.this$0__1, this.$replyText_1, this.$clazzAndBlockUids_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$submitReply$slambda_0(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.this$0__1 = this$0;
    this.$post_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().discussionPostDao_z4okmu_k$().setDeletedAsync_olc1s5_k$(this.$post_1.get_discussionPostUid_6yxxgf_k$(), true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_deleted_qwnqy8_k$())));
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this.this$0__1, this.$post_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $submitReplyCOROUTINE$65(_this__u8e3s4, replyText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.replyText_1 = replyText;
  }
  protoOf($submitReplyCOROUTINE$65).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(11);
            l$ret$1: do {
              var this_0 = this._this__u8e3s4__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_ik0lua_k$(VOID, VOID, VOID, VOID, false);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this._this__u8e3s4__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(10);
            this.set_state_rjd8d0_k$(3);
            suspendResult = this._this__u8e3s4__1.get_activeDb_bu92wd_k$().courseBlockDao_msn3sw_k$().findCourseBlockAndClazzUidByDiscussionPostUid_r9l7tw_k$(this._this__u8e3s4__1.get_entityUidArg_hgo6pe_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.this2__1 = suspendResult;
            var tmp_0 = this;
            tmp_0.it3__1 = this.this2__1;
            if ((!(this.it3__1 == null) ? !this.it3__1.get_clazzUid_k8pnbz_k$().equals(new Long(0, 0)) : false) ? !this.it3__1.get_courseBlockUid_akc5af_k$().equals(new Long(0, 0)) : false) {
              this.WHEN_RESULT4__1 = this.it3__1;
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              suspendResult = this._this__u8e3s4__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$().findCourseBlockAndClazzUidByDiscussionPostUid_r9l7tw_k$(this._this__u8e3s4__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.WHEN_RESULT4__1 = suspendResult;
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            this.clazzAndBlockUids5__1 = this.WHEN_RESULT4__1;
            if ((this.clazzAndBlockUids5__1 == null ? true : this.clazzAndBlockUids5__1.get_courseBlockUid_akc5af_k$().equals(new Long(0, 0))) ? true : this.clazzAndBlockUids5__1.get_clazzUid_k8pnbz_k$().equals(new Long(0, 0))) {
              this._this__u8e3s4__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this._this__u8e3s4__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$())));
              this.tmp$ret$21__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(11);
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            }

          case 6:
            this.set_state_rjd8d0_k$(7);
            var tmp_1 = this._this__u8e3s4__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_1, VOID, DiscussionPostDetailViewModel$submitReply$slambda_0(this._this__u8e3s4__1, this.replyText_1, this.clazzAndBlockUids5__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.tmp$ret$40__1 = suspendResult;
            this.set_exceptionState_fex74n_k$(11);
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 8:
            this.set_exceptionState_fex74n_k$(11);
            this._this__u8e3s4__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$9: do {
              var this_1 = this._this__u8e3s4__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_ik0lua_k$(VOID, VOID, VOID, VOID, true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 9:
            this.set_exceptionState_fex74n_k$(11);
            this._this__u8e3s4__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$11: do {
              var this_2 = this._this__u8e3s4__1._uiState_1;
              while (true) {
                var prevValue_1 = this_2.get_value_j01efc_k$();
                var nextValue_1 = prevValue_1.copy$default_ik0lua_k$(VOID, VOID, VOID, VOID, true);
                if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 10:
            this.set_exceptionState_fex74n_k$(11);
            var t = this.get_exception_x0n6w6_k$();
            this._this__u8e3s4__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$7: do {
              var this_3 = this._this__u8e3s4__1._uiState_1;
              while (true) {
                var prevValue_2 = this_3.get_value_j01efc_k$();
                var nextValue_2 = prevValue_2.copy$default_ik0lua_k$(VOID, VOID, VOID, VOID, true);
                if (this_3.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 11:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 11) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function DiscussionPostDetailViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_219();
    destinationName = destinationName === VOID ? 'CourseDiscussionPost' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    tmp.pagingSourceFactory_1 = DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this);
    this._uiState_1 = MutableStateFlow(new DiscussionPostDetailUiState2());
    this.uiState_1 = asStateFlow(this._uiState_1);
    this._replyText_1 = MutableStateFlow('');
    this.replyText_1 = asStateFlow(this._replyText_1);
    this.saveReplyJob_1 = null;
    var tmp_0 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.clazzUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_1, VOID, VOID, DiscussionPostDetailViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(DiscussionPostDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(DiscussionPostDetailViewModel).get_replyText_1cb4we_k$ = function () {
    return this.replyText_1;
  };
  protoOf(DiscussionPostDetailViewModel).onChangeReplyText_a71oo2_k$ = function (replyText) {
    this._replyText_1.set_value_v1vabv_k$(replyText);
    var tmp0_safe_receiver = this.saveReplyJob_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = this;
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    tmp.saveReplyJob_1 = launch(tmp_0, VOID, VOID, DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this, replyText, null));
  };
  protoOf(DiscussionPostDetailViewModel).onClickEditReplyHtml_3jm4cy_k$ = function () {
    this.navigateToEditHtml$default_imw6oe_k$(this._replyText_1.get_value_j01efc_k$(), 'replyTextResult', VOID, mapOf([to(Companion_getInstance_157().get_ARG_DONE_STR_4lhipm_k$(), this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_post_wosj55_k$())), to(Companion_getInstance_157().get_ARG_TITLE_ps2gqu_k$(), this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_add_a_reply_ekmcg5_k$()))]));
  };
  protoOf(DiscussionPostDetailViewModel).onClickPostReply_ihmr1t_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this, null));
  };
  protoOf(DiscussionPostDetailViewModel).onDeletePost_ca8tzn_k$ = function (post) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function DiscussionPostDetailUiState2$_init_$lambda_c4cn31() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (discussionPosts === VOID) {
      tmp = DiscussionPostDetailUiState2$_init_$lambda_c4cn31;
    } else {
      tmp = discussionPosts;
    }
    discussionPosts = tmp;
    loggedInPersonUid = loggedInPersonUid === VOID ? new Long(0, 0) : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? '' : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? null : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.discussionPosts_1 = discussionPosts;
    this.loggedInPersonUid_1 = loggedInPersonUid;
    this.loggedInPersonName_1 = loggedInPersonName;
    this.loggedInPersonPictureUri_1 = loggedInPersonPictureUri;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.showModerateOptions_1 = showModerateOptions;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
  }
  protoOf(DiscussionPostDetailUiState2).get_discussionPosts_7jo6g2_k$ = function () {
    return this.discussionPosts_1;
  };
  protoOf(DiscussionPostDetailUiState2).get_loggedInPersonUid_olumid_k$ = function () {
    return this.loggedInPersonUid_1;
  };
  protoOf(DiscussionPostDetailUiState2).get_loggedInPersonName_iiqldc_k$ = function () {
    return this.loggedInPersonName_1;
  };
  protoOf(DiscussionPostDetailUiState2).get_loggedInPersonPictureUri_sywvm5_k$ = function () {
    return this.loggedInPersonPictureUri_1;
  };
  protoOf(DiscussionPostDetailUiState2).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(DiscussionPostDetailUiState2).get_showModerateOptions_2rhvyj_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(DiscussionPostDetailUiState2).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(DiscussionPostDetailUiState2).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(DiscussionPostDetailUiState2).component1_7eebsc_k$ = function () {
    return this.discussionPosts_1;
  };
  protoOf(DiscussionPostDetailUiState2).component2_7eebsb_k$ = function () {
    return this.loggedInPersonUid_1;
  };
  protoOf(DiscussionPostDetailUiState2).component3_7eebsa_k$ = function () {
    return this.loggedInPersonName_1;
  };
  protoOf(DiscussionPostDetailUiState2).component4_7eebs9_k$ = function () {
    return this.loggedInPersonPictureUri_1;
  };
  protoOf(DiscussionPostDetailUiState2).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(DiscussionPostDetailUiState2).component6_7eebs7_k$ = function () {
    return this.showModerateOptions_1;
  };
  protoOf(DiscussionPostDetailUiState2).component7_7eebs6_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(DiscussionPostDetailUiState2).component8_7eebs5_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(DiscussionPostDetailUiState2).copy_c82jqg_k$ = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).copy$default_ik0lua_k$ = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    discussionPosts = discussionPosts === VOID ? this.discussionPosts_1 : discussionPosts;
    loggedInPersonUid = loggedInPersonUid === VOID ? this.loggedInPersonUid_1 : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? this.loggedInPersonName_1 : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? this.loggedInPersonPictureUri_1 : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? this.showModerateOptions_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    return $super === VOID ? this.copy_c82jqg_k$(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.copy_c82jqg_k$.call(this, discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).toString = function () {
    return 'DiscussionPostDetailUiState2(discussionPosts=' + this.discussionPosts_1 + ', loggedInPersonUid=' + this.loggedInPersonUid_1.toString() + ', loggedInPersonName=' + this.loggedInPersonName_1 + ', loggedInPersonPictureUri=' + this.loggedInPersonPictureUri_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', showModerateOptions=' + this.showModerateOptions_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ')';
  };
  protoOf(DiscussionPostDetailUiState2).hashCode = function () {
    var result = hashCode(this.discussionPosts_1);
    result = imul(result, 31) + this.loggedInPersonUid_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.loggedInPersonName_1) | 0;
    result = imul(result, 31) + (this.loggedInPersonPictureUri_1 == null ? 0 : getStringHashCode(this.loggedInPersonPictureUri_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showModerateOptions_1) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    return result;
  };
  protoOf(DiscussionPostDetailUiState2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostDetailUiState2))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostDetailUiState2 ? other : THROW_CCE();
    if (!equals(this.discussionPosts_1, tmp0_other_with_cast.discussionPosts_1))
      return false;
    if (!this.loggedInPersonUid_1.equals(tmp0_other_with_cast.loggedInPersonUid_1))
      return false;
    if (!(this.loggedInPersonName_1 === tmp0_other_with_cast.loggedInPersonName_1))
      return false;
    if (!(this.loggedInPersonPictureUri_1 == tmp0_other_with_cast.loggedInPersonPictureUri_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.showModerateOptions_1 === tmp0_other_with_cast.showModerateOptions_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    return true;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).invoke_5268ou_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_5268ou_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.it_1.discussionPostDao_z4okmu_k$();
            var tmp_1;
            if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.findByUid_oqo6x1_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT1__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_5268ou_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).invoke_qlczyd_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_qlczyd_k$($completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.this0__1 = new DiscussionPost();
            var tmp_1 = this;
            tmp_1.it1__1 = this.this0__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_57().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.it1__1.set_discussionPostUid_ufsj71_k$(ARGUMENT);
            this.it1__1.set_discussionPostCourseBlockUid_9jjim3_k$(_get_courseBlockUidArg__1bqljt(this.this$0__1));
            this.it1__1.set_discussionPostStartedPersonUid_buzem9_k$(this.this$0__1.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$());
            this.it1__1.set_discussionPostStartDate_vk83wt_k$(systemTimeInMillis());
            return this.this0__1;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this.this$0__1, completion);
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_qlczyd_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_h8vmtc_k$(entityToDisplay);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda).invoke_dod4jl_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_dod4jl_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_57().serializer_9w0wvi_k$();
            var tmp_1 = DiscussionPostEditViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = DiscussionPostEditViewModel$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, DiscussionPostEditViewModel$slambda$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this.this$0__1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_dod4jl_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation) {
    this.this$0__1 = this$0;
    this.$post_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().discussionPostDao_z4okmu_k$().upsertAsync_g8wcjt_k$(this.$post_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$post_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_32($this) {
    return $this._uiState_1;
  }
  function _get_discussionPostUid__impog9($this) {
    var tmp0_safe_receiver = $this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_courseBlockUidArg__1bqljt($this) {
    var tmp0_safe_receiver = $this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_160().get_ARG_COURSE_BLOCK_UID_jgfzis_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function Companion_159() {
    Companion_instance_159 = this;
    this.DEST_NAME_1 = 'DiscussionPostEdit';
  }
  protoOf(Companion_159).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_159;
  function Companion_getInstance_220() {
    if (Companion_instance_159 == null)
      new Companion_159();
    return Companion_instance_159;
  }
  function DiscussionPostEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = awaitAll([async(this.$this$launch_1, VOID, VOID, DiscussionPostEditViewModel$slambda$slambda_0(this.this$0__1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_h8vmtc_k$(VOID, true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp_0 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_post_wosj55_k$());
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$ref(this.this$0__1));
                var tmp1_loadingState = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onDiscussionPostBodyChanged$lambda($postBody) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_discussionPostMessage_7toqr9_k$($postBody);
      return Unit_getInstance();
    };
  }
  function DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation) {
    this.this$0__1 = this$0;
    this.$post_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            if (this.this$0__1._uiState_1.get_value_j01efc_k$().discussionPostTitleError_1 == null ? this.this$0__1._uiState_1.get_value_j01efc_k$().discussionPostDescError_1 == null : false) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().courseBlockDao_msn3sw_k$().findClazzUidByCourseBlockUid_z7hesn_k$(this.$post_1.get_discussionPostCourseBlockUid_sf5e7_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 1:
            this.ARGUMENT0__1 = suspendResult;
            this.$post_1.set_discussionPostClazzUid_2q88rl_k$(this.ARGUMENT0__1);
            if (this.$post_1.get_discussionPostClazzUid_nrn8d3_k$().equals(new Long(0, 0))) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().courseBlockDao_msn3sw_k$().findClazzUidByCourseBlockUid_z7hesn_k$(this.$post_1.get_discussionPostCourseBlockUid_sf5e7_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.ARGUMENT1__1 = suspendResult;
            this.$post_1.set_discussionPostClazzUid_2q88rl_k$(this.ARGUMENT1__1);
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_state_rjd8d0_k$(4);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.$post_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_1 = Companion_getInstance_219().get_DEST_NAME_gmgk7z_k$();
            var tmp_2 = this.$post_1.get_discussionPostUid_6yxxgf_k$();
            var this_0 = LinkedHashMap_init_$Create$_0();
            this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_CLAZZUID_c9bcuu_k$());
            this.this$0__1.finishWithResult_lyhkrz_k$(tmp_1, tmp_2, this.$post_1, this_0.build_1k0s4u_k$());
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            return Unit_getInstance();
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this.this$0__1, this.$post_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function DiscussionPostEditViewModel$onClickSave$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_220();
    destinationName = destinationName === VOID ? 'DiscussionPostEdit' : destinationName;
    UstadEditViewModel.call(this, di, savedStateHandle, destinationName);
    this._uiState_1 = MutableStateFlow(new DiscussionPostEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var title = _get_discussionPostUid__impog9(this).equals(new Long(0, 0)) ? this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_add_new_post_6lsq2i_k$()) : this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_wol9w3_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, VOID, true);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, DiscussionPostEditViewModel$slambda_0(this, null));
  }
  protoOf(DiscussionPostEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(DiscussionPostEditViewModel).onEntityChanged_tap2du_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.discussionPost_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_discussionPostTitle_luljhj_k$();
        var tmp_0 = this.updateErrorMessageOnChange_silrgy_k$(tmp, entity == null ? null : entity.get_discussionPostTitle_luljhj_k$(), prevValue.discussionPostTitleError_1);
        var tmp2_safe_receiver = prevValue.discussionPost_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_discussionPostMessage_a2j8wm_k$();
        var nextValue = prevValue.copy$default_h8vmtc_k$(entity, VOID, tmp_0, this.updateErrorMessageOnChange_silrgy_k$(tmp_1, entity == null ? null : entity.get_discussionPostMessage_a2j8wm_k$(), prevValue.discussionPostDescError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_57().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_2, VOID, VOID, DiscussionPostEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(DiscussionPostEditViewModel).onDiscussionPostBodyChanged_dp2zwf_k$ = function (postBody) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onDiscussionPostBodyChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.discussionPost_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_11(tmp0_safe_receiver, DiscussionPostEditViewModel$onDiscussionPostBodyChanged$lambda(postBody));
        }
        var nextValue = prevValue.copy$default_h8vmtc_k$(tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var entityToSave = tmp$ret$1.discussionPost_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_57().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_0, VOID, VOID, DiscussionPostEditViewModel$onDiscussionPostBodyChanged$slambda_0(commitDelay, entityToSave, this, key, serializer, null)));
  };
  protoOf(DiscussionPostEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().discussionPost_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var post = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = post.get_discussionPostTitle_luljhj_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = post.get_discussionPostMessage_a2j8wm_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.copy$default_h8vmtc_k$(VOID, VOID, tmp_1, tmp_2);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onClickSave$slambda_0(this, post, null));
  };
  function DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    discussionPost = discussionPost === VOID ? null : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? null : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? null : discussionPostDescError;
    this.discussionPost_1 = discussionPost;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.discussionPostTitleError_1 = discussionPostTitleError;
    this.discussionPostDescError_1 = discussionPostDescError;
  }
  protoOf(DiscussionPostEditUiState).get_discussionPost_4c7lzj_k$ = function () {
    return this.discussionPost_1;
  };
  protoOf(DiscussionPostEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(DiscussionPostEditUiState).get_discussionPostTitleError_sthwv3_k$ = function () {
    return this.discussionPostTitleError_1;
  };
  protoOf(DiscussionPostEditUiState).get_discussionPostDescError_5mvkl6_k$ = function () {
    return this.discussionPostDescError_1;
  };
  protoOf(DiscussionPostEditUiState).component1_7eebsc_k$ = function () {
    return this.discussionPost_1;
  };
  protoOf(DiscussionPostEditUiState).component2_7eebsb_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(DiscussionPostEditUiState).component3_7eebsa_k$ = function () {
    return this.discussionPostTitleError_1;
  };
  protoOf(DiscussionPostEditUiState).component4_7eebs9_k$ = function () {
    return this.discussionPostDescError_1;
  };
  protoOf(DiscussionPostEditUiState).copy_48xbi0_k$ = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    return new DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).copy$default_h8vmtc_k$ = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError, $super) {
    discussionPost = discussionPost === VOID ? this.discussionPost_1 : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? this.discussionPostTitleError_1 : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? this.discussionPostDescError_1 : discussionPostDescError;
    return $super === VOID ? this.copy_48xbi0_k$(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) : $super.copy_48xbi0_k$.call(this, discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).toString = function () {
    return 'DiscussionPostEditUiState(discussionPost=' + this.discussionPost_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', discussionPostTitleError=' + this.discussionPostTitleError_1 + ', discussionPostDescError=' + this.discussionPostDescError_1 + ')';
  };
  protoOf(DiscussionPostEditUiState).hashCode = function () {
    var result = this.discussionPost_1 == null ? 0 : hashCode(this.discussionPost_1);
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + (this.discussionPostTitleError_1 == null ? 0 : getStringHashCode(this.discussionPostTitleError_1)) | 0;
    result = imul(result, 31) + (this.discussionPostDescError_1 == null ? 0 : getStringHashCode(this.discussionPostDescError_1)) | 0;
    return result;
  };
  protoOf(DiscussionPostEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostEditUiState ? other : THROW_CCE();
    if (!equals(this.discussionPost_1, tmp0_other_with_cast.discussionPost_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.discussionPostTitleError_1 == tmp0_other_with_cast.discussionPostTitleError_1))
      return false;
    if (!(this.discussionPostDescError_1 == tmp0_other_with_cast.discussionPostDescError_1))
      return false;
    return true;
  };
  function invoke$urlToLoad(_this__u8e3s4, cevOpenUri, manifest, this$0, cevManifestUrlObj) {
    var prefix = substringBeforeLast(cevOpenUri, '/', '');
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(prefix) > 0) {
      tmp = prefix + '/' + _this__u8e3s4.get_href_wonh4k_k$();
    } else {
      tmp = _this__u8e3s4.get_href_wonh4k_k$();
    }
    var pathInManifest = tmp;
    return invoke$urlToLoad_0(requireEntryByUri(manifest, pathInManifest), this$0, cevManifestUrlObj);
  }
  function EpubContentViewModel$slambda$slambda$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_2poi0s_k$(VOID, VOID, VOID, true);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    this.this$0__1 = this$0;
    this.$cevOpenUri_1 = $cevOpenUri;
    this.$manifest_1 = $manifest;
    this.$cevManifestUrlObj_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda$slambda).invoke_72tg8f_k$ = function (it, $completion) {
    var tmp = this.create_hdlzmp_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_72tg8f_k$(p1 instanceof Item ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            tmp_0.this0__1 = _get_httpClient__2ty1zc_6(this.this$0__1);
            var tmp_1 = this;
            tmp_1.urlString1__1 = invoke$urlToLoad(this.it_1, this.$cevOpenUri_1, this.$manifest_1, this.this$0__1, this.$cevManifestUrlObj_1);
            var tmp_2 = this;
            tmp_2.this2__1 = this.this0__1;
            var tmp_3 = this;
            tmp_3.this3__1 = this.this2__1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString1__1);
            tmp_4.builder4__1 = this_0;
            this.builder4__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_5 = this;
            tmp_5.this5__1 = this.this3__1;
            var tmp_6 = this;
            tmp_6.builder6__1 = this.builder4__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder6__1, this.this5__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT7__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsDecodedText(this.ARGUMENT7__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).create_hdlzmp_k$ = function (it, completion) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this.this$0__1, this.$cevOpenUri_1, this.$manifest_1, this.$cevManifestUrlObj_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_hdlzmp_k$(value instanceof Item ? value : THROW_CCE(), completion);
  };
  function EpubContentViewModel$slambda$slambda$slambda_0(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_72tg8f_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$urlToLoad_0(_this__u8e3s4, this$0, cevManifestUrlObj) {
    var tmp;
    if (this$0.useBodyDataUrls_1) {
      tmp = _this__u8e3s4.get_bodyDataUrl_aaulfq_k$();
    } else {
      tmp = cevManifestUrlObj.resolve_rxg93i_k$(_this__u8e3s4.get_uri_18iuil_k$()).toString();
    }
    return tmp;
  }
  function EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    this.$manifest_1 = $manifest;
    this.$cevOpenUri_1 = $cevOpenUri;
    this.this$0__1 = this$0;
    this.$opfBaseUrl_1 = $opfBaseUrl;
    this.$argTocString_1 = $argTocString;
    this.$cevManifestUrlObj_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda).invoke_d9fzmj_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EpubContentViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_exceptionState_fex74n_k$(4);
            this.opfEntry0__1 = requireEntryByUri(this.$manifest_1, this.$cevOpenUri_1);
            var tmp_0 = this;
            tmp_0.this1__1 = _get_httpClient__2ty1zc_6(this.this$0__1);
            var tmp_1 = this;
            tmp_1.urlString2__1 = invoke$urlToLoad_0(this.opfEntry0__1, this.this$0__1, this.$cevManifestUrlObj_1);
            var tmp_2 = this;
            tmp_2.this3__1 = this.this1__1;
            var tmp_3 = this;
            tmp_3.this4__1 = this.this3__1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString2__1);
            tmp_4.builder5__1 = this_0;
            this.builder5__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_5 = this;
            tmp_5.this6__1 = this.this4__1;
            var tmp_6 = this;
            tmp_6.builder7__1 = this.builder5__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder7__1, this.this6__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT8__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsDecodedText(this.ARGUMENT8__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.opfStr9__1 = suspendResult;
            this.opfPackage10__1 = _get_xml__e6jxp6(this.this$0__1).decodeFromString_jwu9sq_k$(Companion_getInstance_91().serializer_9w0wvi_k$(), this.opfStr9__1);
            var tmp_7 = this;
            var this_1 = this.opfPackage10__1.get_manifest_tn5zpk_k$().get_items_it823b_k$();
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
            var destination = LinkedHashMap_init_$Create$(capacity);
            var tmp0_iterator = this_1.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              destination.put_4fpzoq_k$(element.get_id_kntnx8_k$(), element);
            }

            tmp_7.manifestItemsMap11__1 = destination;
            var tmp_8 = this;
            var this_2 = this.opfPackage10__1.get_spine_iynj22_k$().get_itemRefs_cbwsw4_k$();
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_2.iterator_jk1svi_k$();
            while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
              var element_0 = tmp0_iterator_0.next_20eer_k$();
              var tmp0_safe_receiver = this.manifestItemsMap11__1.get_wei43m_k$(element_0.get_idRef_isxg0f_k$());
              var tmp_9;
              if (tmp0_safe_receiver == null) {
                tmp_9 = null;
              } else {
                tmp_9 = this.$opfBaseUrl_1.resolve_rxg93i_k$(tmp0_safe_receiver.get_href_wonh4k_k$());
              }
              var tmp1_safe_receiver = tmp_9;
              var tmp0_safe_receiver_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.add_utx5q5_k$(tmp0_safe_receiver_0);
              }
            }

            tmp_8.spineUrls12__1 = destination_0;
            var tmp_10 = this;
            var tmp0_safe_receiver_1 = this.opfPackage10__1.coverItem_wqhune_k$();
            var tmp_11;
            if (tmp0_safe_receiver_1 == null) {
              tmp_11 = null;
            } else {
              tmp_11 = this.$opfBaseUrl_1.resolve_rxg93i_k$(tmp0_safe_receiver_1.get_href_wonh4k_k$());
            }

            var tmp1_safe_receiver_0 = tmp_11;
            tmp_10.coverImageUrl13__1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.toString();
            l$ret$1: do {
              var this_3 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_3.get_value_j01efc_k$();
                var tmp0_safe_receiver_2 = firstOrNull(this.opfPackage10__1.get_metadata_vs95vc_k$().get_languages_xmhugi_k$());
                var nextValue = prevValue.copy$default_2poi0s_k$(VOID, this.spineUrls12__1, VOID, VOID, VOID, this.coverImageUrl13__1, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.get_content_h02jrk_k$());
                if (this_3.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_4 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_4.get_value_j01efc_k$();
                var tmp0_safe_receiver_3 = firstOrNull(this.opfPackage10__1.get_metadata_vs95vc_k$().get_titles_jyr0o4_k$());
                var tmp1_elvis_lhs = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.get_content_h02jrk_k$();
                var tmp_12 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
                var tmp2_elvis_lhs = this.$argTocString_1;
                var tmp_13 = tmp2_elvis_lhs == null ? this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_table_of_contents_2jgk4o_k$()) : tmp2_elvis_lhs;
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, VOID, listOf_0(new OverflowItem(tmp_13, EpubContentViewModel$slambda$slambda$lambda(this.this$0__1))));
                if (this_4.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp_14 = this.this$0__1;
            var tmp2_safe_receiver = this.opfPackage10__1.tableOfContentItem_201g7t_k$();
            var tmp_15;
            if (tmp2_safe_receiver == null) {
              tmp_15 = null;
            } else {
              tmp_15 = this.$opfBaseUrl_1.resolve_rxg93i_k$(tmp2_safe_receiver.get_href_wonh4k_k$()).toString();
            }

            tmp_14.navUrl_1 = tmp_15;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.this$0__1.getEpubTableOfContentsUseCase_1.invoke_lx5xpf_k$(this.opfPackage10__1, EpubContentViewModel$slambda$slambda$slambda_0(this.this$0__1, this.$cevOpenUri_1, this.$manifest_1, this.$cevManifestUrlObj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_elvis_lhs = suspendResult;
            var tocItems = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            l$ret$5: do {
              var this_5 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_1 = this_5.get_value_j01efc_k$();
                var nextValue_1 = prevValue_1.copy$default_2poi0s_k$(VOID, VOID, tocItems);
                if (this_5.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var tmp_16 = this.get_exception_x0n6w6_k$();
            if (tmp_16 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              printStackTrace(e);
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 5:
            throw this.get_exception_x0n6w6_k$();
          case 6:
            this.set_exceptionState_fex74n_k$(5);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new EpubContentViewModel$slambda$slambda(this.$manifest_1, this.$cevOpenUri_1, this.this$0__1, this.$opfBaseUrl_1, this.$argTocString_1, this.$cevManifestUrlObj_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(EpubContentViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function EpubContentViewModel$slambda$slambda_0($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_d9fzmj_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_getEpubTableOfContentsUseCase__i8rxlh($this) {
    return $this.getEpubTableOfContentsUseCase_1;
  }
  function _get_useBodyDataUrls__465bja($this) {
    return $this.useBodyDataUrls_1;
  }
  function _get_entityUidArg__tz7ola_1($this) {
    return $this.entityUidArg_1;
  }
  function _get_httpClient__2ty1zc_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.httpClient$delegate_1;
    httpClient$factory_6();
    return this_0.get_value_j01efc_k$();
  }
  function _get_xml__e6jxp6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xml$delegate_1;
    xml$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get__uiState__8e9jsd_33($this) {
    return $this._uiState_1;
  }
  function _get_openExternalLinkUseCase__ku5z07_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.openExternalLinkUseCase$delegate_1;
    openExternalLinkUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get__epubScrollCommands__anxhlx($this) {
    return $this._epubScrollCommands_1;
  }
  function _set_navUrl__63c5v9($this, _set____db54di) {
    $this.navUrl_1 = _set____db54di;
  }
  function _get_navUrl__4mll8h($this) {
    return $this.navUrl_1;
  }
  function Companion_160() {
    Companion_instance_160 = this;
    this.ARG_MANIFEST_URL_1 = 'manifestUrl';
    this.ARG_CEV_URI_1 = 'cevUri';
    this.ARG_NAVIGATION_VISIBLE_1 = 'navigationVisible';
    this.ARG_TOC_OPTIONS_STRING_1 = 'tocString';
    this.ARG_XAPI_STATEMENTS_URL_1 = 'xapiStatementsUrl';
    this.DEST_NAME_1 = 'EpubContent';
  }
  protoOf(Companion_160).get_ARG_MANIFEST_URL_rd4kun_k$ = function () {
    return this.ARG_MANIFEST_URL_1;
  };
  protoOf(Companion_160).get_ARG_CEV_URI_h8gv9r_k$ = function () {
    return this.ARG_CEV_URI_1;
  };
  protoOf(Companion_160).get_ARG_NAVIGATION_VISIBLE_k199uv_k$ = function () {
    return this.ARG_NAVIGATION_VISIBLE_1;
  };
  protoOf(Companion_160).get_ARG_TOC_OPTIONS_STRING_dnav6t_k$ = function () {
    return this.ARG_TOC_OPTIONS_STRING_1;
  };
  protoOf(Companion_160).get_ARG_XAPI_STATEMENTS_URL_zanzr5_k$ = function () {
    return this.ARG_XAPI_STATEMENTS_URL_1;
  };
  protoOf(Companion_160).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_160;
  function Companion_getInstance_221() {
    if (Companion_instance_160 == null)
      new Companion_160();
    return Companion_instance_160;
  }
  function EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    this.$argManifestUrl_1 = $argManifestUrl;
    this.$argCevOpenUri_1 = $argCevOpenUri;
    this.this$0__1 = this$0;
    this.$argTocString_1 = $argTocString;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EpubContentViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            if (!(this.$argManifestUrl_1 == null) ? !(this.$argCevOpenUri_1 == null) : false) {
              var tmp_0 = this;
              tmp_0.WHEN_RESULT0__1 = to(this.$argManifestUrl_1, this.$argCevOpenUri_1);
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().contentEntryVersionDao_66n0fn_k$().findByUidAsync_kabggw_k$(this.this$0__1.entityUidArg_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.tmp0_elvis_lhs1__1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.tmp0_elvis_lhs1__1 == null) {
              return Unit_getInstance();
            } else {
              tmp_2 = this.tmp0_elvis_lhs1__1;
            }

            tmp_1.contentEntryVersion2__1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.contentEntryVersion2__1.get_cevManifestUrl_71wl63_k$();
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.entityCevManifestUrl3__1 = tmp_4;
            var tmp_5 = this;
            var tmp2_elvis_lhs = this.contentEntryVersion2__1.get_cevOpenUri_oavmw9_k$();
            var tmp_6;
            if (tmp2_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_6 = tmp2_elvis_lhs;
            }

            tmp_5.entityCevOpenUri4__1 = tmp_6;
            this.WHEN_RESULT0__1 = to(this.entityCevManifestUrl3__1, this.entityCevOpenUri4__1);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.tmp3_container5__1 = this.WHEN_RESULT0__1;
            this.cevManifestUrl6__1 = this.tmp3_container5__1.component1_7eebsc_k$();
            this.cevOpenUri7__1 = this.tmp3_container5__1.component2_7eebsb_k$();
            this.cevManifestUrlObj8__1 = UrlKmp_0(this.cevManifestUrl6__1);
            this.opfBaseUrl9__1 = this.cevManifestUrlObj8__1.resolve_rxg93i_k$(this.cevOpenUri7__1);
            var tmp_7 = this;
            tmp_7.this10__1 = this.this$0__1.get_json_woos35_k$();
            var tmp_8 = this;
            tmp_8.this11__1 = _get_httpClient__2ty1zc_6(this.this$0__1);
            var tmp_9 = this;
            tmp_9.urlString12__1 = this.cevManifestUrl6__1;
            var tmp_10 = this;
            tmp_10.this13__1 = this.this11__1;
            var tmp_11 = this;
            tmp_11.this14__1 = this.this13__1;
            var tmp_12 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString12__1);
            tmp_12.builder15__1 = this_0;
            this.builder15__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_13 = this;
            tmp_13.this16__1 = this.this14__1;
            var tmp_14 = this;
            tmp_14.builder17__1 = this.builder15__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = (new HttpStatement(this.builder17__1, this.this16__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.ARGUMENT18__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            suspendResult = bodyAsDecodedText(this.ARGUMENT18__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.string19__1 = suspendResult;
            var tmp_15 = this;
            var this_1 = this.this10__1.get_serializersModule_piitvg_k$();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_15.manifest20__1 = this.this10__1.decodeFromString_jwu9sq_k$(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.string19__1);
            this.set_state_rjd8d0_k$(5);
            var tmp_16 = Dispatchers_getInstance().get_Default_goqax4_k$();
            suspendResult = withContext(tmp_16, EpubContentViewModel$slambda$slambda_0(this.manifest20__1, this.cevOpenUri7__1, this.this$0__1, this.opfBaseUrl9__1, this.$argTocString_1, this.cevManifestUrlObj8__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return Unit_getInstance();
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new EpubContentViewModel$slambda(this.$argManifestUrl_1, this.$argCevOpenUri_1, this.this$0__1, this.$argTocString_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(EpubContentViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function EpubContentViewModel$slambda_0($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    var i = new EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EpubContentViewModel(di, savedStateHandle, getEpubTableOfContentsUseCase, useBodyDataUrls) {
    Companion_getInstance_221();
    var tmp;
    if (getEpubTableOfContentsUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).get_directDI_rqg7bd_k$();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, null);
      tmp = new GetEpubTableOfContentsUseCase(tmp$ret$1);
    } else {
      tmp = getEpubTableOfContentsUseCase;
    }
    getEpubTableOfContentsUseCase = tmp;
    useBodyDataUrls = useBodyDataUrls === VOID ? false : useBodyDataUrls;
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'EpubContent');
    this.getEpubTableOfContentsUseCase_1 = getEpubTableOfContentsUseCase;
    this.useBodyDataUrls_1 = useBodyDataUrls;
    var tmp_2 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.entityUidArg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.httpClient$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, httpClient$factory_5());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.xml$delegate_1 = Instance(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, xml$factory());
    this._uiState_1 = MutableStateFlow(new EpubContentUiState(this.entityUidArg_1));
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.openExternalLinkUseCase$delegate_1 = Instance(this, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, openExternalLinkUseCase$factory_1());
    this._epubScrollCommands_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.epubScrollCommands_1 = asSharedFlow(this._epubScrollCommands_1);
    this.navUrl_1 = null;
    var argManifestUrl = savedStateHandle.get_6bo4tg_k$('manifestUrl');
    var argCevOpenUri = savedStateHandle.get_6bo4tg_k$('cevUri');
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$('navigationVisible');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    var argNavigationVisible = tmp1_elvis_lhs_0 == null ? true : tmp1_elvis_lhs_0;
    var argTocString = savedStateHandle.get_6bo4tg_k$('tocString');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, argNavigationVisible, true);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_9, VOID, VOID, EpubContentViewModel$slambda_0(argManifestUrl, argCevOpenUri, this, argTocString, null));
  }
  protoOf(EpubContentViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(EpubContentViewModel).get_epubScrollCommands_pa42ui_k$ = function () {
    return this.epubScrollCommands_1;
  };
  protoOf(EpubContentViewModel).get_titleAndLangCode_ihjgl9_k$ = function () {
    var langCodeVal = this._uiState_1.get_value_j01efc_k$().langCode_1;
    var titleVal = this.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_title_iz32un_k$();
    var tmp;
    if (!(langCodeVal == null) ? !(titleVal == null) : false) {
      tmp = new TitleAndLangCode(titleVal, langCodeVal);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(EpubContentViewModel).onClickLink_92fgoj_k$ = function (baseUrl, href) {
    var url = UrlKmp_0(baseUrl).resolve_rxg93i_k$(href);
    var urlStr = url.toString();
    var hashIndex = indexOf_0(urlStr, '#');
    var urlWithoutHash = substringBefore(urlStr, '#');
    var indexInSpine = this._uiState_1.get_value_j01efc_k$().spineUrls_1.indexOf_si1fv9_k$(urlWithoutHash);
    if (indexInSpine >= 0) {
      var tmp;
      if (hashIndex > 0) {
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = urlStr.substring(hashIndex);
      } else {
        tmp = null;
      }
      this._epubScrollCommands_1.tryEmit_ru0jrz_k$(new EpubScrollCommand(indexInSpine, tmp));
    } else {
      _get_openExternalLinkUseCase__ku5z07_1(this).invoke_ts1gt6_k$(url.toString(), LinkTarget_BLANK_getInstance());
    }
  };
  protoOf(EpubContentViewModel).onClickTocItem_1c90ye_k$ = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickTocItem.<anonymous>' call
        var nextValue = prevValue.copy$default_2poi0s_k$(VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = this.navUrl_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var baseHref = tmp;
    var tmp1_elvis_lhs = tocItem.href_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var itemUrl = tmp_0;
    this.onClickLink_92fgoj_k$(baseHref, itemUrl);
  };
  protoOf(EpubContentViewModel).onClickToggleTocItem_cvute2_k$ = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>' call
        var tmp;
        if (prevValue.collapsedTocUids_1.contains_aljjnj_k$(tocItem.uid_1)) {
          // Inline function 'kotlin.collections.filter' call
          // Inline function 'kotlin.collections.filterTo' call
          var this_1 = prevValue.collapsedTocUids_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.iterator_jk1svi_k$();
          while (tmp0_iterator.hasNext_bitz1p_k$()) {
            var element = tmp0_iterator.next_20eer_k$();
            // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>.<anonymous>' call
            if (!(element === tocItem.uid_1)) {
              destination.add_utx5q5_k$(element);
            }
          }
          tmp = toSet(destination);
        } else {
          tmp = plus_1(prevValue.collapsedTocUids_1, tocItem.uid_1);
        }
        var nextValue = prevValue.copy$default_2poi0s_k$(VOID, VOID, VOID, VOID, tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).onDismissTableOfContentsDrawer_pyqo2z_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onDismissTableOfContentsDrawer.<anonymous>' call
        var nextValue = prevValue.copy$default_2poi0s_k$(VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).onSpineIndexChanged_i3qly6_k$ = function (index) {
    var spineSize = this._uiState_1.get_value_j01efc_k$().spineUrls_1.get_size_woubt6_k$();
    if (spineSize <= 0)
      return Unit_getInstance();
    if (index === (spineSize - 1 | 0)) {
      this.onComplete_npiz6l_k$(true);
    } else {
      this.onProgressed_kt9krh_k$(imul(index, 100) / spineSize | 0);
    }
  };
  function EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? emptyList() : spineUrls;
    tableOfContents = tableOfContents === VOID ? emptyList() : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? false : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? emptySet() : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? null : coverImageUrl;
    langCode = langCode === VOID ? null : langCode;
    this.contentEntryVersionUid_1 = contentEntryVersionUid;
    this.spineUrls_1 = spineUrls;
    this.tableOfContents_1 = tableOfContents;
    this.tableOfContentsOpen_1 = tableOfContentsOpen;
    this.collapsedTocUids_1 = collapsedTocUids;
    this.coverImageUrl_1 = coverImageUrl;
    this.langCode_1 = langCode;
    var tmp = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.tableOfContents_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>' call
      var tmp$ret$0;
      $l$block_0: {
        // Inline function 'kotlin.collections.any' call
        var this_1 = this.collapsedTocUids_1;
        var tmp_0;
        if (isInterface(this_1, Collection)) {
          tmp_0 = this_1.isEmpty_y1axqb_k$();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
        var tmp0_iterator_0 = this_1.iterator_jk1svi_k$();
        while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
          var element_0 = tmp0_iterator_0.next_20eer_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>.<anonymous>' call
          if (element.isChildOfUid_i32gsv_k$(element_0)) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
        tmp$ret$0 = false;
      }
      if (!tmp$ret$0) {
        destination.add_utx5q5_k$(element);
      }
    }
    tmp.tableOfContentToDisplay_1 = destination;
  }
  protoOf(EpubContentUiState).get_contentEntryVersionUid_ku6ibq_k$ = function () {
    return this.contentEntryVersionUid_1;
  };
  protoOf(EpubContentUiState).get_spineUrls_qoxkg2_k$ = function () {
    return this.spineUrls_1;
  };
  protoOf(EpubContentUiState).get_tableOfContents_z88qs6_k$ = function () {
    return this.tableOfContents_1;
  };
  protoOf(EpubContentUiState).get_tableOfContentsOpen_jhopa8_k$ = function () {
    return this.tableOfContentsOpen_1;
  };
  protoOf(EpubContentUiState).get_collapsedTocUids_uq7ny5_k$ = function () {
    return this.collapsedTocUids_1;
  };
  protoOf(EpubContentUiState).get_coverImageUrl_sst41u_k$ = function () {
    return this.coverImageUrl_1;
  };
  protoOf(EpubContentUiState).get_langCode_ciluis_k$ = function () {
    return this.langCode_1;
  };
  protoOf(EpubContentUiState).get_tableOfContentToDisplay_tvvm0m_k$ = function () {
    return this.tableOfContentToDisplay_1;
  };
  protoOf(EpubContentUiState).component1_7eebsc_k$ = function () {
    return this.contentEntryVersionUid_1;
  };
  protoOf(EpubContentUiState).component2_7eebsb_k$ = function () {
    return this.spineUrls_1;
  };
  protoOf(EpubContentUiState).component3_7eebsa_k$ = function () {
    return this.tableOfContents_1;
  };
  protoOf(EpubContentUiState).component4_7eebs9_k$ = function () {
    return this.tableOfContentsOpen_1;
  };
  protoOf(EpubContentUiState).component5_7eebs8_k$ = function () {
    return this.collapsedTocUids_1;
  };
  protoOf(EpubContentUiState).component6_7eebs7_k$ = function () {
    return this.coverImageUrl_1;
  };
  protoOf(EpubContentUiState).component7_7eebs6_k$ = function () {
    return this.langCode_1;
  };
  protoOf(EpubContentUiState).copy_pvxgv2_k$ = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    return new EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).copy$default_2poi0s_k$ = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode, $super) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.contentEntryVersionUid_1 : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? this.spineUrls_1 : spineUrls;
    tableOfContents = tableOfContents === VOID ? this.tableOfContents_1 : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? this.tableOfContentsOpen_1 : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? this.collapsedTocUids_1 : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? this.coverImageUrl_1 : coverImageUrl;
    langCode = langCode === VOID ? this.langCode_1 : langCode;
    return $super === VOID ? this.copy_pvxgv2_k$(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) : $super.copy_pvxgv2_k$.call(this, contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).toString = function () {
    return 'EpubContentUiState(contentEntryVersionUid=' + this.contentEntryVersionUid_1.toString() + ', spineUrls=' + this.spineUrls_1 + ', tableOfContents=' + this.tableOfContents_1 + ', tableOfContentsOpen=' + this.tableOfContentsOpen_1 + ', collapsedTocUids=' + this.collapsedTocUids_1 + ', coverImageUrl=' + this.coverImageUrl_1 + ', langCode=' + this.langCode_1 + ')';
  };
  protoOf(EpubContentUiState).hashCode = function () {
    var result = this.contentEntryVersionUid_1.hashCode();
    result = imul(result, 31) + hashCode(this.spineUrls_1) | 0;
    result = imul(result, 31) + hashCode(this.tableOfContents_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tableOfContentsOpen_1) | 0;
    result = imul(result, 31) + hashCode(this.collapsedTocUids_1) | 0;
    result = imul(result, 31) + (this.coverImageUrl_1 == null ? 0 : getStringHashCode(this.coverImageUrl_1)) | 0;
    result = imul(result, 31) + (this.langCode_1 == null ? 0 : getStringHashCode(this.langCode_1)) | 0;
    return result;
  };
  protoOf(EpubContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof EpubContentUiState ? other : THROW_CCE();
    if (!this.contentEntryVersionUid_1.equals(tmp0_other_with_cast.contentEntryVersionUid_1))
      return false;
    if (!equals(this.spineUrls_1, tmp0_other_with_cast.spineUrls_1))
      return false;
    if (!equals(this.tableOfContents_1, tmp0_other_with_cast.tableOfContents_1))
      return false;
    if (!(this.tableOfContentsOpen_1 === tmp0_other_with_cast.tableOfContentsOpen_1))
      return false;
    if (!equals(this.collapsedTocUids_1, tmp0_other_with_cast.collapsedTocUids_1))
      return false;
    if (!(this.coverImageUrl_1 == tmp0_other_with_cast.coverImageUrl_1))
      return false;
    if (!(this.langCode_1 == tmp0_other_with_cast.langCode_1))
      return false;
    return true;
  };
  function EpubScrollCommand(spineIndex, hash) {
    hash = hash === VOID ? null : hash;
    this.spineIndex_1 = spineIndex;
    this.hash_1 = hash;
  }
  protoOf(EpubScrollCommand).get_spineIndex_oprsmw_k$ = function () {
    return this.spineIndex_1;
  };
  protoOf(EpubScrollCommand).get_hash_won4uv_k$ = function () {
    return this.hash_1;
  };
  protoOf(EpubScrollCommand).component1_7eebsc_k$ = function () {
    return this.spineIndex_1;
  };
  protoOf(EpubScrollCommand).component2_7eebsb_k$ = function () {
    return this.hash_1;
  };
  protoOf(EpubScrollCommand).copy_txukzo_k$ = function (spineIndex, hash) {
    return new EpubScrollCommand(spineIndex, hash);
  };
  protoOf(EpubScrollCommand).copy$default_f2ype3_k$ = function (spineIndex, hash, $super) {
    spineIndex = spineIndex === VOID ? this.spineIndex_1 : spineIndex;
    hash = hash === VOID ? this.hash_1 : hash;
    return $super === VOID ? this.copy_txukzo_k$(spineIndex, hash) : $super.copy_txukzo_k$.call(this, spineIndex, hash);
  };
  protoOf(EpubScrollCommand).toString = function () {
    return 'EpubScrollCommand(spineIndex=' + this.spineIndex_1 + ', hash=' + this.hash_1 + ')';
  };
  protoOf(EpubScrollCommand).hashCode = function () {
    var result = this.spineIndex_1;
    result = imul(result, 31) + (this.hash_1 == null ? 0 : getStringHashCode(this.hash_1)) | 0;
    return result;
  };
  protoOf(EpubScrollCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubScrollCommand))
      return false;
    var tmp0_other_with_cast = other instanceof EpubScrollCommand ? other : THROW_CCE();
    if (!(this.spineIndex_1 === tmp0_other_with_cast.spineIndex_1))
      return false;
    if (!(this.hash_1 == tmp0_other_with_cast.hash_1))
      return false;
    return true;
  };
  function EpubTocItem(uid, label, href, children, parentUids, indentLevel) {
    parentUids = parentUids === VOID ? emptySet() : parentUids;
    indentLevel = indentLevel === VOID ? 0 : indentLevel;
    this.uid_1 = uid;
    this.label_1 = label;
    this.href_1 = href;
    this.children_1 = children;
    this.parentUids_1 = parentUids;
    this.indentLevel_1 = indentLevel;
    var tmp = this;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp.hasChildren_1 = !this.children_1.isEmpty_y1axqb_k$();
  }
  protoOf(EpubTocItem).get_uid_18iuqh_k$ = function () {
    return this.uid_1;
  };
  protoOf(EpubTocItem).get_label_iuj8p7_k$ = function () {
    return this.label_1;
  };
  protoOf(EpubTocItem).get_href_wonh4k_k$ = function () {
    return this.href_1;
  };
  protoOf(EpubTocItem).get_children_4cwbp4_k$ = function () {
    return this.children_1;
  };
  protoOf(EpubTocItem).get_parentUids_o7wvbe_k$ = function () {
    return this.parentUids_1;
  };
  protoOf(EpubTocItem).get_indentLevel_omi4hd_k$ = function () {
    return this.indentLevel_1;
  };
  protoOf(EpubTocItem).get_hasChildren_hui79s_k$ = function () {
    return this.hasChildren_1;
  };
  protoOf(EpubTocItem).isChildOfUid_i32gsv_k$ = function (uid) {
    return this.parentUids_1.contains_aljjnj_k$(uid);
  };
  protoOf(EpubTocItem).component1_7eebsc_k$ = function () {
    return this.uid_1;
  };
  protoOf(EpubTocItem).component2_7eebsb_k$ = function () {
    return this.label_1;
  };
  protoOf(EpubTocItem).component3_7eebsa_k$ = function () {
    return this.href_1;
  };
  protoOf(EpubTocItem).component4_7eebs9_k$ = function () {
    return this.children_1;
  };
  protoOf(EpubTocItem).component5_7eebs8_k$ = function () {
    return this.parentUids_1;
  };
  protoOf(EpubTocItem).component6_7eebs7_k$ = function () {
    return this.indentLevel_1;
  };
  protoOf(EpubTocItem).copy_20nowo_k$ = function (uid, label, href, children, parentUids, indentLevel) {
    return new EpubTocItem(uid, label, href, children, parentUids, indentLevel);
  };
  protoOf(EpubTocItem).copy$default_s6frtg_k$ = function (uid, label, href, children, parentUids, indentLevel, $super) {
    uid = uid === VOID ? this.uid_1 : uid;
    label = label === VOID ? this.label_1 : label;
    href = href === VOID ? this.href_1 : href;
    children = children === VOID ? this.children_1 : children;
    parentUids = parentUids === VOID ? this.parentUids_1 : parentUids;
    indentLevel = indentLevel === VOID ? this.indentLevel_1 : indentLevel;
    return $super === VOID ? this.copy_20nowo_k$(uid, label, href, children, parentUids, indentLevel) : $super.copy_20nowo_k$.call(this, uid, label, href, children, parentUids, indentLevel);
  };
  protoOf(EpubTocItem).toString = function () {
    return 'EpubTocItem(uid=' + this.uid_1 + ', label=' + this.label_1 + ', href=' + this.href_1 + ', children=' + this.children_1 + ', parentUids=' + this.parentUids_1 + ', indentLevel=' + this.indentLevel_1 + ')';
  };
  protoOf(EpubTocItem).hashCode = function () {
    var result = this.uid_1;
    result = imul(result, 31) + getStringHashCode(this.label_1) | 0;
    result = imul(result, 31) + (this.href_1 == null ? 0 : getStringHashCode(this.href_1)) | 0;
    result = imul(result, 31) + hashCode(this.children_1) | 0;
    result = imul(result, 31) + hashCode(this.parentUids_1) | 0;
    result = imul(result, 31) + this.indentLevel_1 | 0;
    return result;
  };
  protoOf(EpubTocItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubTocItem))
      return false;
    var tmp0_other_with_cast = other instanceof EpubTocItem ? other : THROW_CCE();
    if (!(this.uid_1 === tmp0_other_with_cast.uid_1))
      return false;
    if (!(this.label_1 === tmp0_other_with_cast.label_1))
      return false;
    if (!(this.href_1 == tmp0_other_with_cast.href_1))
      return false;
    if (!equals(this.children_1, tmp0_other_with_cast.children_1))
      return false;
    if (!equals(this.parentUids_1, tmp0_other_with_cast.parentUids_1))
      return false;
    if (!(this.indentLevel_1 === tmp0_other_with_cast.indentLevel_1))
      return false;
    return true;
  };
  function httpClient$factory_5() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function xml$factory() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_1() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_1(receiver);
    }, null);
  }
  function httpClient$factory_6() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function xml$factory_0() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_2() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_1(receiver);
    }, null);
  }
  function Companion_161() {
    Companion_instance_161 = this;
    this.DEST_NAME_1 = 'Error';
  }
  protoOf(Companion_161).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_161;
  function Companion_getInstance_222() {
    if (Companion_instance_161 == null)
      new Companion_161();
    return Companion_instance_161;
  }
  function ErrorViewModel() {
    Companion_getInstance_222();
  }
  function LoginViewModel$getCredentials$slambda$lambda($credentialResult) {
    return function () {
      return 'Error occurred: ' + $credentialResult.get_message_h23axq_k$();
    };
  }
  function LoginViewModel$getCredentials$slambda$lambda_0($e) {
    return function () {
      return 'Error occurred: ' + $e.message;
    };
  }
  function _get__uiState__8e9jsd_34($this) {
    return $this._uiState_1;
  }
  function _set_nextDestination__vdv3ka($this, _set____db54di) {
    $this.nextDestination_1 = _set____db54di;
  }
  function _get_nextDestination__tjiqwa($this) {
    return $this.nextDestination_1;
  }
  function _set_serverUrl__a3flyf($this, _set____db54di) {
    $this.serverUrl_1 = _set____db54di;
  }
  function _get_serverUrl__j7eug5($this) {
    return $this.serverUrl_1;
  }
  function _get_impl__d88w17_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.impl$delegate_1;
    impl$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_httpClient__2ty1zc_7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.httpClient$delegate_1;
    httpClient$factory_8();
    return this_0.get_value_j01efc_k$();
  }
  function _get_apiUrlConfig__mldllg_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_8();
    return this_0.get_value_j01efc_k$();
  }
  function _set_verifiedSite__uqee4o($this, _set____db54di) {
    $this.verifiedSite_1 = _set____db54di;
  }
  function _get_verifiedSite__oqyxac($this) {
    return $this.verifiedSite_1;
  }
  function _get_setLanguageUseCase__st7nci_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.setLanguageUseCase$delegate_1;
    setLanguageUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_languagesConfig__hebcss($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.languagesConfig$delegate_1;
    languagesConfig$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_validateUsernameUseCase__yg4coq($this) {
    return $this.validateUsernameUseCase_1;
  }
  function _get_filterUsernameUseCase__xlwzqg($this) {
    return $this.filterUsernameUseCase_1;
  }
  function _get_getVersionUseCase__n7x57g_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getVersionUseCase$delegate_1;
    getVersionUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_getShowPoweredByUseCase__5l0p0e_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getShowPoweredByUseCase$delegate_1;
    getShowPoweredByUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_dontSetCurrentSession__mobbul_1($this) {
    return $this.dontSetCurrentSession_1;
  }
  function _set_usingSavedPassword__5n0s7b($this, _set____db54di) {
    $this.usingSavedPassword_1 = _set____db54di;
  }
  function _get_usingSavedPassword__vg7ynh($this) {
    return $this.usingSavedPassword_1;
  }
  function _get_getCredentialUseCase__qofq9r_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getCredentialUseCase$delegate_1;
    getCredentialUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.parseCredentialUsernameUseCase$delegate_1;
    parseCredentialUsernameUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function onSiteVerified($this, site) {
    $this.verifiedSite_1 = site;
    $this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onSiteVerified.<anonymous>' call
        var tmp0_connectAsGuestVisible = site.get_guestLogin_lk9bzu_k$();
        var nextValue = prevValue.copy$default_7qkblh_k$(VOID, VOID, true, VOID, VOID, VOID, tmp0_connectAsGuestVisible, VOID, null);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function goToNextDestAfterLoginOrGuestSelected($this, person) {
    var goOptions = new UstadGoOptions(VOID, VOID, true);
    var tmp = Napier_getInstance();
    tmp.d$default_iccotn_k$(VOID, VOID, LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda($this));
    if (person.get_isPersonalAccount_yq673a_k$()) {
      $this.nextDestination_1 = Companion_getInstance_204().get_DEST_NAME_HOME_lftflt_k$();
    }
    $this.navigateToViewUri_qtkrj7_k$($this.get_navController_qibdoq_k$(), appendSelectedAccount($this.nextDestination_1, person.get_personUid_mmhd76_k$(), new LearningSpace($this.serverUrl_1)), goOptions);
  }
  function getCredentials_0($this) {
    var tmp0_elvis_lhs = _get_getCredentialUseCase__qofq9r_0($this);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var getCredentialUseCaseVal = tmp;
    var tmp_0 = $this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, LoginViewModel$getCredentials$slambda_0(getCredentialUseCaseVal, $this, null));
  }
  function Companion_162() {
    Companion_instance_162 = this;
    this.DEST_NAME_1 = 'Login';
  }
  protoOf(Companion_162).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_162;
  function Companion_getInstance_223() {
    if (Companion_instance_162 == null)
      new Companion_162();
    return Companion_instance_162;
  }
  function LoginViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LoginViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            if (!(this.this$0__1.verifiedSite_1 == null)) {
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            }

            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(2);
            suspendResult = verifySite(_get_httpClient__2ty1zc_7(this.this$0__1), this.this$0__1.serverUrl_1, new Long(10000, 0), this.this$0__1.get_json_woos35_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.site0__1 = suspendResult;
            onSiteVerified(this.this$0__1, this.site0__1);
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(7);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Exception) {
              this.e1__1 = this.get_exception_x0n6w6_k$();
              Napier_getInstance().w$default_p42du4_k$('Could not load site object for ' + this.this$0__1.serverUrl_1, this.e1__1);
              l$ret$1: do {
                var this_0 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_0.get_value_j01efc_k$();
                  var nextValue = prevValue.copy$default_7qkblh_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, _get_impl__d88w17_0(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_login_network_error_b1pwy0_k$()));
                  if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              suspendResult = delay(new Long(10000, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 4:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            this.set_exceptionState_fex74n_k$(7);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 6:
            return Unit_getInstance();
          case 7:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 7) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new LoginViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(LoginViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function LoginViewModel$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda(this$0) {
    return function () {
      return 'LoginPresenter: go to next destination: ' + this$0.nextDestination_1;
    };
  }
  function LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation) {
    this.this$0__1 = this$0;
    this.$username_1 = $username;
    this.$password_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickLogin$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LoginViewModel$onClickLogin$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(8);
            this.errorMessage0__1 = null;
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(7);
            this.set_exceptionState_fex74n_k$(6);
            this.set_state_rjd8d0_k$(2);
            var tmp_0 = this.this$0__1.get_accountManager_bzeywn_k$();
            var this_0 = this.$username_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.$password_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            var tmp_3 = this.this$0__1.serverUrl_1;
            var tmp0_safe_receiver = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_MAX_DATE_OF_BIRTH_2cklxh_k$());
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.login_jicr3d_k$(tmp_1, tmp_2, tmp_3, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.this$0__1.dontSetCurrentSession_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.account2__1 = suspendResult;
            if (!this.this$0__1.usingSavedPassword_1) {
              var tmp_4 = this;
              var this_2 = this.this$0__1.get_di_knto1e_k$();
              var context = new LearningSpace(this.this$0__1.serverUrl_1);
              var trigger = this_2.get_diTrigger_fb5jcm_k$();
              var tmp_5 = Companion_getInstance_2();
              var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_7 = get_direct(On(this_2, tmp_5.invoke_4wgfc3_k$(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
              var tmp_8 = typeToken(createKType(getKClass(SavePasswordUseCase), arrayOf([]), false));
              tmp_4.savePasswordUseCase3__1 = tmp_7.InstanceOrNull_akutzz_k$(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), null);
              this.tmp2_safe_receiver4__1 = this.savePasswordUseCase3__1;
              if (this.tmp2_safe_receiver4__1 == null) {
                this.WHEN_RESULT5__1 = null;
                this.set_state_rjd8d0_k$(4);
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(3);
                var this_3 = this.$username_1;
                var tmp_9 = toString(trim(isCharSequence(this_3) ? this_3 : THROW_CCE()));
                var this_4 = this.$password_1;
                suspendResult = this.tmp2_safe_receiver4__1.invoke_4qk82n_k$(tmp_9, toString(trim(isCharSequence(this_4) ? this_4 : THROW_CCE())), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 3:
            var tmp_10 = this;
            tmp_10.WHEN_RESULT5__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            var tmp_11 = this;
            goToNextDestAfterLoginOrGuestSelected(this.this$0__1, this.account2__1.toPerson_v1b6fk_k$());
            tmp_11.tmp$ret$01__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(8);
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 6:
            this.set_exceptionState_fex74n_k$(7);
            var tmp_12 = this.get_exception_x0n6w6_k$();
            if (tmp_12 instanceof AdultAccountRequiredException) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_13 = this;
              this.errorMessage0__1 = _get_impl__d88w17_0(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_adult_account_required_hbft5r_k$());
              tmp_13.tmp$ret$01__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(8);
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            } else {
              var tmp_14 = this.get_exception_x0n6w6_k$();
              if (tmp_14 instanceof UnauthorizedException) {
                var e_0 = this.get_exception_x0n6w6_k$();
                var tmp_15 = this;
                this.errorMessage0__1 = _get_impl__d88w17_0(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_wrong_user_pass_combo_so7k7t_k$());
                tmp_15.tmp$ret$01__1 = Unit_getInstance();
                this.set_exceptionState_fex74n_k$(8);
                this.set_state_rjd8d0_k$(9);
                continue $sm;
              } else {
                var tmp_16 = this.get_exception_x0n6w6_k$();
                if (tmp_16 instanceof ConsentNotGrantedException) {
                  var e_1 = this.get_exception_x0n6w6_k$();
                  var tmp_17 = this;
                  this.errorMessage0__1 = _get_impl__d88w17_0(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_your_account_needs_approved_9xp7xu_k$());
                  tmp_17.tmp$ret$01__1 = Unit_getInstance();
                  this.set_exceptionState_fex74n_k$(8);
                  this.set_state_rjd8d0_k$(9);
                  continue $sm;
                } else {
                  var tmp_18 = this.get_exception_x0n6w6_k$();
                  if (tmp_18 instanceof Exception) {
                    var e_2 = this.get_exception_x0n6w6_k$();
                    var tmp_19 = this;
                    this.errorMessage0__1 = _get_impl__d88w17_0(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_login_network_error_b1pwy0_k$());
                    tmp_19.tmp$ret$01__1 = Unit_getInstance();
                    this.set_exceptionState_fex74n_k$(8);
                    this.set_state_rjd8d0_k$(9);
                    continue $sm;
                  } else {
                    throw this.get_exception_x0n6w6_k$();
                  }
                }
              }
            }

          case 7:
            this.set_exceptionState_fex74n_k$(8);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$3: do {
              var this_5 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_5.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_7qkblh_k$(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.errorMessage0__1);
                if (this_5.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            throw t;
          case 8:
            throw this.get_exception_x0n6w6_k$();
          case 9:
            this.set_exceptionState_fex74n_k$(8);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$5: do {
              var this_6 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_6.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_7qkblh_k$(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.errorMessage0__1);
                if (this_6.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_3 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 8) {
          throw e_3;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_3);
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickLogin$slambda(this.this$0__1, this.$username_1, this.$password_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(LoginViewModel$onClickLogin$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function LoginViewModel$onClickLogin$slambda_0(this$0, $username, $password, resultContinuation) {
    var i = new LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().startGuestSession_2uklfe_k$(this.this$0__1.serverUrl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var guestPerson = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.this$0__1, guestPerson.get_person_i0c866_k$());
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function LoginViewModel$onClickConnectAsGuest$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$getCredentials$slambda($getCredentialUseCaseVal, this$0, resultContinuation) {
    this.$getCredentialUseCaseVal_1 = $getCredentialUseCaseVal;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$getCredentials$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LoginViewModel$getCredentials$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$getCredentials$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.$getCredentialUseCaseVal_1.invoke_22774b_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.credentialResult0__1 = suspendResult;
            var tmp_0 = this.credentialResult0__1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().loginWithPasskey_m4qfem_k$(this.credentialResult0__1.get_passkeyWebAuthNResponse_wr4mig_k$(), this.this$0__1.serverUrl_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this.credentialResult0__1;
              if (tmp_1 instanceof PasswordCredentialResult) {
                var tmp0_container = _get_parseCredentialUsernameUseCase__8m48wk_0(this.this$0__1).invoke_lt562m_k$(this.credentialResult0__1.get_credentialUsername_qohbu2_k$());
                var learningSpace = tmp0_container.component1_7eebsc_k$();
                var username = tmp0_container.component2_7eebsb_k$();
                this.this$0__1.onUsernameChanged_in39d7_k$(username);
                this.this$0__1.onPasswordChanged_xpym34_k$(this.credentialResult0__1.get_password_bodifw_k$());
                this.this$0__1.usingSavedPassword_1 = true;
                var tmp_2 = this.this$0__1;
                var this_0 = learningSpace.get_url_18iuii_k$();
                this.this$0__1.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), this_0);
                tmp_2.serverUrl_1 = this_0;
                this.this$0__1.onClickLogin_qqzdps_k$();
                this.set_state_rjd8d0_k$(3);
                continue $sm;
              } else {
                var tmp_3 = this.credentialResult0__1;
                if (tmp_3 instanceof Error_1) {
                  l$ret$1: do {
                    var this_1 = this.this$0__1._uiState_1;
                    while (true) {
                      var prevValue = this_1.get_value_j01efc_k$();
                      var nextValue = prevValue.copy$default_7qkblh_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.credentialResult0__1.get_message_h23axq_k$());
                      if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                        break l$ret$1;
                      }
                    }
                  }
                   while (false);
                  var tmp_4 = Napier_getInstance();
                  tmp_4.e$default_s5p7m2_k$(VOID, VOID, LoginViewModel$getCredentials$slambda$lambda(this.credentialResult0__1));
                  this.set_state_rjd8d0_k$(3);
                  continue $sm;
                } else {
                  var tmp_5 = this.credentialResult0__1;
                  if (tmp_5 instanceof NoCredentialAvailableResult) {
                    this.set_state_rjd8d0_k$(3);
                    continue $sm;
                  } else {
                    this.set_state_rjd8d0_k$(3);
                    continue $sm;
                  }
                }
              }
            }

          case 2:
            var account = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.this$0__1, account.toPerson_v1b6fk_k$());
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var tmp_6 = this.get_exception_x0n6w6_k$();
            if (tmp_6 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_7 = Napier_getInstance();
              tmp_7.e$default_s5p7m2_k$(VOID, VOID, LoginViewModel$getCredentials$slambda$lambda_0(e));
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 5:
            throw this.get_exception_x0n6w6_k$();
          case 6:
            this.set_exceptionState_fex74n_k$(5);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$getCredentials$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new LoginViewModel$getCredentials$slambda(this.$getCredentialUseCaseVal_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(LoginViewModel$getCredentials$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function LoginViewModel$getCredentials$slambda_0($getCredentialUseCaseVal, this$0, resultContinuation) {
    var i = new LoginViewModel$getCredentials$slambda($getCredentialUseCaseVal, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel(di, savedStateHandle) {
    Companion_getInstance_223();
    UstadViewModel.call(this, di, savedStateHandle, 'Login');
    this._uiState_1 = MutableStateFlow(new LoginUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.impl$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, impl$factory_1());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.httpClient$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, httpClient$factory_7());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_7());
    this.verifiedSite_1 = null;
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.setLanguageUseCase$delegate_1 = Instance(this, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, setLanguageUseCase$factory_1());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.languagesConfig$delegate_1 = Instance(this, tmp$ret$8, null).provideDelegate_o2qlc1_k$(this, languagesConfig$factory());
    this.validateUsernameUseCase_1 = new ValidateUsernameUseCase_0();
    this.filterUsernameUseCase_1 = new FilterUsernameUseCase();
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.getVersionUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$10, null).provideDelegate_o2qlc1_k$(this, getVersionUseCase$factory_1());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.getShowPoweredByUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$12, null).provideDelegate_o2qlc1_k$(this, getShowPoweredByUseCase$factory_1());
    var tmp_13 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_13.dontSetCurrentSession_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    this.usingSavedPassword_1 = false;
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_15 = typeToken(createKType(getKClass(GetCredentialUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
    tmp_14.getCredentialUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$14, null).provideDelegate_o2qlc1_k$(this, getCredentialUseCase$factory_1());
    var tmp_16 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_17 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    tmp_16.parseCredentialUsernameUseCase$delegate_1 = Instance(this, tmp$ret$16, null).provideDelegate_o2qlc1_k$(this, parseCredentialUsernameUseCase$factory_1());
    var tmp_18 = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
    tmp_18.nextDestination_1 = tmp0_elvis_lhs == null ? Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$() : tmp0_elvis_lhs;
    var tmp_19 = this;
    var tmp1_elvis_lhs_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$());
    var tmp2_elvis_lhs = tmp1_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_3(this).get_presetLearningSpaceUrl_nzw9pt_k$() : tmp1_elvis_lhs_0;
    tmp_19.serverUrl_1 = tmp2_elvis_lhs == null ? 'http://localhost' : tmp2_elvis_lhs;
    savedStateHandle.set_wua6pr_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), this.serverUrl_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
        var tmp_20 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_version_72w4j3_k$()) + ': ';
        var tmp0_safe_receiver_0 = _get_getVersionUseCase__n7x57g_0(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.invoke_jkqnwo_k$();
        var tmp_21 = tmp_20 + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_versionString_blgteo_k$());
        var tmp_22 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_INTENT_MESSAGE_fgwz62_k$());
        var tmp_23 = _get_languagesConfig__hebcss(this).getCurrentLanguage_ra0l1n_k$(this.get_systemImpl_9jowp4_k$());
        var tmp_24 = _get_languagesConfig__hebcss(this).supportedUiLanguagesAndSysDefault_rnahh0_k$(this.get_systemImpl_9jowp4_k$());
        var tmp2_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e_0(this);
        var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.invoke_jkqnwo_k$();
        var nextValue = prevValue.copy$default_7qkblh_k$(VOID, VOID, VOID, VOID, VOID, tmp_21, VOID, tmp_22, VOID, tmp_23, tmp_24, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (savedStateHandle.get_6bo4tg_k$(Companion_getInstance_244().get_ARG_IS_PERSONAL_ACCOUNT_yt5p7z_k$()) === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_1.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_7qkblh_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    var tmp3_title = _get_impl__d88w17_0(this).getString_a9yhoi_k$(strings_getInstance().get_login_iusabk_k$());
    var baseAppUiState = new AppUiState(VOID, VOID, tmp3_title, false, VOID, VOID, false);
    this.serverUrl_1 = requirePostfix(this.serverUrl_1, '/');
    var siteJsonStr = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_SITE_q1a649_k$());
    if (!(siteJsonStr == null)) {
      this.get__appUiState_rulqry_k$().set_value_v1vabv_k$(baseAppUiState);
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_2 = this.get_json_woos35_k$();
      // Inline function 'kotlinx.serialization.serializer' call
      var this_3 = this_2.get_serializersModule_piitvg_k$();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_4 = serializer(this_3, createKType(getKClass(Site), arrayOf([]), false));
      var tmp$ret$23 = isInterface(this_4, KSerializer) ? this_4 : THROW_CCE();
      var tmp$ret$24 = this_2.decodeFromString_jwu9sq_k$(tmp$ret$23, siteJsonStr);
      onSiteVerified(this, tmp$ret$24);
    } else {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_5 = this._uiState_1;
        while (true) {
          var prevValue_1 = this_5.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_1 = prevValue_1.copy$default_7qkblh_k$(VOID, VOID, false);
          if (this_5.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
      this.get__appUiState_rulqry_k$().set_value_v1vabv_k$(baseAppUiState.copy$default_9ltzmx_k$(VOID, Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()));
      var tmp_25 = this.get_viewModelScope_ryv1dz_k$();
      launch(tmp_25, VOID, VOID, LoginViewModel$slambda_0(this, null));
    }
    getCredentials_0(this);
  }
  protoOf(LoginViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(LoginViewModel).onUsernameChanged_in39d7_k$ = function (newValue) {
    this.usingSavedPassword_1 = false;
    var filteredValue = this.filterUsernameUseCase_1.invoke_h1q7yg_k$(newValue, '');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onUsernameChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_7qkblh_k$(filteredValue);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).onPasswordChanged_xpym34_k$ = function (password) {
    this.usingSavedPassword_1 = false;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_7qkblh_k$(VOID, password);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).onClickLogin_qqzdps_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var this_1 = prevValue.username_1;
        var tmp0_username = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
        // Inline function 'kotlin.text.trim' call
        var this_2 = prevValue.password_1;
        var tmp1_password = toString(trim(isCharSequence(this_2) ? this_2 : THROW_CCE()));
        var nextValue = prevValue.copy$default_7qkblh_k$(tmp0_username, tmp1_password, false, null, null);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var username = this._uiState_1.get_value_j01efc_k$().username_1;
    var password = this._uiState_1.get_value_j01efc_k$().password_1;
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(username) > 0) {
      // Inline function 'kotlin.text.isNotEmpty' call
      tmp = charSequenceLength(password) > 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      var validationResult = this.validateUsernameUseCase_1.invoke_lt562m_k$(username);
      if (!validationResult.equals(Companion_getInstance_121().get_Valid_iifz5f_k$())) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_3 = this._uiState_1;
          while (true) {
            var prevValue_0 = this_3.get_value_j01efc_k$();
            // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
            var tmp0_safe_receiver = validationResult.get_errorMessage_ofxtm0_k$();
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>.<anonymous>' call
              tmp_0 = _get_impl__d88w17_0(this).getString_a9yhoi_k$(tmp0_safe_receiver);
            }
            var nextValue_0 = prevValue_0.copy$default_7qkblh_k$(VOID, VOID, true, tmp_0);
            if (this_3.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_getInstance();
      }
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
      var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
      launch(tmp_1, VOID, VOID, LoginViewModel$onClickLogin$slambda_0(this, username, password, null));
    } else {
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this._uiState_1;
        while (true) {
          var prevValue_1 = this_4.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
          var tmp_2;
          // Inline function 'kotlin.text.isEmpty' call
          var this_5 = prevValue_1.username_1;
          if (charSequenceLength(this_5) === 0) {
            tmp_2 = _get_impl__d88w17_0(this).getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
          } else {
            tmp_2 = null;
          }
          var tmp_3 = tmp_2;
          var tmp_4;
          // Inline function 'kotlin.text.isEmpty' call
          var this_6 = prevValue_1.password_1;
          if (charSequenceLength(this_6) === 0) {
            tmp_4 = _get_impl__d88w17_0(this).getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
          } else {
            tmp_4 = null;
          }
          var nextValue_1 = prevValue_1.copy$default_7qkblh_k$(VOID, VOID, true, tmp_3, tmp_4);
          if (this_4.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).onChangeLanguage_cfqpor_k$ = function (uiLanguage) {
    if (!uiLanguage.equals(this._uiState_1.get_value_j01efc_k$().currentLanguage_1)) {
      var tmp = _get_setLanguageUseCase__st7nci_0(this);
      var tmp_0 = this.get_navController_qibdoq_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
      this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
      this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$());
      this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_156().get_ARG_SITE_q1a649_k$());
      var tmp$ret$2 = this_0.build_1k0s4u_k$();
      var result = tmp.invoke_bo0obb_k$(uiLanguage, 'Login', tmp_0, tmp$ret$2);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this._uiState_1;
        while (true) {
          var prevValue = this_1.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
          var nextValue = prevValue.copy$default_7qkblh_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, uiLanguage, VOID, result.get_waitForRestart_vo16qs_k$());
          if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).onClickConnectAsGuest_p9y77v_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, LoginViewModel$onClickConnectAsGuest$slambda_0(this, null));
  };
  function LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordError = passwordError === VOID ? null : passwordError;
    versionInfo = versionInfo === VOID ? 'v42' : versionInfo;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? false : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? null : loginIntentMessage;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    currentLanguage = currentLanguage === VOID ? new UiLanguage('en', 'English') : currentLanguage;
    languageList = languageList === VOID ? listOf_0(currentLanguage) : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? false : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    errorText = errorText === VOID ? null : errorText;
    this.username_1 = username;
    this.password_1 = password;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.usernameError_1 = usernameError;
    this.passwordError_1 = passwordError;
    this.versionInfo_1 = versionInfo;
    this.connectAsGuestVisible_1 = connectAsGuestVisible;
    this.loginIntentMessage_1 = loginIntentMessage;
    this.errorMessage_1 = errorMessage;
    this.currentLanguage_1 = currentLanguage;
    this.languageList_1 = languageList;
    this.showWaitForRestart_1 = showWaitForRestart;
    this.showPoweredBy_1 = showPoweredBy;
    this.isPersonalAccount_1 = isPersonalAccount;
    this.errorText_1 = errorText;
  }
  protoOf(LoginUiState).get_username_ytz5i7_k$ = function () {
    return this.username_1;
  };
  protoOf(LoginUiState).get_password_bodifw_k$ = function () {
    return this.password_1;
  };
  protoOf(LoginUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(LoginUiState).get_usernameError_i4qze1_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(LoginUiState).get_passwordError_55tjwk_k$ = function () {
    return this.passwordError_1;
  };
  protoOf(LoginUiState).get_versionInfo_pa9yrh_k$ = function () {
    return this.versionInfo_1;
  };
  protoOf(LoginUiState).get_connectAsGuestVisible_kivnsd_k$ = function () {
    return this.connectAsGuestVisible_1;
  };
  protoOf(LoginUiState).get_loginIntentMessage_z692sr_k$ = function () {
    return this.loginIntentMessage_1;
  };
  protoOf(LoginUiState).get_errorMessage_ofxtm0_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(LoginUiState).get_currentLanguage_kpnmk8_k$ = function () {
    return this.currentLanguage_1;
  };
  protoOf(LoginUiState).get_languageList_u20dcx_k$ = function () {
    return this.languageList_1;
  };
  protoOf(LoginUiState).get_showWaitForRestart_gqlxof_k$ = function () {
    return this.showWaitForRestart_1;
  };
  protoOf(LoginUiState).get_showPoweredBy_25x6id_k$ = function () {
    return this.showPoweredBy_1;
  };
  protoOf(LoginUiState).get_isPersonalAccount_yq673a_k$ = function () {
    return this.isPersonalAccount_1;
  };
  protoOf(LoginUiState).get_errorText_dypup8_k$ = function () {
    return this.errorText_1;
  };
  protoOf(LoginUiState).component1_7eebsc_k$ = function () {
    return this.username_1;
  };
  protoOf(LoginUiState).component2_7eebsb_k$ = function () {
    return this.password_1;
  };
  protoOf(LoginUiState).component3_7eebsa_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(LoginUiState).component4_7eebs9_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(LoginUiState).component5_7eebs8_k$ = function () {
    return this.passwordError_1;
  };
  protoOf(LoginUiState).component6_7eebs7_k$ = function () {
    return this.versionInfo_1;
  };
  protoOf(LoginUiState).component7_7eebs6_k$ = function () {
    return this.connectAsGuestVisible_1;
  };
  protoOf(LoginUiState).component8_7eebs5_k$ = function () {
    return this.loginIntentMessage_1;
  };
  protoOf(LoginUiState).component9_7eebs4_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(LoginUiState).component10_gazzfo_k$ = function () {
    return this.currentLanguage_1;
  };
  protoOf(LoginUiState).component11_gazzfn_k$ = function () {
    return this.languageList_1;
  };
  protoOf(LoginUiState).component12_gazzfm_k$ = function () {
    return this.showWaitForRestart_1;
  };
  protoOf(LoginUiState).component13_gazzfl_k$ = function () {
    return this.showPoweredBy_1;
  };
  protoOf(LoginUiState).component14_gazzfk_k$ = function () {
    return this.isPersonalAccount_1;
  };
  protoOf(LoginUiState).component15_gazzfj_k$ = function () {
    return this.errorText_1;
  };
  protoOf(LoginUiState).copy_erhjyj_k$ = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) {
    return new LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText);
  };
  protoOf(LoginUiState).copy$default_7qkblh_k$ = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText, $super) {
    username = username === VOID ? this.username_1 : username;
    password = password === VOID ? this.password_1 : password;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    usernameError = usernameError === VOID ? this.usernameError_1 : usernameError;
    passwordError = passwordError === VOID ? this.passwordError_1 : passwordError;
    versionInfo = versionInfo === VOID ? this.versionInfo_1 : versionInfo;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? this.connectAsGuestVisible_1 : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? this.loginIntentMessage_1 : loginIntentMessage;
    errorMessage = errorMessage === VOID ? this.errorMessage_1 : errorMessage;
    currentLanguage = currentLanguage === VOID ? this.currentLanguage_1 : currentLanguage;
    languageList = languageList === VOID ? this.languageList_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.showWaitForRestart_1 : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? this.showPoweredBy_1 : showPoweredBy;
    isPersonalAccount = isPersonalAccount === VOID ? this.isPersonalAccount_1 : isPersonalAccount;
    errorText = errorText === VOID ? this.errorText_1 : errorText;
    return $super === VOID ? this.copy_erhjyj_k$(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) : $super.copy_erhjyj_k$.call(this, username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText);
  };
  protoOf(LoginUiState).toString = function () {
    return 'LoginUiState(username=' + this.username_1 + ', password=' + this.password_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', usernameError=' + this.usernameError_1 + ', passwordError=' + this.passwordError_1 + ', versionInfo=' + this.versionInfo_1 + ', connectAsGuestVisible=' + this.connectAsGuestVisible_1 + ', loginIntentMessage=' + this.loginIntentMessage_1 + ', errorMessage=' + this.errorMessage_1 + ', currentLanguage=' + this.currentLanguage_1 + ', languageList=' + this.languageList_1 + ', showWaitForRestart=' + this.showWaitForRestart_1 + ', showPoweredBy=' + this.showPoweredBy_1 + ', isPersonalAccount=' + this.isPersonalAccount_1 + ', errorText=' + this.errorText_1 + ')';
  };
  protoOf(LoginUiState).hashCode = function () {
    var result = getStringHashCode(this.username_1);
    result = imul(result, 31) + getStringHashCode(this.password_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + (this.usernameError_1 == null ? 0 : getStringHashCode(this.usernameError_1)) | 0;
    result = imul(result, 31) + (this.passwordError_1 == null ? 0 : getStringHashCode(this.passwordError_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.versionInfo_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.connectAsGuestVisible_1) | 0;
    result = imul(result, 31) + (this.loginIntentMessage_1 == null ? 0 : getStringHashCode(this.loginIntentMessage_1)) | 0;
    result = imul(result, 31) + (this.errorMessage_1 == null ? 0 : getStringHashCode(this.errorMessage_1)) | 0;
    result = imul(result, 31) + this.currentLanguage_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.languageList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showWaitForRestart_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showPoweredBy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isPersonalAccount_1) | 0;
    result = imul(result, 31) + (this.errorText_1 == null ? 0 : getStringHashCode(this.errorText_1)) | 0;
    return result;
  };
  protoOf(LoginUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoginUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoginUiState ? other : THROW_CCE();
    if (!(this.username_1 === tmp0_other_with_cast.username_1))
      return false;
    if (!(this.password_1 === tmp0_other_with_cast.password_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.usernameError_1 == tmp0_other_with_cast.usernameError_1))
      return false;
    if (!(this.passwordError_1 == tmp0_other_with_cast.passwordError_1))
      return false;
    if (!(this.versionInfo_1 === tmp0_other_with_cast.versionInfo_1))
      return false;
    if (!(this.connectAsGuestVisible_1 === tmp0_other_with_cast.connectAsGuestVisible_1))
      return false;
    if (!(this.loginIntentMessage_1 == tmp0_other_with_cast.loginIntentMessage_1))
      return false;
    if (!(this.errorMessage_1 == tmp0_other_with_cast.errorMessage_1))
      return false;
    if (!this.currentLanguage_1.equals(tmp0_other_with_cast.currentLanguage_1))
      return false;
    if (!equals(this.languageList_1, tmp0_other_with_cast.languageList_1))
      return false;
    if (!(this.showWaitForRestart_1 === tmp0_other_with_cast.showWaitForRestart_1))
      return false;
    if (!(this.showPoweredBy_1 === tmp0_other_with_cast.showPoweredBy_1))
      return false;
    if (!(this.isPersonalAccount_1 === tmp0_other_with_cast.isPersonalAccount_1))
      return false;
    if (!(this.errorText_1 == tmp0_other_with_cast.errorText_1))
      return false;
    return true;
  };
  function impl$factory_1() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_7() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_7() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_1() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function languagesConfig$factory() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_1() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_1() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function getCredentialUseCase$factory_1() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r_0(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_1() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk_0(receiver);
    }, null);
  }
  function impl$factory_2() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_8() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_8() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_2() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function languagesConfig$factory_0() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_2() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_2() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function getCredentialUseCase$factory_2() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r_0(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_2() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk_0(receiver);
    }, null);
  }
  function _get_pagingSourceFactory__6w06ky_7($this) {
    return $this.pagingSourceFactory_1;
  }
  function Companion_163() {
    Companion_instance_163 = this;
    this.DEST_NAME_1 = 'ConversationList';
    this.DEST_NAME_HOME_1 = 'ConversationListHome';
    this.ALL_DEST_NAMES_1 = listOf(['ConversationList', 'ConversationListHome']);
  }
  protoOf(Companion_163).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_163).get_DEST_NAME_HOME_lftflt_k$ = function () {
    return this.DEST_NAME_HOME_1;
  };
  protoOf(Companion_163).get_ALL_DEST_NAMES_l2cmjy_k$ = function () {
    return this.ALL_DEST_NAMES_1;
  };
  var Companion_instance_163;
  function Companion_getInstance_224() {
    if (Companion_instance_163 == null)
      new Companion_163();
    return Companion_instance_163;
  }
  function ConversationListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().messageDao_rymlth_k$().conversationsForUserAsPagingSource_hcdagh_k$(toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$()), this$0.get_activeUserPersonUid_1nlgnz_k$());
    };
  }
  function ConversationListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.onClickAdd_cbqifs_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function ConversationListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_224();
    destinationName = destinationName === VOID ? 'ConversationList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ConversationListUiState(), destinationName);
    var tmp = this;
    tmp.pagingSourceFactory_1 = ConversationListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_1 = values();
        var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(this_1.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_1.length;
        while (inductionVariable < last) {
          var element = this_1[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$0 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(get_dayStringResource(element));
          result.put_4fpzoq_k$(element, tmp$ret$0);
        }
        var tmp1_conversations = this.pagingSourceFactory_1;
        var nextValue = prevValue.copy$default_nqluel_k$(tmp1_conversations, VOID, VOID, VOID, result);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        var tmp0_searchState = this.createSearchEnabledState$default_7v3uai_k$();
        var tmp1_title = this.listTitle_mhmhkq_k$(strings_getInstance().get_messages_vl21at_k$(), strings_getInstance().get_select_person_bm005r_k$());
        var tmp_0 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_message_h23axq_k$());
        var tmp_1 = FabIcon_ADD_getInstance();
        var tmp2_fabState = new FabUiState(true, tmp_0, tmp_1, ConversationListViewModel$onClickAdd$ref(this));
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ConversationListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(ConversationListViewModel).onClickAdd_cbqifs_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_237().get_DEST_NAME_gmgk7z_k$(), mapOf([to(PersonViewModelConstants_getInstance().get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$(), Companion_getInstance_225().get_DEST_NAME_gmgk7z_k$()), to(Companion_getInstance_156().get_ARG_LISTMODE_1jy3rh_k$(), ListViewMode_PICKER_getInstance().get_mode_woqlt8_k$()), to(Companion_getInstance_237().get_ARG_EXCLUDE_PERSONUIDS_LIST_3f4qz2_k$(), this.get_activeUserPersonUid_1nlgnz_k$().toString()), to(PersonViewModelConstants_getInstance().get_ARG_POPUP_TO_ON_PERSON_SELECTED_uu1vp8_k$(), Companion_getInstance_237().get_DEST_NAME_gmgk7z_k$())]));
  };
  protoOf(ConversationListViewModel).onClickEntry_8fg4cu_k$ = function (entry) {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_225().get_DEST_NAME_gmgk7z_k$();
    var tmp_1 = Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$();
    var tmp0_safe_receiver = entry.get_otherPerson_ftpdd0_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personUid_mmhd76_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, mapOf_0(to(tmp_1, (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString())));
  };
  function ConversationListUiState$_init_$lambda_uo1nhr() {
    return new EmptyPagingSource();
  }
  function ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (conversations === VOID) {
      tmp = ConversationListUiState$_init_$lambda_uo1nhr;
    } else {
      tmp = conversations;
    }
    conversations = tmp;
    sortOptions = sortOptions === VOID ? emptyList() : sortOptions;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.conversations_1 = conversations;
    this.sortOptions_1 = sortOptions;
    this.showAddItem_1 = showAddItem;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
  }
  protoOf(ConversationListUiState).get_conversations_n3fbjb_k$ = function () {
    return this.conversations_1;
  };
  protoOf(ConversationListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ConversationListUiState).get_showAddItem_1b9xri_k$ = function () {
    return this.showAddItem_1;
  };
  protoOf(ConversationListUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ConversationListUiState).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ConversationListUiState).component1_7eebsc_k$ = function () {
    return this.conversations_1;
  };
  protoOf(ConversationListUiState).component2_7eebsb_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(ConversationListUiState).component3_7eebsa_k$ = function () {
    return this.showAddItem_1;
  };
  protoOf(ConversationListUiState).component4_7eebs9_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(ConversationListUiState).component5_7eebs8_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(ConversationListUiState).copy_o9bsmd_k$ = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    return new ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).copy$default_nqluel_k$ = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings, $super) {
    conversations = conversations === VOID ? this.conversations_1 : conversations;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    showAddItem = showAddItem === VOID ? this.showAddItem_1 : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    return $super === VOID ? this.copy_o9bsmd_k$(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) : $super.copy_o9bsmd_k$.call(this, conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).toString = function () {
    return 'ConversationListUiState(conversations=' + this.conversations_1 + ', sortOptions=' + this.sortOptions_1 + ', showAddItem=' + this.showAddItem_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ')';
  };
  protoOf(ConversationListUiState).hashCode = function () {
    var result = hashCode(this.conversations_1);
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showAddItem_1) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    return result;
  };
  protoOf(ConversationListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ConversationListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ConversationListUiState ? other : THROW_CCE();
    if (!equals(this.conversations_1, tmp0_other_with_cast.conversations_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!(this.showAddItem_1 === tmp0_other_with_cast.showAddItem_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    return true;
  };
  function MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda$slambda).invoke_np0iit_k$ = function (it, $completion) {
    var tmp = this.create_2tir2f_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_np0iit_k$((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver = this.it_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_firstNames_n3o3y7_k$();
              var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
              var tmp2_safe_receiver = this.it_1;
              var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_lastName_f360wa_k$();
              var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp_0 + ' ' + (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).create_2tir2f_k$ = function (it, completion) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_2tir2f_k$((value == null ? true : value instanceof PersonNames) ? value : THROW_CCE(), completion);
  };
  function MessageListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_np0iit_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(MessageListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(MessageListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().getNamesByUid_owsdl3_k$(this.this$0__1.otherPersonUid_1);
            var tmp_1 = MessageListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_31(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new MessageListViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function MessageListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_otherPersonUid__34pnog($this) {
    return $this.otherPersonUid_1;
  }
  function _get_ustadAccountManager__el9prc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ustadAccountManager$delegate_1;
    ustadAccountManager$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_showSocialWarningUseCase__ft8jc6_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.showSocialWarningUseCase$delegate_1;
    showSocialWarningUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_dismissSocialWarningUseCase__st8mv5_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dismissSocialWarningUseCase$delegate_1;
    dismissSocialWarningUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_openExternalLinkUseCase__ku5z07_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.openExternalLinkUseCase$delegate_1;
    openExternalLinkUseCase$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function _get_pagingSourceFactory__6w06ky_8($this) {
    return $this.pagingSourceFactory_1;
  }
  function Companion_164() {
    Companion_instance_164 = this;
    this.DEST_NAME_1 = 'MessageList';
  }
  protoOf(Companion_164).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_164;
  function Companion_getInstance_225() {
    if (Companion_instance_164 == null)
      new Companion_164();
    return Companion_instance_164;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_31(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_31).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function MessageListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().messageDao_rymlth_k$().messagesFromOtherUserAsPagingSource_7jz58e_k$(this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.otherPersonUid_1);
    };
  }
  function MessageListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(MessageListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, MessageListViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new MessageListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(MessageListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function MessageListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$onWarningDismiss$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$onWarningDismiss$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          _get_dismissSocialWarningUseCase__st8mv5_0(this.this$0__1).invoke_nokysy_k$(toString_1(_get_ustadAccountManager__el9prc_0(this.this$0__1).get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_username_ytz5i7_k$()));
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_256bp_k$(VOID, VOID, VOID, VOID, VOID, false);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new MessageListViewModel$onWarningDismiss$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function MessageListViewModel$onWarningDismiss$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$onWarningDismiss$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$onClickSend$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(MessageListViewModel$onClickSend$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().messageDao_rymlth_k$();
            var tmp0_messageSenderPersonUid = this.this$0__1.get_activeUserPersonUid_1nlgnz_k$();
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$().get_value_j01efc_k$().newMessageText_1;
            var tmp1_messageText = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var tmp2_messageToPersonUid = this.this$0__1.otherPersonUid_1;
            var tmp3_messageTimestamp = systemTimeInMillis();
            suspendResult = tmp_0.insert_ne1avo_k$(new Message(VOID, tmp0_messageSenderPersonUid, tmp2_messageToPersonUid, tmp1_messageText, tmp3_messageTimestamp), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_1 = this.this$0__1.get__uiState_8tkbd_k$();
              while (true) {
                var prevValue = this_1.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_256bp_k$(VOID, VOID, '');
                if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new MessageListViewModel$onClickSend$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(MessageListViewModel$onClickSend$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function MessageListViewModel$onClickSend$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$onClickSend$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_225();
    destinationName = destinationName === VOID ? 'MessageList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new MessageListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.otherPersonUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.ustadAccountManager$delegate_1 = Instance(di, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, ustadAccountManager$factory_1());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ShowSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.showSocialWarningUseCase$delegate_1 = Instance(di, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, showSocialWarningUseCase$factory_1());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(DismissSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.dismissSocialWarningUseCase$delegate_1 = Instance(di, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, dismissSocialWarningUseCase$factory_1());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.openExternalLinkUseCase$delegate_1 = Instance(di, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, openExternalLinkUseCase$factory_3());
    var tmp_8 = this;
    tmp_8.pagingSourceFactory_1 = MessageListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, true, true, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$10 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(get_dayStringResource(element));
          result.put_4fpzoq_k$(element, tmp$ret$10);
        }
        var tmp1_messages = this.pagingSourceFactory_1;
        var tmp2_activePersonUid = this.get_activeUserPersonUid_1nlgnz_k$();
        var tmp3_showSocialWarning = _get_showSocialWarningUseCase__ft8jc6_0(this).invoke_lt562m_k$(toString_1(_get_ustadAccountManager__el9prc_0(this).get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_username_ytz5i7_k$()));
        var nextValue_0 = prevValue_0.copy$default_256bp_k$(tmp1_messages, tmp2_activePersonUid, VOID, result, VOID, tmp3_showSocialWarning);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_9 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_9, VOID, VOID, MessageListViewModel$slambda_0(this, null));
  }
  protoOf(MessageListViewModel).onWarningDismiss_ro008t_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, MessageListViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(MessageListViewModel).onLearnMoreClicked_hhstb1_k$ = function () {
    _get_openExternalLinkUseCase__ku5z07_2(this).invoke_ts1gt6_k$(Companion_getInstance_118().get_SOCIAL_WARNING_WEB_URL_soql6w_k$(), LinkTarget_BLANK_getInstance());
  };
  protoOf(MessageListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    // Inline function 'kotlin.TODO' call
    var reason = 'Not yet implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(MessageListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  protoOf(MessageListViewModel).onChangeNewMessageText_ndu6w7_k$ = function (text) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.onChangeNewMessageText.<anonymous>' call
        var nextValue = prevValue.copy$default_256bp_k$(VOID, VOID, text);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(MessageListViewModel).onClickSend_5zeam9_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, MessageListViewModel$onClickSend$slambda_0(this, null));
  };
  function MessageListUiState$_init_$lambda_mkfto3() {
    return new EmptyPagingSource();
  }
  function MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    var tmp;
    if (messages === VOID) {
      tmp = MessageListUiState$_init_$lambda_mkfto3;
    } else {
      tmp = messages;
    }
    messages = tmp;
    activePersonUid = activePersonUid === VOID ? new Long(0, 0) : activePersonUid;
    newMessageText = newMessageText === VOID ? '' : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_getInstance().now_2cba_k$(), Companion_getInstance_35().currentSystemDefault_9rduv_k$()) : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.messages_1 = messages;
    this.activePersonUid_1 = activePersonUid;
    this.newMessageText_1 = newMessageText;
    this.dayOfWeekStrings_1 = dayOfWeekStrings;
    this.localDateTimeNow_1 = localDateTimeNow;
    this.showSocialWarning_1 = showSocialWarning;
  }
  protoOf(MessageListUiState).get_messages_vl21at_k$ = function () {
    return this.messages_1;
  };
  protoOf(MessageListUiState).get_activePersonUid_9z77v8_k$ = function () {
    return this.activePersonUid_1;
  };
  protoOf(MessageListUiState).get_newMessageText_r8mw4d_k$ = function () {
    return this.newMessageText_1;
  };
  protoOf(MessageListUiState).get_dayOfWeekStrings_g89ios_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(MessageListUiState).get_localDateTimeNow_er12ef_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(MessageListUiState).get_showSocialWarning_ygvdbr_k$ = function () {
    return this.showSocialWarning_1;
  };
  protoOf(MessageListUiState).component1_7eebsc_k$ = function () {
    return this.messages_1;
  };
  protoOf(MessageListUiState).component2_7eebsb_k$ = function () {
    return this.activePersonUid_1;
  };
  protoOf(MessageListUiState).component3_7eebsa_k$ = function () {
    return this.newMessageText_1;
  };
  protoOf(MessageListUiState).component4_7eebs9_k$ = function () {
    return this.dayOfWeekStrings_1;
  };
  protoOf(MessageListUiState).component5_7eebs8_k$ = function () {
    return this.localDateTimeNow_1;
  };
  protoOf(MessageListUiState).component6_7eebs7_k$ = function () {
    return this.showSocialWarning_1;
  };
  protoOf(MessageListUiState).copy_jmkqwq_k$ = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    return new MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).copy$default_256bp_k$ = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning, $super) {
    messages = messages === VOID ? this.messages_1 : messages;
    activePersonUid = activePersonUid === VOID ? this.activePersonUid_1 : activePersonUid;
    newMessageText = newMessageText === VOID ? this.newMessageText_1 : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dayOfWeekStrings_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.localDateTimeNow_1 : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? this.showSocialWarning_1 : showSocialWarning;
    return $super === VOID ? this.copy_jmkqwq_k$(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) : $super.copy_jmkqwq_k$.call(this, messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).toString = function () {
    return 'MessageListUiState(messages=' + this.messages_1 + ', activePersonUid=' + this.activePersonUid_1.toString() + ', newMessageText=' + this.newMessageText_1 + ', dayOfWeekStrings=' + this.dayOfWeekStrings_1 + ', localDateTimeNow=' + this.localDateTimeNow_1 + ', showSocialWarning=' + this.showSocialWarning_1 + ')';
  };
  protoOf(MessageListUiState).hashCode = function () {
    var result = hashCode(this.messages_1);
    result = imul(result, 31) + this.activePersonUid_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.newMessageText_1) | 0;
    result = imul(result, 31) + hashCode(this.dayOfWeekStrings_1) | 0;
    result = imul(result, 31) + this.localDateTimeNow_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showSocialWarning_1) | 0;
    return result;
  };
  protoOf(MessageListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof MessageListUiState ? other : THROW_CCE();
    if (!equals(this.messages_1, tmp0_other_with_cast.messages_1))
      return false;
    if (!this.activePersonUid_1.equals(tmp0_other_with_cast.activePersonUid_1))
      return false;
    if (!(this.newMessageText_1 === tmp0_other_with_cast.newMessageText_1))
      return false;
    if (!equals(this.dayOfWeekStrings_1, tmp0_other_with_cast.dayOfWeekStrings_1))
      return false;
    if (!this.localDateTimeNow_1.equals(tmp0_other_with_cast.localDateTimeNow_1))
      return false;
    if (!(this.showSocialWarning_1 === tmp0_other_with_cast.showSocialWarning_1))
      return false;
    return true;
  };
  function ustadAccountManager$factory_1() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc_0(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_1() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6_0(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_1() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5_0(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_3() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_2(receiver);
    }, null);
  }
  function ustadAccountManager$factory_2() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc_0(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_2() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6_0(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_2() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5_0(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_4() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_2(receiver);
    }, null);
  }
  function TitleAndLangCode(title, langCode) {
    this.title_1 = title;
    this.langCode_1 = langCode;
  }
  protoOf(TitleAndLangCode).get_title_iz32un_k$ = function () {
    return this.title_1;
  };
  protoOf(TitleAndLangCode).get_langCode_ciluis_k$ = function () {
    return this.langCode_1;
  };
  protoOf(TitleAndLangCode).component1_7eebsc_k$ = function () {
    return this.title_1;
  };
  protoOf(TitleAndLangCode).component2_7eebsb_k$ = function () {
    return this.langCode_1;
  };
  protoOf(TitleAndLangCode).copy_plwnsl_k$ = function (title, langCode) {
    return new TitleAndLangCode(title, langCode);
  };
  protoOf(TitleAndLangCode).copy$default_7gcg5l_k$ = function (title, langCode, $super) {
    title = title === VOID ? this.title_1 : title;
    langCode = langCode === VOID ? this.langCode_1 : langCode;
    return $super === VOID ? this.copy_plwnsl_k$(title, langCode) : $super.copy_plwnsl_k$.call(this, title, langCode);
  };
  protoOf(TitleAndLangCode).toString = function () {
    return 'TitleAndLangCode(title=' + this.title_1 + ', langCode=' + this.langCode_1 + ')';
  };
  protoOf(TitleAndLangCode).hashCode = function () {
    var result = getStringHashCode(this.title_1);
    result = imul(result, 31) + getStringHashCode(this.langCode_1) | 0;
    return result;
  };
  protoOf(TitleAndLangCode).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TitleAndLangCode))
      return false;
    var tmp0_other_with_cast = other instanceof TitleAndLangCode ? other : THROW_CCE();
    if (!(this.title_1 === tmp0_other_with_cast.title_1))
      return false;
    if (!(this.langCode_1 === tmp0_other_with_cast.langCode_1))
      return false;
    return true;
  };
  function _get_statementRecorderFactory__505soe($this) {
    return $this.statementRecorderFactory_1;
  }
  function _get_statementRecorder__l4o9jw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.statementRecorder$delegate_1;
    statementRecorder$factory();
    return this_0.get_value_j01efc_k$();
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0) {
    return function () {
      var titleAndLangCodeVal = this$0.get_titleAndLangCode_ihjgl9_k$();
      var tmp = this$0.xapiSession_1.get_xseRootActivityId_lo9kxf_k$();
      var tmp_0;
      if (!(titleAndLangCodeVal == null)) {
        tmp_0 = mapOf_0(to(titleAndLangCodeVal.langCode_1, titleAndLangCodeVal.title_1));
      } else {
        tmp_0 = null;
      }
      return new XapiActivityStatementObject(VOID, tmp, new XapiActivity(tmp_0));
    };
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.createXapiSession$default_xiy4tw_k$(this$0.contentEntryUid_1);
      var tmp_0 = this$0.get_viewModelScope_ryv1dz_k$();
      return this$0.statementRecorderFactory_1.newStatementRecorder_5pkgkx_k$(tmp, tmp_0, AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0));
    };
  }
  function AbstractNonInteractiveContentViewModel(di, savedStateHandle, destName) {
    UstadViewModel.call(this, di, savedStateHandle, destName);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = get_direct(onActiveLearningSpace(di)).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp.statementRecorderFactory_1 = tmp_0.Instance_vwdrk9_k$(tmp$ret$0, null);
    var tmp_2 = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_CONTENT_ENTRY_UID_tla4x7_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.contentEntryUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.xapiSession_1 = this.createXapiSession$default_xiy4tw_k$(this.contentEntryUid_1);
    var tmp_3 = this;
    tmp_3.statementRecorder$delegate_1 = lazy_0(AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this));
  }
  protoOf(AbstractNonInteractiveContentViewModel).get_contentEntryUid_pu6bbm_k$ = function () {
    return this.contentEntryUid_1;
  };
  protoOf(AbstractNonInteractiveContentViewModel).get_xapiSession_8w90b9_k$ = function () {
    return this.xapiSession_1;
  };
  protoOf(AbstractNonInteractiveContentViewModel).onComplete_npiz6l_k$ = function (oneCompletionStatementOnly) {
    _get_statementRecorder__l4o9jw(this).onComplete_npiz6l_k$(oneCompletionStatementOnly);
  };
  protoOf(AbstractNonInteractiveContentViewModel).onComplete$default_l2lbt3_k$ = function (oneCompletionStatementOnly, $super) {
    oneCompletionStatementOnly = oneCompletionStatementOnly === VOID ? false : oneCompletionStatementOnly;
    var tmp;
    if ($super === VOID) {
      this.onComplete_npiz6l_k$(oneCompletionStatementOnly);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.onComplete_npiz6l_k$.call(this, oneCompletionStatementOnly);
    }
    return tmp;
  };
  protoOf(AbstractNonInteractiveContentViewModel).onProgressed_kt9krh_k$ = function (progress) {
    _get_statementRecorder__l4o9jw(this).onProgressed_kt9krh_k$(progress);
  };
  protoOf(AbstractNonInteractiveContentViewModel).onActiveChanged_2xtbwa_k$ = function (active) {
    _get_statementRecorder__l4o9jw(this).onActiveChanged_2xtbwa_k$(active);
  };
  protoOf(AbstractNonInteractiveContentViewModel).onCleared_hwiuwz_k$ = function () {
    _get_statementRecorder__l4o9jw(this).onCleared_hwiuwz_k$();
    protoOf(UstadViewModel).onCleared_hwiuwz_k$.call(this);
  };
  protoOf(AbstractNonInteractiveContentViewModel).onUnload_ku21hu_k$ = function () {
    _get_statementRecorder__l4o9jw(this).onUnload_ku21hu_k$();
  };
  function statementRecorder$factory() {
    return getPropertyCallableRef('statementRecorder', 1, KProperty1, function (receiver) {
      return _get_statementRecorder__l4o9jw(receiver);
    }, null);
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).invoke_gm6x12_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_gm6x12_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.personParentJoinDao_gvpro7_k$().findByUidWithMinorAsync_8mm5b6_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              var tmp_1;
              var tmp0_safe_receiver_0 = tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
              var tmp_2;
              if (tmp0_safe_receiver_0 == null) {
                tmp_2 = null;
              } else {
                tmp_2 = !(!tmp0_safe_receiver_0.get_ppjParentPersonUid_lygmb4_k$().equals(new Long(0, 0)) ? !tmp0_safe_receiver_0.get_ppjParentPersonUid_lygmb4_k$().equals(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$()) : false);
              }
              var tmp1_elvis_lhs = tmp_2;
              if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {
                tmp_1 = tmp0_safe_receiver;
              } else {
                tmp_1 = null;
              }
              tmp_0 = tmp_1;
            }

            return tmp_0;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_gm6x12_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).invoke_ygw0ft_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_ygw0ft_k$($completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(completion);
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_2(resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_ygw0ft_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_mnaaht_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get__uiState__8e9jsd_35($this) {
    return $this._uiState_1;
  }
  function _get_getLocaleForSiteTermsUseCase__hxw5id($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getLocaleForSiteTermsUseCase$delegate_1;
    getLocaleForSiteTermsUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function updateStatus($this, status) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
        var tmp1_safe_receiver = prevValue.parentJoinAndMinor_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.parentJoinAndMinor_1.get_personParentJoin_59u4ni_k$();
          var tmp_0;
          if (tmp0_safe_receiver == null) {
            tmp_0 = null;
          } else {
            tmp_0 = shallowCopy_12(tmp0_safe_receiver, ParentalConsentManagementViewModel$updateStatus$lambda(status, $this));
          }
          tmp = tmp1_safe_receiver.copy$default_12m7bi_k$(tmp_0);
        }
        var nextValue = prevValue.copy$default_mnaaht_k$(tmp);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    var tmp0_safe_receiver_0 = newState.parentJoinAndMinor_1;
    var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_personParentJoin_59u4ni_k$();
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
      var tmp_1 = $this.get_viewModelScope_ryv1dz_k$();
      launch(tmp_1, VOID, VOID, ParentalConsentManagementViewModel$updateStatus$slambda_0($this, tmp1_safe_receiver_0, null));
    }
    $this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack($this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_saved_iye7oe_k$())));
  }
  function Companion_165() {
    Companion_instance_165 = this;
    this.DEST_NAME_1 = 'ParentalConsentManagement';
  }
  protoOf(Companion_165).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_165;
  function Companion_getInstance_226() {
    if (Companion_instance_165 == null)
      new Companion_165();
    return Companion_instance_165;
  }
  function ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_58().serializer_9w0wvi_k$();
            var tmp_1 = ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = ParentalConsentManagementViewModel$lambda$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, ParentalConsentManagementViewModel$lambda$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_mnaaht_k$(VOID, VOID, VOID, !(prevValue.parentJoinAndMinor_1 == null));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ParentalConsentManagementViewModel$lambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.ARGUMENT0__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().siteTermsDao_wa3vn6_k$();
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id(this.this$0__1).invoke_5dq5ij_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.ARGUMENT0__1.findLatestByLanguage_6y9g14_k$(this.ARGUMENT1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var terms = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_mnaaht_k$(VOID, VOID, terms);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ParentalConsentManagementViewModel$lambda$slambda_2(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.get__appUiState_rulqry_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this$0.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_manage_parental_consent_i2qti9_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.get_viewModelScope_ryv1dz_k$();
      launch(tmp, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_0(this$0, null));
      var tmp_0 = this$0.get_viewModelScope_ryv1dz_k$();
      launch(tmp_0, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_2(this$0, null));
      return Unit_getInstance();
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$lambda($status, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_ppjStatus_hiah55_k$($status);
      $this$shallowCopy.set_ppjParentPersonUid_h015fq_k$(this$0.get_activeUserPersonUid_1nlgnz_k$());
      $this$shallowCopy.set_ppjApprovalTiemstamp_wbkei0_k$(systemTimeInMillis());
      return Unit_getInstance();
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation) {
    this.this$0__1 = this$0;
    this.$personParentJoin_1 = $personParentJoin;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personParentJoinDao_gvpro7_k$().updateAsync_mqonrm_k$(this.$personParentJoin_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this.this$0__1, this.$personParentJoin_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ParentalConsentManagementViewModel$updateStatus$slambda_0(this$0, $personParentJoin, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel(di, savedStateHandle) {
    Companion_getInstance_226();
    UstadEditViewModel.call(this, di, savedStateHandle, 'ParentalConsentManagement');
    this._uiState_1 = MutableStateFlow(new ParentalConsentManagementUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.invoke_4wgfc3_k$(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.getLocaleForSiteTermsUseCase$delegate_1 = Instance(this_0, tmp$ret$3, null).provideDelegate_o2qlc1_k$(this, getLocaleForSiteTermsUseCase$factory());
    var tmp_3 = mapOf_0(to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), this.get_entityUidArg_hgo6pe_k$().toString()));
    this.ifLoggedInElseNavigateToLoginWithNextDestSet_j3c0kq_k$(true, tmp_3, ParentalConsentManagementViewModel$lambda(this));
  }
  protoOf(ParentalConsentManagementViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ParentalConsentManagementViewModel).onEntityChanged_t08f4j_k$ = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.parentJoinAndMinor_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_12m7bi_k$(personParentJoin);
        var tmp1_safe_receiver = prevValue.parentJoinAndMinor_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_personParentJoin_59u4ni_k$();
        var tmp_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_ppjRelationship_u5inyx_k$();
        var nextValue = prevValue.copy$default_mnaaht_k$(tmp, this.updateErrorMessageOnChange_silrgy_k$(tmp_0, personParentJoin == null ? null : personParentJoin.get_ppjRelationship_u5inyx_k$(), prevValue.relationshipError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ParentalConsentManagementViewModel).onClickConsent_txadcx_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjRelationship_u5inyx_k$();
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
      tmp = listOf([Companion_getInstance_0().get_RELATIONSHIP_MOTHER_rti5a9_k$(), Companion_getInstance_0().get_RELATIONSHIP_FATHER_oaho7u_k$(), Companion_getInstance_0().get_RELATIONSHIP_OTHER_LEGAL_GUARDIAN_ga2d7g_k$()]).contains_aljjnj_k$(tmp2_safe_receiver);
    }
    if (!(tmp === true)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
          var nextValue = prevValue.copy$default_mnaaht_k$(VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    }
    updateStatus(this, Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$());
  };
  protoOf(ParentalConsentManagementViewModel).onClickDontConsent_5aumgg_k$ = function () {
    updateStatus(this, Companion_getInstance_0().get_STATUS_REJECTED_t2teim_k$());
  };
  protoOf(ParentalConsentManagementViewModel).onClickChangeConsent_prvh7z_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjStatus_5x2g19_k$();
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var currentStatus = tmp;
    updateStatus(this, currentStatus === Companion_getInstance_0().get_STATUS_REJECTED_t2teim_k$() ? Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$() : Companion_getInstance_0().get_STATUS_REJECTED_t2teim_k$());
  };
  function ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? null : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? null : relationshipError;
    siteTerms = siteTerms === VOID ? null : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    appName = appName === VOID ? 'Ustad Mobile' : appName;
    this.parentJoinAndMinor_1 = parentJoinAndMinor;
    this.relationshipError_1 = relationshipError;
    this.siteTerms_1 = siteTerms;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.appName_1 = appName;
  }
  protoOf(ParentalConsentManagementUiState).get_parentJoinAndMinor_vft5mj_k$ = function () {
    return this.parentJoinAndMinor_1;
  };
  protoOf(ParentalConsentManagementUiState).get_relationshipError_1giubr_k$ = function () {
    return this.relationshipError_1;
  };
  protoOf(ParentalConsentManagementUiState).get_siteTerms_hal9l_k$ = function () {
    return this.siteTerms_1;
  };
  protoOf(ParentalConsentManagementUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ParentalConsentManagementUiState).get_appName_bv95lp_k$ = function () {
    return this.appName_1;
  };
  protoOf(ParentalConsentManagementUiState).get_relationshipVisible_dn67xt_k$ = function () {
    var tmp0_safe_receiver = this.parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjParentPersonUid_lygmb4_k$(), new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).get_consentButtonVisible_k5yw4v_k$ = function () {
    var tmp0_safe_receiver = this.parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjParentPersonUid_lygmb4_k$(), new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).get_dontConsentButtonVisible_vu1xr4_k$ = function () {
    var tmp0_safe_receiver = this.parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjParentPersonUid_lygmb4_k$(), new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).get_changeConsentButtonVisible_91jt1d_k$ = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-changeConsentButtonVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjParentPersonUid_lygmb4_k$();
    return !(it == null) ? !equals(it, new Long(0, 0)) : false;
  };
  protoOf(ParentalConsentManagementUiState).get_consentStatusVisible_w9jq8h_k$ = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-consentStatusVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjStatus_5x2g19_k$();
    return !(it == null) ? !(it === 0) : false;
  };
  protoOf(ParentalConsentManagementUiState).get_consentStatusText_4e7bdc_k$ = function () {
    var tmp0_safe_receiver = this.parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjStatus_5x2g19_k$();
    return tmp2_subject === Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$() ? strings_getInstance().get_status_consent_granted_q4ujse_k$() : tmp2_subject === Companion_getInstance_0().get_STATUS_REJECTED_t2teim_k$() ? strings_getInstance().get_status_consent_denied_ihtgbg_k$() : null;
  };
  protoOf(ParentalConsentManagementUiState).get_changeConsentLabel_9j6nxp_k$ = function () {
    var tmp0_safe_receiver = this.parentJoinAndMinor_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personParentJoin_59u4ni_k$();
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjStatus_5x2g19_k$();
    return tmp2_subject === Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$() ? strings_getInstance().get_revoke_consent_qfunbq_k$() : tmp2_subject === Companion_getInstance_0().get_STATUS_REJECTED_t2teim_k$() ? strings_getInstance().get_restore_consent_5amt8g_k$() : null;
  };
  protoOf(ParentalConsentManagementUiState).component1_7eebsc_k$ = function () {
    return this.parentJoinAndMinor_1;
  };
  protoOf(ParentalConsentManagementUiState).component2_7eebsb_k$ = function () {
    return this.relationshipError_1;
  };
  protoOf(ParentalConsentManagementUiState).component3_7eebsa_k$ = function () {
    return this.siteTerms_1;
  };
  protoOf(ParentalConsentManagementUiState).component4_7eebs9_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ParentalConsentManagementUiState).component5_7eebs8_k$ = function () {
    return this.appName_1;
  };
  protoOf(ParentalConsentManagementUiState).copy_qwo1kt_k$ = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    return new ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).copy$default_mnaaht_k$ = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName, $super) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? this.parentJoinAndMinor_1 : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? this.relationshipError_1 : relationshipError;
    siteTerms = siteTerms === VOID ? this.siteTerms_1 : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    appName = appName === VOID ? this.appName_1 : appName;
    return $super === VOID ? this.copy_qwo1kt_k$(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) : $super.copy_qwo1kt_k$.call(this, parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).toString = function () {
    return 'ParentalConsentManagementUiState(parentJoinAndMinor=' + this.parentJoinAndMinor_1 + ', relationshipError=' + this.relationshipError_1 + ', siteTerms=' + this.siteTerms_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', appName=' + this.appName_1 + ')';
  };
  protoOf(ParentalConsentManagementUiState).hashCode = function () {
    var result = this.parentJoinAndMinor_1 == null ? 0 : this.parentJoinAndMinor_1.hashCode();
    result = imul(result, 31) + (this.relationshipError_1 == null ? 0 : getStringHashCode(this.relationshipError_1)) | 0;
    result = imul(result, 31) + (this.siteTerms_1 == null ? 0 : hashCode(this.siteTerms_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.appName_1) | 0;
    return result;
  };
  protoOf(ParentalConsentManagementUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ParentalConsentManagementUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ParentalConsentManagementUiState ? other : THROW_CCE();
    if (!equals(this.parentJoinAndMinor_1, tmp0_other_with_cast.parentJoinAndMinor_1))
      return false;
    if (!(this.relationshipError_1 == tmp0_other_with_cast.relationshipError_1))
      return false;
    if (!equals(this.siteTerms_1, tmp0_other_with_cast.siteTerms_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!(this.appName_1 === tmp0_other_with_cast.appName_1))
      return false;
    return true;
  };
  function getLocaleForSiteTermsUseCase$factory() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function getLocaleForSiteTermsUseCase$factory_0() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function PersonViewModelConstants() {
    PersonViewModelConstants_instance = this;
    this.ARG_GO_TO_ON_PERSON_SELECTED_1 = 'goToOnPersonSelected';
    this.ARG_POPUP_TO_ON_PERSON_SELECTED_1 = 'popUpToOnPersonSelected';
  }
  protoOf(PersonViewModelConstants).get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$ = function () {
    return this.ARG_GO_TO_ON_PERSON_SELECTED_1;
  };
  protoOf(PersonViewModelConstants).get_ARG_POPUP_TO_ON_PERSON_SELECTED_uu1vp8_k$ = function () {
    return this.ARG_POPUP_TO_ON_PERSON_SELECTED_1;
  };
  var PersonViewModelConstants_instance;
  function PersonViewModelConstants_getInstance() {
    if (PersonViewModelConstants_instance == null)
      new PersonViewModelConstants();
    return PersonViewModelConstants_instance;
  }
  function PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda).invoke_uc84vg_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_uc84vg_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.personDao_e3y77h_k$().findByUidAsync_uxf6ac_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.person0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.db_1.systemPermissionDao_fl20r8_k$().personHasSystemPermission_tdum2r_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_RESET_PASSWORDS_uvrc2p_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var hasResetPermission = suspendResult;
            var tmp_0;
            if (this.person0__1 == null) {
              tmp_0 = null;
            } else {
              var tmp_1 = this.person0__1.get_username_ytz5i7_k$() == null ? 1 : hasResetPermission ? 2 : 3;
              var tmp_2 = this.person0__1.get_personUid_mmhd76_k$();
              var tmp0_elvis_lhs = this.person0__1.get_username_ytz5i7_k$();
              tmp_0 = new PersonUsernameAndPasswordModel(tmp_1, tmp_2, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '', '');
            }

            return tmp_0;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PersonAccountEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_uc84vg_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).invoke_2jipht_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_2jipht_k$($completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new PersonAccountEditViewModel$slambda$slambda_1(completion);
  };
  function PersonAccountEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_2jipht_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonAccountEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_g8m6wa_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function PersonAccountEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entity_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = _get_authManager__mo6de4(this.this$0__1).setAuth_shl5y9_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.$entity_1.newPassword_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().updateUsername_rf7ozu_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.$entity_1.username_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var numChanges = suspendResult;
            Napier_getInstance().e$default_pvzj32_k$('Updated username: ' + numChanges + ' changes');
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$entity_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_36($this) {
    return $this._uiState_1;
  }
  function _get_authManager__mo6de4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.authManager$delegate_1;
    authManager$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_setPasswordUseCase__c0ja9b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.setPasswordUseCase$delegate_1;
    setPasswordUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_validateUsernameUseCase__yg4coq_0($this) {
    return $this.validateUsernameUseCase_1;
  }
  function _get_filterUsernameUseCase__xlwzqg_0($this) {
    return $this.filterUsernameUseCase_1;
  }
  function Companion_166() {
    Companion_instance_166 = this;
    this.DEST_NAME_1 = 'AccountEdit';
    this.MODE_CREATE_ACCOUNT_1 = 1;
    this.MODE_RESET_1 = 2;
    this.MODE_CHANGE_PASS_1 = 3;
  }
  protoOf(Companion_166).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_166).get_MODE_CREATE_ACCOUNT_q3ya2r_k$ = function () {
    return this.MODE_CREATE_ACCOUNT_1;
  };
  protoOf(Companion_166).get_MODE_RESET_vxwd98_k$ = function () {
    return this.MODE_RESET_1;
  };
  protoOf(Companion_166).get_MODE_CHANGE_PASS_co91m5_k$ = function () {
    return this.MODE_CHANGE_PASS_1;
  };
  var Companion_instance_166;
  function Companion_getInstance_227() {
    if (Companion_instance_166 == null)
      new Companion_166();
    return Companion_instance_166;
  }
  function PersonAccountEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda).invoke_pclm39_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonAccountEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$())) {
              var tmp_0 = this;
              tmp_0.WHEN_RESULT0__1 = true;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.db_1.systemPermissionDao_fl20r8_k$().personHasSystemPermission_tdum2r_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_EDIT_ALL_PERSONS_uw4lis_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT0__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(PersonAccountEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PersonAccountEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pclm39_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonAccountEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_228().serializer_9w0wvi_k$();
            var tmp_1 = PersonAccountEditViewModel$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = PersonAccountEditViewModel$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonAccountEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, PersonAccountEditViewModel$onClickSave$ref(this.this$0__1));
                var tmp1_loadingState = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new PersonAccountEditViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(PersonAccountEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonAccountEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonAccountEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation) {
    this.$entity_1 = $entity;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(14);
            if (this.$entity_1.mode_1 === 1) {
              var validationResult = this.this$0__1.validateUsernameUseCase_1.invoke_lt562m_k$(this.$entity_1.username_1);
              this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
              if (!validationResult.equals(Companion_getInstance_121().get_Valid_iifz5f_k$())) {
                l$ret$1: do {
                  var this_0 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue = this_0.get_value_j01efc_k$();
                    var tmp0_safe_receiver = validationResult.get_errorMessage_ofxtm0_k$();
                    var tmp_0;
                    if (tmp0_safe_receiver == null) {
                      tmp_0 = null;
                    } else {
                      tmp_0 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(tmp0_safe_receiver);
                    }
                    var tmp1_usernameError = tmp_0;
                    var nextValue = prevValue.copy$default_g8m6wa_k$(VOID, tmp1_usernameError, VOID, VOID, VOID, true);
                    if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                      break l$ret$1;
                    }
                  }
                }
                 while (false);
                return Unit_getInstance();
              }
            }

            if (isBlank(this.$entity_1.newPassword_1)) {
              l$ret$3: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_0 = this_1.get_value_j01efc_k$();
                  var nextValue_0 = prevValue_0.copy$default_g8m6wa_k$(VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
                  if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.$entity_1.mode_1 === 3 ? isBlank(this.$entity_1.currentPassword_1) : false)
              if (this.this$0__1._uiState_1.get_value_j01efc_k$().get_hasErrors_2nabd0_k$()) {
                this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
                l$ret$5: do {
                  var this_2 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue_1 = this_2.get_value_j01efc_k$();
                    var nextValue_1 = prevValue_1.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, VOID, true);
                    if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
                return Unit_getInstance();
              }

            if (this.$entity_1.mode_1 === 1) {
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              continue $sm;
            }

          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(2);
            suspendResult = _get_setPasswordUseCase__c0ja9b(this.this$0__1).invoke_9yzwca_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.$entity_1.personUid_1, this.$entity_1.username_1, this.$entity_1.newPassword_1, this.$entity_1.mode_1 === 3 ? this.$entity_1.currentPassword_1 : null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_password_updated_10ss0w_k$())));
            var tmp_1 = this;
            this.this$0__1.finishWithResult_jlqwtj_k$(null);
            tmp_1.tmp$ret$161__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(14);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_2 = this.get_exception_x0n6w6_k$();
            if (tmp_2 instanceof Exception) {
              this.e2__1 = this.get_exception_x0n6w6_k$();
              var tmp_3 = this;
              var tmp_4;
              var tmp_5 = this.e2__1;
              if (tmp_5 instanceof UnauthorizedException) {
                l$ret$19: do {
                  var this_3 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue_2 = this_3.get_value_j01efc_k$();
                    var nextValue_2 = prevValue_2.copy$default_g8m6wa_k$(VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_wrong_user_pass_combo_so7k7t_k$()));
                    if (this_3.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
                      break l$ret$19;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_getInstance();
              } else {
                l$ret$21: do {
                  var this_4 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue_3 = this_4.get_value_j01efc_k$();
                    var nextValue_3 = prevValue_3.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, this.e2__1.message);
                    if (this_4.compareAndSet_l3595a_k$(prevValue_3, nextValue_3)) {
                      break l$ret$21;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_getInstance();
              }
              tmp_3.tmp$ret$161__1 = tmp_4;
              this.set_exceptionState_fex74n_k$(14);
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 4:
            this.set_exceptionState_fex74n_k$(14);
            this.t3__1 = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$23: do {
              var this_5 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_4 = this_5.get_value_j01efc_k$();
                var nextValue_4 = prevValue_4.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, VOID, true);
                if (this_5.compareAndSet_l3595a_k$(prevValue_4, nextValue_4)) {
                  break l$ret$23;
                }
              }
            }
             while (false);
            throw this.t3__1;
          case 5:
            this.set_exceptionState_fex74n_k$(14);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$25: do {
              var this_6 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_5 = this_6.get_value_j01efc_k$();
                var nextValue_5 = prevValue_5.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, VOID, true);
                if (this_6.compareAndSet_l3595a_k$(prevValue_5, nextValue_5)) {
                  break l$ret$25;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(13);
            continue $sm;
          case 6:
            this.set_exceptionState_fex74n_k$(11);
            this.set_exceptionState_fex74n_k$(10);
            this.set_state_rjd8d0_k$(7);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().countUsername_16eexw_k$(this.$entity_1.username_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.usernameCount4__1 = suspendResult;
            if (this.usernameCount4__1 === 0) {
              this.set_state_rjd8d0_k$(8);
              var tmp_6 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
              suspendResult = withDoorTransactionAsync(tmp_6, VOID, PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.$entity_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$7: do {
                var this_7 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_6 = this_7.get_value_j01efc_k$();
                  var nextValue_6 = prevValue_6.copy$default_g8m6wa_k$(VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_person_exists_nw92g3_k$()));
                  if (this_7.compareAndSet_l3595a_k$(prevValue_6, nextValue_6)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            }

          case 8:
            this.this$0__1.finishWithResult_jlqwtj_k$(null);
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            this.tmp$ret$80__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(14);
            this.set_state_rjd8d0_k$(12);
            continue $sm;
          case 10:
            this.set_exceptionState_fex74n_k$(11);
            var tmp_7 = this.get_exception_x0n6w6_k$();
            if (tmp_7 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_8 = this;
              l$ret$11: do {
                var this_8 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_7 = this_8.get_value_j01efc_k$();
                  var nextValue_7 = prevValue_7.copy$default_g8m6wa_k$(VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_login_network_error_b1pwy0_k$()));
                  if (this_8.compareAndSet_l3595a_k$(prevValue_7, nextValue_7)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
              tmp_8.tmp$ret$80__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(14);
              this.set_state_rjd8d0_k$(12);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 11:
            this.set_exceptionState_fex74n_k$(14);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$13: do {
              var this_9 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_8 = this_9.get_value_j01efc_k$();
                var nextValue_8 = prevValue_8.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, VOID, true);
                if (this_9.compareAndSet_l3595a_k$(prevValue_8, nextValue_8)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            throw t;
          case 12:
            this.set_exceptionState_fex74n_k$(14);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$15: do {
              var this_10 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_9 = this_10.get_value_j01efc_k$();
                var nextValue_9 = prevValue_9.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, VOID, true);
                if (this_10.compareAndSet_l3595a_k$(prevValue_9, nextValue_9)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(13);
            continue $sm;
          case 13:
            return Unit_getInstance();
          case 14:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 14) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda(this.$entity_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonAccountEditViewModel$onClickSave$slambda_0($entity, this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel(di, savedStateHandle) {
    Companion_getInstance_227();
    UstadEditViewModel.call(this, di, savedStateHandle, 'AccountEdit');
    this._uiState_1 = MutableStateFlow(new PersonAccountEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.invoke_4wgfc3_k$(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.authManager$delegate_1 = Instance(this_0, tmp$ret$3, null).provideDelegate_o2qlc1_k$(this, authManager$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger_0 = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_4 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$6 = tmp_4.invoke_4wgfc3_k$(tmp$ret$5, context_0);
    var this_1 = On(this, tmp$ret$6, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_3.setPasswordUseCase$delegate_1 = Instance(this_1, tmp$ret$8, null).provideDelegate_o2qlc1_k$(this, setPasswordUseCase$factory());
    this.validateUsernameUseCase_1 = new ValidateUsernameUseCase_0();
    this.filterUsernameUseCase_1 = new FilterUsernameUseCase();
    this.get__appUiState_rulqry_k$().set_value_v1vabv_k$(new AppUiState(VOID, Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()));
    var tmp_7 = PersonAccountEditViewModel$slambda_0(this, null);
    this.launchIfHasPermission$default_l9omam_k$(tmp_7, VOID, VOID, PersonAccountEditViewModel$slambda_2(this, null));
  }
  protoOf(PersonAccountEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(PersonAccountEditViewModel).onEntityChanged_ixg8fw_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onEntityChanged.<anonymous>' call
        var tmp;
        var tmp_0 = entity == null ? null : entity.username_1;
        var tmp1_safe_receiver = this._uiState_1.get_value_j01efc_k$().personAccount_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.username_1))) {
          tmp = entity == null ? null : entity.copy$default_k97nt1_k$(VOID, VOID, this.filterUsernameUseCase_1.invoke_h1q7yg_k$(entity.username_1, ''));
        } else {
          tmp = entity;
        }
        var tmp_1 = tmp;
        var tmp_2;
        var tmp_3;
        if (!(prevValue.usernameError_1 == null)) {
          var tmp3_safe_receiver = prevValue.personAccount_1;
          var tmp_4 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.username_1;
          tmp_3 = tmp_4 == (entity == null ? null : entity.username_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.usernameError_1;
        } else {
          tmp_2 = null;
        }
        var tmp_5 = tmp_2;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.currentPasswordError_1 == null)) {
          var tmp5_safe_receiver = prevValue.personAccount_1;
          var tmp_8 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.currentPassword_1;
          tmp_7 = tmp_8 == (entity == null ? null : entity.currentPassword_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          tmp_6 = prevValue.currentPasswordError_1;
        } else {
          tmp_6 = null;
        }
        var tmp_9 = tmp_6;
        var tmp_10;
        var tmp_11;
        if (!(prevValue.newPasswordError_1 == null)) {
          var tmp7_safe_receiver = prevValue.personAccount_1;
          var tmp_12 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.newPassword_1;
          tmp_11 = tmp_12 == (entity == null ? null : entity.newPassword_1);
        } else {
          tmp_11 = false;
        }
        if (tmp_11) {
          tmp_10 = prevValue.newPasswordError_1;
        } else {
          tmp_10 = null;
        }
        var nextValue = prevValue.copy$default_g8m6wa_k$(tmp_1, tmp_5, tmp_9, tmp_10);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_228().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp_13 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_13, VOID, VOID, PersonAccountEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(PersonAccountEditViewModel).onClickSave_ncak3a_k$ = function () {
    if (this.get_loadingState_rpk2ke_k$().equals(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$()))
      return Unit_getInstance();
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().personAccount_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.copy$default_g8m6wa_k$(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, PersonAccountEditViewModel$onClickSave$slambda_0(entity, this, null));
  };
  function PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    personAccount = personAccount === VOID ? new PersonUsernameAndPasswordModel() : personAccount;
    usernameError = usernameError === VOID ? null : usernameError;
    currentPasswordError = currentPasswordError === VOID ? null : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? null : newPasswordError;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.personAccount_1 = personAccount;
    this.usernameError_1 = usernameError;
    this.currentPasswordError_1 = currentPasswordError;
    this.newPasswordError_1 = newPasswordError;
    this.errorMessage_1 = errorMessage;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(PersonAccountEditUiState).get_personAccount_vq3qpb_k$ = function () {
    return this.personAccount_1;
  };
  protoOf(PersonAccountEditUiState).get_usernameError_i4qze1_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(PersonAccountEditUiState).get_currentPasswordError_w186f7_k$ = function () {
    return this.currentPasswordError_1;
  };
  protoOf(PersonAccountEditUiState).get_newPasswordError_zriyy_k$ = function () {
    return this.newPasswordError_1;
  };
  protoOf(PersonAccountEditUiState).get_errorMessage_ofxtm0_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(PersonAccountEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(PersonAccountEditUiState).get_usernameVisible_gmz0od_k$ = function () {
    var tmp0_safe_receiver = this.personAccount_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.mode_1) === 1;
  };
  protoOf(PersonAccountEditUiState).get_currentPasswordVisible_3sw3hj_k$ = function () {
    var tmp0_safe_receiver = this.personAccount_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.mode_1) === 3;
  };
  protoOf(PersonAccountEditUiState).get_hasErrors_2nabd0_k$ = function () {
    return (!(this.usernameError_1 == null) ? true : !(this.currentPasswordError_1 == null)) ? true : !(this.newPasswordError_1 == null);
  };
  protoOf(PersonAccountEditUiState).component1_7eebsc_k$ = function () {
    return this.personAccount_1;
  };
  protoOf(PersonAccountEditUiState).component2_7eebsb_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(PersonAccountEditUiState).component3_7eebsa_k$ = function () {
    return this.currentPasswordError_1;
  };
  protoOf(PersonAccountEditUiState).component4_7eebs9_k$ = function () {
    return this.newPasswordError_1;
  };
  protoOf(PersonAccountEditUiState).component5_7eebs8_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(PersonAccountEditUiState).component6_7eebs7_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(PersonAccountEditUiState).copy_o61lfc_k$ = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    return new PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).copy$default_g8m6wa_k$ = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled, $super) {
    personAccount = personAccount === VOID ? this.personAccount_1 : personAccount;
    usernameError = usernameError === VOID ? this.usernameError_1 : usernameError;
    currentPasswordError = currentPasswordError === VOID ? this.currentPasswordError_1 : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? this.newPasswordError_1 : newPasswordError;
    errorMessage = errorMessage === VOID ? this.errorMessage_1 : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_o61lfc_k$(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) : $super.copy_o61lfc_k$.call(this, personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).toString = function () {
    return 'PersonAccountEditUiState(personAccount=' + this.personAccount_1 + ', usernameError=' + this.usernameError_1 + ', currentPasswordError=' + this.currentPasswordError_1 + ', newPasswordError=' + this.newPasswordError_1 + ', errorMessage=' + this.errorMessage_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(PersonAccountEditUiState).hashCode = function () {
    var result = this.personAccount_1 == null ? 0 : this.personAccount_1.hashCode();
    result = imul(result, 31) + (this.usernameError_1 == null ? 0 : getStringHashCode(this.usernameError_1)) | 0;
    result = imul(result, 31) + (this.currentPasswordError_1 == null ? 0 : getStringHashCode(this.currentPasswordError_1)) | 0;
    result = imul(result, 31) + (this.newPasswordError_1 == null ? 0 : getStringHashCode(this.newPasswordError_1)) | 0;
    result = imul(result, 31) + (this.errorMessage_1 == null ? 0 : getStringHashCode(this.errorMessage_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(PersonAccountEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonAccountEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonAccountEditUiState ? other : THROW_CCE();
    if (!equals(this.personAccount_1, tmp0_other_with_cast.personAccount_1))
      return false;
    if (!(this.usernameError_1 == tmp0_other_with_cast.usernameError_1))
      return false;
    if (!(this.currentPasswordError_1 == tmp0_other_with_cast.currentPasswordError_1))
      return false;
    if (!(this.newPasswordError_1 == tmp0_other_with_cast.newPasswordError_1))
      return false;
    if (!(this.errorMessage_1 == tmp0_other_with_cast.errorMessage_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function Companion_167() {
    Companion_instance_167 = this;
  }
  protoOf(Companion_167).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_72();
  };
  var Companion_instance_167;
  function Companion_getInstance_228() {
    if (Companion_instance_167 == null)
      new Companion_167();
    return Companion_instance_167;
  }
  function $serializer_62() {
    $serializer_instance_62 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.accountedit.PersonUsernameAndPasswordModel', this, 5);
    tmp0_serialDesc.addElement_5pzumi_k$('mode', true);
    tmp0_serialDesc.addElement_5pzumi_k$('personUid', true);
    tmp0_serialDesc.addElement_5pzumi_k$('username', true);
    tmp0_serialDesc.addElement_5pzumi_k$('currentPassword', true);
    tmp0_serialDesc.addElement_5pzumi_k$('newPassword', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_62).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_62).childSerializers_5ghqw5_k$ = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_62).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp9_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp9_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.decodeIntElement_941u6a_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.decodeLongElement_994anb_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.decodeStringElement_3oenpg_k$(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.endStructure_1xqz0n_k$(tmp0_desc);
    return PersonUsernameAndPasswordModel_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_62).serialize_hi9cbe_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.mode_1 === 1)) {
      tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 0, value.mode_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !value.personUid_1.equals(new Long(0, 0))) {
      tmp1_output.encodeLongElement_cega27_k$(tmp0_desc, 1, value.personUid_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.username_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 2, value.username_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !(value.currentPassword_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 3, value.currentPassword_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.newPassword_1 === '')) {
      tmp1_output.encodeStringElement_1n5wu2_k$(tmp0_desc, 4, value.newPassword_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_62).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_hi9cbe_k$(encoder, value instanceof PersonUsernameAndPasswordModel ? value : THROW_CCE());
  };
  var $serializer_instance_62;
  function $serializer_getInstance_72() {
    if ($serializer_instance_62 == null)
      new $serializer_62();
    return $serializer_instance_62;
  }
  function PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_72().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.mode_1 = 1;
    else
      $this.mode_1 = mode;
    if (0 === (seen1 & 2))
      $this.personUid_1 = new Long(0, 0);
    else
      $this.personUid_1 = personUid;
    if (0 === (seen1 & 4))
      $this.username_1 = '';
    else
      $this.username_1 = username;
    if (0 === (seen1 & 8))
      $this.currentPassword_1 = '';
    else
      $this.currentPassword_1 = currentPassword;
    if (0 === (seen1 & 16))
      $this.newPassword_1 = '';
    else
      $this.newPassword_1 = newPassword;
    return $this;
  }
  function PersonUsernameAndPasswordModel_init_$Create$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker) {
    return PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, objectCreate(protoOf(PersonUsernameAndPasswordModel)));
  }
  function PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword) {
    Companion_getInstance_228();
    mode = mode === VOID ? 1 : mode;
    personUid = personUid === VOID ? new Long(0, 0) : personUid;
    username = username === VOID ? '' : username;
    currentPassword = currentPassword === VOID ? '' : currentPassword;
    newPassword = newPassword === VOID ? '' : newPassword;
    this.mode_1 = mode;
    this.personUid_1 = personUid;
    this.username_1 = username;
    this.currentPassword_1 = currentPassword;
    this.newPassword_1 = newPassword;
  }
  protoOf(PersonUsernameAndPasswordModel).get_mode_woqlt8_k$ = function () {
    return this.mode_1;
  };
  protoOf(PersonUsernameAndPasswordModel).get_personUid_mmhd76_k$ = function () {
    return this.personUid_1;
  };
  protoOf(PersonUsernameAndPasswordModel).get_username_ytz5i7_k$ = function () {
    return this.username_1;
  };
  protoOf(PersonUsernameAndPasswordModel).get_currentPassword_q3lfez_k$ = function () {
    return this.currentPassword_1;
  };
  protoOf(PersonUsernameAndPasswordModel).get_newPassword_g8455a_k$ = function () {
    return this.newPassword_1;
  };
  protoOf(PersonUsernameAndPasswordModel).component1_7eebsc_k$ = function () {
    return this.mode_1;
  };
  protoOf(PersonUsernameAndPasswordModel).component2_7eebsb_k$ = function () {
    return this.personUid_1;
  };
  protoOf(PersonUsernameAndPasswordModel).component3_7eebsa_k$ = function () {
    return this.username_1;
  };
  protoOf(PersonUsernameAndPasswordModel).component4_7eebs9_k$ = function () {
    return this.currentPassword_1;
  };
  protoOf(PersonUsernameAndPasswordModel).component5_7eebs8_k$ = function () {
    return this.newPassword_1;
  };
  protoOf(PersonUsernameAndPasswordModel).copy_h61k35_k$ = function (mode, personUid, username, currentPassword, newPassword) {
    return new PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).copy$default_k97nt1_k$ = function (mode, personUid, username, currentPassword, newPassword, $super) {
    mode = mode === VOID ? this.mode_1 : mode;
    personUid = personUid === VOID ? this.personUid_1 : personUid;
    username = username === VOID ? this.username_1 : username;
    currentPassword = currentPassword === VOID ? this.currentPassword_1 : currentPassword;
    newPassword = newPassword === VOID ? this.newPassword_1 : newPassword;
    return $super === VOID ? this.copy_h61k35_k$(mode, personUid, username, currentPassword, newPassword) : $super.copy_h61k35_k$.call(this, mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).toString = function () {
    return 'PersonUsernameAndPasswordModel(mode=' + this.mode_1 + ', personUid=' + this.personUid_1.toString() + ', username=' + this.username_1 + ', currentPassword=' + this.currentPassword_1 + ', newPassword=' + this.newPassword_1 + ')';
  };
  protoOf(PersonUsernameAndPasswordModel).hashCode = function () {
    var result = this.mode_1;
    result = imul(result, 31) + this.personUid_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.username_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.currentPassword_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.newPassword_1) | 0;
    return result;
  };
  protoOf(PersonUsernameAndPasswordModel).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonUsernameAndPasswordModel))
      return false;
    var tmp0_other_with_cast = other instanceof PersonUsernameAndPasswordModel ? other : THROW_CCE();
    if (!(this.mode_1 === tmp0_other_with_cast.mode_1))
      return false;
    if (!this.personUid_1.equals(tmp0_other_with_cast.personUid_1))
      return false;
    if (!(this.username_1 === tmp0_other_with_cast.username_1))
      return false;
    if (!(this.currentPassword_1 === tmp0_other_with_cast.currentPassword_1))
      return false;
    if (!(this.newPassword_1 === tmp0_other_with_cast.newPassword_1))
      return false;
    return true;
  };
  function authManager$factory() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function authManager$factory_0() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory_0() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function BulkAddPersonRunImportViewModel$slambda$lambda(this$0) {
    return function (numImported, totalRecords) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_5lu5ku_k$(VOID, totalRecords, numImported);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get__uiState__8e9jsd_37($this) {
    return $this._uiState_1;
  }
  function _get_fileUri__mzvjcx($this) {
    return $this.fileUri_1;
  }
  function _get_bulkAddFromUriUseCase__ahhheb($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bulkAddFromUriUseCase$delegate_1;
    bulkAddFromUriUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function Companion_168() {
    Companion_instance_168 = this;
    this.DEST_NAME_1 = 'BulkAddPersonRunImport';
    this.ARG_URI_1 = 'uri';
  }
  protoOf(Companion_168).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_168).get_ARG_URI_u8i56_k$ = function () {
    return this.ARG_URI_1;
  };
  var Companion_instance_168;
  function Companion_getInstance_229() {
    if (Companion_instance_168 == null)
      new Companion_168();
    return Companion_instance_168;
  }
  function sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0).invoke_ooalk8_k$ = function (numImported, totalRecords) {
    return this.function_1(numImported, totalRecords);
  };
  function BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonRunImportViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = _get_bulkAddFromUriUseCase__ahhheb(this.this$0__1);
            var tmp_1 = Companion_getInstance_25().parse_pc1q8p_k$(this.this$0__1.fileUri_1);
            var tmp_2 = this.this$0__1.get_activeUserPersonUid_1nlgnz_k$();
            var tmp_3 = BulkAddPersonRunImportViewModel$slambda$lambda(this.this$0__1);
            suspendResult = tmp_0.invoke_cf6tlt_k$(tmp_1, tmp_2, new sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_5lu5ku_k$(false, VOID, result.get_numImported_9iclof_k$());
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_4 = this.get_exception_x0n6w6_k$();
            if (tmp_4 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              Napier_getInstance().e$default_pvzj32_k$('Exception running import', e);
              l$ret$3: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_0 = this_1.get_value_j01efc_k$();
                  var tmp0_safe_receiver = e instanceof BulkAddPersonException ? e : null;
                  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_errors_czzmno_k$();
                  var nextValue_0 = prevValue_0.copy$default_5lu5ku_k$(false, VOID, VOID, tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, e.message);
                  if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function BulkAddPersonRunImportViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonRunImportViewModel(di, savedStateHandle) {
    Companion_getInstance_229();
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonRunImport');
    this._uiState_1 = MutableStateFlow(new BulkAddPersonRunImportUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$('uri');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No fileUri');
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.fileUri_1 = tmp_0;
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(BulkAddPersonsFromLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.bulkAddFromUriUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, bulkAddFromUriUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_bulk_import_bnh7nt_k$()));
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_3, VOID, VOID, BulkAddPersonRunImportViewModel$slambda_0(this, null));
  }
  protoOf(BulkAddPersonRunImportViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function _get_$childSerializers__r2zwns_22($this) {
    return $this.$childSerializers_1;
  }
  function Companion_169() {
    Companion_instance_169 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.$childSerializers_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_50()), null];
  }
  protoOf(Companion_169).serializer_9w0wvi_k$ = function () {
    return $serializer_getInstance_73();
  };
  var Companion_instance_169;
  function Companion_getInstance_230() {
    if (Companion_instance_169 == null)
      new Companion_169();
    return Companion_instance_169;
  }
  function $serializer_63() {
    $serializer_instance_63 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportUiState', this, 5);
    tmp0_serialDesc.addElement_5pzumi_k$('inProgress', true);
    tmp0_serialDesc.addElement_5pzumi_k$('totalRecords', true);
    tmp0_serialDesc.addElement_5pzumi_k$('numImported', true);
    tmp0_serialDesc.addElement_5pzumi_k$('errors', true);
    tmp0_serialDesc.addElement_5pzumi_k$('errorMessage', true);
    this.descriptor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_63).get_descriptor_wjt6a0_k$ = function () {
    return this.descriptor_1;
  };
  protoOf($serializer_63).childSerializers_5ghqw5_k$ = function () {
    var tmp0_cached = Companion_getInstance_230().$childSerializers_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), tmp0_cached[3], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_63).deserialize_sy6x50_k$ = function (decoder) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = 0;
    var tmp6_local2 = 0;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp10_cached = Companion_getInstance_230().$childSerializers_1;
    if (tmp9_input.decodeSequentially_xlblqy_k$()) {
      tmp4_local0 = tmp9_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.decodeIntElement_941u6a_k$(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.decodeIntElement_941u6a_k$(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.decodeElementIndex_bstkhp_k$(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.decodeBooleanElement_vuyhtj_k$(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.decodeIntElement_941u6a_k$(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.decodeIntElement_941u6a_k$(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.decodeSerializableElement_uahnnv_k$(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.decodeNullableSerializableElement_k2y6ab_k$(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.endStructure_1xqz0n_k$(tmp0_desc);
    return BulkAddPersonRunImportUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_63).serialize_855cv1_k$ = function (encoder, value) {
    var tmp0_desc = this.descriptor_1;
    var tmp1_output = encoder.beginStructure_yljocp_k$(tmp0_desc);
    var tmp2_cached = Companion_getInstance_230().$childSerializers_1;
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 0) ? true : !(value.inProgress_1 === true)) {
      tmp1_output.encodeBooleanElement_ydht7q_k$(tmp0_desc, 0, value.inProgress_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 1) ? true : !(value.totalRecords_1 === 0)) {
      tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 1, value.totalRecords_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 2) ? true : !(value.numImported_1 === 0)) {
      tmp1_output.encodeIntElement_krhhce_k$(tmp0_desc, 2, value.numImported_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 3) ? true : !equals(value.errors_1, emptyList())) {
      tmp1_output.encodeSerializableElement_isqxcl_k$(tmp0_desc, 3, tmp2_cached[3], value.errors_1);
    }
    if (tmp1_output.shouldEncodeElementDefault_x8eyid_k$(tmp0_desc, 4) ? true : !(value.errorMessage_1 == null)) {
      tmp1_output.encodeNullableSerializableElement_5lquiv_k$(tmp0_desc, 4, StringSerializer_getInstance(), value.errorMessage_1);
    }
    tmp1_output.endStructure_1xqz0n_k$(tmp0_desc);
  };
  protoOf($serializer_63).serialize_5ase3y_k$ = function (encoder, value) {
    return this.serialize_855cv1_k$(encoder, value instanceof BulkAddPersonRunImportUiState ? value : THROW_CCE());
  };
  var $serializer_instance_63;
  function $serializer_getInstance_73() {
    if ($serializer_instance_63 == null)
      new $serializer_63();
    return $serializer_instance_63;
  }
  function BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_73().descriptor_1);
    }
    if (0 === (seen1 & 1))
      $this.inProgress_1 = true;
    else
      $this.inProgress_1 = inProgress;
    if (0 === (seen1 & 2))
      $this.totalRecords_1 = 0;
    else
      $this.totalRecords_1 = totalRecords;
    if (0 === (seen1 & 4))
      $this.numImported_1 = 0;
    else
      $this.numImported_1 = numImported;
    if (0 === (seen1 & 8))
      $this.errors_1 = emptyList();
    else
      $this.errors_1 = errors;
    if (0 === (seen1 & 16))
      $this.errorMessage_1 = null;
    else
      $this.errorMessage_1 = errorMessage;
    return $this;
  }
  function BulkAddPersonRunImportUiState_init_$Create$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker) {
    return BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonRunImportUiState)));
  }
  function BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage) {
    Companion_getInstance_230();
    inProgress = inProgress === VOID ? true : inProgress;
    totalRecords = totalRecords === VOID ? 0 : totalRecords;
    numImported = numImported === VOID ? 0 : numImported;
    errors = errors === VOID ? emptyList() : errors;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.inProgress_1 = inProgress;
    this.totalRecords_1 = totalRecords;
    this.numImported_1 = numImported;
    this.errors_1 = errors;
    this.errorMessage_1 = errorMessage;
  }
  protoOf(BulkAddPersonRunImportUiState).get_inProgress_skvv23_k$ = function () {
    return this.inProgress_1;
  };
  protoOf(BulkAddPersonRunImportUiState).get_totalRecords_vmklnr_k$ = function () {
    return this.totalRecords_1;
  };
  protoOf(BulkAddPersonRunImportUiState).get_numImported_9iclof_k$ = function () {
    return this.numImported_1;
  };
  protoOf(BulkAddPersonRunImportUiState).get_errors_czzmno_k$ = function () {
    return this.errors_1;
  };
  protoOf(BulkAddPersonRunImportUiState).get_errorMessage_ofxtm0_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(BulkAddPersonRunImportUiState).get_hasErrors_2nabd0_k$ = function () {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.errors_1.isEmpty_y1axqb_k$()) {
      tmp = true;
    } else {
      tmp = !(this.errorMessage_1 == null);
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).get_progress_mo5qeu_k$ = function () {
    var tmp;
    if (this.totalRecords_1 > 0) {
      tmp = this.numImported_1 / this.totalRecords_1;
    } else {
      tmp = 0.0;
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).component1_7eebsc_k$ = function () {
    return this.inProgress_1;
  };
  protoOf(BulkAddPersonRunImportUiState).component2_7eebsb_k$ = function () {
    return this.totalRecords_1;
  };
  protoOf(BulkAddPersonRunImportUiState).component3_7eebsa_k$ = function () {
    return this.numImported_1;
  };
  protoOf(BulkAddPersonRunImportUiState).component4_7eebs9_k$ = function () {
    return this.errors_1;
  };
  protoOf(BulkAddPersonRunImportUiState).component5_7eebs8_k$ = function () {
    return this.errorMessage_1;
  };
  protoOf(BulkAddPersonRunImportUiState).copy_4314u3_k$ = function (inProgress, totalRecords, numImported, errors, errorMessage) {
    return new BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).copy$default_5lu5ku_k$ = function (inProgress, totalRecords, numImported, errors, errorMessage, $super) {
    inProgress = inProgress === VOID ? this.inProgress_1 : inProgress;
    totalRecords = totalRecords === VOID ? this.totalRecords_1 : totalRecords;
    numImported = numImported === VOID ? this.numImported_1 : numImported;
    errors = errors === VOID ? this.errors_1 : errors;
    errorMessage = errorMessage === VOID ? this.errorMessage_1 : errorMessage;
    return $super === VOID ? this.copy_4314u3_k$(inProgress, totalRecords, numImported, errors, errorMessage) : $super.copy_4314u3_k$.call(this, inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).toString = function () {
    return 'BulkAddPersonRunImportUiState(inProgress=' + this.inProgress_1 + ', totalRecords=' + this.totalRecords_1 + ', numImported=' + this.numImported_1 + ', errors=' + this.errors_1 + ', errorMessage=' + this.errorMessage_1 + ')';
  };
  protoOf(BulkAddPersonRunImportUiState).hashCode = function () {
    var result = getBooleanHashCode(this.inProgress_1);
    result = imul(result, 31) + this.totalRecords_1 | 0;
    result = imul(result, 31) + this.numImported_1 | 0;
    result = imul(result, 31) + hashCode(this.errors_1) | 0;
    result = imul(result, 31) + (this.errorMessage_1 == null ? 0 : getStringHashCode(this.errorMessage_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonRunImportUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonRunImportUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonRunImportUiState ? other : THROW_CCE();
    if (!(this.inProgress_1 === tmp0_other_with_cast.inProgress_1))
      return false;
    if (!(this.totalRecords_1 === tmp0_other_with_cast.totalRecords_1))
      return false;
    if (!(this.numImported_1 === tmp0_other_with_cast.numImported_1))
      return false;
    if (!equals(this.errors_1, tmp0_other_with_cast.errors_1))
      return false;
    if (!(this.errorMessage_1 == tmp0_other_with_cast.errorMessage_1))
      return false;
    return true;
  };
  function bulkAddFromUriUseCase$factory() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function bulkAddFromUriUseCase$factory_0() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda(it) {
    return Unit_getInstance();
  }
  function _get__uiState__8e9jsd_38($this) {
    return $this._uiState_1;
  }
  function _get_openBlobUiUseCase__fzusqz_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.openBlobUiUseCase$delegate_1;
    openBlobUiUseCase$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function Companion_170() {
    Companion_instance_170 = this;
    this.DEST_NAME_1 = 'BulkAddPersonSelectFile';
  }
  protoOf(Companion_170).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_170;
  function Companion_getInstance_231() {
    if (Companion_instance_170 == null)
      new Companion_170();
    return Companion_instance_170;
  }
  function BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda).invoke_pclm39_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.systemPermissionDao_fl20r8_k$().personHasSystemPermissionPair_8b81c3_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_ADD_PERSON_79ed2c_k$(), PermissionFlags_getInstance().get_PERSON_VIEW_s2u8t6_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            return it.get_firstPermission_y8246u_k$() ? it.get_secondPermission_lfalzo_k$() : false;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function BulkAddPersonSelectFileViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pclm39_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_si6u9_k$(VOID, VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function BulkAddPersonSelectFileViewModel$slambda_2(resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation) {
    this.this$0__1 = this$0;
    this.$templatePath_1 = $templatePath;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = _get_openBlobUiUseCase__fzusqz_1(this.this$0__1);
            var tmp_1 = new OpenBlobItem(this.$templatePath_1, 'text/csv', 'bulk-add-persons-template.csv', new Long(186, 0));
            suspendResult = tmp_0.invoke_thxto7_k$(tmp_1, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda, OpenBlobIntent_SEND_getInstance(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_2 = this.get_exception_x0n6w6_k$();
            if (tmp_2 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              printStackTrace(e);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this.this$0__1, this.$templatePath_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this$0, $templatePath, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel(di, savedStateHandle) {
    Companion_getInstance_231();
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonSelectFile');
    this._uiState_1 = MutableStateFlow(new BulkAddPersonSelectFileUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.openBlobUiUseCase$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, openBlobUiUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_bulk_import_bnh7nt_k$()));
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = BulkAddPersonSelectFileViewModel$slambda_0(this, null);
    var tmp_2 = BulkAddPersonSelectFileViewModel$lambda(this);
    this.launchIfHasPermission_rjt2z5_k$(tmp_1, true, tmp_2, BulkAddPersonSelectFileViewModel$slambda_2(null));
  }
  protoOf(BulkAddPersonSelectFileViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(BulkAddPersonSelectFileViewModel).onFileSelected_rp89ga_k$ = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.onFileSelected.<anonymous>' call
        var nextValue = prevValue.copy$default_si6u9_k$(uri, name);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(BulkAddPersonSelectFileViewModel).onClickImportButton_x6h9m8_k$ = function () {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_229().get_DEST_NAME_gmgk7z_k$();
    var tmp_1 = Companion_getInstance_229().get_ARG_URI_u8i56_k$();
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().selectedFileUri_1;
    tmp.navigate$default_srzzsc_k$(tmp_0, mapOf_0(to(tmp_1, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  protoOf(BulkAddPersonSelectFileViewModel).onClickGetTemplate_pd1kzb_k$ = function () {
    var templatePath = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$() + 'staticfiles/bulkaddpersons/bulk-add-persons-template.csv';
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this, templatePath, null));
  };
  function BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    selectedFileUri = selectedFileUri === VOID ? null : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? null : selectedFileName;
    fileSelectError = fileSelectError === VOID ? null : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.selectedFileUri_1 = selectedFileUri;
    this.selectedFileName_1 = selectedFileName;
    this.fileSelectError_1 = fileSelectError;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(BulkAddPersonSelectFileUiState).get_selectedFileUri_g93tcc_k$ = function () {
    return this.selectedFileUri_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).get_selectedFileName_6md2gb_k$ = function () {
    return this.selectedFileName_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).get_fileSelectError_6lkdwn_k$ = function () {
    return this.fileSelectError_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).get_importButtonEnabled_e9rxy9_k$ = function () {
    return !(this.selectedFileUri_1 == null) ? this.fieldsEnabled_1 : false;
  };
  protoOf(BulkAddPersonSelectFileUiState).component1_7eebsc_k$ = function () {
    return this.selectedFileUri_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).component2_7eebsb_k$ = function () {
    return this.selectedFileName_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).component3_7eebsa_k$ = function () {
    return this.fileSelectError_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).component4_7eebs9_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(BulkAddPersonSelectFileUiState).copy_i2le4l_k$ = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    return new BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).copy$default_si6u9_k$ = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled, $super) {
    selectedFileUri = selectedFileUri === VOID ? this.selectedFileUri_1 : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? this.selectedFileName_1 : selectedFileName;
    fileSelectError = fileSelectError === VOID ? this.fileSelectError_1 : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_i2le4l_k$(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) : $super.copy_i2le4l_k$.call(this, selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).toString = function () {
    return 'BulkAddPersonSelectFileUiState(selectedFileUri=' + this.selectedFileUri_1 + ', selectedFileName=' + this.selectedFileName_1 + ', fileSelectError=' + this.fileSelectError_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(BulkAddPersonSelectFileUiState).hashCode = function () {
    var result = this.selectedFileUri_1 == null ? 0 : getStringHashCode(this.selectedFileUri_1);
    result = imul(result, 31) + (this.selectedFileName_1 == null ? 0 : getStringHashCode(this.selectedFileName_1)) | 0;
    result = imul(result, 31) + (this.fileSelectError_1 == null ? 0 : getStringHashCode(this.fileSelectError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(BulkAddPersonSelectFileUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonSelectFileUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonSelectFileUiState ? other : THROW_CCE();
    if (!(this.selectedFileUri_1 == tmp0_other_with_cast.selectedFileUri_1))
      return false;
    if (!(this.selectedFileName_1 == tmp0_other_with_cast.selectedFileName_1))
      return false;
    if (!(this.fileSelectError_1 == tmp0_other_with_cast.fileSelectError_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function openBlobUiUseCase$factory_3() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_4() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda$lambda($childProfileResult) {
    return function (it) {
      return it.get_personUid_mmhd76_k$().equals($childProfileResult.get_personUid_mmhd76_k$());
    };
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).invoke_j8k91l_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_j8k91l_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return emptyList();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_0(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_j8k91l_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).invoke_4f9qxy_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_4f9qxy_k$($completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return emptyList();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new AddChildProfilesViewModel$slambda$slambda$slambda_1(completion);
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_2(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_4f9qxy_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_z574q7_k$(VOID, it == null ? emptyList() : it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).invoke_loxtj4_k$ = function (result, $completion) {
    var tmp = this.create_h5keyk_k$(result, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_loxtj4_k$(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp_1 = this.result_2.get_result_iyg5d2_k$();
            var tmp0_elvis_lhs = tmp_1 instanceof Person ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.childProfileResult0__1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.this$0__1._uiState_1.get_value_j01efc_k$().childProfiles_1;
            tmp_3.newChildProfileList1__1 = replaceOrAppend(tmp_4, this.childProfileResult0__1, AddChildProfilesViewModel$slambda$slambda$slambda$lambda(this.childProfileResult0__1));
            this.set_state_rjd8d0_k$(1);
            suspendResult = updateChildProfileList(this.this$0__1, this.newChildProfileList1__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).create_h5keyk_k$ = function (result, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.result_2 = result;
    return i;
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_h5keyk_k$(value instanceof NavResult ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.invoke_loxtj4_k$(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda).invoke_d9fzmj_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = ListSerializer(Companion_getInstance_7().serializer_9w0wvi_k$());
            var tmp_1 = listOf_0('persons');
            var tmp_2 = AddChildProfilesViewModel$slambda$slambda$slambda_0(null);
            var tmp_3 = AddChildProfilesViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, tmp_1, VOID, tmp_2, tmp_3, AddChildProfilesViewModel$slambda$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            var tmp_4 = this.this$0__1.filteredResultFlowForKey_oacype_k$(this.this$0__1.get_navResultReturner_jwjn90_k$(), 'person');
            var tmp_5 = AddChildProfilesViewModel$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_4.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_32(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda(this.this$0__1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_d9fzmj_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_39($this) {
    return $this._uiState_1;
  }
  function _set_nextDestination__vdv3ka_0($this, _set____db54di) {
    $this.nextDestination_1 = _set____db54di;
  }
  function _get_nextDestination__tjiqwa_0($this) {
    return $this.nextDestination_1;
  }
  function updateChildProfileList($this, newChildProfileList, $completion) {
    var tmp = new $updateChildProfileListCOROUTINE$66($this, newChildProfileList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function Companion_171() {
    Companion_instance_171 = this;
    this.DEST_NAME_1 = 'AddChildProfile';
    this.RESULT_KEY_PERSON_1 = 'person';
    this.STATE_KEY_PERSONS_1 = 'persons';
  }
  protoOf(Companion_171).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_171).get_RESULT_KEY_PERSON_gixgxe_k$ = function () {
    return this.RESULT_KEY_PERSON_1;
  };
  protoOf(Companion_171).get_STATE_KEY_PERSONS_s9u52f_k$ = function () {
    return this.STATE_KEY_PERSONS_1;
  };
  var Companion_instance_171;
  function Companion_getInstance_232() {
    if (Companion_instance_171 == null)
      new Companion_171();
    return Companion_instance_171;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_32(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_32).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function AddChildProfilesViewModel$onClickFinish$ref($boundThis) {
    var l = function () {
      $boundThis.onClickFinish_p6tc7g_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickFinish';
    return l;
  }
  function AddChildProfilesViewModel$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda).invoke_pclm39_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return true;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new AddChildProfilesViewModel$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(AddChildProfilesViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$slambda_0(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_pclm39_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          async(this.$this$launchIfHasPermission_1, VOID, VOID, AddChildProfilesViewModel$slambda$slambda_0(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new AddChildProfilesViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(AddChildProfilesViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$slambda_2(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation) {
    this.this$0__1 = this$0;
    this.$newChildProfileList_1 = $newChildProfileList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).invoke_t04clr_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_t04clr_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(ListSerializer(Companion_getInstance_7().serializer_9w0wvi_k$()), this.$newChildProfileList_1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new AddChildProfilesViewModel$updateChildProfileList$slambda(this.this$0__1, this.$newChildProfileList_1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$updateChildProfileList$slambda_0(this$0, $newChildProfileList, resultContinuation) {
    var i = new AddChildProfilesViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_t04clr_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation) {
    this.this$0__1 = this$0;
    this.$person_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var this_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().childProfiles_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              if (!element.get_personUid_mmhd76_k$().equals(this.$person_1.get_personUid_mmhd76_k$())) {
                destination.add_utx5q5_k$(element);
              }
            }

            suspendResult = updateChildProfileList(this.this$0__1, destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this.this$0__1, this.$person_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$onClickDeleteChildProfile$slambda_0(this$0, $person, resultContinuation) {
    var i = new AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation) {
    this.this$0__1 = this$0;
    this.$profile_1 = $profile;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(10);
            this.goOptions0__1 = new UstadGoOptions(VOID, VOID, true);
            if (!this.this$0__1._uiState_1.get_value_j01efc_k$().childProfiles_1.isEmpty_y1axqb_k$()) {
              var tmp_0 = this;
              var tmp0_elvis_lhs = this.this$0__1.get_activeRepo_dmmom9_k$();
              tmp_0.effectiveDb1__1 = tmp0_elvis_lhs == null ? this.this$0__1.get_activeDb_bu92wd_k$() : tmp0_elvis_lhs;
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.effectiveDb1__1.personDao_e3y77h_k$().insertListAsync_2bxoks_k$(this.this$0__1._uiState_1.get_value_j01efc_k$().childProfiles_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            var this_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().childProfiles_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var item = tmp0_iterator.next_20eer_k$();
              var tmp0_ppjMinorPersonUid = item.get_personUid_mmhd76_k$();
              var tmp1_ppjParentPersonUid = this.this$0__1.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$();
              var tmp2_ppjStatus = Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$();
              var tmp3_ppjApprovalTiemstamp = systemTimeInMillis();
              destination.add_utx5q5_k$(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, tmp1_ppjParentPersonUid, tmp0_ppjMinorPersonUid, VOID, VOID, VOID, VOID, tmp2_ppjStatus, tmp3_ppjApprovalTiemstamp));
            }

            tmp_1.personParenJoinList2__1 = destination;
            var tmp_2 = this;
            tmp_2.this3__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().childProfiles_1;
            this.tmp0_iterator4__1 = this.this3__1.iterator_jk1svi_k$();
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (!this.tmp0_iterator4__1.hasNext_bitz1p_k$()) {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

            this.element5__1 = this.tmp0_iterator4__1.next_20eer_k$();
            var tmp_3 = this;
            tmp_3.it6__1 = this.element5__1;
            if (!this.it6__1.equals(this.$profile_1)) {
              this.set_state_rjd8d0_k$(3);
              suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().addSession_vs2s5g_k$(this.it6__1, this.this$0__1.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$(), null, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 3:
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 5:
            this.set_state_rjd8d0_k$(6);
            suspendResult = this.effectiveDb1__1.personParentJoinDao_gvpro7_k$().insertListAsync_e212v4_k$(this.personParenJoinList2__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            if (!this.$profile_1.equals(this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$())) {
              this.set_state_rjd8d0_k$(8);
              suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().addSession_vs2s5g_k$(this.$profile_1, this.this$0__1.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$(), null, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            }

          case 8:
            var sessionWithPersonAndLearningSpace = suspendResult;
            this.this$0__1.get_accountManager_bzeywn_k$().set_currentUserSession_3cktus_k$(sessionWithPersonAndLearningSpace);
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            this.this$0__1.navigateToViewUri_qtkrj7_k$(this.this$0__1.get_navController_qibdoq_k$(), appendSelectedAccount(this.this$0__1.nextDestination_1, this.$profile_1.get_personUid_mmhd76_k$(), new LearningSpace(this.this$0__1.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$())), this.goOptions0__1);
            return Unit_getInstance();
          case 10:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 10) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new AddChildProfilesViewModel$onProfileSelected$slambda(this.this$0__1, this.$profile_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function AddChildProfilesViewModel$onProfileSelected$slambda_0(this$0, $profile, resultContinuation) {
    var i = new AddChildProfilesViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateChildProfileListCOROUTINE$66(_this__u8e3s4, newChildProfileList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.newChildProfileList_1 = newChildProfileList;
  }
  protoOf($updateChildProfileListCOROUTINE$66).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            l$ret$1: do {
              var this_0 = this._this__u8e3s4__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_z574q7_k$(VOID, this.newChildProfileList_1);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.ARGUMENT0__1 = this._this__u8e3s4__1.get_savedStateHandle_xtsxet_k$();
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Dispatchers_getInstance().get_Default_goqax4_k$();
            suspendResult = withContext(tmp_0, AddChildProfilesViewModel$updateChildProfileList$slambda_0(this._this__u8e3s4__1, this.newChildProfileList_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.ARGUMENT0__1.set_wua6pr_k$('persons', ARGUMENT);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function AddChildProfilesViewModel(di, savedStateHandle) {
    Companion_getInstance_232();
    UstadEditViewModel.call(this, di, savedStateHandle, 'AddChildProfile');
    this._uiState_1 = MutableStateFlow(new AddChildProfilesUiState());
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
    tmp.nextDestination_1 = tmp0_elvis_lhs == null ? Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$() : tmp0_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.repo$delegate_1 = Instance(this_0, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, repo$factory());
    this.uiState_1 = asStateFlow(this._uiState_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_z574q7_k$(VOID, VOID, VOID, VOID, this.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$());
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>' call
        var tmp0_title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_add_child_profiles_hlm00k_k$());
        var tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_finish_dc0fbw_k$());
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, VOID, AddChildProfilesViewModel$onClickFinish$ref(this));
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, false, true, VOID, false, VOID, tmp1_actionBarButtonState);
        if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_3 = AddChildProfilesViewModel$slambda_0(null);
    this.launchIfHasPermission$default_l9omam_k$(tmp_3, VOID, VOID, AddChildProfilesViewModel$slambda_2(this, null));
  }
  protoOf(AddChildProfilesViewModel).get_repo_wotlmj_k$ = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.repo$delegate_1;
    repo$factory_0();
    return this_0.get_value_j01efc_k$();
  };
  protoOf(AddChildProfilesViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(AddChildProfilesViewModel).onClickFinish_p6tc7g_k$ = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this._uiState_1.get_value_j01efc_k$().childProfiles_1.isEmpty_y1axqb_k$()) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onClickFinish.<anonymous>' call
          var nextValue = prevValue.copy$default_z574q7_k$(VOID, VOID, VOID, true);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      this.onProfileSelected_4r9457_k$(this.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().toPerson_v1b6fk_k$());
    }
  };
  protoOf(AddChildProfilesViewModel).onClickAddChileProfile_q91r70_k$ = function () {
    var tmp0_nextViewName = Companion_getInstance_233().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onClickAddChileProfile.<anonymous>' call
    this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_155().get_ARG_ENTITY_JSON_x3rfse_k$());
    var tmp2_args = this_0.build_1k0s4u_k$();
    var tmp3_serializer = Companion_getInstance_7().serializer_9w0wvi_k$();
    this.navigateForResult$default_qg960j_k$(tmp0_nextViewName, 'person', null, tmp3_serializer, tmp2_args);
  };
  protoOf(AddChildProfilesViewModel).onClickEditChileProfile_be0r7v_k$ = function (person) {
    var tmp0_nextViewName = Companion_getInstance_233().get_DEST_NAME_gmgk7z_k$();
    var tmp2_serializer = Companion_getInstance_7().serializer_9w0wvi_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onClickEditChileProfile.<anonymous>' call
    this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_155().get_ARG_ENTITY_JSON_x3rfse_k$());
    var tmp3_args = this_0.build_1k0s4u_k$();
    this.navigateForResult$default_qg960j_k$(tmp0_nextViewName, 'person', person, tmp2_serializer, tmp3_args);
  };
  protoOf(AddChildProfilesViewModel).onClickDeleteChildProfile_irlgeh_k$ = function (person) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, AddChildProfilesViewModel$onClickDeleteChildProfile$slambda_0(this, person, null));
  };
  protoOf(AddChildProfilesViewModel).onDismissLangDialog_clndht_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.copy$default_z574q7_k$(VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(AddChildProfilesViewModel).onProfileSelected_4r9457_k$ = function (profile) {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, AddChildProfilesViewModel$onProfileSelected$slambda_0(this, profile, null));
  };
  function AddChildProfilesUiState(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) {
    onAddChildProfile = onAddChildProfile === VOID ? null : onAddChildProfile;
    childProfiles = childProfiles === VOID ? emptyList() : childProfiles;
    personParenJoinList = personParenJoinList === VOID ? emptyList() : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? false : showProfileSelectionDialog;
    parent = parent === VOID ? null : parent;
    this.onAddChildProfile_1 = onAddChildProfile;
    this.childProfiles_1 = childProfiles;
    this.personParenJoinList_1 = personParenJoinList;
    this.showProfileSelectionDialog_1 = showProfileSelectionDialog;
    this.parent_1 = parent;
  }
  protoOf(AddChildProfilesUiState).get_onAddChildProfile_awbl96_k$ = function () {
    return this.onAddChildProfile_1;
  };
  protoOf(AddChildProfilesUiState).get_childProfiles_c8ef3x_k$ = function () {
    return this.childProfiles_1;
  };
  protoOf(AddChildProfilesUiState).get_personParenJoinList_5y82b0_k$ = function () {
    return this.personParenJoinList_1;
  };
  protoOf(AddChildProfilesUiState).get_showProfileSelectionDialog_beusq9_k$ = function () {
    return this.showProfileSelectionDialog_1;
  };
  protoOf(AddChildProfilesUiState).get_parent_hy4reb_k$ = function () {
    return this.parent_1;
  };
  protoOf(AddChildProfilesUiState).get_personAndChildrenList_3j4wp6_k$ = function () {
    var tmp0_safe_receiver = this.parent_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesUiState.<get-personAndChildrenList>.<anonymous>' call
      tmp = listOf_0(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp;
    return plus(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.childProfiles_1);
  };
  protoOf(AddChildProfilesUiState).component1_7eebsc_k$ = function () {
    return this.onAddChildProfile_1;
  };
  protoOf(AddChildProfilesUiState).component2_7eebsb_k$ = function () {
    return this.childProfiles_1;
  };
  protoOf(AddChildProfilesUiState).component3_7eebsa_k$ = function () {
    return this.personParenJoinList_1;
  };
  protoOf(AddChildProfilesUiState).component4_7eebs9_k$ = function () {
    return this.showProfileSelectionDialog_1;
  };
  protoOf(AddChildProfilesUiState).component5_7eebs8_k$ = function () {
    return this.parent_1;
  };
  protoOf(AddChildProfilesUiState).copy_ihknb6_k$ = function (onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) {
    return new AddChildProfilesUiState(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(AddChildProfilesUiState).copy$default_z574q7_k$ = function (onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent, $super) {
    onAddChildProfile = onAddChildProfile === VOID ? this.onAddChildProfile_1 : onAddChildProfile;
    childProfiles = childProfiles === VOID ? this.childProfiles_1 : childProfiles;
    personParenJoinList = personParenJoinList === VOID ? this.personParenJoinList_1 : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? this.showProfileSelectionDialog_1 : showProfileSelectionDialog;
    parent = parent === VOID ? this.parent_1 : parent;
    return $super === VOID ? this.copy_ihknb6_k$(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) : $super.copy_ihknb6_k$.call(this, onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(AddChildProfilesUiState).toString = function () {
    return 'AddChildProfilesUiState(onAddChildProfile=' + this.onAddChildProfile_1 + ', childProfiles=' + this.childProfiles_1 + ', personParenJoinList=' + this.personParenJoinList_1 + ', showProfileSelectionDialog=' + this.showProfileSelectionDialog_1 + ', parent=' + this.parent_1 + ')';
  };
  protoOf(AddChildProfilesUiState).hashCode = function () {
    var result = this.onAddChildProfile_1 == null ? 0 : getStringHashCode(this.onAddChildProfile_1);
    result = imul(result, 31) + hashCode(this.childProfiles_1) | 0;
    result = imul(result, 31) + hashCode(this.personParenJoinList_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showProfileSelectionDialog_1) | 0;
    result = imul(result, 31) + (this.parent_1 == null ? 0 : this.parent_1.hashCode()) | 0;
    return result;
  };
  protoOf(AddChildProfilesUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddChildProfilesUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddChildProfilesUiState ? other : THROW_CCE();
    if (!(this.onAddChildProfile_1 == tmp0_other_with_cast.onAddChildProfile_1))
      return false;
    if (!equals(this.childProfiles_1, tmp0_other_with_cast.childProfiles_1))
      return false;
    if (!equals(this.personParenJoinList_1, tmp0_other_with_cast.personParenJoinList_1))
      return false;
    if (!(this.showProfileSelectionDialog_1 === tmp0_other_with_cast.showProfileSelectionDialog_1))
      return false;
    if (!equals(this.parent_1, tmp0_other_with_cast.parent_1))
      return false;
    return true;
  };
  function repo$factory() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.get_repo_wotlmj_k$();
    }, null);
  }
  function repo$factory_0() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.get_repo_wotlmj_k$();
    }, null);
  }
  function EditChildProfileViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda).invoke_7ynhv5_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_7ynhv5_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new EditChildProfileViewModel$slambda$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function EditChildProfileViewModel$slambda$slambda_0(resultContinuation) {
    var i = new EditChildProfileViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_7ynhv5_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda_1).invoke_g2i2lq_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EditChildProfileViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_g2i2lq_k$($completion);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_7().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            return new Person(newUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new EditChildProfileViewModel$slambda$slambda_1(this.this$0__1, completion);
  };
  function EditChildProfileViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new EditChildProfileViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_g2i2lq_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function EditChildProfileViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_g1kdho_k$(it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get__uiState__8e9jsd_40($this) {
    return $this._uiState_1;
  }
  function _get_genderConfig__kyr0zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.genderConfig$delegate_1;
    genderConfig$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function hasErrors_3(_this__u8e3s4, $this) {
    return ((!(_this__u8e3s4.dateOfBirthError_1 == null) ? true : !(_this__u8e3s4.firstNameError_1 == null)) ? true : !(_this__u8e3s4.lastNameError_1 == null)) ? true : !(_this__u8e3s4.genderError_1 == null);
  }
  function Companion_172() {
    Companion_instance_172 = this;
    this.DEST_NAME_1 = 'EditChildProfile';
  }
  protoOf(Companion_172).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_172;
  function Companion_getInstance_233() {
    if (Companion_instance_172 == null)
      new Companion_172();
    return Companion_instance_172;
  }
  function EditChildProfileViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.onClickDone_9vldqd_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function EditChildProfileViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EditChildProfileViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.tmp0_serializer0__1 = Companion_getInstance_7().serializer_9w0wvi_k$();
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = EditChildProfileViewModel$slambda$slambda_0(null);
            var tmp_1 = EditChildProfileViewModel$slambda$slambda_2(this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(this.tmp0_serializer0__1, VOID, VOID, tmp_0, tmp_1, EditChildProfileViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new EditChildProfileViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(EditChildProfileViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function EditChildProfileViewModel$slambda_0(this$0, resultContinuation) {
    var i = new EditChildProfileViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new EditChildProfileViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function EditChildProfileViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new EditChildProfileViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel(di, savedStateHandle) {
    Companion_getInstance_233();
    UstadEditViewModel.call(this, di, savedStateHandle, 'EditChildProfile');
    this._uiState_1 = MutableStateFlow(new EditChildProfileUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.genderConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, genderConfig$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_g1kdho_k$(VOID, VOID, _get_genderConfig__kyr0zc(this).get_genderMessageIdsAndUnset_iid7il_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp0_title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_child_profile_9eobs3_k$());
        var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, false, true, VOID, false, VOID, VOID, VOID, false);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_1 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp_1 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_done_wokv63_k$());
        var nextValue_1 = prevValue_1.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_1, VOID, EditChildProfileViewModel$onClickDone$ref(this)));
        if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_2, VOID, VOID, EditChildProfileViewModel$slambda_0(this, null));
  }
  protoOf(EditChildProfileViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(EditChildProfileViewModel).onEntityChanged_p4w3en_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.person_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_gender_dqurbe_k$();
        var tmp_0 = this.updateErrorMessageOnChange_silrgy_k$(tmp, entity == null ? null : entity.get_gender_dqurbe_k$(), prevValue.genderError_1);
        var tmp2_safe_receiver = prevValue.person_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_firstNames_n3o3y7_k$();
        var tmp_2 = this.updateErrorMessageOnChange_silrgy_k$(tmp_1, entity == null ? null : entity.get_firstNames_n3o3y7_k$(), prevValue.firstNameError_1);
        var tmp4_safe_receiver = prevValue.person_1;
        var tmp_3 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_lastName_f360wa_k$();
        var nextValue = prevValue.copy$default_g1kdho_k$(entity, VOID, VOID, tmp_0, tmp_2, this.updateErrorMessageOnChange_silrgy_k$(tmp_3, entity == null ? null : entity.get_lastName_f360wa_k$(), prevValue.lastNameError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_7().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_4 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_4, VOID, VOID, EditChildProfileViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(EditChildProfileViewModel).onClickDone_9vldqd_k$ = function () {
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var savePerson = tmp;
    var requiredFieldMessage = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.onClickDone.<anonymous>' call
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = savePerson.get_firstNames_n3o3y7_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = requiredFieldMessage;
        } else {
          tmp_0 = null;
        }
        var tmp0_firstNameError = tmp_0;
        var tmp_1;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = savePerson.get_lastName_f360wa_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_1 = requiredFieldMessage;
        } else {
          tmp_1 = null;
        }
        var tmp1_lastNameError = tmp_1;
        var tmp_2;
        if (savePerson.get_dateOfBirth_7hv8kx_k$().equals(new Long(0, 0))) {
          tmp_2 = requiredFieldMessage;
        } else {
          tmp_2 = null;
        }
        var tmp2_dateOfBirthError = tmp_2;
        var tmp3_genderError = savePerson.get_gender_dqurbe_k$() === Companion_getInstance_7().get_GENDER_UNSET_ij51gs_k$() ? requiredFieldMessage : null;
        var nextValue = prevValue.copy$default_g1kdho_k$(VOID, tmp2_dateOfBirthError, VOID, tmp3_genderError, tmp0_firstNameError, tmp1_lastNameError);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_3(this._uiState_1.get_value_j01efc_k$(), this)) {
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
      return Unit_getInstance();
    }
    this.finishWithResult_jlqwtj_k$(this._uiState_1.get_value_j01efc_k$().person_1);
  };
  function EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) {
    person = person === VOID ? null : person;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance().get_GENDER_MESSAGE_IDS_AND_UNSET_762xdf_k$() : genderOptions;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    this.person_1 = person;
    this.dateOfBirthError_1 = dateOfBirthError;
    this.genderOptions_1 = genderOptions;
    this.genderError_1 = genderError;
    this.firstNameError_1 = firstNameError;
    this.lastNameError_1 = lastNameError;
  }
  protoOf(EditChildProfileUiState).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(EditChildProfileUiState).get_dateOfBirthError_qux8bb_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(EditChildProfileUiState).get_genderOptions_grbq0k_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(EditChildProfileUiState).get_genderError_tcuvry_k$ = function () {
    return this.genderError_1;
  };
  protoOf(EditChildProfileUiState).get_firstNameError_322qnq_k$ = function () {
    return this.firstNameError_1;
  };
  protoOf(EditChildProfileUiState).get_lastNameError_avryzm_k$ = function () {
    return this.lastNameError_1;
  };
  protoOf(EditChildProfileUiState).component1_7eebsc_k$ = function () {
    return this.person_1;
  };
  protoOf(EditChildProfileUiState).component2_7eebsb_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(EditChildProfileUiState).component3_7eebsa_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(EditChildProfileUiState).component4_7eebs9_k$ = function () {
    return this.genderError_1;
  };
  protoOf(EditChildProfileUiState).component5_7eebs8_k$ = function () {
    return this.firstNameError_1;
  };
  protoOf(EditChildProfileUiState).component6_7eebs7_k$ = function () {
    return this.lastNameError_1;
  };
  protoOf(EditChildProfileUiState).copy_9guruy_k$ = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) {
    return new EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError);
  };
  protoOf(EditChildProfileUiState).copy$default_g1kdho_k$ = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, $super) {
    person = person === VOID ? this.person_1 : person;
    dateOfBirthError = dateOfBirthError === VOID ? this.dateOfBirthError_1 : dateOfBirthError;
    genderOptions = genderOptions === VOID ? this.genderOptions_1 : genderOptions;
    genderError = genderError === VOID ? this.genderError_1 : genderError;
    firstNameError = firstNameError === VOID ? this.firstNameError_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.lastNameError_1 : lastNameError;
    return $super === VOID ? this.copy_9guruy_k$(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) : $super.copy_9guruy_k$.call(this, person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError);
  };
  protoOf(EditChildProfileUiState).toString = function () {
    return 'EditChildProfileUiState(person=' + this.person_1 + ', dateOfBirthError=' + this.dateOfBirthError_1 + ', genderOptions=' + this.genderOptions_1 + ', genderError=' + this.genderError_1 + ', firstNameError=' + this.firstNameError_1 + ', lastNameError=' + this.lastNameError_1 + ')';
  };
  protoOf(EditChildProfileUiState).hashCode = function () {
    var result = this.person_1 == null ? 0 : this.person_1.hashCode();
    result = imul(result, 31) + (this.dateOfBirthError_1 == null ? 0 : getStringHashCode(this.dateOfBirthError_1)) | 0;
    result = imul(result, 31) + hashCode(this.genderOptions_1) | 0;
    result = imul(result, 31) + (this.genderError_1 == null ? 0 : getStringHashCode(this.genderError_1)) | 0;
    result = imul(result, 31) + (this.firstNameError_1 == null ? 0 : getStringHashCode(this.firstNameError_1)) | 0;
    result = imul(result, 31) + (this.lastNameError_1 == null ? 0 : getStringHashCode(this.lastNameError_1)) | 0;
    return result;
  };
  protoOf(EditChildProfileUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EditChildProfileUiState))
      return false;
    var tmp0_other_with_cast = other instanceof EditChildProfileUiState ? other : THROW_CCE();
    if (!equals(this.person_1, tmp0_other_with_cast.person_1))
      return false;
    if (!(this.dateOfBirthError_1 == tmp0_other_with_cast.dateOfBirthError_1))
      return false;
    if (!equals(this.genderOptions_1, tmp0_other_with_cast.genderOptions_1))
      return false;
    if (!(this.genderError_1 == tmp0_other_with_cast.genderError_1))
      return false;
    if (!(this.firstNameError_1 == tmp0_other_with_cast.firstNameError_1))
      return false;
    if (!(this.lastNameError_1 == tmp0_other_with_cast.lastNameError_1))
      return false;
    return true;
  };
  function genderConfig$factory() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function genderConfig$factory_0() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).invoke_a9yms0_k$ = function (entity, permissions, $completion) {
    var tmp = this.create_74fl3l_k$(entity, permissions, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE();
    return this.invoke_a9yms0_k$(tmp, p2 instanceof EditAndViewPermission ? p2 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.entity_1;
          var tmp_0;
          if (this.permissions_1.get_hasViewPermission_z0g5b9_k$()) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).create_74fl3l_k$ = function (entity, permissions, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.entity_1 = entity;
    i.permissions_1 = permissions;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.invoke_a9yms0_k$(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_ky9bci_k$ = function (person, $completion) {
    var tmp = this.create_hzqmky_k$(person, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_ky9bci_k$((p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_safe_receiver = this.person_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
              var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_phoneNum_i20sg1_k$();
              var tmp_0;
              if (tmp2_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = _get_phoneNumberUtil__i6ank8(this.this$0__1);
                tmp_0 = tmp0_safe_receiver_0 == null ? null : formatInternationalOrNull(tmp0_safe_receiver_0, tmp2_safe_receiver);
              }
              var nextValue = prevValue.copy$default_4g3db7_k$(this.person_1, tmp_0);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var tmp0_safe_receiver_1 = this.person_1;
              var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.get_person_i0c866_k$();
              var tmp2_elvis_lhs = tmp1_safe_receiver_0 == null ? null : personFullName(tmp1_safe_receiver_0);
              var tmp3_title = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              var tmp_1;
              if (!(this.person_1 == null)) {
                tmp_1 = Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$();
              } else {
                tmp_1 = Companion_getInstance_145().get_INDETERMINATE_a8koem_k$();
              }
              var tmp4_loadingState = tmp_1;
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, tmp4_loadingState, tmp3_title);
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).create_hzqmky_k$ = function (person, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.person_1 = person;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_hzqmky_k$((value == null ? true : value instanceof PersonAndDisplayDetail) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (person, $completion) {
      return i.invoke_ky9bci_k$(person, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).invoke_f29lti_k$ = function (it, $completion) {
    var tmp = this.create_vh5neu_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_4g3db7_k$(VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).create_vh5neu_k$ = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_f29lti_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.onClickEdit_d3bakd_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).invoke_nttttc_k$ = function (it, $completion) {
    var tmp = this.create_poynrg_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_nttttc_k$(p1 instanceof EditAndViewPermission ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_4g3db7_k$(VOID, VOID, VOID, VOID, this.it_1.get_hasEditPermission_ezcikq_k$());
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var tmp_0;
              if (this.it_1.get_hasEditPermission_ezcikq_k$()) {
                var tmp_1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_wol9w3_k$());
                var tmp_2 = FabIcon_EDIT_getInstance();
                tmp_0 = new FabUiState(true, tmp_1, tmp_2, PersonDetailViewModel$onClickEdit$ref(this.this$0__1));
              } else {
                tmp_0 = new FabUiState();
              }
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(tmp_0);
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).create_poynrg_k$ = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_poynrg_k$(value instanceof EditAndViewPermission ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_nttttc_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).invoke_vjw4fe_k$ = function (it, $completion) {
    var tmp = this.create_mjws2a_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_vjw4fe_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_4g3db7_k$(VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).create_mjws2a_k$ = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).create_wyq9v6_k$ = function (value, completion) {
    return this.create_mjws2a_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_vjw4fe_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.$entityFlow_1 = $entityFlow;
    this.$viewAndEditPermissionFlow_1 = $viewAndEditPermissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = combine(this.$entityFlow_1, this.$viewAndEditPermissionFlow_1, PersonDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda(this.$entityFlow_1, this.$viewAndEditPermissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    this.$hasManagePermissionsPermissionFlow_1 = $hasManagePermissionsPermissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.$hasManagePermissionsPermissionFlow_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1(this.$hasManagePermissionsPermissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda_2($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.$viewAndEditPermissionFlow_1 = $viewAndEditPermissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this.this$0__1, null);
            suspendResult = this.$viewAndEditPermissionFlow_1.collect_ve9kyv_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3(this.$viewAndEditPermissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda_4($viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeDb_bu92wd_k$().clazzEnrolmentDao_8oyet6_k$().findAllClazzesByPersonWithClazz_wuzdt4_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$());
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.$entityFlow_1 = $entityFlow;
    this.$viewAndEditPermissionFlow_1 = $viewAndEditPermissionFlow;
    this.this$0__1 = this$0;
    this.$hasManagePermissionsPermissionFlow_1 = $hasManagePermissionsPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_0(this.$entityFlow_1, this.$viewAndEditPermissionFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_2(this.$hasManagePermissionsPermissionFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_4(this.$viewAndEditPermissionFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_6(this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new PersonDetailViewModel$slambda$slambda(this.$this_launch_1, this.$entityFlow_1, this.$viewAndEditPermissionFlow_1, this.this$0__1, this.$hasManagePermissionsPermissionFlow_1, completion);
  };
  function PersonDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get__uiState__8e9jsd_41($this) {
    return $this._uiState_1;
  }
  function _get_personUid__aej956($this) {
    return $this.personUid_1;
  }
  function _get_phoneNumberUtil__i6ank8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.phoneNumberUtil$delegate_1;
    phoneNumberUtil$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_onClickPhoneNumUseCase__2tcaut($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.onClickPhoneNumUseCase$delegate_1;
    onClickPhoneNumUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_onClickSendSmsUseCase__plj4zm($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.onClickSendSmsUseCase$delegate_1;
    onClickSendSmsUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_onClickEmailUseCase__v8uzjh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.onClickEmailUseCase$delegate_1;
    onClickEmailUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function navigateToEditAccount($this) {
    $this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_227().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), $this.personUid_1.toString())));
  }
  function navigateToManageAccount($this) {
    var tmp = $this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_238().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.navigateToManageAccount.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), $this.personUid_1.toString());
    var tmp_1 = Companion_getInstance_238().get_PERSON_USERNAME_4x0xux_k$();
    var tmp0_safe_receiver = $this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    this_0.put_4fpzoq_k$(tmp_1, toString_1(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_username_ytz5i7_k$()));
    var tmp_2 = Companion_getInstance_238().get_PERSON_FULL_NAME_rkily2_k$();
    var tmp2_safe_receiver = $this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_person_i0c866_k$();
    this_0.put_4fpzoq_k$(tmp_2, toString_1(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.fullName_m0cs6y_k$()));
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  }
  function Companion_173() {
    Companion_instance_173 = this;
    this.DEST_NAME_1 = 'PersonDetailView';
  }
  protoOf(Companion_173).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_173;
  function Companion_getInstance_234() {
    if (Companion_instance_173 == null)
      new Companion_173();
    return Companion_instance_173;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_33(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_33).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function _init_$lambda_0($accountManager$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('accountManager', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $accountManager$delegate.get_value_j01efc_k$();
  }
  function PersonDetailViewModel$onClickEdit$ref_0($boundThis) {
    var l = function () {
      $boundThis.onClickEdit_d3bakd_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.entityFlow0__1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().findByUidWithDisplayDetailsFlow_997fuc_k$(this.this$0__1.get_entityUidArg_hgo6pe_k$(), this.this$0__1.get_activeUserPersonUid_1nlgnz_k$());
            this.viewAndEditPermissionFlow1__1 = shareIn(this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasEditAndViewPermissionForPersonAsFlow_hvefqa_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), this.this$0__1.get_entityUidArg_hgo6pe_k$()), this.this$0__1.get_viewModelScope_ryv1dz_k$(), Companion_getInstance_38().WhileSubscribed$default_3cgwv5_k$());
            this.hasManagePermissionsPermissionFlow2__1 = this.this$0__1.get_activeDb_bu92wd_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermissionAsFlow_ryvoyl_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_MANAGE_USER_PERMISSIONS_f0u3z5_k$());
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, PersonDetailViewModel$slambda$slambda_0(this.$this$launch_1, this.entityFlow0__1, this.viewAndEditPermissionFlow1__1, this.this$0__1, this.hasManagePermissionsPermissionFlow2__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_234();
    DetailViewModel.call(this, di, savedStateHandle, 'PersonDetailView');
    this._uiState_1 = MutableStateFlow(new PersonDetailUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.personUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(IPhoneNumberUtil), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.phoneNumberUtil$delegate_1 = InstanceOrNull(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, phoneNumberUtil$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.onClickPhoneNumUseCase$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, onClickPhoneNumUseCase$factory());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(OnClickSendSmsUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.onClickSendSmsUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, onClickSendSmsUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.onClickEmailUseCase$delegate_1 = Instance(this, tmp$ret$6, null).provideDelegate_o2qlc1_k$(this, onClickEmailUseCase$factory());
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var accountManager$delegate = Instance(this, tmp$ret$8, null).provideDelegate_o2qlc1_k$(null, getLocalDelegateReference('accountManager', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_145().get_INDETERMINATE_a8koem_k$();
        var tmp_9 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_wol9w3_k$());
        var tmp_10 = FabIcon_EDIT_getInstance();
        var tmp1_fabState = new FabUiState(false, tmp_9, tmp_10, PersonDetailViewModel$onClickEdit$ref_0(this));
        var nextValue = prevValue.copy$default_9ltzmx_k$(tmp1_fabState, tmp0_loadingState);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_isActiveUser = this.get_entityUidArg_hgo6pe_k$().equals(this.get_activeUserPersonUid_1nlgnz_k$());
        var tmp1_canSendSms = !(_get_onClickSendSmsUseCase__plj4zm(this) == null);
        var nextValue_0 = prevValue_0.copy$default_4g3db7_k$(VOID, VOID, tmp1_canSendSms, VOID, VOID, VOID, tmp0_isActiveUser);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_11 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_11, VOID, VOID, PersonDetailViewModel$slambda_0(this, null));
  }
  protoOf(PersonDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(PersonDetailViewModel).onClickEdit_d3bakd_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_235().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), this.personUid_1.toString())));
  };
  protoOf(PersonDetailViewModel).onClickClazz_8t7j78_k$ = function (clazz) {
    var tmp0_safe_receiver = clazz.get_clazz_ips3zj_k$();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_clazzUid_k8pnbz_k$();
    var tmp;
    if (tmp1_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var clazzUid = tmp;
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_165().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), clazzUid.toString())));
  };
  protoOf(PersonDetailViewModel).onClickCreateAccount_q1f6u0_k$ = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).onClickManageAccount_ko0fkf_k$ = function () {
    return navigateToManageAccount(this);
  };
  protoOf(PersonDetailViewModel).onClickChat_5gblzl_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_225().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$(), this.personUid_1.toString())));
  };
  protoOf(PersonDetailViewModel).onClickDial_iroaw9_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_phoneNum_i20sg1_k$();
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickDial.<anonymous>' call
      _get_onClickPhoneNumUseCase__2tcaut(this).invoke_nokysy_k$(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).onClickSms_5defc0_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_phoneNum_i20sg1_k$();
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickSms.<anonymous>' call
      var tmp0_safe_receiver_0 = _get_onClickSendSmsUseCase__plj4zm(this);
      if (tmp0_safe_receiver_0 == null)
        null;
      else {
        tmp0_safe_receiver_0.onClickSendSms_a342qm_k$(tmp2_safe_receiver);
      }
    }
  };
  protoOf(PersonDetailViewModel).onClickEmail_g6xzfh_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_emailAddr_rghqf0_k$();
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickEmail.<anonymous>' call
      _get_onClickEmailUseCase__v8uzjh(this).invoke_nokysy_k$(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).onClickPermissions_i10d85_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_248().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_PERSON_UID_8uotmw_k$(), this.get_entityUidArg_hgo6pe_k$().toString())));
  };
  protoOf(PersonDetailViewModel).onClickManageParentalConsent_96a947_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_parentJoin_o83rlv_k$();
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjUid_i688en_k$();
    var ppjUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
    if (!ppjUid.equals(new Long(0, 0))) {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_226().get_DEST_NAME_gmgk7z_k$(), mapOf([to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), ppjUid.toString()), to(Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), Companion_getInstance_156().get_CURRENT_DEST_3e1ddb_k$())]));
    }
  };
  function PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    person = person === VOID ? null : person;
    displayPhoneNum = displayPhoneNum === VOID ? null : displayPhoneNum;
    canSendSms = canSendSms === VOID ? false : canSendSms;
    clazzes = clazzes === VOID ? emptyList() : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? false : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? false : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? false : isActiveUser;
    this.person_1 = person;
    this.displayPhoneNum_1 = displayPhoneNum;
    this.canSendSms_1 = canSendSms;
    this.clazzes_1 = clazzes;
    this.hasChangePasswordPermission_1 = hasChangePasswordPermission;
    this.showPermissionButton_1 = showPermissionButton;
    this.isActiveUser_1 = isActiveUser;
  }
  protoOf(PersonDetailUiState).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(PersonDetailUiState).get_displayPhoneNum_178hcf_k$ = function () {
    return this.displayPhoneNum_1;
  };
  protoOf(PersonDetailUiState).get_canSendSms_ang9ti_k$ = function () {
    return this.canSendSms_1;
  };
  protoOf(PersonDetailUiState).get_clazzes_fdwm59_k$ = function () {
    return this.clazzes_1;
  };
  protoOf(PersonDetailUiState).get_hasChangePasswordPermission_1m50yd_k$ = function () {
    return this.hasChangePasswordPermission_1;
  };
  protoOf(PersonDetailUiState).get_showPermissionButton_x1s7uh_k$ = function () {
    return this.showPermissionButton_1;
  };
  protoOf(PersonDetailUiState).get_isActiveUser_3843k4_k$ = function () {
    return this.isActiveUser_1;
  };
  protoOf(PersonDetailUiState).get_dateOfBirthVisible_blh9fj_k$ = function () {
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    return isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_dateOfBirth_7hv8kx_k$());
  };
  protoOf(PersonDetailUiState).get_personGenderVisible_fy6jlf_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_gender_dqurbe_k$()) == null)) {
      var tmp2_safe_receiver = this.person_1.get_person_i0c866_k$();
      tmp = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_gender_dqurbe_k$()) === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).get_manageAccountVisible_8xqm4z_k$ = function () {
    var tmp;
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_username_ytz5i7_k$()) == null)) {
      tmp = this.hasChangePasswordPermission_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).get_showCreateAccountVisible_30p6ux_k$ = function () {
    var tmp;
    var tmp_0;
    if (!(this.person_1 == null)) {
      var tmp0_safe_receiver = this.person_1.get_person_i0c866_k$();
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_username_ytz5i7_k$()) == null;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.hasChangePasswordPermission_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).get_personAddressVisible_4pmyp0_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_personAddress_w7qqwm_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).get_phoneNumVisible_16f0oh_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_phoneNum_i20sg1_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).get_emailVisible_dj5gu7_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_emailAddr_rghqf0_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).get_personOrgIdVisible_holtf3_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_personOrgId_6lzn8h_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).get_personUsernameVisible_dkwhoi_k$ = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_username_ytz5i7_k$();
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).get_manageParentalConsentVisible_ovfa9n_k$ = function () {
    var tmp0_safe_receiver = this.person_1;
    return !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_parentJoin_o83rlv_k$()) == null);
  };
  protoOf(PersonDetailUiState).get_sendSmsVisible_gaw6u_k$ = function () {
    var tmp;
    if (this.canSendSms_1) {
      // Inline function 'kotlin.text.isNullOrBlank' call
      var tmp0_safe_receiver = this.person_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
      var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_phoneNum_i20sg1_k$();
      // Inline function 'kotlin.contracts.contract' call
      tmp = !(this_0 == null ? true : isBlank(this_0));
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).get_chatVisible_gtqjcf_k$ = function () {
    var tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.person_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_person_i0c866_k$();
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_username_ytz5i7_k$();
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_0 == null ? true : isBlank(this_0))) {
      tmp = !this.isActiveUser_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).component1_7eebsc_k$ = function () {
    return this.person_1;
  };
  protoOf(PersonDetailUiState).component2_7eebsb_k$ = function () {
    return this.displayPhoneNum_1;
  };
  protoOf(PersonDetailUiState).component3_7eebsa_k$ = function () {
    return this.canSendSms_1;
  };
  protoOf(PersonDetailUiState).component4_7eebs9_k$ = function () {
    return this.clazzes_1;
  };
  protoOf(PersonDetailUiState).component5_7eebs8_k$ = function () {
    return this.hasChangePasswordPermission_1;
  };
  protoOf(PersonDetailUiState).component6_7eebs7_k$ = function () {
    return this.showPermissionButton_1;
  };
  protoOf(PersonDetailUiState).component7_7eebs6_k$ = function () {
    return this.isActiveUser_1;
  };
  protoOf(PersonDetailUiState).copy_ne6bps_k$ = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    return new PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).copy$default_4g3db7_k$ = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser, $super) {
    person = person === VOID ? this.person_1 : person;
    displayPhoneNum = displayPhoneNum === VOID ? this.displayPhoneNum_1 : displayPhoneNum;
    canSendSms = canSendSms === VOID ? this.canSendSms_1 : canSendSms;
    clazzes = clazzes === VOID ? this.clazzes_1 : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? this.hasChangePasswordPermission_1 : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? this.showPermissionButton_1 : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? this.isActiveUser_1 : isActiveUser;
    return $super === VOID ? this.copy_ne6bps_k$(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) : $super.copy_ne6bps_k$.call(this, person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).toString = function () {
    return 'PersonDetailUiState(person=' + this.person_1 + ', displayPhoneNum=' + this.displayPhoneNum_1 + ', canSendSms=' + this.canSendSms_1 + ', clazzes=' + this.clazzes_1 + ', hasChangePasswordPermission=' + this.hasChangePasswordPermission_1 + ', showPermissionButton=' + this.showPermissionButton_1 + ', isActiveUser=' + this.isActiveUser_1 + ')';
  };
  protoOf(PersonDetailUiState).hashCode = function () {
    var result = this.person_1 == null ? 0 : this.person_1.hashCode();
    result = imul(result, 31) + (this.displayPhoneNum_1 == null ? 0 : getStringHashCode(this.displayPhoneNum_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.canSendSms_1) | 0;
    result = imul(result, 31) + hashCode(this.clazzes_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hasChangePasswordPermission_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showPermissionButton_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isActiveUser_1) | 0;
    return result;
  };
  protoOf(PersonDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonDetailUiState ? other : THROW_CCE();
    if (!equals(this.person_1, tmp0_other_with_cast.person_1))
      return false;
    if (!(this.displayPhoneNum_1 == tmp0_other_with_cast.displayPhoneNum_1))
      return false;
    if (!(this.canSendSms_1 === tmp0_other_with_cast.canSendSms_1))
      return false;
    if (!equals(this.clazzes_1, tmp0_other_with_cast.clazzes_1))
      return false;
    if (!(this.hasChangePasswordPermission_1 === tmp0_other_with_cast.hasChangePasswordPermission_1))
      return false;
    if (!(this.showPermissionButton_1 === tmp0_other_with_cast.showPermissionButton_1))
      return false;
    if (!(this.isActiveUser_1 === tmp0_other_with_cast.isActiveUser_1))
      return false;
    return true;
  };
  function phoneNumberUtil$factory() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function phoneNumberUtil$factory_0() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory_0() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory_0() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory_0() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda).invoke_7ynhv5_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_7ynhv5_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var this_0 = this.it_1.personDao_e3y77h_k$();
            var tmp_1;
            if (!_get_entityUid__ovkepw(this.this$0__1).equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tmp0_safe_receiver0__1 = tmp_1;
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.findByUidAsync_uxf6ac_k$(_get_entityUid__ovkepw(this.this$0__1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return this.WHEN_RESULT1__1;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_7ynhv5_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation) {
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).invoke_g2i2lq_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_g2i2lq_k$($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = new Person();
          var tmp0_safe_receiver = this.$savedStateHandle_1.get_6bo4tg_k$('DateOfBirth');
          var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
          this_0.set_dateOfBirth_1iysn5_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
          return this_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_1(this.$savedStateHandle_1, completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_2($savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.invoke_g2i2lq_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_6db433_k$(entityToDisplay);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).invoke_6zlnr_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_6zlnr_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.it_1.personPictureDao_jnjrvt_k$().findByPersonUidAsync_3igx1d_k$(_get_entityUid__ovkepw(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).create_9q7izm_k$ = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_6zlnr_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).invoke_o4mflw_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_o4mflw_k$($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).create_d196fn_k$ = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.invoke_o4mflw_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (personPicture) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_6db433_k$(VOID, VOID, VOID, personPicture);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda).invoke_sh4v7w_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_sh4v7w_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_7().serializer_9w0wvi_k$();
            var tmp_1 = PersonEditViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = PersonEditViewModel$slambda$slambda$slambda_2(this.$savedStateHandle_1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonEditViewModel$slambda$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(PersonEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_sh4v7w_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda_1).invoke_fye8ay_k$ = function ($this$async, $completion) {
    var tmp = this.create_rcuf4x_k$($this$async, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_fye8ay_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_59().serializer_9w0wvi_k$();
            var tmp_1 = listOf_0('picState');
            var tmp_2;
            if (!_get_entityUid__ovkepw(this.this$0__1).equals(new Long(0, 0))) {
              tmp_2 = PersonEditViewModel$slambda$slambda$slambda_4(this.this$0__1, null);
            } else {
              tmp_2 = null;
            }

            var tmp_3 = tmp_2;
            var tmp_4 = PersonEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, tmp_1, VOID, tmp_3, tmp_4, PersonEditViewModel$slambda$slambda$lambda_0(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            var tmp_5 = Companion_getInstance_158().get_INIT_PIC_URI_ye3my7_k$();
            var tmp1_elvis_lhs = this_0 == null ? null : this_0.get_personPictureUri_r3scj8_k$();
            setIfNoValueSetYet(this.$savedStateHandle_1, tmp_5, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            return this_0;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).create_rcuf4x_k$ = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$async_1 = $this$async;
    return i;
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.invoke_fye8ay_k$($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savePerson_1 = $savePerson;
    this.$consentToUpsert_1 = $consentToUpsert;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).invoke_1zes1c_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_1zes1c_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            if (this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
              this.set_state_rjd8d0_k$(4);
              suspendResult = _get_addNewPersonUseCase__raa2qa(this.this$0__1).invoke$default_4vs5qw_k$(this.$savePerson_1, this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), true, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().updateAsync_ideaps_k$(this.$savePerson_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.tmp0_safe_receiver1__1 = this.$consentToUpsert_1;
            if (this.tmp0_safe_receiver1__1 == null) {
              this.WHEN_RESULT2__1 = null;
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.this3__1 = this.tmp0_safe_receiver1__1;
              var tmp_1 = this;
              tmp_1.it4__1 = this.this3__1;
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personParentJoinDao_gvpro7_k$().upsertAsync_5b8ymo_k$(this.it4__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.WHEN_RESULT2__1 = this.this3__1;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.WHEN_RESULT0__1 = this.WHEN_RESULT2__1;
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 4:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            return this.WHEN_RESULT0__1;
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$savePerson_1, this.$consentToUpsert_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$onClickSave$slambda$slambda_0(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_1zes1c_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_42($this) {
    return $this._uiState_1;
  }
  function _get_registrationModeFlags__xjvnay($this) {
    return $this.registrationModeFlags_1;
  }
  function _get_apiUrlConfig__mldllg_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_10();
    return this_0.get_value_j01efc_k$();
  }
  function _get_entityUid__ovkepw($this) {
    var tmp0_safe_receiver = $this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_serverUrl__j7eug5_0($this) {
    return $this.serverUrl_1;
  }
  function _get_nextDestination__tjiqwa_1($this) {
    return $this.nextDestination_1;
  }
  function _get_phoneNumValidatorUseCase__4guu7i_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.phoneNumValidatorUseCase$delegate_1;
    phoneNumValidatorUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_validateEmailUseCase__i0n3za_0($this) {
    return $this.validateEmailUseCase_1;
  }
  function _get_validateUsernameUseCase__yg4coq_1($this) {
    return $this.validateUsernameUseCase_1;
  }
  function _get_filterUsernameUseCase__xlwzqg_1($this) {
    return $this.filterUsernameUseCase_1;
  }
  function _get_genderConfig__kyr0zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.genderConfig$delegate_1;
    genderConfig$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_enqueueSavePictureUseCase__rl1s31_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.enqueueSavePictureUseCase$delegate_1;
    enqueueSavePictureUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_addNewPersonUseCase__raa2qa($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.addNewPersonUseCase$delegate_1;
    addNewPersonUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_dontSetCurrentSession__mobbul_2($this) {
    return $this.dontSetCurrentSession_1;
  }
  function hasErrors_4(_this__u8e3s4, $this) {
    return ((((((((!(_this__u8e3s4.usernameError_1 == null) ? true : !(_this__u8e3s4.passwordError_1 == null)) ? true : !(_this__u8e3s4.confirmError_1 == null)) ? true : !(_this__u8e3s4.dateOfBirthError_1 == null)) ? true : !(_this__u8e3s4.firstNameError_1 == null)) ? true : !(_this__u8e3s4.lastNameError_1 == null)) ? true : !(_this__u8e3s4.genderError_1 == null)) ? true : !(_this__u8e3s4.emailError_1 == null)) ? true : !(_this__u8e3s4.parentContactError_1 == null)) ? true : !(_this__u8e3s4.phoneNumError_1 == null);
  }
  function Companion_174() {
    Companion_instance_174 = this;
    this.STATE_KEY_PICTURE_1 = 'picState';
    this.DEST_NAME_1 = 'PersonEditView';
    this.DEST_NAME_REGISTER_1 = 'Register';
    this.ALL_DEST_NAMES_1 = listOf(['PersonEditView', 'Register']);
    this.ARG_REGISTRATION_MODE_1 = 'RegMode';
    this.ARG_DATE_OF_BIRTH_1 = 'DateOfBirth';
    this.REGISTER_VIA_LINK_1 = 'RegViaLink';
    this.REGISTER_MODE_NONE_1 = 0;
    this.REGISTER_MODE_ENABLED_1 = 1;
    this.REGISTER_MODE_MINOR_1 = 2;
    this.REGISTRATION_ARGS_TO_PASS_1 = listOf([Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), Companion_getInstance_154().get_ARG_SHOW_ACCEPT_BUTTON_owychz_k$(), Companion_getInstance_156().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$(), Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), 'RegViaLink', 'DateOfBirth', 'RegMode', Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$()]);
    this.KEY_INIT_DATE_OF_BIRTH_1 = 'initDob';
  }
  protoOf(Companion_174).get_STATE_KEY_PICTURE_txsh9j_k$ = function () {
    return this.STATE_KEY_PICTURE_1;
  };
  protoOf(Companion_174).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_174).get_DEST_NAME_REGISTER_49cww3_k$ = function () {
    return this.DEST_NAME_REGISTER_1;
  };
  protoOf(Companion_174).get_ALL_DEST_NAMES_l2cmjy_k$ = function () {
    return this.ALL_DEST_NAMES_1;
  };
  protoOf(Companion_174).get_ARG_REGISTRATION_MODE_eedyt3_k$ = function () {
    return this.ARG_REGISTRATION_MODE_1;
  };
  protoOf(Companion_174).get_ARG_DATE_OF_BIRTH_ina7cm_k$ = function () {
    return this.ARG_DATE_OF_BIRTH_1;
  };
  protoOf(Companion_174).get_REGISTER_VIA_LINK_hm01su_k$ = function () {
    return this.REGISTER_VIA_LINK_1;
  };
  protoOf(Companion_174).get_REGISTER_MODE_NONE_phrt4x_k$ = function () {
    return this.REGISTER_MODE_NONE_1;
  };
  protoOf(Companion_174).get_REGISTER_MODE_ENABLED_t25ym0_k$ = function () {
    return this.REGISTER_MODE_ENABLED_1;
  };
  protoOf(Companion_174).get_REGISTER_MODE_MINOR_8y1vak_k$ = function () {
    return this.REGISTER_MODE_MINOR_1;
  };
  protoOf(Companion_174).get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$ = function () {
    return this.REGISTRATION_ARGS_TO_PASS_1;
  };
  protoOf(Companion_174).get_KEY_INIT_DATE_OF_BIRTH_jd24vy_k$ = function () {
    return this.KEY_INIT_DATE_OF_BIRTH_1;
  };
  var Companion_instance_174;
  function Companion_getInstance_235() {
    if (Companion_instance_174 == null)
      new Companion_174();
    return Companion_instance_174;
  }
  function PersonEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda).invoke_pclm39_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            if (!(this.this$0__1.registrationModeFlags_1 === 0) ? this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0)) : false) {
              this.WHEN_RESULT0__1 = true;
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0)) ? this.this$0__1.get_activeUserPersonUid_1nlgnz_k$().equals(this.this$0__1.get_entityUidArg_hgo6pe_k$()) : false) {
                this.WHEN_RESULT0__1 = true;
                this.set_state_rjd8d0_k$(4);
                continue $sm;
              } else {
                if (this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0))) {
                  this.set_state_rjd8d0_k$(2);
                  suspendResult = this.db_1.systemPermissionDao_fl20r8_k$().personHasSystemPermission_tdum2r_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_ADD_PERSON_79ed2c_k$(), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.set_state_rjd8d0_k$(1);
                  suspendResult = this.db_1.systemPermissionDao_fl20r8_k$().personHasSystemPermission_tdum2r_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_EDIT_ALL_PERSONS_uw4lis_k$(), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 1:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.WHEN_RESULT0__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            return this.WHEN_RESULT0__1;
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new PersonEditViewModel$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(PersonEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_pclm39_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_6db433_k$(VOID, VOID, VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = async(this.$this$launchIfHasPermission_1, VOID, VOID, PersonEditViewModel$slambda$slambda_0(this.this$0__1, this.$savedStateHandle_1, null));
            suspendResult = awaitAll([tmp_0, async(this.$this$launchIfHasPermission_1, VOID, VOID, PersonEditViewModel$slambda$slambda_2(this.this$0__1, this.$savedStateHandle_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_1;
                if (hasFlag(this.this$0__1.registrationModeFlags_1, 1)) {
                  tmp_1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_register_rt8ne4_k$());
                } else {
                  tmp_1 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                }
                var tmp_2 = tmp_1;
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_2, VOID, PersonEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_3;
            if (hasFlag(this.this$0__1.registrationModeFlags_1, 2)) {
              tmp_3 = new PersonParentJoin();
            } else {
              tmp_3 = null;
            }

            var personParentJoin = tmp_3;
            l$ret$3: do {
              var this_1 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var nextValue_0 = prevValue_0.copy$default_6db433_k$(VOID, VOID, VOID, VOID, true, personParentJoin);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new PersonEditViewModel$slambda_1(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(PersonEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onEntityChanged$lambda(this$0, $entity) {
    return function ($this$shallowCopy) {
      var tmp0_elvis_lhs = $entity.get_username_ytz5i7_k$();
      $this$shallowCopy.set_username_tgnlmk_k$(this$0.filterUsernameUseCase_1.invoke_h1q7yg_k$(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, ''));
      return Unit_getInstance();
    };
  }
  function PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.this$0__1 = this$0;
    this.$personPicture_1 = $personPicture;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.setJson_jnpl42_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'picState', Companion_getInstance_59().serializer_9w0wvi_k$(), this.$personPicture_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this.this$0__1, this.$personPicture_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$onPersonPictureChanged$slambda_0(this$0, $personPicture, resultContinuation) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$lambda($this$shallowCopy) {
    var tmp0_safe_receiver = $this$shallowCopy.get_phoneNum_i20sg1_k$();
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var tmp1_safe_receiver = tmp;
    $this$shallowCopy.set_phoneNum_jo9xeq_k$(tmp1_safe_receiver == null ? null : replace(tmp1_safe_receiver, ' ', ''));
    var tmp2_safe_receiver = $this$shallowCopy.get_emailAddr_rghqf0_k$();
    var tmp_0;
    if (tmp2_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(tmp2_safe_receiver) ? tmp2_safe_receiver : THROW_CCE()));
    }
    $this$shallowCopy.set_emailAddr_n0lw07_k$(tmp_0);
    return Unit_getInstance();
  }
  function PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    this.$isRegistrationMode_1 = $isRegistrationMode;
    this.this$0__1 = this$0;
    this.$savePerson_1 = $savePerson;
    this.$requiredFieldMessage_1 = $requiredFieldMessage;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(14);
            if (this.$isRegistrationMode_1) {
              this.parentJoin0__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().approvalPersonParentJoin_1;
              this.passwordVal1__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().password_1;
              var tmp_0 = this;
              var tmp$ret$0;
              l$ret$1: do {
                var this_0 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_0.get_value_j01efc_k$();
                  var tmp_1;
                  var this_1 = this.$savePerson_1.get_username_ytz5i7_k$();
                  if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
                    tmp_1 = this.$requiredFieldMessage_1;
                  } else {
                    tmp_1 = null;
                  }
                  var tmp3_usernameError = tmp_1;
                  var tmp_2;
                  var this_2 = this.passwordVal1__1;
                  if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
                    tmp_2 = this.$requiredFieldMessage_1;
                  } else {
                    tmp_2 = null;
                  }
                  var tmp4_passwordError = tmp_2;
                  var tmp_3;
                  if (!hasFlag(this.this$0__1.registrationModeFlags_1, 2)) {
                    tmp_3 = null;
                  } else {
                    var tmp0_safe_receiver = this.parentJoin0__1;
                    var this_3 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_ppjEmail_9kn8bp_k$();
                    if (this_3 == null ? true : charSequenceLength(this_3) === 0) {
                      tmp_3 = this.$requiredFieldMessage_1;
                    } else {
                      var tmp1_safe_receiver = this.parentJoin0__1;
                      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_ppjEmail_9kn8bp_k$();
                      var tmp_4;
                      if (tmp2_safe_receiver == null) {
                        tmp_4 = null;
                      } else {
                        tmp_4 = this.this$0__1.validateEmailUseCase_1.invoke_lt562m_k$(tmp2_safe_receiver);
                      }
                      if (tmp_4 == null) {
                        tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_email_f9p39x_k$());
                      } else {
                        tmp_3 = null;
                      }
                    }
                  }
                  var tmp5_parentContactError = tmp_3;
                  var tmp_5;
                  if (this.$savePerson_1.get_dateOfBirth_7hv8kx_k$().equals(new Long(0, 0))) {
                    tmp_5 = this.$requiredFieldMessage_1;
                  } else {
                    tmp_5 = null;
                  }
                  var tmp6_dateOfBirthError = tmp_5;
                  var nextValue = prevValue.copy$default_6db433_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_usernameError, VOID, tmp4_passwordError, VOID, VOID, tmp6_dateOfBirthError, tmp5_parentContactError);
                  if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    tmp$ret$0 = nextValue;
                    break l$ret$1;
                  }
                }
              }
               while (false);
              tmp_0.checkedUiState2__1 = tmp$ret$0;
              if (hasErrors_4(this.checkedUiState2__1, this.this$0__1) ? true : this.passwordVal1__1 == null) {
                this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
                l$ret$3: do {
                  var this_4 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue_0 = this_4.get_value_j01efc_k$();
                    var nextValue_0 = prevValue_0.copy$default_6db433_k$(VOID, VOID, VOID, VOID, true);
                    if (this_4.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                      break l$ret$3;
                    }
                  }
                }
                 while (false);
                return Unit_getInstance();
              }
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            } else {
              var tmp_6;
              if (!this.this$0__1.get_entityUidArg_hgo6pe_k$().equals(new Long(0, 0)) ? isDateOfBirthAMinor(Companion_getInstance().fromEpochMilliseconds_e2resj_k$(this.$savePerson_1.get_dateOfBirth_7hv8kx_k$())) : false) {
                var tmp_7 = Companion_getInstance();
                var tmp0_safe_receiver_0 = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$('initDob');
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
                tmp_6 = !isDateOfBirthAMinor(tmp_7.fromEpochMilliseconds_e2resj_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
              } else {
                tmp_6 = false;
              }
              if (tmp_6) {
                this.set_state_rjd8d0_k$(1);
                suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personParentJoinDao_gvpro7_k$().isMinorApproved_1fo018_k$(this.$savePerson_1.get_personUid_mmhd76_k$(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.WHEN_RESULT5__1 = false;
                this.set_state_rjd8d0_k$(2);
                continue $sm;
              }
            }

          case 1:
            this.ARGUMENT6__1 = suspendResult;
            this.WHEN_RESULT5__1 = !this.ARGUMENT6__1;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            if (this.WHEN_RESULT5__1) {
              var tmp_8 = this;
              var this_5 = new PersonParentJoin();
              this_5.set_ppjMinorPersonUid_aovzpn_k$(this.$savePerson_1.get_personUid_mmhd76_k$());
              this_5.set_ppjParentPersonUid_h015fq_k$(this.this$0__1.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$());
              this_5.set_ppjStatus_hiah55_k$(Companion_getInstance_0().get_STATUS_APPROVED_l4p6j_k$());
              this_5.set_ppjApprovalTiemstamp_wbkei0_k$(systemTimeInMillis());
              tmp_8.WHEN_RESULT4__1 = this_5;
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              var tmp_9 = this;
              tmp_9.WHEN_RESULT4__1 = null;
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 3:
            this.consentToUpsert7__1 = this.WHEN_RESULT4__1;
            this.set_state_rjd8d0_k$(4);
            var tmp_10 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_10, VOID, PersonEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.$savePerson_1, this.consentToUpsert7__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.personPictureVal8__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().personPicture_1;
            if (!(this.personPictureVal8__1 == null)) {
              this.personPictureVal8__1.set_personPictureUid_dypqo6_k$(this.$savePerson_1.get_personUid_mmhd76_k$());
              this.personPictureVal8__1.set_personPictureLct_5leypf_k$(systemTimeInMillis());
              var tmp_11 = this;
              var tmp2_elvis_lhs = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_158().get_INIT_PIC_URI_ye3my7_k$());
              tmp_11.initPictureUri9__1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              this.personPictureUriVal10__1 = this.personPictureVal8__1.get_personPictureUri_r3scj8_k$();
              if (!(this.initPictureUri9__1 === this.personPictureUriVal10__1)) {
                this.set_state_rjd8d0_k$(5);
                suspendResult = this.this$0__1.get_activeDb_bu92wd_k$().personPictureDao_jnjrvt_k$().upsert_3blhac_k$(this.personPictureVal8__1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(7);
                continue $sm;
              }
            } else {
              this.set_state_rjd8d0_k$(8);
              continue $sm;
            }

          case 5:
            this.set_state_rjd8d0_k$(6);
            suspendResult = _get_enqueueSavePictureUseCase__rl1s31_1(this.this$0__1).invoke_xmwesk_k$(this.$savePerson_1.get_personUid_mmhd76_k$(), Companion_getInstance_59().get_TABLE_ID_xo2mej_k$(), this.personPictureUriVal10__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            this.set_state_rjd8d0_k$(8);
            continue $sm;
          case 8:
            this.goToOnPersonSelected11__1 = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(PersonViewModelConstants_getInstance().get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$());
            if (!(this.goToOnPersonSelected11__1 == null)) {
              var args = plus_0(UMFileUtil_getInstance().parseURLQueryString(this.goToOnPersonSelected11__1), mapOf_0(to(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$(), this.$savePerson_1.get_personUid_mmhd76_k$().toString())));
              this.this$0__1.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(substringBefore(this.goToOnPersonSelected11__1, '?'), args);
            } else {
              this.this$0__1.finishWithResult$default_p2obzb_k$(Companion_getInstance_234().get_DEST_NAME_gmgk7z_k$(), this.$savePerson_1.get_personUid_mmhd76_k$(), this.$savePerson_1);
            }

            this.set_state_rjd8d0_k$(17);
            continue $sm;
          case 9:
            this.set_state_rjd8d0_k$(10);
            continue $sm;
          case 10:
            this.set_exceptionState_fex74n_k$(13);
            this.set_exceptionState_fex74n_k$(12);
            this.set_state_rjd8d0_k$(11);
            suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().register_271sla_k$(this.$savePerson_1, this.passwordVal1__1, this.this$0__1.serverUrl_1, new AccountRegisterOptions(!hasFlag(this.this$0__1.registrationModeFlags_1, 2) ? !this.this$0__1.dontSetCurrentSession_1 : false, this.parentJoin0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            var registeredPerson = suspendResult;
            var tmp_12 = this;
            var tmp_13;
            if (hasFlag(this.this$0__1.registrationModeFlags_1, 2)) {
              var goOptions = new UstadGoOptions(Companion_getInstance_240().get_DEST_NAME_gmgk7z_k$(), true);
              var this_6 = LinkedHashMap_init_$Create$_0();
              var key = Companion_getInstance_241().get_ARG_USERNAME_s7r9q0_k$();
              var tmp0_elvis_lhs = this.$savePerson_1.get_username_ytz5i7_k$();
              var value = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              this_6.put_4fpzoq_k$(key, value);
              var key_0 = Companion_getInstance_241().get_ARG_PARENT_CONTACT_f8pyar_k$();
              var tmp1_safe_receiver_0 = this.parentJoin0__1;
              var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.get_ppjEmail_9kn8bp_k$();
              var value_0 = tmp2_elvis_lhs_0 == null ? '' : tmp2_elvis_lhs_0;
              this_6.put_4fpzoq_k$(key_0, value_0);
              var key_1 = Companion_getInstance_241().get_ARG_PASSWORD_3ozvoz_k$();
              var tmp3_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().password_1;
              var value_1 = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
              this_6.put_4fpzoq_k$(key_1, value_1);
              putFromSavedStateIfPresent(this_6, this.this$0__1.get_savedStateHandle_xtsxet_k$(), Companion_getInstance_156().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$());
              var args_0 = this_6;
              this.this$0__1.get_navController_qibdoq_k$().navigate_6urlkw_k$(Companion_getInstance_241().get_DEST_NAME_gmgk7z_k$(), args_0, goOptions);
              tmp_13 = Unit_getInstance();
            } else {
              this.this$0__1.navigateToViewUri_qtkrj7_k$(this.this$0__1.get_navController_qibdoq_k$(), appendSelectedAccount(this.this$0__1.nextDestination_1, registeredPerson.get_personUid_mmhd76_k$(), new LearningSpace(this.this$0__1.serverUrl_1)), new UstadGoOptions(VOID, VOID, true));
              tmp_13 = Unit_getInstance();
            }

            tmp_12.tmp$ret$43__1 = tmp_13;
            this.set_exceptionState_fex74n_k$(14);
            this.set_state_rjd8d0_k$(16);
            continue $sm;
          case 12:
            this.set_exceptionState_fex74n_k$(13);
            var tmp_14 = this.get_exception_x0n6w6_k$();
            if (tmp_14 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              if (e instanceof IllegalStateException) {
                l$ret$7: do {
                  var this_7 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue_1 = this_7.get_value_j01efc_k$();
                    var nextValue_1 = prevValue_1.copy$default_6db433_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_person_exists_nw92g3_k$()));
                    if (this_7.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                      break l$ret$7;
                    }
                  }
                }
                 while (false);
              } else {
                this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_login_network_error_b1pwy0_k$())));
              }
              this.tmp$ret$812__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(14);
              this.set_state_rjd8d0_k$(15);
              var tmp_15 = this;
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 13:
            this.set_exceptionState_fex74n_k$(14);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$11: do {
              var this_8 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_2 = this_8.get_value_j01efc_k$();
                var nextValue_2 = prevValue_2.copy$default_6db433_k$(VOID, VOID, VOID, VOID, true);
                if (this_8.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            throw t;
          case 14:
            throw this.get_exception_x0n6w6_k$();
          case 15:
            this.set_exceptionState_fex74n_k$(14);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$13: do {
              var this_9 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_3 = this_9.get_value_j01efc_k$();
                var nextValue_3 = prevValue_3.copy$default_6db433_k$(VOID, VOID, VOID, VOID, true);
                if (this_9.compareAndSet_l3595a_k$(prevValue_3, nextValue_3)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 16:
            this.set_exceptionState_fex74n_k$(14);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$15: do {
              var this_10 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue_4 = this_10.get_value_j01efc_k$();
                var nextValue_4 = prevValue_4.copy$default_6db433_k$(VOID, VOID, VOID, VOID, true);
                if (this_10.compareAndSet_l3595a_k$(prevValue_4, nextValue_4)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(17);
            continue $sm;
          case 17:
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 14) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda(this.$isRegistrationMode_1, this.this$0__1, this.$savePerson_1, this.$requiredFieldMessage_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonEditViewModel$onClickSave$slambda_0($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_235();
    destName = destName === VOID ? 'PersonEditView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this._uiState_1 = MutableStateFlow(new PersonEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$('RegMode');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp.registrationModeFlags_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_9());
    var tmp_2 = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$());
    var tmp1_elvis_lhs_0 = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg_4(this).get_presetLearningSpaceUrl_nzw9pt_k$() : tmp0_elvis_lhs;
    tmp_2.serverUrl_1 = tmp1_elvis_lhs_0 == null ? 'http://localhost' : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
    tmp_3.nextDestination_1 = tmp0_elvis_lhs_0 == null ? this.get_systemImpl_9jowp4_k$().getDefaultFirstDest_7opaxz_k$() : tmp0_elvis_lhs_0;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.phoneNumValidatorUseCase$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, phoneNumValidatorUseCase$factory());
    this.validateEmailUseCase_1 = new ValidateEmailUseCase();
    this.validateUsernameUseCase_1 = new ValidateUsernameUseCase_0();
    this.filterUsernameUseCase_1 = new FilterUsernameUseCase();
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.genderConfig$delegate_1 = Instance(this, tmp$ret$4, null).provideDelegate_o2qlc1_k$(this, genderConfig$factory_1());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_9 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.invoke_4wgfc3_k$(tmp$ret$6, context);
    var this_0 = On(this, tmp$ret$7, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_8.enqueueSavePictureUseCase$delegate_1 = Instance(this_0, tmp$ret$9, null).provideDelegate_o2qlc1_k$(this, enqueueSavePictureUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$11 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.addNewPersonUseCase$delegate_1 = Instance(this_1, tmp$ret$11, null).provideDelegate_o2qlc1_k$(this, addNewPersonUseCase$factory());
    var tmp_14 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$());
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    tmp_14.dontSetCurrentSession_1 = tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1;
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp_15;
    if (hasFlag(this.registrationModeFlags_1, 1)) {
      tmp_15 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_my_profile_k9fvkv_k$());
    } else {
      tmp_15 = _get_entityUid__ovkepw(this).equals(new Long(0, 0)) ? this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_add_a_new_person_23g99j_k$()) : this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_person_p4rnlr_k$());
    }
    var title = tmp_15;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var tmp0_navigationVisible = !hasFlag(this.registrationModeFlags_1, 1);
        var nextValue = new AppUiState(VOID, VOID, title, tmp0_navigationVisible, true);
        if (this_2.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_3.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_6db433_k$(VOID, VOID, _get_genderConfig__kyr0zc_0(this).get_genderMessageIdsAndUnset_iid7il_k$(), VOID, VOID, VOID, this.registrationModeFlags_1);
        if (this_3.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_16 = PersonEditViewModel$slambda_0(this, null);
    var tmp_17 = PersonEditViewModel$lambda(this);
    this.launchIfHasPermission_rjt2z5_k$(tmp_16, true, tmp_17, PersonEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(PersonEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(PersonEditViewModel).onEntityChanged_p4w3en_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onEntityChanged.<anonymous>' call
        var tmp;
        var tmp_0 = entity == null ? null : entity.get_username_ytz5i7_k$();
        var tmp1_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.get_username_ytz5i7_k$()))) {
          var tmp_1;
          if (entity == null) {
            tmp_1 = null;
          } else {
            tmp_1 = shallowCopy(entity, PersonEditViewModel$onEntityChanged$lambda(this, entity));
          }
          tmp = tmp_1;
        } else {
          tmp = entity;
        }
        var tmp15_person = tmp;
        var tmp7_safe_receiver = prevValue.person_1;
        var tmp_2 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.get_gender_dqurbe_k$();
        var tmp16_genderError = this.updateErrorMessageOnChange_silrgy_k$(tmp_2, entity == null ? null : entity.get_gender_dqurbe_k$(), prevValue.genderError_1);
        var tmp9_safe_receiver = prevValue.person_1;
        var tmp_3 = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.get_firstNames_n3o3y7_k$();
        var tmp17_firstNameError = this.updateErrorMessageOnChange_silrgy_k$(tmp_3, entity == null ? null : entity.get_firstNames_n3o3y7_k$(), prevValue.firstNameError_1);
        var tmp11_safe_receiver = prevValue.person_1;
        var tmp_4 = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.get_lastName_f360wa_k$();
        var tmp18_lastNameError = this.updateErrorMessageOnChange_silrgy_k$(tmp_4, entity == null ? null : entity.get_lastName_f360wa_k$(), prevValue.lastNameError_1);
        var tmp13_safe_receiver = prevValue.person_1;
        var tmp_5 = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.get_phoneNum_i20sg1_k$();
        var tmp19_phoneNumError = this.updateErrorMessageOnChange_silrgy_k$(tmp_5, entity == null ? null : entity.get_phoneNum_i20sg1_k$(), prevValue.phoneNumError_1);
        var tmp5_safe_receiver = prevValue.person_1;
        var tmp_6 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.get_emailAddr_rghqf0_k$();
        var tmp20_emailError = this.updateErrorMessageOnChange_silrgy_k$(tmp_6, entity == null ? null : entity.get_emailAddr_rghqf0_k$(), prevValue.emailError_1);
        var tmp3_safe_receiver = prevValue.person_1;
        var tmp_7 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.get_username_ytz5i7_k$();
        var tmp21_usernameError = this.updateErrorMessageOnChange_silrgy_k$(tmp_7, entity == null ? null : entity.get_username_ytz5i7_k$(), prevValue.usernameError_1);
        var nextValue = prevValue.copy$default_6db433_k$(tmp15_person, VOID, VOID, VOID, VOID, VOID, VOID, tmp21_usernameError, VOID, VOID, tmp20_emailError, VOID, VOID, VOID, tmp16_genderError, tmp17_firstNameError, tmp18_lastNameError, tmp19_phoneNumError);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_7().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp_8 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_8, VOID, VOID, PersonEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(PersonEditViewModel).onPasswordChanged_uha1k3_k$ = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_6db433_k$(VOID, password, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).onPersonPictureChanged_9evh6b_k$ = function (pictureUri) {
    // Inline function 'kotlin.apply' call
    var this_0 = new PersonPicture();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().personPicture_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personPictureUid_r3scr4_k$();
    this_0.set_personPictureUid_dypqo6_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
    this_0.set_personPictureUri_20k97t_k$(pictureUri);
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_6db433_k$(VOID, VOID, VOID, personPicture);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, PersonEditViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(PersonEditViewModel).onApprovalPersonParentJoinChanged_m4xgqs_k$ = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onApprovalPersonParentJoinChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_6db433_k$(VOID, VOID, VOID, VOID, VOID, personParentJoin);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).onNationalPhoneNumSetChanged_6v2062_k$ = function (phoneNumSet) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this._uiState_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
    if (!(this_0.get_value_j01efc_k$().nationalPhoneNumSet_1 === phoneNumSet)) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
          var nextValue = prevValue.copy$default_6db433_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, phoneNumSet);
          if (tmp0_safe_receiver.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(PersonEditViewModel).onClickSave_ncak3a_k$ = function () {
    if (!this._uiState_1.get_value_j01efc_k$().fieldsEnabled_1)
      return Unit_getInstance();
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.copy$default_6db433_k$(VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue_0 = prevValue_0.copy$default_6db433_k$(VOID, VOID, VOID, VOID, false);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy(tmp0_safe_receiver, PersonEditViewModel$onClickSave$lambda);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var savePerson = tmp_0;
    var requiredFieldMessage = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
    var currentTime = systemTimeInMillis();
    var isRegistrationMode = hasFlag(this.registrationModeFlags_1, 1);
    var tmp2_safe_receiver = savePerson.get_emailAddr_rghqf0_k$();
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
      tmp_1 = this.validateEmailUseCase_1.invoke_lt562m_k$(tmp2_safe_receiver);
    }
    var validatedEmailAddr = tmp_1;
    var tmp_2;
    if (isRegistrationMode) {
      var tmp3_elvis_lhs = savePerson.get_username_ytz5i7_k$();
      tmp_2 = this.validateUsernameUseCase_1.invoke_lt562m_k$(tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs);
    } else {
      tmp_2 = null;
    }
    var validationResult = tmp_2;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this._uiState_1;
      while (true) {
        var prevValue_1 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var tmp_3;
        if (isRegistrationMode) {
          var tmp_4;
          if ((validationResult == null ? null : validationResult.get_errorMessage_ofxtm0_k$()) == null) {
            tmp_4 = null;
          } else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>.<anonymous>' call
            tmp_4 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_xocxse_k$());
          }
          tmp_3 = tmp_4;
        } else {
          tmp_3 = null;
        }
        var tmp3_usernameError = tmp_3;
        var tmp_5;
        var tmp_6;
        if (isRegistrationMode) {
          // Inline function 'kotlin.text.isNullOrBlank' call
          var this_3 = savePerson.get_username_ytz5i7_k$();
          // Inline function 'kotlin.contracts.contract' call
          tmp_6 = this_3 == null ? true : isBlank(this_3);
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
        } else {
          tmp_5 = null;
        }
        var tmp4_passwordError = tmp_5;
        var tmp_7;
        if (savePerson.get_dateOfBirth_7hv8kx_k$().compareTo_9jj042_k$(currentTime) > 0) {
          tmp_7 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_xocxse_k$());
        } else if (isRegistrationMode ? !isDateSet(savePerson.get_dateOfBirth_7hv8kx_k$()) : false) {
          tmp_7 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
        } else {
          tmp_7 = null;
        }
        var tmp5_dateOfBirthError = tmp_7;
        var tmp_8;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_4 = savePerson.get_firstNames_n3o3y7_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_4 == null ? true : charSequenceLength(this_4) === 0) {
          tmp_8 = requiredFieldMessage;
        } else {
          tmp_8 = null;
        }
        var tmp6_firstNameError = tmp_8;
        var tmp_9;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_5 = savePerson.get_lastName_f360wa_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_5 == null ? true : charSequenceLength(this_5) === 0) {
          tmp_9 = requiredFieldMessage;
        } else {
          tmp_9 = null;
        }
        var tmp7_lastNameError = tmp_9;
        var tmp8_genderError = savePerson.get_gender_dqurbe_k$() === Companion_getInstance_7().get_GENDER_UNSET_ij51gs_k$() ? requiredFieldMessage : null;
        var tmp_10;
        var tmp_11;
        if (this._uiState_1.get_value_j01efc_k$().nationalPhoneNumSet_1) {
          var tmp2_safe_receiver_0 = savePerson.get_phoneNum_i20sg1_k$();
          var tmp_12;
          if (tmp2_safe_receiver_0 == null) {
            tmp_12 = null;
          } else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>.<anonymous>' call
            tmp_12 = _get_phoneNumValidatorUseCase__4guu7i_0(this).isValid_lc9qh4_k$(tmp2_safe_receiver_0);
          }
          tmp_11 = !(tmp_12 === true);
        } else {
          tmp_11 = false;
        }
        if (tmp_11) {
          tmp_10 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_xocxse_k$());
        } else {
          tmp_10 = null;
        }
        var tmp9_phoneNumError = tmp_10;
        var tmp_13;
        var tmp_14;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_6 = savePerson.get_emailAddr_rghqf0_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (!(this_6 == null ? true : isBlank(this_6))) {
          tmp_14 = validatedEmailAddr == null;
        } else {
          tmp_14 = false;
        }
        if (tmp_14) {
          tmp_13 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_xocxse_k$());
        } else {
          tmp_13 = null;
        }
        var tmp10_emailError = tmp_13;
        var nextValue_1 = prevValue_1.copy$default_6db433_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_usernameError, VOID, tmp4_passwordError, tmp10_emailError, null, tmp5_dateOfBirthError, null, tmp8_genderError, tmp6_firstNameError, tmp7_lastNameError, tmp9_phoneNumError);
        if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (hasErrors_4(this._uiState_1.get_value_j01efc_k$(), this)) {
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_7 = this._uiState_1;
        while (true) {
          var prevValue_2 = this_7.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.copy$default_6db433_k$(VOID, VOID, VOID, VOID, true);
          if (this_7.compareAndSet_l3595a_k$(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
      return Unit_getInstance();
    }
    var tmp_15 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_15, VOID, VOID, PersonEditViewModel$onClickSave$slambda_0(isRegistrationMode, this, savePerson, requiredFieldMessage, null));
  };
  function PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance().get_GENDER_MESSAGE_IDS_AND_UNSET_762xdf_k$() : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? null : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? null : passwordConfirmedError;
    passwordError = passwordError === VOID ? null : passwordError;
    emailError = emailError === VOID ? null : emailError;
    confirmError = confirmError === VOID ? null : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    parentContactError = parentContactError === VOID ? null : parentContactError;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    phoneNumError = phoneNumError === VOID ? null : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? false : nationalPhoneNumSet;
    this.person_1 = person;
    this.password_1 = password;
    this.genderOptions_1 = genderOptions;
    this.personPicture_1 = personPicture;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.approvalPersonParentJoin_1 = approvalPersonParentJoin;
    this.registrationMode_1 = registrationMode;
    this.usernameError_1 = usernameError;
    this.passwordConfirmedError_1 = passwordConfirmedError;
    this.passwordError_1 = passwordError;
    this.emailError_1 = emailError;
    this.confirmError_1 = confirmError;
    this.dateOfBirthError_1 = dateOfBirthError;
    this.parentContactError_1 = parentContactError;
    this.genderError_1 = genderError;
    this.firstNameError_1 = firstNameError;
    this.lastNameError_1 = lastNameError;
    this.phoneNumError_1 = phoneNumError;
    this.nationalPhoneNumSet_1 = nationalPhoneNumSet;
  }
  protoOf(PersonEditUiState).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(PersonEditUiState).get_password_bodifw_k$ = function () {
    return this.password_1;
  };
  protoOf(PersonEditUiState).get_genderOptions_grbq0k_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(PersonEditUiState).get_personPicture_te1agw_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(PersonEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(PersonEditUiState).get_approvalPersonParentJoin_4ck2az_k$ = function () {
    return this.approvalPersonParentJoin_1;
  };
  protoOf(PersonEditUiState).get_registrationMode_pu3av9_k$ = function () {
    return this.registrationMode_1;
  };
  protoOf(PersonEditUiState).get_usernameError_i4qze1_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(PersonEditUiState).get_passwordConfirmedError_hk6tn7_k$ = function () {
    return this.passwordConfirmedError_1;
  };
  protoOf(PersonEditUiState).get_passwordError_55tjwk_k$ = function () {
    return this.passwordError_1;
  };
  protoOf(PersonEditUiState).get_emailError_18jbdh_k$ = function () {
    return this.emailError_1;
  };
  protoOf(PersonEditUiState).get_confirmError_w76xlb_k$ = function () {
    return this.confirmError_1;
  };
  protoOf(PersonEditUiState).get_dateOfBirthError_qux8bb_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(PersonEditUiState).get_parentContactError_kzddzv_k$ = function () {
    return this.parentContactError_1;
  };
  protoOf(PersonEditUiState).get_genderError_tcuvry_k$ = function () {
    return this.genderError_1;
  };
  protoOf(PersonEditUiState).get_firstNameError_322qnq_k$ = function () {
    return this.firstNameError_1;
  };
  protoOf(PersonEditUiState).get_lastNameError_avryzm_k$ = function () {
    return this.lastNameError_1;
  };
  protoOf(PersonEditUiState).get_phoneNumError_3ik7ev_k$ = function () {
    return this.phoneNumError_1;
  };
  protoOf(PersonEditUiState).get_nationalPhoneNumSet_i89oy7_k$ = function () {
    return this.nationalPhoneNumSet_1;
  };
  protoOf(PersonEditUiState).get_parentalEmailVisible_4ut28c_k$ = function () {
    return !(this.approvalPersonParentJoin_1 == null);
  };
  protoOf(PersonEditUiState).get_dateOfBirthVisible_blh9fj_k$ = function () {
    return !hasFlag(this.registrationMode_1, 1);
  };
  protoOf(PersonEditUiState).get_usernameVisible_gmz0od_k$ = function () {
    return hasFlag(this.registrationMode_1, 1);
  };
  protoOf(PersonEditUiState).get_passwordVisible_keg9ke_k$ = function () {
    return hasFlag(this.registrationMode_1, 1);
  };
  protoOf(PersonEditUiState).get_emailVisible_dj5gu7_k$ = function () {
    return !hasFlag(this.registrationMode_1, 2);
  };
  protoOf(PersonEditUiState).get_phoneNumVisible_16f0oh_k$ = function () {
    return !hasFlag(this.registrationMode_1, 2);
  };
  protoOf(PersonEditUiState).get_personAddressVisible_4pmyp0_k$ = function () {
    return !hasFlag(this.registrationMode_1, 2);
  };
  protoOf(PersonEditUiState).component1_7eebsc_k$ = function () {
    return this.person_1;
  };
  protoOf(PersonEditUiState).component2_7eebsb_k$ = function () {
    return this.password_1;
  };
  protoOf(PersonEditUiState).component3_7eebsa_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(PersonEditUiState).component4_7eebs9_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(PersonEditUiState).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(PersonEditUiState).component6_7eebs7_k$ = function () {
    return this.approvalPersonParentJoin_1;
  };
  protoOf(PersonEditUiState).component7_7eebs6_k$ = function () {
    return this.registrationMode_1;
  };
  protoOf(PersonEditUiState).component8_7eebs5_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(PersonEditUiState).component9_7eebs4_k$ = function () {
    return this.passwordConfirmedError_1;
  };
  protoOf(PersonEditUiState).component10_gazzfo_k$ = function () {
    return this.passwordError_1;
  };
  protoOf(PersonEditUiState).component11_gazzfn_k$ = function () {
    return this.emailError_1;
  };
  protoOf(PersonEditUiState).component12_gazzfm_k$ = function () {
    return this.confirmError_1;
  };
  protoOf(PersonEditUiState).component13_gazzfl_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(PersonEditUiState).component14_gazzfk_k$ = function () {
    return this.parentContactError_1;
  };
  protoOf(PersonEditUiState).component15_gazzfj_k$ = function () {
    return this.genderError_1;
  };
  protoOf(PersonEditUiState).component16_gazzfi_k$ = function () {
    return this.firstNameError_1;
  };
  protoOf(PersonEditUiState).component17_gazzfh_k$ = function () {
    return this.lastNameError_1;
  };
  protoOf(PersonEditUiState).component18_gazzfg_k$ = function () {
    return this.phoneNumError_1;
  };
  protoOf(PersonEditUiState).component19_gazzff_k$ = function () {
    return this.nationalPhoneNumSet_1;
  };
  protoOf(PersonEditUiState).copy_634bse_k$ = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    return new PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).copy$default_6db433_k$ = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet, $super) {
    person = person === VOID ? this.person_1 : person;
    password = password === VOID ? this.password_1 : password;
    genderOptions = genderOptions === VOID ? this.genderOptions_1 : genderOptions;
    personPicture = personPicture === VOID ? this.personPicture_1 : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? this.approvalPersonParentJoin_1 : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? this.registrationMode_1 : registrationMode;
    usernameError = usernameError === VOID ? this.usernameError_1 : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? this.passwordConfirmedError_1 : passwordConfirmedError;
    passwordError = passwordError === VOID ? this.passwordError_1 : passwordError;
    emailError = emailError === VOID ? this.emailError_1 : emailError;
    confirmError = confirmError === VOID ? this.confirmError_1 : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? this.dateOfBirthError_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.parentContactError_1 : parentContactError;
    genderError = genderError === VOID ? this.genderError_1 : genderError;
    firstNameError = firstNameError === VOID ? this.firstNameError_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.lastNameError_1 : lastNameError;
    phoneNumError = phoneNumError === VOID ? this.phoneNumError_1 : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? this.nationalPhoneNumSet_1 : nationalPhoneNumSet;
    return $super === VOID ? this.copy_634bse_k$(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) : $super.copy_634bse_k$.call(this, person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).toString = function () {
    return 'PersonEditUiState(person=' + this.person_1 + ', password=' + this.password_1 + ', genderOptions=' + this.genderOptions_1 + ', personPicture=' + this.personPicture_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', approvalPersonParentJoin=' + this.approvalPersonParentJoin_1 + ', registrationMode=' + this.registrationMode_1 + ', usernameError=' + this.usernameError_1 + ', passwordConfirmedError=' + this.passwordConfirmedError_1 + ', passwordError=' + this.passwordError_1 + ', emailError=' + this.emailError_1 + ', confirmError=' + this.confirmError_1 + ', dateOfBirthError=' + this.dateOfBirthError_1 + ', parentContactError=' + this.parentContactError_1 + ', genderError=' + this.genderError_1 + ', firstNameError=' + this.firstNameError_1 + ', lastNameError=' + this.lastNameError_1 + ', phoneNumError=' + this.phoneNumError_1 + ', nationalPhoneNumSet=' + this.nationalPhoneNumSet_1 + ')';
  };
  protoOf(PersonEditUiState).hashCode = function () {
    var result = this.person_1 == null ? 0 : this.person_1.hashCode();
    result = imul(result, 31) + (this.password_1 == null ? 0 : getStringHashCode(this.password_1)) | 0;
    result = imul(result, 31) + hashCode(this.genderOptions_1) | 0;
    result = imul(result, 31) + (this.personPicture_1 == null ? 0 : this.personPicture_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + (this.approvalPersonParentJoin_1 == null ? 0 : this.approvalPersonParentJoin_1.hashCode()) | 0;
    result = imul(result, 31) + this.registrationMode_1 | 0;
    result = imul(result, 31) + (this.usernameError_1 == null ? 0 : getStringHashCode(this.usernameError_1)) | 0;
    result = imul(result, 31) + (this.passwordConfirmedError_1 == null ? 0 : getStringHashCode(this.passwordConfirmedError_1)) | 0;
    result = imul(result, 31) + (this.passwordError_1 == null ? 0 : getStringHashCode(this.passwordError_1)) | 0;
    result = imul(result, 31) + (this.emailError_1 == null ? 0 : getStringHashCode(this.emailError_1)) | 0;
    result = imul(result, 31) + (this.confirmError_1 == null ? 0 : getStringHashCode(this.confirmError_1)) | 0;
    result = imul(result, 31) + (this.dateOfBirthError_1 == null ? 0 : getStringHashCode(this.dateOfBirthError_1)) | 0;
    result = imul(result, 31) + (this.parentContactError_1 == null ? 0 : getStringHashCode(this.parentContactError_1)) | 0;
    result = imul(result, 31) + (this.genderError_1 == null ? 0 : getStringHashCode(this.genderError_1)) | 0;
    result = imul(result, 31) + (this.firstNameError_1 == null ? 0 : getStringHashCode(this.firstNameError_1)) | 0;
    result = imul(result, 31) + (this.lastNameError_1 == null ? 0 : getStringHashCode(this.lastNameError_1)) | 0;
    result = imul(result, 31) + (this.phoneNumError_1 == null ? 0 : getStringHashCode(this.phoneNumError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nationalPhoneNumSet_1) | 0;
    return result;
  };
  protoOf(PersonEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonEditUiState ? other : THROW_CCE();
    if (!equals(this.person_1, tmp0_other_with_cast.person_1))
      return false;
    if (!(this.password_1 == tmp0_other_with_cast.password_1))
      return false;
    if (!equals(this.genderOptions_1, tmp0_other_with_cast.genderOptions_1))
      return false;
    if (!equals(this.personPicture_1, tmp0_other_with_cast.personPicture_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!equals(this.approvalPersonParentJoin_1, tmp0_other_with_cast.approvalPersonParentJoin_1))
      return false;
    if (!(this.registrationMode_1 === tmp0_other_with_cast.registrationMode_1))
      return false;
    if (!(this.usernameError_1 == tmp0_other_with_cast.usernameError_1))
      return false;
    if (!(this.passwordConfirmedError_1 == tmp0_other_with_cast.passwordConfirmedError_1))
      return false;
    if (!(this.passwordError_1 == tmp0_other_with_cast.passwordError_1))
      return false;
    if (!(this.emailError_1 == tmp0_other_with_cast.emailError_1))
      return false;
    if (!(this.confirmError_1 == tmp0_other_with_cast.confirmError_1))
      return false;
    if (!(this.dateOfBirthError_1 == tmp0_other_with_cast.dateOfBirthError_1))
      return false;
    if (!(this.parentContactError_1 == tmp0_other_with_cast.parentContactError_1))
      return false;
    if (!(this.genderError_1 == tmp0_other_with_cast.genderError_1))
      return false;
    if (!(this.firstNameError_1 == tmp0_other_with_cast.firstNameError_1))
      return false;
    if (!(this.lastNameError_1 == tmp0_other_with_cast.lastNameError_1))
      return false;
    if (!(this.phoneNumError_1 == tmp0_other_with_cast.phoneNumError_1))
      return false;
    if (!(this.nationalPhoneNumSet_1 === tmp0_other_with_cast.nationalPhoneNumSet_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_9() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_4(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i_0(receiver);
    }, null);
  }
  function genderConfig$factory_1() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_0(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_1(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function apiUrlConfig$factory_10() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_4(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory_0() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i_0(receiver);
    }, null);
  }
  function genderConfig$factory_2() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_0(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_0() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_1(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory_0() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function LearningSpaceListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).invoke_d8tuxi_k$ = function (learningSpaceList, $completion) {
    var tmp = this.create_kfrwry_k$(learningSpaceList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d8tuxi_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_cnqal5_k$(VOID, this.learningSpaceList_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).create_kfrwry_k$ = function (learningSpaceList, completion) {
    var i = new LearningSpaceListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.learningSpaceList_1 = learningSpaceList;
    return i;
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_kfrwry_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function LearningSpaceListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (learningSpaceList, $completion) {
      return i.invoke_d8tuxi_k$(learningSpaceList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.repo_1.getAll_knua39_k$();
            var tmp_1 = LearningSpaceListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new LearningSpaceListViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function LearningSpaceListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_impl__d88w17_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.impl$delegate_1;
    impl$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function _get_goToLearningSpaceUseCase__yq7hh5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.goToLearningSpaceUseCase$delegate_1;
    goToLearningSpaceUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function Companion_175() {
    Companion_instance_175 = this;
    this.DEST_NAME_1 = 'LearningSpaceList';
    this.KEY_LINK_1 = 'stateUrl';
  }
  protoOf(Companion_175).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_175).get_KEY_LINK_a3662l_k$ = function () {
    return this.KEY_LINK_1;
  };
  var Companion_instance_175;
  function Companion_getInstance_236() {
    if (Companion_instance_175 == null)
      new Companion_175();
    return Companion_instance_175;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_34(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_34).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function LearningSpaceListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LearningSpaceListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, LearningSpaceListViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(LearningSpaceListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new LearningSpaceListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(LearningSpaceListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function LearningSpaceListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceListViewModel(di, savedStateHandle) {
    Companion_getInstance_236();
    UstadListViewModel.call(this, di, savedStateHandle, new LearningSpaceListUiState(), 'LearningSpaceList');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.impl$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, impl$factory_3());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GoToLearningSpaceUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.goToLearningSpaceUseCase$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, goToLearningSpaceUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var tmp_4 = get_direct(di).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(CentralAppConfigDbDataSource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_3.repo_1 = tmp_4.Instance_vwdrk9_k$(tmp$ret$4, null).get_learningSpaceDataSource_k2iy1o_k$();
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_1(this).getString_a9yhoi_k$(strings_getInstance().get_learning_space_uvshwu_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_236().KEY_LINK_1);
        var nextValue_0 = prevValue_0.copy$default_cnqal5_k$(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_6, VOID, VOID, LearningSpaceListViewModel$slambda_0(this, null));
  }
  protoOf(LearningSpaceListViewModel).get_repo_wotlmj_k$ = function () {
    return this.repo_1;
  };
  protoOf(LearningSpaceListViewModel).onClickNext_jwdi98_k$ = function () {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_247().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.onClickNext.<anonymous>' call
    this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  };
  protoOf(LearningSpaceListViewModel).onSelectLearningSpace_83szr1_k$ = function (learningSpace) {
    var tmp;
    if (this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_244().get_ARG_NEW_OR_EXISTING_USER_v4h2ks_k$()) === Companion_getInstance_244().get_ARG_VAL_NEW_USER_g702u_k$()) {
      tmp = Companion_getInstance_240().get_DEST_NAME_gmgk7z_k$();
    } else {
      tmp = Companion_getInstance_223().get_DEST_NAME_gmgk7z_k$();
    }
    var viewName = tmp;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.onSelectLearningSpace.<anonymous>' call
    this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    this_0.put_4fpzoq_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), learningSpace);
    var args = this_0.build_1k0s4u_k$();
    _get_goToLearningSpaceUseCase__yq7hh5(this).invoke_y0zui7_k$(learningSpace, this.get_navController_qibdoq_k$(), args, viewName);
  };
  protoOf(LearningSpaceListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(LearningSpaceListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  function LearningSpaceListUiState(siteLink, learningSpaces) {
    siteLink = siteLink === VOID ? '' : siteLink;
    learningSpaces = learningSpaces === VOID ? emptyList() : learningSpaces;
    this.siteLink_1 = siteLink;
    this.learningSpaces_1 = learningSpaces;
  }
  protoOf(LearningSpaceListUiState).get_siteLink_kn32ae_k$ = function () {
    return this.siteLink_1;
  };
  protoOf(LearningSpaceListUiState).get_learningSpaces_p5c450_k$ = function () {
    return this.learningSpaces_1;
  };
  protoOf(LearningSpaceListUiState).component1_7eebsc_k$ = function () {
    return this.siteLink_1;
  };
  protoOf(LearningSpaceListUiState).component2_7eebsb_k$ = function () {
    return this.learningSpaces_1;
  };
  protoOf(LearningSpaceListUiState).copy_raf0es_k$ = function (siteLink, learningSpaces) {
    return new LearningSpaceListUiState(siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).copy$default_cnqal5_k$ = function (siteLink, learningSpaces, $super) {
    siteLink = siteLink === VOID ? this.siteLink_1 : siteLink;
    learningSpaces = learningSpaces === VOID ? this.learningSpaces_1 : learningSpaces;
    return $super === VOID ? this.copy_raf0es_k$(siteLink, learningSpaces) : $super.copy_raf0es_k$.call(this, siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).toString = function () {
    return 'LearningSpaceListUiState(siteLink=' + this.siteLink_1 + ', learningSpaces=' + this.learningSpaces_1 + ')';
  };
  protoOf(LearningSpaceListUiState).hashCode = function () {
    var result = getStringHashCode(this.siteLink_1);
    result = imul(result, 31) + hashCode(this.learningSpaces_1) | 0;
    return result;
  };
  protoOf(LearningSpaceListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpaceListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpaceListUiState ? other : THROW_CCE();
    if (!(this.siteLink_1 === tmp0_other_with_cast.siteLink_1))
      return false;
    if (!equals(this.learningSpaces_1, tmp0_other_with_cast.learningSpaces_1))
      return false;
    return true;
  };
  function impl$factory_3() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_1(receiver);
    }, null);
  }
  function goToLearningSpaceUseCase$factory() {
    return getPropertyCallableRef('goToLearningSpaceUseCase', 1, KProperty1, function (receiver) {
      return _get_goToLearningSpaceUseCase__yq7hh5(receiver);
    }, null);
  }
  function impl$factory_4() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_1(receiver);
    }, null);
  }
  function goToLearningSpaceUseCase$factory_0() {
    return getPropertyCallableRef('goToLearningSpaceUseCase', 1, KProperty1, function (receiver) {
      return _get_goToLearningSpaceUseCase__yq7hh5(receiver);
    }, null);
  }
  function EmptyPagingSource() {
    PagingSource.call(this);
  }
  protoOf(EmptyPagingSource).getRefreshKey_3flma8_k$ = function (state) {
    return null;
  };
  protoOf(EmptyPagingSource).load_tstxu5_k$ = function (params, $completion) {
    var tmp = Page_init_$Create$(emptyList(), null, null);
    return tmp instanceof LoadResult ? tmp : THROW_CCE();
  };
  function PersonListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda$slambda).invoke_f29lti_k$ = function (hasPermissionToList, $completion) {
    var tmp = this.create_vh5neu_k$(hasPermissionToList, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp_0;
              if (this.hasPermissionToList_1) {
                tmp_0 = this.this$0__1.pagingSourceFactory_1;
              } else {
                tmp_0 = PersonListViewModel$slambda$slambda$slambda$lambda;
              }
              var tmp0_personList = tmp_0;
              var tmp1_showInviteViaLink = !(this.this$0__1.inviteCode_1 == null);
              var tmp2_inviteCode = this.this$0__1.inviteCode_1;
              var tmp3_showInviteViaContact = this.this$0__1.showInviteViaContact_1;
              var nextValue = prevValue.copy$default_h1nxv4_k$(tmp0_personList, VOID, VOID, VOID, tmp1_showInviteViaLink, tmp3_showInviteViaContact, tmp2_inviteCode, this.hasPermissionToList_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.get_searchState_4sjvxc_k$().copy$default_26m90z_k$(this.hasPermissionToList_1));
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).create_vh5neu_k$ = function (hasPermissionToList, completion) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this.this$0__1, completion);
    i.hasPermissionToList_1 = hasPermissionToList;
    return i;
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function PersonListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermissionToList, $completion) {
      return i.invoke_f29lti_k$(hasPermissionToList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation) {
    this.$hasPermissionToListFlow_1 = $hasPermissionToListFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(PersonListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = distinctUntilChanged(this.$hasPermissionToListFlow_1);
            var tmp_1 = PersonListViewModel$slambda$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_35(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new PersonListViewModel$slambda$slambda(this.$hasPermissionToListFlow_1, this.this$0__1, completion);
  };
  function PersonListViewModel$slambda$slambda_0($hasPermissionToListFlow, this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda_1).invoke_tixz4u_k$ = function (it, $completion) {
    var tmp = this.create_syqk0m_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonListViewModel$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_tixz4u_k$(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var tmp0_container = this.it_1;
          var hasAddPermission = tmp0_container.component1_7eebsc_k$();
          var hasViewAllPermission = tmp0_container.component2_7eebsb_k$();
          var hasBulkAddPermission = hasAddPermission ? hasViewAllPermission : false;
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_h1nxv4_k$(VOID, VOID, VOID, this.this$0__1.get_listMode_9jw63a_k$().equals(ListViewMode_PICKER_getInstance()) ? hasAddPermission : false, VOID, VOID, VOID, VOID, VOID, hasBulkAddPermission);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue_0 = this_1.get_value_j01efc_k$();
              var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(prevValue_0.get_fabState_obl84t_k$().copy$default_kse1yx_k$(this.this$0__1.get_listMode_9jw63a_k$().equals(ListViewMode_BROWSER_getInstance()) ? hasAddPermission : false));
              if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).create_syqk0m_k$ = function (it, completion) {
    var i = new PersonListViewModel$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(PersonListViewModel$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_syqk0m_k$(value instanceof PermissionPair ? value : THROW_CCE(), completion);
  };
  function PersonListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_tixz4u_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_filterExcludeMembersOfClazz__56g41l($this) {
    return $this.filterExcludeMembersOfClazz_1;
  }
  function _get_personRole__wlg1hc_0($this) {
    return $this.personRole_1;
  }
  function _get_filterAlreadySelectedList__1ojn3s_0($this) {
    return $this.filterAlreadySelectedList_1;
  }
  function _get_permissionRequiredToShowList__4gxcjr($this) {
    return $this.permissionRequiredToShowList_1;
  }
  function _get_pagingSourceFactory__6w06ky_9($this) {
    return $this.pagingSourceFactory_1;
  }
  function _get_inviteCode__ejbp2t($this) {
    return $this.inviteCode_1;
  }
  function _get_showInviteViaContact__mybql($this) {
    return $this.showInviteViaContact_1;
  }
  function _get_setClipboardStringUseCase__31i1s1_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.setClipboardStringUseCase$delegate_1;
    setClipboardStringUseCase$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function onClickFab($this) {
    if ($this.get__uiState_8tkbd_k$().get_value_j01efc_k$().hasBulkImportPermission_1) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = $this.get__uiState_8tkbd_k$();
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickFab.<anonymous>' call
          var nextValue = prevValue.copy$default_h1nxv4_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      $this.onClickAdd_cbqifs_k$();
    }
  }
  function Companion_176() {
    Companion_instance_176 = this;
    this.DEST_NAME_1 = 'People';
    this.DEST_NAME_HOME_1 = 'PersonListHome';
    this.ALL_DEST_NAMES_1 = listOf(['People', 'PersonListHome']);
    this.ARG_FILTER_EXCLUDE_MEMBERSOFCLAZZ_1 = 'exlcudeFromClazz';
    this.ARG_EXCLUDE_PERSONUIDS_LIST_1 = 'excludeAlreadySelectedList';
    this.ARG_SHOW_ADD_VIA_INVITE_LINK_CODE_1 = 'showAddViaInviteLink';
    this.ARG_SHOW_ADD_VIA_CONTACT_1 = 'showAddViaContact';
    this.ARG_ROLE_1 = 'role';
    this.ARG_REQUIRE_PERMISSION_TO_SHOW_LIST_1 = 'rptsl';
  }
  protoOf(Companion_176).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_176).get_DEST_NAME_HOME_lftflt_k$ = function () {
    return this.DEST_NAME_HOME_1;
  };
  protoOf(Companion_176).get_ALL_DEST_NAMES_l2cmjy_k$ = function () {
    return this.ALL_DEST_NAMES_1;
  };
  protoOf(Companion_176).get_ARG_FILTER_EXCLUDE_MEMBERSOFCLAZZ_44kua_k$ = function () {
    return this.ARG_FILTER_EXCLUDE_MEMBERSOFCLAZZ_1;
  };
  protoOf(Companion_176).get_ARG_EXCLUDE_PERSONUIDS_LIST_3f4qz2_k$ = function () {
    return this.ARG_EXCLUDE_PERSONUIDS_LIST_1;
  };
  protoOf(Companion_176).get_ARG_SHOW_ADD_VIA_INVITE_LINK_CODE_h52gkl_k$ = function () {
    return this.ARG_SHOW_ADD_VIA_INVITE_LINK_CODE_1;
  };
  protoOf(Companion_176).get_ARG_SHOW_ADD_VIA_CONTACT_9u4tep_k$ = function () {
    return this.ARG_SHOW_ADD_VIA_CONTACT_1;
  };
  protoOf(Companion_176).get_ARG_ROLE_q19ne0_k$ = function () {
    return this.ARG_ROLE_1;
  };
  protoOf(Companion_176).get_ARG_REQUIRE_PERMISSION_TO_SHOW_LIST_bg6c68_k$ = function () {
    return this.ARG_REQUIRE_PERMISSION_TO_SHOW_LIST_1;
  };
  var Companion_instance_176;
  function Companion_getInstance_237() {
    if (Companion_instance_176 == null)
      new Companion_176();
    return Companion_instance_176;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_35(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_35).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function PersonListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().findPersonsWithPermissionAsPagingSource_cdzstc_k$(getSystemTimeInMillis(), this$0.filterExcludeMembersOfClazz_1, this$0.filterAlreadySelectedList_1, this$0.get_activeUserPersonUid_1nlgnz_k$(), this$0.get__uiState_8tkbd_k$().get_value_j01efc_k$().sortOption_1.get_flag_wom2lx_k$(), toQueryLikeParam(this$0.get__appUiState_rulqry_k$().get_value_j01efc_k$().get_searchState_4sjvxc_k$().get_searchText_vx8z2a_k$()));
    };
  }
  function PersonListViewModel$onClickFab$ref($boundThis) {
    var l = function () {
      onClickFab($boundThis);
      return Unit_getInstance();
    };
    l.callableName = 'onClickFab';
    return l;
  }
  function PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$hasPermissionToListFlow_1 = $hasPermissionToListFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, PersonListViewModel$slambda$slambda_0(this.$hasPermissionToListFlow_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda(this.this$0__1, this.$hasPermissionToListFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonListViewModel$slambda_0(this$0, $hasPermissionToListFlow, resultContinuation) {
    var i = new PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PersonListViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermissionPairAsFlow_8tn2gh_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_ADD_PERSON_79ed2c_k$(), PermissionFlags_getInstance().get_PERSON_VIEW_s2u8t6_k$());
            var tmp_1 = PersonListViewModel$slambda$slambda_2(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_35(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PersonListViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PersonListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_237();
    destinationName = destinationName === VOID ? 'People' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new PersonListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$('exlcudeFromClazz');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.filterExcludeMembersOfClazz_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.get_6bo4tg_k$('role');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.personRole_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.get_6bo4tg_k$('excludeAlreadySelectedList');
    var tmp1_safe_receiver = tmp0_safe_receiver_1 == null ? null : split(tmp0_safe_receiver_1, [',']);
    var tmp_2;
    if (tmp1_safe_receiver == null) {
      tmp_2 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.add_utx5q5_k$(element);
        }
      }
      tmp_2 = destination;
    }
    var tmp2_safe_receiver = tmp_2;
    var tmp_3;
    if (tmp2_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var item = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.add_utx5q5_k$(tmp$ret$5);
      }
      tmp_3 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_3;
    var tmp_4;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_4 = emptyList();
    } else {
      tmp_4 = tmp3_elvis_lhs;
    }
    tmp_1.filterAlreadySelectedList_1 = tmp_4;
    var tmp_5 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.get_6bo4tg_k$('rptsl');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_5.permissionRequiredToShowList_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_6 = this;
    tmp_6.pagingSourceFactory_1 = PersonListViewModel$pagingSourceFactory$lambda(this);
    this.inviteCode_1 = savedStateHandle.get_6bo4tg_k$('showAddViaInviteLink');
    this.showInviteViaContact_1 = savedStateHandle.get_6bo4tg_k$('showAddViaContact') === 'true';
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.setClipboardStringUseCase$delegate_1 = Instance(this, tmp$ret$9, null).provideDelegate_o2qlc1_k$(this, setClipboardStringUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.<anonymous>' call
        var tmp1_searchState = this.createSearchEnabledState_l9ncdt_k$(false);
        var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_TITLE_ps2gqu_k$());
        var tmp2_title = tmp0_elvis_lhs == null ? this.listTitle_mhmhkq_k$(strings_getInstance().get_people_i0a8wo_k$(), strings_getInstance().get_select_person_bm005r_k$()) : tmp0_elvis_lhs;
        var tmp_9 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_person_i0c866_k$());
        var tmp_10 = FabIcon_ADD_getInstance();
        var tmp3_fabState = new FabUiState(VOID, tmp_9, tmp_10, PersonListViewModel$onClickFab$ref(this));
        var nextValue = prevValue.copy$default_9ltzmx_k$(tmp3_fabState, VOID, tmp2_title, true, VOID, VOID, VOID, tmp1_searchState);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_11;
    if (this.permissionRequiredToShowList_1.equals(new Long(0, 0))) {
      tmp_11 = flowOf(true);
    } else {
      tmp_11 = this.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermissionAsFlow_ryvoyl_k$(this.get_activeUserPersonUid_1nlgnz_k$(), this.permissionRequiredToShowList_1);
    }
    var hasPermissionToListFlow = tmp_11;
    var tmp_12 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_12, VOID, VOID, PersonListViewModel$slambda_0(this, hasPermissionToListFlow, null));
    var tmp_13 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_13, VOID, VOID, PersonListViewModel$slambda_2(this, null));
  }
  protoOf(PersonListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(PersonListViewModel).onSortOrderChanged_cgn689_k$ = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_h1nxv4_k$(VOID, VOID, sortOption);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(PersonListViewModel).onClickInviteWithLink_mmrczi_k$ = function () {
    if (this.inviteCode_1 == null)
      return Unit_getInstance();
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_174().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_INVITE_CODE_853xn3_k$(), this.inviteCode_1)));
  };
  protoOf(PersonListViewModel).onClickCopyInviteCode_txzqn0_k$ = function () {
    var tmp0_safe_receiver = this.get__uiState_8tkbd_k$().get_value_j01efc_k$().inviteCode_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickCopyInviteCode.<anonymous>' call
      _get_setClipboardStringUseCase__31i1s1_1(this).invoke_nokysy_k$(tmp0_safe_receiver);
      this.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_copied_to_clipboard_mjx1bw_k$())));
    }
  };
  protoOf(PersonListViewModel).onClickInviteViaContact_5st12k_k$ = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickInviteViaContact.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_173().get_ARG_ROLE_q19ne0_k$(), this.personRole_1.toString());
    this_0.put_4fpzoq_k$(Companion_getInstance_173().get_ARG_CLAZZ_UID_ov15qh_k$(), this.filterExcludeMembersOfClazz_1.toString());
    var args = this_0.build_1k0s4u_k$();
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_173().get_DEST_NAME_gmgk7z_k$(), args);
  };
  protoOf(PersonListViewModel).onClickBulkAdd_lpr12u_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_231().get_DEST_NAME_gmgk7z_k$(), emptyMap());
  };
  protoOf(PersonListViewModel).onClickAdd_cbqifs_k$ = function () {
    var tmp = Companion_getInstance_235().get_DEST_NAME_gmgk7z_k$();
    var tmp0_safe_receiver = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(PersonViewModelConstants_getInstance().get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$());
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickAdd.<anonymous>' call
      tmp_0 = mapOf_0(to(PersonViewModelConstants_getInstance().get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$(), tmp0_safe_receiver));
    }
    var tmp1_elvis_lhs = tmp_0;
    this.navigateToCreateNew_mwxhbu_k$(tmp, tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs);
  };
  protoOf(PersonListViewModel).onClickEntry_h9z2yn_k$ = function (entry) {
    var goToOnPersonSelected = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(PersonViewModelConstants_getInstance().get_ARG_GO_TO_ON_PERSON_SELECTED_3l88xw_k$());
    if (!(goToOnPersonSelected == null)) {
      var args = plus_0(UMFileUtil_getInstance().parseURLQueryString(goToOnPersonSelected), mapOf_0(to(Companion_getInstance_156().get_ARG_PERSON_UID_8uotmw_k$(), entry.get_personUid_mmhd76_k$().toString())));
      var goToDestName = substringBefore(goToOnPersonSelected, '?');
      var popUpTo = this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(PersonViewModelConstants_getInstance().get_ARG_POPUP_TO_ON_PERSON_SELECTED_uu1vp8_k$());
      this.get_navController_qibdoq_k$().navigate_6urlkw_k$(goToDestName, args, new UstadGoOptions(popUpTo, true));
    } else {
      this.navigateOnItemClicked$default_l754h1_k$(Companion_getInstance_234().get_DEST_NAME_gmgk7z_k$(), entry.get_personUid_mmhd76_k$(), entry);
    }
  };
  protoOf(PersonListViewModel).onDismissAddSheetOrDialog_euv2w4_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onDismissAddSheetOrDialog.<anonymous>' call
        var nextValue = prevValue.copy$default_h1nxv4_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function PersonListUiState$_init_$lambda_st3t8h() {
    return new EmptyPagingSource();
  }
  function PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    var tmp;
    if (personList === VOID) {
      tmp = PersonListUiState$_init_$lambda_st3t8h;
    } else {
      tmp = personList;
    }
    personList = tmp;
    sortOptions = sortOptions === VOID ? listOf([new SortOrderOption(strings_getInstance().get_first_name_mu3jr1_k$(), PersonDaoCommon_getInstance().get_SORT_FIRST_NAME_ASC_uiz2kk_k$(), true), new SortOrderOption(strings_getInstance().get_first_name_mu3jr1_k$(), PersonDaoCommon_getInstance().get_SORT_FIRST_NAME_DESC_mxs51a_k$(), false), new SortOrderOption(strings_getInstance().get_last_name_t811qt_k$(), PersonDaoCommon_getInstance().get_SORT_LAST_NAME_ASC_qs7cum_k$(), true), new SortOrderOption(strings_getInstance().get_last_name_t811qt_k$(), PersonDaoCommon_getInstance().get_SORT_LAST_NAME_DESC_m2yybw_k$(), false)]) : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? false : showInviteViaLink;
    showInviteViaContact = showInviteViaContact === VOID ? false : showInviteViaContact;
    inviteCode = inviteCode === VOID ? null : inviteCode;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? false : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? false : hasBulkImportPermission;
    this.personList_1 = personList;
    this.sortOptions_1 = sortOptions;
    this.sortOption_1 = sortOption;
    this.showAddItem_1 = showAddItem;
    this.showInviteViaLink_1 = showInviteViaLink;
    this.showInviteViaContact_1 = showInviteViaContact;
    this.inviteCode_1 = inviteCode;
    this.showSortOptions_1 = showSortOptions;
    this.addSheetOrDialogVisible_1 = addSheetOrDialogVisible;
    this.hasBulkImportPermission_1 = hasBulkImportPermission;
  }
  protoOf(PersonListUiState).get_personList_8ybx0k_k$ = function () {
    return this.personList_1;
  };
  protoOf(PersonListUiState).get_sortOptions_duj647_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(PersonListUiState).get_sortOption_xx8b7o_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(PersonListUiState).get_showAddItem_1b9xri_k$ = function () {
    return this.showAddItem_1;
  };
  protoOf(PersonListUiState).get_showInviteViaLink_fzgzzt_k$ = function () {
    return this.showInviteViaLink_1;
  };
  protoOf(PersonListUiState).get_showInviteViaContact_u689rz_k$ = function () {
    return this.showInviteViaContact_1;
  };
  protoOf(PersonListUiState).get_inviteCode_d8qu9_k$ = function () {
    return this.inviteCode_1;
  };
  protoOf(PersonListUiState).get_showSortOptions_4kx2wq_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(PersonListUiState).get_addSheetOrDialogVisible_6x7cww_k$ = function () {
    return this.addSheetOrDialogVisible_1;
  };
  protoOf(PersonListUiState).get_hasBulkImportPermission_rhgdav_k$ = function () {
    return this.hasBulkImportPermission_1;
  };
  protoOf(PersonListUiState).component1_7eebsc_k$ = function () {
    return this.personList_1;
  };
  protoOf(PersonListUiState).component2_7eebsb_k$ = function () {
    return this.sortOptions_1;
  };
  protoOf(PersonListUiState).component3_7eebsa_k$ = function () {
    return this.sortOption_1;
  };
  protoOf(PersonListUiState).component4_7eebs9_k$ = function () {
    return this.showAddItem_1;
  };
  protoOf(PersonListUiState).component5_7eebs8_k$ = function () {
    return this.showInviteViaLink_1;
  };
  protoOf(PersonListUiState).component6_7eebs7_k$ = function () {
    return this.showInviteViaContact_1;
  };
  protoOf(PersonListUiState).component7_7eebs6_k$ = function () {
    return this.inviteCode_1;
  };
  protoOf(PersonListUiState).component8_7eebs5_k$ = function () {
    return this.showSortOptions_1;
  };
  protoOf(PersonListUiState).component9_7eebs4_k$ = function () {
    return this.addSheetOrDialogVisible_1;
  };
  protoOf(PersonListUiState).component10_gazzfo_k$ = function () {
    return this.hasBulkImportPermission_1;
  };
  protoOf(PersonListUiState).copy_39y3ky_k$ = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    return new PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).copy$default_h1nxv4_k$ = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission, $super) {
    personList = personList === VOID ? this.personList_1 : personList;
    sortOptions = sortOptions === VOID ? this.sortOptions_1 : sortOptions;
    sortOption = sortOption === VOID ? this.sortOption_1 : sortOption;
    showAddItem = showAddItem === VOID ? this.showAddItem_1 : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? this.showInviteViaLink_1 : showInviteViaLink;
    showInviteViaContact = showInviteViaContact === VOID ? this.showInviteViaContact_1 : showInviteViaContact;
    inviteCode = inviteCode === VOID ? this.inviteCode_1 : inviteCode;
    showSortOptions = showSortOptions === VOID ? this.showSortOptions_1 : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? this.addSheetOrDialogVisible_1 : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? this.hasBulkImportPermission_1 : hasBulkImportPermission;
    return $super === VOID ? this.copy_39y3ky_k$(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) : $super.copy_39y3ky_k$.call(this, personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).toString = function () {
    return 'PersonListUiState(personList=' + this.personList_1 + ', sortOptions=' + this.sortOptions_1 + ', sortOption=' + this.sortOption_1 + ', showAddItem=' + this.showAddItem_1 + ', showInviteViaLink=' + this.showInviteViaLink_1 + ', showInviteViaContact=' + this.showInviteViaContact_1 + ', inviteCode=' + this.inviteCode_1 + ', showSortOptions=' + this.showSortOptions_1 + ', addSheetOrDialogVisible=' + this.addSheetOrDialogVisible_1 + ', hasBulkImportPermission=' + this.hasBulkImportPermission_1 + ')';
  };
  protoOf(PersonListUiState).hashCode = function () {
    var result = hashCode(this.personList_1);
    result = imul(result, 31) + hashCode(this.sortOptions_1) | 0;
    result = imul(result, 31) + this.sortOption_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showAddItem_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showInviteViaLink_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showInviteViaContact_1) | 0;
    result = imul(result, 31) + (this.inviteCode_1 == null ? 0 : getStringHashCode(this.inviteCode_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showSortOptions_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.addSheetOrDialogVisible_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hasBulkImportPermission_1) | 0;
    return result;
  };
  protoOf(PersonListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonListUiState ? other : THROW_CCE();
    if (!equals(this.personList_1, tmp0_other_with_cast.personList_1))
      return false;
    if (!equals(this.sortOptions_1, tmp0_other_with_cast.sortOptions_1))
      return false;
    if (!this.sortOption_1.equals(tmp0_other_with_cast.sortOption_1))
      return false;
    if (!(this.showAddItem_1 === tmp0_other_with_cast.showAddItem_1))
      return false;
    if (!(this.showInviteViaLink_1 === tmp0_other_with_cast.showInviteViaLink_1))
      return false;
    if (!(this.showInviteViaContact_1 === tmp0_other_with_cast.showInviteViaContact_1))
      return false;
    if (!(this.inviteCode_1 == tmp0_other_with_cast.inviteCode_1))
      return false;
    if (!(this.showSortOptions_1 === tmp0_other_with_cast.showSortOptions_1))
      return false;
    if (!(this.addSheetOrDialogVisible_1 === tmp0_other_with_cast.addSheetOrDialogVisible_1))
      return false;
    if (!(this.hasBulkImportPermission_1 === tmp0_other_with_cast.hasBulkImportPermission_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory_3() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_4() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function ManageAccountViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda).invoke_9j91aq_k$ = function (it, $completion) {
    var tmp = this.create_xclt7m_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ManageAccountViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_9j91aq_k$((p1 == null ? true : p1 instanceof PersonAuth2) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_l367o7_k$(VOID, VOID, VOID, VOID, VOID, this.it_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda$slambda).create_xclt7m_k$ = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ManageAccountViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_xclt7m_k$((value == null ? true : value instanceof PersonAuth2) ? value : THROW_CCE(), completion);
  };
  function ManageAccountViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_9j91aq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda_1).invoke_q1swb3_k$ = function (it, $completion) {
    var tmp = this.create_1ta5a5_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_q1swb3_k$((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1._uiState_1;
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var tmp0_showCreatePasskey = this.it_1.isEmpty_y1axqb_k$();
              var tmp1_passkeyCount = this.it_1.get_size_woubt6_k$();
              var nextValue = prevValue.copy$default_l367o7_k$(tmp1_passkeyCount, tmp0_showCreatePasskey);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).create_1ta5a5_k$ = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_1ta5a5_k$((!(value == null) ? isInterface(value, List) : false) ? value : THROW_CCE(), completion);
  };
  function ManageAccountViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_q1swb3_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_personUid__aej956_0($this) {
    return $this.personUid_1;
  }
  function _get_personName__wizy17($this) {
    return $this.personName_1;
  }
  function _get_personUsername__2wzdnk($this) {
    return $this.personUsername_1;
  }
  function _get_apiUrlConfig__mldllg_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_12();
    return this_0.get_value_j01efc_k$();
  }
  function _get__uiState__8e9jsd_43($this) {
    return $this._uiState_1;
  }
  function _get_createPasskeyUseCase__ryoxza($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.createPasskeyUseCase$delegate_1;
    createPasskeyUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_savePassKeyUseCase__i6bnuj($this) {
    return $this.savePassKeyUseCase_1;
  }
  function Companion_177() {
    Companion_instance_177 = this;
    this.DEST_NAME_1 = 'ManageAccount';
    this.PERSON_FULL_NAME_1 = 'PersonFullName';
    this.PERSON_USERNAME_1 = 'PersonUsername';
  }
  protoOf(Companion_177).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_177).get_PERSON_FULL_NAME_rkily2_k$ = function () {
    return this.PERSON_FULL_NAME_1;
  };
  protoOf(Companion_177).get_PERSON_USERNAME_4x0xux_k$ = function () {
    return this.PERSON_USERNAME_1;
  };
  var Companion_instance_177;
  function Companion_getInstance_238() {
    if (Companion_instance_177 == null)
      new Companion_177();
    return Companion_instance_177;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_36(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_36).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function ManageAccountViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ManageAccountViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get_activeDataLayer_uea26g_k$().get_repositoryOrLocalDb_ys0nkj_k$().personAuth2Dao_ep6mu5_k$().findByPersonUidFlow_1gc42d_k$(this.this$0__1.personUid_1);
            var tmp_1 = ManageAccountViewModel$slambda$slambda_0(this.this$0__1, null);
            suspendResult = tmp_0.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ManageAccountViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ManageAccountViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ManageAccountViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$slambda_1($di, this$0, resultContinuation) {
    this.$di_1 = $di;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ManageAccountViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var this_0 = this.$di_1;
            var context = new LearningSpace(_get_apiUrlConfig__mldllg_5(this.this$0__1).get_systemBaseUrl_qu6zd2_k$());
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_1 = Companion_getInstance_2();
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.invoke_4wgfc3_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.repo0__1 = tmp_3.Instance_vwdrk9_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).requireRepository$default_mgkaoa_k$();
            this.activePasskeys1__1 = this.repo0__1.personPasskeyDao_9yc2pz_k$().getAllActivePasskeys_73ej08_k$(this.this$0__1.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$());
            this.set_state_rjd8d0_k$(1);
            var tmp_5 = ManageAccountViewModel$slambda$slambda_2(this.this$0__1, null);
            suspendResult = this.activePasskeys1__1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ManageAccountViewModel$slambda_1(this.$di_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ManageAccountViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ManageAccountViewModel$slambda_2($di, this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda_1($di, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$onCreatePasskeyClick$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$onCreatePasskeyClick$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ManageAccountViewModel$onCreatePasskeyClick$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$onCreatePasskeyClick$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(6);
            this.tmp0_safe_receiver0__1 = _get_createPasskeyUseCase__ryoxza(this.this$0__1);
            if (this.tmp0_safe_receiver0__1 == null) {
              this.WHEN_RESULT1__1 = null;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.tmp0_safe_receiver0__1.invoke_1uee3l_k$(toString_1(this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$().get_username_ytz5i7_k$()), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT1__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.passkeyCreated2__1 = this.WHEN_RESULT1__1;
            if (!(this.passkeyCreated2__1 == null)) {
              this.tmp1_safe_receiver3__1 = this.this$0__1.savePassKeyUseCase_1;
              if (this.tmp1_safe_receiver3__1 == null) {
                this.WHEN_RESULT4__1 = null;
                this.set_state_rjd8d0_k$(4);
                continue $sm;
              } else {
                this.set_state_rjd8d0_k$(3);
                suspendResult = this.tmp1_safe_receiver3__1.invoke_xtawvv_k$(this.passkeyCreated2__1, this.this$0__1.get_accountManager_bzeywn_k$().get_currentUserSession_tk77tx_k$().get_person_i0c866_k$(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            }

          case 3:
            this.WHEN_RESULT4__1 = suspendResult;
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 4:
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            return Unit_getInstance();
          case 6:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 6) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$onCreatePasskeyClick$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ManageAccountViewModel$onCreatePasskeyClick$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ManageAccountViewModel$onCreatePasskeyClick$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ManageAccountViewModel$onCreatePasskeyClick$slambda_0(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$onCreatePasskeyClick$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel(di, savedStateHandle) {
    Companion_getInstance_238();
    UstadViewModel.call(this, di, savedStateHandle, 'ManageAccount');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.personUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$('PersonFullName');
    tmp_0.personName_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp_1 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.get_6bo4tg_k$('PersonUsername');
    tmp_1.personUsername_1 = tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0;
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_11());
    this._uiState_1 = MutableStateFlow(new ManageAccountUiState());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(CreatePasskeyUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.createPasskeyUseCase$delegate_1 = InstanceOrNull(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, createPasskeyUseCase$factory());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(_get_apiUrlConfig__mldllg_5(this).get_systemBaseUrl_qu6zd2_k$());
    var trigger = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_7 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$5 = tmp_7.invoke_4wgfc3_k$(tmp$ret$4, context);
    var tmp$ret$6 = On(di, tmp$ret$5, trigger);
    var tmp_9 = get_direct(tmp$ret$6).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(SavePersonPasskeyUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_6.savePassKeyUseCase_1 = tmp_9.InstanceOrNull_akutzz_k$(tmp$ret$7, null);
    var tmp_11 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_11, VOID, VOID, ManageAccountViewModel$slambda_0(this, null));
    var tmp_12 = this.get__appUiState_rulqry_k$();
    var tmp_13;
    if (savedStateHandle.get_6bo4tg_k$(Companion_getInstance_159().get_ARG_LISTMODE_1jy3rh_k$()) === ListViewMode_PICKER_getInstance().get_mode_woqlt8_k$()) {
      tmp_13 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_select_account_3gktfx_k$());
    } else {
      tmp_13 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_accounts_3vrulr_k$());
    }
    var tmp0_title = tmp_13;
    tmp_12.set_value_v1vabv_k$(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.manageaccount.ManageAccountViewModel.<anonymous>' call
        var tmp0_personUsername = this.personUsername_1;
        var tmp1_personName = this.personName_1;
        var tmp2_passkeySupported = !(_get_createPasskeyUseCase__ryoxza(this) == null) ? this.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$().equals(this.personUid_1) : false;
        var nextValue = prevValue.copy$default_l367o7_k$(VOID, VOID, tmp2_passkeySupported, tmp1_personName, tmp0_personUsername);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_14 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_14, VOID, VOID, ManageAccountViewModel$slambda_2(di, this, null));
  }
  protoOf(ManageAccountViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ManageAccountViewModel).navigateToEditAccount_iuwn7r_k$ = function () {
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_227().get_DEST_NAME_gmgk7z_k$(), mapOf_0(to(Companion_getInstance_160().get_ARG_ENTITY_UID_qfeu86_k$(), this.personUid_1.toString())));
  };
  protoOf(ManageAccountViewModel).onClickManagePasskey_qn89f4_k$ = function () {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_239().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.manageaccount.ManageAccountViewModel.onClickManagePasskey.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  };
  protoOf(ManageAccountViewModel).onCreatePasskeyClick_2yid4r_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, ManageAccountViewModel$onCreatePasskeyClick$slambda_0(this, null));
  };
  function ManageAccountUiState(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth) {
    passkeyCount = passkeyCount === VOID ? 0 : passkeyCount;
    showCreatePasskey = showCreatePasskey === VOID ? false : showCreatePasskey;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    personName = personName === VOID ? '' : personName;
    personUsername = personUsername === VOID ? '' : personUsername;
    personAuth = personAuth === VOID ? null : personAuth;
    this.passkeyCount_1 = passkeyCount;
    this.showCreatePasskey_1 = showCreatePasskey;
    this.passkeySupported_1 = passkeySupported;
    this.personName_1 = personName;
    this.personUsername_1 = personUsername;
    this.personAuth_1 = personAuth;
  }
  protoOf(ManageAccountUiState).get_passkeyCount_lb5yyy_k$ = function () {
    return this.passkeyCount_1;
  };
  protoOf(ManageAccountUiState).get_showCreatePasskey_3xd3mc_k$ = function () {
    return this.showCreatePasskey_1;
  };
  protoOf(ManageAccountUiState).get_passkeySupported_uozb13_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(ManageAccountUiState).get_personName_8yat4n_k$ = function () {
    return this.personName_1;
  };
  protoOf(ManageAccountUiState).get_personUsername_jzuj4k_k$ = function () {
    return this.personUsername_1;
  };
  protoOf(ManageAccountUiState).get_personAuth_8yioyi_k$ = function () {
    return this.personAuth_1;
  };
  protoOf(ManageAccountUiState).component1_7eebsc_k$ = function () {
    return this.passkeyCount_1;
  };
  protoOf(ManageAccountUiState).component2_7eebsb_k$ = function () {
    return this.showCreatePasskey_1;
  };
  protoOf(ManageAccountUiState).component3_7eebsa_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(ManageAccountUiState).component4_7eebs9_k$ = function () {
    return this.personName_1;
  };
  protoOf(ManageAccountUiState).component5_7eebs8_k$ = function () {
    return this.personUsername_1;
  };
  protoOf(ManageAccountUiState).component6_7eebs7_k$ = function () {
    return this.personAuth_1;
  };
  protoOf(ManageAccountUiState).copy_c9pki4_k$ = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth) {
    return new ManageAccountUiState(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth);
  };
  protoOf(ManageAccountUiState).copy$default_l367o7_k$ = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, $super) {
    passkeyCount = passkeyCount === VOID ? this.passkeyCount_1 : passkeyCount;
    showCreatePasskey = showCreatePasskey === VOID ? this.showCreatePasskey_1 : showCreatePasskey;
    passkeySupported = passkeySupported === VOID ? this.passkeySupported_1 : passkeySupported;
    personName = personName === VOID ? this.personName_1 : personName;
    personUsername = personUsername === VOID ? this.personUsername_1 : personUsername;
    personAuth = personAuth === VOID ? this.personAuth_1 : personAuth;
    return $super === VOID ? this.copy_c9pki4_k$(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth) : $super.copy_c9pki4_k$.call(this, passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth);
  };
  protoOf(ManageAccountUiState).toString = function () {
    return 'ManageAccountUiState(passkeyCount=' + this.passkeyCount_1 + ', showCreatePasskey=' + this.showCreatePasskey_1 + ', passkeySupported=' + this.passkeySupported_1 + ', personName=' + this.personName_1 + ', personUsername=' + this.personUsername_1 + ', personAuth=' + this.personAuth_1 + ')';
  };
  protoOf(ManageAccountUiState).hashCode = function () {
    var result = this.passkeyCount_1;
    result = imul(result, 31) + getBooleanHashCode(this.showCreatePasskey_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.passkeySupported_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.personName_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.personUsername_1) | 0;
    result = imul(result, 31) + (this.personAuth_1 == null ? 0 : hashCode(this.personAuth_1)) | 0;
    return result;
  };
  protoOf(ManageAccountUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ManageAccountUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ManageAccountUiState ? other : THROW_CCE();
    if (!(this.passkeyCount_1 === tmp0_other_with_cast.passkeyCount_1))
      return false;
    if (!(this.showCreatePasskey_1 === tmp0_other_with_cast.showCreatePasskey_1))
      return false;
    if (!(this.passkeySupported_1 === tmp0_other_with_cast.passkeySupported_1))
      return false;
    if (!(this.personName_1 === tmp0_other_with_cast.personName_1))
      return false;
    if (!(this.personUsername_1 === tmp0_other_with_cast.personUsername_1))
      return false;
    if (!equals(this.personAuth_1, tmp0_other_with_cast.personAuth_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_11() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_5(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza(receiver);
    }, null);
  }
  function apiUrlConfig$factory_12() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_5(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_0() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza(receiver);
    }, null);
  }
  function PasskeyListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PasskeyListViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PasskeyListViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(PasskeyListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_sgz4sa_k$(this.this$0__1.passkeysPagingSource_1);
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PasskeyListViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new PasskeyListViewModel$slambda$slambda(this.this$0__1, completion);
  };
  function PasskeyListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PasskeyListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_apiUrlConfig__mldllg_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_14();
    return this_0.get_value_j01efc_k$();
  }
  function _get_passkeysPagingSource__7ezpr5($this) {
    return $this.passkeysPagingSource_1;
  }
  function _get_impl__d88w17_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.impl$delegate_1;
    impl$factory_6();
    return this_0.get_value_j01efc_k$();
  }
  function Companion_178() {
    Companion_instance_178 = this;
    this.DEST_NAME_1 = 'PasskeyList';
  }
  protoOf(Companion_178).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_178;
  function Companion_getInstance_239() {
    if (Companion_instance_178 == null)
      new Companion_178();
    return Companion_instance_178;
  }
  function PasskeyListViewModel$passkeysPagingSource$lambda(this$0) {
    return function () {
      return this$0.repo_1.personPasskeyDao_9yc2pz_k$().getAllActivePasskeysPaging_mlq2oc_k$(this$0.get_accountManager_bzeywn_k$().get_currentAccount_cejnur_k$().get_personUid_mmhd76_k$());
    };
  }
  function PasskeyListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PasskeyListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PasskeyListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PasskeyListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = this.this$0__1.get__uiState_8tkbd_k$();
            suspendResult = whenSubscribed(tmp_0, PasskeyListViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PasskeyListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PasskeyListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PasskeyListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PasskeyListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PasskeyListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PasskeyListViewModel$revokePasskey$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PasskeyListViewModel$revokePasskey$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(PasskeyListViewModel$revokePasskey$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PasskeyListViewModel$revokePasskey$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.repo_1.personPasskeyDao_9yc2pz_k$().revokePersonPasskey_6w2gh0_k$(this.this$0__1.get__uiState_8tkbd_k$().get_value_j01efc_k$().personPasskeyUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.onDismissRevokePasskeyDialog_nuzf0r_k$();
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(PasskeyListViewModel$revokePasskey$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new PasskeyListViewModel$revokePasskey$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(PasskeyListViewModel$revokePasskey$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function PasskeyListViewModel$revokePasskey$slambda_0(this$0, resultContinuation) {
    var i = new PasskeyListViewModel$revokePasskey$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PasskeyListViewModel(di, savedStateHandle) {
    Companion_getInstance_239();
    UstadListViewModel.call(this, di, savedStateHandle, new PasskeyListUiState(), 'PasskeyList');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_13());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(_get_apiUrlConfig__mldllg_6(this).get_systemBaseUrl_qu6zd2_k$());
    var trigger = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_2 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.invoke_4wgfc3_k$(tmp$ret$2, context);
    var tmp$ret$4 = On(di, tmp$ret$3, trigger);
    var tmp_4 = get_direct(tmp$ret$4).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_1.repo_1 = tmp_4.Instance_vwdrk9_k$(tmp$ret$5, null).requireRepository$default_mgkaoa_k$();
    var tmp_6 = this;
    tmp_6.passkeysPagingSource_1 = PasskeyListViewModel$passkeysPagingSource$lambda(this);
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.impl$delegate_1 = Instance(this, tmp$ret$7, null).provideDelegate_o2qlc1_k$(this, impl$factory_5());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.passkey.PasskeyListViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_2(this).getString_a9yhoi_k$(strings_getInstance().get_passkeys_boldiq_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, true, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_9, VOID, VOID, PasskeyListViewModel$slambda_0(this, null));
  }
  protoOf(PasskeyListViewModel).get_repo_wotlmj_k$ = function () {
    return this.repo_1;
  };
  protoOf(PasskeyListViewModel).onDismissRevokePasskeyDialog_nuzf0r_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.passkey.PasskeyListViewModel.onDismissRevokePasskeyDialog.<anonymous>' call
        var nextValue = prevValue.copy$default_sgz4sa_k$(VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PasskeyListViewModel).findUserChallenge_z4z05h_k$ = function (userChallenge) {
    var challenge = decodeToString(decodeBase64Bytes(userChallenge));
    return this.get_json_woos35_k$().decodeFromString_jwu9sq_k$(Companion_getInstance_104().serializer_9w0wvi_k$(), challenge);
  };
  protoOf(PasskeyListViewModel).revokePasskey_svtoc8_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, PasskeyListViewModel$revokePasskey$slambda_0(this, null));
  };
  protoOf(PasskeyListViewModel).onClickRevokePasskey_bs9uqp_k$ = function (personPasskeyUid) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__uiState_8tkbd_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.passkey.PasskeyListViewModel.onClickRevokePasskey.<anonymous>' call
        var nextValue = prevValue.copy$default_sgz4sa_k$(VOID, true, personPasskeyUid);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PasskeyListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    this.get__refreshCommandFlow_t5fb0s_k$().tryEmit_ru0jrz_k$(new RefreshCommand());
  };
  protoOf(PasskeyListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  function PasskeyListUiState$_init_$lambda_3wvayu() {
    return new EmptyPagingSource();
  }
  function PasskeyListUiState(passkeys, showRevokePasskeyDialog, personPasskeyUid) {
    var tmp;
    if (passkeys === VOID) {
      tmp = PasskeyListUiState$_init_$lambda_3wvayu;
    } else {
      tmp = passkeys;
    }
    passkeys = tmp;
    showRevokePasskeyDialog = showRevokePasskeyDialog === VOID ? false : showRevokePasskeyDialog;
    personPasskeyUid = personPasskeyUid === VOID ? new Long(0, 0) : personPasskeyUid;
    this.passkeys_1 = passkeys;
    this.showRevokePasskeyDialog_1 = showRevokePasskeyDialog;
    this.personPasskeyUid_1 = personPasskeyUid;
  }
  protoOf(PasskeyListUiState).get_passkeys_boldiq_k$ = function () {
    return this.passkeys_1;
  };
  protoOf(PasskeyListUiState).get_showRevokePasskeyDialog_62nofq_k$ = function () {
    return this.showRevokePasskeyDialog_1;
  };
  protoOf(PasskeyListUiState).get_personPasskeyUid_ebfum8_k$ = function () {
    return this.personPasskeyUid_1;
  };
  protoOf(PasskeyListUiState).component1_7eebsc_k$ = function () {
    return this.passkeys_1;
  };
  protoOf(PasskeyListUiState).component2_7eebsb_k$ = function () {
    return this.showRevokePasskeyDialog_1;
  };
  protoOf(PasskeyListUiState).component3_7eebsa_k$ = function () {
    return this.personPasskeyUid_1;
  };
  protoOf(PasskeyListUiState).copy_89kvie_k$ = function (passkeys, showRevokePasskeyDialog, personPasskeyUid) {
    return new PasskeyListUiState(passkeys, showRevokePasskeyDialog, personPasskeyUid);
  };
  protoOf(PasskeyListUiState).copy$default_sgz4sa_k$ = function (passkeys, showRevokePasskeyDialog, personPasskeyUid, $super) {
    passkeys = passkeys === VOID ? this.passkeys_1 : passkeys;
    showRevokePasskeyDialog = showRevokePasskeyDialog === VOID ? this.showRevokePasskeyDialog_1 : showRevokePasskeyDialog;
    personPasskeyUid = personPasskeyUid === VOID ? this.personPasskeyUid_1 : personPasskeyUid;
    return $super === VOID ? this.copy_89kvie_k$(passkeys, showRevokePasskeyDialog, personPasskeyUid) : $super.copy_89kvie_k$.call(this, passkeys, showRevokePasskeyDialog, personPasskeyUid);
  };
  protoOf(PasskeyListUiState).toString = function () {
    return 'PasskeyListUiState(passkeys=' + this.passkeys_1 + ', showRevokePasskeyDialog=' + this.showRevokePasskeyDialog_1 + ', personPasskeyUid=' + this.personPasskeyUid_1.toString() + ')';
  };
  protoOf(PasskeyListUiState).hashCode = function () {
    var result = hashCode(this.passkeys_1);
    result = imul(result, 31) + getBooleanHashCode(this.showRevokePasskeyDialog_1) | 0;
    result = imul(result, 31) + this.personPasskeyUid_1.hashCode() | 0;
    return result;
  };
  protoOf(PasskeyListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PasskeyListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PasskeyListUiState ? other : THROW_CCE();
    if (!equals(this.passkeys_1, tmp0_other_with_cast.passkeys_1))
      return false;
    if (!(this.showRevokePasskeyDialog_1 === tmp0_other_with_cast.showRevokePasskeyDialog_1))
      return false;
    if (!this.personPasskeyUid_1.equals(tmp0_other_with_cast.personPasskeyUid_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_13() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_6(receiver);
    }, null);
  }
  function impl$factory_5() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_2(receiver);
    }, null);
  }
  function apiUrlConfig$factory_14() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_6(receiver);
    }, null);
  }
  function impl$factory_6() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_2(receiver);
    }, null);
  }
  function _get__uiState__8e9jsd_44($this) {
    return $this._uiState_1;
  }
  function Companion_179() {
    Companion_instance_179 = this;
    this.DEST_NAME_1 = 'RegisterAgeRedirect';
  }
  protoOf(Companion_179).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_179;
  function Companion_getInstance_240() {
    if (Companion_instance_179 == null)
      new Companion_179();
    return Companion_instance_179;
  }
  function RegisterAgeRedirectViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.onClickNext_jwdi98_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function RegisterAgeRedirectViewModel(di, savedStateHandle) {
    Companion_getInstance_240();
    UstadViewModel.call(this, di, savedStateHandle, 'RegisterAgeRedirect');
    this._uiState_1 = MutableStateFlow(new RegisterAgeRedirectUiState(VOID, systemTimeInMillis()));
    this.uiState_1 = asStateFlow(this._uiState_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.<anonymous>' call
        var tmp0_title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_your_date_of_birth_6i6ugr_k$());
        var tmp = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_next_wor1vg_k$());
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, RegisterAgeRedirectViewModel$onClickNext$ref(this));
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, false, VOID, VOID, false, VOID, tmp1_actionBarButtonState);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(RegisterAgeRedirectViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(RegisterAgeRedirectViewModel).onSetDate_nj1mgd_k$ = function (date) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onSetDate.<anonymous>' call
        var nextValue = prevValue.copy$default_mvo0e_k$(date, VOID, !prevValue.dateOfBirth_1.equals(date) ? null : prevValue.dateOfBirthError_1);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(RegisterAgeRedirectViewModel).onClickNext_jwdi98_k$ = function () {
    var date = this._uiState_1.get_value_j01efc_k$().dateOfBirth_1;
    if (date.equals(new Long(0, 0))) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.copy$default_mvo0e_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$()));
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    }
    // Inline function 'kotlin.Long.minus' call
    var this_1 = systemTimeInMillis();
    var other = imul(24, get_MS_PER_HOUR());
    var tmp$ret$2 = this_1.minus_mfbszm_k$(toLong(other));
    if (date.compareTo_9jj042_k$(tmp$ret$2) > 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_2.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_mvo0e_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_invalid_xocxse_k$()));
          if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_getInstance();
    }
    var dateOfBirthInstant = Companion_getInstance().fromEpochMilliseconds_e2resj_k$(date);
    var isMinor = isDateOfBirthAMinor(dateOfBirthInstant);
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_3 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_3, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    this.putFromSavedStateIfPresent_891b9h_k$(this_3, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    this_3.put_4fpzoq_k$(Companion_getInstance_154().get_ARG_SHOW_ACCEPT_BUTTON_owychz_k$(), 'true');
    this_3.put_4fpzoq_k$(Companion_getInstance_235().get_ARG_DATE_OF_BIRTH_ina7cm_k$(), date.toString());
    var args = this_3.build_1k0s4u_k$();
    if (!isMinor) {
      this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_246().get_DEST_NAME_gmgk7z_k$(), args);
    }
  };
  function RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError) {
    dateOfBirth = dateOfBirth === VOID ? new Long(0, 0) : dateOfBirth;
    maxDate = maxDate === VOID ? Companion_getInstance_11().get_MAX_VALUE_54a9lf_k$() : maxDate;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    this.dateOfBirth_1 = dateOfBirth;
    this.maxDate_1 = maxDate;
    this.dateOfBirthError_1 = dateOfBirthError;
  }
  protoOf(RegisterAgeRedirectUiState).get_dateOfBirth_7hv8kx_k$ = function () {
    return this.dateOfBirth_1;
  };
  protoOf(RegisterAgeRedirectUiState).get_maxDate_f7ts95_k$ = function () {
    return this.maxDate_1;
  };
  protoOf(RegisterAgeRedirectUiState).get_dateOfBirthError_qux8bb_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(RegisterAgeRedirectUiState).component1_7eebsc_k$ = function () {
    return this.dateOfBirth_1;
  };
  protoOf(RegisterAgeRedirectUiState).component2_7eebsb_k$ = function () {
    return this.maxDate_1;
  };
  protoOf(RegisterAgeRedirectUiState).component3_7eebsa_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(RegisterAgeRedirectUiState).copy_d8qktq_k$ = function (dateOfBirth, maxDate, dateOfBirthError) {
    return new RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).copy$default_mvo0e_k$ = function (dateOfBirth, maxDate, dateOfBirthError, $super) {
    dateOfBirth = dateOfBirth === VOID ? this.dateOfBirth_1 : dateOfBirth;
    maxDate = maxDate === VOID ? this.maxDate_1 : maxDate;
    dateOfBirthError = dateOfBirthError === VOID ? this.dateOfBirthError_1 : dateOfBirthError;
    return $super === VOID ? this.copy_d8qktq_k$(dateOfBirth, maxDate, dateOfBirthError) : $super.copy_d8qktq_k$.call(this, dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).toString = function () {
    return 'RegisterAgeRedirectUiState(dateOfBirth=' + this.dateOfBirth_1.toString() + ', maxDate=' + this.maxDate_1.toString() + ', dateOfBirthError=' + this.dateOfBirthError_1 + ')';
  };
  protoOf(RegisterAgeRedirectUiState).hashCode = function () {
    var result = this.dateOfBirth_1.hashCode();
    result = imul(result, 31) + this.maxDate_1.hashCode() | 0;
    result = imul(result, 31) + (this.dateOfBirthError_1 == null ? 0 : getStringHashCode(this.dateOfBirthError_1)) | 0;
    return result;
  };
  protoOf(RegisterAgeRedirectUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterAgeRedirectUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterAgeRedirectUiState ? other : THROW_CCE();
    if (!this.dateOfBirth_1.equals(tmp0_other_with_cast.dateOfBirth_1))
      return false;
    if (!this.maxDate_1.equals(tmp0_other_with_cast.maxDate_1))
      return false;
    if (!(this.dateOfBirthError_1 == tmp0_other_with_cast.dateOfBirthError_1))
      return false;
    return true;
  };
  function _get__uiState__8e9jsd_45($this) {
    return $this._uiState_1;
  }
  function Companion_180() {
    Companion_instance_180 = this;
    this.DEST_NAME_1 = 'WaitForParent';
    this.ARG_USERNAME_1 = 'username';
    this.ARG_PASSWORD_1 = 'password';
    this.ARG_PARENT_CONTACT_1 = 'parentContact';
  }
  protoOf(Companion_180).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_180).get_ARG_USERNAME_s7r9q0_k$ = function () {
    return this.ARG_USERNAME_1;
  };
  protoOf(Companion_180).get_ARG_PASSWORD_3ozvoz_k$ = function () {
    return this.ARG_PASSWORD_1;
  };
  protoOf(Companion_180).get_ARG_PARENT_CONTACT_f8pyar_k$ = function () {
    return this.ARG_PARENT_CONTACT_1;
  };
  var Companion_instance_180;
  function Companion_getInstance_241() {
    if (Companion_instance_180 == null)
      new Companion_180();
    return Companion_instance_180;
  }
  function RegisterMinorWaitForParentViewModel(di, savedStateHandle) {
    Companion_getInstance_241();
    UstadViewModel.call(this, di, savedStateHandle, 'WaitForParent');
    this._uiState_1 = MutableStateFlow(new RegisterMinorWaitForParentUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_register_rt8ne4_k$()), false, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$('username');
        var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
        var tmp1_elvis_lhs = savedStateHandle.get_6bo4tg_k$('password');
        var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
        var tmp2_elvis_lhs = savedStateHandle.get_6bo4tg_k$('parentContact');
        var nextValue_0 = prevValue_0.copy_nc7k0r_k$(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(RegisterMinorWaitForParentViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(RegisterMinorWaitForParentViewModel).onClickOK_pmenjp_k$ = function () {
    this.get_navController_qibdoq_k$().popBackStack_rnnumt_k$('WaitForParent', true);
  };
  function RegisterMinorWaitForParentUiState(username, password, parentContact) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    parentContact = parentContact === VOID ? '' : parentContact;
    this.username_1 = username;
    this.password_1 = password;
    this.parentContact_1 = parentContact;
  }
  protoOf(RegisterMinorWaitForParentUiState).get_username_ytz5i7_k$ = function () {
    return this.username_1;
  };
  protoOf(RegisterMinorWaitForParentUiState).get_password_bodifw_k$ = function () {
    return this.password_1;
  };
  protoOf(RegisterMinorWaitForParentUiState).get_parentContact_mljp4d_k$ = function () {
    return this.parentContact_1;
  };
  protoOf(RegisterMinorWaitForParentUiState).component1_7eebsc_k$ = function () {
    return this.username_1;
  };
  protoOf(RegisterMinorWaitForParentUiState).component2_7eebsb_k$ = function () {
    return this.password_1;
  };
  protoOf(RegisterMinorWaitForParentUiState).component3_7eebsa_k$ = function () {
    return this.parentContact_1;
  };
  protoOf(RegisterMinorWaitForParentUiState).copy_nc7k0r_k$ = function (username, password, parentContact) {
    return new RegisterMinorWaitForParentUiState(username, password, parentContact);
  };
  protoOf(RegisterMinorWaitForParentUiState).copy$default_c66m0h_k$ = function (username, password, parentContact, $super) {
    username = username === VOID ? this.username_1 : username;
    password = password === VOID ? this.password_1 : password;
    parentContact = parentContact === VOID ? this.parentContact_1 : parentContact;
    return $super === VOID ? this.copy_nc7k0r_k$(username, password, parentContact) : $super.copy_nc7k0r_k$.call(this, username, password, parentContact);
  };
  protoOf(RegisterMinorWaitForParentUiState).toString = function () {
    return 'RegisterMinorWaitForParentUiState(username=' + this.username_1 + ', password=' + this.password_1 + ', parentContact=' + this.parentContact_1 + ')';
  };
  protoOf(RegisterMinorWaitForParentUiState).hashCode = function () {
    var result = getStringHashCode(this.username_1);
    result = imul(result, 31) + getStringHashCode(this.password_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.parentContact_1) | 0;
    return result;
  };
  protoOf(RegisterMinorWaitForParentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterMinorWaitForParentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterMinorWaitForParentUiState ? other : THROW_CCE();
    if (!(this.username_1 === tmp0_other_with_cast.username_1))
      return false;
    if (!(this.password_1 === tmp0_other_with_cast.password_1))
      return false;
    if (!(this.parentContact_1 === tmp0_other_with_cast.parentContact_1))
      return false;
    return true;
  };
  function ScheduleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda).invoke_1wyrm9_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_1wyrm9_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new ScheduleEditViewModel$slambda$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function ScheduleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_1wyrm9_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda_1).invoke_ok579w_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_ok579w_k$($completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            tmp_0.this0__1 = new Schedule();
            var tmp_1 = this;
            tmp_1.$this$apply1__1 = this.this0__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_39().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.$this$apply1__1.set_scheduleUid_35xeta_k$(ARGUMENT);
            this.$this$apply1__1.set_scheduleActive_twdrtn_k$(true);
            this.$this$apply1__1.set_scheduleFrequency_w5icgw_k$(Companion_getInstance_39().get_SCHEDULE_FREQUENCY_WEEKLY_xwtrtp_k$());
            return this.this0__1;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new ScheduleEditViewModel$slambda$slambda_1(this.this$0__1, completion);
  };
  function ScheduleEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_ok579w_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ScheduleEditViewModel$slambda$lambda(this$0) {
    return function (schedule) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_nykcb3_k$(schedule);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function _get__uiState__8e9jsd_46($this) {
    return $this._uiState_1;
  }
  function Companion_181() {
    Companion_instance_181 = this;
    this.DEST_NAME_1 = 'ScheduleEdit';
  }
  protoOf(Companion_181).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_181;
  function Companion_getInstance_242() {
    if (Companion_instance_181 == null)
      new Companion_181();
    return Companion_instance_181;
  }
  function ScheduleEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ScheduleEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ScheduleEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.tmp0_serializer0__1 = Companion_getInstance_39().serializer_9w0wvi_k$();
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = ScheduleEditViewModel$slambda$slambda_0(null);
            var tmp_1 = ScheduleEditViewModel$slambda$slambda_2(this.this$0__1, null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(this.tmp0_serializer0__1, VOID, VOID, tmp_0, tmp_1, ScheduleEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_nykcb3_k$(VOID, VOID, VOID, true);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ScheduleEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ScheduleEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function ScheduleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel(di, savedStateHandle) {
    Companion_getInstance_242();
    UstadEditViewModel.call(this, di, savedStateHandle, 'ScheduleEdit');
    this._uiState_1 = MutableStateFlow(new ScheduleEditUiState(VOID, VOID, VOID, false));
    this.uiState_1 = asStateFlow(this._uiState_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>' call
        var tmp0_title = this.createEditTitle_2tyyvi_k$(strings_getInstance().get_add_a_schedule_74clpg_k$(), strings_getInstance().get_edit_schedule_knbshp_k$());
        var tmp = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_done_wokv63_k$());
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, ScheduleEditViewModel$onClickSave$ref(this));
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, VOID, true, VOID, VOID, VOID, tmp1_actionBarButtonState);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, ScheduleEditViewModel$slambda_0(this, null));
  }
  protoOf(ScheduleEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(ScheduleEditViewModel).onEntityChanged_71d7gh_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.entity_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_sceduleStartTime_r41do9_k$();
        var tmp4_toTimeError = this.updateErrorMessageOnChange_silrgy_k$(tmp, entity == null ? null : entity.get_sceduleStartTime_r41do9_k$(), prevValue.toTimeError_1);
        var tmp0_safe_receiver = prevValue.entity_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_scheduleEndTime_vdt9o8_k$();
        var tmp5_fromTimeError = this.updateErrorMessageOnChange_silrgy_k$(tmp_0, entity == null ? null : entity.get_scheduleEndTime_vdt9o8_k$(), prevValue.fromTimeError_1);
        var nextValue = prevValue.copy$default_nykcb3_k$(entity, tmp5_fromTimeError, tmp4_toTimeError);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_39().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_1, VOID, VOID, ScheduleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(ScheduleEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().entity_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var schedule = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        if (schedule.get_sceduleStartTime_r41do9_k$().equals(new Long(0, 0))) {
          tmp_0 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        if (schedule.get_scheduleEndTime_vdt9o8_k$().equals(new Long(0, 0))) {
          tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
        } else if (schedule.get_scheduleEndTime_vdt9o8_k$().compareTo_9jj042_k$(schedule.get_sceduleStartTime_r41do9_k$()) <= 0) {
          tmp_2 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_end_is_before_start_error_iebdqr_k$());
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.copy$default_nykcb3_k$(VOID, tmp_1, tmp_2);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (this._uiState_1.get_value_j01efc_k$().fromTimeError_1 == null ? this._uiState_1.get_value_j01efc_k$().toTimeError_1 == null : false) {
      this.finishWithResult_jlqwtj_k$(schedule);
    }
  };
  function ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    fromTimeError = fromTimeError === VOID ? null : fromTimeError;
    toTimeError = toTimeError === VOID ? null : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.entity_1 = entity;
    this.fromTimeError_1 = fromTimeError;
    this.toTimeError_1 = toTimeError;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(ScheduleEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.entity_1;
  };
  protoOf(ScheduleEditUiState).get_fromTimeError_ya8ih4_k$ = function () {
    return this.fromTimeError_1;
  };
  protoOf(ScheduleEditUiState).get_toTimeError_3tb3iv_k$ = function () {
    return this.toTimeError_1;
  };
  protoOf(ScheduleEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ScheduleEditUiState).component1_7eebsc_k$ = function () {
    return this.entity_1;
  };
  protoOf(ScheduleEditUiState).component2_7eebsb_k$ = function () {
    return this.fromTimeError_1;
  };
  protoOf(ScheduleEditUiState).component3_7eebsa_k$ = function () {
    return this.toTimeError_1;
  };
  protoOf(ScheduleEditUiState).component4_7eebs9_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(ScheduleEditUiState).copy_82k057_k$ = function (entity, fromTimeError, toTimeError, fieldsEnabled) {
    return new ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).copy$default_nykcb3_k$ = function (entity, fromTimeError, toTimeError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.entity_1 : entity;
    fromTimeError = fromTimeError === VOID ? this.fromTimeError_1 : fromTimeError;
    toTimeError = toTimeError === VOID ? this.toTimeError_1 : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_82k057_k$(entity, fromTimeError, toTimeError, fieldsEnabled) : $super.copy_82k057_k$.call(this, entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).toString = function () {
    return 'ScheduleEditUiState(entity=' + this.entity_1 + ', fromTimeError=' + this.fromTimeError_1 + ', toTimeError=' + this.toTimeError_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(ScheduleEditUiState).hashCode = function () {
    var result = this.entity_1 == null ? 0 : this.entity_1.hashCode();
    result = imul(result, 31) + (this.fromTimeError_1 == null ? 0 : getStringHashCode(this.fromTimeError_1)) | 0;
    result = imul(result, 31) + (this.toTimeError_1 == null ? 0 : getStringHashCode(this.toTimeError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(ScheduleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScheduleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScheduleEditUiState ? other : THROW_CCE();
    if (!equals(this.entity_1, tmp0_other_with_cast.entity_1))
      return false;
    if (!(this.fromTimeError_1 == tmp0_other_with_cast.fromTimeError_1))
      return false;
    if (!(this.toTimeError_1 == tmp0_other_with_cast.toTimeError_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda$lambda() {
    return 'Error occurred during creating passkey';
  }
  function OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda$lambda_0(this$0) {
    return function () {
      return 'AddSignUpPresenter: go to next destination: ' + this$0.nextDestination_1;
    };
  }
  function _get__uiState__8e9jsd_47($this) {
    return $this._uiState_1;
  }
  function _get_serverUrl__j7eug5_1($this) {
    return $this.serverUrl_1;
  }
  function _get_isParent__1spe53($this) {
    return $this.isParent_1;
  }
  function _get_apiUrlConfig__mldllg_7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_16();
    return this_0.get_value_j01efc_k$();
  }
  function _get_getLocalAccountsSupportedUseCase__hoi7c7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getLocalAccountsSupportedUseCase$delegate_1;
    getLocalAccountsSupportedUseCase$factory_0();
    return this_0.get_value_j01efc_k$();
  }
  function _get_createPasskeyUseCase__ryoxza_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.createPasskeyUseCase$delegate_1;
    createPasskeyUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _set_nextDestination__vdv3ka_1($this, _set____db54di) {
    $this.nextDestination_1 = _set____db54di;
  }
  function _get_nextDestination__tjiqwa_2($this) {
    return $this.nextDestination_1;
  }
  function _get_enrollToCourseFromInviteCodeUseCase__6djli($this) {
    return $this.enrollToCourseFromInviteCodeUseCase_1;
  }
  function Companion_182() {
    Companion_instance_182 = this;
    this.DEST_NAME_1 = 'otheroption';
    this.ARG_PERSON_1 = 'otheroptionperson';
    this.ARG_PERSON_PROFILE_PIC_1 = 'otheroptionpersonprofilepic';
    this.IS_PARENT_1 = 'isparent';
  }
  protoOf(Companion_182).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_182).get_ARG_PERSON_fvh0xz_k$ = function () {
    return this.ARG_PERSON_1;
  };
  protoOf(Companion_182).get_ARG_PERSON_PROFILE_PIC_lba9ac_k$ = function () {
    return this.ARG_PERSON_PROFILE_PIC_1;
  };
  protoOf(Companion_182).get_IS_PARENT_ia4hiu_k$ = function () {
    return this.IS_PARENT_1;
  };
  var Companion_instance_182;
  function Companion_getInstance_243() {
    if (Companion_instance_182 == null)
      new Companion_182();
    return Companion_instance_182;
  }
  function OtherSignUpOptionSelectionViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(OtherSignUpOptionSelectionViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(OtherSignUpOptionSelectionViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(OtherSignUpOptionSelectionViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, 'otheroptionperson', Companion_getInstance_7().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_elvis_lhs0__1 = suspendResult;
            this.person1__1 = this.tmp0_elvis_lhs0__1 == null ? new Person() : this.tmp0_elvis_lhs0__1;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, 'otheroptionpersonprofilepic', Companion_getInstance_59().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp1_elvis_lhs = suspendResult;
            var personPic = tmp1_elvis_lhs == null ? new PersonPicture() : tmp1_elvis_lhs;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_jdzhkv_k$(VOID, this.person1__1, personPic, !(_get_createPasskeyUseCase__ryoxza_0(this.this$0__1) == null));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(OtherSignUpOptionSelectionViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new OtherSignUpOptionSelectionViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(OtherSignUpOptionSelectionViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function OtherSignUpOptionSelectionViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new OtherSignUpOptionSelectionViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(8);
            this.set_state_rjd8d0_k$(1);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_7().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.uid0__1 = suspendResult;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().person_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.savePerson1__1 = tmp_1;
            this.savePerson1__1.set_personUid_j3idds_k$(this.uid0__1);
            this.tmp1_safe_receiver2__1 = _get_createPasskeyUseCase__ryoxza_0(this.this$0__1);
            if (this.tmp1_safe_receiver2__1 == null) {
              this.WHEN_RESULT3__1 = null;
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.tmp1_safe_receiver2__1.invoke_1uee3l_k$(toString_1(this.savePerson1__1.get_username_ytz5i7_k$()), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.WHEN_RESULT3__1 = suspendResult;
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            this.passkeyCreated4__1 = this.WHEN_RESULT3__1;
            this.tmp2_safe_receiver5__1 = this.passkeyCreated4__1;
            if (this.tmp2_safe_receiver5__1 == null) {
              this.WHEN_RESULT6__1 = null;
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.this7__1 = this.tmp2_safe_receiver5__1;
              var tmp_3 = this;
              tmp_3.it8__1 = this.this7__1;
              this.set_state_rjd8d0_k$(4);
              suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().registerWithPasskey_a5qkol_k$(this.this$0__1.serverUrl_1, this.it8__1, this.savePerson1__1, this.this$0__1._uiState_1.get_value_j01efc_k$().personPicture_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            var tmp_4 = this;
            tmp_4.WHEN_RESULT6__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 5:
            if (this.passkeyCreated4__1 == null) {
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_sorry_something_went_wrong_8e4v8u_k$())));
              var tmp_5 = Napier_getInstance();
              tmp_5.e$default_s5p7m2_k$(VOID, VOID, OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda$lambda);
              return Unit_getInstance();
            }

            if (this.this$0__1.isParent_1) {
              var tmp_6 = this.this$0__1.get_navController_qibdoq_k$();
              var tmp_7 = Companion_getInstance_232().get_DEST_NAME_gmgk7z_k$();
              var this_0 = LinkedHashMap_init_$Create$_0();
              this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), this.this$0__1.nextDestination_1);
              this.this$0__1.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
              tmp_6.navigate$default_srzzsc_k$(tmp_7, this_0.build_1k0s4u_k$());
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(6);
              suspendResult = this.this$0__1.enrollToCourseFromInviteUid_82kyh6_k$(this.savePerson1__1.get_personUid_mmhd76_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 6:
            var goOptions = new UstadGoOptions(VOID, VOID, true);
            var tmp_8 = Napier_getInstance();
            tmp_8.d$default_iccotn_k$(VOID, VOID, OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda$lambda_0(this.this$0__1));
            this.this$0__1.navigateToViewUri_qtkrj7_k$(this.this$0__1.get_navController_qibdoq_k$(), appendSelectedAccount(this.this$0__1.nextDestination_1, this.savePerson1__1.get_personUid_mmhd76_k$(), new LearningSpace(this.this$0__1.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$())), goOptions);
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            return Unit_getInstance();
          case 8:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 8) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda_0(this$0, resultContinuation) {
    var i = new OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_exceptionState_fex74n_k$(4);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().createLocalAccount_pjlbbe_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var goOptions = new UstadGoOptions(VOID, VOID, true);
            var tmp_0 = this;
            this.this$0__1.get_navController_qibdoq_k$().navigate_6urlkw_k$(Companion_getInstance_204().get_DEST_NAME_HOME_lftflt_k$(), emptyMap(), goOptions);
            tmp_0.tmp$ret$00__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(5);
            this.set_state_rjd8d0_k$(6);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_1 = this.get_exception_x0n6w6_k$();
            if (tmp_1 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_2 = this;
              Napier_getInstance().e$default_pvzj32_k$('Error during login: ' + e.message, e);
              tmp_2.tmp$ret$00__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(5);
              this.set_state_rjd8d0_k$(6);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 4:
            this.set_exceptionState_fex74n_k$(5);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            throw t;
          case 5:
            throw this.get_exception_x0n6w6_k$();
          case 6:
            this.set_exceptionState_fex74n_k$(5);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 5) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda_0(this$0, resultContinuation) {
    var i = new OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $enrollToCourseFromInviteUidCOROUTINE$67(_this__u8e3s4, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.personUid_1 = personUid;
  }
  protoOf($enrollToCourseFromInviteUidCOROUTINE$67).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_exceptionState_fex74n_k$(3);
            this.viewUri0__1 = this._this__u8e3s4__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
            if (!(this.viewUri0__1 == null) ? contains(this.viewUri0__1, 'ClazzInviteRedeem') : false) {
              this._this__u8e3s4__1.nextDestination_1 = Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$();
              this.set_state_rjd8d0_k$(1);
              suspendResult = this._this__u8e3s4__1.enrollToCourseFromInviteCodeUseCase_1.invoke_5rp4yz_k$(this.viewUri0__1, this.personUid_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(5);
            continue $sm;
          case 3:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this.get_exception_x0n6w6_k$();
            if (tmp_0 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              print(e.message);
              this.set_state_rjd8d0_k$(5);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 4:
            throw this.get_exception_x0n6w6_k$();
          case 5:
            this.set_exceptionState_fex74n_k$(4);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  function OtherSignUpOptionSelectionViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_243();
    destName = destName === VOID ? 'otheroption' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this._uiState_1 = MutableStateFlow(new OtherSignUpOptionSelectionUiState());
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$());
    tmp.serverUrl_1 = tmp0_elvis_lhs == null ? 'http://localhost' : tmp0_elvis_lhs;
    this.isParent_1 = toBoolean(savedStateHandle.get_6bo4tg_k$('isparent'));
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_15());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(GetLocalAccountsSupportedUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.getLocalAccountsSupportedUseCase$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, getLocalAccountsSupportedUseCase$factory());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.serverUrl_1);
    var trigger = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_5 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.invoke_4wgfc3_k$(tmp$ret$4, context);
    var this_0 = On(di, tmp$ret$5, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(CreatePasskeyUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_4.createPasskeyUseCase$delegate_1 = InstanceOrNull(this_0, tmp$ret$7, null).provideDelegate_o2qlc1_k$(this, createPasskeyUseCase$factory_1());
    var tmp_8 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
    tmp_8.nextDestination_1 = tmp0_elvis_lhs_0 == null ? Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$() : tmp0_elvis_lhs_0;
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.serverUrl_1);
    var trigger_0 = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_10 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    var tmp$ret$10 = tmp_10.invoke_4wgfc3_k$(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_12 = get_direct(tmp$ret$11).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_9.enrollToCourseFromInviteCodeUseCase_1 = tmp_12.Instance_vwdrk9_k$(tmp$ret$12, null);
    var tmp_14 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_14, VOID, VOID, OtherSignUpOptionSelectionViewModel$slambda_0(this, savedStateHandle, null));
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_other_options_2lmedi_k$());
    if (_get_getLocalAccountsSupportedUseCase__hoi7c7(this).invoke_jkqnwo_k$()) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this._uiState_1;
        while (true) {
          var prevValue = this_1.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.OtherSignUpOptionSelectionViewModel.<anonymous>' call
          var nextValue = prevValue.copy$default_jdzhkv_k$(true);
          if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue_0 = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.OtherSignUpOptionSelectionViewModel.<anonymous>' call
        var nextValue_0 = new AppUiState(VOID, VOID, title, false, true, VOID, false, VOID, VOID, VOID, false);
        if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(OtherSignUpOptionSelectionViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(OtherSignUpOptionSelectionViewModel).onSignUpWithPasskey_6d6lvj_k$ = function () {
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, OtherSignUpOptionSelectionViewModel$onSignUpWithPasskey$slambda_0(this, null));
  };
  protoOf(OtherSignUpOptionSelectionViewModel).onClickCreateLocalAccount_saa6y1_k$ = function () {
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, OtherSignUpOptionSelectionViewModel$onClickCreateLocalAccount$slambda_0(this, null));
  };
  protoOf(OtherSignUpOptionSelectionViewModel).onclickSignUpWithUsernameAdPassword_wcowdn_k$ = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.signup.OtherSignUpOptionSelectionViewModel.onclickSignUpWithUsernameAdPassword.<anonymous>' call
    this_0.put_4fpzoq_k$(Companion_getInstance_244().get_SIGN_WITH_USERNAME_AND_PASSWORD_ulfoj8_k$(), 'true');
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    var tmp = this.get_json_woos35_k$();
    var tmp_0 = Companion_getInstance_7().serializer_9w0wvi_k$();
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().person_1;
    this_0.put_4fpzoq_k$('otheroptionperson', tmp.encodeToString_k0apqx_k$(tmp_0, tmp0_elvis_lhs == null ? new Person() : tmp0_elvis_lhs));
    var tmp_1 = this.get_json_woos35_k$();
    var tmp_2 = Companion_getInstance_59().serializer_9w0wvi_k$();
    var tmp1_elvis_lhs = this._uiState_1.get_value_j01efc_k$().personPicture_1;
    this_0.put_4fpzoq_k$('otheroptionpersonprofilepic', tmp_1.encodeToString_k0apqx_k$(tmp_2, tmp1_elvis_lhs == null ? new PersonPicture() : tmp1_elvis_lhs));
    this_0.put_4fpzoq_k$('isparent', toString_1(this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$('isparent')));
    var args = this_0.build_1k0s4u_k$();
    this.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(Companion_getInstance_245().get_DEST_NAME_gmgk7z_k$(), args);
  };
  protoOf(OtherSignUpOptionSelectionViewModel).enrollToCourseFromInviteUid_82kyh6_k$ = function (personUid, $completion) {
    var tmp = new $enrollToCourseFromInviteUidCOROUTINE$67(this, personUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  function OtherSignUpOptionSelectionUiState(showCreateLocaleAccount, person, personPicture, passkeySupported) {
    showCreateLocaleAccount = showCreateLocaleAccount === VOID ? false : showCreateLocaleAccount;
    person = person === VOID ? null : person;
    personPicture = personPicture === VOID ? null : personPicture;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    this.showCreateLocaleAccount_1 = showCreateLocaleAccount;
    this.person_1 = person;
    this.personPicture_1 = personPicture;
    this.passkeySupported_1 = passkeySupported;
  }
  protoOf(OtherSignUpOptionSelectionUiState).get_showCreateLocaleAccount_io8sb3_k$ = function () {
    return this.showCreateLocaleAccount_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).get_personPicture_te1agw_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).get_passkeySupported_uozb13_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).component1_7eebsc_k$ = function () {
    return this.showCreateLocaleAccount_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).component2_7eebsb_k$ = function () {
    return this.person_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).component3_7eebsa_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).component4_7eebs9_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(OtherSignUpOptionSelectionUiState).copy_feumq9_k$ = function (showCreateLocaleAccount, person, personPicture, passkeySupported) {
    return new OtherSignUpOptionSelectionUiState(showCreateLocaleAccount, person, personPicture, passkeySupported);
  };
  protoOf(OtherSignUpOptionSelectionUiState).copy$default_jdzhkv_k$ = function (showCreateLocaleAccount, person, personPicture, passkeySupported, $super) {
    showCreateLocaleAccount = showCreateLocaleAccount === VOID ? this.showCreateLocaleAccount_1 : showCreateLocaleAccount;
    person = person === VOID ? this.person_1 : person;
    personPicture = personPicture === VOID ? this.personPicture_1 : personPicture;
    passkeySupported = passkeySupported === VOID ? this.passkeySupported_1 : passkeySupported;
    return $super === VOID ? this.copy_feumq9_k$(showCreateLocaleAccount, person, personPicture, passkeySupported) : $super.copy_feumq9_k$.call(this, showCreateLocaleAccount, person, personPicture, passkeySupported);
  };
  protoOf(OtherSignUpOptionSelectionUiState).toString = function () {
    return 'OtherSignUpOptionSelectionUiState(showCreateLocaleAccount=' + this.showCreateLocaleAccount_1 + ', person=' + this.person_1 + ', personPicture=' + this.personPicture_1 + ', passkeySupported=' + this.passkeySupported_1 + ')';
  };
  protoOf(OtherSignUpOptionSelectionUiState).hashCode = function () {
    var result = getBooleanHashCode(this.showCreateLocaleAccount_1);
    result = imul(result, 31) + (this.person_1 == null ? 0 : this.person_1.hashCode()) | 0;
    result = imul(result, 31) + (this.personPicture_1 == null ? 0 : this.personPicture_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.passkeySupported_1) | 0;
    return result;
  };
  protoOf(OtherSignUpOptionSelectionUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OtherSignUpOptionSelectionUiState))
      return false;
    var tmp0_other_with_cast = other instanceof OtherSignUpOptionSelectionUiState ? other : THROW_CCE();
    if (!(this.showCreateLocaleAccount_1 === tmp0_other_with_cast.showCreateLocaleAccount_1))
      return false;
    if (!equals(this.person_1, tmp0_other_with_cast.person_1))
      return false;
    if (!equals(this.personPicture_1, tmp0_other_with_cast.personPicture_1))
      return false;
    if (!(this.passkeySupported_1 === tmp0_other_with_cast.passkeySupported_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_15() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_7(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_1() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_0(receiver);
    }, null);
  }
  function apiUrlConfig$factory_16() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_7(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory_0() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_2() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_0(receiver);
    }, null);
  }
  function SignUpViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda).invoke_7ynhv5_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_7ynhv5_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(SignUpViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SignUpViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_7ynhv5_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_1).invoke_g2i2lq_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_g2i2lq_k$($completion);
  };
  protoOf(SignUpViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return new Person();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new SignUpViewModel$slambda$slambda_1(completion);
  };
  function SignUpViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_g2i2lq_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SignUpViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp1_safe_receiver = it == null ? null : it.fullName_m0cs6y_k$();
          var tmp;
          if (tmp1_safe_receiver == null) {
            tmp = null;
          } else {
            // Inline function 'kotlin.text.trim' call
            tmp = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
          }
          var tmp2_elvis_lhs = tmp;
          var nextValue = prevValue.copy$default_lh2gcy_k$(it, VOID, VOID, VOID, VOID, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function SignUpViewModel$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_3).invoke_6zlnr_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_6zlnr_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_3).create_9q7izm_k$ = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda_3(completion);
    i.it_1 = it;
    return i;
  };
  protoOf(SignUpViewModel$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SignUpViewModel$slambda$slambda_4(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_3(resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_6zlnr_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_5).invoke_o4mflw_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$slambda$slambda_5).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_o4mflw_k$($completion);
  };
  protoOf(SignUpViewModel$slambda$slambda_5).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return new PersonPicture();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_5).create_d196fn_k$ = function (completion) {
    return new SignUpViewModel$slambda$slambda_5(completion);
  };
  function SignUpViewModel$slambda$slambda_6(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.invoke_o4mflw_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SignUpViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function SignUpViewModel$onFullNameFocusedChanged$slambda$lambda($suggestedUsername) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_username_tgnlmk_k$($suggestedUsername);
      return Unit_getInstance();
    };
  }
  function SignUpViewModel$onClickSignup$slambda$lambda($e) {
    return function () {
      return 'exception ' + $e.message;
    };
  }
  function _get__uiState__8e9jsd_48($this) {
    return $this._uiState_1;
  }
  function _get_validateUsernameUseCase__yg4coq_2($this) {
    return $this.validateUsernameUseCase_1;
  }
  function _set_nextDestination__vdv3ka_2($this, _set____db54di) {
    $this.nextDestination_1 = _set____db54di;
  }
  function _get_nextDestination__tjiqwa_3($this) {
    return $this.nextDestination_1;
  }
  function _get_apiUrlConfig__mldllg_8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_18();
    return this_0.get_value_j01efc_k$();
  }
  function _get_getLocalAccountsSupportedUseCase__hoi7c7_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.getLocalAccountsSupportedUseCase$delegate_1;
    getLocalAccountsSupportedUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_serverUrl__j7eug5_2($this) {
    return $this.serverUrl_1;
  }
  function _get_createPasskeyUseCase__ryoxza_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.createPasskeyUseCase$delegate_1;
    createPasskeyUseCase$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function _get_genderConfig__kyr0zc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.genderConfig$delegate_1;
    genderConfig$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function _get_getUsernameSuggestionUseCase__u0zw64($this) {
    return $this.getUsernameSuggestionUseCase_1;
  }
  function _get_filterUsernameUseCase__xlwzqg_2($this) {
    return $this.filterUsernameUseCase_1;
  }
  function _set_usernameSuggestionJob__2mdsxu($this, _set____db54di) {
    $this.usernameSuggestionJob_1 = _set____db54di;
  }
  function _get_usernameSuggestionJob__3j8jhu($this) {
    return $this.usernameSuggestionJob_1;
  }
  function _get_enqueueSavePictureUseCase__rl1s31_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.enqueueSavePictureUseCase$delegate_1;
    enqueueSavePictureUseCase$factory_2();
    return this_0.get_value_j01efc_k$();
  }
  function _get_enrollToCourseFromInviteCodeUseCase__6djli_0($this) {
    return $this.enrollToCourseFromInviteCodeUseCase_1;
  }
  function hasErrors_5(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.fullNameError_1 == null) ? true : !(_this__u8e3s4.genderError_1 == null)) ? true : !(_this__u8e3s4.usernameError_1 == null);
  }
  function navigateToAppropriateScreen($this, savePerson) {
    if ($this._uiState_1.get_value_j01efc_k$().isParent_1) {
      var tmp = $this.get_navController_qibdoq_k$();
      var tmp_0 = Companion_getInstance_232().get_DEST_NAME_gmgk7z_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.navigateToAppropriateScreen.<anonymous>' call
      this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), $this.nextDestination_1);
      $this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().REGISTRATION_ARGS_TO_PASS_1);
      $this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
      var tmp$ret$2 = this_0.build_1k0s4u_k$();
      tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp_1 = Napier_getInstance();
      tmp_1.d$default_iccotn_k$(VOID, VOID, SignUpViewModel$navigateToAppropriateScreen$lambda($this));
      $this.navigateToViewUri_qtkrj7_k$($this.get_navController_qibdoq_k$(), appendSelectedAccount($this.nextDestination_1, savePerson.get_personUid_mmhd76_k$(), new LearningSpace($this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$())), goOptions);
    }
  }
  function enrollToCourseFromInviteUid($this, personUid, $completion) {
    var tmp = new $enrollToCourseFromInviteUidCOROUTINE$68($this, personUid, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function Companion_183() {
    Companion_instance_183 = this;
    this.STATE_KEY_PICTURE_1 = 'picState';
    this.DEST_NAME_1 = 'SignUp';
    this.ARG_DATE_OF_BIRTH_1 = 'DateOfBirth';
    this.ARG_IS_PERSONAL_ACCOUNT_1 = 'personalAccount';
    this.ARG_NEW_OR_EXISTING_USER_1 = 'newOrExisting';
    this.ARG_VAL_NEW_USER_1 = 'new';
    this.ARG_VAL_EXISTING_USER_1 = 'existing';
    this.REGISTRATION_ARGS_TO_PASS_1 = listOf([Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), Companion_getInstance_154().get_ARG_SHOW_ACCEPT_BUTTON_owychz_k$(), Companion_getInstance_156().get_ARG_POPUPTO_ON_FINISH_sh92d3_k$(), 'DateOfBirth', Companion_getInstance_235().get_ARG_REGISTRATION_MODE_eedyt3_k$(), 'newOrExisting', 'personalAccount']);
    this.SIGN_WITH_USERNAME_AND_PASSWORD_1 = 'SignupWithUsernameAndPassword';
  }
  protoOf(Companion_183).get_STATE_KEY_PICTURE_txsh9j_k$ = function () {
    return this.STATE_KEY_PICTURE_1;
  };
  protoOf(Companion_183).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_183).get_ARG_DATE_OF_BIRTH_ina7cm_k$ = function () {
    return this.ARG_DATE_OF_BIRTH_1;
  };
  protoOf(Companion_183).get_ARG_IS_PERSONAL_ACCOUNT_yt5p7z_k$ = function () {
    return this.ARG_IS_PERSONAL_ACCOUNT_1;
  };
  protoOf(Companion_183).get_ARG_NEW_OR_EXISTING_USER_v4h2ks_k$ = function () {
    return this.ARG_NEW_OR_EXISTING_USER_1;
  };
  protoOf(Companion_183).get_ARG_VAL_NEW_USER_g702u_k$ = function () {
    return this.ARG_VAL_NEW_USER_1;
  };
  protoOf(Companion_183).get_ARG_VAL_EXISTING_USER_9ael69_k$ = function () {
    return this.ARG_VAL_EXISTING_USER_1;
  };
  protoOf(Companion_183).get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$ = function () {
    return this.REGISTRATION_ARGS_TO_PASS_1;
  };
  protoOf(Companion_183).get_SIGN_WITH_USERNAME_AND_PASSWORD_ulfoj8_k$ = function () {
    return this.SIGN_WITH_USERNAME_AND_PASSWORD_1;
  };
  var Companion_instance_183;
  function Companion_getInstance_244() {
    if (Companion_instance_183 == null)
      new Companion_183();
    return Companion_instance_183;
  }
  function SignUpViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_7().serializer_9w0wvi_k$();
            var tmp_1 = Companion_getInstance_243().get_ARG_PERSON_fvh0xz_k$();
            var tmp_2 = SignUpViewModel$slambda$slambda_0(null);
            var tmp_3 = SignUpViewModel$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, tmp_1, tmp_2, tmp_3, SignUpViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            var tmp_4 = Companion_getInstance_59().serializer_9w0wvi_k$();
            var tmp_5 = Companion_getInstance_243().get_ARG_PERSON_PROFILE_PIC_lba9ac_k$();
            var tmp_6 = SignUpViewModel$slambda$slambda_4(null);
            var tmp_7 = SignUpViewModel$slambda$slambda_6(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_4, VOID, tmp_5, tmp_6, tmp_7, SignUpViewModel$slambda$lambda_0(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignUpViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignUpViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignUpViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SignUpViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignUpViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignUpViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignUpViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SignUpViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.this$0__1 = this$0;
    this.$personPicture_1 = $personPicture;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.setJson_jnpl42_k$(this.this$0__1.get_savedStateHandle_xtsxet_k$(), 'picState', Companion_getInstance_59().serializer_9w0wvi_k$(), this.$personPicture_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignUpViewModel$onPersonPictureChanged$slambda(this.this$0__1, this.$personPicture_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignUpViewModel$onPersonPictureChanged$slambda_0(this$0, $personPicture, resultContinuation) {
    var i = new SignUpViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onUsernameChanged$lambda($filteredValue) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_username_tgnlmk_k$($filteredValue);
      return Unit_getInstance();
    };
  }
  function SignUpViewModel$onFullNameFocusedChanged$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().fullName_1;
            tmp_0.fullName0__1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            if (isBlank(this.fullName0__1))
              return Unit_getInstance();
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getUsernameSuggestionUseCase_1.invoke_7h204h_k$(this.fullName0__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var suggestedUsername = suspendResult;
            var tmp0_safe_receiver = this.this$0__1._uiState_1.get_value_j01efc_k$().person_1;
            var tmp_1;
            if (tmp0_safe_receiver == null) {
              tmp_1 = null;
            } else {
              tmp_1 = shallowCopy(tmp0_safe_receiver, SignUpViewModel$onFullNameFocusedChanged$slambda$lambda(suggestedUsername));
            }

            var updatedPerson = tmp_1;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp0_safe_receiver_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().person_1;
                var tmp_2 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_username_ytz5i7_k$();
                var nextValue = prevValue.copy$default_lh2gcy_k$(updatedPerson, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.updateErrorMessageOnChange_silrgy_k$(tmp_2, updatedPerson == null ? null : updatedPerson.get_username_ytz5i7_k$(), this.this$0__1._uiState_1.get_value_j01efc_k$().usernameError_1));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_3 = this.get_exception_x0n6w6_k$();
            if (tmp_3 instanceof UsernameErrorException) {
              var e = this.get_exception_x0n6w6_k$();
              l$ret$3: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_0 = this_1.get_value_j01efc_k$();
                  var nextValue_0 = prevValue_0.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.this$0__1.get_systemImpl_9jowp4_k$()));
                  if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              var tmp_4 = this.get_exception_x0n6w6_k$();
              if (tmp_4 instanceof Exception) {
                var e_0 = this.get_exception_x0n6w6_k$();
                l$ret$5: do {
                  var this_2 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue_1 = this_2.get_value_j01efc_k$();
                    var nextValue_1 = prevValue_1.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e_0, this.this$0__1.get_systemImpl_9jowp4_k$()));
                    if (this_2.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
                this.set_state_rjd8d0_k$(4);
                continue $sm;
              } else {
                throw this.get_exception_x0n6w6_k$();
              }
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_1;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_1);
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignUpViewModel$onFullNameFocusedChanged$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignUpViewModel$onFullNameFocusedChanged$slambda_0(this$0, resultContinuation) {
    var i = new SignUpViewModel$onFullNameFocusedChanged$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onClickSignup$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_firstNames_audc9u_k$($firstName);
      $this$shallowCopy.set_lastName_6ukpbb_k$($lastName);
      return Unit_getInstance();
    };
  }
  function SignUpViewModel$onClickSignup$slambda(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savePerson_1 = $savePerson;
    this.$createPasskeyUseCaseVal_1 = $createPasskeyUseCaseVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onClickSignup$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(16);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(15);
            this.set_exceptionState_fex74n_k$(12);
            this.set_state_rjd8d0_k$(3);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_7().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.uid2__1 = suspendResult;
            this.$savePerson_1.set_personUid_j3idds_k$(this.uid2__1);
            if (!(this.$createPasskeyUseCaseVal_1 == null)) {
              this.set_exceptionState_fex74n_k$(9);
              var tmp_0 = this;
              var tmp0_elvis_lhs = this.$savePerson_1.get_username_ytz5i7_k$();
              var tmp_1;
              if (tmp0_elvis_lhs == null) {
                throw IllegalStateException_init_$Create$('username can not be null');
              } else {
                tmp_1 = tmp0_elvis_lhs;
              }
              tmp_0.username3__1 = tmp_1;
              this.set_state_rjd8d0_k$(4);
              suspendResult = this.$createPasskeyUseCaseVal_1.invoke_1uee3l_k$(this.username3__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_2 = this.this$0__1.get_navController_qibdoq_k$();
              var tmp_3 = Companion_getInstance_245().get_DEST_NAME_gmgk7z_k$();
              var this_0 = LinkedHashMap_init_$Create$_0();
              this.this$0__1.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().REGISTRATION_ARGS_TO_PASS_1);
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
              this_0.put_4fpzoq_k$(Companion_getInstance_243().get_ARG_PERSON_fvh0xz_k$(), this.this$0__1.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_7().serializer_9w0wvi_k$(), this.$savePerson_1));
              var tmp_4 = Companion_getInstance_243().get_ARG_PERSON_PROFILE_PIC_lba9ac_k$();
              var tmp_5 = this.this$0__1.get_json_woos35_k$();
              var tmp_6 = Companion_getInstance_59().serializer_9w0wvi_k$();
              var tmp0_elvis_lhs_0 = this.this$0__1._uiState_1.get_value_j01efc_k$().personPicture_1;
              this_0.put_4fpzoq_k$(tmp_4, tmp_5.encodeToString_k0apqx_k$(tmp_6, tmp0_elvis_lhs_0 == null ? new PersonPicture() : tmp0_elvis_lhs_0));
              this_0.put_4fpzoq_k$(Companion_getInstance_243().get_IS_PARENT_ia4hiu_k$(), this.this$0__1._uiState_1.get_value_j01efc_k$().isParent_1.toString());
              tmp_2.navigate$default_srzzsc_k$(tmp_3, this_0.build_1k0s4u_k$());
              this.set_state_rjd8d0_k$(11);
              continue $sm;
            }

          case 4:
            this.passkeyCreated4__1 = suspendResult;
            this.set_state_rjd8d0_k$(5);
            suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().registerWithPasskey_a5qkol_k$(this.this$0__1.serverUrl_1, this.passkeyCreated4__1, this.$savePerson_1, this.this$0__1._uiState_1.get_value_j01efc_k$().personPicture_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.personPictureVal5__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().personPicture_1;
            if (!(this.personPictureVal5__1 == null)) {
              this.personPictureVal5__1.set_personPictureUid_dypqo6_k$(this.$savePerson_1.get_personUid_mmhd76_k$());
              this.personPictureVal5__1.set_personPictureLct_5leypf_k$(systemTimeInMillis());
              this.personPictureUriVal6__1 = this.personPictureVal5__1.get_personPictureUri_r3scj8_k$();
              this.set_state_rjd8d0_k$(6);
              suspendResult = _get_enqueueSavePictureUseCase__rl1s31_2(this.this$0__1).invoke_xmwesk_k$(this.$savePerson_1.get_personUid_mmhd76_k$(), Companion_getInstance_59().get_TABLE_ID_xo2mej_k$(), this.personPictureUriVal6__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

          case 6:
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            this.set_state_rjd8d0_k$(8);
            suspendResult = enrollToCourseFromInviteUid(this.this$0__1, this.$savePerson_1.get_personUid_mmhd76_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            navigateToAppropriateScreen(this.this$0__1, this.$savePerson_1);
            this.set_exceptionState_fex74n_k$(12);
            this.set_state_rjd8d0_k$(10);
            continue $sm;
          case 9:
            this.set_exceptionState_fex74n_k$(12);
            var tmp_7 = this.get_exception_x0n6w6_k$();
            if (tmp_7 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              l$ret$1: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_1.get_value_j01efc_k$();
                  var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.this$0__1.get_systemImpl_9jowp4_k$()));
                  if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(10);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 10:
            this.set_exceptionState_fex74n_k$(12);
            this.set_state_rjd8d0_k$(11);
            continue $sm;
          case 11:
            this.tmp$ret$20__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(16);
            this.set_state_rjd8d0_k$(14);
            continue $sm;
          case 12:
            this.set_exceptionState_fex74n_k$(15);
            var tmp_8 = this.get_exception_x0n6w6_k$();
            if (tmp_8 instanceof Exception) {
              var e_0 = this.get_exception_x0n6w6_k$();
              var tmp_9 = Napier_getInstance();
              tmp_9.d$default_iccotn_k$(VOID, VOID, SignUpViewModel$onClickSignup$slambda$lambda(e_0));
              this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_error_iqzvfj_k$()) + ':' + e_0.message));
              this.tmp$ret$41__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(16);
              this.set_state_rjd8d0_k$(13);
              var tmp_10 = this;
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 13:
            this.set_exceptionState_fex74n_k$(16);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
          case 14:
            this.set_exceptionState_fex74n_k$(16);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
          case 15:
            this.set_exceptionState_fex74n_k$(16);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            throw t;
          case 16:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 16) {
          throw e_1;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_1);
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignUpViewModel$onClickSignup$slambda(this.this$0__1, this.$savePerson_1, this.$createPasskeyUseCaseVal_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignUpViewModel$onClickSignup$slambda_0(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation) {
    var i = new SignUpViewModel$onClickSignup$slambda(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$navigateToAppropriateScreen$lambda(this$0) {
    return function () {
      return 'AddSignUpPresenter: go to next destination: ' + this$0.nextDestination_1;
    };
  }
  function SignUpViewModel$onClickOtherOption$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_firstNames_audc9u_k$($firstName);
      $this$shallowCopy.set_lastName_6ukpbb_k$($lastName);
      return Unit_getInstance();
    };
  }
  function $enrollToCourseFromInviteUidCOROUTINE$68(_this__u8e3s4, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.personUid_1 = personUid;
  }
  protoOf($enrollToCourseFromInviteUidCOROUTINE$68).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.viewUri0__1 = this._this__u8e3s4__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
            if (!(this.viewUri0__1 == null) ? contains(this.viewUri0__1, Companion_getInstance_171().get_DEST_NAME_gmgk7z_k$()) : false) {
              this._this__u8e3s4__1.nextDestination_1 = Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$();
              this.set_state_rjd8d0_k$(1);
              suspendResult = this._this__u8e3s4__1.enrollToCourseFromInviteCodeUseCase_1.invoke_5rp4yz_k$(this.viewUri0__1, this.personUid_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function SignUpViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_244();
    destName = destName === VOID ? 'SignUp' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this._uiState_1 = MutableStateFlow(new SignUpUiState());
    this.validateUsernameUseCase_1 = new ValidateUsernameUseCase();
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
    tmp.nextDestination_1 = tmp0_elvis_lhs == null ? Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$() : tmp0_elvis_lhs;
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_17());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(GetLocalAccountsSupportedUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.getLocalAccountsSupportedUseCase$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, getLocalAccountsSupportedUseCase$factory_1());
    var tmp_4 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$());
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_8(this).get_newPersonalAccountsLearningSpaceUrl_l46cfw_k$() : tmp0_elvis_lhs_0;
    tmp_4.serverUrl_1 = tmp1_elvis_lhs == null ? 'http://localhost' : tmp1_elvis_lhs;
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.serverUrl_1);
    var trigger = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.invoke_4wgfc3_k$(tmp$ret$4, context);
    var this_0 = On(di, tmp$ret$5, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(CreatePasskeyUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_5.createPasskeyUseCase$delegate_1 = InstanceOrNull(this_0, tmp$ret$7, null).provideDelegate_o2qlc1_k$(this, createPasskeyUseCase$factory_3());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.serverUrl_1);
    var trigger_0 = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_10 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    var tmp$ret$10 = tmp_10.invoke_4wgfc3_k$(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_12 = get_direct(tmp$ret$11).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_9.addNewPersonUseCase_1 = tmp_12.Instance_vwdrk9_k$(tmp$ret$12, null);
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_15 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
    tmp_14.genderConfig$delegate_1 = Instance(this, tmp$ret$14, null).provideDelegate_o2qlc1_k$(this, genderConfig$factory_3());
    var tmp_16 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.serverUrl_1);
    var trigger_1 = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_17 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    var tmp$ret$17 = tmp_17.invoke_4wgfc3_k$(tmp$ret$16, context_1);
    var tmp$ret$18 = On(di, tmp$ret$17, trigger_1);
    var tmp_19 = get_direct(tmp$ret$18).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_20 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
    var tmp$ret$19 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
    tmp_16.getUsernameSuggestionUseCase_1 = tmp_19.Instance_vwdrk9_k$(tmp$ret$19, null);
    this.filterUsernameUseCase_1 = new FilterUsernameUseCase();
    this.usernameSuggestionJob_1 = null;
    var tmp_21 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_2 = new LearningSpace(this.serverUrl_1);
    var trigger_2 = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_22 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_23 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$21 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
    var tmp$ret$22 = tmp_22.invoke_4wgfc3_k$(tmp$ret$21, context_2);
    var this_1 = On(this, tmp$ret$22, trigger_2);
    // Inline function 'org.kodein.type.generic' call
    var tmp_24 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$24 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
    tmp_21.enqueueSavePictureUseCase$delegate_1 = Instance(this_1, tmp$ret$24, null).provideDelegate_o2qlc1_k$(this, enqueueSavePictureUseCase$factory_1());
    var tmp_25 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_3 = new LearningSpace(this.serverUrl_1);
    var trigger_3 = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_26 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_27 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$26 = isInterface(tmp_27, TypeToken) ? tmp_27 : THROW_CCE();
    var tmp$ret$27 = tmp_26.invoke_4wgfc3_k$(tmp$ret$26, context_3);
    var tmp$ret$28 = On(di, tmp$ret$27, trigger_3);
    var tmp_28 = get_direct(tmp$ret$28).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_29 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$29 = isInterface(tmp_29, TypeToken) ? tmp_29 : THROW_CCE();
    tmp_25.enrollToCourseFromInviteCodeUseCase_1 = tmp_28.Instance_vwdrk9_k$(tmp$ret$29, null);
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_create_account_3y9xxp_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_2.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, false, VOID, VOID, false, VOID, VOID, VOID, false);
        if (this_2.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (savedStateHandle.get_6bo4tg_k$('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_3.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_3.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      this.nextDestination_1 = Companion_getInstance_204().get_DEST_NAME_HOME_lftflt_k$();
    }
    var tmp_30 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_30, VOID, VOID, SignUpViewModel$slambda_0(this, null));
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this._uiState_1;
      while (true) {
        var prevValue_1 = this_4.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var tmp4_genderOptions = _get_genderConfig__kyr0zc_1(this).get_genderMessageIdsAndUnset_iid7il_k$();
        var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_235().get_ARG_DATE_OF_BIRTH_ina7cm_k$());
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        var tmp2_dateOfBirth = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        var tmp3_isPersonalAccount = this._uiState_1.get_value_j01efc_k$().isPersonalAccount_1;
        var tmp5_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_isPersonalAccount, tmp2_dateOfBirth);
        var tmp6_serverUrl_ = this.serverUrl_1;
        var tmp7_passkeySupported = !(_get_createPasskeyUseCase__ryoxza_1(this) == null);
        var tmp8_showOtherOption = _get_createPasskeyUseCase__ryoxza_1(this) == null ? _get_getLocalAccountsSupportedUseCase__hoi7c7_0(this).invoke_jkqnwo_k$() : false;
        var nextValue_1 = prevValue_1.copy$default_lh2gcy_k$(tmp5_person, VOID, tmp4_genderOptions, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp7_passkeySupported, tmp6_serverUrl_, tmp8_showOtherOption);
        if (this_4.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
  }
  protoOf(SignUpViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(SignUpViewModel).get_addNewPersonUseCase_8y5b1i_k$ = function () {
    return this.addNewPersonUseCase_1;
  };
  protoOf(SignUpViewModel).onEntityChanged_p4w3en_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.person_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_gender_dqurbe_k$();
        var tmp_0 = this.updateErrorMessageOnChange_silrgy_k$(tmp, entity == null ? null : entity.get_gender_dqurbe_k$(), prevValue.genderError_1);
        var tmp2_safe_receiver = prevValue.person_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_username_ytz5i7_k$();
        var nextValue = prevValue.copy$default_lh2gcy_k$(entity, VOID, VOID, VOID, VOID, VOID, VOID, tmp_0, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.updateErrorMessageOnChange_silrgy_k$(tmp_1, entity == null ? null : entity.get_username_ytz5i7_k$(), prevValue.usernameError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_7().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver_0 = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.cancel$default_8haxne_k$();
    }
    var tmp_2 = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp_2, VOID, VOID, SignUpViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(SignUpViewModel).onParentCheckChanged_pclb1c_k$ = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onParentCheckChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).onTeacherCheckChanged_wf4wvu_k$ = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onTeacherCheckChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).onPersonPictureChanged_9evh6b_k$ = function (pictureUri) {
    // Inline function 'kotlin.apply' call
    var this_0 = new PersonPicture();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onPersonPictureChanged.<anonymous>' call
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().personPicture_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_personPictureUid_r3scr4_k$();
    this_0.set_personPictureUid_dypqo6_k$(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
    this_0.set_personPictureUri_20k97t_k$(pictureUri);
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, personPicture);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp, VOID, VOID, SignUpViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(SignUpViewModel).onFullNameValueChange_f5749q_k$ = function (fullName) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onFullNameValueChange.<anonymous>' call
        var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, fullName, VOID, VOID, this.updateErrorMessageOnChange_silrgy_k$(prevValue.fullName_1, fullName, prevValue.fullNameError_1));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).onUsernameChanged_in39d7_k$ = function (newValue) {
    var filteredValue = this.filterUsernameUseCase_1.invoke_h1q7yg_k$(newValue, '');
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy(tmp0_safe_receiver, SignUpViewModel$onUsernameChanged$lambda(filteredValue));
    }
    var updatedPerson = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onUsernameChanged.<anonymous>' call
        var tmp2_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
        var tmp3_usernameSetByUser = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.get_username_ytz5i7_k$()) === filteredValue);
        var tmp0_safe_receiver_0 = this._uiState_1.get_value_j01efc_k$().person_1;
        var tmp_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.get_username_ytz5i7_k$();
        var tmp4_usernameError = this.updateErrorMessageOnChange_silrgy_k$(tmp_0, updatedPerson == null ? null : updatedPerson.get_username_ytz5i7_k$(), this._uiState_1.get_value_j01efc_k$().usernameError_1);
        var nextValue = prevValue.copy$default_lh2gcy_k$(updatedPerson, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_usernameError, tmp3_usernameSetByUser);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).onFullNameFocusedChanged_1h9ydb_k$ = function (hasFocused) {
    if (hasFocused)
      return Unit_getInstance();
    var tmp;
    if (this._uiState_1.get_value_j01efc_k$().usernameSetByUser_1) {
      // Inline function 'kotlin.text.isNullOrEmpty' call
      var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
      var this_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fullName_m0cs6y_k$();
      // Inline function 'kotlin.contracts.contract' call
      tmp = !(this_0 == null ? true : charSequenceLength(this_0) === 0);
    } else {
      tmp = false;
    }
    if (tmp)
      return Unit_getInstance();
    var tmp1_safe_receiver = this.usernameSuggestionJob_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp_0 = this;
    var tmp_1 = this.get_viewModelScope_ryv1dz_k$();
    tmp_0.usernameSuggestionJob_1 = launch(tmp_1, VOID, VOID, SignUpViewModel$onFullNameFocusedChanged$slambda_0(this, null));
  };
  protoOf(SignUpViewModel).onClickSignup_5aj3vz_k$ = function () {
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().fullName_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp;
    var tmp_0;
    if (fullName == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(fullName) ? fullName : THROW_CCE()));
    }
    var tmp2_safe_receiver = tmp_0;
    var parts = tmp2_safe_receiver == null ? null : split(tmp2_safe_receiver, [' '], VOID, 2);
    var firstName = parts == null ? null : parts.get_c1px32_k$(0);
    var tmp_1;
    if (parts == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.getOrElse' call
      var tmp_2;
      if (1 >= 0 ? 1 <= get_lastIndex(parts) : false) {
        tmp_2 = parts.get_c1px32_k$(1);
      } else {
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickSignup.<anonymous>' call
        tmp_2 = '';
      }
      tmp_1 = tmp_2;
    }
    var lastName = tmp_1;
    var tmp5_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      tmp_3 = shallowCopy(tmp5_safe_receiver, SignUpViewModel$onClickSignup$lambda(firstName, lastName));
    }
    this.onEntityChanged_p4w3en_k$(tmp_3);
    var tmp6_elvis_lhs = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp_4;
    if (tmp6_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_4 = tmp6_elvis_lhs;
    }
    var savePerson = tmp_4;
    var requiredFieldMessage = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickSignup.<anonymous>' call
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = savePerson.get_firstNames_n3o3y7_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = requiredFieldMessage;
        } else {
          tmp_5 = null;
        }
        var tmp0_fullNameError = tmp_5;
        var tmp1_genderError = savePerson.get_gender_dqurbe_k$() === Companion_getInstance_7().get_GENDER_UNSET_ij51gs_k$() ? requiredFieldMessage : null;
        var tmp_6;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = savePerson.get_username_ytz5i7_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_6 = requiredFieldMessage;
        } else {
          tmp_6 = null;
        }
        var tmp2_usernameError = tmp_6;
        var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_genderError, tmp0_fullNameError, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_usernameError);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_5(this._uiState_1.get_value_j01efc_k$(), this)) {
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
      return Unit_getInstance();
    }
    var createPasskeyUseCaseVal = _get_createPasskeyUseCase__ryoxza_1(this);
    var tmp_7 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_7, VOID, VOID, SignUpViewModel$onClickSignup$slambda_0(this, savePerson, createPasskeyUseCaseVal, null));
  };
  protoOf(SignUpViewModel).onClickOtherOption_wpbtws_k$ = function () {
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().fullName_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp;
    var tmp_0;
    if (fullName == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(fullName) ? fullName : THROW_CCE()));
    }
    var tmp2_safe_receiver = tmp_0;
    var parts = tmp2_safe_receiver == null ? null : split(tmp2_safe_receiver, [' '], VOID, 2);
    var firstName = parts == null ? null : parts.get_c1px32_k$(0);
    var tmp_1;
    if (parts == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.getOrElse' call
      var tmp_2;
      if (1 >= 0 ? 1 <= get_lastIndex(parts) : false) {
        tmp_2 = parts.get_c1px32_k$(1);
      } else {
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickOtherOption.<anonymous>' call
        tmp_2 = '';
      }
      tmp_1 = tmp_2;
    }
    var lastName = tmp_1;
    var tmp5_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      tmp_3 = shallowCopy(tmp5_safe_receiver, SignUpViewModel$onClickOtherOption$lambda(firstName, lastName));
    }
    this.onEntityChanged_p4w3en_k$(tmp_3);
    var tmp6_elvis_lhs = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp_4;
    if (tmp6_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_4 = tmp6_elvis_lhs;
    }
    var savePerson = tmp_4;
    var requiredFieldMessage = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickOtherOption.<anonymous>' call
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = savePerson.get_firstNames_n3o3y7_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = requiredFieldMessage;
        } else {
          tmp_5 = null;
        }
        var tmp0_fullNameError = tmp_5;
        var tmp1_genderError = savePerson.get_gender_dqurbe_k$() === Companion_getInstance_7().get_GENDER_UNSET_ij51gs_k$() ? requiredFieldMessage : null;
        var tmp_6;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = savePerson.get_username_ytz5i7_k$();
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_6 = requiredFieldMessage;
        } else {
          tmp_6 = null;
        }
        var tmp2_usernameError = tmp_6;
        var nextValue = prevValue.copy$default_lh2gcy_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_genderError, tmp0_fullNameError, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_usernameError);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_5(this._uiState_1.get_value_j01efc_k$(), this)) {
      return Unit_getInstance();
    }
    var tmp_7 = this.get_navController_qibdoq_k$();
    var tmp_8 = Companion_getInstance_243().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_3 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickOtherOption.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_3, Companion_getInstance_244().REGISTRATION_ARGS_TO_PASS_1);
    this.putFromSavedStateIfPresent_891b9h_k$(this_3, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    this_3.put_4fpzoq_k$(Companion_getInstance_243().get_ARG_PERSON_fvh0xz_k$(), this.get_json_woos35_k$().encodeToString_k0apqx_k$(Companion_getInstance_7().serializer_9w0wvi_k$(), savePerson));
    var tmp_9 = Companion_getInstance_243().get_ARG_PERSON_PROFILE_PIC_lba9ac_k$();
    var tmp_10 = this.get_json_woos35_k$();
    var tmp_11 = Companion_getInstance_59().serializer_9w0wvi_k$();
    var tmp0_elvis_lhs = this._uiState_1.get_value_j01efc_k$().personPicture_1;
    this_3.put_4fpzoq_k$(tmp_9, tmp_10.encodeToString_k0apqx_k$(tmp_11, tmp0_elvis_lhs == null ? new PersonPicture() : tmp0_elvis_lhs));
    this_3.put_4fpzoq_k$(Companion_getInstance_243().get_IS_PARENT_ia4hiu_k$(), this._uiState_1.get_value_j01efc_k$().isParent_1.toString());
    var tmp$ret$10 = this_3.build_1k0s4u_k$();
    tmp_7.navigate$default_srzzsc_k$(tmp_8, tmp$ret$10);
  };
  function SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance().get_GENDER_MESSAGE_IDS_AND_UNSET_762xdf_k$() : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    fullName = fullName === VOID ? null : fullName;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderError = genderError === VOID ? null : genderError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    isParent = isParent === VOID ? false : isParent;
    isTeacher = isTeacher === VOID ? false : isTeacher;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    serverUrl_ = serverUrl_ === VOID ? null : serverUrl_;
    showOtherOption = showOtherOption === VOID ? true : showOtherOption;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    usernameError = usernameError === VOID ? null : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? false : usernameSetByUser;
    errorText = errorText === VOID ? null : errorText;
    this.person_1 = person;
    this.password_1 = password;
    this.genderOptions_1 = genderOptions;
    this.personPicture_1 = personPicture;
    this.registrationMode_1 = registrationMode;
    this.fullName_1 = fullName;
    this.dateOfBirthError_1 = dateOfBirthError;
    this.genderError_1 = genderError;
    this.fullNameError_1 = fullNameError;
    this.isParent_1 = isParent;
    this.isTeacher_1 = isTeacher;
    this.passkeySupported_1 = passkeySupported;
    this.serverUrl__1 = serverUrl_;
    this.showOtherOption_1 = showOtherOption;
    this.isPersonalAccount_1 = isPersonalAccount;
    this.usernameError_1 = usernameError;
    this.usernameSetByUser_1 = usernameSetByUser;
    this.errorText_1 = errorText;
  }
  protoOf(SignUpUiState).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(SignUpUiState).get_password_bodifw_k$ = function () {
    return this.password_1;
  };
  protoOf(SignUpUiState).get_genderOptions_grbq0k_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(SignUpUiState).get_personPicture_te1agw_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(SignUpUiState).get_registrationMode_pu3av9_k$ = function () {
    return this.registrationMode_1;
  };
  protoOf(SignUpUiState).get_fullName_9skygt_k$ = function () {
    return this.fullName_1;
  };
  protoOf(SignUpUiState).get_dateOfBirthError_qux8bb_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(SignUpUiState).get_genderError_tcuvry_k$ = function () {
    return this.genderError_1;
  };
  protoOf(SignUpUiState).get_fullNameError_atxjr9_k$ = function () {
    return this.fullNameError_1;
  };
  protoOf(SignUpUiState).get_isParent_xwtt8d_k$ = function () {
    return this.isParent_1;
  };
  protoOf(SignUpUiState).get_isTeacher_ovqzpt_k$ = function () {
    return this.isTeacher_1;
  };
  protoOf(SignUpUiState).get_passkeySupported_uozb13_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(SignUpUiState).get_serverUrl__knrx30_k$ = function () {
    return this.serverUrl__1;
  };
  protoOf(SignUpUiState).get_showOtherOption_pea9vl_k$ = function () {
    return this.showOtherOption_1;
  };
  protoOf(SignUpUiState).get_isPersonalAccount_yq673a_k$ = function () {
    return this.isPersonalAccount_1;
  };
  protoOf(SignUpUiState).get_usernameError_i4qze1_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(SignUpUiState).get_usernameSetByUser_yodgx1_k$ = function () {
    return this.usernameSetByUser_1;
  };
  protoOf(SignUpUiState).get_errorText_dypup8_k$ = function () {
    return this.errorText_1;
  };
  protoOf(SignUpUiState).component1_7eebsc_k$ = function () {
    return this.person_1;
  };
  protoOf(SignUpUiState).component2_7eebsb_k$ = function () {
    return this.password_1;
  };
  protoOf(SignUpUiState).component3_7eebsa_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(SignUpUiState).component4_7eebs9_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(SignUpUiState).component5_7eebs8_k$ = function () {
    return this.registrationMode_1;
  };
  protoOf(SignUpUiState).component6_7eebs7_k$ = function () {
    return this.fullName_1;
  };
  protoOf(SignUpUiState).component7_7eebs6_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(SignUpUiState).component8_7eebs5_k$ = function () {
    return this.genderError_1;
  };
  protoOf(SignUpUiState).component9_7eebs4_k$ = function () {
    return this.fullNameError_1;
  };
  protoOf(SignUpUiState).component10_gazzfo_k$ = function () {
    return this.isParent_1;
  };
  protoOf(SignUpUiState).component11_gazzfn_k$ = function () {
    return this.isTeacher_1;
  };
  protoOf(SignUpUiState).component12_gazzfm_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(SignUpUiState).component13_gazzfl_k$ = function () {
    return this.serverUrl__1;
  };
  protoOf(SignUpUiState).component14_gazzfk_k$ = function () {
    return this.showOtherOption_1;
  };
  protoOf(SignUpUiState).component15_gazzfj_k$ = function () {
    return this.isPersonalAccount_1;
  };
  protoOf(SignUpUiState).component16_gazzfi_k$ = function () {
    return this.usernameError_1;
  };
  protoOf(SignUpUiState).component17_gazzfh_k$ = function () {
    return this.usernameSetByUser_1;
  };
  protoOf(SignUpUiState).component18_gazzfg_k$ = function () {
    return this.errorText_1;
  };
  protoOf(SignUpUiState).copy_bbr267_k$ = function (person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) {
    return new SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).copy$default_lh2gcy_k$ = function (person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText, $super) {
    person = person === VOID ? this.person_1 : person;
    password = password === VOID ? this.password_1 : password;
    genderOptions = genderOptions === VOID ? this.genderOptions_1 : genderOptions;
    personPicture = personPicture === VOID ? this.personPicture_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.registrationMode_1 : registrationMode;
    fullName = fullName === VOID ? this.fullName_1 : fullName;
    dateOfBirthError = dateOfBirthError === VOID ? this.dateOfBirthError_1 : dateOfBirthError;
    genderError = genderError === VOID ? this.genderError_1 : genderError;
    fullNameError = fullNameError === VOID ? this.fullNameError_1 : fullNameError;
    isParent = isParent === VOID ? this.isParent_1 : isParent;
    isTeacher = isTeacher === VOID ? this.isTeacher_1 : isTeacher;
    passkeySupported = passkeySupported === VOID ? this.passkeySupported_1 : passkeySupported;
    serverUrl_ = serverUrl_ === VOID ? this.serverUrl__1 : serverUrl_;
    showOtherOption = showOtherOption === VOID ? this.showOtherOption_1 : showOtherOption;
    isPersonalAccount = isPersonalAccount === VOID ? this.isPersonalAccount_1 : isPersonalAccount;
    usernameError = usernameError === VOID ? this.usernameError_1 : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? this.usernameSetByUser_1 : usernameSetByUser;
    errorText = errorText === VOID ? this.errorText_1 : errorText;
    return $super === VOID ? this.copy_bbr267_k$(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) : $super.copy_bbr267_k$.call(this, person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).toString = function () {
    return 'SignUpUiState(person=' + this.person_1 + ', password=' + this.password_1 + ', genderOptions=' + this.genderOptions_1 + ', personPicture=' + this.personPicture_1 + ', registrationMode=' + this.registrationMode_1 + ', fullName=' + this.fullName_1 + ', dateOfBirthError=' + this.dateOfBirthError_1 + ', genderError=' + this.genderError_1 + ', fullNameError=' + this.fullNameError_1 + ', isParent=' + this.isParent_1 + ', isTeacher=' + this.isTeacher_1 + ', passkeySupported=' + this.passkeySupported_1 + ', serverUrl_=' + this.serverUrl__1 + ', showOtherOption=' + this.showOtherOption_1 + ', isPersonalAccount=' + this.isPersonalAccount_1 + ', usernameError=' + this.usernameError_1 + ', usernameSetByUser=' + this.usernameSetByUser_1 + ', errorText=' + this.errorText_1 + ')';
  };
  protoOf(SignUpUiState).hashCode = function () {
    var result = this.person_1 == null ? 0 : this.person_1.hashCode();
    result = imul(result, 31) + (this.password_1 == null ? 0 : getStringHashCode(this.password_1)) | 0;
    result = imul(result, 31) + hashCode(this.genderOptions_1) | 0;
    result = imul(result, 31) + (this.personPicture_1 == null ? 0 : this.personPicture_1.hashCode()) | 0;
    result = imul(result, 31) + this.registrationMode_1 | 0;
    result = imul(result, 31) + (this.fullName_1 == null ? 0 : getStringHashCode(this.fullName_1)) | 0;
    result = imul(result, 31) + (this.dateOfBirthError_1 == null ? 0 : getStringHashCode(this.dateOfBirthError_1)) | 0;
    result = imul(result, 31) + (this.genderError_1 == null ? 0 : getStringHashCode(this.genderError_1)) | 0;
    result = imul(result, 31) + (this.fullNameError_1 == null ? 0 : getStringHashCode(this.fullNameError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isParent_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isTeacher_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.passkeySupported_1) | 0;
    result = imul(result, 31) + (this.serverUrl__1 == null ? 0 : getStringHashCode(this.serverUrl__1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.showOtherOption_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isPersonalAccount_1) | 0;
    result = imul(result, 31) + (this.usernameError_1 == null ? 0 : getStringHashCode(this.usernameError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.usernameSetByUser_1) | 0;
    result = imul(result, 31) + (this.errorText_1 == null ? 0 : getStringHashCode(this.errorText_1)) | 0;
    return result;
  };
  protoOf(SignUpUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SignUpUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SignUpUiState ? other : THROW_CCE();
    if (!equals(this.person_1, tmp0_other_with_cast.person_1))
      return false;
    if (!(this.password_1 == tmp0_other_with_cast.password_1))
      return false;
    if (!equals(this.genderOptions_1, tmp0_other_with_cast.genderOptions_1))
      return false;
    if (!equals(this.personPicture_1, tmp0_other_with_cast.personPicture_1))
      return false;
    if (!(this.registrationMode_1 === tmp0_other_with_cast.registrationMode_1))
      return false;
    if (!(this.fullName_1 == tmp0_other_with_cast.fullName_1))
      return false;
    if (!(this.dateOfBirthError_1 == tmp0_other_with_cast.dateOfBirthError_1))
      return false;
    if (!(this.genderError_1 == tmp0_other_with_cast.genderError_1))
      return false;
    if (!(this.fullNameError_1 == tmp0_other_with_cast.fullNameError_1))
      return false;
    if (!(this.isParent_1 === tmp0_other_with_cast.isParent_1))
      return false;
    if (!(this.isTeacher_1 === tmp0_other_with_cast.isTeacher_1))
      return false;
    if (!(this.passkeySupported_1 === tmp0_other_with_cast.passkeySupported_1))
      return false;
    if (!(this.serverUrl__1 == tmp0_other_with_cast.serverUrl__1))
      return false;
    if (!(this.showOtherOption_1 === tmp0_other_with_cast.showOtherOption_1))
      return false;
    if (!(this.isPersonalAccount_1 === tmp0_other_with_cast.isPersonalAccount_1))
      return false;
    if (!(this.usernameError_1 == tmp0_other_with_cast.usernameError_1))
      return false;
    if (!(this.usernameSetByUser_1 === tmp0_other_with_cast.usernameSetByUser_1))
      return false;
    if (!(this.errorText_1 == tmp0_other_with_cast.errorText_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_17() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_8(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory_1() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7_0(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_3() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_1(receiver);
    }, null);
  }
  function genderConfig$factory_3() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_1(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_1() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_2(receiver);
    }, null);
  }
  function apiUrlConfig$factory_18() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_8(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory_2() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7_0(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_4() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_1(receiver);
    }, null);
  }
  function genderConfig$factory_4() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_1(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_2() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_2(receiver);
    }, null);
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda$lambda($e) {
    return function () {
      return 'enrollToCourseFromInviteCodeUseCase :' + $e.message;
    };
  }
  function _get__uiState__8e9jsd_49($this) {
    return $this._uiState_1;
  }
  function _get_validateUsernameUseCase__yg4coq_3($this) {
    return $this.validateUsernameUseCase_1;
  }
  function _set_nextDestination__vdv3ka_3($this, _set____db54di) {
    $this.nextDestination_1 = _set____db54di;
  }
  function _get_nextDestination__tjiqwa_4($this) {
    return $this.nextDestination_1;
  }
  function _get_apiUrlConfig__mldllg_9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.apiUrlConfig$delegate_1;
    apiUrlConfig$factory_20();
    return this_0.get_value_j01efc_k$();
  }
  function _get_isParent__1spe53_0($this) {
    return $this.isParent_1;
  }
  function _get_serverUrl__j7eug5_3($this) {
    return $this.serverUrl_1;
  }
  function _get_genderConfig__kyr0zc_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.genderConfig$delegate_1;
    genderConfig$factory_6();
    return this_0.get_value_j01efc_k$();
  }
  function _get_enrollToCourseFromInviteCodeUseCase__6djli_1($this) {
    return $this.enrollToCourseFromInviteCodeUseCase_1;
  }
  function _get_enqueueSavePictureUseCase__rl1s31_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.enqueueSavePictureUseCase$delegate_1;
    enqueueSavePictureUseCase$factory_4();
    return this_0.get_value_j01efc_k$();
  }
  function hasErrors_6(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.passwordError_1 == null);
  }
  function navigateToAppropriateScreen_0($this, savePerson) {
    if ($this.isParent_1) {
      var tmp = $this.get_navController_qibdoq_k$();
      var tmp_0 = Companion_getInstance_232().get_DEST_NAME_gmgk7z_k$();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.navigateToAppropriateScreen.<anonymous>' call
      this_0.put_4fpzoq_k$(Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), $this.nextDestination_1);
      $this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
      $this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
      var tmp$ret$2 = this_0.build_1k0s4u_k$();
      tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp_1 = Napier_getInstance();
      tmp_1.d$default_iccotn_k$(VOID, VOID, SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$lambda($this));
      $this.navigateToViewUri_qtkrj7_k$($this.get_navController_qibdoq_k$(), appendSelectedAccount($this.nextDestination_1, savePerson.get_personUid_mmhd76_k$(), new LearningSpace($this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$().get_url_18iuii_k$())), goOptions);
    }
  }
  function Companion_184() {
    Companion_instance_184 = this;
    this.DEST_NAME_1 = 'SignupEnterUsernamePassword';
  }
  protoOf(Companion_184).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_184;
  function Companion_getInstance_245() {
    if (Companion_instance_184 == null)
      new Companion_184();
    return Companion_instance_184;
  }
  function SignupEnterUsernamePasswordViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, Companion_getInstance_243().get_ARG_PERSON_fvh0xz_k$(), Companion_getInstance_7().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tmp0_elvis_lhs0__1 = suspendResult;
            this.person1__1 = this.tmp0_elvis_lhs0__1 == null ? new Person() : this.tmp0_elvis_lhs0__1;
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.getJson_t7vwf3_k$(this.$savedStateHandle_1, Companion_getInstance_243().get_ARG_PERSON_PROFILE_PIC_lba9ac_k$(), Companion_getInstance_59().serializer_9w0wvi_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var personPicture = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_0;
                if (this.person1__1.get_firstNames_n3o3y7_k$() === '') {
                  tmp_0 = null;
                } else {
                  tmp_0 = this.person1__1.fullName_m0cs6y_k$();
                }
                var nextValue = prevValue.copy$default_2cuuy1_k$(this.person1__1, VOID, VOID, personPicture, VOID, tmp_0);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$slambda(this.this$0__1, this.$savedStateHandle_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignupEnterUsernamePasswordViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.$commitDelay_1 = $commitDelay;
    this.$entity_1 = $entity;
    this.$this_1 = $this;
    this.$key_1 = $key;
    this.$serializer_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(this.$commitDelay_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.$entity_1 == null)) {
              this.set_state_rjd8d0_k$(2);
              suspendResult = this.$this_1.setJson_jnpl42_k$(this.$this_1.get_savedStateHandle_xtsxet_k$(), this.$key_1, this.$serializer_1, this.$entity_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(3);
              continue $sm;
            }

          case 2:
            this.set_state_rjd8d0_k$(3);
            continue $sm;
          case 3:
            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda(this.$commitDelay_1, this.$entity_1, this.$this_1, this.$key_1, this.$serializer_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.set_firstNames_audc9u_k$($firstName);
      $this$shallowCopy.set_lastName_6ukpbb_k$($lastName);
      return Unit_getInstance();
    };
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this$0, $savePerson, resultContinuation) {
    this.this$0__1 = this$0;
    this.$savePerson_1 = $savePerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(16);
            this.set_state_rjd8d0_k$(1);
            continue $sm;
          case 1:
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(15);
            this.set_exceptionState_fex74n_k$(14);
            this.set_state_rjd8d0_k$(3);
            suspendResult = get_doorPrimaryKeyManager(this.this$0__1.get_activeDb_bu92wd_k$()).nextIdAsync_kh60wr_k$(Companion_getInstance_7().get_TABLE_ID_xo2mej_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.uid2__1 = suspendResult;
            this.$savePerson_1.set_personUid_j3idds_k$(this.uid2__1);
            this.tmp0_elvis_lhs3__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().password_1;
            if (this.tmp0_elvis_lhs3__1 == null) {
              this.tmp$ret$01__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(16);
              this.set_state_rjd8d0_k$(17);
              var tmp_0 = this;
              continue $sm;
            } else {
              this.WHEN_RESULT4__1 = this.tmp0_elvis_lhs3__1;
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            }

          case 4:
            this.passwordVal5__1 = this.WHEN_RESULT4__1;
            this.set_state_rjd8d0_k$(5);
            suspendResult = this.this$0__1.get_accountManager_bzeywn_k$().register$default_8sto9k_k$(this.$savePerson_1, this.passwordVal5__1, this.this$0__1.serverUrl_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.personPictureVal6__1 = this.this$0__1._uiState_1.get_value_j01efc_k$().personPicture_1;
            if (!(this.personPictureVal6__1 == null)) {
              this.personPictureVal6__1.set_personPictureUid_dypqo6_k$(this.$savePerson_1.get_personUid_mmhd76_k$());
              this.personPictureVal6__1.set_personPictureLct_5leypf_k$(systemTimeInMillis());
              this.personPictureUriVal7__1 = this.personPictureVal6__1.get_personPictureUri_r3scj8_k$();
              this.set_state_rjd8d0_k$(6);
              suspendResult = _get_enqueueSavePictureUseCase__rl1s31_3(this.this$0__1).invoke_xmwesk_k$(this.$savePerson_1.get_personUid_mmhd76_k$(), Companion_getInstance_59().get_TABLE_ID_xo2mej_k$(), this.personPictureUriVal7__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(7);
              continue $sm;
            }

          case 6:
            this.set_state_rjd8d0_k$(7);
            continue $sm;
          case 7:
            var tmp_1 = this;
            var this_0 = this.this$0__1.get_di_knto1e_k$();
            var context = new LearningSpace(this.this$0__1.serverUrl_1);
            var trigger = this_0.get_diTrigger_fb5jcm_k$();
            var tmp_2 = Companion_getInstance_2();
            var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_4 = get_direct(On(this_0, tmp_2.invoke_4wgfc3_k$(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context), trigger)).get_directDI_rqg7bd_k$();
            var tmp_5 = typeToken(createKType(getKClass(SavePasswordUseCase), arrayOf([]), false));
            tmp_1.savePasswordUseCase8__1 = tmp_4.InstanceOrNull_akutzz_k$(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null);
            this.tmp1_safe_receiver9__1 = this.savePasswordUseCase8__1;
            if (this.tmp1_safe_receiver9__1 == null) {
              this.WHEN_RESULT10__1 = null;
              this.set_state_rjd8d0_k$(9);
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(8);
              suspendResult = this.tmp1_safe_receiver9__1.invoke_4qk82n_k$(toString_1(this.$savePerson_1.get_username_ytz5i7_k$()), this.passwordVal5__1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp_6 = this;
            tmp_6.WHEN_RESULT10__1 = Unit_getInstance();
            this.set_state_rjd8d0_k$(9);
            continue $sm;
          case 9:
            this.set_exceptionState_fex74n_k$(12);
            this.viewUri11__1 = this.this$0__1.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
            if (!(this.viewUri11__1 == null) ? contains(this.viewUri11__1, 'ClazzInviteRedeem') : false) {
              this.this$0__1.nextDestination_1 = Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$();
              this.set_state_rjd8d0_k$(10);
              suspendResult = this.this$0__1.enrollToCourseFromInviteCodeUseCase_1.invoke_5rp4yz_k$(this.viewUri11__1, this.$savePerson_1.get_personUid_mmhd76_k$(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(11);
              continue $sm;
            }

          case 10:
            this.set_state_rjd8d0_k$(11);
            continue $sm;
          case 11:
            this.set_exceptionState_fex74n_k$(14);
            this.set_state_rjd8d0_k$(13);
            continue $sm;
          case 12:
            this.set_exceptionState_fex74n_k$(14);
            var tmp_7 = this.get_exception_x0n6w6_k$();
            if (tmp_7 instanceof Exception) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_8 = Napier_getInstance();
              tmp_8.d$default_iccotn_k$(VOID, VOID, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda$lambda(e));
              this.set_state_rjd8d0_k$(13);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 13:
            this.set_exceptionState_fex74n_k$(14);
            var tmp_9 = this;
            navigateToAppropriateScreen_0(this.this$0__1, this.$savePerson_1);
            tmp_9.tmp$ret$20__1 = Unit_getInstance();
            this.set_exceptionState_fex74n_k$(16);
            this.set_state_rjd8d0_k$(18);
            continue $sm;
          case 14:
            this.set_exceptionState_fex74n_k$(15);
            var tmp_10 = this.get_exception_x0n6w6_k$();
            if (tmp_10 instanceof Exception) {
              var e_0 = this.get_exception_x0n6w6_k$();
              if (e_0 instanceof IllegalStateException) {
                l$ret$5: do {
                  var this_1 = this.this$0__1._uiState_1;
                  while (true) {
                    var prevValue = this_1.get_value_j01efc_k$();
                    var nextValue = prevValue.copy$default_2cuuy1_k$(VOID, VOID, VOID, VOID, VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_person_exists_nw92g3_k$()));
                    if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
              } else {
                this.this$0__1.get_snackDispatcher_ifpff8_k$().showSnackBar_r6iyg6_k$(new Snack(this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_login_network_error_b1pwy0_k$())));
              }
              this.tmp$ret$01__1 = Unit_getInstance();
              this.set_exceptionState_fex74n_k$(16);
              this.set_state_rjd8d0_k$(17);
              var tmp_11 = this;
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 15:
            this.set_exceptionState_fex74n_k$(16);
            var t = this.get_exception_x0n6w6_k$();
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            throw t;
          case 16:
            throw this.get_exception_x0n6w6_k$();
          case 17:
            this.set_exceptionState_fex74n_k$(16);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
          case 18:
            this.set_exceptionState_fex74n_k$(16);
            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 16) {
          throw e_1;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_1);
        }
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this.this$0__1, this.$savePerson_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda_0(this$0, $savePerson, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this$0, $savePerson, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$lambda(this$0) {
    return function () {
      return 'AddSignupEnterUsernamePasswordPresenter: go to next destination: ' + this$0.nextDestination_1;
    };
  }
  function SignupEnterUsernamePasswordViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_245();
    destName = destName === VOID ? 'SignupEnterUsernamePassword' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this._uiState_1 = MutableStateFlow(new SignupEnterUsernamePasswordUiState());
    this.validateUsernameUseCase_1 = new ValidateUsernameUseCase();
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_NEXT_q16wbp_k$());
    tmp.nextDestination_1 = tmp0_elvis_lhs == null ? Companion_getInstance_176().get_DEST_NAME_HOME_lftflt_k$() : tmp0_elvis_lhs;
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.apiUrlConfig$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, apiUrlConfig$factory_19());
    this.isParent_1 = toBoolean(savedStateHandle.get_6bo4tg_k$(Companion_getInstance_243().get_IS_PARENT_ia4hiu_k$()));
    var tmp_2 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$());
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_9(this).get_newPersonalAccountsLearningSpaceUrl_l46cfw_k$() : tmp0_elvis_lhs_0;
    tmp_2.serverUrl_1 = tmp1_elvis_lhs == null ? 'http://localhost' : tmp1_elvis_lhs;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.serverUrl_1);
    var trigger = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_4 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$3 = tmp_4.invoke_4wgfc3_k$(tmp$ret$2, context);
    var tmp$ret$4 = On(di, tmp$ret$3, trigger);
    var tmp_6 = get_direct(tmp$ret$4).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_3.addNewPersonUseCase_1 = tmp_6.Instance_vwdrk9_k$(tmp$ret$5, null);
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.genderConfig$delegate_1 = Instance(this, tmp$ret$7, null).provideDelegate_o2qlc1_k$(this, genderConfig$factory_5());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.serverUrl_1);
    var trigger_0 = di.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_11 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    var tmp$ret$10 = tmp_11.invoke_4wgfc3_k$(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_13 = get_direct(tmp$ret$11).get_directDI_rqg7bd_k$();
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_10.enrollToCourseFromInviteCodeUseCase_1 = tmp_13.Instance_vwdrk9_k$(tmp$ret$12, null);
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.serverUrl_1);
    var trigger_1 = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_16 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_17 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    var tmp$ret$15 = tmp_16.invoke_4wgfc3_k$(tmp$ret$14, context_1);
    var this_0 = On(this, tmp$ret$15, trigger_1);
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$17 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_15.enqueueSavePictureUseCase$delegate_1 = Instance(this_0, tmp$ret$17, null).provideDelegate_o2qlc1_k$(this, enqueueSavePictureUseCase$factory_3());
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_create_account_3y9xxp_k$());
    var tmp_19 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_19, VOID, VOID, SignupEnterUsernamePasswordViewModel$slambda_0(this, savedStateHandle, null));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, false, true, VOID, false, VOID, VOID, VOID, false);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (savedStateHandle.get_6bo4tg_k$(Companion_getInstance_244().get_ARG_IS_PERSONAL_ACCOUNT_yt5p7z_k$()) === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this._uiState_1;
        while (true) {
          var prevValue_0 = this_2.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.copy$default_2cuuy1_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      this.nextDestination_1 = Companion_getInstance_204().get_DEST_NAME_HOME_lftflt_k$();
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this._uiState_1;
      while (true) {
        var prevValue_1 = this_3.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
        var tmp4_genderOptions = _get_genderConfig__kyr0zc_2(this).get_genderMessageIdsAndUnset_iid7il_k$();
        var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_235().get_ARG_DATE_OF_BIRTH_ina7cm_k$());
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        var tmp2_dateOfBirth = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        var tmp3_isPersonalAccount = this._uiState_1.get_value_j01efc_k$().isPersonalAccount_1;
        var tmp5_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_isPersonalAccount, tmp2_dateOfBirth);
        var nextValue_1 = prevValue_1.copy$default_2cuuy1_k$(tmp5_person, VOID, tmp4_genderOptions);
        if (this_3.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
  }
  protoOf(SignupEnterUsernamePasswordViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(SignupEnterUsernamePasswordViewModel).get_addNewPersonUseCase_8y5b1i_k$ = function () {
    return this.addNewPersonUseCase_1;
  };
  protoOf(SignupEnterUsernamePasswordViewModel).onEntityChanged_p4w3en_k$ = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_2cuuy1_k$(entity);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_7().serializer_9w0wvi_k$();
    var commitDelay = new Long(200, 0);
    var key = Companion_getInstance_160().get_KEY_ENTITY_STATE_mgypsy_k$();
    var tmp0_safe_receiver = this.get_saveStateJob_pa13yq_k$();
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = this.get_viewModelScope_ryv1dz_k$();
    this.set_saveStateJob_g1ttuu_k$(launch(tmp, VOID, VOID, SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null)));
  };
  protoOf(SignupEnterUsernamePasswordViewModel).onPasswordChanged_uha1k3_k$ = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.copy$default_2cuuy1_k$(VOID, password, VOID, VOID, VOID, VOID, null);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignupEnterUsernamePasswordViewModel).onClickedSignupEnterUsernamePassword_u8miah_k$ = function () {
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var tmp0_safe_receiver = this._uiState_1.get_value_j01efc_k$().firstName_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp;
    var tmp_0;
    if (fullName == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(fullName) ? fullName : THROW_CCE()));
    }
    var tmp2_safe_receiver = tmp_0;
    var parts = tmp2_safe_receiver == null ? null : split(tmp2_safe_receiver, [' '], VOID, 2);
    var firstName = parts == null ? null : parts.get_c1px32_k$(0);
    var tmp_1;
    if (parts == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.getOrElse' call
      var tmp_2;
      if (1 >= 0 ? 1 <= get_lastIndex(parts) : false) {
        tmp_2 = parts.get_c1px32_k$(1);
      } else {
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onClickedSignupEnterUsernamePassword.<anonymous>' call
        tmp_2 = '';
      }
      tmp_1 = tmp_2;
    }
    var lastName = tmp_1;
    var tmp5_safe_receiver = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      tmp_3 = shallowCopy(tmp5_safe_receiver, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$lambda(firstName, lastName));
    }
    this.onEntityChanged_p4w3en_k$(tmp_3);
    var tmp6_elvis_lhs = this._uiState_1.get_value_j01efc_k$().person_1;
    var tmp_4;
    if (tmp6_elvis_lhs == null) {
      return Unit_getInstance();
    } else {
      tmp_4 = tmp6_elvis_lhs;
    }
    var savePerson = tmp_4;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onClickedSignupEnterUsernamePassword.<anonymous>' call
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = prevValue.password_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_field_required_prompt_keky22_k$());
        } else {
          tmp_5 = null;
        }
        var nextValue = prevValue.copy$default_2cuuy1_k$(VOID, VOID, VOID, VOID, VOID, VOID, tmp_5);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_6(this._uiState_1.get_value_j01efc_k$(), this)) {
      this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
      return Unit_getInstance();
    }
    var tmp_6 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_6, VOID, VOID, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda_0(this, savePerson, null));
  };
  function SignupEnterUsernamePasswordUiState(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance().get_GENDER_MESSAGE_IDS_AND_UNSET_762xdf_k$() : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    firstName = firstName === VOID ? null : firstName;
    passwordError = passwordError === VOID ? null : passwordError;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    parentContactError = parentContactError === VOID ? null : parentContactError;
    genderError = genderError === VOID ? null : genderError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    this.person_1 = person;
    this.password_1 = password;
    this.genderOptions_1 = genderOptions;
    this.personPicture_1 = personPicture;
    this.registrationMode_1 = registrationMode;
    this.firstName_1 = firstName;
    this.passwordError_1 = passwordError;
    this.dateOfBirthError_1 = dateOfBirthError;
    this.parentContactError_1 = parentContactError;
    this.genderError_1 = genderError;
    this.fullNameError_1 = fullNameError;
    this.passkeySupported_1 = passkeySupported;
    this.isPersonalAccount_1 = isPersonalAccount;
  }
  protoOf(SignupEnterUsernamePasswordUiState).get_person_i0c866_k$ = function () {
    return this.person_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_password_bodifw_k$ = function () {
    return this.password_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_genderOptions_grbq0k_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_personPicture_te1agw_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_registrationMode_pu3av9_k$ = function () {
    return this.registrationMode_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_firstName_aplxv6_k$ = function () {
    return this.firstName_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_passwordError_55tjwk_k$ = function () {
    return this.passwordError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_dateOfBirthError_qux8bb_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_parentContactError_kzddzv_k$ = function () {
    return this.parentContactError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_genderError_tcuvry_k$ = function () {
    return this.genderError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_fullNameError_atxjr9_k$ = function () {
    return this.fullNameError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_passkeySupported_uozb13_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).get_isPersonalAccount_yq673a_k$ = function () {
    return this.isPersonalAccount_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component1_7eebsc_k$ = function () {
    return this.person_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component2_7eebsb_k$ = function () {
    return this.password_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component3_7eebsa_k$ = function () {
    return this.genderOptions_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component4_7eebs9_k$ = function () {
    return this.personPicture_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component5_7eebs8_k$ = function () {
    return this.registrationMode_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component6_7eebs7_k$ = function () {
    return this.firstName_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component7_7eebs6_k$ = function () {
    return this.passwordError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component8_7eebs5_k$ = function () {
    return this.dateOfBirthError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component9_7eebs4_k$ = function () {
    return this.parentContactError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component10_gazzfo_k$ = function () {
    return this.genderError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component11_gazzfn_k$ = function () {
    return this.fullNameError_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component12_gazzfm_k$ = function () {
    return this.passkeySupported_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).component13_gazzfl_k$ = function () {
    return this.isPersonalAccount_1;
  };
  protoOf(SignupEnterUsernamePasswordUiState).copy_3uhhxy_k$ = function (person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) {
    return new SignupEnterUsernamePasswordUiState(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount);
  };
  protoOf(SignupEnterUsernamePasswordUiState).copy$default_2cuuy1_k$ = function (person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount, $super) {
    person = person === VOID ? this.person_1 : person;
    password = password === VOID ? this.password_1 : password;
    genderOptions = genderOptions === VOID ? this.genderOptions_1 : genderOptions;
    personPicture = personPicture === VOID ? this.personPicture_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.registrationMode_1 : registrationMode;
    firstName = firstName === VOID ? this.firstName_1 : firstName;
    passwordError = passwordError === VOID ? this.passwordError_1 : passwordError;
    dateOfBirthError = dateOfBirthError === VOID ? this.dateOfBirthError_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.parentContactError_1 : parentContactError;
    genderError = genderError === VOID ? this.genderError_1 : genderError;
    fullNameError = fullNameError === VOID ? this.fullNameError_1 : fullNameError;
    passkeySupported = passkeySupported === VOID ? this.passkeySupported_1 : passkeySupported;
    isPersonalAccount = isPersonalAccount === VOID ? this.isPersonalAccount_1 : isPersonalAccount;
    return $super === VOID ? this.copy_3uhhxy_k$(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) : $super.copy_3uhhxy_k$.call(this, person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount);
  };
  protoOf(SignupEnterUsernamePasswordUiState).toString = function () {
    return 'SignupEnterUsernamePasswordUiState(person=' + this.person_1 + ', password=' + this.password_1 + ', genderOptions=' + this.genderOptions_1 + ', personPicture=' + this.personPicture_1 + ', registrationMode=' + this.registrationMode_1 + ', firstName=' + this.firstName_1 + ', passwordError=' + this.passwordError_1 + ', dateOfBirthError=' + this.dateOfBirthError_1 + ', parentContactError=' + this.parentContactError_1 + ', genderError=' + this.genderError_1 + ', fullNameError=' + this.fullNameError_1 + ', passkeySupported=' + this.passkeySupported_1 + ', isPersonalAccount=' + this.isPersonalAccount_1 + ')';
  };
  protoOf(SignupEnterUsernamePasswordUiState).hashCode = function () {
    var result = this.person_1 == null ? 0 : this.person_1.hashCode();
    result = imul(result, 31) + (this.password_1 == null ? 0 : getStringHashCode(this.password_1)) | 0;
    result = imul(result, 31) + hashCode(this.genderOptions_1) | 0;
    result = imul(result, 31) + (this.personPicture_1 == null ? 0 : this.personPicture_1.hashCode()) | 0;
    result = imul(result, 31) + this.registrationMode_1 | 0;
    result = imul(result, 31) + (this.firstName_1 == null ? 0 : getStringHashCode(this.firstName_1)) | 0;
    result = imul(result, 31) + (this.passwordError_1 == null ? 0 : getStringHashCode(this.passwordError_1)) | 0;
    result = imul(result, 31) + (this.dateOfBirthError_1 == null ? 0 : getStringHashCode(this.dateOfBirthError_1)) | 0;
    result = imul(result, 31) + (this.parentContactError_1 == null ? 0 : getStringHashCode(this.parentContactError_1)) | 0;
    result = imul(result, 31) + (this.genderError_1 == null ? 0 : getStringHashCode(this.genderError_1)) | 0;
    result = imul(result, 31) + (this.fullNameError_1 == null ? 0 : getStringHashCode(this.fullNameError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.passkeySupported_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isPersonalAccount_1) | 0;
    return result;
  };
  protoOf(SignupEnterUsernamePasswordUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SignupEnterUsernamePasswordUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SignupEnterUsernamePasswordUiState ? other : THROW_CCE();
    if (!equals(this.person_1, tmp0_other_with_cast.person_1))
      return false;
    if (!(this.password_1 == tmp0_other_with_cast.password_1))
      return false;
    if (!equals(this.genderOptions_1, tmp0_other_with_cast.genderOptions_1))
      return false;
    if (!equals(this.personPicture_1, tmp0_other_with_cast.personPicture_1))
      return false;
    if (!(this.registrationMode_1 === tmp0_other_with_cast.registrationMode_1))
      return false;
    if (!(this.firstName_1 == tmp0_other_with_cast.firstName_1))
      return false;
    if (!(this.passwordError_1 == tmp0_other_with_cast.passwordError_1))
      return false;
    if (!(this.dateOfBirthError_1 == tmp0_other_with_cast.dateOfBirthError_1))
      return false;
    if (!(this.parentContactError_1 == tmp0_other_with_cast.parentContactError_1))
      return false;
    if (!(this.genderError_1 == tmp0_other_with_cast.genderError_1))
      return false;
    if (!(this.fullNameError_1 == tmp0_other_with_cast.fullNameError_1))
      return false;
    if (!(this.passkeySupported_1 === tmp0_other_with_cast.passkeySupported_1))
      return false;
    if (!(this.isPersonalAccount_1 === tmp0_other_with_cast.isPersonalAccount_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_19() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_9(receiver);
    }, null);
  }
  function genderConfig$factory_5() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_2(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_3() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_3(receiver);
    }, null);
  }
  function apiUrlConfig$factory_20() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_9(receiver);
    }, null);
  }
  function genderConfig$factory_6() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_2(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_4() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_3(receiver);
    }, null);
  }
  function _get__uiState__8e9jsd_50($this) {
    return $this._uiState_1;
  }
  function Companion_185() {
    Companion_instance_185 = this;
    this.ARG_LOCALE_1 = 'locale';
    this.DEST_NAME_1 = 'Terms';
  }
  protoOf(Companion_185).get_ARG_LOCALE_e4ij2k_k$ = function () {
    return this.ARG_LOCALE_1;
  };
  protoOf(Companion_185).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_185;
  function Companion_getInstance_246() {
    if (Companion_instance_185 == null)
      new Companion_185();
    return Companion_instance_185;
  }
  function _init_$lambda_1($getLocaleForSiteTermsUseCase$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('getLocaleForSiteTermsUseCase', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $getLocaleForSiteTermsUseCase$delegate.get_value_j01efc_k$();
  }
  function SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation) {
    this.$acceptButtonMode_1 = $acceptButtonMode;
    this.$apiUrl_1 = $apiUrl;
    this.$di_1 = $di;
    this.$learningSpace_1 = $learningSpace;
    this.this$0__1 = this$0;
    this.$savedStateHandle_1 = $savedStateHandle;
    this.$getLocaleForSiteTermsUseCase$delegate_1 = $getLocaleForSiteTermsUseCase$delegate;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteTermsDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SiteTermsDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteTermsDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(4);
            var tmp_0 = this;
            var tmp_1;
            if (this.$acceptButtonMode_1 ? !(this.$apiUrl_1 == null) : false) {
              var this_0 = get_direct(this.$di_1);
              var context = this.$learningSpace_1;
              var tmp_2 = this_0.get_directDI_rqg7bd_k$();
              var tmp_3 = Companion_getInstance_2();
              var tmp_4 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_5 = tmp_2.On_r75fd9_k$(tmp_3.invoke_4wgfc3_k$(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), context)).get_directDI_rqg7bd_k$();
              var tmp_6 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
              tmp_1 = tmp_5.Instance_vwdrk9_k$(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), null).get_repositoryOrLocalDb_ys0nkj_k$();
            } else {
              tmp_1 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            }

            tmp_0.repo0__1 = tmp_1;
            this.localeArg1__1 = this.$savedStateHandle_1.get_6bo4tg_k$('locale');
            this.tmp0_elvis_lhs2__1 = this.localeArg1__1;
            if (this.tmp0_elvis_lhs2__1 == null) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = _init_$lambda_1(this.$getLocaleForSiteTermsUseCase$delegate_1).invoke_5dq5ij_k$(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.WHEN_RESULT3__1 = this.tmp0_elvis_lhs2__1;
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            this.WHEN_RESULT3__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            this.termsLocale4__1 = this.WHEN_RESULT3__1;
            this.set_state_rjd8d0_k$(3);
            suspendResult = this.repo0__1.siteTermsDao_wa3vn6_k$().findLatestByLanguage_6y9g14_k$(this.termsLocale4__1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var displayTerms = suspendResult;
            if (!(displayTerms == null)) {
              l$ret$1: do {
                var this_1 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue = this_1.get_value_j01efc_k$();
                  var nextValue = prevValue.copy$default_bbiyrq_k$(displayTerms, this.$acceptButtonMode_1);
                  if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            } else {
              l$ret$3: do {
                var this_2 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_0 = this_2.get_value_j01efc_k$();
                  var nextValue_0 = prevValue_0.copy$default_bbiyrq_k$(VOID, VOID, this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_login_network_error_b1pwy0_k$()));
                  if (this_2.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            return Unit_getInstance();
          case 4:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 4) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SiteTermsDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SiteTermsDetailViewModel$slambda(this.$acceptButtonMode_1, this.$apiUrl_1, this.$di_1, this.$learningSpace_1, this.this$0__1, this.$savedStateHandle_1, this.$getLocaleForSiteTermsUseCase$delegate_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SiteTermsDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SiteTermsDetailViewModel$slambda_0($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation) {
    var i = new SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteTermsDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_246();
    DetailViewModel.call(this, di, savedStateHandle, 'Terms');
    this._uiState_1 = MutableStateFlow(new SiteTermsDetailUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_154().get_ARG_SHOW_ACCEPT_BUTTON_owychz_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    var acceptButtonMode = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    var apiUrl = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$());
    var tmp;
    if (acceptButtonMode ? !(apiUrl == null) : false) {
      tmp = new LearningSpace(apiUrl);
    } else {
      tmp = this.get_accountManager_bzeywn_k$().get_activeLearningSpace_4z58w7_k$();
    }
    var learningSpace = tmp;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var trigger = this.get_diTrigger_fb5jcm_k$();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_getInstance_2();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.invoke_4wgfc3_k$(tmp$ret$0, learningSpace);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var getLocaleForSiteTermsUseCase$delegate = Instance(this_0, tmp$ret$3, null).provideDelegate_o2qlc1_k$(null, getLocalDelegateReference('getLocaleForSiteTermsUseCase', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.<anonymous>' call
        var tmp0_navigationVisible = !acceptButtonMode;
        var tmp1_title = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_terms_and_policies_tm2jnd_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp1_title, tmp0_navigationVisible, true, VOID, false);
        if (this_1.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_3, VOID, VOID, SiteTermsDetailViewModel$slambda_0(acceptButtonMode, apiUrl, di, learningSpace, this, savedStateHandle, getLocaleForSiteTermsUseCase$delegate, null));
  }
  protoOf(SiteTermsDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(SiteTermsDetailViewModel).onClickAccept_i90pz3_k$ = function () {
    var tmp = this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_244().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.onClickAccept.<anonymous>' call
    this.putAllFromSavedStateIfPresent_yspo74_k$(this_0, Companion_getInstance_244().get_REGISTRATION_ARGS_TO_PASS_9ux4pc_k$());
    this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  };
  function SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error) {
    siteTerms = siteTerms === VOID ? null : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? false : acceptButtonVisible;
    error = error === VOID ? null : error;
    this.siteTerms_1 = siteTerms;
    this.acceptButtonVisible_1 = acceptButtonVisible;
    this.error_1 = error;
  }
  protoOf(SiteTermsDetailUiState).get_siteTerms_hal9l_k$ = function () {
    return this.siteTerms_1;
  };
  protoOf(SiteTermsDetailUiState).get_acceptButtonVisible_26kmnl_k$ = function () {
    return this.acceptButtonVisible_1;
  };
  protoOf(SiteTermsDetailUiState).get_error_iqzvfj_k$ = function () {
    return this.error_1;
  };
  protoOf(SiteTermsDetailUiState).component1_7eebsc_k$ = function () {
    return this.siteTerms_1;
  };
  protoOf(SiteTermsDetailUiState).component2_7eebsb_k$ = function () {
    return this.acceptButtonVisible_1;
  };
  protoOf(SiteTermsDetailUiState).component3_7eebsa_k$ = function () {
    return this.error_1;
  };
  protoOf(SiteTermsDetailUiState).copy_jp9l65_k$ = function (siteTerms, acceptButtonVisible, error) {
    return new SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).copy$default_bbiyrq_k$ = function (siteTerms, acceptButtonVisible, error, $super) {
    siteTerms = siteTerms === VOID ? this.siteTerms_1 : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? this.acceptButtonVisible_1 : acceptButtonVisible;
    error = error === VOID ? this.error_1 : error;
    return $super === VOID ? this.copy_jp9l65_k$(siteTerms, acceptButtonVisible, error) : $super.copy_jp9l65_k$.call(this, siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).toString = function () {
    return 'SiteTermsDetailUiState(siteTerms=' + this.siteTerms_1 + ', acceptButtonVisible=' + this.acceptButtonVisible_1 + ', error=' + this.error_1 + ')';
  };
  protoOf(SiteTermsDetailUiState).hashCode = function () {
    var result = this.siteTerms_1 == null ? 0 : hashCode(this.siteTerms_1);
    result = imul(result, 31) + getBooleanHashCode(this.acceptButtonVisible_1) | 0;
    result = imul(result, 31) + (this.error_1 == null ? 0 : getStringHashCode(this.error_1)) | 0;
    return result;
  };
  protoOf(SiteTermsDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteTermsDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteTermsDetailUiState ? other : THROW_CCE();
    if (!equals(this.siteTerms_1, tmp0_other_with_cast.siteTerms_1))
      return false;
    if (!(this.acceptButtonVisible_1 === tmp0_other_with_cast.acceptButtonVisible_1))
      return false;
    if (!(this.error_1 == tmp0_other_with_cast.error_1))
      return false;
    return true;
  };
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda$lambda($endpointUrl) {
    return function () {
      return 'LearningSpaceEnterLink: not working: ' + $endpointUrl;
    };
  }
  function _get__uiState__8e9jsd_51($this) {
    return $this._uiState_1;
  }
  function _get_httpClient__2ty1zc_8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.httpClient$delegate_1;
    httpClient$factory_10();
    return this_0.get_value_j01efc_k$();
  }
  function _get_impl__d88w17_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.impl$delegate_1;
    impl$factory_8();
    return this_0.get_value_j01efc_k$();
  }
  function Companion_186() {
    Companion_instance_186 = this;
    this.DEST_NAME_1 = 'LearningSpaceEnterLink';
    this.ARGS_TO_PASS_THROUGH_1 = listOf([Companion_getInstance_160().get_ARG_NEXT_q16wbp_k$(), Companion_getInstance_156().get_ARG_INTENT_MESSAGE_fgwz62_k$(), Companion_getInstance_160().get_ARG_DONT_SET_CURRENT_SESSION_j18cuv_k$()]);
    this.KEY_LINK_1 = 'stateUrl';
  }
  protoOf(Companion_186).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  protoOf(Companion_186).get_ARGS_TO_PASS_THROUGH_3ub1i6_k$ = function () {
    return this.ARGS_TO_PASS_THROUGH_1;
  };
  protoOf(Companion_186).get_KEY_LINK_a3662l_k$ = function () {
    return this.KEY_LINK_1;
  };
  var Companion_instance_186;
  function Companion_getInstance_247() {
    if (Companion_instance_186 == null)
      new Companion_186();
    return Companion_instance_186;
  }
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, $viewName, resultContinuation) {
    this.this$0__1 = this$0;
    this.$endpointUrl_1 = $endpointUrl;
    this.$viewName_1 = $viewName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = verifySite(_get_httpClient__2ty1zc_8(this.this$0__1), this.$endpointUrl_1, VOID, this.this$0__1.get_json_woos35_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var site = suspendResult;
            var tmp_0 = to(Companion_getInstance_156().get_ARG_LEARNINGSPACE_URL_awzye2_k$(), this.$endpointUrl_1);
            var tmp_1 = Companion_getInstance_156().get_ARG_SITE_q1a649_k$();
            var this_0 = this.this$0__1.get_json_woos35_k$();
            var this_1 = this_0.get_serializersModule_piitvg_k$();
            var this_2 = serializer(this_1, createKType(getKClass(Site), arrayOf([]), false));
            var args = mutableMapOf([tmp_0, to(tmp_1, this_0.encodeToString_k0apqx_k$(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), site))]);
            site.get_registrationAllowed_lhz77q_k$();
            var tmp0_iterator = Companion_getInstance_247().ARGS_TO_PASS_THROUGH_1.iterator_jk1svi_k$();
            while (tmp0_iterator.hasNext_bitz1p_k$()) {
              var element = tmp0_iterator.next_20eer_k$();
              this.this$0__1.putFromSavedStateIfPresent_891b9h_k$(args, element);
            }

            this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
            l$ret$1: do {
              var this_3 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_3.get_value_j01efc_k$();
                var nextValue = prevValue.copy$default_qmnguc_k$(VOID, true, VOID, null, true);
                if (this_3.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (equals(this.$viewName_1, Companion_getInstance_240().get_DEST_NAME_gmgk7z_k$()) ? !site.get_registrationAllowed_lhz77q_k$() : false) {
              this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
              l$ret$3: do {
                var this_4 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_0 = this_4.get_value_j01efc_k$();
                  this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
                  var tmp0_linkError = _get_impl__d88w17_3(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_registration_not_allowed_kcsfpb_k$());
                  var nextValue_0 = prevValue_0.copy$default_qmnguc_k$(VOID, true, VOID, tmp0_linkError, true);
                  if (this_4.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              return Unit_getInstance();
            }

            this.this$0__1.get_navController_qibdoq_k$().navigate$default_srzzsc_k$(this.$viewName_1, args);
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(4);
            continue $sm;
          case 2:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_2 = this.get_exception_x0n6w6_k$();
            if (tmp_2 instanceof Error) {
              var e = this.get_exception_x0n6w6_k$();
              var tmp_3 = Napier_getInstance();
              tmp_3.d$default_iccotn_k$(e, VOID, LearningSpaceEnterLinkViewModel$onClickNext$slambda$lambda(this.$endpointUrl_1));
              l$ret$5: do {
                var this_5 = this.this$0__1._uiState_1;
                while (true) {
                  var prevValue_1 = this_5.get_value_j01efc_k$();
                  this.this$0__1.set_loadingState_52atj3_k$(Companion_getInstance_145().get_NOT_LOADING_rtutyf_k$());
                  var tmp0_linkError_0 = _get_impl__d88w17_3(this.this$0__1).getString_a9yhoi_k$(strings_getInstance().get_invalid_link_d9bc7f_k$());
                  var nextValue_1 = prevValue_1.copy$default_qmnguc_k$(VOID, false, VOID, tmp0_linkError_0, true);
                  if (this_5.compareAndSet_l3595a_k$(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              this.set_state_rjd8d0_k$(4);
              continue $sm;
            } else {
              throw this.get_exception_x0n6w6_k$();
            }

          case 3:
            throw this.get_exception_x0n6w6_k$();
          case 4:
            this.set_exceptionState_fex74n_k$(3);
            return Unit_getInstance();
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e_0;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e_0);
        }
      }
     while (true);
  };
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new LearningSpaceEnterLinkViewModel$onClickNext$slambda(this.this$0__1, this.$endpointUrl_1, this.$viewName_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda_0(this$0, $endpointUrl, $viewName, resultContinuation) {
    var i = new LearningSpaceEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, $viewName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceEnterLinkViewModel(di, savedStateHandle) {
    Companion_getInstance_247();
    UstadViewModel.call(this, di, savedStateHandle, 'LearningSpaceEnterLink');
    this._uiState_1 = MutableStateFlow(new LearningSpaceEnterLinkUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.httpClient$delegate_1 = Instance(this, tmp$ret$0, null).provideDelegate_o2qlc1_k$(this, httpClient$factory_9());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.impl$delegate_1 = Instance(this, tmp$ret$2, null).provideDelegate_o2qlc1_k$(this, impl$factory_7());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_3(this).getString_a9yhoi_k$(strings_getInstance().get_enter_link_xpmut2_k$());
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this._uiState_1;
      while (true) {
        var prevValue_0 = this_1.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_247().KEY_LINK_1);
        var nextValue_0 = prevValue_0.copy$default_qmnguc_k$(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(LearningSpaceEnterLinkViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(LearningSpaceEnterLinkViewModel).onClickNext_jwdi98_k$ = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onClickNext.<anonymous>' call
        var nextValue = prevValue.copy$default_qmnguc_k$(VOID, VOID, VOID, VOID, false);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp;
    if (this.get_savedStateHandle_xtsxet_k$().get_6bo4tg_k$(Companion_getInstance_244().get_ARG_NEW_OR_EXISTING_USER_v4h2ks_k$()) === 'new') {
      tmp = Companion_getInstance_240().get_DEST_NAME_gmgk7z_k$();
    } else {
      tmp = Companion_getInstance_223().get_DEST_NAME_gmgk7z_k$();
    }
    var viewName = tmp;
    this.set_loadingState_52atj3_k$(Companion_getInstance_145().get_INDETERMINATE_a8koem_k$());
    var endpointUrl = requirePostfix(requireHttpPrefix(this._uiState_1.get_value_j01efc_k$().siteLink_1), '/');
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, LearningSpaceEnterLinkViewModel$onClickNext$slambda_0(this, endpointUrl, viewName, null));
  };
  protoOf(LearningSpaceEnterLinkViewModel).onSiteLinkUpdated_xd45qn_k$ = function (siteLink) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onSiteLinkUpdated.<anonymous>' call
        var nextValue = prevValue.copy$default_qmnguc_k$(siteLink);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.get_savedStateHandle_xtsxet_k$().set_wua6pr_k$(Companion_getInstance_247().KEY_LINK_1, siteLink);
  };
  function LearningSpaceEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    siteLink = siteLink === VOID ? '' : siteLink;
    validLink = validLink === VOID ? false : validLink;
    progressVisible = progressVisible === VOID ? false : progressVisible;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.siteLink_1 = siteLink;
    this.validLink_1 = validLink;
    this.progressVisible_1 = progressVisible;
    this.linkError_1 = linkError;
    this.fieldsEnabled_1 = fieldsEnabled;
  }
  protoOf(LearningSpaceEnterLinkUiState).get_siteLink_kn32ae_k$ = function () {
    return this.siteLink_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).get_validLink_9ulcb7_k$ = function () {
    return this.validLink_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).get_progressVisible_tevlwc_k$ = function () {
    return this.progressVisible_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).get_linkError_iqv4or_k$ = function () {
    return this.linkError_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).component1_7eebsc_k$ = function () {
    return this.siteLink_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).component2_7eebsb_k$ = function () {
    return this.validLink_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).component3_7eebsa_k$ = function () {
    return this.progressVisible_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).component4_7eebs9_k$ = function () {
    return this.linkError_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).component5_7eebs8_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(LearningSpaceEnterLinkUiState).copy_jpakm1_k$ = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    return new LearningSpaceEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).copy$default_qmnguc_k$ = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled, $super) {
    siteLink = siteLink === VOID ? this.siteLink_1 : siteLink;
    validLink = validLink === VOID ? this.validLink_1 : validLink;
    progressVisible = progressVisible === VOID ? this.progressVisible_1 : progressVisible;
    linkError = linkError === VOID ? this.linkError_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    return $super === VOID ? this.copy_jpakm1_k$(siteLink, validLink, progressVisible, linkError, fieldsEnabled) : $super.copy_jpakm1_k$.call(this, siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).toString = function () {
    return 'LearningSpaceEnterLinkUiState(siteLink=' + this.siteLink_1 + ', validLink=' + this.validLink_1 + ', progressVisible=' + this.progressVisible_1 + ', linkError=' + this.linkError_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ')';
  };
  protoOf(LearningSpaceEnterLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.siteLink_1);
    result = imul(result, 31) + getBooleanHashCode(this.validLink_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.progressVisible_1) | 0;
    result = imul(result, 31) + (this.linkError_1 == null ? 0 : getStringHashCode(this.linkError_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    return result;
  };
  protoOf(LearningSpaceEnterLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpaceEnterLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpaceEnterLinkUiState ? other : THROW_CCE();
    if (!(this.siteLink_1 === tmp0_other_with_cast.siteLink_1))
      return false;
    if (!(this.validLink_1 === tmp0_other_with_cast.validLink_1))
      return false;
    if (!(this.progressVisible_1 === tmp0_other_with_cast.progressVisible_1))
      return false;
    if (!(this.linkError_1 == tmp0_other_with_cast.linkError_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    return true;
  };
  function httpClient$factory_9() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_8(receiver);
    }, null);
  }
  function impl$factory_7() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_3(receiver);
    }, null);
  }
  function httpClient$factory_10() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_8(receiver);
    }, null);
  }
  function impl$factory_8() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_3(receiver);
    }, null);
  }
  function SystemPermissionConstants() {
    SystemPermissionConstants_instance = this;
    this.SYSTEM_PERMISSION_LABELS_1 = listOf([to(strings_getInstance().get_add_new_users_8eeyci_k$(), PermissionFlags_getInstance().get_ADD_PERSON_79ed2c_k$()), to(strings_getInstance().get_view_all_users_kfv36h_k$(), PermissionFlags_getInstance().get_PERSON_VIEW_s2u8t6_k$()), to(strings_getInstance().get_edit_all_users_ergfy_k$(), PermissionFlags_getInstance().get_EDIT_ALL_PERSONS_uw4lis_k$()), to(strings_getInstance().get_reset_passwords_ge2mjl_k$(), PermissionFlags_getInstance().get_RESET_PASSWORDS_uvrc2p_k$()), to(strings_getInstance().get_manage_user_permissions_5xjnpd_k$(), PermissionFlags_getInstance().get_MANAGE_USER_PERMISSIONS_f0u3z5_k$()), to(strings_getInstance().get_add_new_courses_6fpz72_k$(), PermissionFlags_getInstance().get_ADD_COURSE_d9fly6_k$()), to(strings_getInstance().get_view_all_courses_dtdx2v_k$(), PermissionFlags_getInstance().get_COURSE_VIEW_mewdnk_k$()), to(strings_getInstance().get_edit_all_courses_dtszwy_k$(), PermissionFlags_getInstance().get_COURSE_EDIT_mf7c1n_k$()), to(strings_getInstance().get_moderate_all_courses_lab2g7_k$(), PermissionFlags_getInstance().get_COURSE_MODERATE_rl1ttu_k$()), to(strings_getInstance().get_direct_enrol_users_onto_courses_e8yeq8_k$(), PermissionFlags_getInstance().get_DIRECT_ENROL_255jxj_k$()), to(strings_getInstance().get_manage_student_enrolments_for_all_courses_ya5klz_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_STUDENT_ENROLMENT_t351xd_k$()), to(strings_getInstance().get_manage_teacher_enrolments_for_all_courses_ntchgi_k$(), PermissionFlags_getInstance().get_COURSE_MANAGE_TEACHER_ENROLMENT_2dgmjc_k$()), to(strings_getInstance().get_view_attendance_records_for_all_courses_7dlari_k$(), PermissionFlags_getInstance().get_COURSE_ATTENDANCE_VIEW_cozdgg_k$()), to(strings_getInstance().get_edit_attendance_records_for_all_courses_syocoz_k$(), PermissionFlags_getInstance().get_COURSE_ATTENDANCE_RECORD_ggo5xo_k$()), to(strings_getInstance().get_view_learning_records_for_all_courses_hzzayx_k$(), PermissionFlags_getInstance().get_COURSE_LEARNINGRECORD_VIEW_conusm_k$()), to(strings_getInstance().get_edit_learning_records_for_all_courses_4dgjjm_k$(), PermissionFlags_getInstance().get_COURSE_LEARNINGRECORD_EDIT_coyt6p_k$())]);
  }
  protoOf(SystemPermissionConstants).get_SYSTEM_PERMISSION_LABELS_s33yl4_k$ = function () {
    return this.SYSTEM_PERMISSION_LABELS_1;
  };
  var SystemPermissionConstants_instance;
  function SystemPermissionConstants_getInstance() {
    if (SystemPermissionConstants_instance == null)
      new SystemPermissionConstants();
    return SystemPermissionConstants_instance;
  }
  function personHasSystemPermissionAsFlowForUser(_this__u8e3s4, accountPersonUid, personUid) {
    var tmp;
    if (!accountPersonUid.equals(new Long(0, 0)) ? accountPersonUid.equals(personUid) : false) {
      tmp = flowOf(true);
    } else {
      tmp = _this__u8e3s4.personHasSystemPermissionAsFlow_ryvoyl_k$(accountPersonUid, PermissionFlags_getInstance().get_ALL_18jy08_k$());
    }
    return tmp;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).invoke_p2a0ae_k$ = function (entity, hasViewPermission, $completion) {
    var tmp = this.create_6h3kq0_k$(entity, hasViewPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE();
    return this.invoke_p2a0ae_k$(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.entity_1;
          var tmp_0;
          if (this.hasViewPermission_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).create_6h3kq0_k$ = function (entity, hasViewPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.entity_1 = entity;
    i.hasViewPermission_1 = hasViewPermission;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, hasViewPermission, $completion) {
      return i.invoke_p2a0ae_k$(entity, hasViewPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_xlw9bv_k$ = function (it, $completion) {
    var tmp = this.create_d4wp35_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_xlw9bv_k$((p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            l$ret$1: do {
              var this_0 = this.this$0__1._uiState_1;
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_0;
                if (!(this.it_1 == null)) {
                  tmp_0 = SystemPermissionConstants_getInstance().get_SYSTEM_PERMISSION_LABELS_s33yl4_k$();
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.copy_opeog_k$(this.it_1, tmp_0);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (!(this.it_1 == null)) {
              this.set_state_rjd8d0_k$(1);
              suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().getNamesByUidAsync_cy54rc_k$(this.this$0__1.argPersonUid_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.set_state_rjd8d0_k$(2);
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(2);
            continue $sm;
          case 2:
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).create_d4wp35_k$ = function (it, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_d4wp35_k$((value == null ? true : value instanceof SystemPermission) ? value : THROW_CCE(), completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_xlw9bv_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).invoke_f29lti_k$ = function (hasEditPermission, $completion) {
    var tmp = this.create_vh5neu_k$(hasEditPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_f29lti_k$((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          l$ret$1: do {
            var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
            while (true) {
              var prevValue = this_0.get_value_j01efc_k$();
              var nextValue = prevValue.copy$default_9ltzmx_k$(prevValue.get_fabState_obl84t_k$().copy$default_kse1yx_k$(this.hasEditPermission_1));
              if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).create_vh5neu_k$ = function (hasEditPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this.this$0__1, completion);
    i.hasEditPermission_1 = hasEditPermission;
    return i;
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).create_wyq9v6_k$ = function (value, completion) {
    return this.create_vh5neu_k$((!(value == null) ? typeof value === 'boolean' : false) ? value : THROW_CCE(), completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.invoke_f29lti_k$(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    this.$entityFlow_1 = $entityFlow;
    this.$viewPermissionFlow_1 = $viewPermissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = combine(this.$entityFlow_1, this.$viewPermissionFlow_1, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            suspendResult = collectLatest(tmp_0, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda(this.$entityFlow_1, this.$viewPermissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation) {
    this.$editPermissionFlow_1 = $editPermissionFlow;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this.this$0__1, null);
            suspendResult = this.$editPermissionFlow_1.collect_aksokr_k$(new sam$kotlinx_coroutines_flow_FlowCollector$0_37(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1(this.$editPermissionFlow_1, this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_2($editPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    this.$this_launch_1 = $this_launch;
    this.$entityFlow_1 = $entityFlow;
    this.$viewPermissionFlow_1 = $viewPermissionFlow;
    this.this$0__1 = this$0;
    this.$editPermissionFlow_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          launch(this.$this_launch_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_0(this.$entityFlow_1, this.$viewPermissionFlow_1, this.this$0__1, null));
          launch(this.$this_launch_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_2(this.$editPermissionFlow_1, this.this$0__1, null));
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).create_d196fn_k$ = function (completion) {
    return new SystemPermissionDetailViewModel$slambda$slambda(this.$this_launch_1, this.$entityFlow_1, this.$viewPermissionFlow_1, this.this$0__1, this.$editPermissionFlow_1, completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_argPersonUid__j0lhba_2($this) {
    return $this.argPersonUid_1;
  }
  function _get__uiState__8e9jsd_52($this) {
    return $this._uiState_1;
  }
  function onClickEdit_1($this) {
    var tmp = $this.get_navController_qibdoq_k$();
    var tmp_0 = Companion_getInstance_249().get_DEST_NAME_gmgk7z_k$();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.onClickEdit.<anonymous>' call
    $this.putFromSavedStateIfPresent_891b9h_k$(this_0, Companion_getInstance_160().get_ARG_PERSON_UID_8uotmw_k$());
    var tmp$ret$2 = this_0.build_1k0s4u_k$();
    tmp.navigate$default_srzzsc_k$(tmp_0, tmp$ret$2);
  }
  function Companion_187() {
    Companion_instance_187 = this;
    this.DEST_NAME_1 = 'SystemPermission';
  }
  protoOf(Companion_187).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_187;
  function Companion_getInstance_248() {
    if (Companion_instance_187 == null)
      new Companion_187();
    return Companion_instance_187;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_37(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_37).emit_t92u1f_k$ = function (value, $completion) {
    return this.function_1(value, $completion);
  };
  function SystemPermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_1($boundThis);
      return Unit_getInstance();
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entityFlow_1 = $entityFlow;
    this.$viewPermissionFlow_1 = $viewPermissionFlow;
    this.$editPermissionFlow_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionDetailViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = whenSubscribed(this.this$0__1._uiState_1, SystemPermissionDetailViewModel$slambda$slambda_0(this.$this$launch_1, this.$entityFlow_1, this.$viewPermissionFlow_1, this.this$0__1, this.$editPermissionFlow_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda(this.this$0__1, this.$entityFlow_1, this.$viewPermissionFlow_1, this.$editPermissionFlow_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(SystemPermissionDetailViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SystemPermissionDetailViewModel$slambda_0(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_248();
    DetailViewModel.call(this, di, savedStateHandle, 'SystemPermission');
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_PERSON_UID_8uotmw_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.argPersonUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this._uiState_1 = MutableStateFlow(new SystemPermissionDetailUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var entityFlow = this.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().findByPersonUidAsFlow_7w3yd9_k$(this.argPersonUid_1);
    var viewPermissionFlow = personHasSystemPermissionAsFlowForUser(this.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$(), this.get_activeUserPersonUid_1nlgnz_k$(), this.argPersonUid_1);
    var editPermissionFlow = this.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermissionAsFlow_ryvoyl_k$(this.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_MANAGE_USER_PERMISSIONS_f0u3z5_k$());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.<anonymous>' call
        var tmp0_text = this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_edit_wol9w3_k$());
        var tmp1_onClick = SystemPermissionDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.copy$default_9ltzmx_k$(new FabUiState(VOID, tmp0_text, tmp2_icon, tmp1_onClick));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, SystemPermissionDetailViewModel$slambda_0(this, entityFlow, viewPermissionFlow, editPermissionFlow, null));
  }
  protoOf(SystemPermissionDetailViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  function SystemPermissionDetailUiState(systemPermission, permissionLabels) {
    systemPermission = systemPermission === VOID ? null : systemPermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.systemPermission_1 = systemPermission;
    this.permissionLabels_1 = permissionLabels;
  }
  protoOf(SystemPermissionDetailUiState).get_systemPermission_wi357r_k$ = function () {
    return this.systemPermission_1;
  };
  protoOf(SystemPermissionDetailUiState).get_permissionLabels_z06ky1_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(SystemPermissionDetailUiState).component1_7eebsc_k$ = function () {
    return this.systemPermission_1;
  };
  protoOf(SystemPermissionDetailUiState).component2_7eebsb_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(SystemPermissionDetailUiState).copy_opeog_k$ = function (systemPermission, permissionLabels) {
    return new SystemPermissionDetailUiState(systemPermission, permissionLabels);
  };
  protoOf(SystemPermissionDetailUiState).copy$default_vk82tm_k$ = function (systemPermission, permissionLabels, $super) {
    systemPermission = systemPermission === VOID ? this.systemPermission_1 : systemPermission;
    permissionLabels = permissionLabels === VOID ? this.permissionLabels_1 : permissionLabels;
    return $super === VOID ? this.copy_opeog_k$(systemPermission, permissionLabels) : $super.copy_opeog_k$.call(this, systemPermission, permissionLabels);
  };
  protoOf(SystemPermissionDetailUiState).toString = function () {
    return 'SystemPermissionDetailUiState(systemPermission=' + this.systemPermission_1 + ', permissionLabels=' + this.permissionLabels_1 + ')';
  };
  protoOf(SystemPermissionDetailUiState).hashCode = function () {
    var result = this.systemPermission_1 == null ? 0 : this.systemPermission_1.hashCode();
    result = imul(result, 31) + hashCode(this.permissionLabels_1) | 0;
    return result;
  };
  protoOf(SystemPermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.systemPermission_1, tmp0_other_with_cast.systemPermission_1))
      return false;
    if (!equals(this.permissionLabels_1, tmp0_other_with_cast.permissionLabels_1))
      return false;
    return true;
  };
  function SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda).invoke_nmhao8_k$ = function (db, $completion) {
    var tmp = this.create_9q7izm_k$(db, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_nmhao8_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.db_1.systemPermissionDao_fl20r8_k$().findByPersonUid_4fpooh_k$(this.this$0__1.argPersonUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).create_9q7izm_k$ = function (db, completion) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this.this$0__1, completion);
    i.db_1 = db;
    return i;
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SystemPermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.invoke_nmhao8_k$(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).invoke_5m30xx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_5m30xx_k$($completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return null;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).create_d196fn_k$ = function (completion) {
    return new SystemPermissionEditViewModel$slambda$slambda_1(completion);
  };
  function SystemPermissionEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.invoke_5m30xx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp;
          if (!(it == null)) {
            tmp = SystemPermissionConstants_getInstance().get_SYSTEM_PERMISSION_LABELS_s33yl4_k$();
          } else {
            tmp = emptyList();
          }
          var nextValue = prevValue.copy$default_luvu28_k$(it, VOID, tmp);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function SystemPermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.onClickSave_ncak3a_k$();
      return Unit_getInstance();
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.this$0__1 = this$0;
    this.$entity_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).invoke_g82kyq_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_g82kyq_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().upsertAsync_5qjk9f_k$(this.$entity_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this.this$0__1, this.$entity_1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_g82kyq_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get__uiState__8e9jsd_53($this) {
    return $this._uiState_1;
  }
  function _get_argPersonUid__j0lhba_3($this) {
    return $this.argPersonUid_1;
  }
  function Companion_188() {
    Companion_instance_188 = this;
    this.DEST_NAME_1 = 'SystemPermissionEdit';
  }
  protoOf(Companion_188).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_188;
  function Companion_getInstance_249() {
    if (Companion_instance_188 == null)
      new Companion_188();
    return Companion_instance_188;
  }
  function SystemPermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda).invoke_pclm39_k$ = function (it, $completion) {
    var tmp = this.create_9q7izm_k$(it, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionEditViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_pclm39_k$(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().systemPermissionDao_fl20r8_k$().personHasSystemPermission_tdum2r_k$(this.this$0__1.get_activeUserPersonUid_1nlgnz_k$(), PermissionFlags_getInstance().get_MANAGE_USER_PERMISSIONS_f0u3z5_k$(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda).create_9q7izm_k$ = function (it, completion) {
    var i = new SystemPermissionEditViewModel$slambda(this.this$0__1, completion);
    i.it_1 = it;
    return i;
  };
  protoOf(SystemPermissionEditViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_9q7izm_k$(value instanceof UmAppDatabase ? value : THROW_CCE(), completion);
  };
  function SystemPermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.invoke_pclm39_k$(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_luvu28_k$(VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda_1).invoke_d9fzmj_k$ = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launchIfHasPermission, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Companion_getInstance_22().serializer_9w0wvi_k$();
            var tmp_1 = SystemPermissionEditViewModel$slambda$slambda_0(this.this$0__1, null);
            var tmp_2 = SystemPermissionEditViewModel$slambda$slambda_2(null);
            suspendResult = this.this$0__1.loadEntity$default_wfbimj_k$(tmp_0, VOID, VOID, tmp_1, tmp_2, SystemPermissionEditViewModel$slambda$lambda(this.this$0__1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var tmp_3 = this.this$0__1.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_save_wou5s6_k$());
                var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, SystemPermissionEditViewModel$onClickSave$ref(this.this$0__1)));
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.set_state_rjd8d0_k$(2);
            suspendResult = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$().personDao_e3y77h_k$().getNamesByUidAsync_cy54rc_k$(this.this$0__1.argPersonUid_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.this$0__1.get__appUiState_rulqry_k$();
              while (true) {
                var prevValue_0 = this_1.get_value_j01efc_k$();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.copy$default_9ltzmx_k$(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.compareAndSet_l3595a_k$(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).create_rcuf4x_k$ = function ($this$launchIfHasPermission, completion) {
    var i = new SystemPermissionEditViewModel$slambda_1(this.this$0__1, completion);
    i.$this$launchIfHasPermission_1 = $this$launchIfHasPermission;
    return i;
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function SystemPermissionEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.invoke_d9fzmj_k$($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0._uiState_1;
        while (true) {
          var prevValue = this_0.get_value_j01efc_k$();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.copy$default_luvu28_k$(VOID, it);
          if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_getInstance();
    };
  }
  function SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).invoke_h7udsx_k$ = function ($completion) {
    var tmp = this.create_d196fn_k$($completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).invoke_ib42db_k$ = function ($completion) {
    return this.invoke_h7udsx_k$($completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.this$0__1._uiState_1.get_value_j01efc_k$().entity_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_getInstance();
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.entity0__1 = tmp_1;
            this.set_state_rjd8d0_k$(1);
            var tmp_2 = this.this$0__1.get_activeRepoWithFallback_3qnek7_k$();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this.this$0__1, this.entity0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.this$0__1.get_navController_qibdoq_k$().popBackStack_rnnumt_k$(Companion_getInstance_156().get_CURRENT_DEST_3e1ddb_k$(), true);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).create_d196fn_k$ = function (completion) {
    return new SystemPermissionEditViewModel$onClickSave$slambda(this.this$0__1, completion);
  };
  function SystemPermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.invoke_h7udsx_k$($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel(di, savedStateHandle) {
    Companion_getInstance_249();
    UstadEditViewModel.call(this, di, savedStateHandle, 'SystemPermissionEdit');
    this._uiState_1 = MutableStateFlow(new SystemPermissionEditUiState());
    this.uiState_1 = asStateFlow(this._uiState_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.get_6bo4tg_k$(Companion_getInstance_160().get_ARG_PERSON_UID_8uotmw_k$());
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.argPersonUid_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, VOID, VOID, true);
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = SystemPermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = SystemPermissionEditViewModel$lambda(this);
    this.launchIfHasPermission$default_l9omam_k$(tmp_0, VOID, tmp_1, SystemPermissionEditViewModel$slambda_2(this, null));
  }
  protoOf(SystemPermissionEditViewModel).get_uiState_66ctcc_k$ = function () {
    return this.uiState_1;
  };
  protoOf(SystemPermissionEditViewModel).onTogglePermission_snjy04_k$ = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this._uiState_1;
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onTogglePermission.<anonymous>' call
        var tmp0_safe_receiver = prevValue.entity_1;
        var nextValue = prevValue.copy$default_luvu28_k$(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.copy$default_6nx3nb_k$(VOID, VOID, VOID, toggleFlag(prevValue.entity_1.get_spPermissionsFlag_6fqv1y_k$(), flag)));
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SystemPermissionEditViewModel).onClickSave_ncak3a_k$ = function () {
    var tmp = SystemPermissionEditViewModel$onClickSave$lambda(this);
    this.launchWithLoadingIndicator_qcafqw_k$(tmp, SystemPermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.entity_1 = entity;
    this.fieldsEnabled_1 = fieldsEnabled;
    this.permissionLabels_1 = permissionLabels;
  }
  protoOf(SystemPermissionEditUiState).get_entity_cxtlv0_k$ = function () {
    return this.entity_1;
  };
  protoOf(SystemPermissionEditUiState).get_fieldsEnabled_us2uht_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(SystemPermissionEditUiState).get_permissionLabels_z06ky1_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(SystemPermissionEditUiState).component1_7eebsc_k$ = function () {
    return this.entity_1;
  };
  protoOf(SystemPermissionEditUiState).component2_7eebsb_k$ = function () {
    return this.fieldsEnabled_1;
  };
  protoOf(SystemPermissionEditUiState).component3_7eebsa_k$ = function () {
    return this.permissionLabels_1;
  };
  protoOf(SystemPermissionEditUiState).copy_jf7p1n_k$ = function (entity, fieldsEnabled, permissionLabels) {
    return new SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).copy$default_luvu28_k$ = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.entity_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.fieldsEnabled_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.permissionLabels_1 : permissionLabels;
    return $super === VOID ? this.copy_jf7p1n_k$(entity, fieldsEnabled, permissionLabels) : $super.copy_jf7p1n_k$.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).toString = function () {
    return 'SystemPermissionEditUiState(entity=' + this.entity_1 + ', fieldsEnabled=' + this.fieldsEnabled_1 + ', permissionLabels=' + this.permissionLabels_1 + ')';
  };
  protoOf(SystemPermissionEditUiState).hashCode = function () {
    var result = this.entity_1 == null ? 0 : this.entity_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.fieldsEnabled_1) | 0;
    result = imul(result, 31) + hashCode(this.permissionLabels_1) | 0;
    return result;
  };
  protoOf(SystemPermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.entity_1, tmp0_other_with_cast.entity_1))
      return false;
    if (!(this.fieldsEnabled_1 === tmp0_other_with_cast.fieldsEnabled_1))
      return false;
    if (!equals(this.permissionLabels_1, tmp0_other_with_cast.permissionLabels_1))
      return false;
    return true;
  };
  function TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda$slambda).invoke_x591xy_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_x591xy_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          return _get_allTimeZones__4t4mtu(this.this$0__1);
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$slambda$slambda(this.this$0__1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function TimeZoneListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_x591xy_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation) {
    this.$searchText_1 = $searchText;
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).invoke_x591xy_k$ = function ($this$withContext, $completion) {
    var tmp = this.create_rcuf4x_k$($this$withContext, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_x591xy_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          var this_0 = this.$searchText_1;
          var searchWords = Regex_init_$Create$('\\s+').split_p7ck23_k$(this_0, 0);
          var this_1 = _get_allTimeZones__4t4mtu(this.this$0__1);
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.iterator_jk1svi_k$();
          while (tmp0_iterator.hasNext_bitz1p_k$()) {
            var element = tmp0_iterator.next_20eer_k$();
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_0;
              if (isInterface(searchWords, Collection)) {
                tmp_0 = searchWords.isEmpty_y1axqb_k$();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = true;
                break l$ret$1;
              }
              var tmp0_iterator_0 = searchWords.iterator_jk1svi_k$();
              while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
                var element_0 = tmp0_iterator_0.next_20eer_k$();
                if (!contains(element.get_id_kntnx8_k$(), element_0, true)) {
                  tmp$ret$0 = false;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = true;
            }
             while (false);
            if (tmp$ret$0) {
              destination.add_utx5q5_k$(element);
            }
          }
          return destination;
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).create_rcuf4x_k$ = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda(this.$searchText_1, this.this$0__1, completion);
    i.$this$withContext_1 = $this$withContext;
    return i;
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0($searchText, this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.invoke_x591xy_k$($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_allTimeZones__4t4mtu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.allTimeZones$delegate_1;
    allTimeZones$factory();
    return this_0.get_value_j01efc_k$();
  }
  function _set_searchUpdateJob__bxpap3($this, _set____db54di) {
    $this.searchUpdateJob_1 = _set____db54di;
  }
  function _get_searchUpdateJob__1tz36j($this) {
    return $this.searchUpdateJob_1;
  }
  function Companion_189() {
    Companion_instance_189 = this;
    this.DEST_NAME_1 = 'TimeZoneList';
  }
  protoOf(Companion_189).get_DEST_NAME_gmgk7z_k$ = function () {
    return this.DEST_NAME_1;
  };
  var Companion_instance_189;
  function Companion_getInstance_250() {
    if (Companion_instance_189 == null)
      new Companion_189();
    return Companion_instance_189;
  }
  function sam$kotlin_Comparator$0_3(function_0) {
    this.function_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_3).compare_bczr_k$ = function (a, b) {
    return this.function_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {
    return this.compare_bczr_k$(a, b);
  };
  function TimeZoneListViewModel$allTimeZones$delegate$lambda() {
    var now = System_getInstance().now_2cba_k$();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = Companion_getInstance_35().get_availableZoneIds_kceyfo_k$();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var item = tmp0_iterator.next_20eer_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$0 = Companion_getInstance_35().of_5gnbr7_k$(item);
      destination.add_utx5q5_k$(tmp$ret$0);
    }
    var this_1 = toList(destination);
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda(now);
    var tmp$ret$3 = new sam$kotlin_Comparator$0_3(tmp);
    return sortedWith(this_1, tmp$ret$3);
  }
  function TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda($now) {
    return function (a, b) {
      // Inline function 'kotlin.comparisons.compareValuesBy' call
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp = offsetAt(a, $now).get_totalSeconds_oq5924_k$();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$1 = offsetAt(b, $now).get_totalSeconds_oq5924_k$();
      return compareValues(tmp, tmp$ret$1);
    };
  }
  function TimeZoneListViewModel$slambda(this$0, resultContinuation) {
    this.this$0__1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TimeZoneListViewModel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Dispatchers_getInstance().get_Default_goqax4_k$();
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$slambda$slambda_0(this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var allTimeZonesVal = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy_6ch51m_k$(allTimeZonesVal);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$slambda(this.this$0__1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(TimeZoneListViewModel$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function TimeZoneListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation) {
    this.this$0__1 = this$0;
    this.$searchText_1 = $searchText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            var tmp_0 = Dispatchers_getInstance().get_Default_goqax4_k$();
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0(this.$searchText_1, this.this$0__1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var filteredList = suspendResult;
            l$ret$1: do {
              var this_0 = this.this$0__1.get__uiState_8tkbd_k$();
              while (true) {
                var prevValue = this_0.get_value_j01efc_k$();
                var nextValue = prevValue.copy_6ch51m_k$(filteredList);
                if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this.this$0__1, this.$searchText_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this$0, $searchText, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel(di, savedStateHandle) {
    Companion_getInstance_250();
    UstadListViewModel.call(this, di, savedStateHandle, new TimezoneListUiState(), 'TimeZoneList');
    var tmp = this;
    tmp.allTimeZones$delegate_1 = lazy_0(TimeZoneListViewModel$allTimeZones$delegate$lambda);
    this.searchUpdateJob_1 = null;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.get__appUiState_rulqry_k$();
      while (true) {
        var prevValue = this_0.get_value_j01efc_k$();
        // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.<anonymous>' call
        var nextValue = prevValue.copy$default_9ltzmx_k$(VOID, VOID, this.get_systemImpl_9jowp4_k$().getString_a9yhoi_k$(strings_getInstance().get_timezone_4w1juq_k$()), VOID, VOID, VOID, VOID, this.createSearchEnabledState$default_7v3uai_k$());
        if (this_0.compareAndSet_l3595a_k$(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    launch(tmp_0, VOID, VOID, TimeZoneListViewModel$slambda_0(this, null));
  }
  protoOf(TimeZoneListViewModel).onUpdateSearchResult_wui0ar_k$ = function (searchText) {
    var tmp0_safe_receiver = this.searchUpdateJob_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.cancel$default_8haxne_k$();
    }
    var tmp = this;
    var tmp_0 = this.get_viewModelScope_ryv1dz_k$();
    tmp.searchUpdateJob_1 = launch(tmp_0, VOID, VOID, TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this, searchText, null));
  };
  protoOf(TimeZoneListViewModel).onClickEntry_iw7a5w_k$ = function (entry) {
    this.finishWithResult_jlqwtj_k$(entry.get_id_kntnx8_k$());
  };
  protoOf(TimeZoneListViewModel).onClickAdd_cbqifs_k$ = function () {
  };
  function TimezoneListUiState(timeZoneList) {
    timeZoneList = timeZoneList === VOID ? emptyList() : timeZoneList;
    this.timeZoneList_1 = timeZoneList;
  }
  protoOf(TimezoneListUiState).get_timeZoneList_o8f2jk_k$ = function () {
    return this.timeZoneList_1;
  };
  protoOf(TimezoneListUiState).component1_7eebsc_k$ = function () {
    return this.timeZoneList_1;
  };
  protoOf(TimezoneListUiState).copy_6ch51m_k$ = function (timeZoneList) {
    return new TimezoneListUiState(timeZoneList);
  };
  protoOf(TimezoneListUiState).copy$default_87xzy2_k$ = function (timeZoneList, $super) {
    timeZoneList = timeZoneList === VOID ? this.timeZoneList_1 : timeZoneList;
    return $super === VOID ? this.copy_6ch51m_k$(timeZoneList) : $super.copy_6ch51m_k$.call(this, timeZoneList);
  };
  protoOf(TimezoneListUiState).toString = function () {
    return 'TimezoneListUiState(timeZoneList=' + this.timeZoneList_1 + ')';
  };
  protoOf(TimezoneListUiState).hashCode = function () {
    return hashCode(this.timeZoneList_1);
  };
  protoOf(TimezoneListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TimezoneListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TimezoneListUiState ? other : THROW_CCE();
    if (!equals(this.timeZoneList_1, tmp0_other_with_cast.timeZoneList_1))
      return false;
    return true;
  };
  function allTimeZones$factory() {
    return getPropertyCallableRef('allTimeZones', 1, KProperty1, function (receiver) {
      return _get_allTimeZones__4t4mtu(receiver);
    }, null);
  }
  function encryptPbkdf2(_this__u8e3s4, password, $completion) {
    var tmp = new $encryptPbkdf2COROUTINE$69(_this__u8e3s4, password, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function doublePbkdf2Hash(_this__u8e3s4, password, $completion) {
    var tmp = new $doublePbkdf2HashCOROUTINE$70(_this__u8e3s4, password, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function doublePbkdf2HashAsBase64(_this__u8e3s4, password, $completion) {
    var tmp = new $doublePbkdf2HashAsBase64COROUTINE$71(_this__u8e3s4, password, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  }
  function $encryptPbkdf2COROUTINE$69(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.password_1 = password;
  }
  protoOf($encryptPbkdf2COROUTINE$69).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var tmp_1 = get_direct(this._this__u8e3s4__1.get_di_knto1e_k$()).get_directDI_rqg7bd_k$();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.httpClient0__1 = tmp_1.Instance_vwdrk9_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.this1__1 = this.httpClient0__1;
            var tmp_4 = this;
            tmp_4.urlString2__1 = this._this__u8e3s4__1.get_learningSpace_sz4skh_k$().get_url_18iuii_k$() + 'api/pbkdf2/encryptPbkdf2';
            var tmp_5 = this;
            tmp_5.this3__1 = this.this1__1;
            var tmp_6 = this;
            tmp_6.this4__1 = this.this3__1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString2__1);
            parameter(this_0, 'secret', this.password_1);
            tmp_7.builder5__1 = this_0;
            this.builder5__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_8 = this;
            tmp_8.this6__1 = this.this4__1;
            var tmp_9 = this;
            tmp_9.builder7__1 = this.builder5__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder7__1, this.this6__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT8__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsText(this.ARGUMENT8__1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            return decodeBase64Bytes(ARGUMENT);
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $doublePbkdf2HashCOROUTINE$70(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.password_1 = password;
  }
  protoOf($doublePbkdf2HashCOROUTINE$70).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = doublePbkdf2HashAsBase64(this._this__u8e3s4__1, this.password_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return decodeBase64Bytes(ARGUMENT);
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function $doublePbkdf2HashAsBase64COROUTINE$71(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this._this__u8e3s4__1 = _this__u8e3s4;
    this.password_1 = password;
  }
  protoOf($doublePbkdf2HashAsBase64COROUTINE$71).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(3);
            var tmp_0 = this;
            var tmp_1 = get_direct(this._this__u8e3s4__1.get_di_knto1e_k$()).get_directDI_rqg7bd_k$();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.httpClient0__1 = tmp_1.Instance_vwdrk9_k$(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.this1__1 = this.httpClient0__1;
            var tmp_4 = this;
            tmp_4.urlString2__1 = this._this__u8e3s4__1.get_learningSpace_sz4skh_k$().get_url_18iuii_k$() + 'api/pbkdf2/doubleEncryptPbkdf2';
            var tmp_5 = this;
            tmp_5.this3__1 = this.this1__1;
            var tmp_6 = this;
            tmp_6.this4__1 = this.this3__1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.urlString2__1);
            parameter(this_0, 'secret', this.password_1);
            tmp_7.builder5__1 = this_0;
            this.builder5__1.set_method_hoo95u_k$(Companion_getInstance_5().get_Get_18jsxf_k$());
            var tmp_8 = this;
            tmp_8.this6__1 = this.this4__1;
            var tmp_9 = this;
            tmp_9.builder7__1 = this.builder5__1;
            this.set_state_rjd8d0_k$(1);
            suspendResult = (new HttpStatement(this.builder7__1, this.this6__1)).execute_rsj18j_k$(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ARGUMENT8__1 = suspendResult;
            this.set_state_rjd8d0_k$(2);
            suspendResult = bodyAsText(this.ARGUMENT8__1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 3) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  function get_DIContext() {
    _init_properties_DiModule_kt__i4hbld();
    return DIContext;
  }
  var DIContext;
  function get_DIModule() {
    _init_properties_DiModule_kt__i4hbld();
    return DIModule;
  }
  var DIModule;
  function DIModule$lambda($this$FC, props) {
    _init_properties_DiModule_kt__i4hbld();
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_DIContext();
    var value = props.di;
    var block = DIModule$lambda$lambda(props);
    addChild($this$FC, this_0, value, block);
    return Unit_getInstance();
  }
  function DIModule$lambda$lambda($props) {
    return function ($this$invoke) {
      var this_0 = $props.children;
      addChildNode($this$invoke, this_0);
      return Unit_getInstance();
    };
  }
  var properties_initialized_DiModule_kt_wik303;
  function _init_properties_DiModule_kt__i4hbld() {
    if (!properties_initialized_DiModule_kt_wik303) {
      properties_initialized_DiModule_kt_wik303 = true;
      DIContext = createContext();
      DIModule = FC(DIModule$lambda);
    }
  }
  function get_NavHostContext() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHostContext;
  }
  var NavHostContext;
  function get_NavHost() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHost;
  }
  var NavHost;
  function _get_navigateFn__cvp8y($this) {
    return $this.navigateFn_1;
  }
  function _get_location__4pgxiu($this) {
    return $this.location_1;
  }
  function _get_onHideChildren__1xa9t7($this) {
    return $this.onHideChildren_1;
  }
  function invoke$effectivePopUpTo(_this__u8e3s4, this$0) {
    var tmp;
    if (_this__u8e3s4 === Companion_getInstance_156().get_CURRENT_DEST_3e1ddb_k$()) {
      tmp = get_ustadViewName(this$0.location_1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function NavHostFunction(navigateFn, location, onHideChildren) {
    this.navigateFn_1 = navigateFn;
    this.location_1 = location;
    this.onHideChildren_1 = onHideChildren;
  }
  protoOf(NavHostFunction).invoke_9wd66h_k$ = function (cmd) {
    if (cmd instanceof NavigateNavCommand) {
      var tmp1_safe_receiver = cmd.get_goOptions_67q8lv_k$().get_popUpToViewName_t8l7rm_k$();
      var popUpToView = tmp1_safe_receiver == null ? null : invoke$effectivePopUpTo(tmp1_safe_receiver, this);
      if ((popUpToView == null ? true : popUpToView === get_ustadViewName(this.location_1)) ? !cmd.get_goOptions_67q8lv_k$().get_clearStack_wh5e0s_k$() ? true : this.location_1.key === get_firstLocationKey() : false) {
        Napier_getInstance().d$default_a5agxr_k$('NavHostFunction: go to /' + cmd.get_viewName_c12mav_k$() + '?' + toUrlQueryString(cmd.get_args_woj09y_k$()));
        var replaceNav = (popUpToView === get_ustadViewName(this.location_1) ? cmd.get_goOptions_67q8lv_k$().get_popUpToInclusive_ijgaa6_k$() : false) ? true : cmd.get_goOptions_67q8lv_k$().get_clearStack_wh5e0s_k$();
        var tmp = '/' + cmd.get_viewName_c12mav_k$() + '?' + toUrlQueryString(cmd.get_args_woj09y_k$());
        // Inline function 'js.objects.jso' call
        // Inline function 'kotlin.apply' call
        // Inline function 'js.objects.jso' call
        var this_0 = {};
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.components.NavHostFunction.invoke.<anonymous>' call
        this_0.replace = replaceNav;
        setIsNewFirstLocation(this_0, this.location_1);
        this.navigateFn_1(tmp, this_0);
      } else {
        Napier_getInstance().d$default_a5agxr_k$('NavHostFunction: pop, then go /' + cmd.get_viewName_c12mav_k$() + '?' + toUrlQueryString(cmd.get_args_woj09y_k$()));
        clearNavHostCommands(sessionStorage);
        sessionStorage.removeItem('navControllerStackCleared');
        sessionStorage.removeItem('navHostHitPopupto');
        if (!(popUpToView == null)) {
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = popUpToView;
        }
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerClearStack'] = cmd.get_goOptions_67q8lv_k$().get_clearStack_wh5e0s_k$().toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerPopUpToInc'] = cmd.get_goOptions_67q8lv_k$().get_popUpToInclusive_ijgaa6_k$().toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerGoToAfterPop'] = '/' + cmd.get_viewName_c12mav_k$() + '?' + toUrlQueryString(cmd.get_args_woj09y_k$());
        this.onHideChildren_1();
        this.navigateFn_1(-1);
      }
    } else {
      if (cmd instanceof PopNavCommand) {
        var popUpTo = invoke$effectivePopUpTo(cmd.get_viewName_c12mav_k$(), this);
        if (popUpTo === get_ustadViewName(this.location_1) ? cmd.get_inclusive_g8fo3h_k$() : false) {
          Napier_getInstance().d$default_a5agxr_k$('NavHostFunction: pop to current viewname ' + popUpTo + ' (inclusive) ' + 'e.g. go back one');
          this.navigateFn_1(-1);
        } else if (!(popUpTo === get_ustadViewName(this.location_1))) {
          Napier_getInstance().d$default_a5agxr_k$('NavHostFunction: pop to ' + popUpTo + ' inclusive = ' + cmd.get_inclusive_g8fo3h_k$());
          sessionStorage.removeItem('navHostHitPopupto');
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = cmd.get_viewName_c12mav_k$();
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpToInc'] = cmd.get_inclusive_g8fo3h_k$().toString();
          this.onHideChildren_1();
          this.navigateFn_1(-1);
        } else {
          Napier_getInstance().d$default_a5agxr_k$('NavHostFunction: pop up to current viewname, inclusive = false?? Nothing to do.');
        }
      } else {
        Napier_getInstance().d$default_a5agxr_k$('NavHostFunction: command ignored: ' + cmd);
      }
    }
  };
  function get_KEY_NAV_CONTROLLER_POPUPTO_PAGE() {
    return KEY_NAV_CONTROLLER_POPUPTO_PAGE;
  }
  var KEY_NAV_CONTROLLER_POPUPTO_PAGE;
  function get_KEY_NAV_CONTROLLER_CLEAR_STACK() {
    return KEY_NAV_CONTROLLER_CLEAR_STACK;
  }
  var KEY_NAV_CONTROLLER_CLEAR_STACK;
  function get_NAVHOST_CLEARSTACK_VIEWNAME() {
    return NAVHOST_CLEARSTACK_VIEWNAME;
  }
  var NAVHOST_CLEARSTACK_VIEWNAME;
  function set_firstLocationKey(value) {
    _init_properties_NavHost_kt__jjqoc9();
    sessionStorage.setItem('firstLocationKey', value);
  }
  function get_firstLocationKey() {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp0_elvis_lhs = sessionStorage.getItem('firstLocationKey');
    return tmp0_elvis_lhs == null ? 'default' : tmp0_elvis_lhs;
  }
  function get_KEY_NAV_CONTROLLER_NAVTO_AFTER_POP() {
    return KEY_NAV_CONTROLLER_NAVTO_AFTER_POP;
  }
  var KEY_NAV_CONTROLLER_NAVTO_AFTER_POP;
  function get_KEY_NAV_CONTROLLER_POPUPTO_INCLUSIVE() {
    return KEY_NAV_CONTROLLER_POPUPTO_INCLUSIVE;
  }
  var KEY_NAV_CONTROLLER_POPUPTO_INCLUSIVE;
  function get_KEY_NAV_CONTROLLER_STACK_CLEARED() {
    return KEY_NAV_CONTROLLER_STACK_CLEARED;
  }
  var KEY_NAV_CONTROLLER_STACK_CLEARED;
  function get_KEY_NAVCONTROLLER_HIT_POPUP_TO_TARGET() {
    return KEY_NAVCONTROLLER_HIT_POPUP_TO_TARGET;
  }
  var KEY_NAVCONTROLLER_HIT_POPUP_TO_TARGET;
  function clearNavHostCommands(_this__u8e3s4) {
    _init_properties_NavHost_kt__jjqoc9();
    _this__u8e3s4.removeItem('navControllerPopUpTo');
    _this__u8e3s4.removeItem('navControllerPopUpToInc');
    _this__u8e3s4.removeItem('navControllerClearStack');
    _this__u8e3s4.removeItem('navControllerGoToAfterPop');
    _this__u8e3s4.removeItem('navHostRoot');
  }
  function setIsNewFirstLocation(_this__u8e3s4, fromLocation) {
    _init_properties_NavHost_kt__jjqoc9();
    if (_this__u8e3s4.replace === true ? fromLocation.key === get_firstLocationKey() : false) {
      _this__u8e3s4.state = json([to('isNewFirstLocation', true)]);
    }
  }
  function get_KEY_HAVHOST_ROOT_KEY() {
    return KEY_HAVHOST_ROOT_KEY;
  }
  var KEY_HAVHOST_ROOT_KEY;
  function NavHost$lambda($this$FC, props) {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp;
    // Inline function 'org.w3c.dom.get' call
    // Inline function 'kotlin.js.asDynamic' call
    if (sessionStorage['navControllerPopUpTo'] == null) {
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = !(sessionStorage['navControllerClearStack'] === 'false');
    } else {
      tmp = false;
    }
    var showChildren$delegate = useState(tmp);
    var navigateFn = useNavigate();
    var location = useLocation();
    // Inline function 'react.useMemo' call
    var dependencies = [navigateFn, location];
    var callback = NavHost$lambda$lambda(navigateFn, location, showChildren$delegate);
    var navHostFunction = useMemo(callback, dependencies);
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_NavHostContext();
    var block = NavHost$lambda$lambda_0(location, props, navigateFn, showChildren$delegate);
    addChild($this$FC, this_0, navHostFunction, block);
    return Unit_getInstance();
  }
  function invoke$lambda($showChildren$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $showChildren$delegate[0];
  }
  function invoke$lambda_0($showChildren$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $showChildren$delegate[1](value);
    return Unit_getInstance();
  }
  function NavHost$lambda$lambda$lambda($showChildren$delegate) {
    return function () {
      invoke$lambda_0($showChildren$delegate, false);
      return Unit_getInstance();
    };
  }
  function NavHost$lambda$lambda($navigateFn, $location, $showChildren$delegate) {
    return function () {
      return new NavHostFunction($navigateFn, $location, NavHost$lambda$lambda$lambda($showChildren$delegate));
    };
  }
  function invoke$launchClearStackTimeout(_this__u8e3s4, navigateFn) {
    return launch(_this__u8e3s4, VOID, VOID, NavHost$lambda$lambda$launchClearStackTimeout$slambda_0(navigateFn, null));
  }
  function invoke$lambda_1($navTimeoutJob$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $navTimeoutJob$delegate[0];
  }
  function invoke$lambda_2($navTimeoutJob$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $navTimeoutJob$delegate[1](value);
    return Unit_getInstance();
  }
  function NavHost$lambda$lambda$lambda_0() {
    _init_properties_NavHost_kt__jjqoc9();
    return CoroutineScope_0(Dispatchers_getInstance().get_Main_wo5vz6_k$().plus_s13ygv_k$(Job()));
  }
  function NavHost$lambda$lambda$lambda_1() {
    _init_properties_NavHost_kt__jjqoc9();
    return null;
  }
  function NavHost$lambda$lambda$lambda_2($location, $navigateFn, $coroutineScope, $navTimeoutJob$delegate, $showChildren$delegate) {
    return function ($this$useEffect) {
      console.log('NavHost: key = ' + $location.key);
      var tmp0_safe_receiver = $location.state;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.js.unsafeCast' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = tmp0_safe_receiver;
      }
      var tmp1_safe_receiver = tmp;
      var isNewFirstLocation = equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver['isNewFirstLocation'], true);
      var tmp_0;
      if (isNewFirstLocation) {
        console.log('NavHost: New first location key = ' + $location.key);
        set_firstLocationKey($location.key);
        tmp_0 = Unit_getInstance();
      }
      var tmp2_safe_receiver = invoke$lambda_1($navTimeoutJob$delegate);
      if (tmp2_safe_receiver == null)
        null;
      else {
        tmp2_safe_receiver.cancel$default_8haxne_k$();
      }
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var popupToTarget = sessionStorage['navControllerPopUpTo'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var navToAfterPop = sessionStorage['navControllerGoToAfterPop'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp3_safe_receiver = sessionStorage['navControllerPopUpToInc'];
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : toBoolean(tmp3_safe_receiver);
      var popUpToInclusive = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp5_safe_receiver = sessionStorage['navControllerClearStack'];
      var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : toBoolean(tmp5_safe_receiver);
      var clearStack = tmp6_elvis_lhs == null ? false : tmp6_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp7_safe_receiver = sessionStorage['navControllerStackCleared'];
      var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : toBoolean(tmp7_safe_receiver);
      var clearStackHitPlaceholder = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp9_safe_receiver = sessionStorage['navHostHitPopupto'];
      var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : toBoolean(tmp9_safe_receiver);
      var popUpToHitDestination = tmp10_elvis_lhs == null ? false : tmp10_elvis_lhs;
      Napier_getInstance().v$default_9ddbot_k$('NavHost: useEffect check: key = ' + $location.key + ' ' + ('current viewname = ' + get_ustadViewName($location) + ' ') + ('popUpToTarget = ' + popupToTarget + ' ') + ('navtoAfterPop = ' + navToAfterPop + ' ') + ('popUpToInclusive = ' + popUpToInclusive + ' ') + ('clearStack = ' + clearStack + ' ') + ('clearStackHitPlaceholder = ' + clearStackHitPlaceholder + ' ') + ('popUpToHitDestination = ' + popUpToHitDestination));
      var tmp_1;
      if ((popupToTarget == null ? !clearStack : false) ? !($location.pathname === '/ClearStack') : false) {
        Napier_getInstance().v$default_9ddbot_k$('NavHost: action: no pop or other operation pending, show children');
        invoke$lambda_0($showChildren$delegate, true);
        tmp_1 = Unit_getInstance();
      } else if (popupToTarget === get_ustadViewName($location) ? popUpToInclusive : false) {
        Napier_getInstance().v$default_9ddbot_k$('NavHost: action: reached popUpTo destination, popUpToInclusive is set, pop once more');
        invoke$lambda_0($showChildren$delegate, false);
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navHostHitPopupto'] = 'true';
        $navigateFn(-1);
        var tmp_2;
        if (!(navToAfterPop == null)) {
          invoke$lambda_2($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
          tmp_2 = Unit_getInstance();
        }
        tmp_1 = tmp_2;
      } else if (popupToTarget === get_ustadViewName($location) ? true : popUpToHitDestination) {
        Napier_getInstance().v$default_9ddbot_k$('NavHost: action: reached popupToDestination with inclusive = false, or inclusive was true and destination was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_3;
        if (!(navToAfterPop == null)) {
          $navigateFn(navToAfterPop);
          tmp_3 = Unit_getInstance();
        } else {
          invoke$lambda_0($showChildren$delegate, true);
          tmp_3 = Unit_getInstance();
        }
        tmp_1 = tmp_3;
      } else if ((clearStack ? $location.key === get_firstLocationKey() : false) ? !clearStackHitPlaceholder : false) {
        Napier_getInstance().v$default_9ddbot_k$('NavHost: action: clearstack was set, reached first entry in history, but did not yet navigate to dummy placeholder. Going to /ClearStack');
        $navigateFn('/ClearStack');
        tmp_1 = Unit_getInstance();
      } else if ($location.pathname === '/ClearStack') {
        Napier_getInstance().v$default_9ddbot_k$('NavHost: action: reached stack clear dummy placeholder. Going back');
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerStackCleared'] = 'true';
        $navigateFn(-1);
        tmp_1 = Unit_getInstance();
      } else if (clearStack ? clearStackHitPlaceholder : false) {
        Napier_getInstance().v$default_9ddbot_k$('NavHost: action: clearStack was set and dummy placeholder was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_4;
        if (!(navToAfterPop == null)) {
          // Inline function 'js.objects.jso' call
          // Inline function 'kotlin.apply' call
          // Inline function 'js.objects.jso' call
          var this_0 = {};
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          this_0.replace = true;
          setIsNewFirstLocation(this_0, $location);
          $navigateFn(navToAfterPop, this_0);
          tmp_4 = Unit_getInstance();
        }
        tmp_1 = tmp_4;
      } else {
        Napier_getInstance().v$default_9ddbot_k$('NavHost: action: need to continue history popping');
        invoke$lambda_0($showChildren$delegate, false);
        // Inline function 'kotlin.takeIf' call
        var this_1 = $navigateFn;
        // Inline function 'kotlin.contracts.contract' call
        var tmp_5;
        // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
        if (!($location.key === get_firstLocationKey())) {
          tmp_5 = this_1;
        } else {
          tmp_5 = null;
        }
        var tmp11_safe_receiver = tmp_5;
        if (tmp11_safe_receiver == null)
          null;
        else {
          tmp11_safe_receiver(-1);
        }
        invoke$lambda_2($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
        tmp_1 = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation) {
    this.$navigateFn_1 = $navigateFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        switch (tmp) {
          case 0:
            this.set_exceptionState_fex74n_k$(2);
            this.set_state_rjd8d0_k$(1);
            suspendResult = delay(new Long(250, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Napier_getInstance().v$default_9ddbot_k$('NavHost: action: clearStackTimeout: apparently at the end of history. go to clearstack');
            sessionStorage['navControllerClearStack'] = 'true';
            this.$navigateFn_1('/ClearStack');
            return Unit_getInstance();
          case 2:
            throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        if (this.get_exceptionState_wflpxn_k$() === 2) {
          throw e;
        } else {
          this.set_state_rjd8d0_k$(this.get_exceptionState_wflpxn_k$());
          this.set_exception_px07aa_k$(e);
        }
      }
     while (true);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda(this.$navigateFn_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda_0($navigateFn, resultContinuation) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NavHost$lambda$lambda_0($location, $props, $navigateFn, $showChildren$delegate) {
    return function ($this$invoke) {
      // Inline function 'react.useMemo' call
      // Inline function 'kotlin.emptyArray' call
      var dependencies = [].slice();
      var callback = NavHost$lambda$lambda$lambda_0;
      var coroutineScope = useMemo(callback, dependencies);
      var navTimeoutJob$delegate = useState_0(NavHost$lambda$lambda$lambda_1);
      // Inline function 'kotlin.arrayOf' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp = [$location.key].slice();
      useEffect(tmp, NavHost$lambda$lambda$lambda_2($location, $navigateFn, coroutineScope, navTimeoutJob$delegate, $showChildren$delegate));
      var tmp_0;
      if (invoke$lambda($showChildren$delegate)) {
        var this_0 = $props.children;
        addChildNode($this$invoke, this_0);
        tmp_0 = Unit_getInstance();
      }
      return Unit_getInstance();
    };
  }
  var properties_initialized_NavHost_kt_vv2ix1;
  function _init_properties_NavHost_kt__jjqoc9() {
    if (!properties_initialized_NavHost_kt_vv2ix1) {
      properties_initialized_NavHost_kt_vv2ix1 = true;
      NavHostContext = createContext();
      NavHost = FC(NavHost$lambda);
    }
  }
  function get_NavHostClearStackPlaceholder() {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return NavHostClearStackPlaceholder;
  }
  var NavHostClearStackPlaceholder;
  function NavHostClearStackPlaceholder$lambda($this$FC, props) {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return Unit_getInstance();
  }
  var properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf;
  function _init_properties_NavHostClearStackPlaceholder_kt__f93zv7() {
    if (!properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf) {
      properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf = true;
      NavHostClearStackPlaceholder = FC(NavHostClearStackPlaceholder$lambda);
    }
  }
  function get_Migrate131to132DummyMigration() {
    _init_properties_Migrate131to132DummyMigration_kt__xyhwbf();
    return Migrate131to132DummyMigration;
  }
  var Migrate131to132DummyMigration;
  function Migrate131to132DummyMigration$lambda(it) {
    _init_properties_Migrate131to132DummyMigration_kt__xyhwbf();
    return emptyList();
  }
  var properties_initialized_Migrate131to132DummyMigration_kt_1zstyf;
  function _init_properties_Migrate131to132DummyMigration_kt__xyhwbf() {
    if (!properties_initialized_Migrate131to132DummyMigration_kt_1zstyf) {
      properties_initialized_Migrate131to132DummyMigration_kt_1zstyf = true;
      Migrate131to132DummyMigration = new DoorMigrationStatementList(131, 132, Migrate131to132DummyMigration$lambda);
    }
  }
  function get_ustadViewName(_this__u8e3s4) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = removePrefix(_this__u8e3s4.pathname, '/');
    return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
  }
  function _get_jsStringProvider__6ekyow($this) {
    return $this.jsStringProvider_1;
  }
  function Companion_190() {
    Companion_instance_190 = this;
  }
  var Companion_instance_190;
  function Companion_getInstance_251() {
    if (Companion_instance_190 == null)
      new Companion_190();
    return Companion_instance_190;
  }
  function UstadMobileSystemImpl$openFileInDefaultViewer$slambda($aElement, $doorUri, $fileName, resultContinuation) {
    this.$aElement_1 = $aElement;
    this.$doorUri_1 = $doorUri;
    this.$fileName_1 = $fileName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadMobileSystemImpl$openFileInDefaultViewer$slambda).invoke_d9fzmj_k$ = function ($this$launch, $completion) {
    var tmp = this.create_rcuf4x_k$($this$launch, $completion);
    tmp.set_result_xj64lm_k$(Unit_getInstance());
    tmp.set_exception_px07aa_k$(null);
    return tmp.doResume_5yljmg_k$();
  };
  protoOf(UstadMobileSystemImpl$openFileInDefaultViewer$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
    return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadMobileSystemImpl$openFileInDefaultViewer$slambda).doResume_5yljmg_k$ = function () {
    var suspendResult = this.get_result_iyg5d2_k$();
    $sm: do
      try {
        var tmp = this.get_state_iypx7s_k$();
        if (tmp === 0) {
          this.set_exceptionState_fex74n_k$(1);
          this.$aElement_1.style.display = 'none';
          this.$aElement_1.href = this.$doorUri_1.toString();
          var tmp0_safe_receiver = this.$fileName_1;
          if (tmp0_safe_receiver == null)
            null;
          else {
            this.$aElement_1.download = tmp0_safe_receiver;
          }
          this.$aElement_1.click();
          return Unit_getInstance();
        } else if (tmp === 1) {
          throw this.get_exception_x0n6w6_k$();
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadMobileSystemImpl$openFileInDefaultViewer$slambda).create_rcuf4x_k$ = function ($this$launch, completion) {
    var i = new UstadMobileSystemImpl$openFileInDefaultViewer$slambda(this.$aElement_1, this.$doorUri_1, this.$fileName_1, completion);
    i.$this$launch_1 = $this$launch;
    return i;
  };
  protoOf(UstadMobileSystemImpl$openFileInDefaultViewer$slambda).create_wyq9v6_k$ = function (value, completion) {
    return this.create_rcuf4x_k$((!(value == null) ? isInterface(value, CoroutineScope) : false) ? value : THROW_CCE(), completion);
  };
  function UstadMobileSystemImpl$openFileInDefaultViewer$slambda_0($aElement, $doorUri, $fileName, resultContinuation) {
    var i = new UstadMobileSystemImpl$openFileInDefaultViewer$slambda($aElement, $doorUri, $fileName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.invoke_d9fzmj_k$($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadMobileSystemImpl(settings, langConfig, jsStringProvider) {
    Companion_getInstance_251();
    UstadMobileSystemCommon.call(this, settings, langConfig);
    this.jsStringProvider_1 = jsStringProvider;
  }
  protoOf(UstadMobileSystemImpl).getString_a9yhoi_k$ = function (stringResource) {
    return stringResource.localized_o7fm9j_k$(this.jsStringProvider_1, this.get_langConfig_ohcymx_k$().get_displayedLocale_vlg2wi_k$());
  };
  protoOf(UstadMobileSystemImpl).formatString_qr9zmw_k$ = function (stringResource, args) {
    return stringResource.localized_gklrw0_k$(this.jsStringProvider_1, this.get_langConfig_ohcymx_k$().get_displayedLocale_vlg2wi_k$(), args.slice());
  };
  protoOf(UstadMobileSystemImpl).formatPlural_14zeos_k$ = function (pluralsResource, number) {
    return format(pluralsResource, number, [number]).localized_t71ipc_k$(this.jsStringProvider_1);
  };
  protoOf(UstadMobileSystemImpl).getAppSetupFile_ord2y6_k$ = function (context, zip, $completion) {
    // Inline function 'kotlin.TODO' call
    var reason = 'not implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(UstadMobileSystemImpl).getAppSetupFile = function (context, zip, $completion) {
    return this.getAppSetupFile_ord2y6_k$(context, zip, $completion);
  };
  protoOf(UstadMobileSystemImpl).getVersion_vcf864_k$ = function (context) {
    return '';
  };
  protoOf(UstadMobileSystemImpl).getBuildTimestamp_862bk0_k$ = function (context) {
    return numberToLong((new Date()).getTime());
  };
  protoOf(UstadMobileSystemImpl).openFileInDefaultViewer_7fucpv_k$ = function (context, doorUri, mimeType, fileName) {
    var tmp = document.createElement('a');
    var aElement = tmp instanceof HTMLAnchorElement ? tmp : THROW_CCE();
    var tmp_0 = GlobalScope_getInstance();
    launch(tmp_0, VOID, VOID, UstadMobileSystemImpl$openFileInDefaultViewer$slambda_0(aElement, doorUri, fileName, null));
  };
  protoOf(UstadMobileSystemImpl).go_oedsqu_k$ = function (viewName, args, context, flags, ustadGoOptions) {
    throw IllegalStateException_init_$Create$('Not supported on JS anymore!');
  };
  protoOf(UstadMobileSystemImpl).go = function (viewName, args, context, flags, ustadGoOptions) {
    return this.go_oedsqu_k$(viewName, args, context, flags, ustadGoOptions);
  };
  function _get_KEY_HANDLE_ID__60m8vz($this) {
    return $this.KEY_HANDLE_ID_1;
  }
  function _get_history__d61b7h($this) {
    return $this.history_1;
  }
  function _get_searchParams__4chnlp($this) {
    return $this.searchParams_1;
  }
  function _get_handleId__pkesaw($this) {
    return $this.handleId_1;
  }
  function setStateKey(_this__u8e3s4, $this, key, value) {
    var tmp0_safe_receiver = _this__u8e3s4.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_elvis_lhs = tmp;
    var newState = tmp1_elvis_lhs == null ? json([]) : tmp1_elvis_lhs;
    newState[key] = value;
    _this__u8e3s4.replaceState(newState, '');
  }
  function Companion_191() {
    Companion_instance_191 = this;
    this.KEY_HANDLE_ID_1 = '_handleId';
  }
  var Companion_instance_191;
  function Companion_getInstance_252() {
    if (Companion_instance_191 == null)
      new Companion_191();
    return Companion_instance_191;
  }
  function SavedStateHandle2(history, searchParams) {
    Companion_getInstance_252();
    this.history_1 = history;
    this.searchParams_1 = searchParams;
    var storedHandleId = this.get_6bo4tg_k$('_handleId');
    if (storedHandleId == null) {
      this.handleId_1 = Default_getInstance_0().nextInt_ujorgc_k$().toString();
      setStateKey(this.history_1, this, '_handleId', this.handleId_1);
    } else {
      this.handleId_1 = storedHandleId;
    }
  }
  protoOf(SavedStateHandle2).set_wua6pr_k$ = function (key, value) {
    var tmp0_safe_receiver = this.history_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver._handleId) != this.handleId_1) {
      throw IllegalStateException_init_$Create$('SavedState cannot save values after the user has changed page');
    }
    if (!(value == null)) {
      setStateKey(this.history_1, this, key, value);
    }
  };
  protoOf(SavedStateHandle2).get_6bo4tg_k$ = function (key) {
    var tmp0_safe_receiver = this.history_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver[key];
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toString(tmp2_safe_receiver);
    return tmp3_elvis_lhs == null ? this.searchParams_1.get(key) : tmp3_elvis_lhs;
  };
  protoOf(SavedStateHandle2).get_keys_wop4xp_k$ = function () {
    var tmp0_safe_receiver = this.history_1.state;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : getOwnPropertyNames(tmp0_safe_receiver);
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toSet_0(tmp1_safe_receiver);
    var stateKeys = tmp2_elvis_lhs == null ? emptySet() : tmp2_elvis_lhs;
    var searchParamKeys = toSet_1(this.searchParams_1.keys());
    return plus_4(stateKeys, searchParamKeys);
  };
  function UrlKmp_0(url) {
    return new UrlKmpJs(new URL(url));
  }
  function _get_url__e6i4g2($this) {
    return $this.url_1;
  }
  function UrlKmpJs(url) {
    this.url_1 = url;
  }
  protoOf(UrlKmpJs).toString = function () {
    return toString(this.url_1);
  };
  protoOf(UrlKmpJs).resolve_rxg93i_k$ = function (path) {
    return new UrlKmpJs(new URL(path, toString(this.url_1)));
  };
  function Companion_192() {
    Companion_instance_192 = this;
  }
  protoOf(Companion_192).encodeUTF8_iwe365_k$ = function (text) {
    return encodeURIComponent(text);
  };
  protoOf(Companion_192).decodeUTF8_sxg78b_k$ = function (text) {
    return decodeURIComponent(text);
  };
  var Companion_instance_192;
  function Companion_getInstance_253() {
    if (Companion_instance_192 == null)
      new Companion_192();
    return Companion_instance_192;
  }
  function UMURLEncoder() {
    Companion_getInstance_253();
  }
  function bodyAsDecodedText(_this__u8e3s4, $completion) {
    return bodyAsText(_this__u8e3s4, VOID, $completion);
  }
  function htmlToPlainText(_this__u8e3s4) {
    var element = document.createElement('div');
    element.innerHTML = replace(replace(replace(_this__u8e3s4, '<br/>', ' '), '<br>', ' '), '<\/p><p>', ' ');
    return element.innerText;
  }
  function base64StringToByteArray(_this__u8e3s4) {
    var reason = 'Not implemented on JS yet';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  }
  function randomUuidAsString() {
    var tmp;
    // Inline function 'com.ustadmobile.core.wrappers.window.isSecureContext' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp_0 = window.isSecureContext;
    if ((!(tmp_0 == null) ? typeof tmp_0 === 'boolean' : false) ? tmp_0 : THROW_CCE()) {
      tmp = crypto.randomUUID();
    } else {
      tmp = v4();
    }
    return tmp;
  }
  function get_isSecureContext(_this__u8e3s4) {
    // Inline function 'kotlin.js.asDynamic' call
    var tmp = _this__u8e3s4.isSecureContext;
    return (!(tmp == null) ? typeof tmp === 'boolean' : false) ? tmp : THROW_CCE();
  }
  //region block: post-declaration
  protoOf(AuthManager).get_diContext_hye8ch_k$ = get_diContext;
  protoOf(AuthManager).get_diTrigger_fb5jcm_k$ = get_diTrigger;
  protoOf($serializer).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_0).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_1).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_2).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_3).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_4).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_5).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_6).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_7).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_8).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_9).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_10).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_11).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_12).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_13).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_14).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_15).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_16).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_17).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_18).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_19).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_20).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_21).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_22).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_23).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_24).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_25).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_26).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_27).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_28).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_29).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_30).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_31).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_32).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_33).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_34).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_35).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_36).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_37).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_38).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_39).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_40).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_41).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf(ChunkedUploadClientUseCaseKtorImpl).invoke$default_ejf6ar_k$ = invoke$default_6;
  protoOf(ChunkedUploadClientUseCaseKtorImpl).invoke$default_o63nj4_k$ = invoke$default_5;
  protoOf($serializer_42).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_43).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_44).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_45).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_46).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_47).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_48).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_49).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_50).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_51).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_52).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_53).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_54).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_55).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf(CommandFlowUstadNavController).navigate$default_srzzsc_k$ = navigate$default;
  protoOf(UstadViewModel).get_diContext_hye8ch_k$ = get_diContext;
  protoOf(UstadViewModel).get_diTrigger_fb5jcm_k$ = get_diTrigger;
  protoOf($serializer_56).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_57).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_58).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_59).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_60).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_61).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_62).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  protoOf($serializer_63).typeParametersSerializers_fr94fx_k$ = typeParametersSerializers;
  //endregion
  //region block: init
  HEADER_UPLOAD_UUID = 'upload-uuid';
  HEADER_IS_FINAL_CHUNK = 'upload-final-chunk';
  HEADER_UPLOAD_START_BYTE = 'upload-start-byte';
  DEFAULT_CHUNK_SIZE = 524288;
  XAPI_RESULT_EXTENSION_PROGRESS = 'https://w3id.org/xapi/cmi5/result/extensions/progress';
  XAPI_RESULT_EXTENSION_PROGRESS_NON_HTTPS = 'http://w3id.org/xapi/cmi5/result/extensions/progress';
  VERB_COMPLETED = 'http://adlnet.gov/expapi/verbs/completed';
  VERB_PROGRESSED = 'http://adlnet.gov/expapi/verbs/progressed';
  MS_PER_HOUR = 3600000;
  MAX_VALID_DATE = new Long(-376330240, 1689);
  UNSET_DISTANT_FUTURE = new Long(-289930240, 1689);
  KEY_NAV_CONTROLLER_POPUPTO_PAGE = 'navControllerPopUpTo';
  KEY_NAV_CONTROLLER_CLEAR_STACK = 'navControllerClearStack';
  NAVHOST_CLEARSTACK_VIEWNAME = 'ClearStack';
  KEY_NAV_CONTROLLER_NAVTO_AFTER_POP = 'navControllerGoToAfterPop';
  KEY_NAV_CONTROLLER_POPUPTO_INCLUSIVE = 'navControllerPopUpToInc';
  KEY_NAV_CONTROLLER_STACK_CLEARED = 'navControllerStackCleared';
  KEY_NAVCONTROLLER_HIT_POPUP_TO_TARGET = 'navHostHitPopupto';
  KEY_HAVHOST_ROOT_KEY = 'navHostRoot';
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = SavedStateHandle2;
  //endregion
  return _;
}(module.exports, require('react'), require('react-router'), require('uuid'), require('./kotlin-kotlin-stdlib.js'), require('./moko-resources-resources.js'), require('./moko-graphics-graphics-js-ir.js'), require('./Kotlin-DateTime-library-kotlinx-datetime-js-ir.js'), require('./UstadMobile-lib-database.js'), require('./Kosi-Kodein-kodein-di.js'), require('./Kosi-Kaverit-kaverit.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./ktor-ktor-http.js'), require('./kotlinx-coroutines-core.js'), require('./door-door-runtime.js'), require('./ktor-ktor-client-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./Napier-napier-js-ir.js'), require('./kotlinx-atomicfu.js'), require('./xmlutil-serialization.js'), require('./xmlutil-core.js'), require('./UstadMobile-lib-util.js'), require('./uuid.js'), require('./ktor-ktor-utils.js'), require('./kotlinx-io-kotlinx-io-core.js'), require('./ktor-ktor-io.js'), require('./precompose-precompose-viewmodel.js'), require('./UstadMobile-lib-xxhashkmp-core.js'), require('./multiplatform-paging-root-paging-common.js'), require('./UstadMobile-lib-centralappconfigdb-common.js'), require('./kotlin-react-core.js'), require('./kotlin-react.js'), require('./kotlin-extensions.js'), require('./kotlin-js.js')));

//# sourceMappingURL=UstadMobile-core.js.map
