@flock/wirespec 0.19.0-RC.3 → 0.19.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 (83) hide show
  1. package/arrow-arrow-atomic.mjs +12 -12
  2. package/arrow-arrow-core.mjs +156 -156
  3. package/clikt-clikt-mordant.mjs +80 -80
  4. package/clikt-clikt-mordant.mjs.map +1 -1
  5. package/clikt-clikt.mjs +1547 -1547
  6. package/clikt-clikt.mjs.map +1 -1
  7. package/colormath-root-colormath.mjs +444 -444
  8. package/kotlin-kotlin-stdlib.mjs +2347 -5055
  9. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  10. package/kotlin-openapi-bindings.mjs +20865 -6871
  11. package/kotlin-openapi-bindings.mjs.map +1 -1
  12. package/kotlin-rgxgen.mjs +1806 -1806
  13. package/kotlinx-io-kotlinx-io-core.mjs +432 -432
  14. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
  15. package/kotlinx-serialization-kotlinx-serialization-core.mjs +2213 -2050
  16. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  17. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1947 -1472
  18. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  19. package/mordant-mordant.mjs +1333 -1333
  20. package/package.json +14 -9
  21. package/wirespec-lsp.mjs +7 -0
  22. package/wirespec-msw.d.ts +53 -0
  23. package/wirespec-msw.mjs +83 -0
  24. package/wirespec-src-compiler-core.mjs +1752 -1688
  25. package/wirespec-src-compiler-core.mjs.map +1 -1
  26. package/wirespec-src-compiler-emitters-java.mjs +457 -421
  27. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  28. package/wirespec-src-compiler-emitters-kotlin.mjs +440 -341
  29. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  30. package/wirespec-src-compiler-emitters-python.mjs +381 -382
  31. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  32. package/wirespec-src-compiler-emitters-rust.mjs +447 -424
  33. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  34. package/wirespec-src-compiler-emitters-scala.mjs +172 -173
  35. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
  36. package/wirespec-src-compiler-emitters-typescript.mjs +475 -444
  37. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  38. package/wirespec-src-compiler-emitters-wirespec.mjs +83 -83
  39. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  40. package/wirespec-src-compiler-ir.mjs +3833 -3883
  41. package/wirespec-src-compiler-ir.mjs.map +1 -1
  42. package/wirespec-src-compiler-lib.mjs +418 -418
  43. package/wirespec-src-compiler-lib.mjs.map +1 -1
  44. package/wirespec-src-converter-avro.mjs +510 -510
  45. package/wirespec-src-converter-avro.mjs.map +1 -1
  46. package/wirespec-src-converter-openapi.mjs +1584 -1510
  47. package/wirespec-src-converter-openapi.mjs.map +1 -1
  48. package/wirespec-src-ide-lsp.mjs +4928 -0
  49. package/wirespec-src-ide-lsp.mjs.map +1 -0
  50. package/wirespec-src-plugin-arguments.mjs +183 -183
  51. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  52. package/wirespec-src-plugin-cli.mjs +106 -106
  53. package/wirespec-src-plugin-npm.d.mts +2 -11
  54. package/wirespec-src-plugin-npm.mjs +47 -42
  55. package/wirespec-src-plugin-npm.mjs.map +1 -1
  56. package/wirespec-src-tools-generator.mjs +53 -53
  57. package/wirespec-src-tools-generator.mjs.map +1 -1
  58. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +0 -4
  59. package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +0 -1
  60. package/kotest-kotest-assertions-kotest-assertions-core.mjs +0 -4
  61. package/kotest-kotest-assertions-kotest-assertions-core.mjs.map +0 -1
  62. package/kotest-kotest-assertions-kotest-assertions-shared.mjs +0 -4
  63. package/kotest-kotest-assertions-kotest-assertions-shared.mjs.map +0 -1
  64. package/kotest-kotest-common.mjs +0 -56
  65. package/kotest-kotest-common.mjs.map +0 -1
  66. package/kotest-kotest-framework-kotest-framework-engine.mjs +0 -4
  67. package/kotest-kotest-framework-kotest-framework-engine.mjs.map +0 -1
  68. package/kotest-kotest-property-kotest-property-datetime.mjs +0 -4
  69. package/kotest-kotest-property-kotest-property-datetime.mjs.map +0 -1
  70. package/kotest-kotest-property.mjs +0 -2400
  71. package/kotest-kotest-property.mjs.map +0 -1
  72. package/kotest-property-arbs.mjs +0 -4
  73. package/kotest-property-arbs.mjs.map +0 -1
  74. package/kotlinx-coroutines-test.mjs +0 -4
  75. package/kotlinx-coroutines-test.mjs.map +0 -1
  76. package/wirespec-generator.d.ts +0 -52
  77. package/wirespec-generator.mjs +0 -9
  78. package/wirespec-src-integration-kotest.mjs +0 -1455
  79. package/wirespec-src-integration-kotest.mjs.map +0 -1
  80. package/xmlutil-core.mjs +0 -4
  81. package/xmlutil-core.mjs.map +0 -1
  82. package/xmlutil-serialization.mjs +0 -4
  83. package/xmlutil-serialization.mjs.map +0 -1
@@ -86,6 +86,8 @@ import {
86
86
  getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
87
87
  StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
88
88
  charSequenceGet1vxk1y5n17t1z as charSequenceGet,
89
+ first3kg261hmihapu as first_0,
90
+ isLettere1qnx5bysxbd as isLetter,
89
91
  to2cs3ny02qtbcb as to,
90
92
  toMap1vec9topfei08 as toMap,
91
93
  emptyList1g2z5xcrvp2zy as emptyList,
@@ -170,10 +172,10 @@ import {
170
172
  function emit_3(identifier) {
171
173
  var tmp;
172
174
  if (identifier instanceof DefinitionIdentifier) {
173
- tmp = this.v20(identifier);
175
+ tmp = this.r1x(identifier);
174
176
  } else {
175
177
  if (identifier instanceof FieldIdentifier) {
176
- tmp = this.l20(this.v20(identifier));
178
+ tmp = this.h1x(this.r1x(identifier));
177
179
  } else {
178
180
  noWhenBranchMatchedException();
179
181
  }
@@ -182,7 +184,7 @@ function emit_3(identifier) {
182
184
  }
183
185
  function sanitize(_this__u8e3s4) {
184
186
  // Inline function 'kotlin.collections.mapIndexed' call
185
- var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
187
+ var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
186
188
  // Inline function 'kotlin.collections.mapIndexedTo' call
187
189
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
188
190
  var index = 0;
@@ -191,11 +193,11 @@ function sanitize(_this__u8e3s4) {
191
193
  var item = _iterator__ex2g4s.v();
192
194
  var _unary__edvuaz = index;
193
195
  index = _unary__edvuaz + 1 | 0;
194
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.mu(item) : item;
196
+ var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.er(item) : item;
195
197
  destination.x(tmp$ret$0);
196
198
  }
197
199
  var tmp = asSequence(joinToString(destination, ''));
198
- return this.k20(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
200
+ return this.g1x(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
199
201
  }
200
202
  function sanitizeFirstIsDigit(_this__u8e3s4) {
201
203
  var tmp;
@@ -215,18 +217,18 @@ function sanitizeFirstIsDigit(_this__u8e3s4) {
215
217
  return tmp;
216
218
  }
217
219
  function sanitizeKeywords(_this__u8e3s4) {
218
- return Companion_getInstance_0().i21_1.v1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
220
+ return Companion_getInstance_0().e1y_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
219
221
  }
220
222
  initMetadataForInterface(KotlinIdentifierEmitter, 'KotlinIdentifierEmitter');
221
223
  function emit_4(type, module_0) {
222
224
  var tmp;
223
- if (type.us_1.qs_1.r()) {
224
- tmp = 'data object ' + this.uu(type.ts_1);
225
+ if (type.mp_1.ip_1.r()) {
226
+ tmp = 'data object ' + this.nr(type.lp_1);
225
227
  } else {
226
- var tmp_0 = this.uu(type.ts_1);
227
- var tmp_1 = this.tt(type.us_1);
228
+ var tmp_0 = this.nr(type.lp_1);
229
+ var tmp_1 = this.lq(type.mp_1);
228
230
  // Inline function 'kotlin.run' call
229
- var $this$run = type.vs_1;
231
+ var $this$run = type.np_1;
230
232
  var tmp_2;
231
233
  if ($this$run.r()) {
232
234
  tmp_2 = '';
@@ -239,18 +241,18 @@ function emit_4(type, module_0) {
239
241
  return tmp;
240
242
  }
241
243
  function emit_5(_this__u8e3s4) {
242
- return dropLast(joinToString(_this__u8e3s4.qs_1, '\n', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda_0(this)), 1);
244
+ return dropLast(joinToString(_this__u8e3s4.ip_1, '\n', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda_0(this)), 1);
243
245
  }
244
246
  function emit_6(_this__u8e3s4) {
245
- return this.uu(_this__u8e3s4.ys_1) + ': ' + this.vt(_this__u8e3s4.zs_1);
247
+ return this.nr(_this__u8e3s4.qp_1) + ': ' + this.nq(_this__u8e3s4.rp_1);
246
248
  }
247
249
  function emit_7(_this__u8e3s4) {
248
250
  var tmp;
249
251
  if (_this__u8e3s4 instanceof Dict) {
250
- tmp = 'Map<String, ' + this.vt(_this__u8e3s4.as_1) + '>';
252
+ tmp = 'Map<String, ' + this.nq(_this__u8e3s4.so_1) + '>';
251
253
  } else {
252
254
  if (_this__u8e3s4 instanceof Iterable) {
253
- tmp = 'List<' + this.vt(_this__u8e3s4.xr_1) + '>';
255
+ tmp = 'List<' + this.nq(_this__u8e3s4.po_1) + '>';
254
256
  } else {
255
257
  if (_this__u8e3s4 instanceof Unit) {
256
258
  tmp = 'Unit';
@@ -259,17 +261,17 @@ function emit_7(_this__u8e3s4) {
259
261
  tmp = 'Any';
260
262
  } else {
261
263
  if (_this__u8e3s4 instanceof Custom) {
262
- tmp = _this__u8e3s4.iy_1;
264
+ tmp = _this__u8e3s4.bv_1;
263
265
  } else {
264
266
  if (_this__u8e3s4 instanceof Primitive) {
265
- var t = _this__u8e3s4.my_1;
267
+ var t = _this__u8e3s4.fv_1;
266
268
  var tmp_0;
267
269
  if (t instanceof String_0) {
268
270
  tmp_0 = 'String';
269
271
  } else {
270
272
  if (t instanceof Integer) {
271
273
  var tmp_1;
272
- switch (t.qx_1.c3_1) {
274
+ switch (t.ju_1.b3_1) {
273
275
  case 0:
274
276
  tmp_1 = 'Int';
275
277
  break;
@@ -284,7 +286,7 @@ function emit_7(_this__u8e3s4) {
284
286
  } else {
285
287
  if (t instanceof Number_0) {
286
288
  var tmp_2;
287
- switch (t.tx_1.c3_1) {
289
+ switch (t.mu_1.b3_1) {
288
290
  case 0:
289
291
  tmp_2 = 'Float';
290
292
  break;
@@ -320,15 +322,15 @@ function emit_7(_this__u8e3s4) {
320
322
  }
321
323
  // Inline function 'kotlin.let' call
322
324
  var it = tmp;
323
- return _this__u8e3s4.ay() ? it + '?' : it;
325
+ return _this__u8e3s4.tu() ? it + '?' : it;
324
326
  }
325
327
  function emit_8(_this__u8e3s4) {
326
328
  var tmp;
327
329
  if (_this__u8e3s4 instanceof RegExp_0) {
328
- tmp = 'Regex("""' + this.xt(_this__u8e3s4.ww_1) + '""").matches(value)';
330
+ tmp = 'Regex("""' + this.pq(_this__u8e3s4.pt_1) + '""").matches(value)';
329
331
  } else {
330
332
  if (_this__u8e3s4 instanceof Bound) {
331
- var tmp1_safe_receiver = _this__u8e3s4.mx_1;
333
+ var tmp1_safe_receiver = _this__u8e3s4.fu_1;
332
334
  var tmp_0;
333
335
  if (tmp1_safe_receiver == null) {
334
336
  tmp_0 = null;
@@ -337,7 +339,7 @@ function emit_8(_this__u8e3s4) {
337
339
  tmp_0 = tmp1_safe_receiver + ' < value';
338
340
  }
339
341
  var minCheck = tmp_0;
340
- var tmp2_safe_receiver = _this__u8e3s4.nx_1;
342
+ var tmp2_safe_receiver = _this__u8e3s4.gu_1;
341
343
  var tmp_1;
342
344
  if (tmp2_safe_receiver == null) {
343
345
  tmp_1 = null;
@@ -365,19 +367,63 @@ function emit_8(_this__u8e3s4) {
365
367
  }
366
368
  initMetadataForInterface(KotlinTypeDefinitionEmitter, 'KotlinTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, KotlinIdentifierEmitter]);
367
369
  function emit_9(channel) {
368
- return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |fun interface ' + this.uu(channel.ks_1) + ' {\n | operator fun invoke(message: ' + this.vt(channel.ls_1) + ')\n |}\n |\n ');
370
+ return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |fun interface ' + this.nr(channel.cp_1) + ' {\n | operator fun invoke(message: ' + this.nq(channel.dp_1) + ')\n |}\n |\n ');
369
371
  }
370
372
  initMetadataForInterface(KotlinChannelDefinitionEmitter, 'KotlinChannelDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
371
- function emit_10(enum_0, module_0) {
372
- var tmp = this.v20(enum_0.ev_1);
373
- return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.fv_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.ov(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
373
+ function emit_10(refined) {
374
+ return trimMargin('\n |data class ' + this.r1x(refined.sr_1) + '(override val value: ' + this.nq(refined.tr_1) + '): Wirespec.Refined<' + this.nq(refined.tr_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.bs(refined) + '\n |}\n |\n ');
375
+ }
376
+ function emitValidator(_this__u8e3s4) {
377
+ var defaultReturn = 'true';
378
+ var type = _this__u8e3s4.tr_1.fv_1;
379
+ var tmp;
380
+ if (type instanceof Integer) {
381
+ var tmp0_safe_receiver = type.ku_1;
382
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.oq(tmp0_safe_receiver);
383
+ tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
384
+ } else {
385
+ if (type instanceof Number_0) {
386
+ var tmp2_safe_receiver = type.nu_1;
387
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.oq(tmp2_safe_receiver);
388
+ tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
389
+ } else {
390
+ if (type instanceof String_0) {
391
+ var tmp4_safe_receiver = type.hu_1;
392
+ var tmp_0;
393
+ var tmp_1 = tmp4_safe_receiver;
394
+ if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
395
+ tmp_0 = null;
396
+ } else {
397
+ tmp_0 = this.oq(new RegExp_0(tmp4_safe_receiver));
398
+ }
399
+ var tmp5_elvis_lhs = tmp_0;
400
+ tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
401
+ } else {
402
+ if (equals(type, Boolean_instance)) {
403
+ tmp = defaultReturn;
404
+ } else {
405
+ if (equals(type, Bytes_instance)) {
406
+ tmp = defaultReturn;
407
+ } else {
408
+ noWhenBranchMatchedException();
409
+ }
410
+ }
411
+ }
412
+ }
413
+ }
414
+ return tmp;
415
+ }
416
+ initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
417
+ function emit_11(enum_0, module_0) {
418
+ var tmp = this.r1x(enum_0.xr_1);
419
+ return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.yr_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.hs(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
374
420
  }
375
421
  initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
376
- function emit_11(union) {
377
- return trimMargin('\n |sealed interface ' + this.uu(union.os_1) + '\n |\n ');
422
+ function emit_12(union) {
423
+ return trimMargin('\n |sealed interface ' + this.nr(union.gp_1) + '\n |\n ');
378
424
  }
379
425
  initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
380
- function emit_12(endpoint) {
426
+ function emit_13(endpoint) {
381
427
  // Inline function 'kotlin.collections.map' call
382
428
  var this_0 = importReferences(endpoint);
383
429
  // Inline function 'kotlin.collections.mapTo' call
@@ -385,169 +431,125 @@ function emit_12(endpoint) {
385
431
  var _iterator__ex2g4s = this_0.t();
386
432
  while (_iterator__ex2g4s.u()) {
387
433
  var item = _iterator__ex2g4s.v();
388
- var tmp$ret$0 = 'import ' + this.v1z().kv_1 + '.model.' + item.iy_1;
434
+ var tmp$ret$0 = 'import ' + this.r1w().ds_1 + '.model.' + item.bv_1;
389
435
  destination.x(tmp$ret$0);
390
436
  }
391
437
  var tmp = destination;
392
438
  var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda);
393
- var tmp_1 = this.uu(endpoint.ct_1);
439
+ var tmp_1 = this.nr(endpoint.up_1);
394
440
  var tmp_2 = get_pathParams(endpoint);
395
441
  var tmp_3 = emitObject$default(this, tmp_2, 'Path', 'Wirespec.Path', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_0(this));
396
- var tmp_4 = emitObject$default(this, endpoint.ft_1, 'Queries', 'Wirespec.Queries', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_1(this));
397
- var tmp_5 = emitObject$default(this, endpoint.gt_1, 'Headers', 'Wirespec.Request.Headers', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_2(this));
398
- var tmp_6 = this.i20(first(endpoint.ht_1), endpoint);
442
+ var tmp_4 = emitObject$default(this, endpoint.xp_1, 'Queries', 'Wirespec.Queries', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_1(this));
443
+ var tmp_5 = emitObject$default(this, endpoint.yp_1, 'Headers', 'Wirespec.Request.Headers', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_2(this));
444
+ var tmp_6 = this.e1x(first(endpoint.zp_1), endpoint);
399
445
  var tmp_7 = Spacer_instance.toString();
400
446
  var tmp_8 = emitStatusInterfaces(this, endpoint);
401
447
  var tmp_9 = emitResponseInterfaces(this, endpoint);
402
- var tmp_10 = distinctByStatus(endpoint.it_1);
448
+ var tmp_10 = distinctByStatus(endpoint.aq_1);
403
449
  var tmp_11 = joinToString(tmp_10, '\n\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_3(this));
404
450
  var tmp_12 = Spacer_instance.toString();
405
- var tmp_13 = Spacer_instance.ov(2);
406
- var tmp_14 = distinctByStatus(endpoint.it_1);
451
+ var tmp_13 = Spacer_instance.hs(2);
452
+ var tmp_14 = distinctByStatus(endpoint.aq_1);
407
453
  var tmp_15 = joinToString(tmp_14, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_4(this));
408
- var tmp_16 = Spacer_instance.ov(2);
454
+ var tmp_16 = Spacer_instance.hs(2);
409
455
  var tmp_17 = Spacer_instance.toString();
410
- var tmp_18 = Spacer_instance.ov(2);
456
+ var tmp_18 = Spacer_instance.hs(2);
411
457
  // Inline function 'kotlin.collections.filter' call
412
- var tmp0 = distinctByStatus(endpoint.it_1);
458
+ var tmp0 = distinctByStatus(endpoint.aq_1);
413
459
  // Inline function 'kotlin.collections.filterTo' call
414
460
  var destination_0 = ArrayList_init_$Create$_0();
415
461
  var _iterator__ex2g4s_0 = tmp0.t();
416
462
  while (_iterator__ex2g4s_0.u()) {
417
463
  var element = _iterator__ex2g4s_0.v();
418
- if (Companion_instance_1.pu(element.ot_1)) {
464
+ if (Companion_instance_1.ir(element.gq_1)) {
419
465
  destination_0.x(element);
420
466
  }
421
467
  }
422
468
  var tmp_19 = destination_0;
423
469
  var tmp_20 = joinToString(tmp_19, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_5(this));
424
- var tmp_21 = Spacer_instance.ov(3);
425
- var tmp_22 = Spacer_instance.ov(2);
470
+ var tmp_21 = Spacer_instance.hs(3);
471
+ var tmp_22 = Spacer_instance.hs(2);
426
472
  var tmp_23 = Spacer_instance.toString();
427
- var tmp_24 = Spacer_instance.ov(2);
428
- var tmp_25 = this.m20(endpoint);
429
- var tmp_26 = Spacer_instance.ov(2);
430
- var tmp_27 = Spacer_instance.ov(3);
431
- return trimMargin('\n |' + tmp_0 + '\n |\n |object ' + tmp_1 + ' : Wirespec.Endpoint {\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + '\n |\n |' + tmp_7 + 'sealed interface Response<T: Any> : Wirespec.Response<T>\n |\n |' + tmp_8 + '\n |\n |' + tmp_9 + '\n |\n |' + tmp_11 + '\n |\n |' + tmp_12 + 'fun toResponse(serialization: Wirespec.Serializer, response: Response<*>): Wirespec.RawResponse =\n |' + tmp_13 + 'when(response) {\n |' + tmp_15 + '\n |' + tmp_16 + '}\n |\n |' + tmp_17 + 'fun fromResponse(serialization: Wirespec.Deserializer, response: Wirespec.RawResponse): Response<*> =\n |' + tmp_18 + 'when (response.statusCode) {\n |' + tmp_20 + '\n |' + tmp_21 + 'else -> error("Cannot match response with status: ${response.statusCode}")\n |' + tmp_22 + '}\n |\n |' + tmp_23 + 'interface Handler: Wirespec.Handler {\n |' + tmp_24 + tmp_25 + '\n |' + tmp_26 + 'companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n |' + tmp_27 + 'override val pathTemplate = "/' + joinToString(endpoint.et_1, '/', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_6) + '"\n |' + Spacer_instance.ov(3) + 'override val method = "' + endpoint.dt_1.toString() + '"\n |' + Spacer_instance.ov(3) + 'override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n |' + Spacer_instance.ov(4) + 'override fun from(request: Wirespec.RawRequest) = fromRequest(serialization, request)\n |' + Spacer_instance.ov(4) + 'override fun to(response: Response<*>) = toResponse(serialization, response)\n |' + Spacer_instance.ov(3) + '}\n |' + Spacer_instance.ov(3) + 'override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n |' + Spacer_instance.ov(4) + 'override fun to(request: Request) = toRequest(serialization, request)\n |' + Spacer_instance.ov(4) + 'override fun from(response: Wirespec.RawResponse) = fromResponse(serialization, response)\n |' + Spacer_instance.ov(3) + '}\n |' + Spacer_instance.ov(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
473
+ var tmp_24 = Spacer_instance.hs(2);
474
+ var tmp_25 = this.i1x(endpoint);
475
+ var tmp_26 = Spacer_instance.hs(2);
476
+ var tmp_27 = Spacer_instance.hs(3);
477
+ return trimMargin('\n |' + tmp_0 + '\n |\n |object ' + tmp_1 + ' : Wirespec.Endpoint {\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + '\n |\n |' + tmp_7 + 'sealed interface Response<T: Any> : Wirespec.Response<T>\n |\n |' + tmp_8 + '\n |\n |' + tmp_9 + '\n |\n |' + tmp_11 + '\n |\n |' + tmp_12 + 'fun toResponse(serialization: Wirespec.Serializer, response: Response<*>): Wirespec.RawResponse =\n |' + tmp_13 + 'when(response) {\n |' + tmp_15 + '\n |' + tmp_16 + '}\n |\n |' + tmp_17 + 'fun fromResponse(serialization: Wirespec.Deserializer, response: Wirespec.RawResponse): Response<*> =\n |' + tmp_18 + 'when (response.statusCode) {\n |' + tmp_20 + '\n |' + tmp_21 + 'else -> error("Cannot match response with status: ${response.statusCode}")\n |' + tmp_22 + '}\n |\n |' + tmp_23 + 'interface Handler: Wirespec.Handler {\n |' + tmp_24 + tmp_25 + '\n |' + tmp_26 + 'companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n |' + tmp_27 + 'override val pathTemplate = "/' + joinToString(endpoint.wp_1, '/', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_6) + '"\n |' + Spacer_instance.hs(3) + 'override val method = "' + endpoint.vp_1.toString() + '"\n |' + Spacer_instance.hs(3) + 'override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n |' + Spacer_instance.hs(4) + 'override fun from(request: Wirespec.RawRequest) = fromRequest(serialization, request)\n |' + Spacer_instance.hs(4) + 'override fun to(response: Response<*>) = toResponse(serialization, response)\n |' + Spacer_instance.hs(3) + '}\n |' + Spacer_instance.hs(3) + 'override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n |' + Spacer_instance.hs(4) + 'override fun to(request: Request) = toRequest(serialization, request)\n |' + Spacer_instance.hs(4) + 'override fun from(response: Wirespec.RawResponse) = fromResponse(serialization, response)\n |' + Spacer_instance.hs(3) + '}\n |' + Spacer_instance.hs(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
432
478
  }
433
479
  function emitHandleFunction(endpoint) {
434
- return 'suspend fun ' + Companion_instance_1.nu(this.uu(endpoint.ct_1)) + '(request: Request): Response<*>';
480
+ return 'suspend fun ' + Companion_instance_1.fr(this.nr(endpoint.up_1)) + '(request: Request): Response<*>';
435
481
  }
436
- function emit_13(_this__u8e3s4, endpoint) {
482
+ function emit_14(_this__u8e3s4, endpoint) {
437
483
  var tmp = Spacer_instance.toString();
438
484
  var tmp_0 = emitConstructor(this, _this__u8e3s4, endpoint);
439
- var tmp_1 = Spacer_instance.ov(2);
485
+ var tmp_1 = Spacer_instance.hs(2);
440
486
  var tmp_2 = get_pathParams(endpoint);
441
487
  var tmp_3 = brace(this, joinToString(tmp_2, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_7(this)));
442
- var tmp_4 = Spacer_instance.ov(2);
443
- var tmp_5 = Spacer_instance.ov(2);
444
- var tmp_6 = brace(this, joinToString(endpoint.ft_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_8(this)));
445
- var tmp_7 = Spacer_instance.ov(2);
446
- var tmp_8 = brace(this, joinToString(endpoint.gt_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_9(this)));
447
- var tmp_9 = _this__u8e3s4.lt_1 == null ? Spacer_instance.ov(2) + 'override val body = Unit\n' + Spacer_instance.toString() + '}' : Spacer_instance.toString() + '}';
488
+ var tmp_4 = Spacer_instance.hs(2);
489
+ var tmp_5 = Spacer_instance.hs(2);
490
+ var tmp_6 = brace(this, joinToString(endpoint.xp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_8(this)));
491
+ var tmp_7 = Spacer_instance.hs(2);
492
+ var tmp_8 = brace(this, joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_9(this)));
493
+ var tmp_9 = _this__u8e3s4.dq_1 == null ? Spacer_instance.hs(2) + 'override val body = Unit\n' + Spacer_instance.toString() + '}' : Spacer_instance.toString() + '}';
448
494
  var tmp_10 = Spacer_instance.toString();
449
- var tmp_11 = Spacer_instance.ov(2);
450
- var tmp_12 = Spacer_instance.ov(3);
451
- return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.dt_1.b3_1 + '\n |' + tmp_5 + 'override val queries = Queries' + tmp_6 + '\n |' + tmp_7 + 'override val headers = Headers' + tmp_8 + '\n |' + tmp_9 + '\n |\n |' + tmp_10 + 'fun toRequest(serialization: Wirespec.Serializer, request: Request): Wirespec.RawRequest =\n |' + tmp_11 + 'Wirespec.RawRequest(\n |' + tmp_12 + 'path = listOf(' + joinToString(endpoint.et_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.ov(3) + 'method = request.method.name,\n |' + Spacer_instance.ov(3) + 'queries = ' + this.f21(endpoint) + ',\n |' + Spacer_instance.ov(3) + 'headers = ' + this.e21(endpoint) + ',\n |' + Spacer_instance.ov(3) + 'body = ' + (!(_this__u8e3s4.lt_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.lt_1) + '>())' : 'null') + ',\n |' + Spacer_instance.ov(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.ov(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
495
+ var tmp_11 = Spacer_instance.hs(2);
496
+ var tmp_12 = Spacer_instance.hs(3);
497
+ return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.vp_1.a3_1 + '\n |' + tmp_5 + 'override val queries = Queries' + tmp_6 + '\n |' + tmp_7 + 'override val headers = Headers' + tmp_8 + '\n |' + tmp_9 + '\n |\n |' + tmp_10 + 'fun toRequest(serialization: Wirespec.Serializer, request: Request): Wirespec.RawRequest =\n |' + tmp_11 + 'Wirespec.RawRequest(\n |' + tmp_12 + 'path = listOf(' + joinToString(endpoint.wp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.hs(3) + 'method = request.method.name,\n |' + Spacer_instance.hs(3) + 'queries = ' + this.b1y(endpoint) + ',\n |' + Spacer_instance.hs(3) + 'headers = ' + this.a1y(endpoint) + ',\n |' + Spacer_instance.hs(3) + 'body = ' + (!(_this__u8e3s4.dq_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.dq_1) + '>())' : 'null') + ',\n |' + Spacer_instance.hs(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.hs(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
452
498
  }
453
499
  function emitRequestHeaders(_this__u8e3s4) {
454
500
  var tmp;
455
- if (_this__u8e3s4.gt_1.r()) {
501
+ if (_this__u8e3s4.yp_1.r()) {
456
502
  tmp = 'emptyMap()';
457
503
  } else {
458
- var tmp_0 = Spacer_instance.ov(5);
459
- var tmp_1 = ',\n' + Spacer_instance.ov(5);
460
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.gt_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this)) + '\n |' + Spacer_instance.ov(4) + ')\n ');
504
+ var tmp_0 = Spacer_instance.hs(5);
505
+ var tmp_1 = ',\n' + Spacer_instance.hs(5);
506
+ tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.yp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this)) + '\n |' + Spacer_instance.hs(4) + ')\n ');
461
507
  }
462
508
  return tmp;
463
509
  }
464
510
  function emitQueries(endpoint) {
465
511
  var tmp;
466
512
  // Inline function 'kotlin.collections.isNotEmpty' call
467
- if (!endpoint.ft_1.r()) {
468
- var tmp_0 = Spacer_instance.ov(5);
469
- var tmp_1 = ',\n' + Spacer_instance.ov(5);
470
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.ft_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitQueries$lambda(this)) + '\n |' + Spacer_instance.ov(4) + ')\n ');
513
+ if (!endpoint.xp_1.r()) {
514
+ var tmp_0 = Spacer_instance.hs(5);
515
+ var tmp_1 = ',\n' + Spacer_instance.hs(5);
516
+ tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.xp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitQueries$lambda(this)) + '\n |' + Spacer_instance.hs(4) + ')\n ');
471
517
  } else {
472
518
  tmp = 'emptyMap()';
473
519
  }
474
520
  return tmp;
475
521
  }
476
- function emit_14(_this__u8e3s4) {
522
+ function emit_15(_this__u8e3s4) {
477
523
  // Inline function 'kotlin.let' call
478
- var it = joinToString(_this__u8e3s4.pt_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
524
+ var it = joinToString(_this__u8e3s4.hq_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
479
525
  var responseHeaderFields = isBlank(it) ? '' : ', ' + it;
480
526
  var tmp = Spacer_instance.toString();
481
- var tmp_0 = emit_16(this, _this__u8e3s4.qt_1);
482
- var tmp_1 = toString_0(charCodeAt(_this__u8e3s4.ot_1, 0));
483
- var tmp_2 = emit_16(this, _this__u8e3s4.qt_1);
484
- var tmp_3 = concatGenerics(emit_16(this, _this__u8e3s4.qt_1));
485
- var tmp_4 = Spacer_instance.ov(2);
486
- var tmp_5 = fixStatus(_this__u8e3s4.ot_1);
487
- var tmp_6 = Spacer_instance.ov(2);
488
- var tmp_7 = brace(this, joinToString(_this__u8e3s4.pt_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_12(this)));
489
- return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.ot_1 + '(override val body: ' + tmp_0 + responseHeaderFields + ') : Response' + tmp_1 + 'XX<' + tmp_2 + '>, Response' + tmp_3 + ' {\n |' + tmp_4 + 'override val status = ' + tmp_5 + '\n |' + tmp_6 + 'override val headers = ResponseHeaders' + tmp_7 + '\n |' + emitObject(this, _this__u8e3s4.pt_1, 'ResponseHeaders', 'Wirespec.Response.Headers', 2, KotlinEndpointDefinitionEmitter$emit$lambda_13(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
527
+ var tmp_0 = emit_16(this, _this__u8e3s4.iq_1);
528
+ var tmp_1 = toString_0(charCodeAt(_this__u8e3s4.gq_1, 0));
529
+ var tmp_2 = emit_16(this, _this__u8e3s4.iq_1);
530
+ var tmp_3 = concatGenerics(emit_16(this, _this__u8e3s4.iq_1));
531
+ var tmp_4 = Spacer_instance.hs(2);
532
+ var tmp_5 = fixStatus(_this__u8e3s4.gq_1);
533
+ var tmp_6 = Spacer_instance.hs(2);
534
+ var tmp_7 = brace(this, joinToString(_this__u8e3s4.hq_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_12(this)));
535
+ return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.gq_1 + '(override val body: ' + tmp_0 + responseHeaderFields + ') : Response' + tmp_1 + 'XX<' + tmp_2 + '>, Response' + tmp_3 + ' {\n |' + tmp_4 + 'override val status = ' + tmp_5 + '\n |' + tmp_6 + 'override val headers = ResponseHeaders' + tmp_7 + '\n |' + emitObject(this, _this__u8e3s4.hq_1, 'ResponseHeaders', 'Wirespec.Response.Headers', 2, KotlinEndpointDefinitionEmitter$emit$lambda_13(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
490
536
  }
491
537
  function emitBody(_this__u8e3s4, content) {
492
538
  return 'serialization.serializeBody(response.body, typeOf<' + emit_16(_this__u8e3s4, content) + '>())';
493
539
  }
494
540
  function emitHeaders(_this__u8e3s4) {
495
541
  var tmp;
496
- if (_this__u8e3s4.pt_1.r()) {
542
+ if (_this__u8e3s4.hq_1.r()) {
497
543
  tmp = 'emptyMap()';
498
544
  } else {
499
- var tmp_0 = Spacer_instance.ov(5);
500
- var tmp_1 = ',\n' + Spacer_instance.ov(5);
501
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.pt_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this)) + '\n |' + Spacer_instance.ov(4) + ')\n ');
545
+ var tmp_0 = Spacer_instance.hs(5);
546
+ var tmp_1 = ',\n' + Spacer_instance.hs(5);
547
+ tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.hq_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this)) + '\n |' + Spacer_instance.hs(4) + ')\n ');
502
548
  }
503
549
  return tmp;
504
550
  }
505
551
  initMetadataForInterface(KotlinEndpointDefinitionEmitter, 'KotlinEndpointDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
506
- function emit_15(refined) {
507
- return trimMargin('\n |data class ' + this.v20(refined.zu_1) + '(override val value: ' + this.vt(refined.av_1) + '): Wirespec.Refined<' + this.vt(refined.av_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.iv(refined) + '\n |}\n |\n ');
508
- }
509
- function emitValidator(_this__u8e3s4) {
510
- var defaultReturn = 'true';
511
- var type = _this__u8e3s4.av_1.my_1;
512
- var tmp;
513
- if (type instanceof Integer) {
514
- var tmp0_safe_receiver = type.rx_1;
515
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.wt(tmp0_safe_receiver);
516
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
517
- } else {
518
- if (type instanceof Number_0) {
519
- var tmp2_safe_receiver = type.ux_1;
520
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.wt(tmp2_safe_receiver);
521
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
522
- } else {
523
- if (type instanceof String_0) {
524
- var tmp4_safe_receiver = type.ox_1;
525
- var tmp_0;
526
- var tmp_1 = tmp4_safe_receiver;
527
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
528
- tmp_0 = null;
529
- } else {
530
- tmp_0 = this.wt(new RegExp_0(tmp4_safe_receiver));
531
- }
532
- var tmp5_elvis_lhs = tmp_0;
533
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
534
- } else {
535
- if (equals(type, Boolean_instance)) {
536
- tmp = defaultReturn;
537
- } else {
538
- if (equals(type, Bytes_instance)) {
539
- tmp = defaultReturn;
540
- } else {
541
- noWhenBranchMatchedException();
542
- }
543
- }
544
- }
545
- }
546
- }
547
- return tmp;
548
- }
549
- initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
550
- initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinEnumDefinitionEmitter, KotlinUnionDefinitionEmitter, KotlinTypeDefinitionEmitter, KotlinChannelDefinitionEmitter, KotlinEndpointDefinitionEmitter, KotlinIdentifierEmitter, KotlinRefinedTypeDefinitionEmitter]);
552
+ initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinChannelDefinitionEmitter, KotlinRefinedTypeDefinitionEmitter, KotlinEnumDefinitionEmitter, KotlinUnionDefinitionEmitter, KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter, KotlinEndpointDefinitionEmitter]);
551
553
  initMetadataForCompanion(Companion);
552
554
  initMetadataForCompanion(Companion_0);
553
555
  initMetadataForClass(KotlinIrEmitter, 'KotlinIrEmitter', KotlinIrEmitter, VOID, [IrEmitter]);
@@ -561,7 +563,7 @@ function emitImports($this, _this__u8e3s4) {
561
563
  var _iterator__ex2g4s = this_0.t();
562
564
  while (_iterator__ex2g4s.u()) {
563
565
  var item = _iterator__ex2g4s.v();
564
- var tmp$ret$0 = 'import ' + $this.v1z().kv_1 + '.model.' + item.iy_1 + ';';
566
+ var tmp$ret$0 = 'import ' + $this.r1w().ds_1 + '.model.' + item.bv_1 + ';';
565
567
  destination.x(tmp$ret$0);
566
568
  }
567
569
  var tmp = destination;
@@ -574,52 +576,52 @@ function KotlinChannelDefinitionEmitter$emitImports$lambda(it) {
574
576
  function KotlinChannelDefinitionEmitter() {
575
577
  }
576
578
  function KotlinEmitter(packageName, emitShared) {
577
- packageName = packageName === VOID ? Companion_instance.jv('community.flock.wirespec.generated') : packageName;
578
- emitShared = emitShared === VOID ? Companion_instance_0.es() : emitShared;
579
+ packageName = packageName === VOID ? Companion_instance.cs('community.flock.wirespec.generated') : packageName;
580
+ emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
579
581
  LanguageEmitter.call(this);
580
- this.w20_1 = packageName;
581
- this.x20_1 = emitShared;
582
- this.y20_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
583
- this.z20_1 = FileExtension_Kotlin_getInstance();
584
- this.a21_1 = KotlinShared_getInstance();
585
- this.b21_1 = '//';
586
- }
587
- protoOf(KotlinEmitter).v1z = function () {
588
- return this.w20_1;
582
+ this.s1x_1 = packageName;
583
+ this.t1x_1 = emitShared;
584
+ this.u1x_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
585
+ this.v1x_1 = FileExtension_Kotlin_getInstance();
586
+ this.w1x_1 = KotlinShared_getInstance();
587
+ this.x1x_1 = '//';
588
+ }
589
+ protoOf(KotlinEmitter).r1w = function () {
590
+ return this.s1x_1;
589
591
  };
590
- protoOf(KotlinEmitter).cu = function () {
591
- return this.z20_1;
592
+ protoOf(KotlinEmitter).uq = function () {
593
+ return this.v1x_1;
592
594
  };
593
- protoOf(KotlinEmitter).e20 = function () {
594
- return this.a21_1;
595
+ protoOf(KotlinEmitter).a1x = function () {
596
+ return this.w1x_1;
595
597
  };
596
- protoOf(KotlinEmitter).du = function () {
597
- return this.b21_1;
598
+ protoOf(KotlinEmitter).vq = function () {
599
+ return this.x1x_1;
598
600
  };
599
- protoOf(KotlinEmitter).ru = function (module_0, logger) {
601
+ protoOf(KotlinEmitter).kr = function (module_0, logger) {
600
602
  // Inline function 'kotlin.let' call
601
- var it = protoOf(LanguageEmitter).ru.call(this, module_0, logger);
602
- return this.x20_1.fs_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.jv('community.flock.wirespec.kotlin').mv() + 'Wirespec', this.e20().d21_1)) : it;
603
+ var it = protoOf(LanguageEmitter).kr.call(this, module_0, logger);
604
+ return this.t1x_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.cs('community.flock.wirespec.kotlin').fs() + 'Wirespec', this.a1x().z1x_1)) : it;
603
605
  };
604
- protoOf(KotlinEmitter).su = function (definition, module_0, logger) {
606
+ protoOf(KotlinEmitter).lr = function (definition, module_0, logger) {
605
607
  // Inline function 'kotlin.let' call
606
- var it = protoOf(LanguageEmitter).su.call(this, definition, module_0, logger);
607
- var subPackageName = plus(this.v1z(), definition);
608
- var tmp = subPackageName.mv() + it.gs_1;
608
+ var it = protoOf(LanguageEmitter).lr.call(this, definition, module_0, logger);
609
+ var subPackageName = plus(this.r1w(), definition);
610
+ var tmp = subPackageName.fs() + it.yo_1;
609
611
  // Inline function 'kotlin.text.trimStart' call
610
- var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.ou(module_0) ? this.y20_1 : '') + '\n |' + it.hs_1 + '\n ');
612
+ var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.gr(module_0) ? this.u1x_1 : '') + '\n |' + it.zo_1 + '\n ');
611
613
  var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
612
614
  return new Emitted(tmp, tmp$ret$0);
613
615
  };
614
616
  function emitStatusInterfaces($this, _this__u8e3s4) {
615
617
  // Inline function 'kotlin.collections.map' call
616
- var this_0 = _this__u8e3s4.it_1;
618
+ var this_0 = _this__u8e3s4.aq_1;
617
619
  // Inline function 'kotlin.collections.mapTo' call
618
620
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
619
621
  var _iterator__ex2g4s = this_0.t();
620
622
  while (_iterator__ex2g4s.u()) {
621
623
  var item = _iterator__ex2g4s.v();
622
- var tmp$ret$0 = new Char(charCodeAt(item.ot_1, 0));
624
+ var tmp$ret$0 = new Char(charCodeAt(item.gq_1, 0));
623
625
  destination.x(tmp$ret$0);
624
626
  }
625
627
  var tmp = distinct(destination);
@@ -627,13 +629,13 @@ function emitStatusInterfaces($this, _this__u8e3s4) {
627
629
  }
628
630
  function emitResponseInterfaces($this, _this__u8e3s4) {
629
631
  // Inline function 'kotlin.collections.map' call
630
- var this_0 = _this__u8e3s4.it_1;
632
+ var this_0 = _this__u8e3s4.aq_1;
631
633
  // Inline function 'kotlin.collections.mapTo' call
632
634
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
633
635
  var _iterator__ex2g4s = this_0.t();
634
636
  while (_iterator__ex2g4s.u()) {
635
637
  var item = _iterator__ex2g4s.v();
636
- var tmp$ret$0 = emit_16($this, item.qt_1);
638
+ var tmp$ret$0 = emit_16($this, item.iq_1);
637
639
  destination.x(tmp$ret$0);
638
640
  }
639
641
  var tmp = distinct(destination);
@@ -642,64 +644,64 @@ function emitResponseInterfaces($this, _this__u8e3s4) {
642
644
  function emitConstructor($this, _this__u8e3s4, endpoint) {
643
645
  var tmp = get_pathParams(endpoint);
644
646
  var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda($this)));
645
- var tmp_1 = orNull(joinToString(endpoint.ft_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
646
- var tmp_2 = orNull(joinToString(endpoint.gt_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
647
- var tmp0_safe_receiver = _this__u8e3s4.lt_1;
647
+ var tmp_1 = orNull(joinToString(endpoint.xp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
648
+ var tmp_2 = orNull(joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
649
+ var tmp0_safe_receiver = _this__u8e3s4.dq_1;
648
650
  var tmp_3;
649
651
  if (tmp0_safe_receiver == null) {
650
652
  tmp_3 = null;
651
653
  } else {
652
654
  // Inline function 'kotlin.let' call
653
- tmp_3 = Spacer_instance.ov(2) + 'override val body: ' + emit_16($this, tmp0_safe_receiver) + ',';
655
+ tmp_3 = Spacer_instance.hs(2) + 'override val body: ' + emit_16($this, tmp0_safe_receiver) + ',';
654
656
  }
655
657
  // Inline function 'kotlin.let' call
656
658
  var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
657
- return isBlank(it) ? 'object Request : Wirespec.Request<' + emit_16($this, _this__u8e3s4.lt_1) + '> {' : 'class Request(\n' + it + '\n' + Spacer_instance.toString() + ') : Wirespec.Request<' + emit_16($this, _this__u8e3s4.lt_1) + '> {';
659
+ return isBlank(it) ? 'object Request : Wirespec.Request<' + emit_16($this, _this__u8e3s4.dq_1) + '> {' : 'class Request(\n' + it + '\n' + Spacer_instance.toString() + ') : Wirespec.Request<' + emit_16($this, _this__u8e3s4.dq_1) + '> {';
658
660
  }
659
661
  function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
660
662
  var tmp = get_indexedPathParams(endpoint);
661
663
  var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda($this)));
662
- var tmp_1 = orNull(joinToString(endpoint.ft_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
663
- var tmp_2 = orNull(joinToString(endpoint.gt_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
664
- var tmp0_safe_receiver = _this__u8e3s4.lt_1;
664
+ var tmp_1 = orNull(joinToString(endpoint.xp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
665
+ var tmp_2 = orNull(joinToString(endpoint.yp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
666
+ var tmp0_safe_receiver = _this__u8e3s4.dq_1;
665
667
  var tmp_3;
666
668
  if (tmp0_safe_receiver == null) {
667
669
  tmp_3 = null;
668
670
  } else {
669
671
  // Inline function 'kotlin.let' call
670
- tmp_3 = Spacer_instance.ov(3) + 'body = serialization.deserializeBody(requireNotNull(request.body) { "body is null" }, typeOf<' + emit_16($this, tmp0_safe_receiver) + '>()),';
672
+ tmp_3 = Spacer_instance.hs(3) + 'body = serialization.deserializeBody(requireNotNull(request.body) { "body is null" }, typeOf<' + emit_16($this, tmp0_safe_receiver) + '>()),';
671
673
  }
672
674
  // Inline function 'kotlin.let' call
673
675
  var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
674
- return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.ov(2) + ')';
676
+ return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.hs(2) + ')';
675
677
  }
676
678
  function emitSerialized($this, _this__u8e3s4) {
677
- return trimMargin('\n |' + Spacer_instance.ov(3) + 'is Response' + _this__u8e3s4.ot_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.ov(4) + 'statusCode = response.status,\n |' + Spacer_instance.ov(4) + 'headers = ' + $this.h21(_this__u8e3s4) + ',\n |' + Spacer_instance.ov(4) + 'body = ' + (!(_this__u8e3s4.qt_1 == null) ? $this.g21($this, _this__u8e3s4.qt_1) : 'null') + ',\n |' + Spacer_instance.ov(3) + ')\n ');
679
+ return trimMargin('\n |' + Spacer_instance.hs(3) + 'is Response' + _this__u8e3s4.gq_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.hs(4) + 'statusCode = response.status,\n |' + Spacer_instance.hs(4) + 'headers = ' + $this.d1y(_this__u8e3s4) + ',\n |' + Spacer_instance.hs(4) + 'body = ' + (!(_this__u8e3s4.iq_1 == null) ? $this.c1y($this, _this__u8e3s4.iq_1) : 'null') + ',\n |' + Spacer_instance.hs(3) + ')\n ');
678
680
  }
679
681
  function emitDeserialized($this, _this__u8e3s4) {
680
- var tmp = Spacer_instance.ov(3) + _this__u8e3s4.ot_1 + ' -> Response' + _this__u8e3s4.ot_1 + '(';
682
+ var tmp = Spacer_instance.hs(3) + _this__u8e3s4.gq_1 + ' -> Response' + _this__u8e3s4.gq_1 + '(';
681
683
  var tmp_0;
682
- if (!(_this__u8e3s4.qt_1 == null)) {
683
- tmp_0 = Spacer_instance.ov(4) + 'body = serialization.deserializeBody(requireNotNull(response.body) { "body is null" }, typeOf<' + emit_16($this, _this__u8e3s4.qt_1) + '>()),';
684
+ if (!(_this__u8e3s4.iq_1 == null)) {
685
+ tmp_0 = Spacer_instance.hs(4) + 'body = serialization.deserializeBody(requireNotNull(response.body) { "body is null" }, typeOf<' + emit_16($this, _this__u8e3s4.iq_1) + '>()),';
684
686
  } else {
685
- tmp_0 = Spacer_instance.ov(4) + 'body = Unit,';
687
+ tmp_0 = Spacer_instance.hs(4) + 'body = Unit,';
686
688
  }
687
689
  var tmp_1 = tmp_0;
688
- return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.pt_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserialized$lambda($this))), Spacer_instance.ov(3) + ')']), '\n');
690
+ return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.hq_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserialized$lambda($this))), Spacer_instance.hs(3) + ')']), '\n');
689
691
  }
690
692
  function emitSerializedMapEntry($this, _this__u8e3s4, type, fields) {
691
- return '"' + _this__u8e3s4.ys_1.m1() + '" to ' + type + '.' + fields + '.' + $this.uu(_this__u8e3s4.ys_1) + '?.let{ serialization.serializeParam(it, typeOf<' + $this.vt(_this__u8e3s4.zs_1) + '>()) }.orEmpty()';
693
+ return '"' + _this__u8e3s4.qp_1.l1() + '" to ' + type + '.' + fields + '.' + $this.nr(_this__u8e3s4.qp_1) + '?.let{ serialization.serializeParam(it, typeOf<' + $this.nq(_this__u8e3s4.rp_1) + '>()) }.orEmpty()';
692
694
  }
693
695
  function emitDeserialized_0($this, _this__u8e3s4) {
694
- return Spacer_instance.ov(3) + $this.uu(_this__u8e3s4.jf_1.jt_1) + ' = serialization.deserializePath(request.path[' + _this__u8e3s4.if_1 + '], typeOf<' + $this.vt(_this__u8e3s4.jf_1.kt_1) + '>())';
696
+ return Spacer_instance.hs(3) + $this.nr(_this__u8e3s4.ue_1.bq_1) + ' = serialization.deserializePath(request.path[' + _this__u8e3s4.te_1 + '], typeOf<' + $this.nq(_this__u8e3s4.ue_1.cq_1) + '>())';
695
697
  }
696
698
  function emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive) {
697
- var trimMargin_0 = trimMargin('\n |' + Spacer_instance.ov(spaces) + $this.uu(_this__u8e3s4.ys_1) + ' =\n |' + Spacer_instance.ov(spaces + 1 | 0) + type + '.' + fields + '\n |' + Spacer_instance.ov(spaces + 2 | 0) + '.entries\n |' + Spacer_instance.ov(spaces + 2 | 0) + '.find { it.key.equals("' + _this__u8e3s4.ys_1.m1() + '", ignoreCase = ' + !caseSensitive + ') }\n |' + Spacer_instance.ov(spaces + 2 | 0) + '?.let { serialization.deserializeParam(it.value, typeOf<' + $this.vt(_this__u8e3s4.zs_1) + '>()) }\n ');
699
+ var trimMargin_0 = trimMargin('\n |' + Spacer_instance.hs(spaces) + $this.nr(_this__u8e3s4.qp_1) + ' =\n |' + Spacer_instance.hs(spaces + 1 | 0) + type + '.' + fields + '\n |' + Spacer_instance.hs(spaces + 2 | 0) + '.entries\n |' + Spacer_instance.hs(spaces + 2 | 0) + '.find { it.key.equals("' + _this__u8e3s4.qp_1.l1() + '", ignoreCase = ' + !caseSensitive + ') }\n |' + Spacer_instance.hs(spaces + 2 | 0) + '?.let { serialization.deserializeParam(it.value, typeOf<' + $this.nq(_this__u8e3s4.rp_1) + '>()) }\n ');
698
700
  var tmp;
699
- if (_this__u8e3s4.zs_1.ay()) {
701
+ if (_this__u8e3s4.rp_1.tu()) {
700
702
  tmp = trimMargin_0;
701
703
  } else {
702
- tmp = trimMargin_0 + '\n' + Spacer_instance.ov(spaces + 2 | 0) + '?: throw IllegalArgumentException("' + $this.uu(_this__u8e3s4.ys_1) + ' is null")';
704
+ tmp = trimMargin_0 + '\n' + Spacer_instance.hs(spaces + 2 | 0) + '?: throw IllegalArgumentException("' + $this.nr(_this__u8e3s4.qp_1) + ' is null")';
703
705
  }
704
706
  return tmp;
705
707
  }
@@ -709,16 +711,16 @@ function emitDeserializedParams$default($this, _this__u8e3s4, type, fields, spac
709
711
  return emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive);
710
712
  }
711
713
  function emitIdentifier($this, _this__u8e3s4) {
712
- return 'request.path.' + $this.uu(_this__u8e3s4.jt_1) + '.let{serialization.serializePath(it, typeOf<' + $this.vt(_this__u8e3s4.kt_1) + '>())}';
714
+ return 'request.path.' + $this.nr(_this__u8e3s4.bq_1) + '.let{serialization.serializePath(it, typeOf<' + $this.nq(_this__u8e3s4.cq_1) + '>())}';
713
715
  }
714
716
  function emit_16($this, _this__u8e3s4) {
715
- var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.nt_1;
716
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.vt(tmp1_safe_receiver);
717
+ var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.fq_1;
718
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.nq(tmp1_safe_receiver);
717
719
  var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : removeQuestionMark(tmp2_safe_receiver);
718
720
  return tmp3_elvis_lhs == null ? 'Unit' : tmp3_elvis_lhs;
719
721
  }
720
722
  function emit_17($this, _this__u8e3s4) {
721
- return $this.uu(_this__u8e3s4.jt_1) + ': ' + $this.vt(_this__u8e3s4.kt_1);
723
+ return $this.nr(_this__u8e3s4.bq_1) + ': ' + $this.nq(_this__u8e3s4.cq_1);
722
724
  }
723
725
  function brace($this, _this__u8e3s4) {
724
726
  return wrap($this, _this__u8e3s4, '(', ')');
@@ -736,10 +738,10 @@ function wrap($this, _this__u8e3s4, prefix, postfix) {
736
738
  function emitObject($this, _this__u8e3s4, name, extends_0, spaces, block) {
737
739
  var tmp;
738
740
  if (_this__u8e3s4.r()) {
739
- tmp = Spacer_instance.ov(spaces) + 'data object ' + name + ' : ' + extends_0;
741
+ tmp = Spacer_instance.hs(spaces) + 'data object ' + name + ' : ' + extends_0;
740
742
  } else {
741
- var tmp_0 = Spacer_instance.ov(spaces);
742
- tmp = trimMargin('\n |' + tmp_0 + 'data class ' + name + '(\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitObject$lambda(spaces, block)) + ',\n |' + Spacer_instance.ov(spaces) + ') : ' + extends_0 + '\n ');
743
+ var tmp_0 = Spacer_instance.hs(spaces);
744
+ tmp = trimMargin('\n |' + tmp_0 + 'data class ' + name + '(\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitObject$lambda(spaces, block)) + ',\n |' + Spacer_instance.hs(spaces) + ') : ' + extends_0 + '\n ');
743
745
  }
744
746
  return tmp;
745
747
  }
@@ -758,17 +760,17 @@ function KotlinEndpointDefinitionEmitter$emit$lambda_0(this$0) {
758
760
  }
759
761
  function KotlinEndpointDefinitionEmitter$emit$lambda_1(this$0) {
760
762
  return function (it) {
761
- return this$0.ut(it);
763
+ return this$0.mq(it);
762
764
  };
763
765
  }
764
766
  function KotlinEndpointDefinitionEmitter$emit$lambda_2(this$0) {
765
767
  return function (it) {
766
- return this$0.ut(it);
768
+ return this$0.mq(it);
767
769
  };
768
770
  }
769
771
  function KotlinEndpointDefinitionEmitter$emit$lambda_3(this$0) {
770
772
  return function (it) {
771
- return this$0.j20(it);
773
+ return this$0.f1x(it);
772
774
  };
773
775
  }
774
776
  function KotlinEndpointDefinitionEmitter$emit$lambda_4(this$0) {
@@ -792,24 +794,24 @@ function KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda(it) {
792
794
  }
793
795
  function KotlinEndpointDefinitionEmitter$emit$lambda_7(this$0) {
794
796
  return function (it) {
795
- return this$0.uu(it.jt_1);
797
+ return this$0.nr(it.bq_1);
796
798
  };
797
799
  }
798
800
  function KotlinEndpointDefinitionEmitter$emit$lambda_8(this$0) {
799
801
  return function (it) {
800
- return this$0.uu(it.ys_1);
802
+ return this$0.nr(it.qp_1);
801
803
  };
802
804
  }
803
805
  function KotlinEndpointDefinitionEmitter$emit$lambda_9(this$0) {
804
806
  return function (it) {
805
- return this$0.uu(it.ys_1);
807
+ return this$0.nr(it.qp_1);
806
808
  };
807
809
  }
808
810
  function KotlinEndpointDefinitionEmitter$emit$lambda_10(this$0) {
809
811
  return function (it) {
810
812
  var tmp;
811
813
  if (it instanceof Literal) {
812
- tmp = '"' + it.fu_1 + '"';
814
+ tmp = '"' + it.xq_1 + '"';
813
815
  } else {
814
816
  if (it instanceof Param) {
815
817
  tmp = emitIdentifier(this$0, it);
@@ -832,32 +834,32 @@ function KotlinEndpointDefinitionEmitter$emitQueries$lambda(this$0) {
832
834
  }
833
835
  function KotlinEndpointDefinitionEmitter$emit$lambda_11(this$0) {
834
836
  return function (it) {
835
- return 'val ' + this$0.ut(it);
837
+ return 'val ' + this$0.mq(it);
836
838
  };
837
839
  }
838
840
  function KotlinEndpointDefinitionEmitter$emit$lambda_12(this$0) {
839
841
  return function (it) {
840
- return this$0.uu(it.ys_1);
842
+ return this$0.nr(it.qp_1);
841
843
  };
842
844
  }
843
845
  function KotlinEndpointDefinitionEmitter$emit$lambda_13(this$0) {
844
846
  return function (it) {
845
- return this$0.ut(it);
847
+ return this$0.mq(it);
846
848
  };
847
849
  }
848
850
  function KotlinEndpointDefinitionEmitter$emitConstructor$lambda(this$0) {
849
851
  return function (it) {
850
- return Spacer_instance.ov(2) + emit_17(this$0, it);
852
+ return Spacer_instance.hs(2) + emit_17(this$0, it);
851
853
  };
852
854
  }
853
855
  function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0(this$0) {
854
856
  return function (it) {
855
- return Spacer_instance.ov(2) + this$0.ut(it);
857
+ return Spacer_instance.hs(2) + this$0.mq(it);
856
858
  };
857
859
  }
858
860
  function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1(this$0) {
859
861
  return function (it) {
860
- return Spacer_instance.ov(2) + this$0.ut(it);
862
+ return Spacer_instance.hs(2) + this$0.mq(it);
861
863
  };
862
864
  }
863
865
  function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda(this$0) {
@@ -887,7 +889,7 @@ function KotlinEndpointDefinitionEmitter$emitDeserialized$lambda(this$0) {
887
889
  }
888
890
  function KotlinEndpointDefinitionEmitter$emitObject$lambda($spaces, $block) {
889
891
  return function (it) {
890
- return Spacer_instance.ov($spaces + 1 | 0) + 'val ' + $block(it);
892
+ return Spacer_instance.hs($spaces + 1 | 0) + 'val ' + $block(it);
891
893
  };
892
894
  }
893
895
  function KotlinEndpointDefinitionEmitter() {
@@ -896,18 +898,18 @@ function sanitizeNegative($this, _this__u8e3s4) {
896
898
  return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
897
899
  }
898
900
  function sanitizeEnum($this, _this__u8e3s4) {
899
- return $this.k20(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
901
+ return $this.g1x(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
900
902
  }
901
903
  function KotlinEnumDefinitionEmitter$emit$lambda(this$0) {
902
904
  return function (it) {
903
- return this$0.l20(sanitizeEnum(this$0, it)) + '("' + it + '")';
905
+ return this$0.h1x(sanitizeEnum(this$0, it)) + '("' + it + '")';
904
906
  };
905
907
  }
906
908
  function KotlinEnumDefinitionEmitter() {
907
909
  }
908
910
  function Companion() {
909
911
  Companion_instance_2 = this;
910
- this.i21_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
912
+ this.e1y_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
911
913
  }
912
914
  var Companion_instance_2;
913
915
  function Companion_getInstance_0() {
@@ -916,20 +918,27 @@ function Companion_getInstance_0() {
916
918
  return Companion_instance_2;
917
919
  }
918
920
  function KotlinIdentifierEmitter$sanitize$lambda(it) {
919
- return isLetterOrDigit(it.h1_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).v1(it);
921
+ return isLetterOrDigit(it.h1_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).u1(it);
920
922
  }
921
923
  function KotlinIdentifierEmitter() {
922
924
  }
923
925
  function _get_sanitizationConfig__sns434($this) {
924
- var tmp0 = $this.o21_1;
926
+ var tmp0 = $this.k1y_1;
925
927
  var tmp = KProperty1;
926
928
  // Inline function 'kotlin.getValue' call
927
929
  getPropertyCallableRef('sanitizationConfig', 1, tmp, KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf(), null);
928
- return tmp0.m1();
930
+ return tmp0.l1();
931
+ }
932
+ function _get_modelSanitizationConfig__vgg831($this) {
933
+ var tmp0 = $this.l1y_1;
934
+ var tmp = KProperty1;
935
+ // Inline function 'kotlin.getValue' call
936
+ getPropertyCallableRef('modelSanitizationConfig', 1, tmp, KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s(), null);
937
+ return tmp0.l1();
929
938
  }
930
939
  function sanitize_0($this, _this__u8e3s4) {
931
940
  // Inline function 'kotlin.collections.mapIndexed' call
932
- var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
941
+ var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
933
942
  // Inline function 'kotlin.collections.mapIndexedTo' call
934
943
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
935
944
  var index = 0;
@@ -938,7 +947,7 @@ function sanitize_0($this, _this__u8e3s4) {
938
947
  var item = _iterator__ex2g4s.v();
939
948
  var _unary__edvuaz = index;
940
949
  index = _unary__edvuaz + 1 | 0;
941
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.mu(item) : item;
950
+ var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.er(item) : item;
942
951
  destination.x(tmp$ret$0);
943
952
  }
944
953
  // Inline function 'kotlin.text.filter' call
@@ -986,7 +995,7 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
986
995
  return tmp;
987
996
  }
988
997
  function sanitizeKeywords_0($this, _this__u8e3s4) {
989
- return Companion_getInstance_1().p21_1.v1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
998
+ return Companion_getInstance_1().m1y_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
990
999
  }
991
1000
  function sanitizeSymbol($this, _this__u8e3s4) {
992
1001
  // Inline function 'kotlin.collections.mapIndexed' call
@@ -999,7 +1008,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
999
1008
  var item = _iterator__ex2g4s.v();
1000
1009
  var _unary__edvuaz = index;
1001
1010
  index = _unary__edvuaz + 1 | 0;
1002
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.mu(item) : item;
1011
+ var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.er(item) : item;
1003
1012
  destination.x(tmp$ret$0);
1004
1013
  }
1005
1014
  // Inline function 'kotlin.text.filter' call
@@ -1021,12 +1030,45 @@ function sanitizeSymbol($this, _this__u8e3s4) {
1021
1030
  var tmp$ret$5 = destination_0.toString();
1022
1031
  return sanitizeFirstIsDigit_0($this, tmp$ret$5);
1023
1032
  }
1033
+ function sanitizeFieldSymbol($this, _this__u8e3s4) {
1034
+ return isBareIdentifier($this, _this__u8e3s4) ? _this__u8e3s4 : addBackticks(_this__u8e3s4);
1035
+ }
1036
+ function isBareIdentifier($this, _this__u8e3s4) {
1037
+ var tmp;
1038
+ var tmp_0;
1039
+ // Inline function 'kotlin.text.isNotEmpty' call
1040
+ if (charSequenceLength(_this__u8e3s4) > 0) {
1041
+ tmp_0 = isLetter(first_0(_this__u8e3s4)) || first_0(_this__u8e3s4) === _Char___init__impl__6a9atx(95);
1042
+ } else {
1043
+ tmp_0 = false;
1044
+ }
1045
+ if (tmp_0) {
1046
+ var tmp$ret$2;
1047
+ $l$block: {
1048
+ // Inline function 'kotlin.text.all' call
1049
+ var inductionVariable = 0;
1050
+ while (inductionVariable < charSequenceLength(_this__u8e3s4)) {
1051
+ var element = charSequenceGet(_this__u8e3s4, inductionVariable);
1052
+ inductionVariable = inductionVariable + 1 | 0;
1053
+ if (!(isLetterOrDigit(element) || element === _Char___init__impl__6a9atx(95))) {
1054
+ tmp$ret$2 = false;
1055
+ break $l$block;
1056
+ }
1057
+ }
1058
+ tmp$ret$2 = true;
1059
+ }
1060
+ tmp = tmp$ret$2;
1061
+ } else {
1062
+ tmp = false;
1063
+ }
1064
+ return tmp;
1065
+ }
1024
1066
  function sanitizeEnum_0($this, _this__u8e3s4) {
1025
1067
  return sanitizeKeywords_0($this, sanitizeFirstIsDigit_0($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
1026
1068
  }
1027
1069
  function Companion_0() {
1028
1070
  Companion_instance_3 = this;
1029
- this.p21_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
1071
+ this.m1y_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
1030
1072
  }
1031
1073
  var Companion_instance_3;
1032
1074
  function Companion_getInstance_1() {
@@ -1039,13 +1081,13 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
1039
1081
  }
1040
1082
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
1041
1083
  return function (name) {
1042
- var sanitized = name.s1k_1.a1() > 1 ? name.v1p() : sanitizeSymbol(this$0, name.p1m());
1084
+ var sanitized = name.l1h_1.a1() > 1 ? name.q1m() : sanitizeSymbol(this$0, name.j1j());
1043
1085
  return new Name(listOf(sanitized));
1044
1086
  };
1045
1087
  }
1046
1088
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
1047
1089
  return function (name) {
1048
- return new Name(listOf(sanitizeSymbol(this$0, name.v1p())));
1090
+ return new Name(listOf(sanitizeSymbol(this$0, name.q1m())));
1049
1091
  };
1050
1092
  }
1051
1093
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
@@ -1058,28 +1100,28 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1058
1100
  var tmp;
1059
1101
  var tmp_0;
1060
1102
  if (stmt instanceof FunctionCall) {
1061
- tmp_0 = stmt.f1q_1.p1m() === 'validate';
1103
+ tmp_0 = stmt.z1m_1.j1j() === 'validate';
1062
1104
  } else {
1063
1105
  tmp_0 = false;
1064
1106
  }
1065
1107
  if (tmp_0) {
1066
- tmp = transformChildren(stmt.j1q(VOID, emptyList()), tr);
1108
+ tmp = transformChildren(stmt.d1n(VOID, emptyList()), tr);
1067
1109
  } else {
1068
1110
  if (stmt instanceof ConstructorStatement) {
1069
- var tmp_1 = tr.d1y(stmt.x1q_1);
1111
+ var tmp_1 = tr.x1u(stmt.r1n_1);
1070
1112
  // Inline function 'kotlin.collections.map' call
1071
- var this_0 = stmt.y1q_1;
1113
+ var this_0 = stmt.s1n_1;
1072
1114
  // Inline function 'kotlin.collections.mapTo' call
1073
1115
  var destination = ArrayList_init_$Create$(this_0.a1());
1074
1116
  // Inline function 'kotlin.collections.iterator' call
1075
- var _iterator__ex2g4s = this_0.k1().t();
1117
+ var _iterator__ex2g4s = this_0.j1().t();
1076
1118
  while (_iterator__ex2g4s.u()) {
1077
1119
  var item = _iterator__ex2g4s.v();
1078
1120
  // Inline function 'kotlin.collections.component1' call
1079
- var name = item.l1();
1121
+ var name = item.k1();
1080
1122
  // Inline function 'kotlin.collections.component2' call
1081
- var expr = item.m1();
1082
- var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.g1y(expr));
1123
+ var expr = item.l1();
1124
+ var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.a1v(expr));
1083
1125
  destination.x(tmp$ret$3);
1084
1126
  }
1085
1127
  tmp = new ConstructorStatement(tmp_1, toMap(destination));
@@ -1092,7 +1134,7 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1092
1134
  }
1093
1135
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1094
1136
  return function () {
1095
- var tmp = Companion_getInstance_1().p21_1;
1137
+ var tmp = Companion_getInstance_1().m1y_1;
1096
1138
  var tmp_0 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1097
1139
  var tmp_1 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
1098
1140
  var tmp_2 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
@@ -1105,11 +1147,31 @@ function KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf() {
1105
1147
  return _get_sanitizationConfig__sns434(p0);
1106
1148
  };
1107
1149
  }
1150
+ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
1151
+ return new Name(listOf(name.j1j()));
1152
+ }
1153
+ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0) {
1154
+ return function (it) {
1155
+ return sanitizeFieldSymbol(this$0, it);
1156
+ };
1157
+ }
1158
+ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
1159
+ return function () {
1160
+ var tmp = _get_sanitizationConfig__sns434(this$0);
1161
+ var tmp_0 = KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
1162
+ return tmp.q1w(VOID, VOID, tmp_0, VOID, KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
1163
+ };
1164
+ }
1165
+ function KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s() {
1166
+ return function (p0) {
1167
+ return _get_modelSanitizationConfig__vgg831(p0);
1168
+ };
1169
+ }
1108
1170
  function KotlinIrEmitter$emitShared$lambda(element, transformer) {
1109
1171
  var tmp;
1110
1172
  if (element instanceof File) {
1111
1173
  // Inline function 'kotlin.collections.partition' call
1112
- var this_0 = element.b1r_1;
1174
+ var this_0 = element.v1n_1;
1113
1175
  var first = ArrayList_init_$Create$_0();
1114
1176
  var second = ArrayList_init_$Create$_0();
1115
1177
  var _iterator__ex2g4s = this_0.t();
@@ -1122,9 +1184,9 @@ function KotlinIrEmitter$emitShared$lambda(element, transformer) {
1122
1184
  }
1123
1185
  }
1124
1186
  var _destruct__k2r9zo = new Pair(first, second);
1125
- var packageElements = _destruct__k2r9zo.kf();
1126
- var rest = _destruct__k2r9zo.lf();
1127
- tmp = element.e1r(VOID, plus_2(plus_1(packageElements, import_0('kotlin.reflect', 'KType')), rest));
1187
+ var packageElements = _destruct__k2r9zo.ve();
1188
+ var rest = _destruct__k2r9zo.we();
1189
+ tmp = element.y1n(VOID, plus_2(plus_1(packageElements, import_0('kotlin.reflect', 'KType')), rest));
1128
1190
  } else {
1129
1191
  tmp = element;
1130
1192
  }
@@ -1135,11 +1197,11 @@ function KotlinIrEmitter$emitShared$lambda_0($clientServer) {
1135
1197
  return function (element, transformer) {
1136
1198
  var tmp;
1137
1199
  if (element instanceof Namespace) {
1138
- var injected = element.g1r_1.equals(Companion_getInstance().u1k('Wirespec')) ? $clientServer : emptyList();
1200
+ var injected = element.a1o_1.equals(Companion_getInstance().n1h('Wirespec')) ? $clientServer : emptyList();
1139
1201
  var tmp_0;
1140
1202
  // Inline function 'kotlin.collections.isNotEmpty' call
1141
1203
  if (!injected.r()) {
1142
- tmp_0 = withElements(element, plus_2(element.c1r(), injected));
1204
+ tmp_0 = withElements(element, plus_2(element.w1n(), injected));
1143
1205
  } else {
1144
1206
  tmp_0 = element;
1145
1207
  }
@@ -1164,7 +1226,7 @@ function KotlinIrEmitter$emitGenerator$lambda_1(it) {
1164
1226
  }
1165
1227
  function KotlinIrEmitter$emitGenerator$lambda_2(this$0) {
1166
1228
  return function (it) {
1167
- return import_0(this$0.v1z().kv_1 + '.model', it);
1229
+ return import_0(this$0.r1w().ds_1 + '.model', it);
1168
1230
  };
1169
1231
  }
1170
1232
  function KotlinIrEmitter$emit$lambda(this$0) {
@@ -1174,27 +1236,29 @@ function KotlinIrEmitter$emit$lambda(this$0) {
1174
1236
  }
1175
1237
  function KotlinIrEmitter(packageName, emitShared) {
1176
1238
  Companion_getInstance_1();
1177
- packageName = packageName === VOID ? Companion_instance.jv('community.flock.wirespec.generated') : packageName;
1178
- emitShared = emitShared === VOID ? Companion_instance_0.es() : emitShared;
1179
- this.j21_1 = packageName;
1180
- this.k21_1 = emitShared;
1181
- this.l21_1 = KotlinGenerator_instance;
1182
- this.m21_1 = FileExtension_Kotlin_getInstance();
1183
- this.n21_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
1239
+ packageName = packageName === VOID ? Companion_instance.cs('community.flock.wirespec.generated') : packageName;
1240
+ emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
1241
+ this.f1y_1 = packageName;
1242
+ this.g1y_1 = emitShared;
1243
+ this.h1y_1 = KotlinGenerator_instance;
1244
+ this.i1y_1 = FileExtension_Kotlin_getInstance();
1245
+ this.j1y_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
1184
1246
  var tmp = this;
1185
- tmp.o21_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
1247
+ tmp.k1y_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
1248
+ var tmp_0 = this;
1249
+ tmp_0.l1y_1 = lazy(KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this));
1186
1250
  }
1187
- protoOf(KotlinIrEmitter).v1z = function () {
1188
- return this.j21_1;
1251
+ protoOf(KotlinIrEmitter).r1w = function () {
1252
+ return this.f1y_1;
1189
1253
  };
1190
- protoOf(KotlinIrEmitter).y1y = function () {
1191
- return this.l21_1;
1254
+ protoOf(KotlinIrEmitter).s1v = function () {
1255
+ return this.h1y_1;
1192
1256
  };
1193
- protoOf(KotlinIrEmitter).cu = function () {
1194
- return this.m21_1;
1257
+ protoOf(KotlinIrEmitter).uq = function () {
1258
+ return this.i1y_1;
1195
1259
  };
1196
- protoOf(KotlinIrEmitter).b1z = function () {
1197
- var packageName = Companion_instance.jv('community.flock.wirespec.kotlin');
1260
+ protoOf(KotlinIrEmitter).v1v = function () {
1261
+ var packageName = Companion_instance.cs('community.flock.wirespec.kotlin');
1198
1262
  var clientServer = convertClientServer(packageName);
1199
1263
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1200
1264
  var this_0 = convert(packageName);
@@ -1202,48 +1266,48 @@ protoOf(KotlinIrEmitter).b1z = function () {
1202
1266
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1203
1267
  var tmp = scope;
1204
1268
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1205
- var this_1 = scope.l1y_1;
1269
+ var this_1 = scope.f1v_1;
1206
1270
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1207
1271
  // Inline function 'kotlin.apply' call
1208
1272
  var this_2 = new TransformerBuilder();
1209
- this_2.d1m(KotlinIrEmitter$emitShared$lambda);
1210
- var tmp$ret$2 = this_2.e1m();
1211
- tmp.l1y_1 = transform(this_1, tmp$ret$2);
1273
+ this_2.w1i(KotlinIrEmitter$emitShared$lambda);
1274
+ var tmp$ret$2 = this_2.x1i();
1275
+ tmp.f1v_1 = transform(this_1, tmp$ret$2);
1212
1276
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
1213
1277
  var tmp_0 = scope;
1214
1278
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1215
1279
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1216
- var this_3 = scope.l1y_1;
1280
+ var this_3 = scope.f1v_1;
1217
1281
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1218
1282
  // Inline function 'kotlin.apply' call
1219
1283
  var this_4 = new TransformerBuilder();
1220
- this_4.d1m(KotlinIrEmitter$emitShared$lambda_0(clientServer));
1221
- var tmp$ret$7 = this_4.e1m();
1222
- tmp_0.l1y_1 = transform(this_3, tmp$ret$7);
1223
- var tmp_1 = scope.l1y_1;
1284
+ this_4.w1i(KotlinIrEmitter$emitShared$lambda_0(clientServer));
1285
+ var tmp$ret$7 = this_4.x1i();
1286
+ tmp_0.f1v_1 = transform(this_3, tmp$ret$7);
1287
+ var tmp_1 = scope.f1v_1;
1224
1288
  var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
1225
1289
  var tmp_2;
1226
- if (this.k21_1.fs_1) {
1227
- tmp_2 = wirespecShared.e1r(Companion_getInstance().u1k(packageName.mv() + wirespecShared.a1r_1.p1m()));
1290
+ if (this.g1y_1.xo_1) {
1291
+ tmp_2 = wirespecShared;
1228
1292
  } else {
1229
1293
  tmp_2 = null;
1230
1294
  }
1231
1295
  return tmp_2;
1232
1296
  };
1233
- protoOf(KotlinIrEmitter).su = function (definition, module_0, logger) {
1297
+ protoOf(KotlinIrEmitter).lr = function (definition, module_0, logger) {
1234
1298
  var file = emit_0.call(this, definition, module_0, logger);
1235
1299
  // Inline function 'kotlin.takeIf' call
1236
- var this_0 = this.n21_1;
1300
+ var this_0 = this.j1y_1;
1237
1301
  var tmp;
1238
- if (Companion_instance_1.ou(module_0)) {
1302
+ if (Companion_instance_1.hr(module_0)) {
1239
1303
  tmp = this_0;
1240
1304
  } else {
1241
1305
  tmp = null;
1242
1306
  }
1243
1307
  var tmp$ret$1 = tmp;
1244
- return placeInPackage(prependImports(file, tmp$ret$1), this.v1z(), definition);
1308
+ return placeInPackage(prependImports(file, tmp$ret$1), this.r1w(), definition);
1245
1309
  };
1246
- protoOf(KotlinIrEmitter).f1z = function (definition, module_0) {
1310
+ protoOf(KotlinIrEmitter).z1v = function (definition, module_0) {
1247
1311
  var tmp;
1248
1312
  if (definition instanceof Type) {
1249
1313
  tmp = convertToGenerator_2(definition, module_0);
@@ -1264,29 +1328,29 @@ protoOf(KotlinIrEmitter).f1z = function (definition, module_0) {
1264
1328
  }
1265
1329
  var generatorFile = tmp;
1266
1330
  var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
1267
- var generatorOwnName = definition.tu().m1() + 'Generator';
1331
+ var generatorOwnName = definition.mr().l1() + 'Generator';
1268
1332
  var tmp_0 = asSequence_0(collectCustomTypeNames(sanitized));
1269
1333
  var tmp_1 = filterNot(tmp_0, KotlinIrEmitter$emitGenerator$lambda);
1270
1334
  var tmp_2 = filterNot(tmp_1, KotlinIrEmitter$emitGenerator$lambda_0(generatorOwnName));
1271
1335
  var tmp_3 = distinct_0(map(tmp_2, KotlinIrEmitter$emitGenerator$lambda_1));
1272
1336
  var modelImports = toList(map(tmp_3, KotlinIrEmitter$emitGenerator$lambda_2(this)));
1273
- return placeInPackage_0(prependImports(sanitized, plus_2(this.n21_1, modelImports)), this.v1z(), 'generator');
1337
+ return placeInPackage_0(prependImports(sanitized, plus_2(this.j1y_1, modelImports)), this.r1w(), 'generator');
1274
1338
  };
1275
- protoOf(KotlinIrEmitter).st = function (type, module_0) {
1276
- return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
1339
+ protoOf(KotlinIrEmitter).kq = function (type, module_0) {
1340
+ return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)));
1277
1341
  };
1278
- protoOf(KotlinIrEmitter).gv = function (enum_0, module_0) {
1342
+ protoOf(KotlinIrEmitter).zr = function (enum_0, module_0) {
1279
1343
  var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
1280
1344
  return injectEnumLabelField(tmp, KotlinIrEmitter$emit$lambda(this));
1281
1345
  };
1282
- protoOf(KotlinIrEmitter).wu = function (union) {
1346
+ protoOf(KotlinIrEmitter).pr = function (union) {
1283
1347
  return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
1284
1348
  };
1285
- protoOf(KotlinIrEmitter).bv = function (refined) {
1349
+ protoOf(KotlinIrEmitter).ur = function (refined) {
1286
1350
  var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
1287
1351
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1288
1352
  // Inline function 'kotlin.collections.filterIsInstance' call
1289
- var tmp0 = file.c1r();
1353
+ var tmp0 = file.w1n();
1290
1354
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1291
1355
  var destination = ArrayList_init_$Create$_0();
1292
1356
  var _iterator__ex2g4s = tmp0.t();
@@ -1298,13 +1362,13 @@ protoOf(KotlinIrEmitter).bv = function (refined) {
1298
1362
  }
1299
1363
  var tmp0_safe_receiver = firstOrNull_0(destination);
1300
1364
  var updatedStruct = tmp0_safe_receiver == null ? null : markMembersAsOverride(tmp0_safe_receiver);
1301
- return new File(Companion_getInstance().u1k(sanitize_0(this, refined.zu_1)), listOfNotNull_0(updatedStruct));
1365
+ return new File(Companion_getInstance().n1h(sanitize_0(this, refined.sr_1)), listOfNotNull_0(updatedStruct));
1302
1366
  };
1303
- protoOf(KotlinIrEmitter).hv = function (endpoint) {
1304
- var imports = buildModelImports(endpoint, this.v1z());
1367
+ protoOf(KotlinIrEmitter).as = function (endpoint) {
1368
+ var imports = buildModelImports(endpoint, this.r1w());
1305
1369
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1306
1370
  // Inline function 'kotlin.collections.filterIsInstance' call
1307
- var tmp0 = convert_3(endpoint).c1r();
1371
+ var tmp0 = convert_3(endpoint).w1n();
1308
1372
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1309
1373
  var destination = ArrayList_init_$Create$_0();
1310
1374
  var _iterator__ex2g4s = tmp0.t();
@@ -1316,8 +1380,8 @@ protoOf(KotlinIrEmitter).hv = function (endpoint) {
1316
1380
  }
1317
1381
  var tmp$ret$2 = firstOrNull_0(destination);
1318
1382
  var endpointNamespace = ensureNotNull(tmp$ret$2);
1319
- var body = injectCompanionObject(endpointNamespace, endpoint);
1320
- var tmp = sanitizeNames(new File(Companion_getInstance().u1k(sanitize_0(this, endpoint.ct_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
1383
+ var body = injectApiAlias(injectCompanionObject(endpointNamespace, endpoint));
1384
+ var tmp = sanitizeNames(new File(Companion_getInstance().n1h(sanitize_0(this, endpoint.up_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
1321
1385
  // Inline function 'kotlin.takeIf' call
1322
1386
  var tmp_0;
1323
1387
  // Inline function 'kotlin.collections.isNotEmpty' call
@@ -1329,10 +1393,10 @@ protoOf(KotlinIrEmitter).hv = function (endpoint) {
1329
1393
  var tmp$ret$5 = tmp_0;
1330
1394
  return prependImports(tmp, tmp$ret$5);
1331
1395
  };
1332
- protoOf(KotlinIrEmitter).vu = function (channel) {
1396
+ protoOf(KotlinIrEmitter).or = function (channel) {
1333
1397
  var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
1334
1398
  // Inline function 'kotlin.takeIf' call
1335
- var this_0 = buildModelImports(channel, this.v1z());
1399
+ var this_0 = buildModelImports(channel, this.r1w());
1336
1400
  var tmp_0;
1337
1401
  // Inline function 'kotlin.collections.isNotEmpty' call
1338
1402
  if (!this_0.r()) {
@@ -1343,25 +1407,25 @@ protoOf(KotlinIrEmitter).vu = function (channel) {
1343
1407
  var tmp$ret$2 = tmp_0;
1344
1408
  return prependImports(tmp, tmp$ret$2);
1345
1409
  };
1346
- protoOf(KotlinIrEmitter).e1z = function (endpoint) {
1347
- var imports = buildModelImports(endpoint, this.v1z());
1348
- var endpointImport = import_0(this.v1z().kv_1 + '.endpoint', endpoint.ct_1.m1());
1410
+ protoOf(KotlinIrEmitter).y1v = function (endpoint) {
1411
+ var imports = buildModelImports(endpoint, this.r1w());
1412
+ var endpointImport = import_0(this.r1w().ds_1 + '.endpoint', endpoint.up_1.l1());
1349
1413
  var file = sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this));
1350
- var subPackageName = plus_0(this.v1z(), 'client');
1351
- var tmp = Companion_getInstance().u1k(subPackageName.mv() + file.a1r_1.b1q());
1414
+ var subPackageName = plus_0(this.r1w(), 'client');
1415
+ var tmp = Companion_getInstance().n1h(subPackageName.fs() + file.u1n_1.y1i());
1352
1416
  // Inline function 'kotlin.collections.buildList' call
1353
1417
  // Inline function 'kotlin.collections.buildListInternal' call
1354
1418
  // Inline function 'kotlin.apply' call
1355
1419
  var this_0 = ArrayList_init_$Create$_0();
1356
- this_0.x(new Package(subPackageName.kv_1));
1357
- this_0.e1(this.n21_1);
1358
- this_0.e1(imports);
1420
+ this_0.x(new Package(subPackageName.ds_1));
1421
+ this_0.f1(this.j1y_1);
1422
+ this_0.f1(imports);
1359
1423
  this_0.x(endpointImport);
1360
- this_0.e1(file.b1r_1);
1361
- var tmp$ret$3 = this_0.p5();
1424
+ this_0.f1(file.v1n_1);
1425
+ var tmp$ret$3 = this_0.o5();
1362
1426
  return new File(tmp, tmp$ret$3);
1363
1427
  };
1364
- protoOf(KotlinIrEmitter).c1z = function (endpoints, logger) {
1428
+ protoOf(KotlinIrEmitter).w1v = function (endpoints, logger) {
1365
1429
  // Inline function 'kotlin.collections.flatMap' call
1366
1430
  // Inline function 'kotlin.collections.flatMapTo' call
1367
1431
  var destination = ArrayList_init_$Create$_0();
@@ -1377,7 +1441,7 @@ protoOf(KotlinIrEmitter).c1z = function (endpoints, logger) {
1377
1441
  var _iterator__ex2g4s_0 = destination.t();
1378
1442
  while (_iterator__ex2g4s_0.u()) {
1379
1443
  var e = _iterator__ex2g4s_0.v();
1380
- var key = e.iy_1;
1444
+ var key = e.bv_1;
1381
1445
  if (set.x(key)) {
1382
1446
  list_0.x(e);
1383
1447
  }
@@ -1388,7 +1452,7 @@ protoOf(KotlinIrEmitter).c1z = function (endpoints, logger) {
1388
1452
  var _iterator__ex2g4s_1 = list_0.t();
1389
1453
  while (_iterator__ex2g4s_1.u()) {
1390
1454
  var item = _iterator__ex2g4s_1.v();
1391
- var tmp$ret$5 = import_0(this.v1z().kv_1 + '.model', item.iy_1);
1455
+ var tmp$ret$5 = import_0(this.r1w().ds_1 + '.model', item.bv_1);
1392
1456
  destination_0.x(tmp$ret$5);
1393
1457
  }
1394
1458
  var imports = destination_0;
@@ -1398,7 +1462,7 @@ protoOf(KotlinIrEmitter).c1z = function (endpoints, logger) {
1398
1462
  var _iterator__ex2g4s_2 = endpoints.t();
1399
1463
  while (_iterator__ex2g4s_2.u()) {
1400
1464
  var item_0 = _iterator__ex2g4s_2.v();
1401
- var tmp$ret$8 = import_0(this.v1z().kv_1 + '.endpoint', item_0.ct_1.m1());
1465
+ var tmp$ret$8 = import_0(this.r1w().ds_1 + '.endpoint', item_0.up_1.l1());
1402
1466
  destination_1.x(tmp$ret$8);
1403
1467
  }
1404
1468
  var endpointImports = destination_1;
@@ -1408,22 +1472,22 @@ protoOf(KotlinIrEmitter).c1z = function (endpoints, logger) {
1408
1472
  var _iterator__ex2g4s_3 = endpoints.t();
1409
1473
  while (_iterator__ex2g4s_3.u()) {
1410
1474
  var item_1 = _iterator__ex2g4s_3.v();
1411
- var tmp$ret$11 = import_0(this.v1z().kv_1 + '.client', item_1.ct_1.m1() + 'Client');
1475
+ var tmp$ret$11 = import_0(this.r1w().ds_1 + '.client', item_1.up_1.l1() + 'Client');
1412
1476
  destination_2.x(tmp$ret$11);
1413
1477
  }
1414
1478
  var clientImports = destination_2;
1415
1479
  var allImports = plus_2(plus_2(imports, endpointImports), clientImports);
1416
1480
  var file = sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this));
1417
- var tmp = Companion_getInstance().u1k(this.v1z().mv() + file.a1r_1.b1q());
1481
+ var tmp = Companion_getInstance().n1h(this.r1w().fs() + file.u1n_1.y1i());
1418
1482
  // Inline function 'kotlin.collections.buildList' call
1419
1483
  // Inline function 'kotlin.collections.buildListInternal' call
1420
1484
  // Inline function 'kotlin.apply' call
1421
1485
  var this_0 = ArrayList_init_$Create$_0();
1422
- this_0.x(new Package(this.v1z().kv_1));
1423
- this_0.e1(this.n21_1);
1424
- this_0.e1(allImports);
1425
- this_0.e1(file.b1r_1);
1426
- var tmp$ret$17 = this_0.p5();
1486
+ this_0.x(new Package(this.r1w().ds_1));
1487
+ this_0.f1(this.j1y_1);
1488
+ this_0.f1(allImports);
1489
+ this_0.f1(file.v1n_1);
1490
+ var tmp$ret$17 = this_0.o5();
1427
1491
  return new File(tmp, tmp$ret$17);
1428
1492
  };
1429
1493
  function buildModelImports(_this__u8e3s4, packageName) {
@@ -1434,7 +1498,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
1434
1498
  var _iterator__ex2g4s = this_0.t();
1435
1499
  while (_iterator__ex2g4s.u()) {
1436
1500
  var e = _iterator__ex2g4s.v();
1437
- var key = e.iy_1;
1501
+ var key = e.bv_1;
1438
1502
  if (set.x(key)) {
1439
1503
  list.x(e);
1440
1504
  }
@@ -1445,11 +1509,28 @@ function buildModelImports(_this__u8e3s4, packageName) {
1445
1509
  var _iterator__ex2g4s_0 = list.t();
1446
1510
  while (_iterator__ex2g4s_0.u()) {
1447
1511
  var item = _iterator__ex2g4s_0.v();
1448
- var tmp$ret$2 = import_0(packageName.kv_1 + '.model', item.iy_1);
1512
+ var tmp$ret$2 = import_0(packageName.ds_1 + '.model', Companion_getInstance().n1h(item.bv_1).y1i());
1449
1513
  destination.x(tmp$ret$2);
1450
1514
  }
1451
1515
  return destination;
1452
1516
  }
1517
+ function injectApiAlias(_this__u8e3s4) {
1518
+ // Inline function 'community.flock.wirespec.ir.core.transform' call
1519
+ var scope = new TransformScope(_this__u8e3s4);
1520
+ // Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
1521
+ var tmp = scope;
1522
+ // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1523
+ // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1524
+ var this_0 = scope.f1v_1;
1525
+ // Inline function 'community.flock.wirespec.ir.core.transformer' call
1526
+ // Inline function 'kotlin.apply' call
1527
+ var this_1 = new TransformerBuilder();
1528
+ this_1.w1i(injectApiAlias$lambda);
1529
+ var tmp$ret$2 = this_1.x1i();
1530
+ tmp.f1v_1 = transform(this_0, tmp$ret$2);
1531
+ var tmp_0 = scope.f1v_1;
1532
+ return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1533
+ }
1453
1534
  function injectCompanionObject(_this__u8e3s4, endpoint) {
1454
1535
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1455
1536
  var scope = new TransformScope(_this__u8e3s4);
@@ -1457,31 +1538,49 @@ function injectCompanionObject(_this__u8e3s4, endpoint) {
1457
1538
  var tmp = scope;
1458
1539
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1459
1540
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1460
- var this_0 = scope.l1y_1;
1541
+ var this_0 = scope.f1v_1;
1461
1542
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1462
1543
  // Inline function 'kotlin.apply' call
1463
1544
  var this_1 = new TransformerBuilder();
1464
- this_1.d1m(injectCompanionObject$lambda(endpoint));
1465
- var tmp$ret$2 = this_1.e1m();
1466
- tmp.l1y_1 = transform(this_0, tmp$ret$2);
1467
- var tmp_0 = scope.l1y_1;
1545
+ this_1.w1i(injectCompanionObject$lambda(endpoint));
1546
+ var tmp$ret$2 = this_1.x1i();
1547
+ tmp.f1v_1 = transform(this_0, tmp$ret$2);
1548
+ var tmp_0 = scope.f1v_1;
1468
1549
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1469
1550
  }
1470
1551
  function buildCompanionObject(endpoint) {
1471
- var pathTemplate = '/' + joinToString(endpoint.et_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
1552
+ var pathTemplate = '/' + joinToString(endpoint.wp_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
1472
1553
  // Inline function 'kotlin.let' call
1473
- var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.dt_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
1554
+ var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.vp_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
1474
1555
  return raw(p0);
1475
1556
  }
1557
+ function injectApiAlias$lambda(element, transformer) {
1558
+ var tmp;
1559
+ if (element instanceof Namespace) {
1560
+ var injected = listOf(raw('val api = Handler'));
1561
+ var tmp_0;
1562
+ // Inline function 'kotlin.collections.isNotEmpty' call
1563
+ if (!injected.r()) {
1564
+ tmp_0 = withElements(element, plus_2(element.w1n(), injected));
1565
+ } else {
1566
+ tmp_0 = element;
1567
+ }
1568
+ tmp = tmp_0;
1569
+ } else {
1570
+ tmp = element;
1571
+ }
1572
+ var transformed = tmp;
1573
+ return transformChildren_0(transformed, transformer);
1574
+ }
1476
1575
  function injectCompanionObject$lambda($endpoint) {
1477
1576
  return function (element, transformer) {
1478
1577
  var tmp;
1479
1578
  if (element instanceof Interface) {
1480
- var injected = element.t1r_1.equals(Companion_getInstance().u1k('Handler')) ? listOf(buildCompanionObject($endpoint)) : emptyList();
1579
+ var injected = element.o1o_1.equals(Companion_getInstance().n1h('Handler')) ? listOf(buildCompanionObject($endpoint)) : emptyList();
1481
1580
  var tmp_0;
1482
1581
  // Inline function 'kotlin.collections.isNotEmpty' call
1483
1582
  if (!injected.r()) {
1484
- tmp_0 = withElements(element, plus_2(element.c1r(), injected));
1583
+ tmp_0 = withElements(element, plus_2(element.w1n(), injected));
1485
1584
  } else {
1486
1585
  tmp_0 = element;
1487
1586
  }
@@ -1496,10 +1595,10 @@ function injectCompanionObject$lambda($endpoint) {
1496
1595
  function buildCompanionObject$lambda(it) {
1497
1596
  var tmp;
1498
1597
  if (it instanceof Literal) {
1499
- tmp = it.fu_1;
1598
+ tmp = it.xq_1;
1500
1599
  } else {
1501
1600
  if (it instanceof Param) {
1502
- tmp = '{' + it.jt_1.m1() + '}';
1601
+ tmp = '{' + it.bq_1.l1() + '}';
1503
1602
  } else {
1504
1603
  noWhenBranchMatchedException();
1505
1604
  }
@@ -1510,8 +1609,8 @@ function KotlinRefinedTypeDefinitionEmitter() {
1510
1609
  }
1511
1610
  function KotlinShared() {
1512
1611
  KotlinShared_instance = this;
1513
- this.c21_1 = 'community.flock.wirespec.kotlin';
1514
- this.d21_1 = trimMargin('\n |package ' + this.c21_1 + '\n |\n |import kotlin.reflect.KType\n |\n |object Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { val label: String }\n |' + Spacer_instance.toString() + 'interface Endpoint\n |' + Spacer_instance.toString() + 'interface Refined<T> { val value: T }\n |' + Spacer_instance.toString() + 'interface Path\n |' + Spacer_instance.toString() + 'interface Queries\n |' + Spacer_instance.toString() + 'interface Headers\n |' + Spacer_instance.toString() + 'interface Handler\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.toString() + 'fun from(request: RawRequest): Req \n |' + Spacer_instance.toString() + 'fun to(response: Res): RawResponse\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.ov(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.ov(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.ov(2) + 'val pathTemplate: String\n |' + Spacer_instance.ov(2) + 'val method: String\n |' + Spacer_instance.ov(2) + 'fun client(serialization: Serialization): ClientEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.ov(2) + 'val pathTemplate: String\n |' + Spacer_instance.ov(2) + 'val method: String\n |' + Spacer_instance.ov(2) + 'fun server(serialization: Serialization): ServerEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T : Any> { val path: Path; val method: Method; val queries: Queries; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Response<T : Any> { val status: Int; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Serialization : Serializer, Deserializer\n |' + Spacer_instance.toString() + 'interface Serializer : BodySerializer, PathSerializer, ParamSerializer\n |' + Spacer_instance.toString() + 'interface Deserializer : BodyDeserializer, PathDeserializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerialization : BodySerializer, BodyDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerializer { fun <T : Any> serializeBody(t: T, kType: KType): ByteArray }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { fun <T : Any> deserializeBody(raw: ByteArray, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface PathSerialization : PathSerializer, PathDeserializer\n |' + Spacer_instance.toString() + 'interface PathSerializer { fun <T : Any> serializePath(t: T, kType: KType): String }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { fun <T : Any> deserializePath(raw: String, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface ParamSerialization : ParamSerializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface ParamSerializer { fun <T : Any> serializeParam(value: T, kType: KType): List<String> }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { fun <T : Any> deserializeParam(values: List<String>, kType: KType): T }\n |' + Spacer_instance.toString() + 'data class RawRequest(val method: String, val path: List<String>, val queries: Map<String, List<String>>, val headers: Map<String, List<String>>, val body: ByteArray?) \n |' + Spacer_instance.toString() + 'data class RawResponse(val statusCode: Int, val headers: Map<String, List<String>>, val body: ByteArray?)\n |}\n ');
1612
+ this.y1x_1 = 'community.flock.wirespec.kotlin';
1613
+ this.z1x_1 = trimMargin('\n |package ' + this.y1x_1 + '\n |\n |import kotlin.reflect.KType\n |\n |object Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { val label: String }\n |' + Spacer_instance.toString() + 'interface Endpoint\n |' + Spacer_instance.toString() + 'interface Refined<T> {\n |' + Spacer_instance.hs(2) + 'val value: T\n |' + Spacer_instance.hs(2) + 'fun validate(): Boolean\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Path\n |' + Spacer_instance.toString() + 'interface Queries\n |' + Spacer_instance.toString() + 'interface Headers\n |' + Spacer_instance.toString() + 'interface Handler\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.toString() + 'fun from(request: RawRequest): Req \n |' + Spacer_instance.toString() + 'fun to(response: Res): RawResponse\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.hs(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.hs(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.hs(2) + 'val pathTemplate: String\n |' + Spacer_instance.hs(2) + 'val method: String\n |' + Spacer_instance.hs(2) + 'fun client(serialization: Serialization): ClientEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.hs(2) + 'val pathTemplate: String\n |' + Spacer_instance.hs(2) + 'val method: String\n |' + Spacer_instance.hs(2) + 'fun server(serialization: Serialization): ServerEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T : Any> { val path: Path; val method: Method; val queries: Queries; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Response<T : Any> { val status: Int; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Serialization : Serializer, Deserializer\n |' + Spacer_instance.toString() + 'interface Serializer : BodySerializer, PathSerializer, ParamSerializer\n |' + Spacer_instance.toString() + 'interface Deserializer : BodyDeserializer, PathDeserializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerialization : BodySerializer, BodyDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerializer { fun <T : Any> serializeBody(t: T, kType: KType): ByteArray }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { fun <T : Any> deserializeBody(raw: ByteArray, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface PathSerialization : PathSerializer, PathDeserializer\n |' + Spacer_instance.toString() + 'interface PathSerializer { fun <T : Any> serializePath(t: T, kType: KType): String }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { fun <T : Any> deserializePath(raw: String, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface ParamSerialization : ParamSerializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface ParamSerializer { fun <T : Any> serializeParam(value: T, kType: KType): List<String> }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { fun <T : Any> deserializeParam(values: List<String>, kType: KType): T }\n |' + Spacer_instance.toString() + 'data class RawRequest(val method: String, val path: List<String>, val queries: Map<String, List<String>>, val headers: Map<String, List<String>>, val body: ByteArray?) \n |' + Spacer_instance.toString() + 'data class RawResponse(val statusCode: Int, val headers: Map<String, List<String>>, val body: ByteArray?)\n |}\n ');
1515
1614
  }
1516
1615
  protoOf(KotlinShared).toString = function () {
1517
1616
  return 'KotlinShared';
@@ -1534,12 +1633,12 @@ function KotlinShared_getInstance() {
1534
1633
  }
1535
1634
  function KotlinTypeDefinitionEmitter$emit$lambda(this$0) {
1536
1635
  return function (it) {
1537
- return this$0.vt(it);
1636
+ return this$0.nq(it);
1538
1637
  };
1539
1638
  }
1540
1639
  function KotlinTypeDefinitionEmitter$emit$lambda_0(this$0) {
1541
1640
  return function (it) {
1542
- return Spacer_instance.toString() + 'val ' + this$0.ut(it) + ',';
1641
+ return Spacer_instance.toString() + 'val ' + this$0.mq(it) + ',';
1543
1642
  };
1544
1643
  }
1545
1644
  function KotlinTypeDefinitionEmitter() {
@@ -1547,31 +1646,31 @@ function KotlinTypeDefinitionEmitter() {
1547
1646
  function KotlinUnionDefinitionEmitter() {
1548
1647
  }
1549
1648
  //region block: post-declaration
1550
- protoOf(KotlinEmitter).st = emit_4;
1551
- protoOf(KotlinEmitter).tt = emit_5;
1552
- protoOf(KotlinEmitter).ut = emit_6;
1553
- protoOf(KotlinEmitter).vt = emit_7;
1554
- protoOf(KotlinEmitter).wt = emit_8;
1555
- protoOf(KotlinEmitter).gv = emit_10;
1556
- protoOf(KotlinEmitter).bv = emit_15;
1557
- protoOf(KotlinEmitter).hv = emit_12;
1558
- protoOf(KotlinEmitter).wu = emit_11;
1559
- protoOf(KotlinEmitter).uu = emit_3;
1560
- protoOf(KotlinEmitter).vu = emit_9;
1561
- protoOf(KotlinEmitter).i20 = emit_13;
1562
- protoOf(KotlinEmitter).j20 = emit_14;
1563
- protoOf(KotlinEmitter).iv = emitValidator;
1564
- protoOf(KotlinEmitter).v20 = sanitize;
1565
- protoOf(KotlinEmitter).k20 = sanitizeFirstIsDigit;
1566
- protoOf(KotlinEmitter).l20 = sanitizeKeywords;
1567
- protoOf(KotlinEmitter).m20 = emitHandleFunction;
1568
- protoOf(KotlinEmitter).e21 = emitRequestHeaders;
1569
- protoOf(KotlinEmitter).f21 = emitQueries;
1570
- protoOf(KotlinEmitter).g21 = emitBody;
1571
- protoOf(KotlinEmitter).h21 = emitHeaders;
1572
- protoOf(KotlinIrEmitter).mr = emit_1;
1573
- protoOf(KotlinIrEmitter).a1z = emit_2;
1574
- protoOf(KotlinIrEmitter).d1z = beforeGenerate;
1649
+ protoOf(KotlinEmitter).kq = emit_4;
1650
+ protoOf(KotlinEmitter).lq = emit_5;
1651
+ protoOf(KotlinEmitter).mq = emit_6;
1652
+ protoOf(KotlinEmitter).nq = emit_7;
1653
+ protoOf(KotlinEmitter).oq = emit_8;
1654
+ protoOf(KotlinEmitter).zr = emit_11;
1655
+ protoOf(KotlinEmitter).ur = emit_10;
1656
+ protoOf(KotlinEmitter).as = emit_13;
1657
+ protoOf(KotlinEmitter).pr = emit_12;
1658
+ protoOf(KotlinEmitter).nr = emit_3;
1659
+ protoOf(KotlinEmitter).or = emit_9;
1660
+ protoOf(KotlinEmitter).e1x = emit_14;
1661
+ protoOf(KotlinEmitter).f1x = emit_15;
1662
+ protoOf(KotlinEmitter).bs = emitValidator;
1663
+ protoOf(KotlinEmitter).r1x = sanitize;
1664
+ protoOf(KotlinEmitter).g1x = sanitizeFirstIsDigit;
1665
+ protoOf(KotlinEmitter).h1x = sanitizeKeywords;
1666
+ protoOf(KotlinEmitter).i1x = emitHandleFunction;
1667
+ protoOf(KotlinEmitter).a1y = emitRequestHeaders;
1668
+ protoOf(KotlinEmitter).b1y = emitQueries;
1669
+ protoOf(KotlinEmitter).c1y = emitBody;
1670
+ protoOf(KotlinEmitter).d1y = emitHeaders;
1671
+ protoOf(KotlinIrEmitter).eo = emit_1;
1672
+ protoOf(KotlinIrEmitter).u1v = emit_2;
1673
+ protoOf(KotlinIrEmitter).x1v = beforeGenerate;
1575
1674
  //endregion
1576
1675
  //region block: exports
1577
1676
  export {