@sddsjs/design-system-builder-cli 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +969 -2
  3. package/bin/dsbuilder.js +2 -0
  4. package/dist/kotlin/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +3170 -0
  5. package/dist/kotlin/Stately-stately-concurrency.js +32 -0
  6. package/dist/kotlin/Stately-stately-concurrent-collections.js +302 -0
  7. package/dist/kotlin/Stately-stately-strict.js +12 -0
  8. package/dist/kotlin/clikt-clikt-mordant.js +304 -0
  9. package/dist/kotlin/clikt-clikt.js +6960 -0
  10. package/dist/kotlin/colormath-root-colormath.js +1653 -0
  11. package/dist/kotlin/design-system-builder-frontend-analytics-metrica.js +1026 -0
  12. package/dist/kotlin/design-system-builder-frontend-cli.js +10690 -0
  13. package/dist/kotlin/design-system-builder-frontend-core-analytics.js +128 -0
  14. package/dist/kotlin/design-system-builder-frontend-core-application.js +3634 -0
  15. package/dist/kotlin/design-system-builder-frontend-core-auth.js +1772 -0
  16. package/dist/kotlin/design-system-builder-frontend-core-domain.js +501 -0
  17. package/dist/kotlin/design-system-builder-frontend-core-network.js +3318 -0
  18. package/dist/kotlin/design-system-builder-frontend-core-platform.js +972 -0
  19. package/dist/kotlin/design-system-builder-frontend-core-process.js +236 -0
  20. package/dist/kotlin/design-system-builder-frontend-core-workspace.js +1058 -0
  21. package/dist/kotlin/design-system-builder-frontend-feature-auth.js +1664 -0
  22. package/dist/kotlin/design-system-builder-frontend-feature-components.js +24819 -0
  23. package/dist/kotlin/design-system-builder-frontend-feature-docs.js +7625 -0
  24. package/dist/kotlin/design-system-builder-frontend-feature-ds.js +2219 -0
  25. package/dist/kotlin/design-system-builder-frontend-feature-init.js +318 -0
  26. package/dist/kotlin/design-system-builder-frontend-feature-projects.js +624 -0
  27. package/dist/kotlin/design-system-builder-frontend-feature-status.js +984 -0
  28. package/dist/kotlin/design-system-builder-frontend-feature-theme.js +10456 -0
  29. package/dist/kotlin/design-system-builder-frontend-feature-toolchain.js +586 -0
  30. package/dist/kotlin/design-system-builder-frontend-mcp-server-core.js +6878 -0
  31. package/dist/kotlin/design-system-builder-frontend-platform-android.js +451 -0
  32. package/dist/kotlin/design-system-builder-frontend-platform-ios.js +1858 -0
  33. package/dist/kotlin/design-system-builder-frontend-platform-web.js +1555 -0
  34. package/dist/kotlin/design-system-builder-frontend-runtime-node.js +1763 -0
  35. package/dist/kotlin/kotlin-kotlin-stdlib.js +17881 -0
  36. package/dist/kotlin/kotlin-logging.js +440 -0
  37. package/dist/kotlin/kotlin-sdk-kotlin-sdk-core.js +20228 -0
  38. package/dist/kotlin/kotlin-sdk-kotlin-sdk-server.js +2771 -0
  39. package/dist/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +8 -0
  40. package/dist/kotlin/kotlinx-atomicfu.js +252 -0
  41. package/dist/kotlin/kotlinx-coroutines-core.js +10822 -0
  42. package/dist/kotlin/kotlinx-io-kotlinx-io-bytestring.js +203 -0
  43. package/dist/kotlin/kotlinx-io-kotlinx-io-core.js +2032 -0
  44. package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +6171 -0
  45. package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +5690 -0
  46. package/dist/kotlin/ktor-ktor-client-core.js +8382 -0
  47. package/dist/kotlin/ktor-ktor-events.js +80 -0
  48. package/dist/kotlin/ktor-ktor-http-cio.js +2252 -0
  49. package/dist/kotlin/ktor-ktor-http.js +3320 -0
  50. package/dist/kotlin/ktor-ktor-io.js +3328 -0
  51. package/dist/kotlin/ktor-ktor-serialization.js +8 -0
  52. package/dist/kotlin/ktor-ktor-server-core.js +12 -0
  53. package/dist/kotlin/ktor-ktor-server-sse.js +8 -0
  54. package/dist/kotlin/ktor-ktor-server-websockets.js +8 -0
  55. package/dist/kotlin/ktor-ktor-sse.js +8 -0
  56. package/dist/kotlin/ktor-ktor-utils.js +2524 -0
  57. package/dist/kotlin/ktor-ktor-websocket-serialization.js +8 -0
  58. package/dist/kotlin/ktor-ktor-websockets.js +433 -0
  59. package/dist/kotlin/mordant-mordant-omnibus.js +8 -0
  60. package/dist/kotlin/mordant-mordant.js +12111 -0
  61. package/dist/kotlin/okio-parent-okio.js +2335 -0
  62. package/dist/kotlin/projects-core-koin-core.js +1285 -0
  63. package/package.json +26 -5
@@ -0,0 +1,1664 @@
1
+ (function (_, kotlin_kotlin, kotlin_io_insert_koin_koin_core, kotlin_design_system_builder_frontend_core_network, kotlin_design_system_builder_frontend_core_auth, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core) {
2
+ 'use strict';
3
+ //region block: imports
4
+ var imul = Math.imul;
5
+ var VOID = kotlin_kotlin.$_$.c;
6
+ var module_0 = kotlin_io_insert_koin_koin_core.$_$.g;
7
+ var Companion_getInstance = kotlin_io_insert_koin_koin_core.$_$.b;
8
+ var Kind_Singleton_getInstance = kotlin_io_insert_koin_koin_core.$_$.a;
9
+ var emptyList = kotlin_kotlin.$_$.y7;
10
+ var getKClass = kotlin_kotlin.$_$.qf;
11
+ var BeanDefinition = kotlin_io_insert_koin_koin_core.$_$.c;
12
+ var SingleInstanceFactory = kotlin_io_insert_koin_koin_core.$_$.e;
13
+ var Unit_instance = kotlin_kotlin.$_$.r5;
14
+ var KoinDefinition = kotlin_io_insert_koin_koin_core.$_$.d;
15
+ var ApiUrlResolver = kotlin_design_system_builder_frontend_core_network.$_$.a;
16
+ var TokenClient = kotlin_design_system_builder_frontend_core_auth.$_$.r;
17
+ var CredentialStore = kotlin_design_system_builder_frontend_core_auth.$_$.h;
18
+ var PkcePlatform = kotlin_design_system_builder_frontend_core_auth.$_$.o;
19
+ var UserAccessTokenCache = kotlin_design_system_builder_frontend_core_auth.$_$.t;
20
+ var CoroutineImpl = kotlin_kotlin.$_$.tb;
21
+ var protoOf = kotlin_kotlin.$_$.te;
22
+ var UserSession = kotlin_design_system_builder_frontend_core_auth.$_$.u;
23
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.db;
24
+ var initMetadataForLambda = kotlin_kotlin.$_$.vd;
25
+ var THROW_CCE = kotlin_kotlin.$_$.wk;
26
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.vl;
27
+ var Success = kotlin_design_system_builder_frontend_core_auth.$_$.c;
28
+ var Failed = kotlin_design_system_builder_frontend_core_auth.$_$.b;
29
+ var IllegalArgumentException = kotlin_kotlin.$_$.nk;
30
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.sd;
31
+ var UnavailablePkcePlatform_instance = kotlin_design_system_builder_frontend_core_auth.$_$.g1;
32
+ var initMetadataForClass = kotlin_kotlin.$_$.qd;
33
+ var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j1;
34
+ var isInterface = kotlin_kotlin.$_$.fe;
35
+ var RotatingCredentialStore = kotlin_design_system_builder_frontend_core_auth.$_$.q;
36
+ var NonCancellable_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o;
37
+ var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
38
+ var getStringHashCode = kotlin_kotlin.$_$.od;
39
+ var joinToString = kotlin_kotlin.$_$.r8;
40
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.g1;
41
+ var encodeToByteArray = kotlin_kotlin.$_$.xg;
42
+ var numberToChar = kotlin_kotlin.$_$.pe;
43
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.w2;
44
+ var toString = kotlin_kotlin.$_$.ej;
45
+ var Char = kotlin_kotlin.$_$.ek;
46
+ var Char__rangeTo_impl_tkncvp = kotlin_kotlin.$_$.b3;
47
+ var plus = kotlin_kotlin.$_$.s9;
48
+ var plus_0 = kotlin_kotlin.$_$.t9;
49
+ var listOf = kotlin_kotlin.$_$.f9;
50
+ var to = kotlin_kotlin.$_$.cm;
51
+ var linkedMapOf = kotlin_kotlin.$_$.b9;
52
+ var charArrayOf = kotlin_kotlin.$_$.bd;
53
+ var trimEnd = kotlin_kotlin.$_$.oj;
54
+ var singleOrNull = kotlin_kotlin.$_$.aa;
55
+ var charSequenceLength = kotlin_kotlin.$_$.fd;
56
+ var charSequenceGet = kotlin_kotlin.$_$.ed;
57
+ var isWhitespace = kotlin_kotlin.$_$.oh;
58
+ var isISOControl = kotlin_kotlin.$_$.ih;
59
+ var isBlank = kotlin_kotlin.$_$.gh;
60
+ var AuthErrorCode_AUTH_REQUIRED_getInstance = kotlin_design_system_builder_frontend_core_auth.$_$.w;
61
+ var toString_0 = kotlin_kotlin.$_$.we;
62
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v1;
63
+ var AuthErrorCode_INVALID_AUTH_URL_getInstance = kotlin_design_system_builder_frontend_core_auth.$_$.z;
64
+ var allowsInteractiveAuth = kotlin_design_system_builder_frontend_core_network.$_$.o;
65
+ var Long = kotlin_kotlin.$_$.qk;
66
+ var withTimeout = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
67
+ var AuthErrorCode_BACKEND_UNAVAILABLE_getInstance = kotlin_design_system_builder_frontend_core_auth.$_$.x;
68
+ var Exception = kotlin_kotlin.$_$.mk;
69
+ var CredentialStoreLockException = kotlin_design_system_builder_frontend_core_auth.$_$.g;
70
+ var CancellationException = kotlin_kotlin.$_$.cb;
71
+ var TimeoutCancellationException = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
72
+ var Result = kotlin_kotlin.$_$.uk;
73
+ var Companion_instance = kotlin_kotlin.$_$.m5;
74
+ var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.e3;
75
+ var createFailure = kotlin_kotlin.$_$.nl;
76
+ var mapOf = kotlin_kotlin.$_$.i9;
77
+ var trimIndent = kotlin_kotlin.$_$.pj;
78
+ var initMetadataForObject = kotlin_kotlin.$_$.wd;
79
+ //endregion
80
+ //region block: pre-declaration
81
+ initMetadataForLambda(LoginUseCase$execute$slambda$slambda, CoroutineImpl, VOID, [0]);
82
+ initMetadataForLambda(LoginUseCase$execute$slambda, CoroutineImpl, VOID, [1]);
83
+ initMetadataForCoroutine($executeCOROUTINE$, CoroutineImpl);
84
+ initMetadataForClass(LoginUseCase, 'LoginUseCase', VOID, VOID, VOID, [1]);
85
+ initMetadataForCoroutine($executeCOROUTINE$_0, CoroutineImpl);
86
+ initMetadataForClass(AuthStatusUseCase, 'AuthStatusUseCase', VOID, VOID, VOID, [1]);
87
+ initMetadataForLambda(LogoutUseCase$execute$slambda, CoroutineImpl, VOID, [0]);
88
+ initMetadataForLambda(LogoutUseCase$revokeSession$slambda, CoroutineImpl, VOID, [1]);
89
+ initMetadataForLambda(LogoutUseCase$revokeSession$slambda_1, CoroutineImpl, VOID, [1]);
90
+ initMetadataForCoroutine($executeCOROUTINE$_1, CoroutineImpl);
91
+ initMetadataForCoroutine($revokeSessionCOROUTINE$, CoroutineImpl);
92
+ initMetadataForClass(LogoutUseCase, 'LogoutUseCase', VOID, VOID, VOID, [1]);
93
+ initMetadataForClass(LoggedIn, 'LoggedIn');
94
+ initMetadataForClass(Failed_0, 'Failed');
95
+ initMetadataForClass(LoginCommand, 'LoginCommand');
96
+ initMetadataForClass(LoggedIn_0, 'LoggedIn');
97
+ initMetadataForClass(NotLoggedIn, 'NotLoggedIn');
98
+ initMetadataForClass(AuthStatusCommand, 'AuthStatusCommand');
99
+ initMetadataForClass(LoggedOut, 'LoggedOut');
100
+ initMetadataForClass(Failed_1, 'Failed');
101
+ initMetadataForClass(LogoutCommand, 'LogoutCommand');
102
+ initMetadataForLambda(PkceLoginFlow$execute$slambda, CoroutineImpl, VOID, [1]);
103
+ initMetadataForCoroutine($executeCOROUTINE$_2, CoroutineImpl);
104
+ initMetadataForClass(PkceLoginFlow, 'PkceLoginFlow', VOID, VOID, VOID, [3]);
105
+ initMetadataForClass(VerifiedAuthorizationCode, 'VerifiedAuthorizationCode');
106
+ initMetadataForLambda(completeAndClose$slambda$slambda, CoroutineImpl, VOID, [1]);
107
+ initMetadataForLambda(completeAndClose$slambda, CoroutineImpl, VOID, [1]);
108
+ initMetadataForCoroutine($completeAndCloseCOROUTINE$, CoroutineImpl);
109
+ initMetadataForObject(BrowserLoginPage, 'BrowserLoginPage');
110
+ //endregion
111
+ function authApplicationModule() {
112
+ return module_0(VOID, authApplicationModule$lambda);
113
+ }
114
+ function authApplicationModule$lambda($this$module) {
115
+ // Inline function 'org.koin.core.module.Module.single' call
116
+ // Inline function 'org.koin.core.module._singleInstanceFactory' call
117
+ var definition = authApplicationModule$lambda$lambda;
118
+ var scopeQualifier = Companion_getInstance().u56_1;
119
+ // Inline function 'org.koin.core.definition._createDefinition' call
120
+ var kind = Kind_Singleton_getInstance();
121
+ var secondaryTypes = emptyList();
122
+ var def = new BeanDefinition(scopeQualifier, getKClass(LoginUseCase), null, definition, kind, secondaryTypes);
123
+ var factory = new SingleInstanceFactory(def);
124
+ $this$module.k58(factory);
125
+ if (false || $this$module.e58_1) {
126
+ $this$module.m58(factory);
127
+ }
128
+ new KoinDefinition($this$module, factory);
129
+ // Inline function 'org.koin.core.module.Module.single' call
130
+ // Inline function 'org.koin.core.module._singleInstanceFactory' call
131
+ var definition_0 = authApplicationModule$lambda$lambda_0;
132
+ var scopeQualifier_0 = Companion_getInstance().u56_1;
133
+ // Inline function 'org.koin.core.definition._createDefinition' call
134
+ var kind_0 = Kind_Singleton_getInstance();
135
+ var secondaryTypes_0 = emptyList();
136
+ var def_0 = new BeanDefinition(scopeQualifier_0, getKClass(AuthStatusUseCase), null, definition_0, kind_0, secondaryTypes_0);
137
+ var factory_0 = new SingleInstanceFactory(def_0);
138
+ $this$module.k58(factory_0);
139
+ if (false || $this$module.e58_1) {
140
+ $this$module.m58(factory_0);
141
+ }
142
+ new KoinDefinition($this$module, factory_0);
143
+ // Inline function 'org.koin.core.module.Module.single' call
144
+ // Inline function 'org.koin.core.module._singleInstanceFactory' call
145
+ var definition_1 = authApplicationModule$lambda$lambda_1;
146
+ var scopeQualifier_1 = Companion_getInstance().u56_1;
147
+ // Inline function 'org.koin.core.definition._createDefinition' call
148
+ var kind_1 = Kind_Singleton_getInstance();
149
+ var secondaryTypes_1 = emptyList();
150
+ var def_1 = new BeanDefinition(scopeQualifier_1, getKClass(LogoutUseCase), null, definition_1, kind_1, secondaryTypes_1);
151
+ var factory_1 = new SingleInstanceFactory(def_1);
152
+ $this$module.k58(factory_1);
153
+ if (false || $this$module.e58_1) {
154
+ $this$module.m58(factory_1);
155
+ }
156
+ new KoinDefinition($this$module, factory_1);
157
+ return Unit_instance;
158
+ }
159
+ function authApplicationModule$lambda$lambda($this$single, it) {
160
+ // Inline function 'org.koin.core.scope.Scope.get' call
161
+ var tmp = $this$single.j59(getKClass(ApiUrlResolver), null, null);
162
+ // Inline function 'org.koin.core.scope.Scope.get' call
163
+ var tmp_0 = $this$single.j59(getKClass(TokenClient), null, null);
164
+ // Inline function 'org.koin.core.scope.Scope.get' call
165
+ var tmp_1 = $this$single.j59(getKClass(CredentialStore), null, null);
166
+ // Inline function 'org.koin.core.scope.Scope.get' call
167
+ var tmp_2 = $this$single.j59(getKClass(PkcePlatform), null, null);
168
+ // Inline function 'org.koin.core.scope.Scope.get' call
169
+ var tmp$ret$4 = $this$single.j59(getKClass(UserAccessTokenCache), null, null);
170
+ return new LoginUseCase(tmp, tmp_0, tmp_1, tmp_2, tmp$ret$4);
171
+ }
172
+ function authApplicationModule$lambda$lambda_0($this$single, it) {
173
+ // Inline function 'org.koin.core.scope.Scope.get' call
174
+ var tmp = $this$single.j59(getKClass(ApiUrlResolver), null, null);
175
+ // Inline function 'org.koin.core.scope.Scope.get' call
176
+ var tmp$ret$1 = $this$single.j59(getKClass(CredentialStore), null, null);
177
+ return new AuthStatusUseCase(tmp, tmp$ret$1);
178
+ }
179
+ function authApplicationModule$lambda$lambda_1($this$single, it) {
180
+ // Inline function 'org.koin.core.scope.Scope.get' call
181
+ var tmp = $this$single.j59(getKClass(ApiUrlResolver), null, null);
182
+ // Inline function 'org.koin.core.scope.Scope.get' call
183
+ var tmp_0 = $this$single.j59(getKClass(TokenClient), null, null);
184
+ // Inline function 'org.koin.core.scope.Scope.get' call
185
+ var tmp_1 = $this$single.j59(getKClass(CredentialStore), null, null);
186
+ // Inline function 'org.koin.core.scope.Scope.get' call
187
+ var tmp$ret$3 = $this$single.j59(getKClass(UserAccessTokenCache), null, null);
188
+ return new LogoutUseCase(tmp, tmp_0, tmp_1, tmp$ret$3);
189
+ }
190
+ function LoginUseCase$execute$slambda$slambda($apiUrl, $username, $tokens, this$0, resultContinuation) {
191
+ this.xd6_1 = $apiUrl;
192
+ this.yd6_1 = $username;
193
+ this.zd6_1 = $tokens;
194
+ this.ad7_1 = this$0;
195
+ CoroutineImpl.call(this, resultContinuation);
196
+ }
197
+ protoOf(LoginUseCase$execute$slambda$slambda).w1x = function ($completion) {
198
+ var tmp = this.n4t($completion);
199
+ tmp.y8_1 = Unit_instance;
200
+ tmp.z8_1 = null;
201
+ return tmp.e9();
202
+ };
203
+ protoOf(LoginUseCase$execute$slambda$slambda).na = function ($completion) {
204
+ return this.w1x($completion);
205
+ };
206
+ protoOf(LoginUseCase$execute$slambda$slambda).e9 = function () {
207
+ var suspendResult = this.y8_1;
208
+ $sm: do
209
+ try {
210
+ var tmp = this.w8_1;
211
+ switch (tmp) {
212
+ case 0:
213
+ this.x8_1 = 2;
214
+ this.bd7_1 = new UserSession(2, this.xd6_1, this.yd6_1.y4x_1, this.zd6_1.y4x_1.c4y_1, this.zd6_1.y4x_1.d4y_1, this.ad7_1.fd7_1.c52());
215
+ this.w8_1 = 1;
216
+ suspendResult = this.ad7_1.ed7_1.w4x(this.bd7_1, this);
217
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
218
+ return suspendResult;
219
+ }
220
+
221
+ continue $sm;
222
+ case 1:
223
+ this.ad7_1.gd7_1.w54(this.bd7_1, this.zd6_1.y4x_1, this.ad7_1.fd7_1.c52());
224
+ return Unit_instance;
225
+ case 2:
226
+ throw this.z8_1;
227
+ }
228
+ } catch ($p) {
229
+ var e = $p;
230
+ if (this.x8_1 === 2) {
231
+ throw e;
232
+ } else {
233
+ this.w8_1 = this.x8_1;
234
+ this.z8_1 = e;
235
+ }
236
+ }
237
+ while (true);
238
+ };
239
+ protoOf(LoginUseCase$execute$slambda$slambda).n4t = function (completion) {
240
+ return new LoginUseCase$execute$slambda$slambda(this.xd6_1, this.yd6_1, this.zd6_1, this.ad7_1, completion);
241
+ };
242
+ function LoginUseCase$execute$slambda$slambda_0($apiUrl, $username, $tokens, this$0, resultContinuation) {
243
+ var i = new LoginUseCase$execute$slambda$slambda($apiUrl, $username, $tokens, this$0, resultContinuation);
244
+ var l = function ($completion) {
245
+ return i.w1x($completion);
246
+ };
247
+ l.$arity = 0;
248
+ return l;
249
+ }
250
+ function LoginUseCase$execute$slambda(this$0, $apiUrl, resultContinuation) {
251
+ this.pd7_1 = this$0;
252
+ this.qd7_1 = $apiUrl;
253
+ CoroutineImpl.call(this, resultContinuation);
254
+ }
255
+ protoOf(LoginUseCase$execute$slambda).wd7 = function (code, $completion) {
256
+ var tmp = this.xd7(code, $completion);
257
+ tmp.y8_1 = Unit_instance;
258
+ tmp.z8_1 = null;
259
+ return tmp.e9();
260
+ };
261
+ protoOf(LoginUseCase$execute$slambda).q9 = function (p1, $completion) {
262
+ return this.wd7(p1 instanceof VerifiedAuthorizationCode ? p1 : THROW_CCE(), $completion);
263
+ };
264
+ protoOf(LoginUseCase$execute$slambda).e9 = function () {
265
+ var suspendResult = this.y8_1;
266
+ $sm: do
267
+ try {
268
+ var tmp = this.w8_1;
269
+ switch (tmp) {
270
+ case 0:
271
+ this.x8_1 = 6;
272
+ this.w8_1 = 1;
273
+ suspendResult = this.pd7_1.dd7_1.q4x(this.qd7_1, this.rd7_1.yd7_1, this.rd7_1.zd7_1, this.rd7_1.ad8_1, this);
274
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
275
+ return suspendResult;
276
+ }
277
+
278
+ continue $sm;
279
+ case 1:
280
+ this.vd7_1 = suspendResult;
281
+ var tmp_0 = this.vd7_1;
282
+ if (tmp_0 instanceof Failed) {
283
+ this.sd7_1 = this.vd7_1;
284
+ this.w8_1 = 5;
285
+ continue $sm;
286
+ } else {
287
+ var tmp_1 = this.vd7_1;
288
+ if (tmp_1 instanceof Success) {
289
+ this.w8_1 = 2;
290
+ suspendResult = this.pd7_1.dd7_1.r4x(this.qd7_1, this.vd7_1.y4x_1.b4y_1, this);
291
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
292
+ return suspendResult;
293
+ }
294
+ continue $sm;
295
+ } else {
296
+ var tmp_2 = this;
297
+ noWhenBranchMatchedException();
298
+ }
299
+ }
300
+
301
+ break;
302
+ case 2:
303
+ this.ud7_1 = suspendResult;
304
+ var tmp_3 = this.ud7_1;
305
+ if (tmp_3 instanceof Failed) {
306
+ this.td7_1 = this.ud7_1;
307
+ this.w8_1 = 4;
308
+ continue $sm;
309
+ } else {
310
+ var tmp_4 = this.ud7_1;
311
+ if (tmp_4 instanceof Success) {
312
+ this.w8_1 = 3;
313
+ suspendResult = this.pd7_1.gd7_1.u54(LoginUseCase$execute$slambda$slambda_0(this.qd7_1, this.ud7_1, this.vd7_1, this.pd7_1, null), this);
314
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
315
+ return suspendResult;
316
+ }
317
+ continue $sm;
318
+ } else {
319
+ var tmp_5 = this;
320
+ noWhenBranchMatchedException();
321
+ }
322
+ }
323
+
324
+ break;
325
+ case 3:
326
+ this.td7_1 = new Success(this.ud7_1.y4x_1);
327
+ this.w8_1 = 4;
328
+ continue $sm;
329
+ case 4:
330
+ this.sd7_1 = this.td7_1;
331
+ this.w8_1 = 5;
332
+ continue $sm;
333
+ case 5:
334
+ return this.sd7_1;
335
+ case 6:
336
+ throw this.z8_1;
337
+ }
338
+ } catch ($p) {
339
+ var e = $p;
340
+ if (this.x8_1 === 6) {
341
+ throw e;
342
+ } else {
343
+ this.w8_1 = this.x8_1;
344
+ this.z8_1 = e;
345
+ }
346
+ }
347
+ while (true);
348
+ };
349
+ protoOf(LoginUseCase$execute$slambda).xd7 = function (code, completion) {
350
+ var i = new LoginUseCase$execute$slambda(this.pd7_1, this.qd7_1, completion);
351
+ i.rd7_1 = code;
352
+ return i;
353
+ };
354
+ function LoginUseCase$execute$slambda_0(this$0, $apiUrl, resultContinuation) {
355
+ var i = new LoginUseCase$execute$slambda(this$0, $apiUrl, resultContinuation);
356
+ var l = function (code, $completion) {
357
+ return i.wd7(code, $completion);
358
+ };
359
+ l.$arity = 1;
360
+ return l;
361
+ }
362
+ function $executeCOROUTINE$(_this__u8e3s4, command, resultContinuation) {
363
+ CoroutineImpl.call(this, resultContinuation);
364
+ this.jd8_1 = _this__u8e3s4;
365
+ this.kd8_1 = command;
366
+ }
367
+ protoOf($executeCOROUTINE$).e9 = function () {
368
+ var suspendResult = this.y8_1;
369
+ $sm: do
370
+ try {
371
+ var tmp = this.w8_1;
372
+ switch (tmp) {
373
+ case 0:
374
+ this.x8_1 = 2;
375
+ var tmp_0 = this;
376
+ var tmp_1;
377
+ try {
378
+ tmp_1 = this.jd8_1.cd7_1.s59(this.kd8_1.md8_1).m59_1;
379
+ } catch ($p) {
380
+ var tmp_2;
381
+ if ($p instanceof IllegalArgumentException) {
382
+ var exception = $p;
383
+ return new Failed_0('\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 API URL.');
384
+ } else {
385
+ throw $p;
386
+ }
387
+ }
388
+
389
+ tmp_0.ld8_1 = tmp_1;
390
+ this.w8_1 = 1;
391
+ var tmp_3 = new PkceLoginFlow(this.jd8_1.fd7_1);
392
+ suspendResult = tmp_3.od8(this.ld8_1, 'dsbuilder-studio-plugin', LoginUseCase$execute$slambda_0(this.jd8_1, this.ld8_1, null), this);
393
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
394
+ return suspendResult;
395
+ }
396
+
397
+ continue $sm;
398
+ case 1:
399
+ var result = suspendResult;
400
+ var tmp_4;
401
+ if (result instanceof Failed) {
402
+ tmp_4 = new Failed_0(result.a4y_1);
403
+ } else {
404
+ if (result instanceof Success) {
405
+ tmp_4 = new LoggedIn(this.ld8_1, result.y4x_1);
406
+ } else {
407
+ noWhenBranchMatchedException();
408
+ }
409
+ }
410
+
411
+ return tmp_4;
412
+ case 2:
413
+ throw this.z8_1;
414
+ }
415
+ } catch ($p) {
416
+ var e = $p;
417
+ if (this.x8_1 === 2) {
418
+ throw e;
419
+ } else {
420
+ this.w8_1 = this.x8_1;
421
+ this.z8_1 = e;
422
+ }
423
+ }
424
+ while (true);
425
+ };
426
+ function LoginUseCase(apiUrlResolver, tokenClient, credentialStore, platform, cache) {
427
+ platform = platform === VOID ? UnavailablePkcePlatform_instance : platform;
428
+ cache = cache === VOID ? new UserAccessTokenCache() : cache;
429
+ this.cd7_1 = apiUrlResolver;
430
+ this.dd7_1 = tokenClient;
431
+ this.ed7_1 = credentialStore;
432
+ this.fd7_1 = platform;
433
+ this.gd7_1 = cache;
434
+ }
435
+ protoOf(LoginUseCase).pd8 = function (command, $completion) {
436
+ var tmp = new $executeCOROUTINE$(this, command, $completion);
437
+ tmp.y8_1 = Unit_instance;
438
+ tmp.z8_1 = null;
439
+ return tmp.e9();
440
+ };
441
+ function $executeCOROUTINE$_0(_this__u8e3s4, command, resultContinuation) {
442
+ CoroutineImpl.call(this, resultContinuation);
443
+ this.yd8_1 = _this__u8e3s4;
444
+ this.zd8_1 = command;
445
+ }
446
+ protoOf($executeCOROUTINE$_0).e9 = function () {
447
+ var suspendResult = this.y8_1;
448
+ $sm: do
449
+ try {
450
+ var tmp = this.w8_1;
451
+ switch (tmp) {
452
+ case 0:
453
+ this.x8_1 = 2;
454
+ this.ad9_1 = this.yd8_1.bd9_1.s59(this.zd8_1.dd9_1).m59_1;
455
+ this.w8_1 = 1;
456
+ suspendResult = this.yd8_1.cd9_1.v4x(this.ad9_1, this);
457
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
458
+ return suspendResult;
459
+ }
460
+
461
+ continue $sm;
462
+ case 1:
463
+ var tmp0_elvis_lhs = suspendResult;
464
+ var tmp_0;
465
+ if (tmp0_elvis_lhs == null) {
466
+ return new NotLoggedIn(this.ad9_1);
467
+ } else {
468
+ tmp_0 = tmp0_elvis_lhs;
469
+ }
470
+
471
+ var session = tmp_0;
472
+ if (!(session.f4y_1 === 2) || !(session.l4y_1 === 'dsbuilder-studio-plugin')) {
473
+ return new NotLoggedIn(this.ad9_1);
474
+ }
475
+
476
+ return new LoggedIn_0(this.ad9_1, session.h4y_1);
477
+ case 2:
478
+ throw this.z8_1;
479
+ }
480
+ } catch ($p) {
481
+ var e = $p;
482
+ if (this.x8_1 === 2) {
483
+ throw e;
484
+ } else {
485
+ this.w8_1 = this.x8_1;
486
+ this.z8_1 = e;
487
+ }
488
+ }
489
+ while (true);
490
+ };
491
+ function AuthStatusUseCase(apiUrlResolver, credentialStore) {
492
+ this.bd9_1 = apiUrlResolver;
493
+ this.cd9_1 = credentialStore;
494
+ }
495
+ protoOf(AuthStatusUseCase).ed9 = function (command, $completion) {
496
+ var tmp = new $executeCOROUTINE$_0(this, command, $completion);
497
+ tmp.y8_1 = Unit_instance;
498
+ tmp.z8_1 = null;
499
+ return tmp.e9();
500
+ };
501
+ function revokeSession($this, apiUrl, $completion) {
502
+ var tmp = new $revokeSessionCOROUTINE$($this, apiUrl, $completion);
503
+ tmp.y8_1 = Unit_instance;
504
+ tmp.z8_1 = null;
505
+ return tmp.e9();
506
+ }
507
+ function LogoutUseCase$execute$slambda(this$0, $apiUrl, resultContinuation) {
508
+ this.cda_1 = this$0;
509
+ this.dda_1 = $apiUrl;
510
+ CoroutineImpl.call(this, resultContinuation);
511
+ }
512
+ protoOf(LogoutUseCase$execute$slambda).e51 = function ($completion) {
513
+ var tmp = this.n4t($completion);
514
+ tmp.y8_1 = Unit_instance;
515
+ tmp.z8_1 = null;
516
+ return tmp.e9();
517
+ };
518
+ protoOf(LogoutUseCase$execute$slambda).na = function ($completion) {
519
+ return this.e51($completion);
520
+ };
521
+ protoOf(LogoutUseCase$execute$slambda).e9 = function () {
522
+ var suspendResult = this.y8_1;
523
+ $sm: do
524
+ try {
525
+ var tmp = this.w8_1;
526
+ switch (tmp) {
527
+ case 0:
528
+ this.x8_1 = 5;
529
+ this.w8_1 = 1;
530
+ continue $sm;
531
+ case 1:
532
+ this.x8_1 = 4;
533
+ this.w8_1 = 2;
534
+ suspendResult = revokeSession(this.cda_1, this.dda_1, this);
535
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
536
+ return suspendResult;
537
+ }
538
+
539
+ continue $sm;
540
+ case 2:
541
+ this.eda_1 = suspendResult;
542
+ this.x8_1 = 5;
543
+ this.w8_1 = 3;
544
+ continue $sm;
545
+ case 3:
546
+ var tmp_0 = this.eda_1;
547
+ this.x8_1 = 5;
548
+ this.cda_1.ida_1.x54(this.dda_1);
549
+ return tmp_0;
550
+ case 4:
551
+ this.x8_1 = 5;
552
+ var t = this.z8_1;
553
+ this.cda_1.ida_1.x54(this.dda_1);
554
+ throw t;
555
+ case 5:
556
+ throw this.z8_1;
557
+ }
558
+ } catch ($p) {
559
+ var e = $p;
560
+ if (this.x8_1 === 5) {
561
+ throw e;
562
+ } else {
563
+ this.w8_1 = this.x8_1;
564
+ this.z8_1 = e;
565
+ }
566
+ }
567
+ while (true);
568
+ };
569
+ protoOf(LogoutUseCase$execute$slambda).n4t = function (completion) {
570
+ return new LogoutUseCase$execute$slambda(this.cda_1, this.dda_1, completion);
571
+ };
572
+ function LogoutUseCase$execute$slambda_0(this$0, $apiUrl, resultContinuation) {
573
+ var i = new LogoutUseCase$execute$slambda(this$0, $apiUrl, resultContinuation);
574
+ var l = function ($completion) {
575
+ return i.e51($completion);
576
+ };
577
+ l.$arity = 0;
578
+ return l;
579
+ }
580
+ function LogoutUseCase$revokeSession$slambda(this$0, $apiUrl, resultContinuation) {
581
+ this.rda_1 = this$0;
582
+ this.sda_1 = $apiUrl;
583
+ CoroutineImpl.call(this, resultContinuation);
584
+ }
585
+ protoOf(LogoutUseCase$revokeSession$slambda).uda = function (session, $completion) {
586
+ var tmp = this.s62(session, $completion);
587
+ tmp.y8_1 = Unit_instance;
588
+ tmp.z8_1 = null;
589
+ return tmp.e9();
590
+ };
591
+ protoOf(LogoutUseCase$revokeSession$slambda).q9 = function (p1, $completion) {
592
+ return this.uda(p1 instanceof UserSession ? p1 : THROW_CCE(), $completion);
593
+ };
594
+ protoOf(LogoutUseCase$revokeSession$slambda).e9 = function () {
595
+ var suspendResult = this.y8_1;
596
+ $sm: do
597
+ try {
598
+ var tmp = this.w8_1;
599
+ switch (tmp) {
600
+ case 0:
601
+ this.x8_1 = 2;
602
+ this.w8_1 = 1;
603
+ suspendResult = this.rda_1.gda_1.t4x(this.sda_1, this.tda_1.i4y_1, this);
604
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
605
+ return suspendResult;
606
+ }
607
+
608
+ continue $sm;
609
+ case 1:
610
+ return suspendResult;
611
+ case 2:
612
+ throw this.z8_1;
613
+ }
614
+ } catch ($p) {
615
+ var e = $p;
616
+ if (this.x8_1 === 2) {
617
+ throw e;
618
+ } else {
619
+ this.w8_1 = this.x8_1;
620
+ this.z8_1 = e;
621
+ }
622
+ }
623
+ while (true);
624
+ };
625
+ protoOf(LogoutUseCase$revokeSession$slambda).s62 = function (session, completion) {
626
+ var i = new LogoutUseCase$revokeSession$slambda(this.rda_1, this.sda_1, completion);
627
+ i.tda_1 = session;
628
+ return i;
629
+ };
630
+ function LogoutUseCase$revokeSession$slambda_0(this$0, $apiUrl, resultContinuation) {
631
+ var i = new LogoutUseCase$revokeSession$slambda(this$0, $apiUrl, resultContinuation);
632
+ var l = function (session, $completion) {
633
+ return i.uda(session, $completion);
634
+ };
635
+ l.$arity = 1;
636
+ return l;
637
+ }
638
+ function LogoutUseCase$revokeSession$slambda_1(this$0, $apiUrl, resultContinuation) {
639
+ this.ddb_1 = this$0;
640
+ this.edb_1 = $apiUrl;
641
+ CoroutineImpl.call(this, resultContinuation);
642
+ }
643
+ protoOf(LogoutUseCase$revokeSession$slambda_1).o1y = function ($this$withContext, $completion) {
644
+ var tmp = this.p1y($this$withContext, $completion);
645
+ tmp.y8_1 = Unit_instance;
646
+ tmp.z8_1 = null;
647
+ return tmp.e9();
648
+ };
649
+ protoOf(LogoutUseCase$revokeSession$slambda_1).q9 = function (p1, $completion) {
650
+ return this.o1y((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
651
+ };
652
+ protoOf(LogoutUseCase$revokeSession$slambda_1).e9 = function () {
653
+ var suspendResult = this.y8_1;
654
+ $sm: do
655
+ try {
656
+ var tmp = this.w8_1;
657
+ switch (tmp) {
658
+ case 0:
659
+ this.x8_1 = 2;
660
+ this.w8_1 = 1;
661
+ suspendResult = this.ddb_1.hda_1.x4x(this.edb_1, this);
662
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
663
+ return suspendResult;
664
+ }
665
+
666
+ continue $sm;
667
+ case 1:
668
+ return Unit_instance;
669
+ case 2:
670
+ throw this.z8_1;
671
+ }
672
+ } catch ($p) {
673
+ var e = $p;
674
+ if (this.x8_1 === 2) {
675
+ throw e;
676
+ } else {
677
+ this.w8_1 = this.x8_1;
678
+ this.z8_1 = e;
679
+ }
680
+ }
681
+ while (true);
682
+ };
683
+ protoOf(LogoutUseCase$revokeSession$slambda_1).p1y = function ($this$withContext, completion) {
684
+ var i = new LogoutUseCase$revokeSession$slambda_1(this.ddb_1, this.edb_1, completion);
685
+ i.fdb_1 = $this$withContext;
686
+ return i;
687
+ };
688
+ function LogoutUseCase$revokeSession$slambda_2(this$0, $apiUrl, resultContinuation) {
689
+ var i = new LogoutUseCase$revokeSession$slambda_1(this$0, $apiUrl, resultContinuation);
690
+ var l = function ($this$withContext, $completion) {
691
+ return i.o1y($this$withContext, $completion);
692
+ };
693
+ l.$arity = 1;
694
+ return l;
695
+ }
696
+ function $executeCOROUTINE$_1(_this__u8e3s4, command, resultContinuation) {
697
+ CoroutineImpl.call(this, resultContinuation);
698
+ this.odb_1 = _this__u8e3s4;
699
+ this.pdb_1 = command;
700
+ }
701
+ protoOf($executeCOROUTINE$_1).e9 = function () {
702
+ var suspendResult = this.y8_1;
703
+ $sm: do
704
+ try {
705
+ var tmp = this.w8_1;
706
+ switch (tmp) {
707
+ case 0:
708
+ this.x8_1 = 2;
709
+ this.qdb_1 = this.odb_1.fda_1.s59(this.pdb_1.rdb_1).m59_1;
710
+ this.w8_1 = 1;
711
+ suspendResult = this.odb_1.ida_1.u54(LogoutUseCase$execute$slambda_0(this.odb_1, this.qdb_1, null), this);
712
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
713
+ return suspendResult;
714
+ }
715
+
716
+ continue $sm;
717
+ case 1:
718
+ var revocation = suspendResult;
719
+ var tmp_0;
720
+ if (revocation instanceof Failed) {
721
+ tmp_0 = new Failed_1(revocation.a4y_1);
722
+ } else {
723
+ if (revocation instanceof Success) {
724
+ tmp_0 = new LoggedOut(this.qdb_1);
725
+ } else {
726
+ noWhenBranchMatchedException();
727
+ }
728
+ }
729
+
730
+ return tmp_0;
731
+ case 2:
732
+ throw this.z8_1;
733
+ }
734
+ } catch ($p) {
735
+ var e = $p;
736
+ if (this.x8_1 === 2) {
737
+ throw e;
738
+ } else {
739
+ this.w8_1 = this.x8_1;
740
+ this.z8_1 = e;
741
+ }
742
+ }
743
+ while (true);
744
+ };
745
+ function $revokeSessionCOROUTINE$(_this__u8e3s4, apiUrl, resultContinuation) {
746
+ CoroutineImpl.call(this, resultContinuation);
747
+ this.nd9_1 = _this__u8e3s4;
748
+ this.od9_1 = apiUrl;
749
+ }
750
+ protoOf($revokeSessionCOROUTINE$).e9 = function () {
751
+ var suspendResult = this.y8_1;
752
+ $sm: do
753
+ try {
754
+ var tmp = this.w8_1;
755
+ switch (tmp) {
756
+ case 0:
757
+ this.x8_1 = 11;
758
+ var tmp_0 = this.nd9_1.hda_1;
759
+ if (isInterface(tmp_0, RotatingCredentialStore)) {
760
+ this.w8_1 = 9;
761
+ suspendResult = this.nd9_1.hda_1.o4y(this.od9_1, LogoutUseCase$revokeSession$slambda_0(this.nd9_1, this.od9_1, null), this);
762
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
763
+ return suspendResult;
764
+ }
765
+ continue $sm;
766
+ } else {
767
+ this.w8_1 = 1;
768
+ continue $sm;
769
+ }
770
+
771
+ case 1:
772
+ this.x8_1 = 7;
773
+ this.w8_1 = 2;
774
+ suspendResult = this.nd9_1.hda_1.v4x(this.od9_1, this);
775
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
776
+ return suspendResult;
777
+ }
778
+
779
+ continue $sm;
780
+ case 2:
781
+ var session = suspendResult;
782
+ if (session == null) {
783
+ this.td9_1 = new Success(Unit_instance);
784
+ this.w8_1 = 4;
785
+ continue $sm;
786
+ } else {
787
+ this.w8_1 = 3;
788
+ suspendResult = this.nd9_1.gda_1.t4x(this.od9_1, session.i4y_1, this);
789
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
790
+ return suspendResult;
791
+ }
792
+ continue $sm;
793
+ }
794
+
795
+ case 3:
796
+ this.td9_1 = suspendResult;
797
+ this.w8_1 = 4;
798
+ continue $sm;
799
+ case 4:
800
+ this.sd9_1 = this.td9_1;
801
+ this.x8_1 = 11;
802
+ this.w8_1 = 5;
803
+ continue $sm;
804
+ case 5:
805
+ this.rd9_1 = this.sd9_1;
806
+ this.x8_1 = 11;
807
+ this.w8_1 = 6;
808
+ var tmp_1 = NonCancellable_getInstance();
809
+ suspendResult = withContext(tmp_1, LogoutUseCase$revokeSession$slambda_2(this.nd9_1, this.od9_1, null), this);
810
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
811
+ return suspendResult;
812
+ }
813
+
814
+ continue $sm;
815
+ case 6:
816
+ this.pd9_1 = this.rd9_1;
817
+ this.w8_1 = 10;
818
+ continue $sm;
819
+ case 7:
820
+ this.x8_1 = 11;
821
+ this.qd9_1 = this.z8_1;
822
+ this.w8_1 = 8;
823
+ var tmp_2 = NonCancellable_getInstance();
824
+ suspendResult = withContext(tmp_2, LogoutUseCase$revokeSession$slambda_2(this.nd9_1, this.od9_1, null), this);
825
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
826
+ return suspendResult;
827
+ }
828
+
829
+ continue $sm;
830
+ case 8:
831
+ throw this.qd9_1;
832
+ case 9:
833
+ this.pd9_1 = suspendResult;
834
+ this.w8_1 = 10;
835
+ continue $sm;
836
+ case 10:
837
+ return this.pd9_1;
838
+ case 11:
839
+ throw this.z8_1;
840
+ }
841
+ } catch ($p) {
842
+ var e = $p;
843
+ if (this.x8_1 === 11) {
844
+ throw e;
845
+ } else {
846
+ this.w8_1 = this.x8_1;
847
+ this.z8_1 = e;
848
+ }
849
+ }
850
+ while (true);
851
+ };
852
+ function LogoutUseCase(apiUrlResolver, tokenClient, credentialStore, cache) {
853
+ cache = cache === VOID ? new UserAccessTokenCache() : cache;
854
+ this.fda_1 = apiUrlResolver;
855
+ this.gda_1 = tokenClient;
856
+ this.hda_1 = credentialStore;
857
+ this.ida_1 = cache;
858
+ }
859
+ protoOf(LogoutUseCase).sdb = function (command, $completion) {
860
+ var tmp = new $executeCOROUTINE$_1(this, command, $completion);
861
+ tmp.y8_1 = Unit_instance;
862
+ tmp.z8_1 = null;
863
+ return tmp.e9();
864
+ };
865
+ function LoggedIn(apiUrl, username) {
866
+ this.tdb_1 = apiUrl;
867
+ this.udb_1 = username;
868
+ }
869
+ protoOf(LoggedIn).toString = function () {
870
+ return 'LoggedIn(apiUrl=' + this.tdb_1 + ', username=' + this.udb_1 + ')';
871
+ };
872
+ protoOf(LoggedIn).hashCode = function () {
873
+ var result = getStringHashCode(this.tdb_1);
874
+ result = imul(result, 31) + getStringHashCode(this.udb_1) | 0;
875
+ return result;
876
+ };
877
+ protoOf(LoggedIn).equals = function (other) {
878
+ if (this === other)
879
+ return true;
880
+ if (!(other instanceof LoggedIn))
881
+ return false;
882
+ if (!(this.tdb_1 === other.tdb_1))
883
+ return false;
884
+ if (!(this.udb_1 === other.udb_1))
885
+ return false;
886
+ return true;
887
+ };
888
+ function Failed_0(message) {
889
+ this.vdb_1 = message;
890
+ }
891
+ protoOf(Failed_0).toString = function () {
892
+ return 'Failed(message=' + this.vdb_1 + ')';
893
+ };
894
+ protoOf(Failed_0).hashCode = function () {
895
+ return getStringHashCode(this.vdb_1);
896
+ };
897
+ protoOf(Failed_0).equals = function (other) {
898
+ if (this === other)
899
+ return true;
900
+ if (!(other instanceof Failed_0))
901
+ return false;
902
+ if (!(this.vdb_1 === other.vdb_1))
903
+ return false;
904
+ return true;
905
+ };
906
+ function LoginCommand(apiUrlOverride) {
907
+ this.md8_1 = apiUrlOverride;
908
+ }
909
+ protoOf(LoginCommand).toString = function () {
910
+ return 'LoginCommand(apiUrlOverride=' + this.md8_1 + ')';
911
+ };
912
+ protoOf(LoginCommand).hashCode = function () {
913
+ return this.md8_1 == null ? 0 : getStringHashCode(this.md8_1);
914
+ };
915
+ protoOf(LoginCommand).equals = function (other) {
916
+ if (this === other)
917
+ return true;
918
+ if (!(other instanceof LoginCommand))
919
+ return false;
920
+ if (!(this.md8_1 == other.md8_1))
921
+ return false;
922
+ return true;
923
+ };
924
+ function LoggedIn_0(apiUrl, username) {
925
+ this.wdb_1 = apiUrl;
926
+ this.xdb_1 = username;
927
+ }
928
+ protoOf(LoggedIn_0).toString = function () {
929
+ return 'LoggedIn(apiUrl=' + this.wdb_1 + ', username=' + this.xdb_1 + ')';
930
+ };
931
+ protoOf(LoggedIn_0).hashCode = function () {
932
+ var result = getStringHashCode(this.wdb_1);
933
+ result = imul(result, 31) + getStringHashCode(this.xdb_1) | 0;
934
+ return result;
935
+ };
936
+ protoOf(LoggedIn_0).equals = function (other) {
937
+ if (this === other)
938
+ return true;
939
+ if (!(other instanceof LoggedIn_0))
940
+ return false;
941
+ if (!(this.wdb_1 === other.wdb_1))
942
+ return false;
943
+ if (!(this.xdb_1 === other.xdb_1))
944
+ return false;
945
+ return true;
946
+ };
947
+ function NotLoggedIn(apiUrl) {
948
+ this.ydb_1 = apiUrl;
949
+ }
950
+ protoOf(NotLoggedIn).toString = function () {
951
+ return 'NotLoggedIn(apiUrl=' + this.ydb_1 + ')';
952
+ };
953
+ protoOf(NotLoggedIn).hashCode = function () {
954
+ return getStringHashCode(this.ydb_1);
955
+ };
956
+ protoOf(NotLoggedIn).equals = function (other) {
957
+ if (this === other)
958
+ return true;
959
+ if (!(other instanceof NotLoggedIn))
960
+ return false;
961
+ if (!(this.ydb_1 === other.ydb_1))
962
+ return false;
963
+ return true;
964
+ };
965
+ function AuthStatusCommand(apiUrlOverride) {
966
+ this.dd9_1 = apiUrlOverride;
967
+ }
968
+ protoOf(AuthStatusCommand).toString = function () {
969
+ return 'AuthStatusCommand(apiUrlOverride=' + this.dd9_1 + ')';
970
+ };
971
+ protoOf(AuthStatusCommand).hashCode = function () {
972
+ return this.dd9_1 == null ? 0 : getStringHashCode(this.dd9_1);
973
+ };
974
+ protoOf(AuthStatusCommand).equals = function (other) {
975
+ if (this === other)
976
+ return true;
977
+ if (!(other instanceof AuthStatusCommand))
978
+ return false;
979
+ if (!(this.dd9_1 == other.dd9_1))
980
+ return false;
981
+ return true;
982
+ };
983
+ function LoggedOut(apiUrl) {
984
+ this.zdb_1 = apiUrl;
985
+ }
986
+ protoOf(LoggedOut).toString = function () {
987
+ return 'LoggedOut(apiUrl=' + this.zdb_1 + ')';
988
+ };
989
+ protoOf(LoggedOut).hashCode = function () {
990
+ return getStringHashCode(this.zdb_1);
991
+ };
992
+ protoOf(LoggedOut).equals = function (other) {
993
+ if (this === other)
994
+ return true;
995
+ if (!(other instanceof LoggedOut))
996
+ return false;
997
+ if (!(this.zdb_1 === other.zdb_1))
998
+ return false;
999
+ return true;
1000
+ };
1001
+ function Failed_1(message) {
1002
+ this.adc_1 = message;
1003
+ }
1004
+ protoOf(Failed_1).toString = function () {
1005
+ return 'Failed(message=' + this.adc_1 + ')';
1006
+ };
1007
+ protoOf(Failed_1).hashCode = function () {
1008
+ return getStringHashCode(this.adc_1);
1009
+ };
1010
+ protoOf(Failed_1).equals = function (other) {
1011
+ if (this === other)
1012
+ return true;
1013
+ if (!(other instanceof Failed_1))
1014
+ return false;
1015
+ if (!(this.adc_1 === other.adc_1))
1016
+ return false;
1017
+ return true;
1018
+ };
1019
+ function LogoutCommand(apiUrlOverride) {
1020
+ this.rdb_1 = apiUrlOverride;
1021
+ }
1022
+ protoOf(LogoutCommand).toString = function () {
1023
+ return 'LogoutCommand(apiUrlOverride=' + this.rdb_1 + ')';
1024
+ };
1025
+ protoOf(LogoutCommand).hashCode = function () {
1026
+ return this.rdb_1 == null ? 0 : getStringHashCode(this.rdb_1);
1027
+ };
1028
+ protoOf(LogoutCommand).equals = function (other) {
1029
+ if (this === other)
1030
+ return true;
1031
+ if (!(other instanceof LogoutCommand))
1032
+ return false;
1033
+ if (!(this.rdb_1 == other.rdb_1))
1034
+ return false;
1035
+ return true;
1036
+ };
1037
+ function get_UNRESERVED_CHARS() {
1038
+ _init_properties_OAuthUrlBuilders_kt__4h9i28();
1039
+ return UNRESERVED_CHARS;
1040
+ }
1041
+ var UNRESERVED_CHARS;
1042
+ function buildOAuthQuery(params) {
1043
+ _init_properties_OAuthUrlBuilders_kt__4h9i28();
1044
+ var tmp = params.w();
1045
+ return joinToString(tmp, '&', VOID, VOID, VOID, VOID, buildOAuthQuery$lambda);
1046
+ }
1047
+ function percentEncodeQueryValue(_this__u8e3s4) {
1048
+ _init_properties_OAuthUrlBuilders_kt__4h9i28();
1049
+ var builder = StringBuilder_init_$Create$();
1050
+ var indexedObject = encodeToByteArray(_this__u8e3s4);
1051
+ var inductionVariable = 0;
1052
+ var last = indexedObject.length;
1053
+ while (inductionVariable < last) {
1054
+ var byte = indexedObject[inductionVariable];
1055
+ inductionVariable = inductionVariable + 1 | 0;
1056
+ var unsigned = byte & 255;
1057
+ var char = numberToChar(unsigned);
1058
+ if (get_UNRESERVED_CHARS().t(new Char(char))) {
1059
+ builder.a8(char);
1060
+ } else {
1061
+ builder.a8(_Char___init__impl__6a9atx(37));
1062
+ // Inline function 'kotlin.text.uppercase' call
1063
+ // Inline function 'kotlin.js.asDynamic' call
1064
+ var hex = toString(unsigned, 16).toUpperCase();
1065
+ if (hex.length < 2) {
1066
+ builder.a8(_Char___init__impl__6a9atx(48));
1067
+ }
1068
+ builder.z7(hex);
1069
+ }
1070
+ }
1071
+ return builder.toString();
1072
+ }
1073
+ function buildOAuthQuery$lambda(_destruct__k2r9zo) {
1074
+ _init_properties_OAuthUrlBuilders_kt__4h9i28();
1075
+ // Inline function 'kotlin.collections.component1' call
1076
+ var key = _destruct__k2r9zo.x();
1077
+ // Inline function 'kotlin.collections.component2' call
1078
+ var value = _destruct__k2r9zo.y();
1079
+ return key + '=' + percentEncodeQueryValue(value);
1080
+ }
1081
+ var properties_initialized_OAuthUrlBuilders_kt_iy0pbi;
1082
+ function _init_properties_OAuthUrlBuilders_kt__4h9i28() {
1083
+ if (!properties_initialized_OAuthUrlBuilders_kt_iy0pbi) {
1084
+ properties_initialized_OAuthUrlBuilders_kt_iy0pbi = true;
1085
+ UNRESERVED_CHARS = plus_0(plus_0(plus(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(90)), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(122))), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57))), listOf([new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(126))]));
1086
+ }
1087
+ }
1088
+ function PkceLoginFlow$execute$slambda(this$0, $clientId, $apiUrl, $accept, resultContinuation) {
1089
+ this.jdc_1 = this$0;
1090
+ this.kdc_1 = $clientId;
1091
+ this.ldc_1 = $apiUrl;
1092
+ this.mdc_1 = $accept;
1093
+ CoroutineImpl.call(this, resultContinuation);
1094
+ }
1095
+ protoOf(PkceLoginFlow$execute$slambda).ydc = function ($this$withTimeout, $completion) {
1096
+ var tmp = this.p1y($this$withTimeout, $completion);
1097
+ tmp.y8_1 = Unit_instance;
1098
+ tmp.z8_1 = null;
1099
+ return tmp.e9();
1100
+ };
1101
+ protoOf(PkceLoginFlow$execute$slambda).q9 = function (p1, $completion) {
1102
+ return this.ydc((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1103
+ };
1104
+ protoOf(PkceLoginFlow$execute$slambda).e9 = function () {
1105
+ var suspendResult = this.y8_1;
1106
+ $sm: do
1107
+ try {
1108
+ var tmp = this.w8_1;
1109
+ switch (tmp) {
1110
+ case 0:
1111
+ this.x8_1 = 14;
1112
+ this.wdc_1 = this.jdc_1.nd8_1.z51();
1113
+ this.w8_1 = 1;
1114
+ suspendResult = this.jdc_1.nd8_1.a52(this);
1115
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1116
+ return suspendResult;
1117
+ }
1118
+
1119
+ continue $sm;
1120
+ case 1:
1121
+ this.qdc_1 = suspendResult;
1122
+ this.pdc_1 = false;
1123
+ this.w8_1 = 2;
1124
+ continue $sm;
1125
+ case 2:
1126
+ this.w8_1 = 3;
1127
+ continue $sm;
1128
+ case 3:
1129
+ this.x8_1 = 12;
1130
+ this.vdc_1 = 'http://127.0.0.1:' + this.qdc_1.l33() + '/callback';
1131
+ var query = buildOAuthQuery(linkedMapOf([to('client_id', this.kdc_1), to('response_type', 'code'), to('redirect_uri', this.vdc_1), to('scope', 'openid profile'), to('code_challenge', this.wdc_1.e52_1), to('code_challenge_method', 'S256'), to('state', this.wdc_1.f52_1)]));
1132
+ this.w8_1 = 4;
1133
+ suspendResult = this.jdc_1.nd8_1.b52(trimEnd(this.ldc_1, charArrayOf([_Char___init__impl__6a9atx(47)])) + '/realms/dsbuilder/protocol/openid-connect/auth?' + query, this);
1134
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1135
+ return suspendResult;
1136
+ }
1137
+
1138
+ continue $sm;
1139
+ case 4:
1140
+ this.w8_1 = 5;
1141
+ suspendResult = this.qdc_1.tbv(this);
1142
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1143
+ return suspendResult;
1144
+ }
1145
+
1146
+ continue $sm;
1147
+ case 5:
1148
+ var callback = suspendResult;
1149
+ var tmp_0 = this;
1150
+ var tmp0_safe_receiver = callback.h52_1.c2('code');
1151
+ tmp_0.xdc_1 = tmp0_safe_receiver == null ? null : singleOrNull(tmp0_safe_receiver);
1152
+ var tmp_1;
1153
+ var tmp_2;
1154
+ if (callback.g52_1 === '/callback') {
1155
+ var tmp1_safe_receiver = callback.h52_1.c2('state');
1156
+ tmp_2 = (tmp1_safe_receiver == null ? null : singleOrNull(tmp1_safe_receiver)) === this.wdc_1.f52_1;
1157
+ } else {
1158
+ tmp_2 = false;
1159
+ }
1160
+
1161
+ if (tmp_2) {
1162
+ tmp_1 = !callback.h52_1.a2('error');
1163
+ } else {
1164
+ tmp_1 = false;
1165
+ }
1166
+
1167
+ var sourceVerified = tmp_1;
1168
+ var tmp_3;
1169
+ var this_0 = this.xdc_1;
1170
+ if (!(this_0 == null || isBlank(this_0))) {
1171
+ var tmp0 = this.xdc_1;
1172
+ var tmp$ret$0;
1173
+ l$ret$1: do {
1174
+ var inductionVariable = 0;
1175
+ while (inductionVariable < charSequenceLength(tmp0)) {
1176
+ var element = charSequenceGet(tmp0, inductionVariable);
1177
+ inductionVariable = inductionVariable + 1 | 0;
1178
+ if (isWhitespace(element) || isISOControl(element)) {
1179
+ tmp$ret$0 = false;
1180
+ break l$ret$1;
1181
+ }
1182
+ }
1183
+ tmp$ret$0 = true;
1184
+ }
1185
+ while (false);
1186
+ tmp_3 = tmp$ret$0;
1187
+ } else {
1188
+ tmp_3 = false;
1189
+ }
1190
+
1191
+ var codeValid = tmp_3;
1192
+ if (!sourceVerified || !codeValid) {
1193
+ this.udc_1 = new Failed(AuthErrorCode_AUTH_REQUIRED_getInstance(), '\u041E\u0442\u0432\u0435\u0442 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0435 \u043F\u0440\u043E\u0448\u0451\u043B \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0443.');
1194
+ this.x8_1 = 14;
1195
+ this.w8_1 = 8;
1196
+ continue $sm;
1197
+ } else {
1198
+ this.w8_1 = 6;
1199
+ continue $sm;
1200
+ }
1201
+
1202
+ case 6:
1203
+ this.w8_1 = 7;
1204
+ var tmp0_0 = this.xdc_1;
1205
+ var tmp$ret$4 = Unit_instance;
1206
+ l$ret$5: do {
1207
+ if (tmp0_0 == null) {
1208
+ var message = 'Required value was null.';
1209
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
1210
+ } else {
1211
+ tmp$ret$4 = tmp0_0;
1212
+ break l$ret$5;
1213
+ }
1214
+ }
1215
+ while (false);
1216
+ suspendResult = this.mdc_1(new VerifiedAuthorizationCode(tmp$ret$4, this.wdc_1.d52_1, this.vdc_1), this);
1217
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1218
+ return suspendResult;
1219
+ }
1220
+
1221
+ continue $sm;
1222
+ case 7:
1223
+ var tmp_4 = this;
1224
+ var this_1 = suspendResult;
1225
+ var tmp_5 = this;
1226
+ tmp_5.pdc_1 = this_1 instanceof Success;
1227
+ tmp_4.sdc_1 = this_1;
1228
+ this.x8_1 = 14;
1229
+ this.w8_1 = 10;
1230
+ continue $sm;
1231
+ case 8:
1232
+ this.tdc_1 = this.udc_1;
1233
+ this.x8_1 = 14;
1234
+ this.w8_1 = 9;
1235
+ suspendResult = completeAndClose(this.qdc_1, this.pdc_1, this);
1236
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1237
+ return suspendResult;
1238
+ }
1239
+
1240
+ continue $sm;
1241
+ case 9:
1242
+ var tmp_6 = this;
1243
+ return this.tdc_1;
1244
+ case 10:
1245
+ this.rdc_1 = this.sdc_1;
1246
+ this.x8_1 = 14;
1247
+ this.w8_1 = 11;
1248
+ suspendResult = completeAndClose(this.qdc_1, this.pdc_1, this);
1249
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1250
+ return suspendResult;
1251
+ }
1252
+
1253
+ continue $sm;
1254
+ case 11:
1255
+ return this.rdc_1;
1256
+ case 12:
1257
+ this.x8_1 = 14;
1258
+ this.odc_1 = this.z8_1;
1259
+ this.w8_1 = 13;
1260
+ suspendResult = completeAndClose(this.qdc_1, this.pdc_1, this);
1261
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1262
+ return suspendResult;
1263
+ }
1264
+
1265
+ continue $sm;
1266
+ case 13:
1267
+ throw this.odc_1;
1268
+ case 14:
1269
+ throw this.z8_1;
1270
+ }
1271
+ } catch ($p) {
1272
+ var e = $p;
1273
+ if (this.x8_1 === 14) {
1274
+ throw e;
1275
+ } else {
1276
+ this.w8_1 = this.x8_1;
1277
+ this.z8_1 = e;
1278
+ }
1279
+ }
1280
+ while (true);
1281
+ };
1282
+ protoOf(PkceLoginFlow$execute$slambda).p1y = function ($this$withTimeout, completion) {
1283
+ var i = new PkceLoginFlow$execute$slambda(this.jdc_1, this.kdc_1, this.ldc_1, this.mdc_1, completion);
1284
+ i.ndc_1 = $this$withTimeout;
1285
+ return i;
1286
+ };
1287
+ function PkceLoginFlow$execute$slambda_0(this$0, $clientId, $apiUrl, $accept, resultContinuation) {
1288
+ var i = new PkceLoginFlow$execute$slambda(this$0, $clientId, $apiUrl, $accept, resultContinuation);
1289
+ var l = function ($this$withTimeout, $completion) {
1290
+ return i.ydc($this$withTimeout, $completion);
1291
+ };
1292
+ l.$arity = 1;
1293
+ return l;
1294
+ }
1295
+ function $executeCOROUTINE$_2(_this__u8e3s4, apiUrl, clientId, accept, resultContinuation) {
1296
+ CoroutineImpl.call(this, resultContinuation);
1297
+ this.hdd_1 = _this__u8e3s4;
1298
+ this.idd_1 = apiUrl;
1299
+ this.jdd_1 = clientId;
1300
+ this.kdd_1 = accept;
1301
+ }
1302
+ protoOf($executeCOROUTINE$_2).e9 = function () {
1303
+ var suspendResult = this.y8_1;
1304
+ $sm: do
1305
+ try {
1306
+ var tmp = this.w8_1;
1307
+ switch (tmp) {
1308
+ case 0:
1309
+ this.x8_1 = 3;
1310
+ if (!allowsInteractiveAuth(this.idd_1)) {
1311
+ return new Failed(AuthErrorCode_INVALID_AUTH_URL_getInstance(), '\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F \u0442\u0440\u0435\u0431\u0443\u0435\u0442 HTTPS, \u043A\u0440\u043E\u043C\u0435 localhost \u0438 127.0.0.1.');
1312
+ }
1313
+
1314
+ this.x8_1 = 2;
1315
+ this.w8_1 = 1;
1316
+ var tmp_0 = new Long(180000, 0);
1317
+ suspendResult = withTimeout(tmp_0, PkceLoginFlow$execute$slambda_0(this.hdd_1, this.jdd_1, this.idd_1, this.kdd_1, null), this);
1318
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1319
+ return suspendResult;
1320
+ }
1321
+
1322
+ continue $sm;
1323
+ case 1:
1324
+ this.ldd_1 = suspendResult;
1325
+ this.x8_1 = 3;
1326
+ this.w8_1 = 4;
1327
+ continue $sm;
1328
+ case 2:
1329
+ this.x8_1 = 3;
1330
+ var tmp_1 = this.z8_1;
1331
+ if (tmp_1 instanceof TimeoutCancellationException) {
1332
+ var exception = this.z8_1;
1333
+ var tmp_2 = this;
1334
+ tmp_2.ldd_1 = new Failed(AuthErrorCode_AUTH_REQUIRED_getInstance(), '\u0412\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u0432\u0445\u043E\u0434\u0430 \u0438\u0441\u0442\u0435\u043A\u043B\u043E (180 \u0441\u0435\u043A\u0443\u043D\u0434).');
1335
+ this.w8_1 = 4;
1336
+ continue $sm;
1337
+ } else {
1338
+ var tmp_3 = this.z8_1;
1339
+ if (tmp_3 instanceof CancellationException) {
1340
+ var exception_0 = this.z8_1;
1341
+ var tmp_4 = this;
1342
+ throw exception_0;
1343
+ } else {
1344
+ var tmp_5 = this.z8_1;
1345
+ if (tmp_5 instanceof CredentialStoreLockException) {
1346
+ var exception_1 = this.z8_1;
1347
+ var tmp_6 = this;
1348
+ throw exception_1;
1349
+ } else {
1350
+ var tmp_7 = this.z8_1;
1351
+ if (tmp_7 instanceof Exception) {
1352
+ var exception_2 = this.z8_1;
1353
+ var tmp_8 = this;
1354
+ tmp_8.ldd_1 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), '\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043D\u044B\u0439 \u0432\u0445\u043E\u0434; \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 Gateway.');
1355
+ this.w8_1 = 4;
1356
+ continue $sm;
1357
+ } else {
1358
+ throw this.z8_1;
1359
+ }
1360
+ }
1361
+ }
1362
+ }
1363
+
1364
+ case 3:
1365
+ throw this.z8_1;
1366
+ case 4:
1367
+ this.x8_1 = 3;
1368
+ return this.ldd_1;
1369
+ }
1370
+ } catch ($p) {
1371
+ var e = $p;
1372
+ if (this.x8_1 === 3) {
1373
+ throw e;
1374
+ } else {
1375
+ this.w8_1 = this.x8_1;
1376
+ this.z8_1 = e;
1377
+ }
1378
+ }
1379
+ while (true);
1380
+ };
1381
+ function PkceLoginFlow(platform) {
1382
+ this.nd8_1 = platform;
1383
+ }
1384
+ protoOf(PkceLoginFlow).od8 = function (apiUrl, clientId, accept, $completion) {
1385
+ var tmp = new $executeCOROUTINE$_2(this, apiUrl, clientId, accept, $completion);
1386
+ tmp.y8_1 = Unit_instance;
1387
+ tmp.z8_1 = null;
1388
+ return tmp.e9();
1389
+ };
1390
+ function VerifiedAuthorizationCode(code, verifier, redirectUri) {
1391
+ this.yd7_1 = code;
1392
+ this.zd7_1 = verifier;
1393
+ this.ad8_1 = redirectUri;
1394
+ }
1395
+ protoOf(VerifiedAuthorizationCode).toString = function () {
1396
+ return 'VerifiedAuthorizationCode(code=' + this.yd7_1 + ', verifier=' + this.zd7_1 + ', redirectUri=' + this.ad8_1 + ')';
1397
+ };
1398
+ protoOf(VerifiedAuthorizationCode).hashCode = function () {
1399
+ var result = getStringHashCode(this.yd7_1);
1400
+ result = imul(result, 31) + getStringHashCode(this.zd7_1) | 0;
1401
+ result = imul(result, 31) + getStringHashCode(this.ad8_1) | 0;
1402
+ return result;
1403
+ };
1404
+ protoOf(VerifiedAuthorizationCode).equals = function (other) {
1405
+ if (this === other)
1406
+ return true;
1407
+ if (!(other instanceof VerifiedAuthorizationCode))
1408
+ return false;
1409
+ if (!(this.yd7_1 === other.yd7_1))
1410
+ return false;
1411
+ if (!(this.zd7_1 === other.zd7_1))
1412
+ return false;
1413
+ if (!(this.ad8_1 === other.ad8_1))
1414
+ return false;
1415
+ return true;
1416
+ };
1417
+ function completeAndClose(_this__u8e3s4, success, $completion) {
1418
+ var tmp = new $completeAndCloseCOROUTINE$(_this__u8e3s4, success, $completion);
1419
+ tmp.y8_1 = Unit_instance;
1420
+ tmp.z8_1 = null;
1421
+ return tmp.e9();
1422
+ }
1423
+ function completeAndClose$slambda$slambda($this_completeAndClose, $success, resultContinuation) {
1424
+ this.ede_1 = $this_completeAndClose;
1425
+ this.fde_1 = $success;
1426
+ CoroutineImpl.call(this, resultContinuation);
1427
+ }
1428
+ protoOf(completeAndClose$slambda$slambda).o1y = function ($this$withTimeout, $completion) {
1429
+ var tmp = this.p1y($this$withTimeout, $completion);
1430
+ tmp.y8_1 = Unit_instance;
1431
+ tmp.z8_1 = null;
1432
+ return tmp.e9();
1433
+ };
1434
+ protoOf(completeAndClose$slambda$slambda).q9 = function (p1, $completion) {
1435
+ return this.o1y((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1436
+ };
1437
+ protoOf(completeAndClose$slambda$slambda).e9 = function () {
1438
+ var suspendResult = this.y8_1;
1439
+ $sm: do
1440
+ try {
1441
+ var tmp = this.w8_1;
1442
+ switch (tmp) {
1443
+ case 0:
1444
+ this.x8_1 = 2;
1445
+ this.w8_1 = 1;
1446
+ suspendResult = this.ede_1.ubv(this.fde_1, this);
1447
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1448
+ return suspendResult;
1449
+ }
1450
+
1451
+ continue $sm;
1452
+ case 1:
1453
+ return Unit_instance;
1454
+ case 2:
1455
+ throw this.z8_1;
1456
+ }
1457
+ } catch ($p) {
1458
+ var e = $p;
1459
+ if (this.x8_1 === 2) {
1460
+ throw e;
1461
+ } else {
1462
+ this.w8_1 = this.x8_1;
1463
+ this.z8_1 = e;
1464
+ }
1465
+ }
1466
+ while (true);
1467
+ };
1468
+ protoOf(completeAndClose$slambda$slambda).p1y = function ($this$withTimeout, completion) {
1469
+ var i = new completeAndClose$slambda$slambda(this.ede_1, this.fde_1, completion);
1470
+ i.gde_1 = $this$withTimeout;
1471
+ return i;
1472
+ };
1473
+ function completeAndClose$slambda$slambda_0($this_completeAndClose, $success, resultContinuation) {
1474
+ var i = new completeAndClose$slambda$slambda($this_completeAndClose, $success, resultContinuation);
1475
+ var l = function ($this$withTimeout, $completion) {
1476
+ return i.o1y($this$withTimeout, $completion);
1477
+ };
1478
+ l.$arity = 1;
1479
+ return l;
1480
+ }
1481
+ function completeAndClose$slambda($this_completeAndClose, $success, resultContinuation) {
1482
+ this.pde_1 = $this_completeAndClose;
1483
+ this.qde_1 = $success;
1484
+ CoroutineImpl.call(this, resultContinuation);
1485
+ }
1486
+ protoOf(completeAndClose$slambda).vde = function ($this$withContext, $completion) {
1487
+ var tmp = this.p1y($this$withContext, $completion);
1488
+ tmp.y8_1 = Unit_instance;
1489
+ tmp.z8_1 = null;
1490
+ var tmp_0 = tmp.e9();
1491
+ if (tmp_0 === get_COROUTINE_SUSPENDED())
1492
+ return tmp_0;
1493
+ return tmp_0;
1494
+ };
1495
+ protoOf(completeAndClose$slambda).q9 = function (p1, $completion) {
1496
+ return this.vde((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1497
+ };
1498
+ protoOf(completeAndClose$slambda).e9 = function () {
1499
+ var suspendResult = this.y8_1;
1500
+ $sm: do
1501
+ try {
1502
+ var tmp = this.w8_1;
1503
+ switch (tmp) {
1504
+ case 0:
1505
+ this.x8_1 = 6;
1506
+ this.w8_1 = 1;
1507
+ continue $sm;
1508
+ case 1:
1509
+ this.x8_1 = 5;
1510
+ this.rde_1;
1511
+ this.x8_1 = 3;
1512
+ var tmp_0 = this;
1513
+ tmp_0.ude_1 = Companion_instance;
1514
+ this.w8_1 = 2;
1515
+ var tmp_1 = new Long(1000, 0);
1516
+ suspendResult = withTimeout(tmp_1, completeAndClose$slambda$slambda_0(this.pde_1, this.qde_1, null), this);
1517
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1518
+ return suspendResult;
1519
+ }
1520
+
1521
+ continue $sm;
1522
+ case 2:
1523
+ var tmp_2 = this;
1524
+ this.ude_1;
1525
+ tmp_2.tde_1 = _Result___init__impl__xyqfz8(Unit_instance);
1526
+ this.x8_1 = 5;
1527
+ this.w8_1 = 4;
1528
+ continue $sm;
1529
+ case 3:
1530
+ this.x8_1 = 5;
1531
+ var tmp_3 = this.z8_1;
1532
+ if (tmp_3 instanceof Error) {
1533
+ var e = this.z8_1;
1534
+ var tmp_4 = this;
1535
+ tmp_4.tde_1 = _Result___init__impl__xyqfz8(createFailure(e));
1536
+ this.w8_1 = 4;
1537
+ continue $sm;
1538
+ } else {
1539
+ throw this.z8_1;
1540
+ }
1541
+
1542
+ case 4:
1543
+ this.x8_1 = 5;
1544
+ this.sde_1 = this.tde_1;
1545
+ this.x8_1 = 6;
1546
+ this.w8_1 = 7;
1547
+ continue $sm;
1548
+ case 5:
1549
+ this.x8_1 = 6;
1550
+ var t = this.z8_1;
1551
+ this.pde_1.p3();
1552
+ throw t;
1553
+ case 6:
1554
+ throw this.z8_1;
1555
+ case 7:
1556
+ var tmp_5 = this.sde_1;
1557
+ this.x8_1 = 6;
1558
+ this.pde_1.p3();
1559
+ return new Result(tmp_5);
1560
+ }
1561
+ } catch ($p) {
1562
+ var e_0 = $p;
1563
+ if (this.x8_1 === 6) {
1564
+ throw e_0;
1565
+ } else {
1566
+ this.w8_1 = this.x8_1;
1567
+ this.z8_1 = e_0;
1568
+ }
1569
+ }
1570
+ while (true);
1571
+ };
1572
+ protoOf(completeAndClose$slambda).p1y = function ($this$withContext, completion) {
1573
+ var i = new completeAndClose$slambda(this.pde_1, this.qde_1, completion);
1574
+ i.rde_1 = $this$withContext;
1575
+ return i;
1576
+ };
1577
+ function completeAndClose$slambda_0($this_completeAndClose, $success, resultContinuation) {
1578
+ var i = new completeAndClose$slambda($this_completeAndClose, $success, resultContinuation);
1579
+ var l = function ($this$withContext, $completion) {
1580
+ return i.vde($this$withContext, $completion);
1581
+ };
1582
+ l.$arity = 1;
1583
+ return l;
1584
+ }
1585
+ function $completeAndCloseCOROUTINE$(_this__u8e3s4, success, resultContinuation) {
1586
+ CoroutineImpl.call(this, resultContinuation);
1587
+ this.udd_1 = _this__u8e3s4;
1588
+ this.vdd_1 = success;
1589
+ }
1590
+ protoOf($completeAndCloseCOROUTINE$).e9 = function () {
1591
+ var suspendResult = this.y8_1;
1592
+ $sm: do
1593
+ try {
1594
+ var tmp = this.w8_1;
1595
+ switch (tmp) {
1596
+ case 0:
1597
+ this.x8_1 = 2;
1598
+ this.w8_1 = 1;
1599
+ var tmp_0 = NonCancellable_getInstance();
1600
+ suspendResult = withContext(tmp_0, completeAndClose$slambda_0(this.udd_1, this.vdd_1, null), this);
1601
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1602
+ return suspendResult;
1603
+ }
1604
+
1605
+ continue $sm;
1606
+ case 1:
1607
+ return Unit_instance;
1608
+ case 2:
1609
+ throw this.z8_1;
1610
+ }
1611
+ } catch ($p) {
1612
+ var e = $p;
1613
+ if (this.x8_1 === 2) {
1614
+ throw e;
1615
+ } else {
1616
+ this.w8_1 = this.x8_1;
1617
+ this.z8_1 = e;
1618
+ }
1619
+ }
1620
+ while (true);
1621
+ };
1622
+ function BrowserLoginPage() {
1623
+ BrowserLoginPage_instance = this;
1624
+ this.wde_1 = mapOf([to('Content-Type', 'text/html; charset=utf-8'), to('Cache-Control', 'no-store'), to('Referrer-Policy', 'no-referrer'), to('X-Content-Type-Options', 'nosniff'), to('Content-Security-Policy', "default-src 'none'; style-src 'unsafe-inline'; img-src data:; base-uri 'none'; frame-ancestors 'none'; form-action 'none'")]);
1625
+ }
1626
+ protoOf(BrowserLoginPage).xde = function (success) {
1627
+ var title = success ? '\u0412\u044B \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u043E\u0432\u0430\u043D\u044B' : '\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0432\u0445\u043E\u0434';
1628
+ var tmp;
1629
+ if (success) {
1630
+ tmp = '\u041C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u043A\u0440\u044B\u0442\u044C \u0432\u043A\u043B\u0430\u0434\u043A\u0443.';
1631
+ } else {
1632
+ tmp = '\u0412\u0435\u0440\u043D\u0438\u0442\u0435\u0441\u044C \u0432 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 auth login. \u041C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u043A\u0440\u044B\u0442\u044C \u0432\u043A\u043B\u0430\u0434\u043A\u0443.';
1633
+ }
1634
+ var message = tmp;
1635
+ var symbol = success ? '&#10003;' : '!';
1636
+ return trimIndent('\n <!doctype html>\n <html lang="ru">\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <meta name="referrer" content="no-referrer">\n <link rel="icon" href="data:,">\n <title>DS Builder \u2014 ' + title + '<\/title>\n <style>\n :root { color-scheme: dark; }\n * { box-sizing: border-box; }\n body {\n margin: 0; min-height: 100vh; min-height: 100dvh; padding: 32px 16px;\n display: grid; place-items: center; background: #27282c; color: #e8eaee;\n font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n }\n main { width: 100%; max-width: 440px; text-align: center; }\n .brand { margin: 0 0 32px; color: #b8bec6; font-size: 14px; font-weight: 600; }\n .symbol {\n width: 56px; height: 56px; margin: 0 auto 24px; border-radius: 50%;\n display: grid; place-items: center; background: #166dc4; color: white;\n font-size: 28px; line-height: 1;\n }\n h1 { margin: 0; font-size: 24px; font-weight: 600; line-height: 30px; }\n .message { margin: 12px 0 0; color: #b8bec6; font-size: 14px; line-height: 20px; }\n <\/style>\n <\/head>\n <body>\n <main>\n <p class="brand">SDDS \xB7 DS Builder<\/p>\n <div class="symbol" aria-hidden="true">' + symbol + '<\/div>\n <h1>' + title + '<\/h1>\n <p class="message">' + message + '<\/p>\n <\/main>\n <\/body>\n <\/html>\n ');
1637
+ };
1638
+ var BrowserLoginPage_instance;
1639
+ function BrowserLoginPage_getInstance() {
1640
+ if (BrowserLoginPage_instance == null)
1641
+ new BrowserLoginPage();
1642
+ return BrowserLoginPage_instance;
1643
+ }
1644
+ //region block: exports
1645
+ _.$_$ = _.$_$ || {};
1646
+ _.$_$.a = AuthStatusCommand;
1647
+ _.$_$.b = LoggedIn_0;
1648
+ _.$_$.c = NotLoggedIn;
1649
+ _.$_$.d = AuthStatusUseCase;
1650
+ _.$_$.e = LoginCommand;
1651
+ _.$_$.f = Failed_0;
1652
+ _.$_$.g = LoggedIn;
1653
+ _.$_$.h = LoginUseCase;
1654
+ _.$_$.i = LogoutCommand;
1655
+ _.$_$.j = Failed_1;
1656
+ _.$_$.k = LoggedOut;
1657
+ _.$_$.l = LogoutUseCase;
1658
+ _.$_$.m = authApplicationModule;
1659
+ _.$_$.n = BrowserLoginPage_getInstance;
1660
+ //endregion
1661
+ return _;
1662
+ }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./projects-core-koin-core.js'), require('./design-system-builder-frontend-core-network.js'), require('./design-system-builder-frontend-core-auth.js'), require('./kotlinx-coroutines-core.js')));
1663
+
1664
+ //# sourceMappingURL=design-system-builder-frontend-feature-auth.js.map