@sphereon/idk-lib-did-methods-web 0.25.0-SNAPSHOT-build-8529934

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.
@@ -0,0 +1,4627 @@
1
+ import {
2
+ protoOf180f3jzyo7rfj as protoOf,
3
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
4
+ VOID3gxj6tk5isa35 as VOID,
5
+ abs22kdeprm0tm5i as abs,
6
+ Unit_instancev9v8hjid95df as Unit_instance,
7
+ equals2au1ep9vhcato as equals,
8
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
9
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
10
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
11
+ toLongkk4waq8msp1k as toLong,
12
+ fromInt2ii0rejb1w62w as fromInt,
13
+ NotImplementedErrorfzlkpv14xxr8 as NotImplementedError,
14
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
15
+ ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
16
+ IllegalArgumentException_init_$Create$i4126l9nkbuo as IllegalArgumentException_init_$Create$,
17
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
18
+ Paire9pteg33gng7 as Pair,
19
+ toMap1vec9topfei08 as toMap,
20
+ toMutableMapr5f3w62lv8sk as toMutableMap,
21
+ toMutableList20rdgwi7d3cwi as toMutableList,
22
+ lazy2hsh8ze7j6ikd as lazy,
23
+ KProperty1ca4yb4wlo496 as KProperty1,
24
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
25
+ NoSuchElementException_init_$Create$2qpmbgrjh4thr as NoSuchElementException_init_$Create$,
26
+ startsWith26w8qjqapeeq6 as startsWith,
27
+ split2bvyvnrlcifjv as split,
28
+ toIntOrNull3w2d066r9pvwm as toIntOrNull,
29
+ defineProp3ur6h3slcvq4x as defineProp,
30
+ KtMap140uvy3s5zad8 as KtMap,
31
+ isInterface3d6p8outrmvmk as isInterface,
32
+ mutableMapOfk2y3zt1azl40 as mutableMapOf,
33
+ copyToArray2j022khrow2yi as copyToArray,
34
+ noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
35
+ numberToLong2pakxeg38estk as numberToLong,
36
+ isNumberiramasdbon0i as isNumber,
37
+ KtList3hktaavzmj137 as KtList,
38
+ isByteArray4nnzfn1x4o3w as isByteArray,
39
+ toString30pk9tzaqopn as toString,
40
+ KtMutableMap1kqeifoi36kpz as KtMutableMap,
41
+ KtMutableList1beimitadwkna as KtMutableList,
42
+ numberToDouble210hrknaofnhf as numberToDouble,
43
+ isInfinite12nl8hpz1hbp2 as isInfinite,
44
+ isNaNymqb93xtq8w8 as isNaN_0,
45
+ _Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
46
+ contains2el4s70rdq4ld as contains,
47
+ toString1pkumu07cwy4m as toString_0,
48
+ contentToString3ujacv8hqfipd as contentToString,
49
+ contentEqualsaf55p28mnw74 as contentEquals,
50
+ getStringHashCode26igk1bx568vk as getStringHashCode,
51
+ contentHashCode2i020q5tbeh2s as contentHashCode,
52
+ ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$_0,
53
+ getOrNull1go7ef9ldk0df as getOrNull,
54
+ ensureNotNull1e947j3ixpazm as ensureNotNull,
55
+ toByte4i43936u611k as toByte,
56
+ getKClass3t8tygqu4lcxf as getKClass,
57
+ LazyThreadSafetyMode_PUBLICATION_getInstance3qslfm3vqg6y3 as LazyThreadSafetyMode_PUBLICATION_getInstance,
58
+ lazy1261dae0bgscp as lazy_0,
59
+ contentEquals1cdp6c846cfdi as contentEquals_0,
60
+ contentHashCode25jw6rgkgywwr as contentHashCode_0,
61
+ StringBuildermazzzhj6kkai as StringBuilder,
62
+ convertToInty04h231mmjoh as convertToInt,
63
+ objectCreate1ve4bgxiu4x98 as objectCreate,
64
+ throwUninitializedPropertyAccessException14fok093f3k3t as throwUninitializedPropertyAccessException,
65
+ IllegalStateException_init_$Create$1h4bcfod21ri0 as IllegalStateException_init_$Create$,
66
+ getKClassFromExpression348iqjl4fnx2f as getKClassFromExpression,
67
+ _ULong___init__impl__c78o9k4z3cjzifecv6 as _ULong___init__impl__c78o9k,
68
+ _UByte___init__impl__g9hnc43bwrjlqz9k9id as _UByte___init__impl__g9hnc4,
69
+ _UInt___init__impl__l7qpdl2xbmh7to8lpd7 as _UInt___init__impl__l7qpdl,
70
+ _UInt___get_data__impl__f0vqqw2j5mttix8w0l0 as _UInt___get_data__impl__f0vqqw,
71
+ _ULong___get_data__impl__fggpzb2bbucljk081qt as _ULong___get_data__impl__fggpzb,
72
+ ulongCompare29yg6v52hxi4l as ulongCompare,
73
+ shiftLeft3tsh2sstjchzn as shiftLeft,
74
+ _UByte___get_data__impl__jof9qr23gcv767stjfh as _UByte___get_data__impl__jof9qr,
75
+ convertToByte2t4hntblnhq2k as convertToByte,
76
+ to2cs3ny02qtbcb as to,
77
+ mapOf1xd03cq9cnmy8 as mapOf,
78
+ emptyList1g2z5xcrvp2zy as emptyList,
79
+ mapOf2zpbbmyqk8xpf as mapOf_0,
80
+ toRawBits2035dtuolth0v as toRawBits,
81
+ toRawBits3bthuu8natj5y as toRawBits_0,
82
+ shiftRight2gqph14wydb8s as shiftRight,
83
+ toCharArray32huqyw9tt7kx as toCharArray,
84
+ negate13xrbakfwasjy as negate,
85
+ hashCodeq5arwsb9dgti as hashCode,
86
+ isArray1hxjqtqy632bc as isArray,
87
+ ULong3f9k7s38t3rfp as ULong,
88
+ UInt1hthisrv6cndi as UInt,
89
+ Enum3alwj03lh1n41 as Enum,
90
+ numberRangeToNumber25vse2rgp6rs8 as numberRangeToNumber,
91
+ ClosedRangehokgr73im9z3 as ClosedRange,
92
+ contains2c50nlxg7en7o as contains_0,
93
+ LinkedHashMap_init_$Create$2tibire69n089 as LinkedHashMap_init_$Create$,
94
+ mapCapacity1h45rc3eh9p2l as mapCapacity,
95
+ coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
96
+ LinkedHashMap_init_$Create$1gzy1x4a46gd4 as LinkedHashMap_init_$Create$_0,
97
+ getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,
98
+ encodeToByteArray1onwao0uakjfh as encodeToByteArray,
99
+ emptySetcxexqki71qfa as emptySet,
100
+ IllegalArgumentException_init_$Create$6m98491a698m as IllegalArgumentException_init_$Create$_0,
101
+ StringBuilder_init_$Create$3ds9zx2kx9u4d as StringBuilder_init_$Create$,
102
+ charSequenceLength3278n89t01tmv as charSequenceLength,
103
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
104
+ hexToByteArrayj26yk4970vc7 as hexToByteArray,
105
+ contains3ue2qo8xhmpf1 as contains_1,
106
+ compareTo3ankvs086tmwq as compareTo,
107
+ THROW_IAE23kobfj9wdoxr as THROW_IAE,
108
+ enumEntries20mr21zbe3az4 as enumEntries,
109
+ } from '../kotlin-kotlin-stdlib.mjs';
110
+ import {
111
+ SerializerFactory1qv9hivitncuv as SerializerFactory,
112
+ STRING_getInstance3lkmlozu5h7cs as STRING_getInstance,
113
+ PrimitiveSerialDescriptor3egfp53lutxj2 as PrimitiveSerialDescriptor,
114
+ KSerializerzf77vz1967fq as KSerializer,
115
+ SerializableWithd2dap36updxd as SerializableWith,
116
+ SealedClassSerializer_init_$Create$2e46e27g2dau6 as SealedClassSerializer_init_$Create$,
117
+ PluginGeneratedSerialDescriptorqdzeg5asqhfg as PluginGeneratedSerialDescriptor,
118
+ UnknownFieldException_init_$Create$29petggjjaptk as UnknownFieldException_init_$Create$,
119
+ StringSerializer_getInstance11v9md0a7d9yk as StringSerializer_getInstance,
120
+ typeParametersSerializers2likxjr48tr7y as typeParametersSerializers,
121
+ GeneratedSerializer1f7t7hssdd2ws as GeneratedSerializer,
122
+ throwMissingFieldException2cmke0v3ynf14 as throwMissingFieldException,
123
+ createSimpleEnumSerializer2guioz11kk1m0 as createSimpleEnumSerializer,
124
+ SerializersModuleBuilderfxsfdohcdipc as SerializersModuleBuilder,
125
+ PolymorphicSerializer_init_$Create$3erfb6848wfb3 as PolymorphicSerializer_init_$Create$,
126
+ } from '../kotlinx-serialization-kotlinx-serialization-core.mjs';
127
+ import {
128
+ get_long3gjrkvy7fxjbp as get_long,
129
+ get_float1xtaobzj8js8m as get_float,
130
+ get_double1785hcxaminy4 as get_double,
131
+ get_boolean37ml8jnzy6rg3 as get_boolean,
132
+ JsonObjectee06ihoeeiqj as JsonObject,
133
+ JsonArray2urf8ey7u44sd as JsonArray,
134
+ JsonPrimitive3ttzjh2ft5dnx as JsonPrimitive,
135
+ get_jsonPrimitivez17tyd5rw1ql as get_jsonPrimitive,
136
+ get_jsonArray18sglwhl4pclz as get_jsonArray,
137
+ get_jsonObject2u4z2ch1uuca9 as get_jsonObject,
138
+ JsonNull_getInstancehlive1cpt4pr as JsonNull_getInstance,
139
+ JsonNull2liwjj96vm0w2 as JsonNull,
140
+ JsonPrimitive1xkjzc5d7ihuv as JsonPrimitive_0,
141
+ JsonPrimitiveolttw629wj53 as JsonPrimitive_1,
142
+ JsonPrimitive2fp8648nd60dn as JsonPrimitive_2,
143
+ JsonElementSerializer_getInstance78doow9tocv6 as JsonElementSerializer_getInstance,
144
+ JsonPrimitive2bieimc5ppopv as JsonPrimitive_3,
145
+ Jsonsmkyu9xjl7fv as Json,
146
+ } from '../kotlinx-serialization-kotlinx-serialization-json.mjs';
147
+ import {
148
+ decodeFrom1073q8kh3s8td as decodeFrom,
149
+ Encoding_BASE64URL_getInstance3007plr09ildu as Encoding_BASE64URL_getInstance,
150
+ stringify34zhnmfghbpa3 as stringify,
151
+ encodeTor9bkrvfg8b4d as encodeTo,
152
+ Encoding_BASE64_getInstance1xh6pw2c537bw as Encoding_BASE64_getInstance,
153
+ Companion_instance5oxdm74ajkut as Companion_instance,
154
+ Companion_getInstance30e4zwksmxd8c as Companion_getInstance,
155
+ toKotlin2s7lqlzr80lb7 as toKotlin,
156
+ decodeFromHex2g869l1sb6kd2 as decodeFromHex,
157
+ appendUInt8re067py6h8wc as appendUInt8,
158
+ appendUInt641vfseodaf624a as appendUInt64,
159
+ appendUInt321o2oja5gonu7g as appendUInt32,
160
+ appendUInt161gvzy2qtzy6su as appendUInt16,
161
+ Messagewe9y1c82z9xg as Message,
162
+ IdkError2sgfqzhbgqgzo as IdkError,
163
+ Severity_ERROR_getInstance9py2fxzng5v1 as Severity_ERROR_getInstance,
164
+ Encoding_HEX_getInstance3cjbki6wjz0rh as Encoding_HEX_getInstance,
165
+ decodeFromBase64Url3ffgzyiduv5ck as decodeFromBase64Url,
166
+ decodeFromBase6490f19dqrq6mr as decodeFromBase64,
167
+ Encoding_UTF8_getInstance79x1u1osdb4y as Encoding_UTF8_getInstance,
168
+ } from './idk-lib-core-api-public.mjs';
169
+ import { toInstant2ixtmlbww6j32 as toInstant } from '../Kotlin-DateTime-library-kotlinx-datetime.mjs';
170
+ import { ByteStringBuilder1h7wixkupnryt as ByteStringBuilder } from '../kotlinx-io-kotlinx-io-bytestring.mjs';
171
+ //region block: imports
172
+ var imul = Math.imul;
173
+ //endregion
174
+ //region block: pre-declaration
175
+ function toJson(includeCDDL, $super) {
176
+ includeCDDL = includeCDDL === VOID ? false : includeCDDL;
177
+ return $super === VOID ? this.v2r(includeCDDL) : $super.v2r.call(this, includeCDDL);
178
+ }
179
+ initMetadataForInterface(HasCborJsonRepresentation, 'HasCborJsonRepresentation');
180
+ initMetadataForClass(CborBaseItem, 'CborBaseItem', VOID, VOID, VOID, VOID, VOID, {0: Companion_getInstance_2});
181
+ initMetadataForClass(CborItem, 'CborItem', VOID, CborBaseItem, [HasCborJsonRepresentation]);
182
+ initMetadataForClass(CborNumber, 'CborNumber', VOID, CborItem);
183
+ initMetadataForClass(AbstractCborInt, 'AbstractCborInt', VOID, CborNumber);
184
+ initMetadataForClass(CborInt, 'CborInt', VOID, AbstractCborInt);
185
+ initMetadataForCompanion(Companion, VOID, [SerializerFactory]);
186
+ function toTag(additionalInfo, $super) {
187
+ additionalInfo = additionalInfo === VOID ? null : additionalInfo;
188
+ return $super === VOID ? this.j2s(additionalInfo) : $super.j2s.call(this, additionalInfo);
189
+ }
190
+ function newCborItemFromJson(value, cddl, $super) {
191
+ cddl = cddl === VOID ? any_getInstance() : cddl;
192
+ return $super === VOID ? this.k2s(value, cddl) : $super.k2s.call(this, value, cddl);
193
+ }
194
+ initMetadataForInterface(CDDLType, 'CDDLType', VOID, VOID, VOID, VOID, VOID, {0: CDDLSerializer_getInstance});
195
+ initMetadataForClass(CDDL, 'CDDL', VOID, VOID, [CDDLType], VOID, VOID, {0: CDDLSerializer_getInstance});
196
+ initMetadataForObject(tstr, 'tstr', VOID, CDDL);
197
+ initMetadataForObject(uint, 'uint', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
198
+ initMetadataForObject(nint, 'nint', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
199
+ initMetadataForObject(int, 'int', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
200
+ initMetadataForObject(bstr, 'bstr', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
201
+ initMetadataForObject(bstr_indef_length, 'bstr_indef_length', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
202
+ initMetadataForObject(bytes, 'bytes', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
203
+ initMetadataForObject(tstr_indef_length, 'tstr_indef_length', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
204
+ initMetadataForObject(text, 'text', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
205
+ initMetadataForObject(tdate, 'tdate', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
206
+ initMetadataForObject(full_date, 'full_date', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
207
+ initMetadataForObject(time, 'time', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
208
+ initMetadataForObject(float16, 'float16', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
209
+ initMetadataForObject(float32, 'float32', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
210
+ initMetadataForObject(float64, 'float64', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
211
+ initMetadataForObject(float, 'float', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
212
+ initMetadataForObject(False, 'False', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
213
+ initMetadataForObject(True, 'True', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
214
+ initMetadataForObject(bool, 'bool', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
215
+ initMetadataForObject(nil, 'nil', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
216
+ initMetadataForObject(Null, 'Null', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
217
+ initMetadataForObject(undefined_0, 'undefined', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
218
+ initMetadataForObject(map, 'map', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
219
+ initMetadataForObject(list, 'list', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
220
+ initMetadataForObject(any, 'any', VOID, CDDL, [SerializerFactory], VOID, VOID, {0: CDDLSerializer_getInstance});
221
+ initMetadataForObject(util, 'util');
222
+ initMetadataForCompanion(Companion_0);
223
+ initMetadataForObject(CDDLSerializer, 'CDDLSerializer', VOID, VOID, [KSerializer]);
224
+ initMetadataForClass(CborAny, 'CborAny', VOID, CborItem);
225
+ initMetadataForInterface(ICborItemValueJson, 'ICborItemValueJson');
226
+ initMetadataForClass(CborArray$toJsonCborItem$1, VOID, VOID, VOID, [ICborItemValueJson]);
227
+ initMetadataForClass(CborCollectionItem, 'CborCollectionItem', VOID, CborItem);
228
+ initMetadataForClass(CborArray, 'CborArray', CborArray, CborCollectionItem);
229
+ initMetadataForCompanion(Companion_1, VOID, [SerializerFactory]);
230
+ initMetadataForClass(CborSimple, 'CborSimple', VOID, CborItem);
231
+ initMetadataForClass(CborBool, 'CborBool', VOID, CborSimple);
232
+ initMetadataForClass(CborTrue, 'CborTrue', CborTrue, CborBool);
233
+ initMetadataForClass(CborFalse, 'CborFalse', CborFalse, CborBool);
234
+ initMetadataForClass(CborBuilder, 'CborBuilder');
235
+ initMetadataForCompanion(Companion_2);
236
+ initMetadataForClass(CborByteString, 'CborByteString', VOID, CborItem);
237
+ initMetadataForClass(CborByteStringIndefLength, 'CborByteStringIndefLength', VOID, CborItem);
238
+ initMetadataForObject(CborConst, 'CborConst');
239
+ initMetadataForClass(CborTagged, 'CborTagged', VOID, CborItem);
240
+ initMetadataForClass(CborTDate, 'CborTDate', VOID, CborTagged);
241
+ initMetadataForClass(CborFullDate, 'CborFullDate', VOID, CborTagged);
242
+ initMetadataForCompanion(Companion_3);
243
+ initMetadataForClass(CborDecoderConfig, 'CborDecoderConfig', CborDecoderConfig);
244
+ initMetadataForClass(CborHexEncodedItem, 'CborHexEncodedItem', VOID, CborByteString);
245
+ initMetadataForCompanion(Companion_4);
246
+ initMetadataForClass(CborEncodedItem, 'CborEncodedItem', VOID, CborItem);
247
+ initMetadataForObject(CborError, 'CborError');
248
+ initMetadataForClass(CborFloat, 'CborFloat', VOID, CborNumber);
249
+ initMetadataForClass(CborFloat16, 'CborFloat16', VOID, CborFloat);
250
+ initMetadataForClass(CborFloat32, 'CborFloat32', VOID, CborFloat);
251
+ initMetadataForClass(CborDouble, 'CborDouble', VOID, CborItem);
252
+ initMetadataForClass(CborItem$toJsonCborItem$1, VOID, VOID, VOID, [ICborItemValueJson]);
253
+ initMetadataForInterface(ICborItemJson, 'ICborItemJson', VOID, VOID, [ICborItemValueJson]);
254
+ initMetadataForClass(CborItemJson$Companion$fromJsonPrimitive$1, VOID, VOID, VOID, [ICborItemValueJson]);
255
+ initMetadataForClass(CborItemJson$Companion$fromJsonObjectAsValueJson$1, VOID, VOID, VOID, [ICborItemJson]);
256
+ initMetadataForClass(CborItemJson$Companion$fromJsonObjectAsValueJson$2, VOID, VOID, VOID, [ICborItemValueJson]);
257
+ initMetadataForCompanion(Companion_5);
258
+ initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
259
+ initMetadataForClass(CborItemJson, 'CborItemJson', VOID, VOID, [HasCborJsonRepresentation, ICborItemJson], VOID, VOID, {0: $serializer_getInstance});
260
+ initMetadataForClass(SimpleCborBuilder, 'SimpleCborBuilder');
261
+ initMetadataForClass(CborMap$toJsonCborItem$1, VOID, VOID, VOID, [ICborItemValueJson]);
262
+ initMetadataForClass(CborMap, 'CborMap', CborMap, CborCollectionItem);
263
+ initMetadataForClass(CborNInt, 'CborNInt', VOID, AbstractCborInt);
264
+ initMetadataForClass(CborNil, 'CborNil', CborNil, CborSimple);
265
+ initMetadataForClass(CborNull, 'CborNull', CborNull, CborSimple);
266
+ initMetadataForClass(CborStringIndefLength, 'CborStringIndefLength', VOID, CborItem);
267
+ initMetadataForInterface(CborEncoder, 'CborEncoder');
268
+ function parse(bytes, config, $super) {
269
+ config = config === VOID ? Companion_getInstance_4().y2x_1 : config;
270
+ return $super === VOID ? this.k30(bytes, config) : $super.k30.call(this, bytes, config);
271
+ }
272
+ function parseWithOffset(bytes, offset, config, $super) {
273
+ config = config === VOID ? Companion_getInstance_4().y2x_1 : config;
274
+ return $super === VOID ? this.l30(bytes, offset, config) : $super.l30.call(this, bytes, offset, config);
275
+ }
276
+ initMetadataForInterface(CborParser, 'CborParser');
277
+ function render(item, options, $super) {
278
+ options = options === VOID ? emptySet() : options;
279
+ return $super === VOID ? this.m30(item, options) : $super.m30.call(this, item, options);
280
+ }
281
+ function renderEncoded(encodedItem, options, $super) {
282
+ options = options === VOID ? emptySet() : options;
283
+ return $super === VOID ? this.n30(encodedItem, options) : $super.n30.call(this, encodedItem, options);
284
+ }
285
+ initMetadataForInterface(CborDiagnostics, 'CborDiagnostics');
286
+ initMetadataForCompanion(Companion_6);
287
+ initMetadataForClass(CborString, 'CborString', VOID, CborItem);
288
+ initMetadataForCompanion(Companion_7);
289
+ initMetadataForClass(CborTime, 'CborTime', VOID, CborTagged);
290
+ initMetadataForClass(CborUInt, 'CborUInt', VOID, AbstractCborInt);
291
+ initMetadataForClass(CborUndefined, 'CborUndefined', CborUndefined, CborSimple);
292
+ initMetadataForClass(LabelType, 'LabelType', VOID, Enum);
293
+ initMetadataForClass(CoseLabeled, 'CoseLabeled');
294
+ initMetadataForCompanion(Companion_8);
295
+ initMetadataForClass(CoseLabel, 'CoseLabel', VOID, CborItem);
296
+ initMetadataForClass(NumberLabeledMap, 'NumberLabeledMap', NumberLabeledMap);
297
+ initMetadataForClass(DiagnosticOption, 'DiagnosticOption', VOID, Enum);
298
+ initMetadataForCompanion(Companion_9, VOID, [SerializerFactory]);
299
+ initMetadataForClass(MajorType, 'MajorType', VOID, Enum, VOID, VOID, VOID, {0: Companion_getInstance_10});
300
+ initMetadataForCompanion(Companion_10);
301
+ initMetadataForClass(NumberLabel, 'NumberLabel', VOID, CoseLabel);
302
+ initMetadataForCompanion(Companion_11);
303
+ initMetadataForClass(StringLabel, 'StringLabel', VOID, CoseLabel);
304
+ initMetadataForObject(CborJsonSupport, 'CborJsonSupport');
305
+ initMetadataForInterface(HasToJsonString, 'HasToJsonString');
306
+ initMetadataForInterface(HasToJsonDTO, 'HasToJsonDTO');
307
+ initMetadataForCompanion(Companion_12, VOID, [SerializerFactory]);
308
+ initMetadataForClass(JsonView, 'JsonView', VOID, VOID, [HasToJsonString, HasToJsonDTO], VOID, VOID, {0: Companion_getInstance_13});
309
+ //endregion
310
+ function AbstractCborInt(value, cddl) {
311
+ CborNumber.call(this, value, cddl);
312
+ }
313
+ function CborInt(value) {
314
+ AbstractCborInt.call(this, abs(value), value >= 0n ? uint_getInstance() : nint_getInstance());
315
+ }
316
+ protoOf(CborInt).n2r = function (builder) {
317
+ if (equals(this.cddl, uint_getInstance())) {
318
+ (new CborUInt(this.value)).n2r(builder);
319
+ } else {
320
+ (new CborNInt(this.value)).n2r(builder);
321
+ }
322
+ };
323
+ function Companion() {
324
+ }
325
+ protoOf(Companion).t1e = function () {
326
+ return CDDLSerializer_getInstance();
327
+ };
328
+ protoOf(Companion).x11 = function (typeParamsSerializers) {
329
+ return this.t1e();
330
+ };
331
+ var Companion_instance_0;
332
+ function Companion_getInstance_0() {
333
+ return Companion_instance_0;
334
+ }
335
+ function CDDLType() {
336
+ }
337
+ function CDDL$util$entries$delegate$lambda() {
338
+ // Inline function 'kotlin.arrayOf' call
339
+ // Inline function 'kotlin.js.unsafeCast' call
340
+ // Inline function 'kotlin.js.asDynamic' call
341
+ return [any_getInstance(), uint_getInstance(), int_getInstance(), nint_getInstance(), bstr_getInstance(), bstr_indef_length_getInstance(), bytes_getInstance(), tstr_getInstance(), tstr_indef_length_getInstance(), text_getInstance(), tdate_getInstance(), full_date_getInstance(), time_getInstance(), float_getInstance(), False_getInstance(), True_getInstance(), bool_getInstance(), nil_getInstance(), Null_getInstance(), undefined_getInstance(), float16_getInstance(), float32_getInstance(), float64_getInstance(), map_getInstance(), list_getInstance()];
342
+ }
343
+ function CDDL$util$_get_entries_$ref_c77ahj() {
344
+ return function (p0) {
345
+ return p0.entries;
346
+ };
347
+ }
348
+ function tstr() {
349
+ tstr_instance = this;
350
+ CDDL.call(this, 'tstr', MajorType_UNICODE_STRING_getInstance());
351
+ }
352
+ protoOf(tstr).newString = function (value) {
353
+ return new CborString(value);
354
+ };
355
+ protoOf(tstr).fromJson = function (value) {
356
+ return new CborString(value.j1e());
357
+ };
358
+ var tstr_instance;
359
+ function tstr_getInstance() {
360
+ if (tstr_instance == null)
361
+ new tstr();
362
+ return tstr_instance;
363
+ }
364
+ function uint() {
365
+ uint_instance = this;
366
+ CDDL.call(this, 'uint', MajorType_UNSIGNED_INTEGER_getInstance());
367
+ }
368
+ protoOf(uint).newUint = function (value) {
369
+ return new CborUInt(value);
370
+ };
371
+ protoOf(uint).fromJson = function (value) {
372
+ return new CborUInt(toLong(value.j1e()));
373
+ };
374
+ protoOf(uint).t1e = function () {
375
+ return CDDLSerializer_getInstance();
376
+ };
377
+ protoOf(uint).x11 = function (typeParamsSerializers) {
378
+ return this.t1e();
379
+ };
380
+ var uint_instance;
381
+ function uint_getInstance() {
382
+ if (uint_instance == null)
383
+ new uint();
384
+ return uint_instance;
385
+ }
386
+ function nint() {
387
+ nint_instance = this;
388
+ CDDL.call(this, 'nint', MajorType_NEGATIVE_INTEGER_getInstance());
389
+ }
390
+ protoOf(nint).newNInt = function (value) {
391
+ return new CborNInt(value);
392
+ };
393
+ protoOf(nint).fromJson = function (value) {
394
+ return new CborNInt(toLong(value.j1e()));
395
+ };
396
+ protoOf(nint).t1e = function () {
397
+ return CDDLSerializer_getInstance();
398
+ };
399
+ protoOf(nint).x11 = function (typeParamsSerializers) {
400
+ return this.t1e();
401
+ };
402
+ var nint_instance;
403
+ function nint_getInstance() {
404
+ if (nint_instance == null)
405
+ new nint();
406
+ return nint_instance;
407
+ }
408
+ function int() {
409
+ int_instance = this;
410
+ // Inline function 'kotlin.arrayOf' call
411
+ // Inline function 'kotlin.js.unsafeCast' call
412
+ // Inline function 'kotlin.js.asDynamic' call
413
+ var tmp$ret$0 = [uint_getInstance(), nint_getInstance()];
414
+ CDDL.call(this, 'int', null, null, tmp$ret$0);
415
+ }
416
+ protoOf(int).newInt = function (value) {
417
+ return value < 0 ? new CborNInt(fromInt(value)) : new CborUInt(fromInt(value));
418
+ };
419
+ protoOf(int).newLong = function (value) {
420
+ return value < 0n ? new CborNInt(value) : new CborUInt(value);
421
+ };
422
+ protoOf(int).fromJson = function (value) {
423
+ return get_long(value) < 0n ? new CborNInt(get_long(value)) : new CborUInt(get_long(value));
424
+ };
425
+ protoOf(int).t1e = function () {
426
+ return CDDLSerializer_getInstance();
427
+ };
428
+ protoOf(int).x11 = function (typeParamsSerializers) {
429
+ return this.t1e();
430
+ };
431
+ var int_instance;
432
+ function int_getInstance() {
433
+ if (int_instance == null)
434
+ new int();
435
+ return int_instance;
436
+ }
437
+ function bstr() {
438
+ bstr_instance = this;
439
+ CDDL.call(this, 'bstr', MajorType_BYTE_STRING_getInstance());
440
+ }
441
+ protoOf(bstr).newByteString = function (value) {
442
+ return new CborByteString(value);
443
+ };
444
+ protoOf(bstr).f2t = function (value, encoding) {
445
+ return new CborByteString(decodeFrom(value.j1e(), encoding));
446
+ };
447
+ protoOf(bstr).fromJson = function (value, encoding, $super) {
448
+ encoding = encoding === VOID ? Encoding_BASE64URL_getInstance() : encoding;
449
+ return $super === VOID ? this.f2t(value, encoding) : $super.f2t.call(this, value, encoding);
450
+ };
451
+ protoOf(bstr).t1e = function () {
452
+ return CDDLSerializer_getInstance();
453
+ };
454
+ protoOf(bstr).x11 = function (typeParamsSerializers) {
455
+ return this.t1e();
456
+ };
457
+ var bstr_instance;
458
+ function bstr_getInstance() {
459
+ if (bstr_instance == null)
460
+ new bstr();
461
+ return bstr_instance;
462
+ }
463
+ function bstr_indef_length() {
464
+ bstr_indef_length_instance = this;
465
+ CDDL.call(this, 'bstr', MajorType_BYTE_STRING_getInstance());
466
+ }
467
+ protoOf(bstr_indef_length).newByteString = function (value) {
468
+ return new CborByteStringIndefLength(value);
469
+ };
470
+ protoOf(bstr_indef_length).k2t = function (value, encoding) {
471
+ // Inline function 'kotlin.TODO' call
472
+ var reason = 'indef length from json to cbor not implemented yet';
473
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
474
+ };
475
+ protoOf(bstr_indef_length).fromJson = function (value, encoding, $super) {
476
+ encoding = encoding === VOID ? Encoding_BASE64URL_getInstance() : encoding;
477
+ return $super === VOID ? this.k2t(value, encoding) : $super.k2t.call(this, value, encoding);
478
+ };
479
+ protoOf(bstr_indef_length).t1e = function () {
480
+ return CDDLSerializer_getInstance();
481
+ };
482
+ protoOf(bstr_indef_length).x11 = function (typeParamsSerializers) {
483
+ return this.t1e();
484
+ };
485
+ var bstr_indef_length_instance;
486
+ function bstr_indef_length_getInstance() {
487
+ if (bstr_indef_length_instance == null)
488
+ new bstr_indef_length();
489
+ return bstr_indef_length_instance;
490
+ }
491
+ function bytes() {
492
+ bytes_instance = this;
493
+ var tmp = MajorType_BYTE_STRING_getInstance();
494
+ // Inline function 'kotlin.arrayOf' call
495
+ // Inline function 'kotlin.js.unsafeCast' call
496
+ // Inline function 'kotlin.js.asDynamic' call
497
+ var tmp$ret$0 = [bstr_getInstance()];
498
+ CDDL.call(this, 'bytes', tmp, VOID, tmp$ret$0);
499
+ }
500
+ protoOf(bytes).newBytes = function (value) {
501
+ return new CborByteString(value);
502
+ };
503
+ protoOf(bytes).f2t = function (value, encoding) {
504
+ return new CborByteString(decodeFrom(value.j1e(), encoding));
505
+ };
506
+ protoOf(bytes).fromJson = function (value, encoding, $super) {
507
+ encoding = encoding === VOID ? Encoding_BASE64URL_getInstance() : encoding;
508
+ return $super === VOID ? this.f2t(value, encoding) : $super.f2t.call(this, value, encoding);
509
+ };
510
+ protoOf(bytes).t1e = function () {
511
+ return CDDLSerializer_getInstance();
512
+ };
513
+ protoOf(bytes).x11 = function (typeParamsSerializers) {
514
+ return this.t1e();
515
+ };
516
+ var bytes_instance;
517
+ function bytes_getInstance() {
518
+ if (bytes_instance == null)
519
+ new bytes();
520
+ return bytes_instance;
521
+ }
522
+ function tstr_indef_length() {
523
+ tstr_indef_length_instance = this;
524
+ CDDL.call(this, 'tstr', MajorType_UNICODE_STRING_getInstance());
525
+ }
526
+ protoOf(tstr_indef_length).newStringIndefLength = function (value) {
527
+ return new CborStringIndefLength(value);
528
+ };
529
+ protoOf(tstr_indef_length).k2t = function (value, encoding) {
530
+ // Inline function 'kotlin.TODO' call
531
+ var reason = 'indef length from json to cbor not implemented yet';
532
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
533
+ };
534
+ protoOf(tstr_indef_length).fromJson = function (value, encoding, $super) {
535
+ encoding = encoding === VOID ? Encoding_BASE64URL_getInstance() : encoding;
536
+ return $super === VOID ? this.k2t(value, encoding) : $super.k2t.call(this, value, encoding);
537
+ };
538
+ protoOf(tstr_indef_length).t1e = function () {
539
+ return CDDLSerializer_getInstance();
540
+ };
541
+ protoOf(tstr_indef_length).x11 = function (typeParamsSerializers) {
542
+ return this.t1e();
543
+ };
544
+ var tstr_indef_length_instance;
545
+ function tstr_indef_length_getInstance() {
546
+ if (tstr_indef_length_instance == null)
547
+ new tstr_indef_length();
548
+ return tstr_indef_length_instance;
549
+ }
550
+ function text() {
551
+ text_instance = this;
552
+ var tmp = MajorType_UNICODE_STRING_getInstance();
553
+ // Inline function 'kotlin.arrayOf' call
554
+ // Inline function 'kotlin.js.unsafeCast' call
555
+ // Inline function 'kotlin.js.asDynamic' call
556
+ var tmp$ret$0 = [tstr_getInstance()];
557
+ CDDL.call(this, 'text', tmp, VOID, tmp$ret$0);
558
+ }
559
+ protoOf(text).newText = function (value) {
560
+ return new CborString(value);
561
+ };
562
+ protoOf(text).fromJson = function (value) {
563
+ return new CborString(value.j1e());
564
+ };
565
+ protoOf(text).t1e = function () {
566
+ return CDDLSerializer_getInstance();
567
+ };
568
+ protoOf(text).x11 = function (typeParamsSerializers) {
569
+ return this.t1e();
570
+ };
571
+ var text_instance;
572
+ function text_getInstance() {
573
+ if (text_instance == null)
574
+ new text();
575
+ return text_instance;
576
+ }
577
+ function tdate() {
578
+ tdate_instance = this;
579
+ CDDL.call(this, 'tdate', MajorType_TAG_getInstance(), 0);
580
+ }
581
+ protoOf(tdate).newTDate = function (value) {
582
+ return new CborTDate(value);
583
+ };
584
+ protoOf(tdate).fromJson = function (value) {
585
+ return new CborTDate(value.j1e());
586
+ };
587
+ protoOf(tdate).t1e = function () {
588
+ return CDDLSerializer_getInstance();
589
+ };
590
+ protoOf(tdate).x11 = function (typeParamsSerializers) {
591
+ return this.t1e();
592
+ };
593
+ var tdate_instance;
594
+ function tdate_getInstance() {
595
+ if (tdate_instance == null)
596
+ new tdate();
597
+ return tdate_instance;
598
+ }
599
+ function full_date() {
600
+ full_date_instance = this;
601
+ CDDL.call(this, 'full-date', MajorType_TAG_getInstance(), 1004);
602
+ }
603
+ protoOf(full_date).newFullDate = function (value) {
604
+ return new CborFullDate(value);
605
+ };
606
+ protoOf(full_date).fromJson = function (value) {
607
+ return new CborFullDate(value.j1e());
608
+ };
609
+ protoOf(full_date).t1e = function () {
610
+ return CDDLSerializer_getInstance();
611
+ };
612
+ protoOf(full_date).x11 = function (typeParamsSerializers) {
613
+ return this.t1e();
614
+ };
615
+ var full_date_instance;
616
+ function full_date_getInstance() {
617
+ if (full_date_instance == null)
618
+ new full_date();
619
+ return full_date_instance;
620
+ }
621
+ function time() {
622
+ time_instance = this;
623
+ CDDL.call(this, 'time', MajorType_TAG_getInstance(), 1);
624
+ }
625
+ protoOf(time).newTime = function (value) {
626
+ return new CborTime(value);
627
+ };
628
+ protoOf(time).fromJson = function (value) {
629
+ return new CborTime(toLong(value.j1e()));
630
+ };
631
+ protoOf(time).t1e = function () {
632
+ return CDDLSerializer_getInstance();
633
+ };
634
+ protoOf(time).x11 = function (typeParamsSerializers) {
635
+ return this.t1e();
636
+ };
637
+ var time_instance;
638
+ function time_getInstance() {
639
+ if (time_instance == null)
640
+ new time();
641
+ return time_instance;
642
+ }
643
+ function float16() {
644
+ float16_instance = this;
645
+ CDDL.call(this, 'float16', MajorType_SPECIAL_getInstance(), 25);
646
+ }
647
+ protoOf(float16).newFloat16 = function (value) {
648
+ return new CborFloat16(value);
649
+ };
650
+ protoOf(float16).fromJson = function (value) {
651
+ return new CborFloat16(get_float(value));
652
+ };
653
+ protoOf(float16).t1e = function () {
654
+ return CDDLSerializer_getInstance();
655
+ };
656
+ protoOf(float16).x11 = function (typeParamsSerializers) {
657
+ return this.t1e();
658
+ };
659
+ var float16_instance;
660
+ function float16_getInstance() {
661
+ if (float16_instance == null)
662
+ new float16();
663
+ return float16_instance;
664
+ }
665
+ function float32() {
666
+ float32_instance = this;
667
+ CDDL.call(this, 'float32', MajorType_SPECIAL_getInstance(), 26);
668
+ }
669
+ protoOf(float32).newFloat32 = function (value) {
670
+ return new CborFloat32(value);
671
+ };
672
+ protoOf(float32).fromJson = function (value) {
673
+ return new CborFloat32(get_float(value));
674
+ };
675
+ protoOf(float32).t1e = function () {
676
+ return CDDLSerializer_getInstance();
677
+ };
678
+ protoOf(float32).x11 = function (typeParamsSerializers) {
679
+ return this.t1e();
680
+ };
681
+ var float32_instance;
682
+ function float32_getInstance() {
683
+ if (float32_instance == null)
684
+ new float32();
685
+ return float32_instance;
686
+ }
687
+ function float64() {
688
+ float64_instance = this;
689
+ CDDL.call(this, 'float64', MajorType_SPECIAL_getInstance(), 27);
690
+ }
691
+ protoOf(float64).newFloat64 = function (value) {
692
+ return new CborDouble(value);
693
+ };
694
+ protoOf(float64).fromJson = function (value) {
695
+ return new CborDouble(get_double(value));
696
+ };
697
+ protoOf(float64).t1e = function () {
698
+ return CDDLSerializer_getInstance();
699
+ };
700
+ protoOf(float64).x11 = function (typeParamsSerializers) {
701
+ return this.t1e();
702
+ };
703
+ var float64_instance;
704
+ function float64_getInstance() {
705
+ if (float64_instance == null)
706
+ new float64();
707
+ return float64_instance;
708
+ }
709
+ function float() {
710
+ float_instance = this;
711
+ var tmp = MajorType_SPECIAL_getInstance();
712
+ // Inline function 'kotlin.arrayOf' call
713
+ // Inline function 'kotlin.js.unsafeCast' call
714
+ // Inline function 'kotlin.js.asDynamic' call
715
+ var tmp$ret$0 = [float16_getInstance(), float32_getInstance(), float64_getInstance()];
716
+ CDDL.call(this, 'float', tmp, VOID, tmp$ret$0);
717
+ }
718
+ protoOf(float).newFloat = function (value) {
719
+ return new CborFloat32(value);
720
+ };
721
+ protoOf(float).fromJson = function (value) {
722
+ return new CborFloat32(get_float(value));
723
+ };
724
+ protoOf(float).t1e = function () {
725
+ return CDDLSerializer_getInstance();
726
+ };
727
+ protoOf(float).x11 = function (typeParamsSerializers) {
728
+ return this.t1e();
729
+ };
730
+ var float_instance;
731
+ function float_getInstance() {
732
+ if (float_instance == null)
733
+ new float();
734
+ return float_instance;
735
+ }
736
+ function False() {
737
+ False_instance = this;
738
+ CDDL.call(this, 'false', MajorType_SPECIAL_getInstance(), 20);
739
+ }
740
+ protoOf(False).newFalse = function () {
741
+ return Companion_getInstance_7().z2u_1;
742
+ };
743
+ protoOf(False).fromJson = function (value) {
744
+ return Companion_getInstance_7().z2u_1;
745
+ };
746
+ protoOf(False).t1e = function () {
747
+ return CDDLSerializer_getInstance();
748
+ };
749
+ protoOf(False).x11 = function (typeParamsSerializers) {
750
+ return this.t1e();
751
+ };
752
+ var False_instance;
753
+ function False_getInstance() {
754
+ if (False_instance == null)
755
+ new False();
756
+ return False_instance;
757
+ }
758
+ function True() {
759
+ True_instance = this;
760
+ CDDL.call(this, 'true', MajorType_SPECIAL_getInstance(), 21);
761
+ }
762
+ protoOf(True).newTrue = function () {
763
+ return Companion_getInstance_7().a2v_1;
764
+ };
765
+ protoOf(True).fromJson = function (value) {
766
+ return Companion_getInstance_7().a2v_1;
767
+ };
768
+ protoOf(True).t1e = function () {
769
+ return CDDLSerializer_getInstance();
770
+ };
771
+ protoOf(True).x11 = function (typeParamsSerializers) {
772
+ return this.t1e();
773
+ };
774
+ var True_instance;
775
+ function True_getInstance() {
776
+ if (True_instance == null)
777
+ new True();
778
+ return True_instance;
779
+ }
780
+ function bool() {
781
+ bool_instance = this;
782
+ var tmp = MajorType_SPECIAL_getInstance();
783
+ // Inline function 'kotlin.arrayOf' call
784
+ // Inline function 'kotlin.js.unsafeCast' call
785
+ // Inline function 'kotlin.js.asDynamic' call
786
+ var tmp$ret$0 = [False_getInstance(), True_getInstance()];
787
+ CDDL.call(this, 'bool', tmp, VOID, tmp$ret$0);
788
+ }
789
+ protoOf(bool).newBool = function (value) {
790
+ return value ? Companion_getInstance_7().a2v_1 : Companion_getInstance_7().z2u_1;
791
+ };
792
+ protoOf(bool).fromJson = function (value) {
793
+ return get_boolean(value) ? Companion_getInstance_7().a2v_1 : Companion_getInstance_7().z2u_1;
794
+ };
795
+ protoOf(bool).t1e = function () {
796
+ return CDDLSerializer_getInstance();
797
+ };
798
+ protoOf(bool).x11 = function (typeParamsSerializers) {
799
+ return this.t1e();
800
+ };
801
+ var bool_instance;
802
+ function bool_getInstance() {
803
+ if (bool_instance == null)
804
+ new bool();
805
+ return bool_instance;
806
+ }
807
+ function nil() {
808
+ nil_instance = this;
809
+ CDDL.call(this, 'nil', MajorType_SPECIAL_getInstance(), 22);
810
+ }
811
+ protoOf(nil).newNil = function () {
812
+ return Companion_getInstance_7().b2v_1;
813
+ };
814
+ protoOf(nil).fromJson = function (value) {
815
+ return Companion_getInstance_7().b2v_1;
816
+ };
817
+ protoOf(nil).t1e = function () {
818
+ return CDDLSerializer_getInstance();
819
+ };
820
+ protoOf(nil).x11 = function (typeParamsSerializers) {
821
+ return this.t1e();
822
+ };
823
+ var nil_instance;
824
+ function nil_getInstance() {
825
+ if (nil_instance == null)
826
+ new nil();
827
+ return nil_instance;
828
+ }
829
+ function Null() {
830
+ Null_instance = this;
831
+ var tmp = MajorType_SPECIAL_getInstance();
832
+ // Inline function 'kotlin.arrayOf' call
833
+ // Inline function 'kotlin.js.unsafeCast' call
834
+ // Inline function 'kotlin.js.asDynamic' call
835
+ var tmp$ret$0 = [nil_getInstance()];
836
+ CDDL.call(this, 'null', tmp, 22, tmp$ret$0);
837
+ }
838
+ protoOf(Null).newNull = function () {
839
+ return Companion_getInstance_7().b2v_1;
840
+ };
841
+ protoOf(Null).fromJson = function (value) {
842
+ return Companion_getInstance_7().b2v_1;
843
+ };
844
+ protoOf(Null).t1e = function () {
845
+ return CDDLSerializer_getInstance();
846
+ };
847
+ protoOf(Null).x11 = function (typeParamsSerializers) {
848
+ return this.t1e();
849
+ };
850
+ var Null_instance;
851
+ function Null_getInstance() {
852
+ if (Null_instance == null)
853
+ new Null();
854
+ return Null_instance;
855
+ }
856
+ function undefined_0() {
857
+ undefined_instance = this;
858
+ CDDL.call(this, 'undefined', MajorType_SPECIAL_getInstance(), 23);
859
+ }
860
+ protoOf(undefined_0).newUndefined = function () {
861
+ return Companion_getInstance_7().c2v_1;
862
+ };
863
+ protoOf(undefined_0).fromJson = function (value) {
864
+ return Companion_getInstance_7().c2v_1;
865
+ };
866
+ protoOf(undefined_0).t1e = function () {
867
+ return CDDLSerializer_getInstance();
868
+ };
869
+ protoOf(undefined_0).x11 = function (typeParamsSerializers) {
870
+ return this.t1e();
871
+ };
872
+ var undefined_instance;
873
+ function undefined_getInstance() {
874
+ if (undefined_instance == null)
875
+ new undefined_0();
876
+ return undefined_instance;
877
+ }
878
+ function map() {
879
+ map_instance = this;
880
+ CDDL.call(this, 'map', MajorType_MAP_getInstance());
881
+ }
882
+ protoOf(map).newMap = function (value) {
883
+ return new CborMap(value);
884
+ };
885
+ protoOf(map).fromJson = function (value) {
886
+ // Inline function 'kotlin.collections.map' call
887
+ var this_0 = value.q1();
888
+ // Inline function 'kotlin.collections.mapTo' call
889
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
890
+ var _iterator__ex2g4s = this_0.t();
891
+ while (_iterator__ex2g4s.u()) {
892
+ var item = _iterator__ex2g4s.v();
893
+ var tmp = new CborString(item.s2());
894
+ var tmp0_subject = item.t2();
895
+ var tmp_0;
896
+ if (tmp0_subject instanceof JsonPrimitive) {
897
+ tmp_0 = any_getInstance().fromJson(item.t2());
898
+ } else {
899
+ if (tmp0_subject instanceof JsonArray) {
900
+ var tmp_1 = list_getInstance();
901
+ var tmp_2 = item.t2();
902
+ tmp_0 = tmp_1.fromJson(tmp_2 instanceof JsonArray ? tmp_2 : THROW_CCE());
903
+ } else {
904
+ if (tmp0_subject instanceof JsonObject) {
905
+ var tmp_3 = map_getInstance();
906
+ var tmp_4 = item.t2();
907
+ tmp_0 = tmp_3.fromJson(tmp_4 instanceof JsonObject ? tmp_4 : THROW_CCE());
908
+ } else {
909
+ throw IllegalArgumentException_init_$Create$('Unknown type encountered');
910
+ }
911
+ }
912
+ }
913
+ var tmp$ret$2 = new Pair(tmp, tmp_0);
914
+ destination.j1(tmp$ret$2);
915
+ }
916
+ return new CborMap(toMutableMap(toMap(destination)));
917
+ };
918
+ protoOf(map).t1e = function () {
919
+ return CDDLSerializer_getInstance();
920
+ };
921
+ protoOf(map).x11 = function (typeParamsSerializers) {
922
+ return this.t1e();
923
+ };
924
+ var map_instance;
925
+ function map_getInstance() {
926
+ if (map_instance == null)
927
+ new map();
928
+ return map_instance;
929
+ }
930
+ function list() {
931
+ list_instance = this;
932
+ CDDL.call(this, 'list', MajorType_ARRAY_getInstance());
933
+ }
934
+ protoOf(list).newList = function (value) {
935
+ return new CborArray(value);
936
+ };
937
+ protoOf(list).fromJson = function (value) {
938
+ // Inline function 'kotlin.collections.map' call
939
+ // Inline function 'kotlin.collections.mapTo' call
940
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(value, 10));
941
+ var _iterator__ex2g4s = value.t();
942
+ while (_iterator__ex2g4s.u()) {
943
+ var item = _iterator__ex2g4s.v();
944
+ var tmp;
945
+ if (item instanceof JsonPrimitive) {
946
+ tmp = any_getInstance().fromJson(item);
947
+ } else {
948
+ if (item instanceof JsonArray) {
949
+ tmp = list_getInstance().fromJson(item);
950
+ } else {
951
+ if (item instanceof JsonObject) {
952
+ var tmp_0;
953
+ if (Companion_instance_6.k2w(item)) {
954
+ var tmp_1 = list_getInstance();
955
+ var tmp1_safe_receiver = item.fd(CborConst_getInstance().g2w_1);
956
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : get_jsonPrimitive(tmp1_safe_receiver);
957
+ var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.j1e();
958
+ var tmp_2;
959
+ if (tmp3_safe_receiver == null) {
960
+ tmp_2 = null;
961
+ } else {
962
+ // Inline function 'kotlin.let' call
963
+ tmp_2 = util_getInstance().fromFormat(tmp3_safe_receiver);
964
+ }
965
+ tmp_0 = tmp_1.newCborItemFromJson(item, tmp_2);
966
+ } else {
967
+ tmp_0 = map_getInstance().fromJson(item);
968
+ }
969
+ tmp = tmp_0;
970
+ } else {
971
+ throw IllegalArgumentException_init_$Create$('Unknown type encountered');
972
+ }
973
+ }
974
+ }
975
+ var tmp$ret$2 = tmp;
976
+ destination.j1(tmp$ret$2);
977
+ }
978
+ return new CborArray(toMutableList(destination));
979
+ };
980
+ protoOf(list).t1e = function () {
981
+ return CDDLSerializer_getInstance();
982
+ };
983
+ protoOf(list).x11 = function (typeParamsSerializers) {
984
+ return this.t1e();
985
+ };
986
+ var list_instance;
987
+ function list_getInstance() {
988
+ if (list_instance == null)
989
+ new list();
990
+ return list_instance;
991
+ }
992
+ function any() {
993
+ any_instance = this;
994
+ CDDL.call(this, 'any');
995
+ }
996
+ protoOf(any).newAny = function (value) {
997
+ return new CborAny(value);
998
+ };
999
+ protoOf(any).fromJson = function (value) {
1000
+ return this.newCborItemFromJson(value);
1001
+ };
1002
+ protoOf(any).t1e = function () {
1003
+ return CDDLSerializer_getInstance();
1004
+ };
1005
+ protoOf(any).x11 = function (typeParamsSerializers) {
1006
+ return this.t1e();
1007
+ };
1008
+ var any_instance;
1009
+ function any_getInstance() {
1010
+ if (any_instance == null)
1011
+ new any();
1012
+ return any_instance;
1013
+ }
1014
+ function util() {
1015
+ util_instance = this;
1016
+ var tmp = this;
1017
+ tmp.t2w_1 = lazy(CDDL$util$entries$delegate$lambda);
1018
+ }
1019
+ protoOf(util).q1 = function () {
1020
+ var tmp0 = this.t2w_1;
1021
+ var tmp = KProperty1;
1022
+ // Inline function 'kotlin.getValue' call
1023
+ getPropertyCallableRef('entries', 1, tmp, CDDL$util$_get_entries_$ref_c77ahj(), null);
1024
+ return tmp0.t2();
1025
+ };
1026
+ protoOf(util).fromFormat = function (format) {
1027
+ var tmp0 = this.entries;
1028
+ var tmp$ret$0;
1029
+ $l$block: {
1030
+ // Inline function 'kotlin.collections.first' call
1031
+ var inductionVariable = 0;
1032
+ var last = tmp0.length;
1033
+ while (inductionVariable < last) {
1034
+ var element = tmp0[inductionVariable];
1035
+ inductionVariable = inductionVariable + 1 | 0;
1036
+ if (element.format === format) {
1037
+ tmp$ret$0 = element;
1038
+ break $l$block;
1039
+ }
1040
+ }
1041
+ throw NoSuchElementException_init_$Create$('Array contains no element matching the predicate.');
1042
+ }
1043
+ return tmp$ret$0;
1044
+ };
1045
+ protoOf(util).fromTag = function (tag) {
1046
+ if (!startsWith(tag, '#')) {
1047
+ throw IllegalArgumentException_init_$Create$('Invalid tag supplied ' + tag);
1048
+ }
1049
+ var parts = split(tag, ['#', '.']);
1050
+ if (parts.l1() === 1) {
1051
+ return any_getInstance();
1052
+ }
1053
+ var majorVal = toIntOrNull(parts.m1(1));
1054
+ var tmp;
1055
+ if (majorVal == null) {
1056
+ tmp = null;
1057
+ } else {
1058
+ // Inline function 'kotlin.let' call
1059
+ tmp = Companion_getInstance_10().v2w(majorVal);
1060
+ }
1061
+ return this.fromMajorType(tmp, toIntOrNull(parts.m1(2)));
1062
+ };
1063
+ protoOf(util).fromBytes = function (input) {
1064
+ var majorType = input >> 5;
1065
+ return this.fromMajorType(Companion_getInstance_10().v2w(majorType));
1066
+ };
1067
+ protoOf(util).w2w = function (majorType, additionalInfo) {
1068
+ var tmp0 = this.entries;
1069
+ var tmp$ret$0;
1070
+ $l$block: {
1071
+ // Inline function 'kotlin.collections.first' call
1072
+ var inductionVariable = 0;
1073
+ var last = tmp0.length;
1074
+ while (inductionVariable < last) {
1075
+ var element = tmp0[inductionVariable];
1076
+ inductionVariable = inductionVariable + 1 | 0;
1077
+ if (equals(element.majorType, majorType) && element.info == additionalInfo) {
1078
+ tmp$ret$0 = element;
1079
+ break $l$block;
1080
+ }
1081
+ }
1082
+ throw NoSuchElementException_init_$Create$('Array contains no element matching the predicate.');
1083
+ }
1084
+ return tmp$ret$0;
1085
+ };
1086
+ protoOf(util).fromMajorType = function (majorType, additionalInfo, $super) {
1087
+ majorType = majorType === VOID ? null : majorType;
1088
+ additionalInfo = additionalInfo === VOID ? null : additionalInfo;
1089
+ return $super === VOID ? this.w2w(majorType, additionalInfo) : $super.w2w.call(this, majorType, additionalInfo);
1090
+ };
1091
+ var util_instance;
1092
+ function util_getInstance() {
1093
+ if (util_instance == null)
1094
+ new util();
1095
+ return util_instance;
1096
+ }
1097
+ function Companion_0() {
1098
+ }
1099
+ var Companion_instance_1;
1100
+ function Companion_getInstance_1() {
1101
+ return Companion_instance_1;
1102
+ }
1103
+ function CDDL(format, majorType, info, aliasFor) {
1104
+ majorType = majorType === VOID ? null : majorType;
1105
+ info = info === VOID ? null : info;
1106
+ var tmp;
1107
+ if (aliasFor === VOID) {
1108
+ // Inline function 'kotlin.arrayOf' call
1109
+ // Inline function 'kotlin.js.unsafeCast' call
1110
+ // Inline function 'kotlin.js.asDynamic' call
1111
+ tmp = [];
1112
+ } else {
1113
+ tmp = aliasFor;
1114
+ }
1115
+ aliasFor = tmp;
1116
+ this.l2s_1 = format;
1117
+ this.m2s_1 = majorType;
1118
+ this.n2s_1 = info;
1119
+ this.o2s_1 = aliasFor;
1120
+ }
1121
+ protoOf(CDDL).h2s = function () {
1122
+ return this.l2s_1;
1123
+ };
1124
+ protoOf(CDDL).o2r = function () {
1125
+ return this.m2s_1;
1126
+ };
1127
+ protoOf(CDDL).p2r = function () {
1128
+ return this.n2s_1;
1129
+ };
1130
+ protoOf(CDDL).i2s = function () {
1131
+ return this.o2s_1;
1132
+ };
1133
+ protoOf(CDDL).k2s = function (element, cddl) {
1134
+ var tmp0_safe_receiver = element instanceof JsonPrimitive ? element : null;
1135
+ var jsonPrimitive = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
1136
+ var tmp1_safe_receiver = element instanceof JsonArray ? element : null;
1137
+ var jsonArray = tmp1_safe_receiver == null ? null : get_jsonArray(tmp1_safe_receiver);
1138
+ var tmp2_safe_receiver = element instanceof JsonObject ? element : null;
1139
+ var jsonObject = tmp2_safe_receiver == null ? null : get_jsonObject(tmp2_safe_receiver);
1140
+ var isNull = equals(element, JsonNull_getInstance()) || element === null;
1141
+ var isString = (jsonPrimitive == null ? null : jsonPrimitive.i1e()) === true;
1142
+ if (isNull) {
1143
+ return new CborNull();
1144
+ } else if (isString && !(jsonPrimitive === null)) {
1145
+ return new CborString(jsonPrimitive.j1e());
1146
+ } else if (!(jsonArray === null)) {
1147
+ return list_getInstance().fromJson(jsonArray);
1148
+ } else if (!(jsonObject === null)) {
1149
+ if (Companion_instance_6.k2w(jsonObject)) {
1150
+ var tmp;
1151
+ if (Companion_instance_6.x2w(jsonObject)) {
1152
+ var tmp_0 = jsonObject.fd('key');
1153
+ var tmp4_safe_receiver = tmp_0 instanceof JsonPrimitive ? tmp_0 : null;
1154
+ tmp = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.j1e();
1155
+ } else {
1156
+ tmp = null;
1157
+ }
1158
+ var key = tmp;
1159
+ var tmp_1 = jsonObject.fd('cddl');
1160
+ var tmp5_safe_receiver = tmp_1 instanceof JsonPrimitive ? tmp_1 : null;
1161
+ var cddlStr = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.j1e();
1162
+ if (cddlStr === null) {
1163
+ return new CborNull();
1164
+ }
1165
+ var cddlObject = util_getInstance().fromFormat(cddlStr);
1166
+ // Inline function 'kotlin.collections.find' call
1167
+ var tmp0 = jsonObject.y2();
1168
+ var tmp$ret$1;
1169
+ $l$block: {
1170
+ // Inline function 'kotlin.collections.firstOrNull' call
1171
+ var _iterator__ex2g4s = tmp0.t();
1172
+ while (_iterator__ex2g4s.u()) {
1173
+ var element_0 = _iterator__ex2g4s.v();
1174
+ if (!(element_0 === CborConst_getInstance().g2w_1) && !(element_0 === CborConst_getInstance().h2w_1)) {
1175
+ tmp$ret$1 = element_0;
1176
+ break $l$block;
1177
+ }
1178
+ }
1179
+ tmp$ret$1 = null;
1180
+ }
1181
+ // Inline function 'kotlin.collections.get' call
1182
+ var key_0 = tmp$ret$1;
1183
+ var tmp$ret$3 = (isInterface(jsonObject, KtMap) ? jsonObject : THROW_CCE()).x2(key_0);
1184
+ var cborObject = this.newCborItemFromJson(tmp$ret$3, cddlObject);
1185
+ if (key === null) {
1186
+ return cborObject;
1187
+ }
1188
+ return new CborMap(mutableMapOf([new Pair(new CborString(key), cborObject)]));
1189
+ }
1190
+ // Inline function 'kotlin.collections.map' call
1191
+ // Inline function 'kotlin.collections.mapTo' call
1192
+ var destination = ArrayList_init_$Create$(jsonObject.l1());
1193
+ // Inline function 'kotlin.collections.iterator' call
1194
+ var _iterator__ex2g4s_0 = jsonObject.q1().t();
1195
+ while (_iterator__ex2g4s_0.u()) {
1196
+ var item = _iterator__ex2g4s_0.v();
1197
+ var tmp$ret$7 = new Pair(new CborString(item.s2()), this.newCborItemFromJson(item.t2()));
1198
+ destination.j1(tmp$ret$7);
1199
+ }
1200
+ // Inline function 'kotlin.collections.toTypedArray' call
1201
+ var tmp$ret$8 = copyToArray(destination);
1202
+ return new CborMap(mutableMapOf(tmp$ret$8.slice()));
1203
+ } else if (!(jsonPrimitive === null)) {
1204
+ if (cddl == null) {
1205
+ return this.newCborItem(jsonPrimitive);
1206
+ }
1207
+ return equals(cddl, tstr_getInstance()) ? tstr_getInstance().fromJson(jsonPrimitive) : equals(cddl, Null_getInstance()) ? new CborNull() : equals(cddl, False_getInstance()) ? Companion_getInstance_7().z2u_1 : equals(cddl, True_getInstance()) ? Companion_getInstance_7().a2v_1 : equals(cddl, bool_getInstance()) ? bool_getInstance().fromJson(jsonPrimitive) : equals(cddl, bstr_getInstance()) ? bstr_getInstance().fromJson(jsonPrimitive) : equals(cddl, bytes_getInstance()) ? bytes_getInstance().fromJson(jsonPrimitive) : equals(cddl, float_getInstance()) ? float_getInstance().fromJson(jsonPrimitive) : equals(cddl, float16_getInstance()) ? float16_getInstance().fromJson(jsonPrimitive) : equals(cddl, float32_getInstance()) ? float32_getInstance().fromJson(jsonPrimitive) : equals(cddl, float64_getInstance()) ? float64_getInstance().fromJson(jsonPrimitive) : equals(cddl, full_date_getInstance()) ? full_date_getInstance().fromJson(jsonPrimitive) : equals(cddl, int_getInstance()) ? int_getInstance().fromJson(jsonPrimitive) : equals(cddl, nil_getInstance()) ? nil_getInstance().newNil() : equals(cddl, nint_getInstance()) ? nint_getInstance().fromJson(jsonPrimitive) : equals(cddl, tdate_getInstance()) ? tdate_getInstance().fromJson(jsonPrimitive) : equals(cddl, text_getInstance()) ? text_getInstance().fromJson(jsonPrimitive) : equals(cddl, time_getInstance()) ? time_getInstance().fromJson(jsonPrimitive) : equals(cddl, uint_getInstance()) ? uint_getInstance().fromJson(jsonPrimitive) : equals(cddl, undefined_getInstance()) ? undefined_getInstance().newUndefined() : cddl.newCborItem(jsonPrimitive);
1208
+ }
1209
+ return this.newCborItem(element);
1210
+ };
1211
+ protoOf(CDDL).newCborItem = function (origValue) {
1212
+ var value = origValue;
1213
+ var tmp;
1214
+ if (value instanceof JsonPrimitive) {
1215
+ tmp = value;
1216
+ } else {
1217
+ if (value instanceof JsonArray) {
1218
+ tmp = value;
1219
+ } else {
1220
+ if (value instanceof JsonObject) {
1221
+ tmp = value;
1222
+ } else {
1223
+ if (value instanceof JsonNull) {
1224
+ tmp = value;
1225
+ } else {
1226
+ tmp = null;
1227
+ }
1228
+ }
1229
+ }
1230
+ }
1231
+ var jsonElement = tmp;
1232
+ if (value == null) {
1233
+ return nil_getInstance().newNil();
1234
+ } else if (equals(value, Unit_instance)) {
1235
+ return undefined_getInstance().newUndefined();
1236
+ }
1237
+ var tmp_0;
1238
+ if (this.equals(tstr_getInstance())) {
1239
+ tmp_0 = jsonElement === null ? tstr_getInstance().newString(toString_0(value)) : tstr_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1240
+ } else if (this.equals(False_getInstance())) {
1241
+ tmp_0 = False_getInstance().newFalse();
1242
+ } else if (this.equals(Null_getInstance())) {
1243
+ tmp_0 = Null_getInstance().newNull();
1244
+ } else if (this.equals(True_getInstance())) {
1245
+ tmp_0 = True_getInstance().newTrue();
1246
+ } else if (this.equals(any_getInstance())) {
1247
+ var tmp_1;
1248
+ if (value instanceof JsonPrimitive) {
1249
+ var prim = value;
1250
+ tmp_1 = prim.i1e() ? tstr_getInstance().fromJson(prim) : prim.j1e() === 'true' || prim.j1e() === 'false' ? bool_getInstance().fromJson(prim) : contains(prim.j1e(), _Char___init__impl__6a9atx(46)) || contains(prim.j1e(), _Char___init__impl__6a9atx(101)) || contains(prim.j1e(), _Char___init__impl__6a9atx(69)) ? float64_getInstance().fromJson(prim) : int_getInstance().fromJson(prim);
1251
+ } else {
1252
+ if (!(value == null) ? typeof value === 'string' : false) {
1253
+ tmp_1 = jsonElement === null ? tstr_getInstance().newString(value) : tstr_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1254
+ } else {
1255
+ if (!(value == null) ? isByteArray(value) : false) {
1256
+ tmp_1 = jsonElement === null ? bstr_getInstance().newByteString(value) : bstr_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1257
+ } else {
1258
+ if (!(value == null) ? typeof value === 'string' : false) {
1259
+ tmp_1 = jsonElement === null ? tdate_getInstance().newTDate(value) : tdate_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1260
+ } else {
1261
+ if (!(value == null) ? typeof value === 'string' : false) {
1262
+ tmp_1 = jsonElement === null ? full_date_getInstance().newFullDate(value) : full_date_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1263
+ } else {
1264
+ if (!(value == null) ? typeof value === 'boolean' : false) {
1265
+ tmp_1 = jsonElement === null ? bool_getInstance().newBool(value) : bool_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1266
+ } else {
1267
+ if (isNumber(value)) {
1268
+ var tmp_2;
1269
+ if (jsonElement === null) {
1270
+ tmp_2 = toCborItem(value);
1271
+ } else {
1272
+ var d = numberToDouble(value);
1273
+ var tmp_3;
1274
+ var tmp_4;
1275
+ var tmp_5;
1276
+ // Inline function 'kotlin.math.floor' call
1277
+ if (!(d === Math.floor(d))) {
1278
+ tmp_5 = true;
1279
+ } else {
1280
+ tmp_5 = isInfinite(d);
1281
+ }
1282
+ if (tmp_5) {
1283
+ tmp_4 = true;
1284
+ } else {
1285
+ tmp_4 = isNaN_0(d);
1286
+ }
1287
+ if (tmp_4) {
1288
+ tmp_3 = float64_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1289
+ } else {
1290
+ tmp_3 = int_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1291
+ }
1292
+ tmp_2 = tmp_3;
1293
+ }
1294
+ tmp_1 = tmp_2;
1295
+ } else {
1296
+ if (!(value == null) ? isInterface(value, KtMutableList) : false) {
1297
+ var tmp_6;
1298
+ if (jsonElement === null) {
1299
+ var tmp_7 = list_getInstance();
1300
+ // Inline function 'kotlin.collections.map' call
1301
+ // Inline function 'kotlin.collections.mapTo' call
1302
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(value, 10));
1303
+ var _iterator__ex2g4s = value.t();
1304
+ while (_iterator__ex2g4s.u()) {
1305
+ var item = _iterator__ex2g4s.v();
1306
+ var tmp_8;
1307
+ if (item instanceof CborItem) {
1308
+ tmp_8 = item;
1309
+ } else {
1310
+ tmp_8 = any_getInstance().newCborItem(item);
1311
+ }
1312
+ var tmp$ret$3 = tmp_8;
1313
+ destination.j1(tmp$ret$3);
1314
+ }
1315
+ tmp_6 = tmp_7.newList(toMutableList(destination));
1316
+ } else {
1317
+ tmp_6 = list_getInstance().fromJson(get_jsonArray(jsonElement));
1318
+ }
1319
+ tmp_1 = tmp_6;
1320
+ } else {
1321
+ if (!(value == null) ? isInterface(value, KtMutableMap) : false) {
1322
+ var tmp_9;
1323
+ if (jsonElement === null) {
1324
+ var tmp_10 = map_getInstance();
1325
+ // Inline function 'kotlin.collections.map' call
1326
+ // Inline function 'kotlin.collections.mapTo' call
1327
+ var destination_0 = ArrayList_init_$Create$(value.l1());
1328
+ // Inline function 'kotlin.collections.iterator' call
1329
+ var _iterator__ex2g4s_0 = value.q1().t();
1330
+ while (_iterator__ex2g4s_0.u()) {
1331
+ var item_0 = _iterator__ex2g4s_0.v();
1332
+ var tmp_11;
1333
+ var tmp_12 = item_0.s2();
1334
+ if (tmp_12 instanceof CborItem) {
1335
+ var tmp_13 = item_0.s2();
1336
+ tmp_11 = tmp_13 instanceof CborItem ? tmp_13 : THROW_CCE();
1337
+ } else {
1338
+ tmp_11 = any_getInstance().newCborItem(item_0.s2());
1339
+ }
1340
+ var tmp_14 = tmp_11;
1341
+ var tmp_15;
1342
+ var tmp_16 = item_0.t2();
1343
+ if (tmp_16 instanceof CborItem) {
1344
+ var tmp_17 = item_0.t2();
1345
+ tmp_15 = tmp_17 instanceof CborItem ? tmp_17 : THROW_CCE();
1346
+ } else {
1347
+ tmp_15 = any_getInstance().newCborItem(item_0.t2());
1348
+ }
1349
+ var tmp$ret$7 = new Pair(tmp_14, tmp_15);
1350
+ destination_0.j1(tmp$ret$7);
1351
+ }
1352
+ // Inline function 'kotlin.collections.toTypedArray' call
1353
+ var tmp$ret$8 = copyToArray(destination_0);
1354
+ tmp_9 = tmp_10.newMap(mutableMapOf(tmp$ret$8.slice()));
1355
+ } else {
1356
+ tmp_9 = map_getInstance().fromJson(get_jsonObject(jsonElement));
1357
+ }
1358
+ tmp_1 = tmp_9;
1359
+ } else {
1360
+ throw IllegalArgumentException_init_$Create$('newCborItem for ' + toString(value) + ' Not implemented yet');
1361
+ }
1362
+ }
1363
+ }
1364
+ }
1365
+ }
1366
+ }
1367
+ }
1368
+ }
1369
+ }
1370
+ return tmp_1;
1371
+ } else if (this.equals(bool_getInstance())) {
1372
+ tmp_0 = jsonElement === null ? bool_getInstance().newBool(equals(value, true)) : bool_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1373
+ } else if (this.equals(bstr_getInstance())) {
1374
+ var tmp_18;
1375
+ if (jsonElement === null) {
1376
+ var tmp_19 = bstr_getInstance();
1377
+ tmp_18 = tmp_19.newByteString((!(value == null) ? isByteArray(value) : false) ? value : THROW_CCE());
1378
+ } else {
1379
+ tmp_18 = bstr_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1380
+ }
1381
+ tmp_0 = tmp_18;
1382
+ } else if (this.equals(bstr_indef_length_getInstance())) {
1383
+ var tmp_20;
1384
+ if (jsonElement === null) {
1385
+ var tmp_21 = bstr_indef_length_getInstance();
1386
+ tmp_20 = tmp_21.newByteString((!(value == null) ? isInterface(value, KtList) : false) ? value : THROW_CCE());
1387
+ } else {
1388
+ // Inline function 'kotlin.TODO' call
1389
+ var reason = 'indef cddl from json not implemented yet';
1390
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
1391
+ }
1392
+ tmp_0 = tmp_20;
1393
+ } else if (this.equals(bytes_getInstance())) {
1394
+ var tmp_22;
1395
+ if (jsonElement === null) {
1396
+ var tmp_23 = bytes_getInstance();
1397
+ tmp_22 = tmp_23.newBytes((!(value == null) ? isByteArray(value) : false) ? value : THROW_CCE());
1398
+ } else {
1399
+ tmp_22 = bytes_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1400
+ }
1401
+ tmp_0 = tmp_22;
1402
+ } else if (this.equals(float_getInstance())) {
1403
+ var tmp_24;
1404
+ if (jsonElement === null) {
1405
+ var tmp_25 = float_getInstance();
1406
+ tmp_24 = tmp_25.newFloat((!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());
1407
+ } else {
1408
+ tmp_24 = float_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1409
+ }
1410
+ tmp_0 = tmp_24;
1411
+ } else if (this.equals(float16_getInstance())) {
1412
+ var tmp_26;
1413
+ if (jsonElement === null) {
1414
+ var tmp_27 = float16_getInstance();
1415
+ tmp_26 = tmp_27.newFloat16((!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());
1416
+ } else {
1417
+ tmp_26 = float16_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1418
+ }
1419
+ tmp_0 = tmp_26;
1420
+ } else if (this.equals(float32_getInstance())) {
1421
+ var tmp_28;
1422
+ if (jsonElement === null) {
1423
+ var tmp_29 = float32_getInstance();
1424
+ tmp_28 = tmp_29.newFloat32((!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());
1425
+ } else {
1426
+ tmp_28 = float32_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1427
+ }
1428
+ tmp_0 = tmp_28;
1429
+ } else if (this.equals(float64_getInstance())) {
1430
+ var tmp_30;
1431
+ if (jsonElement === null) {
1432
+ var tmp_31 = float64_getInstance();
1433
+ tmp_30 = tmp_31.newFloat64((!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());
1434
+ } else {
1435
+ tmp_30 = float64_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1436
+ }
1437
+ tmp_0 = tmp_30;
1438
+ } else if (this.equals(full_date_getInstance())) {
1439
+ var tmp_32;
1440
+ if (jsonElement === null) {
1441
+ var tmp_33 = full_date_getInstance();
1442
+ tmp_32 = tmp_33.newFullDate((!(value == null) ? typeof value === 'string' : false) ? value : THROW_CCE());
1443
+ } else {
1444
+ tmp_32 = full_date_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1445
+ }
1446
+ tmp_0 = tmp_32;
1447
+ } else if (this.equals(int_getInstance())) {
1448
+ var tmp_34;
1449
+ if (jsonElement === null) {
1450
+ var tmp_35 = int_getInstance();
1451
+ tmp_34 = tmp_35.newInt((!(value == null) ? typeof value === 'number' : false) ? value : THROW_CCE());
1452
+ } else {
1453
+ tmp_34 = int_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1454
+ }
1455
+ tmp_0 = tmp_34;
1456
+ } else if (this.equals(list_getInstance())) {
1457
+ var tmp_36;
1458
+ if (jsonElement === null) {
1459
+ var tmp_37;
1460
+ if (value instanceof CborArray) {
1461
+ tmp_37 = value;
1462
+ } else {
1463
+ var tmp_38 = list_getInstance();
1464
+ // Inline function 'kotlin.collections.map' call
1465
+ var this_0 = (!(value == null) ? isInterface(value, KtList) : false) ? value : THROW_CCE();
1466
+ // Inline function 'kotlin.collections.mapTo' call
1467
+ var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1468
+ var _iterator__ex2g4s_1 = this_0.t();
1469
+ while (_iterator__ex2g4s_1.u()) {
1470
+ var item_1 = _iterator__ex2g4s_1.v();
1471
+ var tmp_39;
1472
+ if (item_1 instanceof CborItem) {
1473
+ tmp_39 = item_1;
1474
+ } else {
1475
+ tmp_39 = any_getInstance().newCborItem(item_1);
1476
+ }
1477
+ var tmp$ret$12 = tmp_39;
1478
+ destination_1.j1(tmp$ret$12);
1479
+ }
1480
+ tmp_37 = tmp_38.newList(toMutableList(destination_1));
1481
+ }
1482
+ tmp_36 = tmp_37;
1483
+ } else {
1484
+ tmp_36 = list_getInstance().fromJson(get_jsonArray(jsonElement));
1485
+ }
1486
+ tmp_0 = tmp_36;
1487
+ } else if (this.equals(map_getInstance())) {
1488
+ var tmp_40;
1489
+ if (jsonElement === null) {
1490
+ var tmp_41;
1491
+ if (value instanceof CborMap) {
1492
+ tmp_41 = value;
1493
+ } else {
1494
+ var tmp_42 = map_getInstance();
1495
+ // Inline function 'kotlin.collections.map' call
1496
+ var this_1 = (!(value == null) ? isInterface(value, KtMap) : false) ? value : THROW_CCE();
1497
+ // Inline function 'kotlin.collections.mapTo' call
1498
+ var destination_2 = ArrayList_init_$Create$(this_1.l1());
1499
+ // Inline function 'kotlin.collections.iterator' call
1500
+ var _iterator__ex2g4s_2 = this_1.q1().t();
1501
+ while (_iterator__ex2g4s_2.u()) {
1502
+ var item_2 = _iterator__ex2g4s_2.v();
1503
+ var tmp_43;
1504
+ var tmp_44 = item_2.s2();
1505
+ if (tmp_44 instanceof CborItem) {
1506
+ var tmp_45 = item_2.s2();
1507
+ tmp_43 = tmp_45 instanceof CborItem ? tmp_45 : THROW_CCE();
1508
+ } else {
1509
+ tmp_43 = any_getInstance().newCborItem(item_2.s2());
1510
+ }
1511
+ var tmp_46 = tmp_43;
1512
+ var tmp_47;
1513
+ var tmp_48 = item_2.t2();
1514
+ if (tmp_48 instanceof CborItem) {
1515
+ var tmp_49 = item_2.t2();
1516
+ tmp_47 = tmp_49 instanceof CborItem ? tmp_49 : THROW_CCE();
1517
+ } else {
1518
+ tmp_47 = any_getInstance().newCborItem(item_2.t2());
1519
+ }
1520
+ var tmp$ret$16 = new Pair(tmp_46, tmp_47);
1521
+ destination_2.j1(tmp$ret$16);
1522
+ }
1523
+ // Inline function 'kotlin.collections.toTypedArray' call
1524
+ var tmp$ret$17 = copyToArray(destination_2);
1525
+ tmp_41 = tmp_42.newMap(mutableMapOf(tmp$ret$17.slice()));
1526
+ }
1527
+ tmp_40 = tmp_41;
1528
+ } else {
1529
+ return map_getInstance().fromJson(get_jsonObject(jsonElement));
1530
+ }
1531
+ tmp_0 = tmp_40;
1532
+ } else if (this.equals(nil_getInstance())) {
1533
+ tmp_0 = nil_getInstance().newNil();
1534
+ } else if (this.equals(nint_getInstance())) {
1535
+ var tmp_50;
1536
+ if (jsonElement === null) {
1537
+ var tmp_51 = nint_getInstance();
1538
+ var tmp_52;
1539
+ if (isNumber(value)) {
1540
+ tmp_52 = numberToLong(value);
1541
+ } else {
1542
+ tmp_52 = (!(value == null) ? typeof value === 'bigint' : false) ? value : THROW_CCE();
1543
+ }
1544
+ tmp_50 = tmp_51.newNInt(tmp_52);
1545
+ } else {
1546
+ tmp_50 = nint_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1547
+ }
1548
+ tmp_0 = tmp_50;
1549
+ } else if (this.equals(tdate_getInstance())) {
1550
+ var tmp_53;
1551
+ if (jsonElement === null) {
1552
+ var tmp_54 = tdate_getInstance();
1553
+ tmp_53 = tmp_54.newTDate((!(value == null) ? typeof value === 'string' : false) ? value : THROW_CCE());
1554
+ } else {
1555
+ tmp_53 = tdate_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1556
+ }
1557
+ tmp_0 = tmp_53;
1558
+ } else if (this.equals(text_getInstance())) {
1559
+ var tmp_55;
1560
+ if (jsonElement === null) {
1561
+ var tmp_56 = text_getInstance();
1562
+ tmp_55 = tmp_56.newText((!(value == null) ? typeof value === 'string' : false) ? value : THROW_CCE());
1563
+ } else {
1564
+ tmp_55 = text_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1565
+ }
1566
+ tmp_0 = tmp_55;
1567
+ } else if (this.equals(time_getInstance())) {
1568
+ var tmp_57;
1569
+ if (jsonElement === null) {
1570
+ var tmp_58 = time_getInstance();
1571
+ tmp_57 = tmp_58.newTime((!(value == null) ? typeof value === 'bigint' : false) ? value : THROW_CCE());
1572
+ } else {
1573
+ tmp_57 = time_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1574
+ }
1575
+ tmp_0 = tmp_57;
1576
+ } else if (this.equals(tstr_indef_length_getInstance())) {
1577
+ var tmp_59;
1578
+ if (!(jsonElement === null)) {
1579
+ var tmp_60 = tstr_indef_length_getInstance();
1580
+ tmp_59 = tmp_60.newStringIndefLength((!(value == null) ? isInterface(value, KtList) : false) ? value : THROW_CCE());
1581
+ } else {
1582
+ // Inline function 'kotlin.TODO' call
1583
+ var reason_0 = 'tstr indef length from json to cbor not implemented';
1584
+ throw new NotImplementedError('An operation is not implemented: ' + reason_0);
1585
+ }
1586
+ tmp_0 = tmp_59;
1587
+ } else if (this.equals(uint_getInstance())) {
1588
+ var tmp_61;
1589
+ if (jsonElement === null) {
1590
+ var tmp_62 = uint_getInstance();
1591
+ var tmp_63;
1592
+ if (!(value == null) ? typeof value === 'bigint' : false) {
1593
+ tmp_63 = value;
1594
+ } else {
1595
+ if (isNumber(value)) {
1596
+ tmp_63 = numberToLong(value);
1597
+ } else {
1598
+ tmp_63 = (!(value == null) ? typeof value === 'bigint' : false) ? value : THROW_CCE();
1599
+ }
1600
+ }
1601
+ tmp_61 = tmp_62.newUint(tmp_63);
1602
+ } else {
1603
+ tmp_61 = uint_getInstance().fromJson(get_jsonPrimitive(jsonElement));
1604
+ }
1605
+ tmp_0 = tmp_61;
1606
+ } else if (this.equals(undefined_getInstance())) {
1607
+ tmp_0 = undefined_getInstance().newUndefined();
1608
+ } else {
1609
+ noWhenBranchMatchedException();
1610
+ }
1611
+ return tmp_0;
1612
+ };
1613
+ protoOf(CDDL).j2s = function (additionalInfo) {
1614
+ // Inline function 'kotlin.collections.isNotEmpty' call
1615
+ // Inline function 'kotlin.collections.isEmpty' call
1616
+ if (!(this.aliasFor.length === 0)) {
1617
+ if (additionalInfo == null) {
1618
+ return this.aliasFor[0].toTag(additionalInfo);
1619
+ }
1620
+ var tmp0 = util_getInstance().entries;
1621
+ var tmp$ret$2;
1622
+ $l$block: {
1623
+ // Inline function 'kotlin.collections.first' call
1624
+ var inductionVariable = 0;
1625
+ var last = tmp0.length;
1626
+ while (inductionVariable < last) {
1627
+ var element = tmp0[inductionVariable];
1628
+ inductionVariable = inductionVariable + 1 | 0;
1629
+ if (equals(element.majorType, this.majorType) && element.info === additionalInfo) {
1630
+ tmp$ret$2 = element;
1631
+ break $l$block;
1632
+ }
1633
+ }
1634
+ throw NoSuchElementException_init_$Create$('Array contains no element matching the predicate.');
1635
+ }
1636
+ return tmp$ret$2.toTag(additionalInfo);
1637
+ }
1638
+ var tag = '#';
1639
+ if (!(this.majorType == null)) {
1640
+ tag = tag + toString(this.majorType);
1641
+ }
1642
+ if (!(additionalInfo == null)) {
1643
+ tag = tag + ('.' + additionalInfo);
1644
+ }
1645
+ return tag;
1646
+ };
1647
+ protoOf(CDDL).toString = function () {
1648
+ return "CDDL(format='" + this.format + "', majorType=" + toString(this.majorType) + ', info=' + this.info + ', aliasFor=' + contentToString(this.aliasFor) + ')';
1649
+ };
1650
+ protoOf(CDDL).equals = function (other) {
1651
+ if (this === other)
1652
+ return true;
1653
+ if (!(other instanceof CDDL))
1654
+ return false;
1655
+ if (!(this.format === other.format))
1656
+ return false;
1657
+ if (!equals(this.majorType, other.majorType))
1658
+ return false;
1659
+ if (!(this.info == other.info))
1660
+ return false;
1661
+ if (!contentEquals(this.aliasFor, other.aliasFor))
1662
+ return false;
1663
+ return true;
1664
+ };
1665
+ protoOf(CDDL).hashCode = function () {
1666
+ var result = getStringHashCode(this.format);
1667
+ var tmp = imul(31, result);
1668
+ var tmp0_safe_receiver = this.majorType;
1669
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hashCode();
1670
+ result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
1671
+ var tmp_0 = imul(31, result);
1672
+ var tmp2_elvis_lhs = this.info;
1673
+ result = tmp_0 + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;
1674
+ result = imul(31, result) + contentHashCode(this.aliasFor) | 0;
1675
+ return result;
1676
+ };
1677
+ function CDDLSerializer() {
1678
+ CDDLSerializer_instance = this;
1679
+ this.y2w_1 = PrimitiveSerialDescriptor('CDDL', STRING_getInstance());
1680
+ }
1681
+ protoOf(CDDLSerializer).sp = function () {
1682
+ return this.y2w_1;
1683
+ };
1684
+ protoOf(CDDLSerializer).z2w = function (encoder, value) {
1685
+ encoder.ku(value.format);
1686
+ };
1687
+ protoOf(CDDLSerializer).fq = function (encoder, value) {
1688
+ return this.z2w(encoder, value instanceof CDDL ? value : THROW_CCE());
1689
+ };
1690
+ protoOf(CDDLSerializer).gq = function (decoder) {
1691
+ return util_getInstance().fromFormat(decoder.ct());
1692
+ };
1693
+ var CDDLSerializer_instance;
1694
+ function CDDLSerializer_getInstance() {
1695
+ if (CDDLSerializer_instance == null)
1696
+ new CDDLSerializer();
1697
+ return CDDLSerializer_instance;
1698
+ }
1699
+ function CborAny(value) {
1700
+ CborItem.call(this, value, any_getInstance());
1701
+ }
1702
+ protoOf(CborAny).n2r = function (builder) {
1703
+ var tmp = this.cddl;
1704
+ (tmp instanceof CDDL ? tmp : THROW_CCE()).newCborItem(this.value).n2r(builder);
1705
+ };
1706
+ protoOf(CborAny).toJsonSimple = function () {
1707
+ // Inline function 'kotlin.TODO' call
1708
+ var reason = 'No to Json on a Cbor Any yet';
1709
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
1710
+ };
1711
+ function CborArray$toJsonCborItem$1(this$0) {
1712
+ this.c2x_1 = this$0.cddl;
1713
+ this.d2x_1 = this$0.toJsonWithCDDL();
1714
+ }
1715
+ protoOf(CborArray$toJsonCborItem$1).a2s = function () {
1716
+ return this.c2x_1;
1717
+ };
1718
+ protoOf(CborArray$toJsonCborItem$1).t2 = function () {
1719
+ return this.d2x_1;
1720
+ };
1721
+ function CborArray(value, indefiniteLength) {
1722
+ var tmp;
1723
+ if (value === VOID) {
1724
+ // Inline function 'kotlin.collections.mutableListOf' call
1725
+ tmp = ArrayList_init_$Create$_0();
1726
+ } else {
1727
+ tmp = value;
1728
+ }
1729
+ value = tmp;
1730
+ indefiniteLength = indefiniteLength === VOID ? false : indefiniteLength;
1731
+ CborCollectionItem.call(this, value, list_getInstance());
1732
+ this.indefiniteLength = indefiniteLength;
1733
+ }
1734
+ protoOf(CborArray).g2x = function () {
1735
+ return this.indefiniteLength;
1736
+ };
1737
+ protoOf(CborArray).required = function (idx) {
1738
+ if (idx > this.value.l1()) {
1739
+ throw IllegalArgumentException_init_$Create$('Index ' + idx + ' out of bounds');
1740
+ }
1741
+ return this.value.m1(idx);
1742
+ };
1743
+ protoOf(CborArray).optional = function (idx) {
1744
+ var tmp0_elvis_lhs = getOrNull(this.value, idx);
1745
+ var tmp;
1746
+ if (tmp0_elvis_lhs == null) {
1747
+ return null;
1748
+ } else {
1749
+ tmp = tmp0_elvis_lhs;
1750
+ }
1751
+ var item = tmp;
1752
+ var tmp_0;
1753
+ if (item instanceof CborNil) {
1754
+ tmp_0 = true;
1755
+ } else {
1756
+ tmp_0 = item instanceof CborNull;
1757
+ }
1758
+ if (tmp_0)
1759
+ return null;
1760
+ return item;
1761
+ };
1762
+ protoOf(CborArray).toJsonSimple = function () {
1763
+ // Inline function 'kotlin.collections.map' call
1764
+ var this_0 = this.value;
1765
+ // Inline function 'kotlin.collections.mapTo' call
1766
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1767
+ var _iterator__ex2g4s = this_0.t();
1768
+ while (_iterator__ex2g4s.u()) {
1769
+ var item = _iterator__ex2g4s.v();
1770
+ var tmp$ret$2 = item.toJsonSimple();
1771
+ destination.j1(tmp$ret$2);
1772
+ }
1773
+ return new JsonArray(destination);
1774
+ };
1775
+ protoOf(CborArray).toJsonWithCDDL = function () {
1776
+ // Inline function 'kotlin.collections.map' call
1777
+ var this_0 = this.value;
1778
+ // Inline function 'kotlin.collections.mapTo' call
1779
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1780
+ var _iterator__ex2g4s = this_0.t();
1781
+ while (_iterator__ex2g4s.u()) {
1782
+ var item = _iterator__ex2g4s.v();
1783
+ var tmp$ret$2 = item.toJsonWithCDDL();
1784
+ destination.j1(tmp$ret$2);
1785
+ }
1786
+ return new JsonArray(destination);
1787
+ };
1788
+ protoOf(CborArray).toJsonCborItem = function () {
1789
+ return new CborArray$toJsonCborItem$1(this);
1790
+ };
1791
+ protoOf(CborArray).n2r = function (builder) {
1792
+ if (this.indefiniteLength) {
1793
+ var majorTypeShifted = ensureNotNull(this.majorType).type << 5;
1794
+ builder.o2c(toByte(majorTypeShifted + 31 | 0));
1795
+ // Inline function 'kotlin.collections.forEach' call
1796
+ var _iterator__ex2g4s = this.value.t();
1797
+ while (_iterator__ex2g4s.u()) {
1798
+ var element = _iterator__ex2g4s.v();
1799
+ (element instanceof CborItem ? element : THROW_CCE()).n2r(builder);
1800
+ }
1801
+ builder.o2c(-1);
1802
+ } else {
1803
+ cborEncodeLength(builder, ensureNotNull(this.majorType), this.value.l1());
1804
+ // Inline function 'kotlin.collections.forEach' call
1805
+ var _iterator__ex2g4s_0 = this.value.t();
1806
+ while (_iterator__ex2g4s_0.u()) {
1807
+ var element_0 = _iterator__ex2g4s_0.v();
1808
+ (element_0 instanceof CborItem ? element_0 : THROW_CCE()).n2r(builder);
1809
+ }
1810
+ }
1811
+ };
1812
+ protoOf(CborArray).toString = function () {
1813
+ return 'CborArray(value=' + stringify(this.value) + ', indefiniteLength=' + this.indefiniteLength + ')';
1814
+ };
1815
+ function _get_$cachedSerializer__te6jhj($this) {
1816
+ return $this.j2x_1.t2();
1817
+ }
1818
+ function CborBaseItem$Companion$_anonymous__u5lfyv() {
1819
+ var tmp = getKClass(CborBaseItem);
1820
+ // Inline function 'kotlin.arrayOf' call
1821
+ // Inline function 'kotlin.js.unsafeCast' call
1822
+ // Inline function 'kotlin.js.asDynamic' call
1823
+ var tmp_0 = [];
1824
+ // Inline function 'kotlin.arrayOf' call
1825
+ // Inline function 'kotlin.js.unsafeCast' call
1826
+ // Inline function 'kotlin.js.asDynamic' call
1827
+ var tmp_1 = [];
1828
+ // Inline function 'kotlin.arrayOf' call
1829
+ // Inline function 'kotlin.js.unsafeCast' call
1830
+ // Inline function 'kotlin.js.asDynamic' call
1831
+ var tmp$ret$6 = [];
1832
+ return SealedClassSerializer_init_$Create$('com.sphereon.cbor.CborBaseItem', tmp, tmp_0, tmp_1, tmp$ret$6);
1833
+ }
1834
+ function Companion_1() {
1835
+ Companion_instance_2 = this;
1836
+ var tmp = this;
1837
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
1838
+ tmp.j2x_1 = lazy_0(tmp_0, CborBaseItem$Companion$_anonymous__u5lfyv);
1839
+ }
1840
+ protoOf(Companion_1).t1e = function () {
1841
+ return _get_$cachedSerializer__te6jhj(this);
1842
+ };
1843
+ protoOf(Companion_1).x11 = function (typeParamsSerializers) {
1844
+ return this.t1e();
1845
+ };
1846
+ var Companion_instance_2;
1847
+ function Companion_getInstance_2() {
1848
+ if (Companion_instance_2 == null)
1849
+ new Companion_1();
1850
+ return Companion_instance_2;
1851
+ }
1852
+ function CborBaseItem(cddl) {
1853
+ Companion_getInstance_2();
1854
+ this.cddl = cddl;
1855
+ }
1856
+ protoOf(CborBaseItem).a2s = function () {
1857
+ return this.cddl;
1858
+ };
1859
+ function CborBool(value, cddl) {
1860
+ CborSimple.call(this, value, cddl);
1861
+ }
1862
+ protoOf(CborBool).toJsonSimple = function () {
1863
+ return JsonPrimitive_0(this.toValue());
1864
+ };
1865
+ function CborTrue() {
1866
+ CborBool.call(this, true, True_getInstance());
1867
+ if (!this.value) {
1868
+ throw IllegalArgumentException_init_$Create$('True requires value true');
1869
+ }
1870
+ }
1871
+ function CborFalse() {
1872
+ CborBool.call(this, false, False_getInstance());
1873
+ if (this.value) {
1874
+ throw IllegalArgumentException_init_$Create$('False requires value false');
1875
+ }
1876
+ }
1877
+ function CborBuilder(item, subject) {
1878
+ this.m2x_1 = item;
1879
+ this.n2x_1 = subject;
1880
+ }
1881
+ protoOf(CborBuilder).build = function () {
1882
+ return this.m2x_1;
1883
+ };
1884
+ protoOf(CborBuilder).subject = function () {
1885
+ return this.n2x_1;
1886
+ };
1887
+ protoOf(CborBuilder).encodedBuild = function () {
1888
+ return this.build().encodeCbor();
1889
+ };
1890
+ function Companion_2() {
1891
+ }
1892
+ protoOf(Companion_2).o2x = function (value) {
1893
+ return value.toBstr();
1894
+ };
1895
+ var Companion_instance_3;
1896
+ function Companion_getInstance_3() {
1897
+ return Companion_instance_3;
1898
+ }
1899
+ function fromCborItem(value) {
1900
+ return Companion_instance_3.o2x(value);
1901
+ }
1902
+ function CborByteString(value) {
1903
+ CborItem.call(this, value, bstr_getInstance());
1904
+ }
1905
+ protoOf(CborByteString).toJsonSimple = function () {
1906
+ return JsonPrimitive_1(this.encodeValueTo(Encoding_BASE64URL_getInstance()));
1907
+ };
1908
+ protoOf(CborByteString).n2r = function (builder) {
1909
+ cborEncodeLength(builder, ensureNotNull(this.majorType), this.value.length);
1910
+ builder.q2c(this.value);
1911
+ };
1912
+ protoOf(CborByteString).encodeValueTo = function (encoding) {
1913
+ return encodeTo(this.value, encoding);
1914
+ };
1915
+ protoOf(CborByteString).equals = function (other) {
1916
+ var tmp;
1917
+ if (other instanceof CborByteString) {
1918
+ tmp = contentEquals_0(this.value, other.value);
1919
+ } else {
1920
+ tmp = false;
1921
+ }
1922
+ return tmp;
1923
+ };
1924
+ protoOf(CborByteString).hashCode = function () {
1925
+ return contentHashCode_0(this.value);
1926
+ };
1927
+ protoOf(CborByteString).toString = function () {
1928
+ var sb = new StringBuilder('bstr(');
1929
+ var indexedObject = this.value;
1930
+ var inductionVariable = 0;
1931
+ var last = indexedObject.length;
1932
+ while (inductionVariable < last) {
1933
+ var b = indexedObject[inductionVariable];
1934
+ inductionVariable = inductionVariable + 1 | 0;
1935
+ sb.s(this.k2r_1[(b & 255) >> 4]);
1936
+ sb.s(this.k2r_1[b & 15]);
1937
+ }
1938
+ sb.q(')');
1939
+ return sb.toString();
1940
+ };
1941
+ function encodeToCborByteArray(_this__u8e3s4, encoding) {
1942
+ encoding = encoding === VOID ? null : encoding;
1943
+ // Inline function 'kotlin.collections.map' call
1944
+ // Inline function 'kotlin.collections.mapTo' call
1945
+ var destination = ArrayList_init_$Create$(_this__u8e3s4.length);
1946
+ var inductionVariable = 0;
1947
+ var last = _this__u8e3s4.length;
1948
+ while (inductionVariable < last) {
1949
+ var item = _this__u8e3s4[inductionVariable];
1950
+ inductionVariable = inductionVariable + 1 | 0;
1951
+ var tmp$ret$2 = toCborByteString_0(item, encoding);
1952
+ destination.j1(tmp$ret$2);
1953
+ }
1954
+ return new CborArray(toMutableList(destination));
1955
+ }
1956
+ function encodeToBase64Array(_this__u8e3s4, urlSafe) {
1957
+ urlSafe = urlSafe === VOID ? false : urlSafe;
1958
+ // Inline function 'kotlin.collections.map' call
1959
+ var this_0 = _this__u8e3s4.value;
1960
+ // Inline function 'kotlin.collections.mapTo' call
1961
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1962
+ var _iterator__ex2g4s = this_0.t();
1963
+ while (_iterator__ex2g4s.u()) {
1964
+ var item = _iterator__ex2g4s.v();
1965
+ var tmp$ret$2 = urlSafe ? item.encodeValueTo(Encoding_BASE64URL_getInstance()) : item.encodeValueTo(Encoding_BASE64_getInstance());
1966
+ destination.j1(tmp$ret$2);
1967
+ }
1968
+ // Inline function 'kotlin.collections.toTypedArray' call
1969
+ return copyToArray(destination);
1970
+ }
1971
+ function encodeToArray(_this__u8e3s4, encoding) {
1972
+ // Inline function 'kotlin.collections.map' call
1973
+ var this_0 = _this__u8e3s4.value;
1974
+ // Inline function 'kotlin.collections.mapTo' call
1975
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1976
+ var _iterator__ex2g4s = this_0.t();
1977
+ while (_iterator__ex2g4s.u()) {
1978
+ var item = _iterator__ex2g4s.v();
1979
+ var tmp$ret$2 = item.encodeValueTo(encoding);
1980
+ destination.j1(tmp$ret$2);
1981
+ }
1982
+ // Inline function 'kotlin.collections.toTypedArray' call
1983
+ return copyToArray(destination);
1984
+ }
1985
+ function toCborByteString(_this__u8e3s4) {
1986
+ return new CborByteString(_this__u8e3s4);
1987
+ }
1988
+ function CborByteStringIndefLength(value) {
1989
+ CborItem.call(this, value, bstr_indef_length_getInstance());
1990
+ }
1991
+ protoOf(CborByteStringIndefLength).toJsonSimple = function () {
1992
+ // Inline function 'kotlin.TODO' call
1993
+ var reason = 'Cbor bytestring indef length to JSON not implemented yet';
1994
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
1995
+ };
1996
+ protoOf(CborByteStringIndefLength).n2r = function (builder) {
1997
+ var majorTypeShifted = ensureNotNull(this.majorType).type << 5;
1998
+ builder.o2c(toByte(majorTypeShifted + 31 | 0));
1999
+ // Inline function 'kotlin.collections.forEach' call
2000
+ var _iterator__ex2g4s = this.value.t();
2001
+ while (_iterator__ex2g4s.u()) {
2002
+ var element = _iterator__ex2g4s.v();
2003
+ cborEncodeLength(builder, this.majorType, element.length);
2004
+ builder.q2c(element);
2005
+ }
2006
+ builder.o2c(-1);
2007
+ };
2008
+ function CborConst() {
2009
+ CborConst_instance = this;
2010
+ this.f2w_1 = 'cbor';
2011
+ this.g2w_1 = 'cddl';
2012
+ this.h2w_1 = 'key';
2013
+ this.i2w_1 = 'value';
2014
+ this.j2w_1 = 'sphereon:' + this.f2w_1;
2015
+ }
2016
+ var CborConst_instance;
2017
+ function CborConst_getInstance() {
2018
+ if (CborConst_instance == null)
2019
+ new CborConst();
2020
+ return CborConst_instance;
2021
+ }
2022
+ function CborTDate(value) {
2023
+ CborTagged.call(this, ensureNotNull(tdate_getInstance().info), new CborString(Companion_instance.e2m(value).toMdocTdateString()));
2024
+ }
2025
+ protoOf(CborTDate).toJsonSimple = function () {
2026
+ return JsonPrimitive_1(this.toValue());
2027
+ };
2028
+ function CborFullDate(value) {
2029
+ CborTagged.call(this, ensureNotNull(full_date_getInstance().info), new CborString(value));
2030
+ }
2031
+ protoOf(CborFullDate).toJsonSimple = function () {
2032
+ return JsonPrimitive_1(this.toValue());
2033
+ };
2034
+ function cborTDateToEpochSeconds(_this__u8e3s4, utils, timeZoneId) {
2035
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2036
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2037
+ return toInstant(cborTDateToLocalDateTime(_this__u8e3s4, utils, timeZoneId), utils.timeZone(timeZoneId)).cl_1;
2038
+ }
2039
+ function cborFullDateToEpochSeconds(_this__u8e3s4, utils, timeZoneId) {
2040
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2041
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2042
+ return toInstant(cborFullDateToLocalDateTime(_this__u8e3s4, utils, timeZoneId), utils.timeZone(timeZoneId)).cl_1;
2043
+ }
2044
+ function toCborFullDate(_this__u8e3s4, utils, timeZoneId) {
2045
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2046
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2047
+ return new CborFullDate(toLocalDateTime(_this__u8e3s4, utils, timeZoneId).p1u_1.toString());
2048
+ }
2049
+ function localDateToDateStringISO(_this__u8e3s4, utils, timeZoneId) {
2050
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2051
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2052
+ return utils.dateISO(timeZoneId, convertToInt(_this__u8e3s4.toInstant(utils, timeZoneId).cl_1));
2053
+ }
2054
+ function localDateToCborFullDate(_this__u8e3s4) {
2055
+ return toCborFullDate(_this__u8e3s4.toString());
2056
+ }
2057
+ function instantToDateStringISO(_this__u8e3s4, utils, timeZoneId) {
2058
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2059
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2060
+ return utils.dateISO(timeZoneId, convertToInt(_this__u8e3s4.cl_1));
2061
+ }
2062
+ function cborTDateToLocalDateTime(_this__u8e3s4, utils, timeZoneId) {
2063
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2064
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2065
+ return toLocalDateTime(_this__u8e3s4.value, utils, timeZoneId);
2066
+ }
2067
+ function cborFullDateToLocalDateTime(_this__u8e3s4, utils, timeZoneId) {
2068
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2069
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2070
+ return toLocalDateTime(_this__u8e3s4.value, utils, timeZoneId);
2071
+ }
2072
+ function toLocalDateTime(_this__u8e3s4, utils, timeZoneId) {
2073
+ utils = utils === VOID ? Companion_getInstance().d2m_1 : utils;
2074
+ timeZoneId = timeZoneId === VOID ? null : timeZoneId;
2075
+ return toKotlin(utils.dateTime(timeZoneId, convertToInt(Companion_instance.e2m(_this__u8e3s4).toEpochSeconds(timeZoneId))));
2076
+ }
2077
+ function Companion_3() {
2078
+ Companion_instance_4 = this;
2079
+ this.DEFAULT_MAX_DEPTH = 64;
2080
+ this.DEFAULT_MAX_ITEMS = 1000000;
2081
+ this.DEFAULT_MAX_STRING_LENGTH = 10000000;
2082
+ this.y2x_1 = new CborDecoderConfig();
2083
+ this.z2x_1 = new CborDecoderConfig(2147483647, 2147483647, 2147483647);
2084
+ this.a2y_1 = new CborDecoderConfig(32, 100000, 1000000);
2085
+ }
2086
+ protoOf(Companion_3).b2y = function () {
2087
+ return this.DEFAULT_MAX_DEPTH;
2088
+ };
2089
+ protoOf(Companion_3).c2y = function () {
2090
+ return this.DEFAULT_MAX_ITEMS;
2091
+ };
2092
+ protoOf(Companion_3).d2y = function () {
2093
+ return this.DEFAULT_MAX_STRING_LENGTH;
2094
+ };
2095
+ protoOf(Companion_3).l2o = function () {
2096
+ return this.y2x_1;
2097
+ };
2098
+ protoOf(Companion_3).e2y = function () {
2099
+ return this.z2x_1;
2100
+ };
2101
+ protoOf(Companion_3).f2y = function () {
2102
+ return this.a2y_1;
2103
+ };
2104
+ var Companion_instance_4;
2105
+ function Companion_getInstance_4() {
2106
+ if (Companion_instance_4 == null)
2107
+ new Companion_3();
2108
+ return Companion_instance_4;
2109
+ }
2110
+ function get_DEFAULT() {
2111
+ return Companion_getInstance_4().y2x_1;
2112
+ }
2113
+ function get_PERMISSIVE() {
2114
+ return Companion_getInstance_4().z2x_1;
2115
+ }
2116
+ function get_STRICT() {
2117
+ return Companion_getInstance_4().a2y_1;
2118
+ }
2119
+ function CborDecoderConfig(maxDepth, maxItems, maxStringLength) {
2120
+ Companion_getInstance_4();
2121
+ maxDepth = maxDepth === VOID ? 64 : maxDepth;
2122
+ maxItems = maxItems === VOID ? 1000000 : maxItems;
2123
+ maxStringLength = maxStringLength === VOID ? 10000000 : maxStringLength;
2124
+ this.maxDepth = maxDepth;
2125
+ this.maxItems = maxItems;
2126
+ this.maxStringLength = maxStringLength;
2127
+ // Inline function 'kotlin.require' call
2128
+ if (!(this.maxDepth > 0)) {
2129
+ var message = 'maxDepth must be positive';
2130
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
2131
+ }
2132
+ // Inline function 'kotlin.require' call
2133
+ if (!(this.maxItems > 0)) {
2134
+ var message_0 = 'maxItems must be positive';
2135
+ throw IllegalArgumentException_init_$Create$(toString_0(message_0));
2136
+ }
2137
+ // Inline function 'kotlin.require' call
2138
+ if (!(this.maxStringLength > 0)) {
2139
+ var message_1 = 'maxStringLength must be positive';
2140
+ throw IllegalArgumentException_init_$Create$(toString_0(message_1));
2141
+ }
2142
+ }
2143
+ protoOf(CborDecoderConfig).g2y = function () {
2144
+ return this.maxDepth;
2145
+ };
2146
+ protoOf(CborDecoderConfig).h2y = function () {
2147
+ return this.maxItems;
2148
+ };
2149
+ protoOf(CborDecoderConfig).i2y = function () {
2150
+ return this.maxStringLength;
2151
+ };
2152
+ protoOf(CborDecoderConfig).qf = function () {
2153
+ return this.maxDepth;
2154
+ };
2155
+ protoOf(CborDecoderConfig).rf = function () {
2156
+ return this.maxItems;
2157
+ };
2158
+ protoOf(CborDecoderConfig).lm = function () {
2159
+ return this.maxStringLength;
2160
+ };
2161
+ protoOf(CborDecoderConfig).j2y = function (maxDepth, maxItems, maxStringLength) {
2162
+ return new CborDecoderConfig(maxDepth, maxItems, maxStringLength);
2163
+ };
2164
+ protoOf(CborDecoderConfig).copy = function (maxDepth, maxItems, maxStringLength, $super) {
2165
+ maxDepth = maxDepth === VOID ? this.maxDepth : maxDepth;
2166
+ maxItems = maxItems === VOID ? this.maxItems : maxItems;
2167
+ maxStringLength = maxStringLength === VOID ? this.maxStringLength : maxStringLength;
2168
+ return $super === VOID ? this.j2y(maxDepth, maxItems, maxStringLength) : $super.j2y.call(this, maxDepth, maxItems, maxStringLength);
2169
+ };
2170
+ protoOf(CborDecoderConfig).toString = function () {
2171
+ return 'CborDecoderConfig(maxDepth=' + this.maxDepth + ', maxItems=' + this.maxItems + ', maxStringLength=' + this.maxStringLength + ')';
2172
+ };
2173
+ protoOf(CborDecoderConfig).hashCode = function () {
2174
+ var result = this.maxDepth;
2175
+ result = imul(result, 31) + this.maxItems | 0;
2176
+ result = imul(result, 31) + this.maxStringLength | 0;
2177
+ return result;
2178
+ };
2179
+ protoOf(CborDecoderConfig).equals = function (other) {
2180
+ if (this === other)
2181
+ return true;
2182
+ if (!(other instanceof CborDecoderConfig))
2183
+ return false;
2184
+ if (!(this.maxDepth === other.maxDepth))
2185
+ return false;
2186
+ if (!(this.maxItems === other.maxItems))
2187
+ return false;
2188
+ if (!(this.maxStringLength === other.maxStringLength))
2189
+ return false;
2190
+ return true;
2191
+ };
2192
+ function CborHexEncodedItem(hex) {
2193
+ CborByteString.call(this, decodeFromHex(hex));
2194
+ }
2195
+ function CborEncodedItem_init_$Init$(value, data, $this) {
2196
+ data = data === VOID ? null : data;
2197
+ CborEncodedItem_init_$Init$_0(new CborByteString(value), data, $this);
2198
+ return $this;
2199
+ }
2200
+ function fromBytes(value, data) {
2201
+ return CborEncodedItem_init_$Init$(value, data, objectCreate(protoOf(CborEncodedItem)));
2202
+ }
2203
+ function CborEncodedItem_init_$Init$_0(value, data, $this) {
2204
+ data = data === VOID ? null : data;
2205
+ CborEncodedItem.call($this, value);
2206
+ if (!(data == null)) {
2207
+ $this.m2y_1 = data;
2208
+ }
2209
+ return $this;
2210
+ }
2211
+ function Companion_4() {
2212
+ }
2213
+ protoOf(Companion_4).n2y = function (deserializedValue) {
2214
+ var tmp;
2215
+ if (!(deserializedValue == null) ? isByteArray(deserializedValue) : false) {
2216
+ tmp = new CborByteString(deserializedValue);
2217
+ } else {
2218
+ if (deserializedValue instanceof CborByteString) {
2219
+ tmp = deserializedValue;
2220
+ } else {
2221
+ if (deserializedValue instanceof CborEncodedItem) {
2222
+ tmp = new CborByteString(deserializedValue.value.value);
2223
+ } else {
2224
+ if (deserializedValue instanceof CborItem) {
2225
+ tmp = deserializedValue.toBstr();
2226
+ } else {
2227
+ throw IllegalArgumentException_init_$Create$('A CBOR item, encoded item, or byte array is required');
2228
+ }
2229
+ }
2230
+ }
2231
+ }
2232
+ return tmp;
2233
+ };
2234
+ protoOf(Companion_4).o2y = function (encoded) {
2235
+ return encoded.data();
2236
+ };
2237
+ var Companion_instance_5;
2238
+ function Companion_getInstance_5() {
2239
+ return Companion_instance_5;
2240
+ }
2241
+ function toData(encoded) {
2242
+ return Companion_instance_5.o2y(encoded);
2243
+ }
2244
+ function CborEncodedItem(value) {
2245
+ CborItem.call(this, new CborTagged(24, value), bstr_getInstance());
2246
+ this.isOriginal = !!(this.m2y_1 == null);
2247
+ }
2248
+ protoOf(CborEncodedItem).p2y = function (_set____db54di) {
2249
+ this.m2y_1 = _set____db54di;
2250
+ };
2251
+ protoOf(CborEncodedItem).q2y = function () {
2252
+ var tmp = this.m2y_1;
2253
+ if (!(tmp == null))
2254
+ return tmp;
2255
+ else {
2256
+ throwUninitializedPropertyAccessException('_data');
2257
+ }
2258
+ };
2259
+ protoOf(CborEncodedItem).r2y = function () {
2260
+ return this.isOriginal;
2261
+ };
2262
+ protoOf(CborEncodedItem).toJsonSimple = function () {
2263
+ return this.value.toJsonSimple();
2264
+ };
2265
+ protoOf(CborEncodedItem).toJsonWithCDDL = function () {
2266
+ return protoOf(CborItem).toJsonWithCDDL.call(this);
2267
+ };
2268
+ protoOf(CborEncodedItem).wasEncoded = function () {
2269
+ return this.isOriginal;
2270
+ };
2271
+ protoOf(CborEncodedItem).copy = function (data) {
2272
+ return fromBytes(this.value.value, data);
2273
+ };
2274
+ protoOf(CborEncodedItem).isDataInitialized = function () {
2275
+ return !(this.m2y_1 == null);
2276
+ };
2277
+ protoOf(CborEncodedItem).s2y = function (fromBytesCallback) {
2278
+ if (!(this.m2y_1 == null))
2279
+ return this._data;
2280
+ if (fromBytesCallback == null) {
2281
+ throw IllegalStateException_init_$Create$('Encoded data is not initialized. Decode through a typed codec and call copy(decodedValue), or pass a decoder callback explicitly.');
2282
+ }
2283
+ this.m2y_1 = fromBytesCallback(this.value.taggedItem.value);
2284
+ return this._data;
2285
+ };
2286
+ protoOf(CborEncodedItem).data = function (fromBytesCallback, $super) {
2287
+ fromBytesCallback = fromBytesCallback === VOID ? null : fromBytesCallback;
2288
+ return $super === VOID ? this.s2y(fromBytesCallback) : $super.s2y.call(this, fromBytesCallback);
2289
+ };
2290
+ protoOf(CborEncodedItem).n2r = function (builder) {
2291
+ this.value.n2r(builder);
2292
+ };
2293
+ protoOf(CborEncodedItem).equals = function (other) {
2294
+ if (this === other)
2295
+ return true;
2296
+ if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
2297
+ return false;
2298
+ return contentEquals_0(this.value.value, (other instanceof CborEncodedItem ? other : THROW_CCE()).value.value);
2299
+ };
2300
+ protoOf(CborEncodedItem).hashCode = function () {
2301
+ return this.value.hashCode();
2302
+ };
2303
+ protoOf(CborEncodedItem).toString = function () {
2304
+ var data = this.isDataInitialized() ? this._data : '<uninitialized>';
2305
+ return 'CborEncodedItem(_data=' + toString_0(data) + ', value=' + this.value.toString() + ', isOriginal=' + this.isOriginal + ')';
2306
+ };
2307
+ function cborEncodeLength(builder, majorType, length) {
2308
+ // Inline function 'kotlin.toULong' call
2309
+ var tmp$ret$0 = _ULong___init__impl__c78o9k(fromInt(length));
2310
+ return cborEncodeLength_0(builder, majorType, tmp$ret$0);
2311
+ }
2312
+ function cborEncodeLength_0(builder, majorType, length) {
2313
+ // Inline function 'kotlin.toUByte' call
2314
+ var this_0 = majorType.type << 5;
2315
+ var majorTypeShifted = _UByte___init__impl__g9hnc4(toByte(this_0));
2316
+ // Inline function 'kotlin.apply' call
2317
+ // Inline function 'kotlin.ULong.compareTo' call
2318
+ // Inline function 'kotlin.UInt.toULong' call
2319
+ var this_1 = _UInt___init__impl__l7qpdl(24);
2320
+ // Inline function 'kotlin.uintToULong' call
2321
+ // Inline function 'kotlin.uintToLong' call
2322
+ var value = _UInt___get_data__impl__f0vqqw(this_1);
2323
+ var tmp$ret$6 = fromInt(value) & 4294967295n;
2324
+ // Inline function 'kotlin.ULong.compareTo' call
2325
+ var other = _ULong___init__impl__c78o9k(tmp$ret$6);
2326
+ if (ulongCompare(_ULong___get_data__impl__fggpzb(length), _ULong___get_data__impl__fggpzb(other)) < 0) {
2327
+ // Inline function 'kotlin.ULong.toUByte' call
2328
+ // Inline function 'kotlin.toUByte' call
2329
+ var this_2 = _ULong___get_data__impl__fggpzb(length);
2330
+ // Inline function 'kotlin.UByte.or' call
2331
+ var other_0 = _UByte___init__impl__g9hnc4(convertToByte(this_2));
2332
+ var tmp0 = _UByte___get_data__impl__jof9qr(majorTypeShifted);
2333
+ // Inline function 'kotlin.experimental.or' call
2334
+ var other_1 = _UByte___get_data__impl__jof9qr(other_0);
2335
+ var tmp$ret$11 = toByte(tmp0 | other_1);
2336
+ var tmp$ret$10 = _UByte___init__impl__g9hnc4(tmp$ret$11);
2337
+ appendUInt8(builder, tmp$ret$10);
2338
+ } else {
2339
+ // Inline function 'kotlin.ULong.shl' call
2340
+ var this_3 = _ULong___init__impl__c78o9k(1n);
2341
+ // Inline function 'kotlin.ULong.compareTo' call
2342
+ var other_2 = _ULong___init__impl__c78o9k(shiftLeft(_ULong___get_data__impl__fggpzb(this_3), 8));
2343
+ if (ulongCompare(_ULong___get_data__impl__fggpzb(length), _ULong___get_data__impl__fggpzb(other_2)) < 0) {
2344
+ // Inline function 'kotlin.UByte.or' call
2345
+ var other_3 = _UByte___init__impl__g9hnc4(24);
2346
+ var tmp0_0 = _UByte___get_data__impl__jof9qr(majorTypeShifted);
2347
+ // Inline function 'kotlin.experimental.or' call
2348
+ var other_4 = _UByte___get_data__impl__jof9qr(other_3);
2349
+ var tmp$ret$15 = toByte(tmp0_0 | other_4);
2350
+ var tmp$ret$14 = _UByte___init__impl__g9hnc4(tmp$ret$15);
2351
+ var tmp = appendUInt8(builder, tmp$ret$14);
2352
+ // Inline function 'kotlin.ULong.toUByte' call
2353
+ // Inline function 'kotlin.toUByte' call
2354
+ var this_4 = _ULong___get_data__impl__fggpzb(length);
2355
+ var tmp$ret$16 = _UByte___init__impl__g9hnc4(convertToByte(this_4));
2356
+ appendUInt8(tmp, tmp$ret$16);
2357
+ } else {
2358
+ // Inline function 'kotlin.ULong.shl' call
2359
+ var this_5 = _ULong___init__impl__c78o9k(1n);
2360
+ // Inline function 'kotlin.ULong.compareTo' call
2361
+ var other_5 = _ULong___init__impl__c78o9k(shiftLeft(_ULong___get_data__impl__fggpzb(this_5), 16));
2362
+ if (ulongCompare(_ULong___get_data__impl__fggpzb(length), _ULong___get_data__impl__fggpzb(other_5)) < 0) {
2363
+ // Inline function 'kotlin.UByte.or' call
2364
+ var other_6 = _UByte___init__impl__g9hnc4(25);
2365
+ var tmp0_1 = _UByte___get_data__impl__jof9qr(majorTypeShifted);
2366
+ // Inline function 'kotlin.experimental.or' call
2367
+ var other_7 = _UByte___get_data__impl__jof9qr(other_6);
2368
+ var tmp$ret$21 = toByte(tmp0_1 | other_7);
2369
+ var tmp$ret$20 = _UByte___init__impl__g9hnc4(tmp$ret$21);
2370
+ var tmp_0 = appendUInt8(builder, tmp$ret$20);
2371
+ // Inline function 'kotlin.ULong.toUInt' call
2372
+ // Inline function 'kotlin.toUInt' call
2373
+ var this_6 = _ULong___get_data__impl__fggpzb(length);
2374
+ var tmp$ret$22 = _UInt___init__impl__l7qpdl(convertToInt(this_6));
2375
+ appendUInt16(tmp_0, tmp$ret$22);
2376
+ } else {
2377
+ // Inline function 'kotlin.ULong.shl' call
2378
+ var this_7 = _ULong___init__impl__c78o9k(1n);
2379
+ // Inline function 'kotlin.ULong.compareTo' call
2380
+ var other_8 = _ULong___init__impl__c78o9k(shiftLeft(_ULong___get_data__impl__fggpzb(this_7), 32));
2381
+ if (ulongCompare(_ULong___get_data__impl__fggpzb(length), _ULong___get_data__impl__fggpzb(other_8)) < 0) {
2382
+ // Inline function 'kotlin.UByte.or' call
2383
+ var other_9 = _UByte___init__impl__g9hnc4(26);
2384
+ var tmp0_2 = _UByte___get_data__impl__jof9qr(majorTypeShifted);
2385
+ // Inline function 'kotlin.experimental.or' call
2386
+ var other_10 = _UByte___get_data__impl__jof9qr(other_9);
2387
+ var tmp$ret$27 = toByte(tmp0_2 | other_10);
2388
+ var tmp$ret$26 = _UByte___init__impl__g9hnc4(tmp$ret$27);
2389
+ var tmp_1 = appendUInt8(builder, tmp$ret$26);
2390
+ // Inline function 'kotlin.ULong.toUInt' call
2391
+ // Inline function 'kotlin.toUInt' call
2392
+ var this_8 = _ULong___get_data__impl__fggpzb(length);
2393
+ var tmp$ret$28 = _UInt___init__impl__l7qpdl(convertToInt(this_8));
2394
+ appendUInt32(tmp_1, tmp$ret$28);
2395
+ } else {
2396
+ // Inline function 'kotlin.UByte.or' call
2397
+ var other_11 = _UByte___init__impl__g9hnc4(27);
2398
+ var tmp0_3 = _UByte___get_data__impl__jof9qr(majorTypeShifted);
2399
+ // Inline function 'kotlin.experimental.or' call
2400
+ var other_12 = _UByte___get_data__impl__jof9qr(other_11);
2401
+ var tmp$ret$31 = toByte(tmp0_3 | other_12);
2402
+ var tmp$ret$30 = _UByte___init__impl__g9hnc4(tmp$ret$31);
2403
+ appendUInt64(appendUInt8(builder, tmp$ret$30), length);
2404
+ }
2405
+ }
2406
+ }
2407
+ }
2408
+ }
2409
+ function CborError() {
2410
+ }
2411
+ protoOf(CborError).t2y = function (current, max, severity, causes) {
2412
+ return new IdkError('CBOR_MAX_DEPTH_EXCEEDED', new Message('com.sphereon.cbor.error.max-depth-exceeded', mapOf([to('current', current), to('max', max)]), 'Maximum CBOR nesting depth exceeded: current=' + current + ', max=' + max), severity, VOID, causes, mapOf([to('currentDepth', current), to('maxDepth', max)]));
2413
+ };
2414
+ protoOf(CborError).MAX_DEPTH_EXCEEDED = function (current, max, severity, causes, $super) {
2415
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2416
+ causes = causes === VOID ? emptyList() : causes;
2417
+ return $super === VOID ? this.t2y(current, max, severity, causes) : $super.t2y.call(this, current, max, severity, causes);
2418
+ };
2419
+ protoOf(CborError).u2y = function (current, max, severity, causes) {
2420
+ return new IdkError('CBOR_MAX_ITEMS_EXCEEDED', new Message('com.sphereon.cbor.error.max-items-exceeded', mapOf([to('current', current), to('max', max)]), 'Maximum CBOR item count exceeded: current=' + current + ', max=' + max), severity, VOID, causes, mapOf([to('currentItems', current), to('maxItems', max)]));
2421
+ };
2422
+ protoOf(CborError).MAX_ITEMS_EXCEEDED = function (current, max, severity, causes, $super) {
2423
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2424
+ causes = causes === VOID ? emptyList() : causes;
2425
+ return $super === VOID ? this.u2y(current, max, severity, causes) : $super.u2y.call(this, current, max, severity, causes);
2426
+ };
2427
+ protoOf(CborError).v2y = function (length, max, severity, causes) {
2428
+ return new IdkError('CBOR_MAX_STRING_LENGTH_EXCEEDED', new Message('com.sphereon.cbor.error.max-string-length-exceeded', mapOf([to('length', length), to('max', max)]), 'Maximum CBOR string length exceeded: length=' + length + ', max=' + max), severity, VOID, causes, mapOf([to('stringLength', length), to('maxLength', max)]));
2429
+ };
2430
+ protoOf(CborError).MAX_STRING_LENGTH_EXCEEDED = function (length, max, severity, causes, $super) {
2431
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2432
+ causes = causes === VOID ? emptyList() : causes;
2433
+ return $super === VOID ? this.v2y(length, max, severity, causes) : $super.v2y.call(this, length, max, severity, causes);
2434
+ };
2435
+ protoOf(CborError).w2y = function (count, severity, causes) {
2436
+ return new IdkError('CBOR_LEFTOVER_BYTES', new Message('com.sphereon.cbor.error.leftover-bytes', mapOf_0(to('count', count)), '' + count + ' bytes leftover after decoding CBOR'), severity, VOID, causes, mapOf_0(to('leftoverBytes', count)));
2437
+ };
2438
+ protoOf(CborError).LEFTOVER_BYTES = function (count, severity, causes, $super) {
2439
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2440
+ causes = causes === VOID ? emptyList() : causes;
2441
+ return $super === VOID ? this.w2y(count, severity, causes) : $super.w2y.call(this, count, severity, causes);
2442
+ };
2443
+ protoOf(CborError).x2y = function (offset, required, available, severity, causes) {
2444
+ return new IdkError('CBOR_OUT_OF_BOUNDS', new Message('com.sphereon.cbor.error.out-of-bounds', mapOf([to('offset', offset), to('required', required), to('available', available)]), 'CBOR out of bounds: tried to read ' + required + ' bytes at offset ' + offset + ', but only ' + available + ' bytes available'), severity, VOID, causes, mapOf([to('offset', offset), to('required', required), to('available', available)]));
2445
+ };
2446
+ protoOf(CborError).OUT_OF_BOUNDS = function (offset, required, available, severity, causes, $super) {
2447
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2448
+ causes = causes === VOID ? emptyList() : causes;
2449
+ return $super === VOID ? this.x2y(offset, required, available, severity, causes) : $super.x2y.call(this, offset, required, available, severity, causes);
2450
+ };
2451
+ protoOf(CborError).y2y = function (offset, severity, causes) {
2452
+ return new IdkError('CBOR_INVALID_UTF8', new Message('com.sphereon.cbor.error.invalid-utf8', mapOf_0(to('offset', offset)), 'Invalid UTF-8 encoding at offset ' + offset), severity, VOID, causes, mapOf_0(to('offset', offset)));
2453
+ };
2454
+ protoOf(CborError).INVALID_UTF8 = function (offset, severity, causes, $super) {
2455
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2456
+ causes = causes === VOID ? emptyList() : causes;
2457
+ return $super === VOID ? this.y2y(offset, severity, causes) : $super.y2y.call(this, offset, severity, causes);
2458
+ };
2459
+ protoOf(CborError).z2y = function (value, offset, severity, causes) {
2460
+ return new IdkError('CBOR_INVALID_ADDITIONAL_INFO', new Message('com.sphereon.cbor.error.invalid-additional-info', mapOf([to('value', value), to('offset', offset)]), 'Invalid CBOR additional information value ' + value + ' at offset ' + offset), severity, VOID, causes, mapOf([to('additionalInfo', value), to('offset', offset)]));
2461
+ };
2462
+ protoOf(CborError).INVALID_ADDITIONAL_INFO = function (value, offset, severity, causes, $super) {
2463
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2464
+ causes = causes === VOID ? emptyList() : causes;
2465
+ return $super === VOID ? this.z2y(value, offset, severity, causes) : $super.z2y.call(this, value, offset, severity, causes);
2466
+ };
2467
+ protoOf(CborError).a2z = function (offset, severity, causes) {
2468
+ return new IdkError('CBOR_UNEXPECTED_BREAK', new Message('com.sphereon.cbor.error.unexpected-break', mapOf_0(to('offset', offset)), 'Unexpected BREAK code outside indefinite-length item at offset ' + offset), severity, VOID, causes, mapOf_0(to('offset', offset)));
2469
+ };
2470
+ protoOf(CborError).UNEXPECTED_BREAK = function (offset, severity, causes, $super) {
2471
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2472
+ causes = causes === VOID ? emptyList() : causes;
2473
+ return $super === VOID ? this.a2z(offset, severity, causes) : $super.a2z.call(this, offset, severity, causes);
2474
+ };
2475
+ protoOf(CborError).b2z = function (majorType, offset, severity, causes) {
2476
+ return new IdkError('CBOR_INDEFINITE_LENGTH_NOT_ALLOWED', new Message('com.sphereon.cbor.error.indefinite-length-not-allowed', mapOf([to('majorType', majorType), to('offset', offset)]), 'Indefinite length (additional information 31) not allowed for major type ' + majorType + ' at offset ' + offset), severity, VOID, causes, mapOf([to('majorType', majorType), to('offset', offset)]));
2477
+ };
2478
+ protoOf(CborError).INDEFINITE_LENGTH_NOT_ALLOWED = function (majorType, offset, severity, causes, $super) {
2479
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2480
+ causes = causes === VOID ? emptyList() : causes;
2481
+ return $super === VOID ? this.b2z(majorType, offset, severity, causes) : $super.b2z.call(this, majorType, offset, severity, causes);
2482
+ };
2483
+ protoOf(CborError).c2z = function (message, throwable, severity, causes) {
2484
+ return new IdkError('CBOR_DECODE_ERROR', new Message('com.sphereon.cbor.error.decode-error', mapOf_0(to('message', message)), 'CBOR decode error: ' + message), severity, VOID, causes, VOID, throwable);
2485
+ };
2486
+ protoOf(CborError).DECODE_ERROR = function (message, throwable, severity, causes, $super) {
2487
+ throwable = throwable === VOID ? null : throwable;
2488
+ severity = severity === VOID ? Severity_ERROR_getInstance() : severity;
2489
+ causes = causes === VOID ? emptyList() : causes;
2490
+ return $super === VOID ? this.c2z(message, throwable, severity, causes) : $super.c2z.call(this, message, throwable, severity, causes);
2491
+ };
2492
+ var CborError_instance;
2493
+ function CborError_getInstance() {
2494
+ return CborError_instance;
2495
+ }
2496
+ function CborFloat(value, cddl) {
2497
+ CborNumber.call(this, value, cddl);
2498
+ }
2499
+ protoOf(CborFloat).n2r = function (builder) {
2500
+ // Inline function 'kotlin.run' call
2501
+ var majorTypeShifted = toByte(ensureNotNull(this.majorType).type << 5);
2502
+ // Inline function 'kotlin.experimental.or' call
2503
+ var tmp$ret$2 = toByte(majorTypeShifted | 26);
2504
+ builder.o2c(tmp$ret$2);
2505
+ var raw = toRawBits(this.value);
2506
+ builder.o2c(toByte(raw >> 24 & 255));
2507
+ builder.o2c(toByte(raw >> 16 & 255));
2508
+ builder.o2c(toByte(raw >> 8 & 255));
2509
+ builder.o2c(toByte(raw >> 0 & 255));
2510
+ };
2511
+ function CborFloat16(value) {
2512
+ CborFloat.call(this, value, float16_getInstance());
2513
+ }
2514
+ function CborFloat32(value) {
2515
+ CborFloat.call(this, value, float32_getInstance());
2516
+ }
2517
+ function CborDouble(value) {
2518
+ CborItem.call(this, value, float64_getInstance());
2519
+ }
2520
+ protoOf(CborDouble).toJsonSimple = function () {
2521
+ return JsonPrimitive_2(this.toValue());
2522
+ };
2523
+ protoOf(CborDouble).n2r = function (builder) {
2524
+ // Inline function 'kotlin.run' call
2525
+ var majorTypeShifted = toByte(ensureNotNull(this.majorType).type << 5);
2526
+ // Inline function 'kotlin.experimental.or' call
2527
+ var tmp$ret$2 = toByte(majorTypeShifted | 27);
2528
+ builder.o2c(tmp$ret$2);
2529
+ var raw = toRawBits_0(this.value);
2530
+ builder.o2c(convertToByte(shiftRight(raw, 56) & 255n));
2531
+ builder.o2c(convertToByte(shiftRight(raw, 48) & 255n));
2532
+ builder.o2c(convertToByte(shiftRight(raw, 40) & 255n));
2533
+ builder.o2c(convertToByte(shiftRight(raw, 32) & 255n));
2534
+ builder.o2c(convertToByte(shiftRight(raw, 24) & 255n));
2535
+ builder.o2c(convertToByte(shiftRight(raw, 16) & 255n));
2536
+ builder.o2c(convertToByte(shiftRight(raw, 8) & 255n));
2537
+ builder.o2c(convertToByte(shiftRight(raw, 0) & 255n));
2538
+ return Unit_instance;
2539
+ };
2540
+ function CborItem$toJsonCborItem$1(this$0) {
2541
+ this.h2z_1 = this$0;
2542
+ }
2543
+ protoOf(CborItem$toJsonCborItem$1).a2s = function () {
2544
+ return this.h2z_1.cddl;
2545
+ };
2546
+ protoOf(CborItem$toJsonCborItem$1).t2 = function () {
2547
+ return this.h2z_1.toJsonWithCDDL();
2548
+ };
2549
+ function CborItem(value, cddl) {
2550
+ CborBaseItem.call(this, cddl);
2551
+ this.value = value;
2552
+ this.k2r_1 = toCharArray('0123456789abcdef');
2553
+ this.l2r_1 = cddl.majorType;
2554
+ this.info = cddl.info;
2555
+ this.z2r();
2556
+ }
2557
+ protoOf(CborItem).t2 = function () {
2558
+ return this.value;
2559
+ };
2560
+ protoOf(CborItem).m2r = function () {
2561
+ return this.k2r_1;
2562
+ };
2563
+ protoOf(CborItem).encodeCbor = function () {
2564
+ var builder = new ByteStringBuilder();
2565
+ this.n2r(builder);
2566
+ return builder.n2c().j2c();
2567
+ };
2568
+ protoOf(CborItem).o2r = function () {
2569
+ return this.l2r_1;
2570
+ };
2571
+ protoOf(CborItem).p2r = function () {
2572
+ return this.info;
2573
+ };
2574
+ protoOf(CborItem).q2r = function () {
2575
+ // Inline function 'kotlin.require' call
2576
+ // Inline function 'kotlin.require' call
2577
+ if (!(this instanceof CborString)) {
2578
+ var message = 'Failed requirement.';
2579
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
2580
+ }
2581
+ return this.value;
2582
+ };
2583
+ protoOf(CborItem).r2r = function () {
2584
+ // Inline function 'kotlin.require' call
2585
+ // Inline function 'kotlin.require' call
2586
+ if (!(this instanceof CborBool)) {
2587
+ var message = 'Failed requirement.';
2588
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
2589
+ }
2590
+ return this.value;
2591
+ };
2592
+ protoOf(CborItem).s2r = function () {
2593
+ // Inline function 'kotlin.require' call
2594
+ // Inline function 'kotlin.require' call
2595
+ if (!(this instanceof CborByteString)) {
2596
+ var message = 'Failed requirement.';
2597
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
2598
+ }
2599
+ return this.value;
2600
+ };
2601
+ protoOf(CborItem).toBstr = function () {
2602
+ var builder = new ByteStringBuilder();
2603
+ this.n2r(builder);
2604
+ return toCborByteString(builder.n2c().j2c());
2605
+ };
2606
+ protoOf(CborItem).t2r = function () {
2607
+ var tmp;
2608
+ if (this instanceof CborNInt) {
2609
+ tmp = negate(this.value);
2610
+ } else {
2611
+ if (this instanceof CborUInt) {
2612
+ tmp = this.value;
2613
+ } else {
2614
+ throw IllegalArgumentException_init_$Create$('Value ' + toString(this.value) + ' (' + toString_0(this.cddl) + ') is not long');
2615
+ }
2616
+ }
2617
+ return tmp;
2618
+ };
2619
+ protoOf(CborItem).u2r = function () {
2620
+ var tmp;
2621
+ if (this instanceof CborNInt) {
2622
+ var tmp_0;
2623
+ if (this.value > 2147483647n) {
2624
+ throw IllegalArgumentException_init_$Create$('Unsigned value does not fit in Int field');
2625
+ } else {
2626
+ tmp_0 = -convertToInt(this.value) | 0;
2627
+ }
2628
+ tmp = tmp_0;
2629
+ } else {
2630
+ if (this instanceof CborUInt) {
2631
+ var tmp_1;
2632
+ if (this.value > 2147483647n) {
2633
+ throw IllegalArgumentException_init_$Create$('Unsigned value does not fit in Int field');
2634
+ } else {
2635
+ tmp_1 = convertToInt(this.value);
2636
+ }
2637
+ tmp = tmp_1;
2638
+ } else {
2639
+ throw IllegalArgumentException_init_$Create$('Value ' + toString(this.value) + ' (' + toString_0(this.cddl) + ') is not int');
2640
+ }
2641
+ }
2642
+ return tmp;
2643
+ };
2644
+ protoOf(CborItem).toValue = function () {
2645
+ return this.value;
2646
+ };
2647
+ protoOf(CborItem).toJsonSimple = function () {
2648
+ throw IllegalArgumentException_init_$Create$('Because of boxing this method must be implemented in subclasses');
2649
+ };
2650
+ protoOf(CborItem).v2r = function (includeCDDL) {
2651
+ return includeCDDL ? this.toJsonWithCDDL() : this.toJsonSimple();
2652
+ };
2653
+ protoOf(CborItem).toJsonWithCDDL = function () {
2654
+ var cddl = JsonPrimitive_1(this.cddl.format);
2655
+ return new JsonObject(mapOf([new Pair(CborConst_getInstance().g2w_1, cddl), new Pair(CborConst_getInstance().i2w_1, this.toJsonSimple())]));
2656
+ };
2657
+ protoOf(CborItem).toJsonCborItem = function () {
2658
+ return new CborItem$toJsonCborItem$1(this);
2659
+ };
2660
+ protoOf(CborItem).w2r = function () {
2661
+ // Inline function 'kotlin.require' call
2662
+ // Inline function 'kotlin.require' call
2663
+ if (!(this instanceof CborMap)) {
2664
+ var message = 'Failed requirement.';
2665
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
2666
+ }
2667
+ var tmp = this.value;
2668
+ return isInterface(tmp, KtMutableMap) ? tmp : THROW_CCE();
2669
+ };
2670
+ protoOf(CborItem).x2r = function () {
2671
+ // Inline function 'kotlin.require' call
2672
+ // Inline function 'kotlin.require' call
2673
+ if (!(this instanceof CborArray)) {
2674
+ var message = 'Failed requirement.';
2675
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
2676
+ }
2677
+ var tmp = this.value;
2678
+ return isInterface(tmp, KtMutableList) ? tmp : THROW_CCE();
2679
+ };
2680
+ protoOf(CborItem).y2r = function () {
2681
+ // Inline function 'kotlin.require' call
2682
+ // Inline function 'kotlin.require' call
2683
+ if (!(this instanceof CborTagged)) {
2684
+ var message = 'Failed requirement.';
2685
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
2686
+ }
2687
+ return this.taggedItem;
2688
+ };
2689
+ protoOf(CborItem).z2r = function () {
2690
+ };
2691
+ protoOf(CborItem).toString = function () {
2692
+ return 'CborItem(' + CborConst_getInstance().i2w_1 + '=' + toString(this.value) + ', ' + CborConst_getInstance().g2w_1 + '=' + toString_0(this.cddl) + ')';
2693
+ };
2694
+ protoOf(CborItem).equals = function (other) {
2695
+ if (this === other)
2696
+ return true;
2697
+ if (!(other instanceof CborItem))
2698
+ return false;
2699
+ if (!equals(this.value, other.value))
2700
+ return false;
2701
+ if (!equals(this.majorType, other.majorType))
2702
+ return false;
2703
+ if (!(this.info == other.info))
2704
+ return false;
2705
+ return true;
2706
+ };
2707
+ protoOf(CborItem).hashCode = function () {
2708
+ var tmp0_safe_receiver = this.value;
2709
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
2710
+ var result = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
2711
+ var tmp = imul(31, result);
2712
+ var tmp2_safe_receiver = this.majorType;
2713
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hashCode();
2714
+ result = tmp + (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs) | 0;
2715
+ var tmp_0 = imul(31, result);
2716
+ var tmp4_elvis_lhs = this.info;
2717
+ result = tmp_0 + (tmp4_elvis_lhs == null ? 0 : tmp4_elvis_lhs) | 0;
2718
+ return result;
2719
+ };
2720
+ function CborCollectionItem(value, cddl) {
2721
+ CborItem.call(this, value, cddl);
2722
+ }
2723
+ function toCborItem(_this__u8e3s4) {
2724
+ var tmp;
2725
+ if (_this__u8e3s4 instanceof CborItem) {
2726
+ tmp = _this__u8e3s4;
2727
+ } else {
2728
+ if (_this__u8e3s4 instanceof Enum) {
2729
+ tmp = tstr_getInstance().newCborItem(_this__u8e3s4.z_1);
2730
+ } else {
2731
+ if (!(_this__u8e3s4 == null) ? typeof _this__u8e3s4 === 'string' : false) {
2732
+ tmp = tstr_getInstance().newCborItem(_this__u8e3s4);
2733
+ } else {
2734
+ if (!(_this__u8e3s4 == null) ? isByteArray(_this__u8e3s4) : false) {
2735
+ tmp = bstr_getInstance().newCborItem(_this__u8e3s4);
2736
+ } else {
2737
+ if (!(_this__u8e3s4 == null) ? typeof _this__u8e3s4 === 'boolean' : false) {
2738
+ tmp = bool_getInstance().newCborItem(_this__u8e3s4);
2739
+ } else {
2740
+ if (_this__u8e3s4 instanceof UInt) {
2741
+ var tmp_0 = uint_getInstance();
2742
+ // Inline function 'kotlin.UInt.toLong' call
2743
+ var this_0 = _this__u8e3s4.in_1;
2744
+ // Inline function 'kotlin.uintToLong' call
2745
+ var value = _UInt___get_data__impl__f0vqqw(this_0);
2746
+ var tmp$ret$0 = fromInt(value) & 4294967295n;
2747
+ tmp = tmp_0.newUint(tmp$ret$0);
2748
+ } else {
2749
+ if (_this__u8e3s4 instanceof ULong) {
2750
+ var tmp_1 = uint_getInstance();
2751
+ // Inline function 'kotlin.ULong.toLong' call
2752
+ var this_1 = _this__u8e3s4.ho_1;
2753
+ var tmp$ret$2 = _ULong___get_data__impl__fggpzb(this_1);
2754
+ tmp = tmp_1.newUint(tmp$ret$2);
2755
+ } else {
2756
+ if (isNumber(_this__u8e3s4)) {
2757
+ tmp = numberToCborItem(_this__u8e3s4);
2758
+ } else {
2759
+ if (!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, KtList) : false) {
2760
+ // Inline function 'kotlin.collections.map' call
2761
+ // Inline function 'kotlin.collections.mapTo' call
2762
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(_this__u8e3s4, 10));
2763
+ var _iterator__ex2g4s = _this__u8e3s4.t();
2764
+ while (_iterator__ex2g4s.u()) {
2765
+ var item = _iterator__ex2g4s.v();
2766
+ var tmp$ret$5 = toCborItem(item);
2767
+ destination.j1(tmp$ret$5);
2768
+ }
2769
+ tmp = new CborArray(toMutableList(destination));
2770
+ } else {
2771
+ if (!(_this__u8e3s4 == null) ? isArray(_this__u8e3s4) : false) {
2772
+ // Inline function 'kotlin.collections.map' call
2773
+ // Inline function 'kotlin.collections.mapTo' call
2774
+ var destination_0 = ArrayList_init_$Create$(_this__u8e3s4.length);
2775
+ var inductionVariable = 0;
2776
+ var last = _this__u8e3s4.length;
2777
+ while (inductionVariable < last) {
2778
+ var item_0 = _this__u8e3s4[inductionVariable];
2779
+ inductionVariable = inductionVariable + 1 | 0;
2780
+ var tmp$ret$8 = toCborItem(item_0);
2781
+ destination_0.j1(tmp$ret$8);
2782
+ }
2783
+ tmp = new CborArray(toMutableList(destination_0));
2784
+ } else {
2785
+ if (!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, KtMap) : false) {
2786
+ // Inline function 'kotlin.collections.map' call
2787
+ // Inline function 'kotlin.collections.mapTo' call
2788
+ var destination_1 = ArrayList_init_$Create$(_this__u8e3s4.l1());
2789
+ // Inline function 'kotlin.collections.iterator' call
2790
+ var _iterator__ex2g4s_0 = _this__u8e3s4.q1().t();
2791
+ while (_iterator__ex2g4s_0.u()) {
2792
+ var item_1 = _iterator__ex2g4s_0.v();
2793
+ // Inline function 'kotlin.collections.component1' call
2794
+ var k = item_1.s2();
2795
+ // Inline function 'kotlin.collections.component2' call
2796
+ var v = item_1.t2();
2797
+ var tmp$ret$12 = to(Companion_instance_9.o2x(toCborItem(k)), toCborItem(v));
2798
+ destination_1.j1(tmp$ret$12);
2799
+ }
2800
+ tmp = new CborMap(toMutableMap(toMap(destination_1)));
2801
+ } else {
2802
+ if (_this__u8e3s4 == null) {
2803
+ tmp = new CborNull();
2804
+ } else {
2805
+ throw IllegalArgumentException_init_$Create$('Value must be a String, ByteArray, Byte, Short, Int, Long, Boolean, Double, Float, Enum, CborItem<*>, List, Array or Map, not ' + getKClassFromExpression(_this__u8e3s4).o() + ' with value ' + toString_0(_this__u8e3s4));
2806
+ }
2807
+ }
2808
+ }
2809
+ }
2810
+ }
2811
+ }
2812
+ }
2813
+ }
2814
+ }
2815
+ }
2816
+ }
2817
+ }
2818
+ return tmp;
2819
+ }
2820
+ function ICborItemValueJson() {
2821
+ }
2822
+ function ICborItemJson() {
2823
+ }
2824
+ function HasCborJsonRepresentation() {
2825
+ }
2826
+ function CborItemJson$Companion$fromJsonPrimitive$1($cddl, $jsonPrimitive) {
2827
+ this.i2z_1 = $cddl;
2828
+ this.j2z_1 = $jsonPrimitive;
2829
+ }
2830
+ protoOf(CborItemJson$Companion$fromJsonPrimitive$1).a2s = function () {
2831
+ return this.i2z_1;
2832
+ };
2833
+ protoOf(CborItemJson$Companion$fromJsonPrimitive$1).t2 = function () {
2834
+ return this.j2z_1;
2835
+ };
2836
+ function CborItemJson$Companion$fromJsonObjectAsValueJson$1($cddl, $jsonObject, $value) {
2837
+ this.k2z_1 = $cddl;
2838
+ var tmp = this;
2839
+ var tmp0_safe_receiver = $jsonObject.fd(CborConst_getInstance().h2w_1);
2840
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
2841
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j1e();
2842
+ var tmp_0;
2843
+ if (tmp2_elvis_lhs == null) {
2844
+ throw IllegalStateException_init_$Create$("'key' key not available");
2845
+ } else {
2846
+ tmp_0 = tmp2_elvis_lhs;
2847
+ }
2848
+ tmp.l2z_1 = tmp_0;
2849
+ this.m2z_1 = $value;
2850
+ }
2851
+ protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$1).a2s = function () {
2852
+ return this.k2z_1;
2853
+ };
2854
+ protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$1).s2 = function () {
2855
+ return this.l2z_1;
2856
+ };
2857
+ protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$1).t2 = function () {
2858
+ return this.m2z_1;
2859
+ };
2860
+ function CborItemJson$Companion$fromJsonObjectAsValueJson$2($cddl, $value) {
2861
+ this.n2z_1 = $cddl;
2862
+ this.o2z_1 = $value;
2863
+ }
2864
+ protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$2).a2s = function () {
2865
+ return this.n2z_1;
2866
+ };
2867
+ protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$2).t2 = function () {
2868
+ return this.o2z_1;
2869
+ };
2870
+ function Companion_5() {
2871
+ }
2872
+ protoOf(Companion_5).k2w = function (jsonElement) {
2873
+ if (!(jsonElement instanceof JsonObject)) {
2874
+ return false;
2875
+ }
2876
+ if (jsonElement.l1() === 2 || jsonElement.l1() === 3) {
2877
+ return jsonElement.l1e(CborConst_getInstance().g2w_1) && jsonElement.l1e(CborConst_getInstance().i2w_1);
2878
+ }
2879
+ return false;
2880
+ };
2881
+ protoOf(Companion_5).x2w = function (jsonElement) {
2882
+ if (!(jsonElement instanceof JsonObject)) {
2883
+ return false;
2884
+ }
2885
+ if (jsonElement.l1() === 3) {
2886
+ return jsonElement.l1e(CborConst_getInstance().g2w_1) && jsonElement.l1e(CborConst_getInstance().i2w_1) && jsonElement.l1e(CborConst_getInstance().h2w_1);
2887
+ }
2888
+ return false;
2889
+ };
2890
+ protoOf(Companion_5).p2z = function (jsonPrimitive, cddl, key) {
2891
+ if (!(key === null)) {
2892
+ return new CborItemJson(key, jsonPrimitive, cddl);
2893
+ }
2894
+ return new CborItemJson$Companion$fromJsonPrimitive$1(cddl, jsonPrimitive);
2895
+ };
2896
+ protoOf(Companion_5).q2z = function (jsonPrimitive, cddl, key, $super) {
2897
+ key = key === VOID ? null : key;
2898
+ return $super === VOID ? this.p2z(jsonPrimitive, cddl, key) : $super.p2z.call(this, jsonPrimitive, cddl, key);
2899
+ };
2900
+ protoOf(Companion_5).r2z = function (jsonArray) {
2901
+ // Inline function 'kotlin.collections.map' call
2902
+ // Inline function 'kotlin.collections.mapTo' call
2903
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(jsonArray, 10));
2904
+ var _iterator__ex2g4s = jsonArray.t();
2905
+ while (_iterator__ex2g4s.u()) {
2906
+ var item = _iterator__ex2g4s.v();
2907
+ if (!((item instanceof JsonObject ? item : null) === null)) {
2908
+ Companion_instance_6.s2z(get_jsonObject(item));
2909
+ } else {
2910
+ if (!((item instanceof JsonPrimitive ? item : null) === null)) {
2911
+ if (item.i1e()) {
2912
+ Companion_instance_6.q2z(get_jsonPrimitive(item), tstr_getInstance());
2913
+ } else {
2914
+ Companion_instance_6.q2z(get_jsonPrimitive(item), any_getInstance());
2915
+ }
2916
+ } else {
2917
+ if (!((item instanceof JsonArray ? item : null) === null)) {
2918
+ Companion_instance_6.r2z(get_jsonArray(item));
2919
+ }
2920
+ }
2921
+ }
2922
+ throw IllegalStateException_init_$Create$('JsonObject does not contain 3 elements from a Cbor Json Item');
2923
+ }
2924
+ // Inline function 'kotlin.collections.toTypedArray' call
2925
+ return copyToArray(destination);
2926
+ };
2927
+ protoOf(Companion_5).t2z = function (jsonObject) {
2928
+ if (!this.x2w(jsonObject)) {
2929
+ throw IllegalStateException_init_$Create$('JsonObject does not contain 3 elements from a Cbor Json Item');
2930
+ }
2931
+ var tmp = this.s2z(jsonObject);
2932
+ return isInterface(tmp, ICborItemJson) ? tmp : THROW_CCE();
2933
+ };
2934
+ protoOf(Companion_5).s2z = function (jsonObject) {
2935
+ if (!this.k2w(jsonObject) && !this.k2w(jsonObject)) {
2936
+ throw IllegalStateException_init_$Create$('JsonObject does not contain 2 or 3 elements from a Cbor Json Item');
2937
+ }
2938
+ var tmp0_elvis_lhs = jsonObject.fd(CborConst_getInstance().i2w_1);
2939
+ var tmp;
2940
+ if (tmp0_elvis_lhs == null) {
2941
+ throw IllegalStateException_init_$Create$('value not available');
2942
+ } else {
2943
+ tmp = tmp0_elvis_lhs;
2944
+ }
2945
+ var value = tmp;
2946
+ var tmp_0 = util_getInstance();
2947
+ var tmp1_safe_receiver = jsonObject.fd(CborConst_getInstance().g2w_1);
2948
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : get_jsonPrimitive(tmp1_safe_receiver);
2949
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.j1e();
2950
+ var tmp_1;
2951
+ if (tmp3_elvis_lhs == null) {
2952
+ throw IllegalStateException_init_$Create$('cddl key not available');
2953
+ } else {
2954
+ tmp_1 = tmp3_elvis_lhs;
2955
+ }
2956
+ var cddl = tmp_0.fromFormat(tmp_1);
2957
+ if (jsonObject.l1e(CborConst_getInstance().h2w_1)) {
2958
+ return new CborItemJson$Companion$fromJsonObjectAsValueJson$1(cddl, jsonObject, value);
2959
+ }
2960
+ return new CborItemJson$Companion$fromJsonObjectAsValueJson$2(cddl, value);
2961
+ };
2962
+ protoOf(Companion_5).u2z = function (cborItemJson) {
2963
+ return new CborItemJson(cborItemJson.key, cborItemJson.value, cborItemJson.cddl);
2964
+ };
2965
+ protoOf(Companion_5).t1e = function () {
2966
+ return $serializer_getInstance();
2967
+ };
2968
+ var Companion_instance_6;
2969
+ function Companion_getInstance_6() {
2970
+ return Companion_instance_6;
2971
+ }
2972
+ function $serializer() {
2973
+ $serializer_instance = this;
2974
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.sphereon.cbor.CborItemJson', this, 3);
2975
+ tmp0_serialDesc.x10('key', false);
2976
+ tmp0_serialDesc.x10('value', false);
2977
+ tmp0_serialDesc.x10('cddl', false);
2978
+ this.v2z_1 = tmp0_serialDesc;
2979
+ }
2980
+ protoOf($serializer).w2z = function (encoder, value) {
2981
+ var tmp0_desc = this.v2z_1;
2982
+ var tmp1_output = encoder.gt(tmp0_desc);
2983
+ tmp1_output.vu(tmp0_desc, 0, value.x2z_1);
2984
+ tmp1_output.xu(tmp0_desc, 1, JsonElementSerializer_getInstance(), value.y2z_1);
2985
+ tmp1_output.xu(tmp0_desc, 2, CDDLSerializer_getInstance(), value.z2z_1);
2986
+ tmp1_output.ht(tmp0_desc);
2987
+ };
2988
+ protoOf($serializer).fq = function (encoder, value) {
2989
+ return this.w2z(encoder, value instanceof CborItemJson ? value : THROW_CCE());
2990
+ };
2991
+ protoOf($serializer).gq = function (decoder) {
2992
+ var tmp0_desc = this.v2z_1;
2993
+ var tmp1_flag = true;
2994
+ var tmp2_index = 0;
2995
+ var tmp3_bitMask0 = 0;
2996
+ var tmp4_local0 = null;
2997
+ var tmp5_local1 = null;
2998
+ var tmp6_local2 = null;
2999
+ var tmp7_input = decoder.gt(tmp0_desc);
3000
+ if (tmp7_input.wt()) {
3001
+ tmp4_local0 = tmp7_input.qt(tmp0_desc, 0);
3002
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
3003
+ tmp5_local1 = tmp7_input.st(tmp0_desc, 1, JsonElementSerializer_getInstance(), tmp5_local1);
3004
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
3005
+ tmp6_local2 = tmp7_input.st(tmp0_desc, 2, CDDLSerializer_getInstance(), tmp6_local2);
3006
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
3007
+ } else
3008
+ while (tmp1_flag) {
3009
+ tmp2_index = tmp7_input.xt(tmp0_desc);
3010
+ switch (tmp2_index) {
3011
+ case -1:
3012
+ tmp1_flag = false;
3013
+ break;
3014
+ case 0:
3015
+ tmp4_local0 = tmp7_input.qt(tmp0_desc, 0);
3016
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
3017
+ break;
3018
+ case 1:
3019
+ tmp5_local1 = tmp7_input.st(tmp0_desc, 1, JsonElementSerializer_getInstance(), tmp5_local1);
3020
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
3021
+ break;
3022
+ case 2:
3023
+ tmp6_local2 = tmp7_input.st(tmp0_desc, 2, CDDLSerializer_getInstance(), tmp6_local2);
3024
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
3025
+ break;
3026
+ default:
3027
+ throw UnknownFieldException_init_$Create$(tmp2_index);
3028
+ }
3029
+ }
3030
+ tmp7_input.ht(tmp0_desc);
3031
+ return CborItemJson_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
3032
+ };
3033
+ protoOf($serializer).sp = function () {
3034
+ return this.v2z_1;
3035
+ };
3036
+ protoOf($serializer).m11 = function () {
3037
+ // Inline function 'kotlin.arrayOf' call
3038
+ // Inline function 'kotlin.js.unsafeCast' call
3039
+ // Inline function 'kotlin.js.asDynamic' call
3040
+ return [StringSerializer_getInstance(), JsonElementSerializer_getInstance(), CDDLSerializer_getInstance()];
3041
+ };
3042
+ var $serializer_instance;
3043
+ function $serializer_getInstance() {
3044
+ if ($serializer_instance == null)
3045
+ new $serializer();
3046
+ return $serializer_instance;
3047
+ }
3048
+ function CborItemJson_init_$Init$(seen0, key, value, cddl, serializationConstructorMarker, $this) {
3049
+ if (!(7 === (7 & seen0))) {
3050
+ throwMissingFieldException(seen0, 7, $serializer_getInstance().v2z_1);
3051
+ }
3052
+ $this.x2z_1 = key;
3053
+ $this.y2z_1 = value;
3054
+ $this.z2z_1 = cddl;
3055
+ return $this;
3056
+ }
3057
+ function CborItemJson_init_$Create$(seen0, key, value, cddl, serializationConstructorMarker) {
3058
+ return CborItemJson_init_$Init$(seen0, key, value, cddl, serializationConstructorMarker, objectCreate(protoOf(CborItemJson)));
3059
+ }
3060
+ function isCborItemValueJson(jsonElement) {
3061
+ return Companion_instance_6.k2w(jsonElement);
3062
+ }
3063
+ function isCborItemJson(jsonElement) {
3064
+ return Companion_instance_6.x2w(jsonElement);
3065
+ }
3066
+ function fromJsonPrimitive(jsonPrimitive, cddl, key) {
3067
+ key = key === VOID ? null : key;
3068
+ return Companion_instance_6.q2z(jsonPrimitive, cddl, key);
3069
+ }
3070
+ function fromJsonArray(jsonArray) {
3071
+ return Companion_instance_6.r2z(jsonArray);
3072
+ }
3073
+ function fromJsonObjectAsCborItemJson(jsonObject) {
3074
+ return Companion_instance_6.t2z(jsonObject);
3075
+ }
3076
+ function fromJsonObjectAsValueJson(jsonObject) {
3077
+ return Companion_instance_6.s2z(jsonObject);
3078
+ }
3079
+ function fromDTO(cborItemJson) {
3080
+ return Companion_instance_6.u2z(cborItemJson);
3081
+ }
3082
+ function CborItemJson(key, value, cddl) {
3083
+ this.x2z_1 = key;
3084
+ this.y2z_1 = value;
3085
+ this.z2z_1 = cddl;
3086
+ }
3087
+ protoOf(CborItemJson).s2 = function () {
3088
+ return this.x2z_1;
3089
+ };
3090
+ protoOf(CborItemJson).t2 = function () {
3091
+ return this.y2z_1;
3092
+ };
3093
+ protoOf(CborItemJson).a2s = function () {
3094
+ return this.z2z_1;
3095
+ };
3096
+ protoOf(CborItemJson).toJsonWithCDDL = function () {
3097
+ return new JsonObject(mapOf_0(new Pair(JsonPrimitive_1(this.x2z_1).j1e(), new JsonObject(mapOf([new Pair(CborConst_getInstance().i2w_1, this.y2z_1), new Pair(CborConst_getInstance().g2w_1, JsonPrimitive_1(this.z2z_1.format))])))));
3098
+ };
3099
+ protoOf(CborItemJson).toJsonSimple = function () {
3100
+ return new JsonObject(mapOf_0(new Pair(JsonPrimitive_1(this.x2z_1).j1e(), this.y2z_1)));
3101
+ };
3102
+ protoOf(CborItemJson).v2r = function (includeCDDL) {
3103
+ return includeCDDL ? this.toJsonWithCDDL() : this.toJsonSimple();
3104
+ };
3105
+ protoOf(CborItemJson).toJsonCborItem = function () {
3106
+ return this;
3107
+ };
3108
+ protoOf(CborItemJson).qf = function () {
3109
+ return this.x2z_1;
3110
+ };
3111
+ protoOf(CborItemJson).rf = function () {
3112
+ return this.y2z_1;
3113
+ };
3114
+ protoOf(CborItemJson).lm = function () {
3115
+ return this.z2z_1;
3116
+ };
3117
+ protoOf(CborItemJson).a30 = function (key, value, cddl) {
3118
+ return new CborItemJson(key, value, cddl);
3119
+ };
3120
+ protoOf(CborItemJson).copy = function (key, value, cddl, $super) {
3121
+ key = key === VOID ? this.x2z_1 : key;
3122
+ value = value === VOID ? this.y2z_1 : value;
3123
+ cddl = cddl === VOID ? this.z2z_1 : cddl;
3124
+ return $super === VOID ? this.a30(key, value, cddl) : $super.a30.call(this, key, value, cddl);
3125
+ };
3126
+ protoOf(CborItemJson).toString = function () {
3127
+ return 'CborItemJson(key=' + this.x2z_1 + ', value=' + toString_0(this.y2z_1) + ', cddl=' + toString_0(this.z2z_1) + ')';
3128
+ };
3129
+ protoOf(CborItemJson).hashCode = function () {
3130
+ var result = getStringHashCode(this.x2z_1);
3131
+ result = imul(result, 31) + hashCode(this.y2z_1) | 0;
3132
+ result = imul(result, 31) + hashCode(this.z2z_1) | 0;
3133
+ return result;
3134
+ };
3135
+ protoOf(CborItemJson).equals = function (other) {
3136
+ if (this === other)
3137
+ return true;
3138
+ if (!(other instanceof CborItemJson))
3139
+ return false;
3140
+ if (!(this.x2z_1 === other.x2z_1))
3141
+ return false;
3142
+ if (!equals(this.y2z_1, other.y2z_1))
3143
+ return false;
3144
+ if (!equals(this.z2z_1, other.z2z_1))
3145
+ return false;
3146
+ return true;
3147
+ };
3148
+ function jsonObjectToCborJsonItem(_this__u8e3s4) {
3149
+ return Companion_instance_6.s2z(_this__u8e3s4);
3150
+ }
3151
+ function SimpleCborBuilder(item) {
3152
+ this.b30_1 = item;
3153
+ }
3154
+ protoOf(SimpleCborBuilder).build = function () {
3155
+ return this.b30_1;
3156
+ };
3157
+ function numberToCborItem(_this__u8e3s4) {
3158
+ var tmp;
3159
+ if (typeof _this__u8e3s4 === 'number') {
3160
+ tmp = typeof _this__u8e3s4 === 'number';
3161
+ } else {
3162
+ tmp = false;
3163
+ }
3164
+ var jsLikeNumberSystem = tmp;
3165
+ if (!jsLikeNumberSystem) {
3166
+ var tmp_0;
3167
+ if (typeof _this__u8e3s4 === 'number') {
3168
+ tmp_0 = float_getInstance().newCborItem(_this__u8e3s4);
3169
+ } else {
3170
+ if (typeof _this__u8e3s4 === 'number') {
3171
+ tmp_0 = float64_getInstance().newFloat64(_this__u8e3s4);
3172
+ } else {
3173
+ if (typeof _this__u8e3s4 === 'number') {
3174
+ tmp_0 = int_getInstance().newInt(_this__u8e3s4);
3175
+ } else {
3176
+ if (typeof _this__u8e3s4 === 'number') {
3177
+ tmp_0 = int_getInstance().newInt(_this__u8e3s4);
3178
+ } else {
3179
+ if (typeof _this__u8e3s4 === 'number') {
3180
+ tmp_0 = int_getInstance().newInt(_this__u8e3s4);
3181
+ } else {
3182
+ if (typeof _this__u8e3s4 === 'bigint') {
3183
+ tmp_0 = int_getInstance().newLong(_this__u8e3s4);
3184
+ } else {
3185
+ tmp_0 = float64_getInstance().newFloat64(numberToDouble(_this__u8e3s4));
3186
+ }
3187
+ }
3188
+ }
3189
+ }
3190
+ }
3191
+ }
3192
+ return tmp_0;
3193
+ }
3194
+ var d = _this__u8e3s4;
3195
+ var tmp_1;
3196
+ var tmp_2;
3197
+ var tmp_3;
3198
+ // Inline function 'kotlin.math.floor' call
3199
+ if (!(d === Math.floor(d))) {
3200
+ tmp_3 = true;
3201
+ } else {
3202
+ tmp_3 = isInfinite(d);
3203
+ }
3204
+ if (tmp_3) {
3205
+ tmp_2 = true;
3206
+ } else {
3207
+ tmp_2 = isNaN_0(d);
3208
+ }
3209
+ if (tmp_2) {
3210
+ tmp_1 = float64_getInstance().newFloat64(d);
3211
+ } else {
3212
+ var l = numberToLong(d);
3213
+ var tmp_4;
3214
+ // Inline function 'kotlin.ranges.contains' call
3215
+ var this_0 = numberRangeToNumber(-2147483648, 2147483647);
3216
+ if (contains_0(isInterface(this_0, ClosedRange) ? this_0 : THROW_CCE(), l)) {
3217
+ tmp_4 = int_getInstance().newInt(convertToInt(l));
3218
+ } else {
3219
+ tmp_4 = int_getInstance().newLong(l);
3220
+ }
3221
+ tmp_1 = tmp_4;
3222
+ }
3223
+ return tmp_1;
3224
+ }
3225
+ function CborMap$toJsonCborItem$1(this$0) {
3226
+ this.c30_1 = map_getInstance();
3227
+ this.d30_1 = this$0.toJsonWithCDDL();
3228
+ }
3229
+ protoOf(CborMap$toJsonCborItem$1).a2s = function () {
3230
+ return this.c30_1;
3231
+ };
3232
+ protoOf(CborMap$toJsonCborItem$1).t2 = function () {
3233
+ return this.d30_1;
3234
+ };
3235
+ function CborMap(value, indefiniteLength) {
3236
+ var tmp;
3237
+ if (value === VOID) {
3238
+ // Inline function 'kotlin.collections.mutableMapOf' call
3239
+ tmp = LinkedHashMap_init_$Create$();
3240
+ } else {
3241
+ tmp = value;
3242
+ }
3243
+ value = tmp;
3244
+ indefiniteLength = indefiniteLength === VOID ? false : indefiniteLength;
3245
+ CborCollectionItem.call(this, value, map_getInstance());
3246
+ this.indefiniteLength = indefiniteLength;
3247
+ }
3248
+ protoOf(CborMap).g2x = function () {
3249
+ return this.indefiniteLength;
3250
+ };
3251
+ protoOf(CborMap).get = function (key) {
3252
+ return this.value.x2(key);
3253
+ };
3254
+ protoOf(CborMap).toJsonSimple = function () {
3255
+ // Inline function 'kotlin.collections.associate' call
3256
+ var this_0 = this.value.q1();
3257
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
3258
+ // Inline function 'kotlin.collections.associateTo' call
3259
+ var destination = LinkedHashMap_init_$Create$_0(capacity);
3260
+ var _iterator__ex2g4s = this_0.t();
3261
+ while (_iterator__ex2g4s.u()) {
3262
+ var element = _iterator__ex2g4s.v();
3263
+ var key = get_jsonPrimitive(element.s2().toJsonSimple()).j1e();
3264
+ var tmp;
3265
+ var tmp_0 = element.t2();
3266
+ if (tmp_0 instanceof CborItem) {
3267
+ var tmp_1 = element.t2();
3268
+ tmp = (tmp_1 instanceof CborItem ? tmp_1 : THROW_CCE()).toJsonSimple();
3269
+ } else {
3270
+ throw IllegalArgumentException_init_$Create$('Map must contain cbor values');
3271
+ }
3272
+ var value = tmp;
3273
+ // Inline function 'kotlin.collections.plusAssign' call
3274
+ var pair = new Pair(key, value);
3275
+ destination.j3(pair.first, pair.second);
3276
+ }
3277
+ return new JsonObject(destination);
3278
+ };
3279
+ protoOf(CborMap).toJsonWithCDDL = function () {
3280
+ // Inline function 'kotlin.collections.map' call
3281
+ var this_0 = this.value.q1();
3282
+ // Inline function 'kotlin.collections.mapTo' call
3283
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
3284
+ var _iterator__ex2g4s = this_0.t();
3285
+ while (_iterator__ex2g4s.u()) {
3286
+ var item = _iterator__ex2g4s.v();
3287
+ var tmp;
3288
+ var tmp_0 = item.t2();
3289
+ if (tmp_0 instanceof CborItem) {
3290
+ var tmp_1 = item.t2();
3291
+ tmp = (tmp_1 instanceof CborItem ? tmp_1 : THROW_CCE()).toJsonWithCDDL();
3292
+ } else {
3293
+ throw IllegalArgumentException_init_$Create$('Map must contain cbor values');
3294
+ }
3295
+ var json = tmp;
3296
+ var arrayElement = json instanceof JsonArray ? json : null;
3297
+ var isArray = !(arrayElement === null);
3298
+ var objectElement = json instanceof JsonObject ? json : null;
3299
+ var isObject = !(objectElement === null);
3300
+ var primitiveElement = json instanceof JsonPrimitive ? json : null;
3301
+ var isPrimitive = !(primitiveElement === null);
3302
+ var key = get_jsonPrimitive(item.s2().toJsonSimple());
3303
+ var tmp_2;
3304
+ if (isArray) {
3305
+ tmp_2 = JsonPrimitive_1(list_getInstance().format);
3306
+ } else if (isPrimitive) {
3307
+ var tmp0_safe_receiver = item.t2();
3308
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cddl;
3309
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.format;
3310
+ tmp_2 = JsonPrimitive_1(tmp2_elvis_lhs == null ? nil_getInstance().format : tmp2_elvis_lhs);
3311
+ } else {
3312
+ tmp_2 = ensureNotNull(get_jsonObject(json).fd(CborConst_getInstance().g2w_1));
3313
+ }
3314
+ var cddl = tmp_2;
3315
+ var tmp4_elvis_lhs = primitiveElement == null ? arrayElement : primitiveElement;
3316
+ var value = tmp4_elvis_lhs == null ? ensureNotNull(get_jsonObject(json).fd(CborConst_getInstance().i2w_1)) : tmp4_elvis_lhs;
3317
+ var tmp$ret$2 = new JsonObject(mapOf([to('key', key), to(CborConst_getInstance().g2w_1, cddl), to(CborConst_getInstance().i2w_1, value)]));
3318
+ destination.j1(tmp$ret$2);
3319
+ }
3320
+ return new JsonArray(destination);
3321
+ };
3322
+ protoOf(CborMap).toJsonWithCDDLObject = function () {
3323
+ // Inline function 'kotlin.collections.map' call
3324
+ var this_0 = this.value.q1();
3325
+ // Inline function 'kotlin.collections.mapTo' call
3326
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
3327
+ var _iterator__ex2g4s = this_0.t();
3328
+ while (_iterator__ex2g4s.u()) {
3329
+ var item = _iterator__ex2g4s.v();
3330
+ var tmp;
3331
+ var tmp_0 = item.t2();
3332
+ if (tmp_0 instanceof CborItem) {
3333
+ var tmp_1 = item.t2();
3334
+ tmp = (tmp_1 instanceof CborItem ? tmp_1 : THROW_CCE()).toJsonWithCDDL();
3335
+ } else {
3336
+ throw IllegalArgumentException_init_$Create$('Map must contain cbor values');
3337
+ }
3338
+ var json = tmp;
3339
+ var arrayElement = json instanceof JsonArray ? json : null;
3340
+ var isArray = !(arrayElement === null);
3341
+ var objectElement = json instanceof JsonObject ? json : null;
3342
+ var isObject = !(objectElement === null);
3343
+ var primitiveElement = json instanceof JsonPrimitive ? json : null;
3344
+ var isPrimitive = !(primitiveElement === null);
3345
+ var key = get_jsonPrimitive(item.s2().toJsonSimple()).j1e();
3346
+ var tmp_2;
3347
+ if (isArray) {
3348
+ tmp_2 = JsonPrimitive_1(list_getInstance().format);
3349
+ } else if (isPrimitive) {
3350
+ var tmp0_safe_receiver = item.t2();
3351
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cddl;
3352
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.format;
3353
+ tmp_2 = JsonPrimitive_1(tmp2_elvis_lhs == null ? nil_getInstance().format : tmp2_elvis_lhs);
3354
+ } else {
3355
+ tmp_2 = ensureNotNull(get_jsonObject(json).fd(CborConst_getInstance().g2w_1));
3356
+ }
3357
+ var cddl = tmp_2;
3358
+ var tmp4_elvis_lhs = primitiveElement == null ? arrayElement : primitiveElement;
3359
+ var value = tmp4_elvis_lhs == null ? ensureNotNull(get_jsonObject(json).fd(CborConst_getInstance().i2w_1)) : tmp4_elvis_lhs;
3360
+ var tmp$ret$2 = new Pair(key, new JsonObject(mapOf([to(CborConst_getInstance().g2w_1, cddl), to(CborConst_getInstance().i2w_1, value)])));
3361
+ destination.j1(tmp$ret$2);
3362
+ }
3363
+ // Inline function 'kotlin.collections.toTypedArray' call
3364
+ var tmp$ret$3 = copyToArray(destination);
3365
+ return new JsonObject(mapOf(tmp$ret$3.slice()));
3366
+ };
3367
+ protoOf(CborMap).toJsonCborItem = function () {
3368
+ return new CborMap$toJsonCborItem$1(this);
3369
+ };
3370
+ protoOf(CborMap).g30 = function (key, required) {
3371
+ var tmp = new StringLabel(key);
3372
+ var value = this.value.x2(tmp instanceof CborItem ? tmp : THROW_CCE());
3373
+ if (required === true && value == null) {
3374
+ throw IllegalArgumentException_init_$Create$('Value is null for required label ' + key);
3375
+ }
3376
+ return value;
3377
+ };
3378
+ protoOf(CborMap).getStringLabel = function (key, required, $super) {
3379
+ required = required === VOID ? false : required;
3380
+ return $super === VOID ? this.g30(key, required) : $super.g30.call(this, key, required);
3381
+ };
3382
+ protoOf(CborMap).h30 = function (key, required) {
3383
+ var tmp = fromInt_1(convertToInt(key));
3384
+ var value = this.value.x2(tmp instanceof CborItem ? tmp : THROW_CCE());
3385
+ if (required === true && value == null) {
3386
+ throw IllegalArgumentException_init_$Create$('Value is null for required label ' + key.toString());
3387
+ }
3388
+ return value;
3389
+ };
3390
+ protoOf(CborMap).getNumberLabel = function (key, required, $super) {
3391
+ required = required === VOID ? false : required;
3392
+ return $super === VOID ? this.h30(key, required) : $super.h30.call(this, key, required);
3393
+ };
3394
+ protoOf(CborMap).n2r = function (builder) {
3395
+ if (this.indefiniteLength) {
3396
+ var majorTypeShifted = ensureNotNull(this.majorType).type << 5;
3397
+ builder.o2c(toByte(majorTypeShifted + 31 | 0));
3398
+ // Inline function 'kotlin.collections.iterator' call
3399
+ var _iterator__ex2g4s = this.value.q1().t();
3400
+ while (_iterator__ex2g4s.u()) {
3401
+ var _destruct__k2r9zo = _iterator__ex2g4s.v();
3402
+ // Inline function 'kotlin.collections.component1' call
3403
+ var keyItem = _destruct__k2r9zo.s2();
3404
+ // Inline function 'kotlin.collections.component2' call
3405
+ var valueItem = _destruct__k2r9zo.t2();
3406
+ keyItem.n2r(builder);
3407
+ if (valueItem == null)
3408
+ null;
3409
+ else {
3410
+ valueItem.n2r(builder);
3411
+ }
3412
+ }
3413
+ builder.o2c(-1);
3414
+ } else {
3415
+ cborEncodeLength(builder, ensureNotNull(this.majorType), this.value.l1());
3416
+ // Inline function 'kotlin.collections.iterator' call
3417
+ var _iterator__ex2g4s_0 = this.value.q1().t();
3418
+ while (_iterator__ex2g4s_0.u()) {
3419
+ var _destruct__k2r9zo_0 = _iterator__ex2g4s_0.v();
3420
+ // Inline function 'kotlin.collections.component1' call
3421
+ var keyItem_0 = _destruct__k2r9zo_0.s2();
3422
+ // Inline function 'kotlin.collections.component2' call
3423
+ var valueItem_0 = _destruct__k2r9zo_0.t2();
3424
+ keyItem_0.n2r(builder);
3425
+ if (valueItem_0 == null)
3426
+ null;
3427
+ else {
3428
+ valueItem_0.n2r(builder);
3429
+ }
3430
+ }
3431
+ }
3432
+ };
3433
+ protoOf(CborMap).equals = function (other) {
3434
+ if (this === other)
3435
+ return true;
3436
+ if (!(other instanceof CborMap))
3437
+ return false;
3438
+ if (!protoOf(CborCollectionItem).equals.call(this, other))
3439
+ return false;
3440
+ if (!(this.indefiniteLength === other.indefiniteLength))
3441
+ return false;
3442
+ return true;
3443
+ };
3444
+ protoOf(CborMap).hashCode = function () {
3445
+ var result = protoOf(CborCollectionItem).hashCode.call(this);
3446
+ result = imul(31, result) + getBooleanHashCode(this.indefiniteLength) | 0;
3447
+ return result;
3448
+ };
3449
+ protoOf(CborMap).toString = function () {
3450
+ return 'CborMap(value=' + stringify(this.value) + ', indefiniteLength=' + this.indefiniteLength + ')';
3451
+ };
3452
+ function CborNInt(value) {
3453
+ AbstractCborInt.call(this, value, nint_getInstance());
3454
+ }
3455
+ protoOf(CborNInt).z2r = function () {
3456
+ this.value;
3457
+ };
3458
+ protoOf(CborNInt).n2r = function (builder) {
3459
+ cborEncodeLength(builder, ensureNotNull(this.majorType), convertToInt(this.value) - 1 | 0);
3460
+ };
3461
+ function CborNil() {
3462
+ CborSimple.call(this, null, nil_getInstance());
3463
+ if (!(this.value == null)) {
3464
+ throw IllegalArgumentException_init_$Create$('Nil requires value null');
3465
+ }
3466
+ }
3467
+ protoOf(CborNil).toJsonSimple = function () {
3468
+ return JsonNull_getInstance();
3469
+ };
3470
+ function CborNull() {
3471
+ CborSimple.call(this, null, Null_getInstance());
3472
+ if (!(this.value == null)) {
3473
+ throw IllegalArgumentException_init_$Create$('Nil requires value null');
3474
+ }
3475
+ }
3476
+ protoOf(CborNull).toJsonSimple = function () {
3477
+ return JsonNull_getInstance();
3478
+ };
3479
+ function CborStringIndefLength(value) {
3480
+ CborItem.call(this, value, tstr_indef_length_getInstance());
3481
+ }
3482
+ protoOf(CborStringIndefLength).n2r = function (builder) {
3483
+ var majorTypeShifted = ensureNotNull(this.majorType).type << 5;
3484
+ builder.o2c(toByte(majorTypeShifted + 31 | 0));
3485
+ // Inline function 'kotlin.collections.forEach' call
3486
+ var _iterator__ex2g4s = this.value.t();
3487
+ while (_iterator__ex2g4s.u()) {
3488
+ var element = _iterator__ex2g4s.v();
3489
+ var encodedStr = encodeToByteArray(element);
3490
+ cborEncodeLength(builder, this.majorType, encodedStr.length);
3491
+ builder.q2c(encodedStr);
3492
+ }
3493
+ builder.o2c(-1);
3494
+ };
3495
+ protoOf(CborStringIndefLength).toJsonSimple = function () {
3496
+ // Inline function 'kotlin.TODO' call
3497
+ var reason = 'Indef lengt to json not implemented yet';
3498
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
3499
+ };
3500
+ function CborNumber(value, cddl) {
3501
+ CborItem.call(this, value, cddl);
3502
+ }
3503
+ protoOf(CborNumber).toJsonSimple = function () {
3504
+ return JsonPrimitive_2(this.toValue());
3505
+ };
3506
+ function CborEncoder() {
3507
+ }
3508
+ function CborParser() {
3509
+ }
3510
+ function CborDiagnostics() {
3511
+ }
3512
+ function Companion_6() {
3513
+ Companion_instance_7 = this;
3514
+ this.z2u_1 = new CborFalse();
3515
+ this.a2v_1 = new CborTrue();
3516
+ this.b2v_1 = new CborNull();
3517
+ this.c2v_1 = new CborUndefined();
3518
+ }
3519
+ var Companion_instance_7;
3520
+ function Companion_getInstance_7() {
3521
+ if (Companion_instance_7 == null)
3522
+ new Companion_6();
3523
+ return Companion_instance_7;
3524
+ }
3525
+ function CborSimple(value, cddl) {
3526
+ Companion_getInstance_7();
3527
+ CborItem.call(this, value, cddl);
3528
+ var tmp;
3529
+ if (cddl instanceof bool) {
3530
+ tmp = equals(value, true) ? True_getInstance().info : False_getInstance().info;
3531
+ } else {
3532
+ tmp = cddl.info;
3533
+ }
3534
+ var info = tmp;
3535
+ if (info == null) {
3536
+ throw IllegalArgumentException_init_$Create$_0();
3537
+ }
3538
+ // Inline function 'kotlin.require' call
3539
+ // Inline function 'kotlin.require' call
3540
+ if (!(typeof info === 'number')) {
3541
+ var message = 'Failed requirement.';
3542
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
3543
+ }
3544
+ var tmp_0;
3545
+ if (info < 24) {
3546
+ tmp_0 = true;
3547
+ } else {
3548
+ tmp_0 = 32 <= info ? info <= 255 : false;
3549
+ }
3550
+ // Inline function 'kotlin.check' call
3551
+ if (!tmp_0) {
3552
+ throw IllegalStateException_init_$Create$('Check failed.');
3553
+ }
3554
+ }
3555
+ protoOf(CborSimple).n2r = function (builder) {
3556
+ var majorTypeShifted = toByte(ensureNotNull(this.majorType).type << 5);
3557
+ // Inline function 'kotlin.experimental.or' call
3558
+ var other = toByte(ensureNotNull(this.info));
3559
+ var tmp$ret$0 = toByte(majorTypeShifted | other);
3560
+ builder.o2c(tmp$ret$0);
3561
+ };
3562
+ protoOf(CborSimple).equals = function (other) {
3563
+ var tmp;
3564
+ if (other instanceof CborSimple) {
3565
+ tmp = equals(this.value, other.value);
3566
+ } else {
3567
+ tmp = false;
3568
+ }
3569
+ return tmp;
3570
+ };
3571
+ protoOf(CborSimple).hashCode = function () {
3572
+ // Inline function 'kotlin.hashCode' call
3573
+ var tmp0_safe_receiver = this.value;
3574
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
3575
+ return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
3576
+ };
3577
+ protoOf(CborSimple).toString = function () {
3578
+ return this.equals(Companion_getInstance_7().z2u_1) ? 'Simple(FALSE)' : this.equals(Companion_getInstance_7().a2v_1) ? 'Simple(TRUE)' : this.equals(Companion_getInstance_7().b2v_1) ? 'Simple(NULL)' : this.equals(Companion_getInstance_7().c2v_1) ? 'Simple(UNDEFINED)' : 'Simple(' + toString(this.value) + ')';
3579
+ };
3580
+ var HEX_ALPHABET;
3581
+ function CborString(value) {
3582
+ CborItem.call(this, value, tstr_getInstance());
3583
+ }
3584
+ protoOf(CborString).n2r = function (builder) {
3585
+ var encodedValue = encodeToByteArray(this.value);
3586
+ cborEncodeLength(builder, ensureNotNull(this.majorType), encodedValue.length);
3587
+ builder.q2c(encodeToByteArray(this.value));
3588
+ };
3589
+ protoOf(CborString).toJsonSimple = function () {
3590
+ return JsonPrimitive_1(this.toValue());
3591
+ };
3592
+ protoOf(CborString).equals = function (other) {
3593
+ if (this === other)
3594
+ return true;
3595
+ if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
3596
+ return false;
3597
+ if (!protoOf(CborItem).equals.call(this, other))
3598
+ return false;
3599
+ return true;
3600
+ };
3601
+ protoOf(CborString).hashCode = function () {
3602
+ return getStringHashCode(this.value);
3603
+ };
3604
+ protoOf(CborString).toString = function () {
3605
+ return 'tstr("' + this.value + '")';
3606
+ };
3607
+ function toCborByteString_0(_this__u8e3s4, encoding) {
3608
+ encoding = encoding === VOID ? null : encoding;
3609
+ if (encoding === Encoding_HEX_getInstance() || (encoding === null && (_this__u8e3s4.length % 2 | 0) === 0)) {
3610
+ // Inline function 'kotlin.text.filter' call
3611
+ // Inline function 'kotlin.text.filterTo' call
3612
+ var destination = StringBuilder_init_$Create$();
3613
+ var inductionVariable = 0;
3614
+ var last = charSequenceLength(_this__u8e3s4);
3615
+ if (inductionVariable < last)
3616
+ do {
3617
+ var index = inductionVariable;
3618
+ inductionVariable = inductionVariable + 1 | 0;
3619
+ var element = charSequenceGet(_this__u8e3s4, index);
3620
+ if (contains(HEX_ALPHABET, element)) {
3621
+ destination.s(element);
3622
+ }
3623
+ }
3624
+ while (inductionVariable < last);
3625
+ var tmp$ret$0 = destination.toString();
3626
+ if (equals(_this__u8e3s4, tmp$ret$0)) {
3627
+ return new CborByteString(hexToByteArray(_this__u8e3s4));
3628
+ }
3629
+ }
3630
+ var tmp;
3631
+ if (encoding === Encoding_BASE64URL_getInstance() || encoding === Encoding_BASE64_getInstance()) {
3632
+ tmp = true;
3633
+ } else {
3634
+ var tmp_0;
3635
+ if (encoding === null) {
3636
+ var tmp_1;
3637
+ // Inline function 'kotlin.text.filter' call
3638
+ // Inline function 'kotlin.text.filterTo' call
3639
+ var destination_0 = StringBuilder_init_$Create$();
3640
+ var inductionVariable_0 = 0;
3641
+ var last_0 = charSequenceLength(_this__u8e3s4);
3642
+ if (inductionVariable_0 < last_0)
3643
+ do {
3644
+ var index_0 = inductionVariable_0;
3645
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
3646
+ var element_0 = charSequenceGet(_this__u8e3s4, index_0);
3647
+ if (contains('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', element_0)) {
3648
+ destination_0.s(element_0);
3649
+ }
3650
+ }
3651
+ while (inductionVariable_0 < last_0);
3652
+ if (_this__u8e3s4 === destination_0.toString()) {
3653
+ tmp_1 = true;
3654
+ } else {
3655
+ // Inline function 'kotlin.text.filter' call
3656
+ // Inline function 'kotlin.text.filterTo' call
3657
+ var destination_1 = StringBuilder_init_$Create$();
3658
+ var inductionVariable_1 = 0;
3659
+ var last_1 = charSequenceLength(_this__u8e3s4);
3660
+ if (inductionVariable_1 < last_1)
3661
+ do {
3662
+ var index_1 = inductionVariable_1;
3663
+ inductionVariable_1 = inductionVariable_1 + 1 | 0;
3664
+ var element_1 = charSequenceGet(_this__u8e3s4, index_1);
3665
+ if (contains('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', element_1)) {
3666
+ destination_1.s(element_1);
3667
+ }
3668
+ }
3669
+ while (inductionVariable_1 < last_1);
3670
+ tmp_1 = _this__u8e3s4 === destination_1.toString();
3671
+ }
3672
+ tmp_0 = tmp_1;
3673
+ } else {
3674
+ tmp_0 = false;
3675
+ }
3676
+ tmp = tmp_0;
3677
+ }
3678
+ if (tmp) {
3679
+ if (encoding === Encoding_BASE64URL_getInstance() || contains_1(_this__u8e3s4, '-') || contains_1(_this__u8e3s4, '_')) {
3680
+ return new CborByteString(decodeFromBase64Url(_this__u8e3s4));
3681
+ }
3682
+ return new CborByteString(decodeFromBase64(_this__u8e3s4));
3683
+ }
3684
+ return new CborByteString(decodeFrom(_this__u8e3s4, Encoding_UTF8_getInstance()));
3685
+ }
3686
+ function toCborStringArray(_this__u8e3s4) {
3687
+ // Inline function 'kotlin.collections.map' call
3688
+ // Inline function 'kotlin.collections.mapTo' call
3689
+ var destination = ArrayList_init_$Create$(_this__u8e3s4.length);
3690
+ var inductionVariable = 0;
3691
+ var last = _this__u8e3s4.length;
3692
+ while (inductionVariable < last) {
3693
+ var item = _this__u8e3s4[inductionVariable];
3694
+ inductionVariable = inductionVariable + 1 | 0;
3695
+ var tmp$ret$2 = toCborString(item);
3696
+ destination.j1(tmp$ret$2);
3697
+ }
3698
+ return new CborArray(toMutableList(destination));
3699
+ }
3700
+ function toCborString(_this__u8e3s4) {
3701
+ return new CborString(_this__u8e3s4);
3702
+ }
3703
+ function toStringArray(_this__u8e3s4) {
3704
+ // Inline function 'kotlin.collections.map' call
3705
+ var this_0 = _this__u8e3s4.value;
3706
+ // Inline function 'kotlin.collections.mapTo' call
3707
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
3708
+ var _iterator__ex2g4s = this_0.t();
3709
+ while (_iterator__ex2g4s.u()) {
3710
+ var item = _iterator__ex2g4s.v();
3711
+ var tmp$ret$2 = item.value;
3712
+ destination.j1(tmp$ret$2);
3713
+ }
3714
+ // Inline function 'kotlin.collections.toTypedArray' call
3715
+ return copyToArray(destination);
3716
+ }
3717
+ function Companion_7() {
3718
+ this.DATE_TIME_STRING = 0;
3719
+ this.DATE_TIME_NUMBER = 1;
3720
+ this.ENCODED_CBOR = 24;
3721
+ this.FULL_DATE_STRING = 1004;
3722
+ }
3723
+ protoOf(Companion_7).q30 = function () {
3724
+ return this.DATE_TIME_STRING;
3725
+ };
3726
+ protoOf(Companion_7).r30 = function () {
3727
+ return this.DATE_TIME_NUMBER;
3728
+ };
3729
+ protoOf(Companion_7).s30 = function () {
3730
+ return this.ENCODED_CBOR;
3731
+ };
3732
+ protoOf(Companion_7).t30 = function () {
3733
+ return this.FULL_DATE_STRING;
3734
+ };
3735
+ var Companion_instance_8;
3736
+ function Companion_getInstance_8() {
3737
+ return Companion_instance_8;
3738
+ }
3739
+ function CborTagged(tagNumber, taggedItem) {
3740
+ CborItem.call(this, taggedItem.value, taggedItem.cddl);
3741
+ this.tagNumber = tagNumber;
3742
+ this.taggedItem = taggedItem;
3743
+ this.v2x_1 = MajorType_TAG_getInstance();
3744
+ }
3745
+ protoOf(CborTagged).w2x = function () {
3746
+ return this.tagNumber;
3747
+ };
3748
+ protoOf(CborTagged).x2x = function () {
3749
+ return this.taggedItem;
3750
+ };
3751
+ protoOf(CborTagged).o2r = function () {
3752
+ return this.v2x_1;
3753
+ };
3754
+ protoOf(CborTagged).n2r = function (builder) {
3755
+ cborEncodeLength(builder, MajorType_TAG_getInstance(), this.tagNumber);
3756
+ this.taggedItem.n2r(builder);
3757
+ };
3758
+ protoOf(CborTagged).toJsonSimple = function () {
3759
+ return this.taggedItem.toJsonSimple();
3760
+ };
3761
+ protoOf(CborTagged).equals = function (other) {
3762
+ if (this === other)
3763
+ return true;
3764
+ if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
3765
+ return false;
3766
+ if (!protoOf(CborItem).equals.call(this, other))
3767
+ return false;
3768
+ if (!(other instanceof CborTagged))
3769
+ THROW_CCE();
3770
+ if (!(this.tagNumber === other.tagNumber))
3771
+ return false;
3772
+ if (!this.taggedItem.equals(other.taggedItem))
3773
+ return false;
3774
+ return true;
3775
+ };
3776
+ protoOf(CborTagged).hashCode = function () {
3777
+ var result = protoOf(CborItem).hashCode.call(this);
3778
+ result = imul(31, result) + this.tagNumber | 0;
3779
+ result = imul(31, result) + this.taggedItem.hashCode() | 0;
3780
+ return result;
3781
+ };
3782
+ function CborTime(value) {
3783
+ CborTagged.call(this, ensureNotNull(time_getInstance().info), new CborUInt(value));
3784
+ }
3785
+ function CborUInt_init_$Init$(value, $this) {
3786
+ CborUInt.call($this, numberToLong(value));
3787
+ return $this;
3788
+ }
3789
+ function fromNumber(value) {
3790
+ return CborUInt_init_$Init$(value, objectCreate(protoOf(CborUInt)));
3791
+ }
3792
+ function CborUInt(value) {
3793
+ AbstractCborInt.call(this, value, uint_getInstance());
3794
+ }
3795
+ protoOf(CborUInt).z2r = function () {
3796
+ // Inline function 'kotlin.Long.compareTo' call
3797
+ var this_0 = this.value;
3798
+ compareTo(this_0, fromInt(0));
3799
+ };
3800
+ protoOf(CborUInt).n2r = function (builder) {
3801
+ var tmp = ensureNotNull(this.majorType);
3802
+ // Inline function 'kotlin.toULong' call
3803
+ var this_0 = this.value;
3804
+ var tmp$ret$0 = _ULong___init__impl__c78o9k(this_0);
3805
+ cborEncodeLength_0(builder, tmp, tmp$ret$0);
3806
+ };
3807
+ function CborUndefined() {
3808
+ CborSimple.call(this, Unit_instance, undefined_getInstance());
3809
+ if (!equals(this.value, Unit_instance)) {
3810
+ throw IllegalArgumentException_init_$Create$('Undefined requires value Unit');
3811
+ }
3812
+ }
3813
+ protoOf(CborUndefined).toJsonSimple = function () {
3814
+ return JsonPrimitive_3(null);
3815
+ };
3816
+ var LabelType_String_instance;
3817
+ var LabelType_Number_instance;
3818
+ function values() {
3819
+ return [LabelType_String_getInstance(), LabelType_Number_getInstance()];
3820
+ }
3821
+ function valueOf(value) {
3822
+ switch (value) {
3823
+ case 'String':
3824
+ return LabelType_String_getInstance();
3825
+ case 'Number':
3826
+ return LabelType_Number_getInstance();
3827
+ default:
3828
+ LabelType_initEntries();
3829
+ THROW_IAE('No enum constant com.sphereon.cbor.LabelType.' + value);
3830
+ break;
3831
+ }
3832
+ }
3833
+ var LabelType_entriesInitialized;
3834
+ function LabelType_initEntries() {
3835
+ if (LabelType_entriesInitialized)
3836
+ return Unit_instance;
3837
+ LabelType_entriesInitialized = true;
3838
+ LabelType_String_instance = new LabelType('String', 0);
3839
+ LabelType_Number_instance = new LabelType('Number', 1);
3840
+ }
3841
+ function LabelType(name, ordinal) {
3842
+ Enum.call(this, name, ordinal);
3843
+ }
3844
+ function CoseLabeled(label, value) {
3845
+ this.label = label;
3846
+ this.value = value;
3847
+ }
3848
+ protoOf(CoseLabeled).w30 = function () {
3849
+ return this.label;
3850
+ };
3851
+ protoOf(CoseLabeled).t2 = function () {
3852
+ return this.value;
3853
+ };
3854
+ function Companion_8() {
3855
+ }
3856
+ protoOf(Companion_8).o2x = function (cborItem) {
3857
+ var tmp;
3858
+ if (cborItem instanceof CborUInt) {
3859
+ tmp = fromInt_1(convertToInt(cborItem.value));
3860
+ } else {
3861
+ if (cborItem instanceof CborNInt) {
3862
+ tmp = fromInt_1(-convertToInt(cborItem.value) | 0);
3863
+ } else {
3864
+ if (cborItem instanceof CborString) {
3865
+ tmp = new StringLabel(cborItem.value);
3866
+ } else {
3867
+ if (cborItem instanceof CoseLabel) {
3868
+ tmp = cborItem instanceof CoseLabel ? cborItem : THROW_CCE();
3869
+ } else {
3870
+ throw IllegalStateException_init_$Create$('Cannot create a label from cbor item with type ' + toString_0(cborItem.cddl));
3871
+ }
3872
+ }
3873
+ }
3874
+ }
3875
+ return tmp;
3876
+ };
3877
+ var Companion_instance_9;
3878
+ function Companion_getInstance_9() {
3879
+ return Companion_instance_9;
3880
+ }
3881
+ function fromCborItem_0(cborItem) {
3882
+ return Companion_instance_9.o2x(cborItem);
3883
+ }
3884
+ function CoseLabel(value, cddl, type) {
3885
+ CborItem.call(this, value, cddl);
3886
+ this.type = type;
3887
+ }
3888
+ protoOf(CoseLabel).z30 = function () {
3889
+ return this.type;
3890
+ };
3891
+ protoOf(CoseLabel).required = function (map) {
3892
+ // Inline function 'kotlin.collections.containsKey' call
3893
+ var this_0 = map.value;
3894
+ if (!(isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).v2(this)) {
3895
+ throw IllegalArgumentException_init_$Create$('Key (label: ' + toString(this.value) + ', type: ' + toString_0(this.cddl) + ') not found in cbor map');
3896
+ }
3897
+ // Inline function 'kotlin.collections.get' call
3898
+ var this_1 = map.value;
3899
+ var tmp = (isInterface(this_1, KtMap) ? this_1 : THROW_CCE()).x2(this);
3900
+ return tmp instanceof CborBaseItem ? tmp : THROW_CCE();
3901
+ };
3902
+ protoOf(CoseLabel).requiredAsCborMap = function (map) {
3903
+ return this.required(map);
3904
+ };
3905
+ protoOf(CoseLabel).requiredAsCborArray = function (map) {
3906
+ return this.required(map);
3907
+ };
3908
+ protoOf(CoseLabel).requiredAsListFromCborArray = function (map) {
3909
+ var tmp = this.requiredAsCborArray(map).value;
3910
+ return isInterface(tmp, KtMutableList) ? tmp : THROW_CCE();
3911
+ };
3912
+ protoOf(CoseLabel).optional = function (map) {
3913
+ // Inline function 'kotlin.collections.containsKey' call
3914
+ var this_0 = map.value;
3915
+ if (!(isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).v2(this)) {
3916
+ return null;
3917
+ }
3918
+ // Inline function 'kotlin.collections.get' call
3919
+ var this_1 = map.value;
3920
+ var tmp = (isInterface(this_1, KtMap) ? this_1 : THROW_CCE()).x2(this);
3921
+ return tmp instanceof CborBaseItem ? tmp : THROW_CCE();
3922
+ };
3923
+ protoOf(CoseLabel).optionalAsCborMap = function (map) {
3924
+ return this.optional(map);
3925
+ };
3926
+ protoOf(CoseLabel).optionalAsCborArray = function (map) {
3927
+ return this.optional(map);
3928
+ };
3929
+ function NumberLabeledMap(labeledItems) {
3930
+ var tmp;
3931
+ if (labeledItems === VOID) {
3932
+ // Inline function 'kotlin.collections.mutableMapOf' call
3933
+ var tmp$ret$0 = LinkedHashMap_init_$Create$();
3934
+ tmp = new CborMap(tmp$ret$0);
3935
+ } else {
3936
+ tmp = labeledItems;
3937
+ }
3938
+ labeledItems = tmp;
3939
+ this.labeledItems = labeledItems;
3940
+ }
3941
+ protoOf(NumberLabeledMap).a31 = function () {
3942
+ return this.labeledItems;
3943
+ };
3944
+ protoOf(NumberLabeledMap).putLabel = function (label, cborItem) {
3945
+ if (cborItem == null) {
3946
+ return Unit_instance;
3947
+ }
3948
+ var tmp0 = this.labeledItems.value;
3949
+ // Inline function 'kotlin.collections.set' call
3950
+ var key = fromInt_1(label);
3951
+ tmp0.j3(key, cborItem);
3952
+ };
3953
+ protoOf(NumberLabeledMap).requiredLabel = function (label) {
3954
+ return this.labeledItems.value.x2(fromInt_1(label));
3955
+ };
3956
+ protoOf(NumberLabeledMap).optionalLabel = function (label) {
3957
+ var numberLabel = fromInt_1(label);
3958
+ var tmp0_elvis_lhs = this.labeledItems.value.x2(numberLabel);
3959
+ var tmp;
3960
+ if (tmp0_elvis_lhs == null) {
3961
+ return null;
3962
+ } else {
3963
+ tmp = tmp0_elvis_lhs;
3964
+ }
3965
+ var result = tmp;
3966
+ return result;
3967
+ };
3968
+ protoOf(NumberLabeledMap).hasLabel = function (label) {
3969
+ return this.labeledItems.value.v2(fromInt_1(label));
3970
+ };
3971
+ protoOf(NumberLabeledMap).getLabels = function () {
3972
+ return this.labeledItems.value.y2();
3973
+ };
3974
+ protoOf(NumberLabeledMap).connectLabels = function () {
3975
+ if (this.labeledItems.value.r()) {
3976
+ throw IllegalArgumentException_init_$Create$('Please implement connectLabels() in a sub class');
3977
+ }
3978
+ return this.labeledItems;
3979
+ };
3980
+ protoOf(NumberLabeledMap).encode = function () {
3981
+ return this.connectLabels().encodeCbor();
3982
+ };
3983
+ protoOf(NumberLabeledMap).equals = function (other) {
3984
+ if (this === other)
3985
+ return true;
3986
+ if (!(other instanceof NumberLabeledMap))
3987
+ return false;
3988
+ if (!this.labeledItems.equals(other.labeledItems))
3989
+ return false;
3990
+ return true;
3991
+ };
3992
+ protoOf(NumberLabeledMap).hashCode = function () {
3993
+ return this.labeledItems.hashCode();
3994
+ };
3995
+ function toNumberLabel(_this__u8e3s4) {
3996
+ return fromInt_1(_this__u8e3s4);
3997
+ }
3998
+ function longToNumberLabel(_this__u8e3s4) {
3999
+ return fromInt_1(convertToInt(_this__u8e3s4));
4000
+ }
4001
+ function toStringLabel(_this__u8e3s4) {
4002
+ return new StringLabel(_this__u8e3s4);
4003
+ }
4004
+ function LabelType_String_getInstance() {
4005
+ LabelType_initEntries();
4006
+ return LabelType_String_instance;
4007
+ }
4008
+ function LabelType_Number_getInstance() {
4009
+ LabelType_initEntries();
4010
+ return LabelType_Number_instance;
4011
+ }
4012
+ var DiagnosticOption_EMBEDDED_CBOR_instance;
4013
+ var DiagnosticOption_PRETTY_PRINT_instance;
4014
+ var DiagnosticOption_BSTR_PRINT_LENGTH_instance;
4015
+ function values_0() {
4016
+ return [DiagnosticOption_EMBEDDED_CBOR_getInstance(), DiagnosticOption_PRETTY_PRINT_getInstance(), DiagnosticOption_BSTR_PRINT_LENGTH_getInstance()];
4017
+ }
4018
+ function valueOf_0(value) {
4019
+ switch (value) {
4020
+ case 'EMBEDDED_CBOR':
4021
+ return DiagnosticOption_EMBEDDED_CBOR_getInstance();
4022
+ case 'PRETTY_PRINT':
4023
+ return DiagnosticOption_PRETTY_PRINT_getInstance();
4024
+ case 'BSTR_PRINT_LENGTH':
4025
+ return DiagnosticOption_BSTR_PRINT_LENGTH_getInstance();
4026
+ default:
4027
+ DiagnosticOption_initEntries();
4028
+ THROW_IAE('No enum constant com.sphereon.cbor.DiagnosticOption.' + value);
4029
+ break;
4030
+ }
4031
+ }
4032
+ var DiagnosticOption_entriesInitialized;
4033
+ function DiagnosticOption_initEntries() {
4034
+ if (DiagnosticOption_entriesInitialized)
4035
+ return Unit_instance;
4036
+ DiagnosticOption_entriesInitialized = true;
4037
+ DiagnosticOption_EMBEDDED_CBOR_instance = new DiagnosticOption('EMBEDDED_CBOR', 0);
4038
+ DiagnosticOption_PRETTY_PRINT_instance = new DiagnosticOption('PRETTY_PRINT', 1);
4039
+ DiagnosticOption_BSTR_PRINT_LENGTH_instance = new DiagnosticOption('BSTR_PRINT_LENGTH', 2);
4040
+ }
4041
+ function DiagnosticOption(name, ordinal) {
4042
+ Enum.call(this, name, ordinal);
4043
+ }
4044
+ function DiagnosticOption_EMBEDDED_CBOR_getInstance() {
4045
+ DiagnosticOption_initEntries();
4046
+ return DiagnosticOption_EMBEDDED_CBOR_instance;
4047
+ }
4048
+ function DiagnosticOption_PRETTY_PRINT_getInstance() {
4049
+ DiagnosticOption_initEntries();
4050
+ return DiagnosticOption_PRETTY_PRINT_instance;
4051
+ }
4052
+ function DiagnosticOption_BSTR_PRINT_LENGTH_getInstance() {
4053
+ DiagnosticOption_initEntries();
4054
+ return DiagnosticOption_BSTR_PRINT_LENGTH_instance;
4055
+ }
4056
+ function _get_$cachedSerializer__te6jhj_0($this) {
4057
+ return $this.u2w_1.t2();
4058
+ }
4059
+ function MajorType$Companion$_anonymous__2dqzk4() {
4060
+ return createSimpleEnumSerializer('com.sphereon.cbor.MajorType', values_1());
4061
+ }
4062
+ var MajorType_UNSIGNED_INTEGER_instance;
4063
+ var MajorType_NEGATIVE_INTEGER_instance;
4064
+ var MajorType_BYTE_STRING_instance;
4065
+ var MajorType_UNICODE_STRING_instance;
4066
+ var MajorType_ARRAY_instance;
4067
+ var MajorType_MAP_instance;
4068
+ var MajorType_TAG_instance;
4069
+ var MajorType_SPECIAL_instance;
4070
+ function Companion_9() {
4071
+ Companion_instance_10 = this;
4072
+ var tmp = this;
4073
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
4074
+ tmp.u2w_1 = lazy_0(tmp_0, MajorType$Companion$_anonymous__2dqzk4);
4075
+ }
4076
+ protoOf(Companion_9).v2w = function (value) {
4077
+ // Inline function 'kotlin.collections.find' call
4078
+ var tmp0 = get_entries();
4079
+ var tmp$ret$1;
4080
+ $l$block: {
4081
+ // Inline function 'kotlin.collections.firstOrNull' call
4082
+ var _iterator__ex2g4s = tmp0.t();
4083
+ while (_iterator__ex2g4s.u()) {
4084
+ var element = _iterator__ex2g4s.v();
4085
+ if (element.type === value) {
4086
+ tmp$ret$1 = element;
4087
+ break $l$block;
4088
+ }
4089
+ }
4090
+ tmp$ret$1 = null;
4091
+ }
4092
+ var tmp0_elvis_lhs = tmp$ret$1;
4093
+ var tmp;
4094
+ if (tmp0_elvis_lhs == null) {
4095
+ throw IllegalArgumentException_init_$Create$('Unknown major type with value ' + value);
4096
+ } else {
4097
+ tmp = tmp0_elvis_lhs;
4098
+ }
4099
+ return tmp;
4100
+ };
4101
+ protoOf(Companion_9).t1e = function () {
4102
+ return _get_$cachedSerializer__te6jhj_0(this);
4103
+ };
4104
+ protoOf(Companion_9).x11 = function (typeParamsSerializers) {
4105
+ return this.t1e();
4106
+ };
4107
+ var Companion_instance_10;
4108
+ function Companion_getInstance_10() {
4109
+ MajorType_initEntries();
4110
+ if (Companion_instance_10 == null)
4111
+ new Companion_9();
4112
+ return Companion_instance_10;
4113
+ }
4114
+ function values_1() {
4115
+ return [MajorType_UNSIGNED_INTEGER_getInstance(), MajorType_NEGATIVE_INTEGER_getInstance(), MajorType_BYTE_STRING_getInstance(), MajorType_UNICODE_STRING_getInstance(), MajorType_ARRAY_getInstance(), MajorType_MAP_getInstance(), MajorType_TAG_getInstance(), MajorType_SPECIAL_getInstance()];
4116
+ }
4117
+ function valueOf_1(value) {
4118
+ switch (value) {
4119
+ case 'UNSIGNED_INTEGER':
4120
+ return MajorType_UNSIGNED_INTEGER_getInstance();
4121
+ case 'NEGATIVE_INTEGER':
4122
+ return MajorType_NEGATIVE_INTEGER_getInstance();
4123
+ case 'BYTE_STRING':
4124
+ return MajorType_BYTE_STRING_getInstance();
4125
+ case 'UNICODE_STRING':
4126
+ return MajorType_UNICODE_STRING_getInstance();
4127
+ case 'ARRAY':
4128
+ return MajorType_ARRAY_getInstance();
4129
+ case 'MAP':
4130
+ return MajorType_MAP_getInstance();
4131
+ case 'TAG':
4132
+ return MajorType_TAG_getInstance();
4133
+ case 'SPECIAL':
4134
+ return MajorType_SPECIAL_getInstance();
4135
+ default:
4136
+ MajorType_initEntries();
4137
+ THROW_IAE('No enum constant com.sphereon.cbor.MajorType.' + value);
4138
+ break;
4139
+ }
4140
+ }
4141
+ function get_entries() {
4142
+ if ($ENTRIES == null)
4143
+ $ENTRIES = enumEntries(values_1());
4144
+ return $ENTRIES;
4145
+ }
4146
+ function fromInt_0(value) {
4147
+ return Companion_getInstance_10().v2w(value);
4148
+ }
4149
+ var MajorType_entriesInitialized;
4150
+ function MajorType_initEntries() {
4151
+ if (MajorType_entriesInitialized)
4152
+ return Unit_instance;
4153
+ MajorType_entriesInitialized = true;
4154
+ MajorType_UNSIGNED_INTEGER_instance = new MajorType('UNSIGNED_INTEGER', 0, 0);
4155
+ MajorType_NEGATIVE_INTEGER_instance = new MajorType('NEGATIVE_INTEGER', 1, 1);
4156
+ MajorType_BYTE_STRING_instance = new MajorType('BYTE_STRING', 2, 2);
4157
+ MajorType_UNICODE_STRING_instance = new MajorType('UNICODE_STRING', 3, 3);
4158
+ MajorType_ARRAY_instance = new MajorType('ARRAY', 4, 4);
4159
+ MajorType_MAP_instance = new MajorType('MAP', 5, 5);
4160
+ MajorType_TAG_instance = new MajorType('TAG', 6, 6);
4161
+ MajorType_SPECIAL_instance = new MajorType('SPECIAL', 7, 7);
4162
+ Companion_getInstance_10();
4163
+ }
4164
+ var $ENTRIES;
4165
+ function MajorType(name, ordinal, type) {
4166
+ Enum.call(this, name, ordinal);
4167
+ this.type = type;
4168
+ }
4169
+ protoOf(MajorType).z30 = function () {
4170
+ return this.type;
4171
+ };
4172
+ function MajorType_UNSIGNED_INTEGER_getInstance() {
4173
+ MajorType_initEntries();
4174
+ return MajorType_UNSIGNED_INTEGER_instance;
4175
+ }
4176
+ function MajorType_NEGATIVE_INTEGER_getInstance() {
4177
+ MajorType_initEntries();
4178
+ return MajorType_NEGATIVE_INTEGER_instance;
4179
+ }
4180
+ function MajorType_BYTE_STRING_getInstance() {
4181
+ MajorType_initEntries();
4182
+ return MajorType_BYTE_STRING_instance;
4183
+ }
4184
+ function MajorType_UNICODE_STRING_getInstance() {
4185
+ MajorType_initEntries();
4186
+ return MajorType_UNICODE_STRING_instance;
4187
+ }
4188
+ function MajorType_ARRAY_getInstance() {
4189
+ MajorType_initEntries();
4190
+ return MajorType_ARRAY_instance;
4191
+ }
4192
+ function MajorType_MAP_getInstance() {
4193
+ MajorType_initEntries();
4194
+ return MajorType_MAP_instance;
4195
+ }
4196
+ function MajorType_TAG_getInstance() {
4197
+ MajorType_initEntries();
4198
+ return MajorType_TAG_instance;
4199
+ }
4200
+ function MajorType_SPECIAL_getInstance() {
4201
+ MajorType_initEntries();
4202
+ return MajorType_SPECIAL_instance;
4203
+ }
4204
+ function NumberLabel_init_$Init$(value, $this) {
4205
+ NumberLabel.call($this, fromInt(value));
4206
+ return $this;
4207
+ }
4208
+ function fromInt_1(value) {
4209
+ return NumberLabel_init_$Init$(value, objectCreate(protoOf(NumberLabel)));
4210
+ }
4211
+ function Companion_10() {
4212
+ }
4213
+ protoOf(Companion_10).o2x = function (structure) {
4214
+ var generic = Companion_instance_9.o2x(structure);
4215
+ // Inline function 'kotlin.require' call
4216
+ if (!(generic instanceof NumberLabel)) {
4217
+ var message = 'Label passed in was not convertable a NumberLabel';
4218
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
4219
+ }
4220
+ return generic;
4221
+ };
4222
+ var Companion_instance_11;
4223
+ function Companion_getInstance_11() {
4224
+ return Companion_instance_11;
4225
+ }
4226
+ function fromCborItem_1(structure) {
4227
+ return Companion_instance_11.o2x(structure);
4228
+ }
4229
+ function NumberLabel(value) {
4230
+ CoseLabel.call(this, abs(value), value >= 0n ? uint_getInstance() : nint_getInstance(), LabelType_Number_getInstance());
4231
+ }
4232
+ protoOf(NumberLabel).toJsonSimple = function () {
4233
+ return JsonPrimitive_2(this.toValue());
4234
+ };
4235
+ protoOf(NumberLabel).n2r = function (builder) {
4236
+ return this.toCborItem().n2r(builder);
4237
+ };
4238
+ protoOf(NumberLabel).toString = function () {
4239
+ return this.value.toString();
4240
+ };
4241
+ protoOf(NumberLabel).toCborItem = function () {
4242
+ var tmp;
4243
+ if (equals(this.majorType, MajorType_NEGATIVE_INTEGER_getInstance())) {
4244
+ tmp = new CborNInt(this.value);
4245
+ } else {
4246
+ tmp = new CborUInt(this.value);
4247
+ }
4248
+ return tmp;
4249
+ };
4250
+ function Companion_11() {
4251
+ }
4252
+ protoOf(Companion_11).o2x = function (structure) {
4253
+ var generic = Companion_instance_9.o2x(structure);
4254
+ // Inline function 'kotlin.require' call
4255
+ if (!(generic instanceof StringLabel)) {
4256
+ var message = 'Label passed in was not convertable a StringLabel';
4257
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
4258
+ }
4259
+ return generic;
4260
+ };
4261
+ var Companion_instance_12;
4262
+ function Companion_getInstance_12() {
4263
+ return Companion_instance_12;
4264
+ }
4265
+ function fromCborItem_2(structure) {
4266
+ return Companion_instance_12.o2x(structure);
4267
+ }
4268
+ function StringLabel(value) {
4269
+ CoseLabel.call(this, value, tstr_getInstance(), LabelType_String_getInstance());
4270
+ }
4271
+ protoOf(StringLabel).toJsonSimple = function () {
4272
+ return JsonPrimitive_1(this.toValue());
4273
+ };
4274
+ protoOf(StringLabel).n2r = function (builder) {
4275
+ var encodedValue = encodeToByteArray(this.value);
4276
+ cborEncodeLength(builder, ensureNotNull(this.majorType), encodedValue.length);
4277
+ builder.q2c(encodeToByteArray(this.value));
4278
+ };
4279
+ protoOf(StringLabel).toString = function () {
4280
+ return this.value;
4281
+ };
4282
+ protoOf(StringLabel).toCborItem = function () {
4283
+ return new CborString(this.value);
4284
+ };
4285
+ function get_cborJsonSerializer() {
4286
+ _init_properties_CborJsonSerialization_kt__uyoa38();
4287
+ return cborJsonSerializer;
4288
+ }
4289
+ var cborJsonSerializer;
4290
+ function CborJsonSupport$serializer$lambda($this$Json) {
4291
+ $this$Json.n1d_1 = CborJsonSupport_getInstance().module;
4292
+ return Unit_instance;
4293
+ }
4294
+ function CborJsonSupport() {
4295
+ CborJsonSupport_instance = this;
4296
+ var tmp = this;
4297
+ // Inline function 'kotlinx.serialization.modules.SerializersModule' call
4298
+ var builder = new SerializersModuleBuilder();
4299
+ tmp.module = builder.yy();
4300
+ var tmp_0 = this;
4301
+ tmp_0.serializer = Json(VOID, CborJsonSupport$serializer$lambda);
4302
+ }
4303
+ protoOf(CborJsonSupport).z2h = function () {
4304
+ return this.module;
4305
+ };
4306
+ protoOf(CborJsonSupport).a2i = function () {
4307
+ return this.serializer;
4308
+ };
4309
+ var CborJsonSupport_instance;
4310
+ function CborJsonSupport_getInstance() {
4311
+ if (CborJsonSupport_instance == null)
4312
+ new CborJsonSupport();
4313
+ return CborJsonSupport_instance;
4314
+ }
4315
+ var properties_initialized_CborJsonSerialization_kt_i0f4vq;
4316
+ function _init_properties_CborJsonSerialization_kt__uyoa38() {
4317
+ if (!properties_initialized_CborJsonSerialization_kt_i0f4vq) {
4318
+ properties_initialized_CborJsonSerialization_kt_i0f4vq = true;
4319
+ cborJsonSerializer = CborJsonSupport_getInstance().serializer;
4320
+ }
4321
+ }
4322
+ function HasToJsonString() {
4323
+ }
4324
+ function HasToJsonDTO() {
4325
+ }
4326
+ function _get_$cachedSerializer__te6jhj_1($this) {
4327
+ return $this.h31_1.t2();
4328
+ }
4329
+ function JsonView$Companion$_anonymous__r3v0im() {
4330
+ var tmp = getKClass(JsonView);
4331
+ // Inline function 'kotlin.arrayOf' call
4332
+ // Inline function 'kotlin.js.unsafeCast' call
4333
+ // Inline function 'kotlin.js.asDynamic' call
4334
+ var tmp$ret$0 = [];
4335
+ return PolymorphicSerializer_init_$Create$(tmp, tmp$ret$0);
4336
+ }
4337
+ function Companion_12() {
4338
+ Companion_instance_13 = this;
4339
+ var tmp = this;
4340
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
4341
+ tmp.h31_1 = lazy_0(tmp_0, JsonView$Companion$_anonymous__r3v0im);
4342
+ }
4343
+ protoOf(Companion_12).t1e = function () {
4344
+ return _get_$cachedSerializer__te6jhj_1(this);
4345
+ };
4346
+ protoOf(Companion_12).x11 = function (typeParamsSerializers) {
4347
+ return this.t1e();
4348
+ };
4349
+ var Companion_instance_13;
4350
+ function Companion_getInstance_13() {
4351
+ if (Companion_instance_13 == null)
4352
+ new Companion_12();
4353
+ return Companion_instance_13;
4354
+ }
4355
+ function JsonView_init_$Init$(seen0, serializationConstructorMarker, $this) {
4356
+ return $this;
4357
+ }
4358
+ function JsonView() {
4359
+ Companion_getInstance_13();
4360
+ }
4361
+ protoOf(JsonView).toJsonDTO = function () {
4362
+ return toJsonDTO(this);
4363
+ };
4364
+ function toJsonDTO(subject) {
4365
+ return JSON.parse(subject.toJsonString());
4366
+ }
4367
+ //region block: post-declaration
4368
+ protoOf(CborItem).toJson = toJson;
4369
+ defineProp(protoOf(CborItem), 'majorType', function () {
4370
+ return this.o2r();
4371
+ });
4372
+ defineProp(protoOf(CborItem), 'asStr', protoOf(CborItem).q2r);
4373
+ defineProp(protoOf(CborItem), 'asBool', protoOf(CborItem).r2r);
4374
+ defineProp(protoOf(CborItem), 'asBstr', protoOf(CborItem).s2r);
4375
+ defineProp(protoOf(CborItem), 'asLong', protoOf(CborItem).t2r);
4376
+ defineProp(protoOf(CborItem), 'asInt', protoOf(CborItem).u2r);
4377
+ defineProp(protoOf(CborItem), 'asMap', protoOf(CborItem).w2r);
4378
+ defineProp(protoOf(CborItem), 'asList', protoOf(CborItem).x2r);
4379
+ defineProp(protoOf(CborItem), 'asTaggedSubject', protoOf(CborItem).y2r);
4380
+ protoOf(CDDL).newCborItemFromJson = newCborItemFromJson;
4381
+ protoOf(CDDL).toTag = toTag;
4382
+ defineProp(protoOf(CDDL), 'format', function () {
4383
+ return this.h2s();
4384
+ });
4385
+ defineProp(protoOf(CDDL), 'majorType', function () {
4386
+ return this.o2r();
4387
+ });
4388
+ defineProp(protoOf(CDDL), 'info', function () {
4389
+ return this.p2r();
4390
+ });
4391
+ defineProp(protoOf(CDDL), 'aliasFor', function () {
4392
+ return this.i2s();
4393
+ });
4394
+ defineProp(protoOf(util), 'entries', protoOf(util).q1);
4395
+ defineProp(protoOf(CborArray$toJsonCborItem$1), 'cddl', function () {
4396
+ return this.a2s();
4397
+ });
4398
+ defineProp(protoOf(CborArray$toJsonCborItem$1), 'value', function () {
4399
+ return this.t2();
4400
+ });
4401
+ defineProp(protoOf(CborEncodedItem), '_data', protoOf(CborEncodedItem).q2y, protoOf(CborEncodedItem).p2y);
4402
+ defineProp(protoOf(CborItem$toJsonCborItem$1), 'cddl', function () {
4403
+ return this.a2s();
4404
+ });
4405
+ defineProp(protoOf(CborItem$toJsonCborItem$1), 'value', function () {
4406
+ return this.t2();
4407
+ });
4408
+ defineProp(protoOf(CborItemJson$Companion$fromJsonPrimitive$1), 'cddl', function () {
4409
+ return this.a2s();
4410
+ });
4411
+ defineProp(protoOf(CborItemJson$Companion$fromJsonPrimitive$1), 'value', function () {
4412
+ return this.t2();
4413
+ });
4414
+ defineProp(protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$1), 'cddl', function () {
4415
+ return this.a2s();
4416
+ });
4417
+ defineProp(protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$1), 'key', function () {
4418
+ return this.s2();
4419
+ });
4420
+ defineProp(protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$1), 'value', function () {
4421
+ return this.t2();
4422
+ });
4423
+ defineProp(protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$2), 'cddl', function () {
4424
+ return this.a2s();
4425
+ });
4426
+ defineProp(protoOf(CborItemJson$Companion$fromJsonObjectAsValueJson$2), 'value', function () {
4427
+ return this.t2();
4428
+ });
4429
+ protoOf($serializer).n11 = typeParametersSerializers;
4430
+ protoOf(CborItemJson).toJson = toJson;
4431
+ defineProp(protoOf(CborItemJson), 'key', function () {
4432
+ return this.s2();
4433
+ });
4434
+ defineProp(protoOf(CborItemJson), 'value', function () {
4435
+ return this.t2();
4436
+ });
4437
+ defineProp(protoOf(CborItemJson), 'cddl', function () {
4438
+ return this.a2s();
4439
+ });
4440
+ defineProp(protoOf(CborMap$toJsonCborItem$1), 'cddl', function () {
4441
+ return this.a2s();
4442
+ });
4443
+ defineProp(protoOf(CborMap$toJsonCborItem$1), 'value', function () {
4444
+ return this.t2();
4445
+ });
4446
+ defineProp(protoOf(LabelType), 'name', protoOf(LabelType).m);
4447
+ defineProp(protoOf(LabelType), 'ordinal', protoOf(LabelType).m3);
4448
+ defineProp(protoOf(DiagnosticOption), 'name', protoOf(DiagnosticOption).m);
4449
+ defineProp(protoOf(DiagnosticOption), 'ordinal', protoOf(DiagnosticOption).m3);
4450
+ defineProp(protoOf(MajorType), 'name', protoOf(MajorType).m);
4451
+ defineProp(protoOf(MajorType), 'ordinal', protoOf(MajorType).m3);
4452
+ //endregion
4453
+ //region block: init
4454
+ Companion_instance_0 = new Companion();
4455
+ Companion_instance_1 = new Companion_0();
4456
+ Companion_instance_3 = new Companion_2();
4457
+ Companion_instance_5 = new Companion_4();
4458
+ CborError_instance = new CborError();
4459
+ Companion_instance_6 = new Companion_5();
4460
+ HEX_ALPHABET = '0123456789abcdefABCDEF';
4461
+ Companion_instance_8 = new Companion_7();
4462
+ Companion_instance_9 = new Companion_8();
4463
+ Companion_instance_11 = new Companion_10();
4464
+ Companion_instance_12 = new Companion_11();
4465
+ //endregion
4466
+ //region block: exports
4467
+ defineProp(CDDL, 'tstr', tstr_getInstance, VOID, true);
4468
+ defineProp(CDDL, 'uint', uint_getInstance, VOID, true);
4469
+ defineProp(CDDL, 'nint', nint_getInstance, VOID, true);
4470
+ defineProp(CDDL, 'int', int_getInstance, VOID, true);
4471
+ defineProp(CDDL, 'bstr', bstr_getInstance, VOID, true);
4472
+ defineProp(CDDL, 'bstr_indef_length', bstr_indef_length_getInstance, VOID, true);
4473
+ defineProp(CDDL, 'bytes', bytes_getInstance, VOID, true);
4474
+ defineProp(CDDL, 'tstr_indef_length', tstr_indef_length_getInstance, VOID, true);
4475
+ defineProp(CDDL, 'text', text_getInstance, VOID, true);
4476
+ defineProp(CDDL, 'tdate', tdate_getInstance, VOID, true);
4477
+ defineProp(CDDL, 'full_date', full_date_getInstance, VOID, true);
4478
+ defineProp(CDDL, 'time', time_getInstance, VOID, true);
4479
+ defineProp(CDDL, 'float16', float16_getInstance, VOID, true);
4480
+ defineProp(CDDL, 'float32', float32_getInstance, VOID, true);
4481
+ defineProp(CDDL, 'float64', float64_getInstance, VOID, true);
4482
+ defineProp(CDDL, 'float', float_getInstance, VOID, true);
4483
+ defineProp(CDDL, 'False', False_getInstance, VOID, true);
4484
+ defineProp(CDDL, 'True', True_getInstance, VOID, true);
4485
+ defineProp(CDDL, 'bool', bool_getInstance, VOID, true);
4486
+ defineProp(CDDL, 'nil', nil_getInstance, VOID, true);
4487
+ defineProp(CDDL, 'Null', Null_getInstance, VOID, true);
4488
+ defineProp(CDDL, 'undefined', undefined_getInstance, VOID, true);
4489
+ defineProp(CDDL, 'map', map_getInstance, VOID, true);
4490
+ defineProp(CDDL, 'list', list_getInstance, VOID, true);
4491
+ defineProp(CDDL, 'any', any_getInstance, VOID, true);
4492
+ defineProp(CDDL, 'util', util_getInstance, VOID, true);
4493
+ CborByteString.fromCborItem = fromCborItem;
4494
+ defineProp(CborByteString, 'Companion', Companion_getInstance_3, VOID, true);
4495
+ defineProp(CborDecoderConfig, 'DEFAULT', get_DEFAULT, VOID, true);
4496
+ defineProp(CborDecoderConfig, 'PERMISSIVE', get_PERMISSIVE, VOID, true);
4497
+ defineProp(CborDecoderConfig, 'STRICT', get_STRICT, VOID, true);
4498
+ defineProp(CborDecoderConfig, 'Companion', Companion_getInstance_4, VOID, true);
4499
+ CborEncodedItem.fromBytes = fromBytes;
4500
+ CborEncodedItem.toData = toData;
4501
+ defineProp(CborEncodedItem, 'Companion', Companion_getInstance_5, VOID, true);
4502
+ var CborError_0 = {getInstance: CborError_getInstance};
4503
+ CborItemJson.isCborItemValueJson = isCborItemValueJson;
4504
+ CborItemJson.isCborItemJson = isCborItemJson;
4505
+ CborItemJson.fromJsonPrimitive = fromJsonPrimitive;
4506
+ CborItemJson.fromJsonArray = fromJsonArray;
4507
+ CborItemJson.fromJsonObjectAsCborItemJson = fromJsonObjectAsCborItemJson;
4508
+ CborItemJson.fromJsonObjectAsValueJson = fromJsonObjectAsValueJson;
4509
+ CborItemJson.fromDTO = fromDTO;
4510
+ defineProp(CborItemJson, 'Companion', Companion_getInstance_6, VOID, true);
4511
+ defineProp(CborTagged, 'Companion', Companion_getInstance_8, VOID, true);
4512
+ CborUInt.fromNumber = fromNumber;
4513
+ LabelType.values = values;
4514
+ LabelType.valueOf = valueOf;
4515
+ defineProp(LabelType, 'String', LabelType_String_getInstance, VOID, true);
4516
+ defineProp(LabelType, 'Number', LabelType_Number_getInstance, VOID, true);
4517
+ CoseLabel.fromCborItem = fromCborItem_0;
4518
+ defineProp(CoseLabel, 'Companion', Companion_getInstance_9, VOID, true);
4519
+ DiagnosticOption.values = values_0;
4520
+ DiagnosticOption.valueOf = valueOf_0;
4521
+ defineProp(DiagnosticOption, 'EMBEDDED_CBOR', DiagnosticOption_EMBEDDED_CBOR_getInstance, VOID, true);
4522
+ defineProp(DiagnosticOption, 'PRETTY_PRINT', DiagnosticOption_PRETTY_PRINT_getInstance, VOID, true);
4523
+ defineProp(DiagnosticOption, 'BSTR_PRINT_LENGTH', DiagnosticOption_BSTR_PRINT_LENGTH_getInstance, VOID, true);
4524
+ MajorType.values = values_1;
4525
+ MajorType.valueOf = valueOf_1;
4526
+ MajorType.fromInt = fromInt_0;
4527
+ defineProp(MajorType, 'UNSIGNED_INTEGER', MajorType_UNSIGNED_INTEGER_getInstance, VOID, true);
4528
+ defineProp(MajorType, 'NEGATIVE_INTEGER', MajorType_NEGATIVE_INTEGER_getInstance, VOID, true);
4529
+ defineProp(MajorType, 'BYTE_STRING', MajorType_BYTE_STRING_getInstance, VOID, true);
4530
+ defineProp(MajorType, 'UNICODE_STRING', MajorType_UNICODE_STRING_getInstance, VOID, true);
4531
+ defineProp(MajorType, 'ARRAY', MajorType_ARRAY_getInstance, VOID, true);
4532
+ defineProp(MajorType, 'MAP', MajorType_MAP_getInstance, VOID, true);
4533
+ defineProp(MajorType, 'TAG', MajorType_TAG_getInstance, VOID, true);
4534
+ defineProp(MajorType, 'SPECIAL', MajorType_SPECIAL_getInstance, VOID, true);
4535
+ defineProp(MajorType, 'Companion', Companion_getInstance_10, VOID, true);
4536
+ NumberLabel.fromInt = fromInt_1;
4537
+ NumberLabel.fromCborItem = fromCborItem_1;
4538
+ defineProp(NumberLabel, 'Companion', Companion_getInstance_11, VOID, true);
4539
+ StringLabel.fromCborItem = fromCborItem_2;
4540
+ defineProp(StringLabel, 'Companion', Companion_getInstance_12, VOID, true);
4541
+ var cborJsonSerializer_0 = {get: get_cborJsonSerializer};
4542
+ var CborJsonSupport_0 = {getInstance: CborJsonSupport_getInstance};
4543
+ export {
4544
+ AbstractCborInt as AbstractCborInt,
4545
+ CborInt as CborInt,
4546
+ CDDL as CDDL,
4547
+ CborAny as CborAny,
4548
+ CborArray as CborArray,
4549
+ CborBaseItem as CborBaseItem,
4550
+ CborBool as CborBool,
4551
+ CborTrue as CborTrue,
4552
+ CborFalse as CborFalse,
4553
+ CborBuilder as CborBuilder,
4554
+ CborByteString as CborByteString,
4555
+ CborTDate as CborTDate,
4556
+ CborFullDate as CborFullDate,
4557
+ cborTDateToEpochSeconds as cborTDateToEpochSeconds,
4558
+ cborFullDateToEpochSeconds as cborFullDateToEpochSeconds,
4559
+ toCborFullDate as toCborFullDate,
4560
+ localDateToDateStringISO as localDateToDateStringISO,
4561
+ localDateToCborFullDate as localDateToCborFullDate,
4562
+ CborDecoderConfig as CborDecoderConfig,
4563
+ CborHexEncodedItem as CborHexEncodedItem,
4564
+ CborEncodedItem as CborEncodedItem,
4565
+ CborError_0 as CborError,
4566
+ CborFloat as CborFloat,
4567
+ CborFloat16 as CborFloat16,
4568
+ CborFloat32 as CborFloat32,
4569
+ CborDouble as CborDouble,
4570
+ CborItem as CborItem,
4571
+ CborCollectionItem as CborCollectionItem,
4572
+ toCborItem as toCborItem,
4573
+ CborItemJson as CborItemJson,
4574
+ jsonObjectToCborJsonItem as jsonObjectToCborJsonItem,
4575
+ SimpleCborBuilder as SimpleCborBuilder,
4576
+ CborMap as CborMap,
4577
+ CborNInt as CborNInt,
4578
+ CborNil as CborNil,
4579
+ CborNull as CborNull,
4580
+ CborString as CborString,
4581
+ CborTagged as CborTagged,
4582
+ CborTime as CborTime,
4583
+ CborUInt as CborUInt,
4584
+ CborUndefined as CborUndefined,
4585
+ LabelType as LabelType,
4586
+ CoseLabeled as CoseLabeled,
4587
+ CoseLabel as CoseLabel,
4588
+ NumberLabeledMap as NumberLabeledMap,
4589
+ toNumberLabel as toNumberLabel,
4590
+ longToNumberLabel as longToNumberLabel,
4591
+ toStringLabel as toStringLabel,
4592
+ DiagnosticOption as DiagnosticOption,
4593
+ MajorType as MajorType,
4594
+ NumberLabel as NumberLabel,
4595
+ StringLabel as StringLabel,
4596
+ cborJsonSerializer_0 as cborJsonSerializer,
4597
+ CborJsonSupport_0 as CborJsonSupport,
4598
+ JsonView as JsonView,
4599
+ toJsonDTO as toJsonDTO,
4600
+ };
4601
+ export {
4602
+ HasToJsonDTO as HasToJsonDTO2q70g1p41k4p9,
4603
+ HasToJsonString as HasToJsonString3asrh3f8vd9cb,
4604
+ JsonView as JsonView3q3pdhdhrhyhz,
4605
+ toJsonDTO as toJsonDTO3f19kxx7jwojk,
4606
+ CborArray as CborArray32s40dj5blqyh,
4607
+ CborByteString as CborByteString1vx2dm89vgsji,
4608
+ CborNumber as CborNumber25ne8cwymvwir,
4609
+ CborString as CborString2zb00032a50c8,
4610
+ CborUInt as CborUInt2sjifbi7c98qb,
4611
+ encodeToArray as encodeToArray3p2jcnpyti43k,
4612
+ encodeToBase64Array as encodeToBase64Array17sgt230vtvqz,
4613
+ encodeToCborByteArray as encodeToCborByteArray2lgqrb64maepg,
4614
+ instantToDateStringISO as instantToDateStringISO208d56fskqdtz,
4615
+ toCborByteString_0 as toCborByteString1qlosmsyjdgwm,
4616
+ toCborByteString as toCborByteString2pnueicmkk3nc,
4617
+ toCborStringArray as toCborStringArrayewahvl9jnzdi,
4618
+ toCborString as toCborString3lr1tzcpfvoxf,
4619
+ toStringArray as toStringArrayiecophari9b3,
4620
+ JsonView_init_$Init$ as JsonView_init_$Init$3u05u0467fipf,
4621
+ fromBytes as fromBytes39ld5kv1dm2ua,
4622
+ fromNumber as fromNumber9zu0yoed5m18,
4623
+ fromInt_1 as fromInt1lo56zmlga40o,
4624
+ };
4625
+ //endregion
4626
+
4627
+ //# sourceMappingURL=idk-lib-cbor-public.mjs.map