@flock/wirespec 0.0.1
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.
- package/kotlin/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js +1601 -0
- package/kotlin/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map +1 -0
- package/kotlin/arrow-arrow-annotations.js +15 -0
- package/kotlin/arrow-arrow-annotations.js.map +1 -0
- package/kotlin/arrow-arrow-atomic.js +57 -0
- package/kotlin/arrow-arrow-atomic.js.map +1 -0
- package/kotlin/arrow-arrow-continuations.js +31 -0
- package/kotlin/arrow-arrow-continuations.js.map +1 -0
- package/kotlin/arrow-arrow-core.js +357 -0
- package/kotlin/arrow-arrow-core.js.map +1 -0
- package/kotlin/kotlin-kotlin-stdlib-js-ir.js +11509 -0
- package/kotlin/kotlin-kotlin-stdlib-js-ir.js.map +1 -0
- package/kotlin/kotlin-openapi-bindings.js +12060 -0
- package/kotlin/kotlin-openapi-bindings.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +5362 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +4421 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -0
- package/kotlin/wirespec-bin.js +3 -0
- package/kotlin/wirespec-cli.js +1069 -0
- package/kotlin/wirespec-cli.js.map +1 -0
- package/kotlin/wirespec-core.js +4687 -0
- package/kotlin/wirespec-core.js.map +1 -0
- package/kotlin/wirespec-lib.js +620 -0
- package/kotlin/wirespec-lib.js.map +1 -0
- package/kotlin/wirespec-openapi.js +2614 -0
- package/kotlin/wirespec-openapi.js.map +1 -0
- package/package.json +17 -0
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.hash +1 -0
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-annotations.js.hash +1 -0
- package/sync-hashes/arrow-arrow-annotations.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-atomic.js.hash +1 -0
- package/sync-hashes/arrow-arrow-atomic.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-continuations.js.hash +1 -0
- package/sync-hashes/arrow-arrow-continuations.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-core.js.hash +1 -0
- package/sync-hashes/arrow-arrow-core.js.map.hash +1 -0
- package/sync-hashes/kotlin-kotlin-stdlib-js-ir.js.hash +1 -0
- package/sync-hashes/kotlin-kotlin-stdlib-js-ir.js.map.hash +1 -0
- package/sync-hashes/kotlin-openapi-bindings.js.hash +1 -0
- package/sync-hashes/kotlin-openapi-bindings.js.map.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map.hash +1 -0
- package/sync-hashes/wirespec-bin.js.hash +1 -0
- package/sync-hashes/wirespec-cli.js.hash +1 -0
- package/sync-hashes/wirespec-cli.js.map.hash +1 -0
- package/sync-hashes/wirespec-core.js.hash +1 -0
- package/sync-hashes/wirespec-core.js.map.hash +1 -0
- package/sync-hashes/wirespec-lib.js.hash +1 -0
- package/sync-hashes/wirespec-lib.js.map.hash +1 -0
- package/sync-hashes/wirespec-openapi.js.hash +1 -0
- package/sync-hashes/wirespec-openapi.js.map.hash +1 -0
|
@@ -0,0 +1,1601 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib-js-ir.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'Kotlinx-Cli-Library-kotlinx-cli-js-ir'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'Kotlinx-Cli-Library-kotlinx-cli-js-ir'.");
|
|
9
|
+
}
|
|
10
|
+
root['Kotlinx-Cli-Library-kotlinx-cli-js-ir'] = factory(typeof this['Kotlinx-Cli-Library-kotlinx-cli-js-ir'] === 'undefined' ? {} : this['Kotlinx-Cli-Library-kotlinx-cli-js-ir'], this['kotlin-kotlin-stdlib-js-ir']);
|
|
11
|
+
}
|
|
12
|
+
}(this, function (_, kotlin_kotlin) {
|
|
13
|
+
'use strict';
|
|
14
|
+
//region block: imports
|
|
15
|
+
var Unit_getInstance = kotlin_kotlin.$_$.i3;
|
|
16
|
+
var Enum = kotlin_kotlin.$_$.p9;
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.t7;
|
|
18
|
+
var classMeta = kotlin_kotlin.$_$.q6;
|
|
19
|
+
var VOID = kotlin_kotlin.$_$.ya;
|
|
20
|
+
var setMetadataFor = kotlin_kotlin.$_$.u7;
|
|
21
|
+
var toString = kotlin_kotlin.$_$.y7;
|
|
22
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
|
|
23
|
+
var throwKotlinNothingValueException = kotlin_kotlin.$_$.va;
|
|
24
|
+
var ensureNotNull = kotlin_kotlin.$_$.na;
|
|
25
|
+
var startsWith = kotlin_kotlin.$_$.x8;
|
|
26
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.i1;
|
|
27
|
+
var charArrayOf = kotlin_kotlin.$_$.l6;
|
|
28
|
+
var split = kotlin_kotlin.$_$.v8;
|
|
29
|
+
var charSequenceLength = kotlin_kotlin.$_$.o6;
|
|
30
|
+
var charSequenceGet = kotlin_kotlin.$_$.n6;
|
|
31
|
+
var Char = kotlin_kotlin.$_$.m9;
|
|
32
|
+
var println = kotlin_kotlin.$_$.h6;
|
|
33
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
34
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
35
|
+
var mutableListOf = kotlin_kotlin.$_$.m5;
|
|
36
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
37
|
+
var listOf = kotlin_kotlin.$_$.i5;
|
|
38
|
+
var asList = kotlin_kotlin.$_$.a4;
|
|
39
|
+
var checkIndexOverflow = kotlin_kotlin.$_$.b4;
|
|
40
|
+
var THROW_CCE = kotlin_kotlin.$_$.y9;
|
|
41
|
+
var listOf_0 = kotlin_kotlin.$_$.j5;
|
|
42
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.f;
|
|
43
|
+
var Map = kotlin_kotlin.$_$.u3;
|
|
44
|
+
var isInterface = kotlin_kotlin.$_$.i7;
|
|
45
|
+
var startsWith_0 = kotlin_kotlin.$_$.y8;
|
|
46
|
+
var union = kotlin_kotlin.$_$.c6;
|
|
47
|
+
var listOfNotNull = kotlin_kotlin.$_$.h5;
|
|
48
|
+
var plus = kotlin_kotlin.$_$.p5;
|
|
49
|
+
var until = kotlin_kotlin.$_$.c8;
|
|
50
|
+
var slice = kotlin_kotlin.$_$.u5;
|
|
51
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
52
|
+
var joinToString = kotlin_kotlin.$_$.a5;
|
|
53
|
+
var interfaceMeta = kotlin_kotlin.$_$.z6;
|
|
54
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.c4;
|
|
55
|
+
var to = kotlin_kotlin.$_$.xa;
|
|
56
|
+
var copyToArray = kotlin_kotlin.$_$.p4;
|
|
57
|
+
var linkedMapOf = kotlin_kotlin.$_$.g5;
|
|
58
|
+
var objectMeta = kotlin_kotlin.$_$.s7;
|
|
59
|
+
var mapCapacity = kotlin_kotlin.$_$.k5;
|
|
60
|
+
var coerceAtLeast = kotlin_kotlin.$_$.z7;
|
|
61
|
+
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.o;
|
|
62
|
+
var Exception = kotlin_kotlin.$_$.q9;
|
|
63
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.y;
|
|
64
|
+
var captureStack = kotlin_kotlin.$_$.k6;
|
|
65
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.wa;
|
|
66
|
+
var split_0 = kotlin_kotlin.$_$.w8;
|
|
67
|
+
var hashCode = kotlin_kotlin.$_$.y6;
|
|
68
|
+
var equals = kotlin_kotlin.$_$.s6;
|
|
69
|
+
var AssertionError_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
70
|
+
var List = kotlin_kotlin.$_$.s3;
|
|
71
|
+
var lazy = kotlin_kotlin.$_$.sa;
|
|
72
|
+
var KProperty1 = kotlin_kotlin.$_$.f8;
|
|
73
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.w6;
|
|
74
|
+
//endregion
|
|
75
|
+
//region block: pre-declaration
|
|
76
|
+
setMetadataFor(ValueOrigin, 'ValueOrigin', classMeta, Enum);
|
|
77
|
+
setMetadataFor(OptionPrefixStyle, 'OptionPrefixStyle', classMeta, Enum);
|
|
78
|
+
setMetadataFor(ArgParser, 'ArgParser', classMeta);
|
|
79
|
+
function getValue(thisRef, property) {
|
|
80
|
+
return this.w();
|
|
81
|
+
}
|
|
82
|
+
setMetadataFor(ArgumentValueDelegate, 'ArgumentValueDelegate', interfaceMeta);
|
|
83
|
+
setMetadataFor(ArgParserResult, 'ArgParserResult', classMeta);
|
|
84
|
+
setMetadataFor(ArgumentsQueue, 'ArgumentsQueue', classMeta);
|
|
85
|
+
setMetadataFor(ArgType, 'ArgType', classMeta);
|
|
86
|
+
setMetadataFor(Boolean_0, 'Boolean', objectMeta, ArgType);
|
|
87
|
+
setMetadataFor(String_0, 'String', objectMeta, ArgType);
|
|
88
|
+
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
89
|
+
setMetadataFor(Choice, 'Choice', classMeta, ArgType);
|
|
90
|
+
setMetadataFor(ParsingException, 'ParsingException', classMeta, Exception);
|
|
91
|
+
setMetadataFor(ParsingValue, 'ParsingValue', classMeta);
|
|
92
|
+
setMetadataFor(AbstractArgumentSingleValue, 'AbstractArgumentSingleValue', classMeta, ParsingValue);
|
|
93
|
+
setMetadataFor(ArgumentSingleValue, 'ArgumentSingleValue', classMeta, AbstractArgumentSingleValue, [AbstractArgumentSingleValue, ArgumentValueDelegate]);
|
|
94
|
+
setMetadataFor(ArgumentSingleNullableValue, 'ArgumentSingleNullableValue', classMeta, AbstractArgumentSingleValue, [AbstractArgumentSingleValue, ArgumentValueDelegate]);
|
|
95
|
+
setMetadataFor(ArgumentMultipleValues, 'ArgumentMultipleValues', classMeta, ParsingValue, [ParsingValue, ArgumentValueDelegate]);
|
|
96
|
+
setMetadataFor(CLIEntity, 'CLIEntity', classMeta);
|
|
97
|
+
setMetadataFor(Argument, 'Argument', classMeta, CLIEntity);
|
|
98
|
+
setMetadataFor(AbstractSingleArgument, 'AbstractSingleArgument', classMeta, Argument);
|
|
99
|
+
setMetadataFor(SingleArgument, 'SingleArgument', classMeta, AbstractSingleArgument);
|
|
100
|
+
setMetadataFor(CLIEntityWrapper, 'CLIEntityWrapper', classMeta);
|
|
101
|
+
setMetadataFor(MultipleArgument, 'MultipleArgument', classMeta, Argument);
|
|
102
|
+
setMetadataFor(Descriptor, 'Descriptor', classMeta);
|
|
103
|
+
setMetadataFor(OptionDescriptor, 'OptionDescriptor', classMeta, Descriptor);
|
|
104
|
+
setMetadataFor(ArgDescriptor, 'ArgDescriptor', classMeta, Descriptor);
|
|
105
|
+
setMetadataFor(Option, 'Option', classMeta, CLIEntity);
|
|
106
|
+
setMetadataFor(AbstractSingleOption, 'AbstractSingleOption', classMeta, Option);
|
|
107
|
+
setMetadataFor(SingleOption, 'SingleOption', classMeta, AbstractSingleOption);
|
|
108
|
+
setMetadataFor(SingleNullableOption, 'SingleNullableOption', classMeta, AbstractSingleOption);
|
|
109
|
+
setMetadataFor(MultipleOption, 'MultipleOption', classMeta, Option);
|
|
110
|
+
//endregion
|
|
111
|
+
var ValueOrigin_SET_BY_USER_instance;
|
|
112
|
+
var ValueOrigin_SET_DEFAULT_VALUE_instance;
|
|
113
|
+
var ValueOrigin_UNSET_instance;
|
|
114
|
+
var ValueOrigin_REDEFINED_instance;
|
|
115
|
+
var ValueOrigin_UNDEFINED_instance;
|
|
116
|
+
var ValueOrigin_entriesInitialized;
|
|
117
|
+
function ValueOrigin_initEntries() {
|
|
118
|
+
if (ValueOrigin_entriesInitialized)
|
|
119
|
+
return Unit_getInstance();
|
|
120
|
+
ValueOrigin_entriesInitialized = true;
|
|
121
|
+
ValueOrigin_SET_BY_USER_instance = new ValueOrigin('SET_BY_USER', 0);
|
|
122
|
+
ValueOrigin_SET_DEFAULT_VALUE_instance = new ValueOrigin('SET_DEFAULT_VALUE', 1);
|
|
123
|
+
ValueOrigin_UNSET_instance = new ValueOrigin('UNSET', 2);
|
|
124
|
+
ValueOrigin_REDEFINED_instance = new ValueOrigin('REDEFINED', 3);
|
|
125
|
+
ValueOrigin_UNDEFINED_instance = new ValueOrigin('UNDEFINED', 4);
|
|
126
|
+
}
|
|
127
|
+
var OptionPrefixStyle_LINUX_instance;
|
|
128
|
+
var OptionPrefixStyle_JVM_instance;
|
|
129
|
+
var OptionPrefixStyle_GNU_instance;
|
|
130
|
+
var OptionPrefixStyle_entriesInitialized;
|
|
131
|
+
function OptionPrefixStyle_initEntries() {
|
|
132
|
+
if (OptionPrefixStyle_entriesInitialized)
|
|
133
|
+
return Unit_getInstance();
|
|
134
|
+
OptionPrefixStyle_entriesInitialized = true;
|
|
135
|
+
OptionPrefixStyle_LINUX_instance = new OptionPrefixStyle('LINUX', 0);
|
|
136
|
+
OptionPrefixStyle_JVM_instance = new OptionPrefixStyle('JVM', 1);
|
|
137
|
+
OptionPrefixStyle_GNU_instance = new OptionPrefixStyle('GNU', 2);
|
|
138
|
+
}
|
|
139
|
+
function ValueOrigin(name, ordinal) {
|
|
140
|
+
Enum.call(this, name, ordinal);
|
|
141
|
+
}
|
|
142
|
+
function OptionPrefixStyle(name, ordinal) {
|
|
143
|
+
Enum.call(this, name, ordinal);
|
|
144
|
+
}
|
|
145
|
+
function inspectRequiredAndDefaultUsage($this) {
|
|
146
|
+
var previousArgument = null;
|
|
147
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
148
|
+
var tmp0_forEach = $this.i1t_1;
|
|
149
|
+
var tmp$ret$0;
|
|
150
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
151
|
+
tmp$ret$0 = tmp0_forEach.u().c();
|
|
152
|
+
var tmp0_iterator = tmp$ret$0;
|
|
153
|
+
while (tmp0_iterator.d()) {
|
|
154
|
+
var element = tmp0_iterator.e();
|
|
155
|
+
// Inline function 'kotlinx.cli.ArgParser.inspectRequiredAndDefaultUsage.<anonymous>' call
|
|
156
|
+
var tmp$ret$1;
|
|
157
|
+
// Inline function 'kotlin.collections.component2' call
|
|
158
|
+
tmp$ret$1 = element.w();
|
|
159
|
+
var currentArgument = tmp$ret$1;
|
|
160
|
+
var tmp0_safe_receiver = previousArgument;
|
|
161
|
+
if (tmp0_safe_receiver == null)
|
|
162
|
+
null;
|
|
163
|
+
else {
|
|
164
|
+
var tmp$ret$2;
|
|
165
|
+
// Inline function 'kotlin.let' call
|
|
166
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
167
|
+
if (tmp0_safe_receiver.d1u_1.g1u()) {
|
|
168
|
+
if (!currentArgument.d1u_1.g1u() ? currentArgument.d1u_1.a1u_1 : false) {
|
|
169
|
+
// Inline function 'kotlin.error' call
|
|
170
|
+
var tmp0_error = 'Default value of argument ' + tmp0_safe_receiver.d1u_1.x1t_1 + ' will be unused, ' + ('because next argument ' + currentArgument.d1u_1.x1t_1 + ' is always required and has no default value.');
|
|
171
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
var tmp;
|
|
175
|
+
if (!tmp0_safe_receiver.d1u_1.a1u_1) {
|
|
176
|
+
var tmp_0;
|
|
177
|
+
if (!currentArgument.d1u_1.g1u() ? currentArgument.d1u_1.a1u_1 : false) {
|
|
178
|
+
var tmp1_error = 'Argument ' + tmp0_safe_receiver.d1u_1.x1t_1 + ' will be always required, ' + ('because next argument ' + currentArgument.d1u_1.x1t_1 + ' is always required.');
|
|
179
|
+
throw IllegalStateException_init_$Create$(toString(tmp1_error));
|
|
180
|
+
}
|
|
181
|
+
tmp = tmp_0;
|
|
182
|
+
}
|
|
183
|
+
tmp$ret$2 = tmp;
|
|
184
|
+
}
|
|
185
|
+
previousArgument = currentArgument;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function printError($this, message) {
|
|
189
|
+
$this.v1t_1(message + '\n' + $this.h1u(), 127);
|
|
190
|
+
throwKotlinNothingValueException();
|
|
191
|
+
}
|
|
192
|
+
function saveAsArg($this, arg, argumentsQueue) {
|
|
193
|
+
var name = argumentsQueue.j1u();
|
|
194
|
+
var tmp0_safe_receiver = name;
|
|
195
|
+
if (tmp0_safe_receiver == null)
|
|
196
|
+
null;
|
|
197
|
+
else {
|
|
198
|
+
var tmp$ret$1;
|
|
199
|
+
// Inline function 'kotlin.let' call
|
|
200
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
201
|
+
var argumentValue = ensureNotNull($this.i1t_1.m2(name));
|
|
202
|
+
var tmp0_safe_receiver_0 = argumentValue.d1u_1.b1u_1;
|
|
203
|
+
if (tmp0_safe_receiver_0 == null)
|
|
204
|
+
null;
|
|
205
|
+
else {
|
|
206
|
+
var tmp$ret$0;
|
|
207
|
+
// Inline function 'kotlin.let' call
|
|
208
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
209
|
+
printWarning(tmp0_safe_receiver_0);
|
|
210
|
+
tmp$ret$0 = Unit_getInstance();
|
|
211
|
+
}
|
|
212
|
+
argumentValue.k1u(arg);
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
function treatAsArgument($this, arg, argumentsQueue) {
|
|
218
|
+
if (!saveAsArg($this, arg, argumentsQueue)) {
|
|
219
|
+
var tmp0_safe_receiver = $this.u1t_1;
|
|
220
|
+
var tmp;
|
|
221
|
+
if (tmp0_safe_receiver == null) {
|
|
222
|
+
tmp = null;
|
|
223
|
+
} else {
|
|
224
|
+
var tmp$ret$1;
|
|
225
|
+
// Inline function 'kotlin.let' call
|
|
226
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
227
|
+
var tmp$ret$0;
|
|
228
|
+
// Inline function 'kotlinx.cli.ArgParser.treatAsArgument.<anonymous>' call
|
|
229
|
+
tmp$ret$0 = ($this.r1t_1 ? $this.t1t_1 : $this.s1t_1).a(arg);
|
|
230
|
+
tmp$ret$1 = tmp$ret$0;
|
|
231
|
+
tmp = tmp$ret$1;
|
|
232
|
+
}
|
|
233
|
+
var tmp1_elvis_lhs = tmp;
|
|
234
|
+
if (tmp1_elvis_lhs == null) {
|
|
235
|
+
printError($this, "Too many arguments! Couldn't process argument " + arg + '!');
|
|
236
|
+
} else
|
|
237
|
+
tmp1_elvis_lhs;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function saveAsOption($this, parsingValue, value) {
|
|
241
|
+
parsingValue.k1u(value);
|
|
242
|
+
}
|
|
243
|
+
function recognizeAndSaveOptionFullForm($this, candidate, argIterator) {
|
|
244
|
+
if ($this.e1t_1.equals(OptionPrefixStyle_GNU_getInstance()) ? candidate === $this.o1t_1 : false) {
|
|
245
|
+
$this.r1t_1 = false;
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
if (!startsWith(candidate, $this.o1t_1))
|
|
249
|
+
return false;
|
|
250
|
+
var tmp$ret$1;
|
|
251
|
+
// Inline function 'kotlin.text.substring' call
|
|
252
|
+
var tmp0_substring = $this.o1t_1.length;
|
|
253
|
+
var tmp$ret$0;
|
|
254
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
255
|
+
tmp$ret$0 = candidate;
|
|
256
|
+
tmp$ret$1 = tmp$ret$0.substring(tmp0_substring);
|
|
257
|
+
var optionString = tmp$ret$1;
|
|
258
|
+
var argValue = $this.e1t_1.equals(OptionPrefixStyle_GNU_getInstance()) ? null : $this.h1t_1.m2(optionString);
|
|
259
|
+
if (!(argValue == null)) {
|
|
260
|
+
saveStandardOptionForm($this, argValue, argIterator);
|
|
261
|
+
return true;
|
|
262
|
+
} else {
|
|
263
|
+
if ($this.e1t_1.equals(OptionPrefixStyle_GNU_getInstance())) {
|
|
264
|
+
var tmp0_safe_receiver = $this.h1t_1.m2(optionString);
|
|
265
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d1u_1;
|
|
266
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.w1t_1;
|
|
267
|
+
if ((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.m1u_1) === false) {
|
|
268
|
+
$this.l1u(ensureNotNull($this.h1t_1.m2(optionString)));
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
var optionParts = split(optionString, charArrayOf([_Char___init__impl__6a9atx(61)]), VOID, 2);
|
|
272
|
+
if (!(optionParts.f() === 2))
|
|
273
|
+
return false;
|
|
274
|
+
if (!($this.h1t_1.m2(optionParts.h(0)) == null)) {
|
|
275
|
+
saveAsOption($this, ensureNotNull($this.h1t_1.m2(optionParts.h(0))), optionParts.h(1));
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
function saveStandardOptionForm($this, argValue, argIterator) {
|
|
283
|
+
if (argValue.d1u_1.w1t_1.m1u_1) {
|
|
284
|
+
if (argIterator.d()) {
|
|
285
|
+
saveAsOption($this, argValue, argIterator.e());
|
|
286
|
+
} else {
|
|
287
|
+
printError($this, 'No value for ' + argValue.d1u_1.n1u());
|
|
288
|
+
}
|
|
289
|
+
} else {
|
|
290
|
+
$this.l1u(argValue);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function recognizeAndSaveOptionShortForm($this, candidate, argIterator) {
|
|
294
|
+
if (!startsWith(candidate, $this.p1t_1) ? true : !($this.o1t_1 === $this.p1t_1) ? startsWith(candidate, $this.o1t_1) : false)
|
|
295
|
+
return false;
|
|
296
|
+
var tmp$ret$1;
|
|
297
|
+
// Inline function 'kotlin.text.substring' call
|
|
298
|
+
var tmp0_substring = $this.p1t_1.length;
|
|
299
|
+
var tmp$ret$0;
|
|
300
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
301
|
+
tmp$ret$0 = candidate;
|
|
302
|
+
tmp$ret$1 = tmp$ret$0.substring(tmp0_substring);
|
|
303
|
+
var option = tmp$ret$1;
|
|
304
|
+
var argValue = $this.n1t_1.m2(option);
|
|
305
|
+
if (!(argValue == null)) {
|
|
306
|
+
saveStandardOptionForm($this, argValue, argIterator);
|
|
307
|
+
} else {
|
|
308
|
+
var tmp;
|
|
309
|
+
if (!$this.e1t_1.equals(OptionPrefixStyle_GNU_getInstance())) {
|
|
310
|
+
tmp = true;
|
|
311
|
+
} else {
|
|
312
|
+
var tmp$ret$2;
|
|
313
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
314
|
+
tmp$ret$2 = charSequenceLength(option) === 0;
|
|
315
|
+
tmp = tmp$ret$2;
|
|
316
|
+
}
|
|
317
|
+
if (tmp)
|
|
318
|
+
return false;
|
|
319
|
+
var tmp0_elvis_lhs = $this.n1t_1.m2('' + new Char(charSequenceGet(option, 0)));
|
|
320
|
+
var tmp_0;
|
|
321
|
+
if (tmp0_elvis_lhs == null) {
|
|
322
|
+
return false;
|
|
323
|
+
} else {
|
|
324
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
325
|
+
}
|
|
326
|
+
var firstOption = tmp_0;
|
|
327
|
+
if (firstOption.d1u_1.w1t_1.m1u_1) {
|
|
328
|
+
var tmp$ret$4;
|
|
329
|
+
// Inline function 'kotlin.text.substring' call
|
|
330
|
+
var tmp$ret$3;
|
|
331
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
332
|
+
tmp$ret$3 = option;
|
|
333
|
+
tmp$ret$4 = tmp$ret$3.substring(1);
|
|
334
|
+
saveAsOption($this, firstOption, tmp$ret$4);
|
|
335
|
+
} else {
|
|
336
|
+
var tmp$ret$6;
|
|
337
|
+
// Inline function 'kotlin.text.substring' call
|
|
338
|
+
var tmp$ret$5;
|
|
339
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
340
|
+
tmp$ret$5 = option;
|
|
341
|
+
tmp$ret$6 = tmp$ret$5.substring(1);
|
|
342
|
+
var otherBooleanOptions = tmp$ret$6;
|
|
343
|
+
$this.l1u(firstOption);
|
|
344
|
+
var indexedObject = otherBooleanOptions;
|
|
345
|
+
var inductionVariable = 0;
|
|
346
|
+
var last = indexedObject.length;
|
|
347
|
+
while (inductionVariable < last) {
|
|
348
|
+
var opt = charSequenceGet(indexedObject, inductionVariable);
|
|
349
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
350
|
+
var tmp2_safe_receiver = $this.n1t_1.m2('' + new Char(opt));
|
|
351
|
+
var tmp_1;
|
|
352
|
+
if (tmp2_safe_receiver == null) {
|
|
353
|
+
tmp_1 = null;
|
|
354
|
+
} else {
|
|
355
|
+
var tmp$ret$7;
|
|
356
|
+
// Inline function 'kotlin.let' call
|
|
357
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
358
|
+
var tmp_2;
|
|
359
|
+
if (tmp2_safe_receiver.d1u_1.w1t_1.m1u_1) {
|
|
360
|
+
printError($this, 'Option ' + $this.p1t_1 + new Char(opt) + " can't be used in option combination " + candidate + ', ' + ('because parameter value of type ' + tmp2_safe_receiver.d1u_1.w1t_1.o1u() + ' should be ') + 'provided for current option.');
|
|
361
|
+
}
|
|
362
|
+
tmp$ret$7 = tmp_2;
|
|
363
|
+
tmp_1 = Unit_getInstance();
|
|
364
|
+
}
|
|
365
|
+
var tmp3_elvis_lhs = tmp_1;
|
|
366
|
+
if (tmp3_elvis_lhs == null) {
|
|
367
|
+
printError($this, 'Unknown option ' + $this.p1t_1 + new Char(opt) + ' in option combination ' + candidate + '.');
|
|
368
|
+
} else {
|
|
369
|
+
}
|
|
370
|
+
$this.l1u(ensureNotNull($this.n1t_1.m2('' + new Char(opt))));
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return true;
|
|
375
|
+
}
|
|
376
|
+
function ArgParser$outputAndTerminate$lambda(message, exitCode) {
|
|
377
|
+
println(message);
|
|
378
|
+
exitProcess(exitCode);
|
|
379
|
+
}
|
|
380
|
+
function ValueOrigin_SET_BY_USER_getInstance() {
|
|
381
|
+
ValueOrigin_initEntries();
|
|
382
|
+
return ValueOrigin_SET_BY_USER_instance;
|
|
383
|
+
}
|
|
384
|
+
function ValueOrigin_SET_DEFAULT_VALUE_getInstance() {
|
|
385
|
+
ValueOrigin_initEntries();
|
|
386
|
+
return ValueOrigin_SET_DEFAULT_VALUE_instance;
|
|
387
|
+
}
|
|
388
|
+
function ValueOrigin_UNSET_getInstance() {
|
|
389
|
+
ValueOrigin_initEntries();
|
|
390
|
+
return ValueOrigin_UNSET_instance;
|
|
391
|
+
}
|
|
392
|
+
function ValueOrigin_UNDEFINED_getInstance() {
|
|
393
|
+
ValueOrigin_initEntries();
|
|
394
|
+
return ValueOrigin_UNDEFINED_instance;
|
|
395
|
+
}
|
|
396
|
+
function OptionPrefixStyle_LINUX_getInstance() {
|
|
397
|
+
OptionPrefixStyle_initEntries();
|
|
398
|
+
return OptionPrefixStyle_LINUX_instance;
|
|
399
|
+
}
|
|
400
|
+
function OptionPrefixStyle_JVM_getInstance() {
|
|
401
|
+
OptionPrefixStyle_initEntries();
|
|
402
|
+
return OptionPrefixStyle_JVM_instance;
|
|
403
|
+
}
|
|
404
|
+
function OptionPrefixStyle_GNU_getInstance() {
|
|
405
|
+
OptionPrefixStyle_initEntries();
|
|
406
|
+
return OptionPrefixStyle_GNU_instance;
|
|
407
|
+
}
|
|
408
|
+
function ArgParser(programName, useDefaultHelpShortName, prefixStyle, skipExtraArguments, strictSubcommandOptionsOrder) {
|
|
409
|
+
useDefaultHelpShortName = useDefaultHelpShortName === VOID ? true : useDefaultHelpShortName;
|
|
410
|
+
prefixStyle = prefixStyle === VOID ? OptionPrefixStyle_LINUX_getInstance() : prefixStyle;
|
|
411
|
+
skipExtraArguments = skipExtraArguments === VOID ? false : skipExtraArguments;
|
|
412
|
+
strictSubcommandOptionsOrder = strictSubcommandOptionsOrder === VOID ? false : strictSubcommandOptionsOrder;
|
|
413
|
+
this.c1t_1 = programName;
|
|
414
|
+
this.d1t_1 = useDefaultHelpShortName;
|
|
415
|
+
this.e1t_1 = prefixStyle;
|
|
416
|
+
this.f1t_1 = skipExtraArguments;
|
|
417
|
+
this.g1t_1 = strictSubcommandOptionsOrder;
|
|
418
|
+
var tmp = this;
|
|
419
|
+
var tmp$ret$0;
|
|
420
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
421
|
+
tmp$ret$0 = LinkedHashMap_init_$Create$();
|
|
422
|
+
tmp.h1t_1 = tmp$ret$0;
|
|
423
|
+
var tmp_0 = this;
|
|
424
|
+
var tmp$ret$1;
|
|
425
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
426
|
+
tmp$ret$1 = LinkedHashMap_init_$Create$();
|
|
427
|
+
tmp_0.i1t_1 = tmp$ret$1;
|
|
428
|
+
var tmp_1 = this;
|
|
429
|
+
var tmp$ret$2;
|
|
430
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
431
|
+
tmp$ret$2 = ArrayList_init_$Create$();
|
|
432
|
+
tmp_1.j1t_1 = tmp$ret$2;
|
|
433
|
+
var tmp_2 = this;
|
|
434
|
+
var tmp$ret$3;
|
|
435
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
436
|
+
tmp$ret$3 = ArrayList_init_$Create$();
|
|
437
|
+
tmp_2.k1t_1 = tmp$ret$3;
|
|
438
|
+
this.l1t_1 = null;
|
|
439
|
+
var tmp_3 = this;
|
|
440
|
+
var tmp$ret$4;
|
|
441
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
442
|
+
tmp$ret$4 = LinkedHashMap_init_$Create$();
|
|
443
|
+
tmp_3.m1t_1 = tmp$ret$4;
|
|
444
|
+
var tmp_4 = this;
|
|
445
|
+
var tmp$ret$5;
|
|
446
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
447
|
+
tmp$ret$5 = LinkedHashMap_init_$Create$();
|
|
448
|
+
tmp_4.n1t_1 = tmp$ret$5;
|
|
449
|
+
this.o1t_1 = this.e1t_1.equals(OptionPrefixStyle_JVM_getInstance()) ? '-' : '--';
|
|
450
|
+
this.p1t_1 = '-';
|
|
451
|
+
this.q1t_1 = mutableListOf([this.c1t_1]);
|
|
452
|
+
this.r1t_1 = true;
|
|
453
|
+
var tmp_5 = this;
|
|
454
|
+
var tmp$ret$6;
|
|
455
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
456
|
+
tmp$ret$6 = ArrayList_init_$Create$();
|
|
457
|
+
tmp_5.s1t_1 = tmp$ret$6;
|
|
458
|
+
var tmp_6 = this;
|
|
459
|
+
var tmp$ret$7;
|
|
460
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
461
|
+
tmp$ret$7 = ArrayList_init_$Create$();
|
|
462
|
+
tmp_6.t1t_1 = tmp$ret$7;
|
|
463
|
+
this.u1t_1 = null;
|
|
464
|
+
var tmp_7 = this;
|
|
465
|
+
tmp_7.v1t_1 = ArgParser$outputAndTerminate$lambda;
|
|
466
|
+
}
|
|
467
|
+
protoOf(ArgParser).p1u = function (type, fullName, shortName, description, deprecatedWarning) {
|
|
468
|
+
if (this.e1t_1.equals(OptionPrefixStyle_GNU_getInstance()) ? !(shortName == null) : false) {
|
|
469
|
+
// Inline function 'kotlin.require' call
|
|
470
|
+
var tmp0_require = shortName.length === 1;
|
|
471
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
472
|
+
if (!tmp0_require) {
|
|
473
|
+
var tmp$ret$0;
|
|
474
|
+
// Inline function 'kotlinx.cli.ArgParser.option.<anonymous>' call
|
|
475
|
+
tmp$ret$0 = 'GNU standard for options allow to use short form which consists of one character. \nFor more information, please, see https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html';
|
|
476
|
+
var message = tmp$ret$0;
|
|
477
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
var option = new SingleNullableOption(new OptionDescriptor(this.o1t_1, this.p1t_1, type, fullName, shortName, description, VOID, VOID, VOID, VOID, deprecatedWarning), new CLIEntityWrapper());
|
|
481
|
+
option.s1u_1.q1u_1 = option;
|
|
482
|
+
this.j1t_1.a(option.s1u_1);
|
|
483
|
+
return option;
|
|
484
|
+
};
|
|
485
|
+
protoOf(ArgParser).u1u = function (type, fullName, shortName, description, deprecatedWarning, $super) {
|
|
486
|
+
fullName = fullName === VOID ? null : fullName;
|
|
487
|
+
shortName = shortName === VOID ? null : shortName;
|
|
488
|
+
description = description === VOID ? null : description;
|
|
489
|
+
deprecatedWarning = deprecatedWarning === VOID ? null : deprecatedWarning;
|
|
490
|
+
return $super === VOID ? this.p1u(type, fullName, shortName, description, deprecatedWarning) : $super.p1u.call(this, type, fullName, shortName, description, deprecatedWarning);
|
|
491
|
+
};
|
|
492
|
+
protoOf(ArgParser).v1u = function (type, fullName, description, deprecatedWarning) {
|
|
493
|
+
var argument = new SingleArgument(new ArgDescriptor(type, fullName, 1, description, VOID, VOID, deprecatedWarning), new CLIEntityWrapper());
|
|
494
|
+
argument.s1u_1.q1u_1 = argument;
|
|
495
|
+
this.k1t_1.a(argument.s1u_1);
|
|
496
|
+
return argument;
|
|
497
|
+
};
|
|
498
|
+
protoOf(ArgParser).w1u = function (type, fullName, description, deprecatedWarning, $super) {
|
|
499
|
+
fullName = fullName === VOID ? null : fullName;
|
|
500
|
+
description = description === VOID ? null : description;
|
|
501
|
+
deprecatedWarning = deprecatedWarning === VOID ? null : deprecatedWarning;
|
|
502
|
+
return $super === VOID ? this.v1u(type, fullName, description, deprecatedWarning) : $super.v1u.call(this, type, fullName, description, deprecatedWarning);
|
|
503
|
+
};
|
|
504
|
+
protoOf(ArgParser).l1u = function (argValue) {
|
|
505
|
+
if (argValue.d1u_1.x1t_1 === 'help') {
|
|
506
|
+
var tmp0_safe_receiver = this.u1t_1;
|
|
507
|
+
if (tmp0_safe_receiver == null)
|
|
508
|
+
null;
|
|
509
|
+
else {
|
|
510
|
+
var tmp$ret$1;
|
|
511
|
+
// Inline function 'kotlin.let' call
|
|
512
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
513
|
+
var tmp$ret$0;
|
|
514
|
+
// Inline function 'kotlinx.cli.ArgParser.saveOptionWithoutParameter.<anonymous>' call
|
|
515
|
+
tmp$ret$0 = tmp0_safe_receiver.x1u(listOf(tmp0_safe_receiver.o1t_1 + argValue.d1u_1.x1t_1));
|
|
516
|
+
tmp$ret$1 = tmp$ret$0;
|
|
517
|
+
}
|
|
518
|
+
this.v1t_1(this.h1u(), 0);
|
|
519
|
+
throwKotlinNothingValueException();
|
|
520
|
+
}
|
|
521
|
+
saveAsOption(this, argValue, 'true');
|
|
522
|
+
};
|
|
523
|
+
protoOf(ArgParser).y1u = function (args) {
|
|
524
|
+
return this.x1u(asList(args));
|
|
525
|
+
};
|
|
526
|
+
protoOf(ArgParser).x1u = function (args) {
|
|
527
|
+
// Inline function 'kotlin.check' call
|
|
528
|
+
var tmp0_check = this.l1t_1 == null;
|
|
529
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
530
|
+
if (!tmp0_check) {
|
|
531
|
+
var tmp$ret$0;
|
|
532
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>' call
|
|
533
|
+
tmp$ret$0 = 'Parsing of command line options can be called only once.';
|
|
534
|
+
var message = tmp$ret$0;
|
|
535
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
536
|
+
}
|
|
537
|
+
var helpDescriptor = this.d1t_1 ? new OptionDescriptor(this.o1t_1, this.p1t_1, Boolean_getInstance(), 'help', 'h', 'Usage info') : new OptionDescriptor(this.o1t_1, this.p1t_1, Boolean_getInstance(), 'help', VOID, 'Usage info');
|
|
538
|
+
var helpOption = new SingleNullableOption(helpDescriptor, new CLIEntityWrapper());
|
|
539
|
+
helpOption.s1u_1.q1u_1 = helpOption;
|
|
540
|
+
this.j1t_1.a(helpOption.s1u_1);
|
|
541
|
+
if (this.f1t_1) {
|
|
542
|
+
vararg(this.w1u(String_getInstance(), ''));
|
|
543
|
+
}
|
|
544
|
+
this.h1t_1.a9();
|
|
545
|
+
this.i1t_1.a9();
|
|
546
|
+
// Inline function 'kotlin.collections.forEachIndexed' call
|
|
547
|
+
var tmp1_forEachIndexed = this.j1t_1;
|
|
548
|
+
var index = 0;
|
|
549
|
+
var tmp0_iterator = tmp1_forEachIndexed.c();
|
|
550
|
+
while (tmp0_iterator.d()) {
|
|
551
|
+
var item = tmp0_iterator.e();
|
|
552
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>' call
|
|
553
|
+
var tmp1 = index;
|
|
554
|
+
index = tmp1 + 1 | 0;
|
|
555
|
+
var tmp2__anonymous__z9zvc9 = checkIndexOverflow(tmp1);
|
|
556
|
+
var tmp0_safe_receiver = item.q1u_1;
|
|
557
|
+
var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r1u_1;
|
|
558
|
+
var value = tmp instanceof ParsingValue ? tmp : THROW_CCE();
|
|
559
|
+
var tmp1_safe_receiver = value.d1u_1.x1t_1;
|
|
560
|
+
var tmp_0;
|
|
561
|
+
if (tmp1_safe_receiver == null) {
|
|
562
|
+
tmp_0 = null;
|
|
563
|
+
} else {
|
|
564
|
+
var tmp$ret$4;
|
|
565
|
+
// Inline function 'kotlin.let' call
|
|
566
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
567
|
+
if (this.h1t_1.i2(tmp1_safe_receiver)) {
|
|
568
|
+
// Inline function 'kotlin.error' call
|
|
569
|
+
var tmp0_error = 'Option with full name ' + tmp1_safe_receiver + ' was already added.';
|
|
570
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
571
|
+
}
|
|
572
|
+
var tmp$ret$3;
|
|
573
|
+
// Inline function 'kotlin.with' call
|
|
574
|
+
var tmp_1 = value.d1u_1;
|
|
575
|
+
var tmp1_with = tmp_1 instanceof OptionDescriptor ? tmp_1 : THROW_CCE();
|
|
576
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
577
|
+
var tmp$ret$2;
|
|
578
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
579
|
+
if (!(tmp1_with.i1v_1 == null) ? this.n1t_1.i2(tmp1_with.i1v_1) : false) {
|
|
580
|
+
// Inline function 'kotlin.error' call
|
|
581
|
+
var tmp0_error_0 = 'Option with short name ' + tmp1_with.i1v_1 + ' was already added.';
|
|
582
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error_0));
|
|
583
|
+
}
|
|
584
|
+
var tmp0_safe_receiver_0 = tmp1_with.i1v_1;
|
|
585
|
+
var tmp_2;
|
|
586
|
+
if (tmp0_safe_receiver_0 == null) {
|
|
587
|
+
tmp_2 = null;
|
|
588
|
+
} else {
|
|
589
|
+
var tmp$ret$1;
|
|
590
|
+
// Inline function 'kotlin.let' call
|
|
591
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
592
|
+
var tmp0_set = this.n1t_1;
|
|
593
|
+
tmp0_set.k3(tmp0_safe_receiver_0, value);
|
|
594
|
+
tmp$ret$1 = Unit_getInstance();
|
|
595
|
+
tmp_2 = Unit_getInstance();
|
|
596
|
+
}
|
|
597
|
+
tmp$ret$2 = tmp_2;
|
|
598
|
+
tmp$ret$3 = tmp$ret$2;
|
|
599
|
+
var tmp2_set = this.h1t_1;
|
|
600
|
+
tmp2_set.k3(tmp1_safe_receiver, value);
|
|
601
|
+
tmp$ret$4 = Unit_getInstance();
|
|
602
|
+
tmp_0 = Unit_getInstance();
|
|
603
|
+
}
|
|
604
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
605
|
+
if (tmp2_elvis_lhs == null) {
|
|
606
|
+
// Inline function 'kotlin.error' call
|
|
607
|
+
var tmp0_error_1 = 'Option was added, but unnamed. Added option under \u2116' + (tmp2__anonymous__z9zvc9 + 1 | 0);
|
|
608
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error_1));
|
|
609
|
+
} else {
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
// Inline function 'kotlin.collections.forEachIndexed' call
|
|
613
|
+
var tmp3_forEachIndexed = this.k1t_1;
|
|
614
|
+
var index_0 = 0;
|
|
615
|
+
var tmp0_iterator_0 = tmp3_forEachIndexed.c();
|
|
616
|
+
while (tmp0_iterator_0.d()) {
|
|
617
|
+
var item_0 = tmp0_iterator_0.e();
|
|
618
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>' call
|
|
619
|
+
var tmp1_0 = index_0;
|
|
620
|
+
index_0 = tmp1_0 + 1 | 0;
|
|
621
|
+
var tmp4__anonymous__pkmkx7 = checkIndexOverflow(tmp1_0);
|
|
622
|
+
var tmp0_safe_receiver_1 = item_0.q1u_1;
|
|
623
|
+
var tmp_3 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.r1u_1;
|
|
624
|
+
var value_0 = tmp_3 instanceof ParsingValue ? tmp_3 : THROW_CCE();
|
|
625
|
+
var tmp1_safe_receiver_0 = value_0.d1u_1.x1t_1;
|
|
626
|
+
var tmp_4;
|
|
627
|
+
if (tmp1_safe_receiver_0 == null) {
|
|
628
|
+
tmp_4 = null;
|
|
629
|
+
} else {
|
|
630
|
+
var tmp$ret$5;
|
|
631
|
+
// Inline function 'kotlin.let' call
|
|
632
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
633
|
+
if (this.i1t_1.i2(tmp1_safe_receiver_0)) {
|
|
634
|
+
// Inline function 'kotlin.error' call
|
|
635
|
+
var tmp0_error_2 = 'Argument with full name ' + tmp1_safe_receiver_0 + ' was already added.';
|
|
636
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error_2));
|
|
637
|
+
}
|
|
638
|
+
var tmp1_set = this.i1t_1;
|
|
639
|
+
tmp1_set.k3(tmp1_safe_receiver_0, value_0);
|
|
640
|
+
tmp$ret$5 = Unit_getInstance();
|
|
641
|
+
tmp_4 = Unit_getInstance();
|
|
642
|
+
}
|
|
643
|
+
var tmp2_elvis_lhs_0 = tmp_4;
|
|
644
|
+
if (tmp2_elvis_lhs_0 == null) {
|
|
645
|
+
// Inline function 'kotlin.error' call
|
|
646
|
+
var tmp0_error_3 = 'Argument was added, but unnamed. Added argument under \u2116' + (tmp4__anonymous__pkmkx7 + 1 | 0);
|
|
647
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error_3));
|
|
648
|
+
} else {
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
inspectRequiredAndDefaultUsage(this);
|
|
652
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
653
|
+
var tmp5_forEach = listOf_0([this.i1t_1, this.h1t_1]);
|
|
654
|
+
var tmp0_iterator_1 = tmp5_forEach.c();
|
|
655
|
+
while (tmp0_iterator_1.d()) {
|
|
656
|
+
var element = tmp0_iterator_1.e();
|
|
657
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>' call
|
|
658
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
659
|
+
var tmp$ret$6;
|
|
660
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
661
|
+
tmp$ret$6 = element.u().c();
|
|
662
|
+
var tmp0_iterator_2 = tmp$ret$6;
|
|
663
|
+
while (tmp0_iterator_2.d()) {
|
|
664
|
+
var element_0 = tmp0_iterator_2.e();
|
|
665
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>.<anonymous>' call
|
|
666
|
+
var tmp$ret$7;
|
|
667
|
+
// Inline function 'kotlin.collections.component2' call
|
|
668
|
+
tmp$ret$7 = element_0.w();
|
|
669
|
+
var value_1 = tmp$ret$7;
|
|
670
|
+
value_1.f1u_1 = ValueOrigin_UNSET_getInstance();
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
var tmp$ret$11;
|
|
674
|
+
// Inline function 'kotlin.collections.map' call
|
|
675
|
+
var tmp7_map = this.i1t_1;
|
|
676
|
+
var tmp$ret$10;
|
|
677
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
678
|
+
var tmp6_mapTo = ArrayList_init_$Create$_0(tmp7_map.f());
|
|
679
|
+
var tmp$ret$8;
|
|
680
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
681
|
+
tmp$ret$8 = tmp7_map.u().c();
|
|
682
|
+
var tmp0_iterator_3 = tmp$ret$8;
|
|
683
|
+
while (tmp0_iterator_3.d()) {
|
|
684
|
+
var item_1 = tmp0_iterator_3.e();
|
|
685
|
+
var tmp$ret$9;
|
|
686
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>' call
|
|
687
|
+
var tmp_5 = item_1.w().d1u_1;
|
|
688
|
+
tmp$ret$9 = tmp_5 instanceof ArgDescriptor ? tmp_5 : THROW_CCE();
|
|
689
|
+
tmp6_mapTo.a(tmp$ret$9);
|
|
690
|
+
}
|
|
691
|
+
tmp$ret$10 = tmp6_mapTo;
|
|
692
|
+
tmp$ret$11 = tmp$ret$10;
|
|
693
|
+
var argumentsQueue = new ArgumentsQueue(tmp$ret$11);
|
|
694
|
+
this.u1t_1 = null;
|
|
695
|
+
this.t1t_1.a9();
|
|
696
|
+
this.s1t_1.a9();
|
|
697
|
+
var argIterator = args.p1();
|
|
698
|
+
try {
|
|
699
|
+
$l$loop: while (argIterator.d()) {
|
|
700
|
+
var arg = argIterator.e();
|
|
701
|
+
var tmp$ret$13;
|
|
702
|
+
// Inline function 'kotlin.collections.contains' call
|
|
703
|
+
var tmp8_contains = this.m1t_1;
|
|
704
|
+
var tmp$ret$12;
|
|
705
|
+
// Inline function 'kotlin.collections.containsKey' call
|
|
706
|
+
tmp$ret$12 = (isInterface(tmp8_contains, Map) ? tmp8_contains : THROW_CCE()).i2(arg);
|
|
707
|
+
tmp$ret$13 = tmp$ret$12;
|
|
708
|
+
if (!tmp$ret$13) {
|
|
709
|
+
if (this.r1t_1 ? startsWith_0(arg, _Char___init__impl__6a9atx(45)) : false) {
|
|
710
|
+
if (!(recognizeAndSaveOptionShortForm(this, arg, argIterator) ? true : recognizeAndSaveOptionFullForm(this, arg, argIterator))) {
|
|
711
|
+
if (!this.r1t_1) {
|
|
712
|
+
treatAsArgument(this, argIterator.e(), argumentsQueue);
|
|
713
|
+
} else {
|
|
714
|
+
var tmp0_safe_receiver_2 = this.u1t_1;
|
|
715
|
+
var tmp_6;
|
|
716
|
+
if (tmp0_safe_receiver_2 == null) {
|
|
717
|
+
tmp_6 = null;
|
|
718
|
+
} else {
|
|
719
|
+
var tmp$ret$15;
|
|
720
|
+
// Inline function 'kotlin.let' call
|
|
721
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
722
|
+
var tmp$ret$14;
|
|
723
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>' call
|
|
724
|
+
tmp$ret$14 = this.t1t_1.a(arg);
|
|
725
|
+
tmp$ret$15 = tmp$ret$14;
|
|
726
|
+
tmp_6 = tmp$ret$15;
|
|
727
|
+
}
|
|
728
|
+
var tmp1_elvis_lhs = tmp_6;
|
|
729
|
+
if (tmp1_elvis_lhs == null) {
|
|
730
|
+
var tmp$ret$16;
|
|
731
|
+
// Inline function 'kotlin.run' call
|
|
732
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
733
|
+
var tmp_7;
|
|
734
|
+
if (!saveAsArg(this, arg, argumentsQueue)) {
|
|
735
|
+
printError(this, 'Unknown option ' + arg);
|
|
736
|
+
}
|
|
737
|
+
tmp$ret$16 = tmp_7;
|
|
738
|
+
} else
|
|
739
|
+
tmp1_elvis_lhs;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
} else {
|
|
743
|
+
treatAsArgument(this, arg, argumentsQueue);
|
|
744
|
+
}
|
|
745
|
+
} else {
|
|
746
|
+
this.u1t_1 = this.m1t_1.m2(arg);
|
|
747
|
+
if (this.g1t_1) {
|
|
748
|
+
break $l$loop;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
753
|
+
var tmp9_forEach = union(this.h1t_1.ha(), this.i1t_1.ha());
|
|
754
|
+
var tmp0_iterator_4 = tmp9_forEach.c();
|
|
755
|
+
while (tmp0_iterator_4.d()) {
|
|
756
|
+
var element_1 = tmp0_iterator_4.e();
|
|
757
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>' call
|
|
758
|
+
if (element_1.g()) {
|
|
759
|
+
element_1.l1v();
|
|
760
|
+
}
|
|
761
|
+
if (!element_1.f1u_1.equals(ValueOrigin_SET_BY_USER_getInstance()) ? element_1.d1u_1.a1u_1 : false) {
|
|
762
|
+
printError(this, 'Value for ' + element_1.d1u_1.n1u() + ' should be always provided in command line.');
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
var tmp2_safe_receiver = this.u1t_1;
|
|
766
|
+
if (tmp2_safe_receiver == null)
|
|
767
|
+
null;
|
|
768
|
+
else {
|
|
769
|
+
var tmp$ret$19;
|
|
770
|
+
// Inline function 'kotlin.let' call
|
|
771
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
772
|
+
if (this.g1t_1) {
|
|
773
|
+
tmp2_safe_receiver.x1u(slice(args, until(argIterator.w1(), args.f())));
|
|
774
|
+
} else {
|
|
775
|
+
var tmp$ret$18;
|
|
776
|
+
// Inline function 'kotlin.takeUnless' call
|
|
777
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
778
|
+
var tmp_8;
|
|
779
|
+
var tmp$ret$17;
|
|
780
|
+
// Inline function 'kotlinx.cli.ArgParser.parse.<anonymous>.<anonymous>' call
|
|
781
|
+
tmp$ret$17 = this.r1t_1;
|
|
782
|
+
if (!tmp$ret$17) {
|
|
783
|
+
tmp_8 = '--';
|
|
784
|
+
} else {
|
|
785
|
+
tmp_8 = null;
|
|
786
|
+
}
|
|
787
|
+
tmp$ret$18 = tmp_8;
|
|
788
|
+
tmp2_safe_receiver.x1u(plus(plus(this.t1t_1, listOfNotNull(tmp$ret$18)), this.s1t_1));
|
|
789
|
+
}
|
|
790
|
+
tmp2_safe_receiver.i1w();
|
|
791
|
+
this.l1t_1 = new ArgParserResult(tmp2_safe_receiver.g1w_1);
|
|
792
|
+
return ensureNotNull(this.l1t_1);
|
|
793
|
+
}
|
|
794
|
+
} catch ($p) {
|
|
795
|
+
if ($p instanceof ParsingException) {
|
|
796
|
+
var exception = $p;
|
|
797
|
+
printError(this, ensureNotNull(exception.message));
|
|
798
|
+
} else {
|
|
799
|
+
throw $p;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
this.l1t_1 = new ArgParserResult(this.c1t_1);
|
|
803
|
+
return ensureNotNull(this.l1t_1);
|
|
804
|
+
};
|
|
805
|
+
protoOf(ArgParser).h1u = function () {
|
|
806
|
+
var result = StringBuilder_init_$Create$();
|
|
807
|
+
result.y5('Usage: ' + joinToString(this.q1t_1, ' ') + ' options_list\n');
|
|
808
|
+
var tmp$ret$0;
|
|
809
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
810
|
+
var tmp0_isNotEmpty = this.m1t_1;
|
|
811
|
+
tmp$ret$0 = !tmp0_isNotEmpty.g();
|
|
812
|
+
if (tmp$ret$0) {
|
|
813
|
+
result.y5('Subcommands: \n');
|
|
814
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
815
|
+
var tmp1_forEach = this.m1t_1;
|
|
816
|
+
var tmp$ret$1;
|
|
817
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
818
|
+
tmp$ret$1 = tmp1_forEach.u().c();
|
|
819
|
+
var tmp0_iterator = tmp$ret$1;
|
|
820
|
+
while (tmp0_iterator.d()) {
|
|
821
|
+
var element = tmp0_iterator.e();
|
|
822
|
+
// Inline function 'kotlinx.cli.ArgParser.makeUsage.<anonymous>' call
|
|
823
|
+
var tmp$ret$2;
|
|
824
|
+
// Inline function 'kotlin.collections.component2' call
|
|
825
|
+
tmp$ret$2 = element.w();
|
|
826
|
+
var subcommand = tmp$ret$2;
|
|
827
|
+
result.y5(subcommand.j1w());
|
|
828
|
+
}
|
|
829
|
+
result.y5('\n');
|
|
830
|
+
}
|
|
831
|
+
var tmp$ret$3;
|
|
832
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
833
|
+
var tmp2_isNotEmpty = this.i1t_1;
|
|
834
|
+
tmp$ret$3 = !tmp2_isNotEmpty.g();
|
|
835
|
+
if (tmp$ret$3) {
|
|
836
|
+
result.y5('Arguments: \n');
|
|
837
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
838
|
+
var tmp3_forEach = this.i1t_1;
|
|
839
|
+
var tmp$ret$4;
|
|
840
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
841
|
+
tmp$ret$4 = tmp3_forEach.u().c();
|
|
842
|
+
var tmp0_iterator_0 = tmp$ret$4;
|
|
843
|
+
while (tmp0_iterator_0.d()) {
|
|
844
|
+
var element_0 = tmp0_iterator_0.e();
|
|
845
|
+
// Inline function 'kotlinx.cli.ArgParser.makeUsage.<anonymous>' call
|
|
846
|
+
result.y5(element_0.w().d1u_1.j1w());
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
var tmp$ret$5;
|
|
850
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
851
|
+
var tmp4_isNotEmpty = this.h1t_1;
|
|
852
|
+
tmp$ret$5 = !tmp4_isNotEmpty.g();
|
|
853
|
+
if (tmp$ret$5) {
|
|
854
|
+
result.y5('Options: \n');
|
|
855
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
856
|
+
var tmp5_forEach = this.h1t_1;
|
|
857
|
+
var tmp$ret$6;
|
|
858
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
859
|
+
tmp$ret$6 = tmp5_forEach.u().c();
|
|
860
|
+
var tmp0_iterator_1 = tmp$ret$6;
|
|
861
|
+
while (tmp0_iterator_1.d()) {
|
|
862
|
+
var element_1 = tmp0_iterator_1.e();
|
|
863
|
+
// Inline function 'kotlinx.cli.ArgParser.makeUsage.<anonymous>' call
|
|
864
|
+
result.y5(element_1.w().d1u_1.j1w());
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
return result.toString();
|
|
868
|
+
};
|
|
869
|
+
function ArgumentValueDelegate() {
|
|
870
|
+
}
|
|
871
|
+
function ArgParserResult(commandName) {
|
|
872
|
+
this.l1w_1 = commandName;
|
|
873
|
+
}
|
|
874
|
+
function ArgumentsQueue(argumentsDescriptors) {
|
|
875
|
+
var tmp = this;
|
|
876
|
+
var tmp$ret$3;
|
|
877
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
878
|
+
var tmp$ret$2;
|
|
879
|
+
// Inline function 'kotlin.collections.map' call
|
|
880
|
+
var tmp$ret$1;
|
|
881
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
882
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(argumentsDescriptors, 10));
|
|
883
|
+
var tmp0_iterator = argumentsDescriptors.c();
|
|
884
|
+
while (tmp0_iterator.d()) {
|
|
885
|
+
var item = tmp0_iterator.e();
|
|
886
|
+
var tmp$ret$0;
|
|
887
|
+
// Inline function 'kotlinx.cli.ArgumentsQueue.argumentsUsageNumber.<anonymous>' call
|
|
888
|
+
tmp$ret$0 = to(item, 0);
|
|
889
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
890
|
+
}
|
|
891
|
+
tmp$ret$1 = tmp0_mapTo;
|
|
892
|
+
tmp$ret$2 = tmp$ret$1;
|
|
893
|
+
var tmp1_toTypedArray = tmp$ret$2;
|
|
894
|
+
tmp$ret$3 = copyToArray(tmp1_toTypedArray);
|
|
895
|
+
tmp.i1u_1 = linkedMapOf(tmp$ret$3.slice());
|
|
896
|
+
}
|
|
897
|
+
protoOf(ArgumentsQueue).j1u = function () {
|
|
898
|
+
if (this.i1u_1.g())
|
|
899
|
+
return null;
|
|
900
|
+
var tmp$ret$0;
|
|
901
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
902
|
+
var tmp0_iterator = this.i1u_1;
|
|
903
|
+
tmp$ret$0 = tmp0_iterator.u().c();
|
|
904
|
+
var tmp0_container = tmp$ret$0.e();
|
|
905
|
+
var tmp$ret$1;
|
|
906
|
+
// Inline function 'kotlin.collections.component1' call
|
|
907
|
+
tmp$ret$1 = tmp0_container.v();
|
|
908
|
+
var currentDescriptor = tmp$ret$1;
|
|
909
|
+
var tmp$ret$2;
|
|
910
|
+
// Inline function 'kotlin.collections.component2' call
|
|
911
|
+
tmp$ret$2 = tmp0_container.w();
|
|
912
|
+
var usageNumber = tmp$ret$2;
|
|
913
|
+
var tmp1_safe_receiver = currentDescriptor.t1w_1;
|
|
914
|
+
if (tmp1_safe_receiver == null)
|
|
915
|
+
null;
|
|
916
|
+
else {
|
|
917
|
+
var tmp$ret$4;
|
|
918
|
+
// Inline function 'kotlin.let' call
|
|
919
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
920
|
+
var tmp$ret$3;
|
|
921
|
+
// Inline function 'kotlinx.cli.ArgumentsQueue.pop.<anonymous>' call
|
|
922
|
+
var tmp;
|
|
923
|
+
if ((usageNumber + 1 | 0) >= currentDescriptor.t1w_1) {
|
|
924
|
+
tmp = this.i1u_1.xa(currentDescriptor);
|
|
925
|
+
} else {
|
|
926
|
+
var tmp0_set = this.i1u_1;
|
|
927
|
+
var tmp1_set = usageNumber + 1 | 0;
|
|
928
|
+
tmp0_set.k3(currentDescriptor, tmp1_set);
|
|
929
|
+
tmp = Unit_getInstance();
|
|
930
|
+
}
|
|
931
|
+
tmp$ret$3 = tmp;
|
|
932
|
+
tmp$ret$4 = tmp$ret$3;
|
|
933
|
+
}
|
|
934
|
+
return currentDescriptor.x1t_1;
|
|
935
|
+
};
|
|
936
|
+
function printWarning(message) {
|
|
937
|
+
println('WARNING ' + message);
|
|
938
|
+
}
|
|
939
|
+
function ArgType$Choice$_init_$lambda_7m7ro6(it) {
|
|
940
|
+
return toString(it);
|
|
941
|
+
}
|
|
942
|
+
function Boolean_0() {
|
|
943
|
+
Boolean_instance = this;
|
|
944
|
+
ArgType.call(this, false);
|
|
945
|
+
}
|
|
946
|
+
protoOf(Boolean_0).o1u = function () {
|
|
947
|
+
return '';
|
|
948
|
+
};
|
|
949
|
+
protoOf(Boolean_0).v1w = function (value, name) {
|
|
950
|
+
return !(value === 'false');
|
|
951
|
+
};
|
|
952
|
+
var Boolean_instance;
|
|
953
|
+
function Boolean_getInstance() {
|
|
954
|
+
if (Boolean_instance == null)
|
|
955
|
+
new Boolean_0();
|
|
956
|
+
return Boolean_instance;
|
|
957
|
+
}
|
|
958
|
+
function String_0() {
|
|
959
|
+
String_instance = this;
|
|
960
|
+
ArgType.call(this, true);
|
|
961
|
+
}
|
|
962
|
+
protoOf(String_0).o1u = function () {
|
|
963
|
+
return '{ String }';
|
|
964
|
+
};
|
|
965
|
+
protoOf(String_0).v1w = function (value, name) {
|
|
966
|
+
return value;
|
|
967
|
+
};
|
|
968
|
+
var String_instance;
|
|
969
|
+
function String_getInstance() {
|
|
970
|
+
if (String_instance == null)
|
|
971
|
+
new String_0();
|
|
972
|
+
return String_instance;
|
|
973
|
+
}
|
|
974
|
+
function Companion() {
|
|
975
|
+
Companion_instance = this;
|
|
976
|
+
}
|
|
977
|
+
var Companion_instance;
|
|
978
|
+
function Companion_getInstance() {
|
|
979
|
+
if (Companion_instance == null)
|
|
980
|
+
new Companion();
|
|
981
|
+
return Companion_instance;
|
|
982
|
+
}
|
|
983
|
+
function Choice(choices, toVariant, variantToString) {
|
|
984
|
+
var tmp;
|
|
985
|
+
if (variantToString === VOID) {
|
|
986
|
+
tmp = ArgType$Choice$_init_$lambda_7m7ro6;
|
|
987
|
+
} else {
|
|
988
|
+
tmp = variantToString;
|
|
989
|
+
}
|
|
990
|
+
variantToString = tmp;
|
|
991
|
+
ArgType.call(this, true);
|
|
992
|
+
this.y1w_1 = toVariant;
|
|
993
|
+
this.z1w_1 = variantToString;
|
|
994
|
+
var tmp_0 = this;
|
|
995
|
+
var tmp$ret$2;
|
|
996
|
+
// Inline function 'kotlin.collections.associateBy' call
|
|
997
|
+
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(choices, 10)), 16);
|
|
998
|
+
var tmp$ret$1;
|
|
999
|
+
// Inline function 'kotlin.collections.associateByTo' call
|
|
1000
|
+
var tmp0_associateByTo = LinkedHashMap_init_$Create$_0(capacity);
|
|
1001
|
+
var tmp0_iterator = choices.c();
|
|
1002
|
+
while (tmp0_iterator.d()) {
|
|
1003
|
+
var element = tmp0_iterator.e();
|
|
1004
|
+
var tmp$ret$0;
|
|
1005
|
+
// Inline function 'kotlinx.cli.Choice.choicesMap.<anonymous>' call
|
|
1006
|
+
tmp$ret$0 = this.z1w_1(element);
|
|
1007
|
+
tmp0_associateByTo.k3(tmp$ret$0, element);
|
|
1008
|
+
}
|
|
1009
|
+
tmp$ret$1 = tmp0_associateByTo;
|
|
1010
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1011
|
+
tmp_0.a1x_1 = tmp$ret$2;
|
|
1012
|
+
// Inline function 'kotlin.require' call
|
|
1013
|
+
var tmp0_require = this.a1x_1.f() === choices.f();
|
|
1014
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1015
|
+
if (!tmp0_require) {
|
|
1016
|
+
var tmp$ret$3;
|
|
1017
|
+
// Inline function 'kotlinx.cli.Choice.<anonymous>' call
|
|
1018
|
+
tmp$ret$3 = 'Command line representations of enum choices are not distinct';
|
|
1019
|
+
var message = tmp$ret$3;
|
|
1020
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
protoOf(Choice).o1u = function () {
|
|
1024
|
+
return '{ Value should be one of ' + this.a1x_1.n2() + ' }';
|
|
1025
|
+
};
|
|
1026
|
+
protoOf(Choice).v1w = function (value, name) {
|
|
1027
|
+
var tmp;
|
|
1028
|
+
try {
|
|
1029
|
+
tmp = this.y1w_1(value);
|
|
1030
|
+
} catch ($p) {
|
|
1031
|
+
var tmp_0;
|
|
1032
|
+
if ($p instanceof Exception) {
|
|
1033
|
+
var e = $p;
|
|
1034
|
+
throw new ParsingException('Option ' + name + ' is expected to be one of ' + this.a1x_1.n2() + '. ' + value + ' is provided.');
|
|
1035
|
+
} else {
|
|
1036
|
+
throw $p;
|
|
1037
|
+
}
|
|
1038
|
+
tmp = tmp_0;
|
|
1039
|
+
}
|
|
1040
|
+
return tmp;
|
|
1041
|
+
};
|
|
1042
|
+
function ArgType(hasParameter) {
|
|
1043
|
+
Companion_getInstance();
|
|
1044
|
+
this.m1u_1 = hasParameter;
|
|
1045
|
+
}
|
|
1046
|
+
function ParsingException(message) {
|
|
1047
|
+
Exception_init_$Init$(message, this);
|
|
1048
|
+
captureStack(this, ParsingException);
|
|
1049
|
+
}
|
|
1050
|
+
function ParsingValue(descriptor) {
|
|
1051
|
+
this.d1u_1 = descriptor;
|
|
1052
|
+
this.f1u_1 = ValueOrigin_UNDEFINED_getInstance();
|
|
1053
|
+
}
|
|
1054
|
+
protoOf(ParsingValue).b1x = function () {
|
|
1055
|
+
var tmp = this.e1u_1;
|
|
1056
|
+
if (!(tmp == null))
|
|
1057
|
+
return tmp;
|
|
1058
|
+
else {
|
|
1059
|
+
throwUninitializedPropertyAccessException('parsedValue');
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
protoOf(ParsingValue).c1x = function () {
|
|
1063
|
+
return !(this.e1u_1 == null);
|
|
1064
|
+
};
|
|
1065
|
+
protoOf(ParsingValue).k1u = function (stringValue) {
|
|
1066
|
+
var tmp;
|
|
1067
|
+
var tmp_0;
|
|
1068
|
+
var tmp_1;
|
|
1069
|
+
var tmp_2 = this.d1u_1;
|
|
1070
|
+
if (tmp_2 instanceof OptionDescriptor) {
|
|
1071
|
+
tmp_1 = !this.d1u_1.j1v_1;
|
|
1072
|
+
} else {
|
|
1073
|
+
tmp_1 = false;
|
|
1074
|
+
}
|
|
1075
|
+
if (tmp_1) {
|
|
1076
|
+
tmp_0 = !this.g();
|
|
1077
|
+
} else {
|
|
1078
|
+
tmp_0 = false;
|
|
1079
|
+
}
|
|
1080
|
+
if (tmp_0) {
|
|
1081
|
+
tmp = this.d1u_1.k1v_1 == null;
|
|
1082
|
+
} else {
|
|
1083
|
+
tmp = false;
|
|
1084
|
+
}
|
|
1085
|
+
if (tmp) {
|
|
1086
|
+
throw new ParsingException('Try to provide more than one value for ' + this.d1u_1.x1t_1 + '.');
|
|
1087
|
+
}
|
|
1088
|
+
var tmp0_safe_receiver = this.d1u_1.b1u_1;
|
|
1089
|
+
if (tmp0_safe_receiver == null)
|
|
1090
|
+
null;
|
|
1091
|
+
else {
|
|
1092
|
+
var tmp$ret$0;
|
|
1093
|
+
// Inline function 'kotlin.let' call
|
|
1094
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1095
|
+
var tmp_3;
|
|
1096
|
+
if (this.g()) {
|
|
1097
|
+
println('Warning: ' + tmp0_safe_receiver);
|
|
1098
|
+
tmp_3 = Unit_getInstance();
|
|
1099
|
+
}
|
|
1100
|
+
tmp$ret$0 = tmp_3;
|
|
1101
|
+
}
|
|
1102
|
+
var tmp_4;
|
|
1103
|
+
var tmp_5 = this.d1u_1;
|
|
1104
|
+
if (tmp_5 instanceof OptionDescriptor) {
|
|
1105
|
+
tmp_4 = !(this.d1u_1.k1v_1 == null);
|
|
1106
|
+
} else {
|
|
1107
|
+
tmp_4 = false;
|
|
1108
|
+
}
|
|
1109
|
+
if (tmp_4) {
|
|
1110
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1111
|
+
var tmp0_forEach = split_0(stringValue, [this.d1u_1.k1v_1]);
|
|
1112
|
+
var tmp0_iterator = tmp0_forEach.c();
|
|
1113
|
+
while (tmp0_iterator.d()) {
|
|
1114
|
+
var element = tmp0_iterator.e();
|
|
1115
|
+
// Inline function 'kotlinx.cli.ParsingValue.addValue.<anonymous>' call
|
|
1116
|
+
this.d1x(element);
|
|
1117
|
+
}
|
|
1118
|
+
} else {
|
|
1119
|
+
this.d1x(stringValue);
|
|
1120
|
+
}
|
|
1121
|
+
};
|
|
1122
|
+
protoOf(ParsingValue).l1v = function () {
|
|
1123
|
+
if (this.d1u_1.g1u()) {
|
|
1124
|
+
this.e1u_1 = ensureNotNull(this.d1u_1.z1t_1);
|
|
1125
|
+
this.f1u_1 = ValueOrigin_SET_DEFAULT_VALUE_getInstance();
|
|
1126
|
+
}
|
|
1127
|
+
};
|
|
1128
|
+
protoOf(ParsingValue).e1x = function (name) {
|
|
1129
|
+
var tmp0_elvis_lhs = this.d1u_1.x1t_1;
|
|
1130
|
+
if (tmp0_elvis_lhs == null) {
|
|
1131
|
+
var tmp$ret$0;
|
|
1132
|
+
// Inline function 'kotlin.run' call
|
|
1133
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1134
|
+
this.d1u_1.x1t_1 = name;
|
|
1135
|
+
tmp$ret$0 = Unit_getInstance();
|
|
1136
|
+
} else
|
|
1137
|
+
tmp0_elvis_lhs;
|
|
1138
|
+
};
|
|
1139
|
+
function ArgumentSingleValue(descriptor) {
|
|
1140
|
+
AbstractArgumentSingleValue.call(this, descriptor);
|
|
1141
|
+
}
|
|
1142
|
+
protoOf(ArgumentSingleValue).w = function () {
|
|
1143
|
+
var tmp;
|
|
1144
|
+
if (!this.g()) {
|
|
1145
|
+
tmp = this.b1x();
|
|
1146
|
+
} else {
|
|
1147
|
+
var tmp0_error = 'Value for argument ' + this.d1u_1.x1t_1 + " isn't set. " + 'ArgParser.parse(...) method should be called before.';
|
|
1148
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
1149
|
+
}
|
|
1150
|
+
return tmp;
|
|
1151
|
+
};
|
|
1152
|
+
function ArgumentSingleNullableValue(descriptor) {
|
|
1153
|
+
AbstractArgumentSingleValue.call(this, descriptor);
|
|
1154
|
+
this.o1x_1 = false;
|
|
1155
|
+
}
|
|
1156
|
+
protoOf(ArgumentSingleNullableValue).w = function () {
|
|
1157
|
+
return (!this.g() ? !this.o1x_1 : false) ? this.b1x() : null;
|
|
1158
|
+
};
|
|
1159
|
+
function ArgumentMultipleValues(descriptor) {
|
|
1160
|
+
ParsingValue.call(this, descriptor);
|
|
1161
|
+
var tmp = this;
|
|
1162
|
+
var tmp$ret$0;
|
|
1163
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1164
|
+
tmp$ret$0 = ArrayList_init_$Create$();
|
|
1165
|
+
tmp.s1x_1 = tmp$ret$0;
|
|
1166
|
+
this.e1u_1 = this.s1x_1;
|
|
1167
|
+
}
|
|
1168
|
+
protoOf(ArgumentMultipleValues).w = function () {
|
|
1169
|
+
return this.b1x();
|
|
1170
|
+
};
|
|
1171
|
+
protoOf(ArgumentMultipleValues).d1x = function (stringValue) {
|
|
1172
|
+
this.s1x_1.a(this.d1u_1.w1t_1.v1w(stringValue, ensureNotNull(this.d1u_1.x1t_1)));
|
|
1173
|
+
this.f1u_1 = ValueOrigin_SET_BY_USER_getInstance();
|
|
1174
|
+
};
|
|
1175
|
+
protoOf(ArgumentMultipleValues).g = function () {
|
|
1176
|
+
return this.b1x().g();
|
|
1177
|
+
};
|
|
1178
|
+
function AbstractArgumentSingleValue(descriptor) {
|
|
1179
|
+
ParsingValue.call(this, descriptor);
|
|
1180
|
+
}
|
|
1181
|
+
protoOf(AbstractArgumentSingleValue).d1x = function (stringValue) {
|
|
1182
|
+
if (!this.c1x()) {
|
|
1183
|
+
this.e1u_1 = this.d1u_1.w1t_1.v1w(stringValue, ensureNotNull(this.d1u_1.x1t_1));
|
|
1184
|
+
this.f1u_1 = ValueOrigin_SET_BY_USER_getInstance();
|
|
1185
|
+
} else {
|
|
1186
|
+
throw new ParsingException('Try to provide more than one value ' + this.b1x() + ' and ' + stringValue + ' for ' + this.d1u_1.x1t_1 + '.');
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
protoOf(AbstractArgumentSingleValue).g = function () {
|
|
1190
|
+
return !this.c1x();
|
|
1191
|
+
};
|
|
1192
|
+
function SingleArgument(descriptor, owner) {
|
|
1193
|
+
AbstractSingleArgument.call(this, new ArgumentSingleValue(descriptor), owner);
|
|
1194
|
+
this.w1x(descriptor);
|
|
1195
|
+
}
|
|
1196
|
+
function CLIEntityWrapper(entity) {
|
|
1197
|
+
entity = entity === VOID ? null : entity;
|
|
1198
|
+
this.q1u_1 = entity;
|
|
1199
|
+
}
|
|
1200
|
+
protoOf(CLIEntityWrapper).toString = function () {
|
|
1201
|
+
return 'CLIEntityWrapper(entity=' + this.q1u_1 + ')';
|
|
1202
|
+
};
|
|
1203
|
+
protoOf(CLIEntityWrapper).hashCode = function () {
|
|
1204
|
+
return this.q1u_1 == null ? 0 : hashCode(this.q1u_1);
|
|
1205
|
+
};
|
|
1206
|
+
protoOf(CLIEntityWrapper).equals = function (other) {
|
|
1207
|
+
if (this === other)
|
|
1208
|
+
return true;
|
|
1209
|
+
if (!(other instanceof CLIEntityWrapper))
|
|
1210
|
+
return false;
|
|
1211
|
+
var tmp0_other_with_cast = other instanceof CLIEntityWrapper ? other : THROW_CCE();
|
|
1212
|
+
if (!equals(this.q1u_1, tmp0_other_with_cast.q1u_1))
|
|
1213
|
+
return false;
|
|
1214
|
+
return true;
|
|
1215
|
+
};
|
|
1216
|
+
function MultipleArgument(descriptor, owner) {
|
|
1217
|
+
Argument.call(this, new ArgumentMultipleValues(descriptor), owner);
|
|
1218
|
+
if (!(descriptor.t1w_1 == null) ? descriptor.t1w_1 < 2 : false) {
|
|
1219
|
+
failAssertion("Argument with multiple values can't be initialized with descriptor for single one.");
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
function vararg(_this__u8e3s4) {
|
|
1223
|
+
var tmp$ret$2;
|
|
1224
|
+
// Inline function 'kotlin.with' call
|
|
1225
|
+
var tmp$ret$0;
|
|
1226
|
+
// Inline function 'kotlinx.cli.cast' call
|
|
1227
|
+
var tmp0_cast = _this__u8e3s4.r1u_1;
|
|
1228
|
+
tmp$ret$0 = tmp0_cast instanceof ParsingValue ? tmp0_cast : THROW_CCE();
|
|
1229
|
+
var tmp = tmp$ret$0.d1u_1;
|
|
1230
|
+
var tmp1_with = tmp instanceof ArgDescriptor ? tmp : THROW_CCE();
|
|
1231
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1232
|
+
var tmp$ret$1;
|
|
1233
|
+
// Inline function 'kotlinx.cli.vararg.<anonymous>' call
|
|
1234
|
+
tmp$ret$1 = new MultipleArgument(new ArgDescriptor(tmp1_with.w1t_1, tmp1_with.x1t_1, null, tmp1_with.y1t_1, listOfNotNull(tmp1_with.z1t_1), tmp1_with.a1u_1, tmp1_with.b1u_1), _this__u8e3s4.s1u_1);
|
|
1235
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1236
|
+
var newArgument = tmp$ret$2;
|
|
1237
|
+
_this__u8e3s4.s1u_1.q1u_1 = newArgument;
|
|
1238
|
+
return newArgument;
|
|
1239
|
+
}
|
|
1240
|
+
function CLIEntity(delegate, owner) {
|
|
1241
|
+
this.r1u_1 = delegate;
|
|
1242
|
+
this.s1u_1 = owner;
|
|
1243
|
+
this.t1u_1 = false;
|
|
1244
|
+
}
|
|
1245
|
+
protoOf(CLIEntity).x1x = function (thisRef, prop) {
|
|
1246
|
+
// Inline function 'kotlin.check' call
|
|
1247
|
+
var tmp0_check = !this.t1u_1;
|
|
1248
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1249
|
+
if (!tmp0_check) {
|
|
1250
|
+
var tmp$ret$0;
|
|
1251
|
+
// Inline function 'kotlinx.cli.CLIEntity.provideDelegate.<anonymous>' call
|
|
1252
|
+
var tmp = this.r1u_1;
|
|
1253
|
+
tmp$ret$0 = 'There is already used delegate for ' + (tmp instanceof ParsingValue ? tmp : THROW_CCE()).d1u_1.x1t_1 + '.';
|
|
1254
|
+
var message = tmp$ret$0;
|
|
1255
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1256
|
+
}
|
|
1257
|
+
var tmp_0 = this.r1u_1;
|
|
1258
|
+
(tmp_0 instanceof ParsingValue ? tmp_0 : THROW_CCE()).e1x(prop.callableName);
|
|
1259
|
+
this.t1u_1 = true;
|
|
1260
|
+
return this.r1u_1;
|
|
1261
|
+
};
|
|
1262
|
+
function failAssertion(message) {
|
|
1263
|
+
throw AssertionError_init_$Create$(message);
|
|
1264
|
+
}
|
|
1265
|
+
function AbstractSingleArgument(delegate, owner) {
|
|
1266
|
+
Argument.call(this, delegate, owner);
|
|
1267
|
+
}
|
|
1268
|
+
protoOf(AbstractSingleArgument).w1x = function (descriptor) {
|
|
1269
|
+
if (descriptor.t1w_1 == null ? true : descriptor.t1w_1 > 1) {
|
|
1270
|
+
failAssertion("Argument with single value can't be initialized with descriptor for multiple values.");
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
function Argument(delegate, owner) {
|
|
1274
|
+
CLIEntity.call(this, delegate, owner);
|
|
1275
|
+
}
|
|
1276
|
+
function OptionDescriptor(optionFullFormPrefix, optionShortFromPrefix, type, fullName, shortName, description, defaultValue, required, multiple, delimiter, deprecatedWarning) {
|
|
1277
|
+
fullName = fullName === VOID ? null : fullName;
|
|
1278
|
+
shortName = shortName === VOID ? null : shortName;
|
|
1279
|
+
description = description === VOID ? null : description;
|
|
1280
|
+
defaultValue = defaultValue === VOID ? null : defaultValue;
|
|
1281
|
+
required = required === VOID ? false : required;
|
|
1282
|
+
multiple = multiple === VOID ? false : multiple;
|
|
1283
|
+
delimiter = delimiter === VOID ? null : delimiter;
|
|
1284
|
+
deprecatedWarning = deprecatedWarning === VOID ? null : deprecatedWarning;
|
|
1285
|
+
Descriptor.call(this, type, fullName, description, defaultValue, required, deprecatedWarning);
|
|
1286
|
+
this.g1v_1 = optionFullFormPrefix;
|
|
1287
|
+
this.h1v_1 = optionShortFromPrefix;
|
|
1288
|
+
this.i1v_1 = shortName;
|
|
1289
|
+
this.j1v_1 = multiple;
|
|
1290
|
+
this.k1v_1 = delimiter;
|
|
1291
|
+
}
|
|
1292
|
+
protoOf(OptionDescriptor).n1u = function () {
|
|
1293
|
+
return 'option ' + this.g1v_1 + this.x1t_1;
|
|
1294
|
+
};
|
|
1295
|
+
protoOf(OptionDescriptor).j1w = function () {
|
|
1296
|
+
var result = StringBuilder_init_$Create$();
|
|
1297
|
+
result.y5(' ' + this.g1v_1 + this.x1t_1);
|
|
1298
|
+
var tmp0_safe_receiver = this.i1v_1;
|
|
1299
|
+
if (tmp0_safe_receiver == null)
|
|
1300
|
+
null;
|
|
1301
|
+
else {
|
|
1302
|
+
var tmp$ret$1;
|
|
1303
|
+
// Inline function 'kotlin.let' call
|
|
1304
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1305
|
+
var tmp$ret$0;
|
|
1306
|
+
// Inline function 'kotlinx.cli.OptionDescriptor.<get-helpMessage>.<anonymous>' call
|
|
1307
|
+
tmp$ret$0 = result.y5(', ' + this.h1v_1 + tmp0_safe_receiver);
|
|
1308
|
+
tmp$ret$1 = tmp$ret$0;
|
|
1309
|
+
}
|
|
1310
|
+
var tmp1_safe_receiver = this.y1x(this.z1t_1);
|
|
1311
|
+
if (tmp1_safe_receiver == null)
|
|
1312
|
+
null;
|
|
1313
|
+
else {
|
|
1314
|
+
var tmp$ret$3;
|
|
1315
|
+
// Inline function 'kotlin.let' call
|
|
1316
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1317
|
+
var tmp$ret$2;
|
|
1318
|
+
// Inline function 'kotlinx.cli.OptionDescriptor.<get-helpMessage>.<anonymous>' call
|
|
1319
|
+
tmp$ret$2 = result.y5(tmp1_safe_receiver);
|
|
1320
|
+
tmp$ret$3 = tmp$ret$2;
|
|
1321
|
+
}
|
|
1322
|
+
var tmp2_safe_receiver = this.y1t_1;
|
|
1323
|
+
if (tmp2_safe_receiver == null)
|
|
1324
|
+
null;
|
|
1325
|
+
else {
|
|
1326
|
+
var tmp$ret$5;
|
|
1327
|
+
// Inline function 'kotlin.let' call
|
|
1328
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1329
|
+
var tmp$ret$4;
|
|
1330
|
+
// Inline function 'kotlinx.cli.OptionDescriptor.<get-helpMessage>.<anonymous>' call
|
|
1331
|
+
tmp$ret$4 = result.y5(' -> ' + tmp2_safe_receiver);
|
|
1332
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1333
|
+
}
|
|
1334
|
+
if (this.a1u_1) {
|
|
1335
|
+
result.y5(' (always required)');
|
|
1336
|
+
}
|
|
1337
|
+
result.y5(' ' + this.w1t_1.o1u());
|
|
1338
|
+
var tmp3_safe_receiver = this.b1u_1;
|
|
1339
|
+
if (tmp3_safe_receiver == null)
|
|
1340
|
+
null;
|
|
1341
|
+
else {
|
|
1342
|
+
var tmp$ret$7;
|
|
1343
|
+
// Inline function 'kotlin.let' call
|
|
1344
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1345
|
+
var tmp$ret$6;
|
|
1346
|
+
// Inline function 'kotlinx.cli.OptionDescriptor.<get-helpMessage>.<anonymous>' call
|
|
1347
|
+
tmp$ret$6 = result.y5(' Warning: ' + tmp3_safe_receiver);
|
|
1348
|
+
tmp$ret$7 = tmp$ret$6;
|
|
1349
|
+
}
|
|
1350
|
+
result.y5('\n');
|
|
1351
|
+
return result.toString();
|
|
1352
|
+
};
|
|
1353
|
+
function Descriptor$defaultValueSet$delegate$lambda(this$0) {
|
|
1354
|
+
return function () {
|
|
1355
|
+
var tmp;
|
|
1356
|
+
if (!(this$0.z1t_1 == null)) {
|
|
1357
|
+
var tmp_0;
|
|
1358
|
+
var tmp_1;
|
|
1359
|
+
var tmp_2 = this$0.z1t_1;
|
|
1360
|
+
if (!(tmp_2 == null) ? isInterface(tmp_2, List) : false) {
|
|
1361
|
+
var tmp$ret$0;
|
|
1362
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1363
|
+
var tmp0_isNotEmpty = this$0.z1t_1;
|
|
1364
|
+
tmp$ret$0 = !tmp0_isNotEmpty.g();
|
|
1365
|
+
tmp_1 = tmp$ret$0;
|
|
1366
|
+
} else {
|
|
1367
|
+
tmp_1 = false;
|
|
1368
|
+
}
|
|
1369
|
+
if (tmp_1) {
|
|
1370
|
+
tmp_0 = true;
|
|
1371
|
+
} else {
|
|
1372
|
+
var tmp_3 = this$0.z1t_1;
|
|
1373
|
+
tmp_0 = !(!(tmp_3 == null) ? isInterface(tmp_3, List) : false);
|
|
1374
|
+
}
|
|
1375
|
+
tmp = tmp_0;
|
|
1376
|
+
} else {
|
|
1377
|
+
tmp = false;
|
|
1378
|
+
}
|
|
1379
|
+
return tmp;
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
function Descriptor(type, fullName, description, defaultValue, required, deprecatedWarning) {
|
|
1383
|
+
fullName = fullName === VOID ? null : fullName;
|
|
1384
|
+
description = description === VOID ? null : description;
|
|
1385
|
+
defaultValue = defaultValue === VOID ? null : defaultValue;
|
|
1386
|
+
required = required === VOID ? false : required;
|
|
1387
|
+
deprecatedWarning = deprecatedWarning === VOID ? null : deprecatedWarning;
|
|
1388
|
+
this.w1t_1 = type;
|
|
1389
|
+
this.x1t_1 = fullName;
|
|
1390
|
+
this.y1t_1 = description;
|
|
1391
|
+
this.z1t_1 = defaultValue;
|
|
1392
|
+
this.a1u_1 = required;
|
|
1393
|
+
this.b1u_1 = deprecatedWarning;
|
|
1394
|
+
var tmp = this;
|
|
1395
|
+
tmp.c1u_1 = lazy(Descriptor$defaultValueSet$delegate$lambda(this));
|
|
1396
|
+
}
|
|
1397
|
+
protoOf(Descriptor).y1x = function (value) {
|
|
1398
|
+
var tmp0_safe_receiver = value;
|
|
1399
|
+
var tmp;
|
|
1400
|
+
if (tmp0_safe_receiver == null) {
|
|
1401
|
+
tmp = null;
|
|
1402
|
+
} else {
|
|
1403
|
+
var tmp$ret$2;
|
|
1404
|
+
// Inline function 'kotlin.let' call
|
|
1405
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1406
|
+
var tmp$ret$1;
|
|
1407
|
+
// Inline function 'kotlinx.cli.Descriptor.valueDescription.<anonymous>' call
|
|
1408
|
+
var tmp_0;
|
|
1409
|
+
var tmp_1;
|
|
1410
|
+
if (!(tmp0_safe_receiver == null) ? isInterface(tmp0_safe_receiver, List) : false) {
|
|
1411
|
+
var tmp$ret$0;
|
|
1412
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1413
|
+
var tmp0_isNotEmpty = tmp0_safe_receiver;
|
|
1414
|
+
tmp$ret$0 = !tmp0_isNotEmpty.g();
|
|
1415
|
+
tmp_1 = tmp$ret$0;
|
|
1416
|
+
} else {
|
|
1417
|
+
tmp_1 = false;
|
|
1418
|
+
}
|
|
1419
|
+
if (tmp_1) {
|
|
1420
|
+
tmp_0 = ' [' + joinToString(tmp0_safe_receiver) + ']';
|
|
1421
|
+
} else {
|
|
1422
|
+
if (!(!(tmp0_safe_receiver == null) ? isInterface(tmp0_safe_receiver, List) : false)) {
|
|
1423
|
+
tmp_0 = ' [' + tmp0_safe_receiver + ']';
|
|
1424
|
+
} else {
|
|
1425
|
+
tmp_0 = null;
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
tmp$ret$1 = tmp_0;
|
|
1429
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1430
|
+
tmp = tmp$ret$2;
|
|
1431
|
+
}
|
|
1432
|
+
return tmp;
|
|
1433
|
+
};
|
|
1434
|
+
protoOf(Descriptor).g1u = function () {
|
|
1435
|
+
var tmp$ret$0;
|
|
1436
|
+
// Inline function 'kotlin.getValue' call
|
|
1437
|
+
var tmp0_getValue = defaultValueSet$factory();
|
|
1438
|
+
tmp$ret$0 = this.c1u_1.w();
|
|
1439
|
+
return tmp$ret$0;
|
|
1440
|
+
};
|
|
1441
|
+
function ArgDescriptor(type, fullName, number, description, defaultValue, required, deprecatedWarning) {
|
|
1442
|
+
number = number === VOID ? null : number;
|
|
1443
|
+
description = description === VOID ? null : description;
|
|
1444
|
+
defaultValue = defaultValue === VOID ? null : defaultValue;
|
|
1445
|
+
required = required === VOID ? true : required;
|
|
1446
|
+
deprecatedWarning = deprecatedWarning === VOID ? null : deprecatedWarning;
|
|
1447
|
+
Descriptor.call(this, type, fullName, description, defaultValue, required, deprecatedWarning);
|
|
1448
|
+
this.t1w_1 = number;
|
|
1449
|
+
var tmp0_safe_receiver = this.t1w_1;
|
|
1450
|
+
if (tmp0_safe_receiver == null)
|
|
1451
|
+
null;
|
|
1452
|
+
else {
|
|
1453
|
+
var tmp$ret$0;
|
|
1454
|
+
// Inline function 'kotlin.let' call
|
|
1455
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1456
|
+
var tmp;
|
|
1457
|
+
if (tmp0_safe_receiver < 1) {
|
|
1458
|
+
var tmp0_error = 'Number of arguments for argument description ' + fullName + ' should be greater than zero.';
|
|
1459
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
1460
|
+
}
|
|
1461
|
+
tmp$ret$0 = tmp;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
protoOf(ArgDescriptor).n1u = function () {
|
|
1465
|
+
return 'argument ' + this.x1t_1;
|
|
1466
|
+
};
|
|
1467
|
+
protoOf(ArgDescriptor).j1w = function () {
|
|
1468
|
+
var result = StringBuilder_init_$Create$();
|
|
1469
|
+
result.y5(' ' + this.x1t_1);
|
|
1470
|
+
var tmp0_safe_receiver = this.y1x(this.z1t_1);
|
|
1471
|
+
if (tmp0_safe_receiver == null)
|
|
1472
|
+
null;
|
|
1473
|
+
else {
|
|
1474
|
+
var tmp$ret$1;
|
|
1475
|
+
// Inline function 'kotlin.let' call
|
|
1476
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1477
|
+
var tmp$ret$0;
|
|
1478
|
+
// Inline function 'kotlinx.cli.ArgDescriptor.<get-helpMessage>.<anonymous>' call
|
|
1479
|
+
tmp$ret$0 = result.y5(tmp0_safe_receiver);
|
|
1480
|
+
tmp$ret$1 = tmp$ret$0;
|
|
1481
|
+
}
|
|
1482
|
+
var tmp1_safe_receiver = this.y1t_1;
|
|
1483
|
+
if (tmp1_safe_receiver == null)
|
|
1484
|
+
null;
|
|
1485
|
+
else {
|
|
1486
|
+
var tmp$ret$3;
|
|
1487
|
+
// Inline function 'kotlin.let' call
|
|
1488
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1489
|
+
var tmp$ret$2;
|
|
1490
|
+
// Inline function 'kotlinx.cli.ArgDescriptor.<get-helpMessage>.<anonymous>' call
|
|
1491
|
+
tmp$ret$2 = result.y5(' -> ' + tmp1_safe_receiver);
|
|
1492
|
+
tmp$ret$3 = tmp$ret$2;
|
|
1493
|
+
}
|
|
1494
|
+
if (!this.a1u_1) {
|
|
1495
|
+
result.y5(' (optional)');
|
|
1496
|
+
}
|
|
1497
|
+
result.y5(' ' + this.w1t_1.o1u());
|
|
1498
|
+
var tmp2_safe_receiver = this.b1u_1;
|
|
1499
|
+
if (tmp2_safe_receiver == null)
|
|
1500
|
+
null;
|
|
1501
|
+
else {
|
|
1502
|
+
var tmp$ret$5;
|
|
1503
|
+
// Inline function 'kotlin.let' call
|
|
1504
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1505
|
+
var tmp$ret$4;
|
|
1506
|
+
// Inline function 'kotlinx.cli.ArgDescriptor.<get-helpMessage>.<anonymous>' call
|
|
1507
|
+
tmp$ret$4 = result.y5(' Warning: ' + tmp2_safe_receiver);
|
|
1508
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1509
|
+
}
|
|
1510
|
+
result.y5('\n');
|
|
1511
|
+
return result.toString();
|
|
1512
|
+
};
|
|
1513
|
+
function defaultValueSet$factory() {
|
|
1514
|
+
return getPropertyCallableRef('defaultValueSet', 1, KProperty1, function (receiver) {
|
|
1515
|
+
return receiver.g1u();
|
|
1516
|
+
}, null);
|
|
1517
|
+
}
|
|
1518
|
+
function SingleOption(descriptor, owner) {
|
|
1519
|
+
AbstractSingleOption.call(this, new ArgumentSingleValue(descriptor), owner);
|
|
1520
|
+
this.c1y(descriptor);
|
|
1521
|
+
}
|
|
1522
|
+
function default_0(_this__u8e3s4, value) {
|
|
1523
|
+
var tmp$ret$2;
|
|
1524
|
+
// Inline function 'kotlin.with' call
|
|
1525
|
+
var tmp$ret$0;
|
|
1526
|
+
// Inline function 'kotlinx.cli.cast' call
|
|
1527
|
+
var tmp0_cast = _this__u8e3s4.r1u_1;
|
|
1528
|
+
tmp$ret$0 = tmp0_cast instanceof ParsingValue ? tmp0_cast : THROW_CCE();
|
|
1529
|
+
var tmp = tmp$ret$0.d1u_1;
|
|
1530
|
+
var tmp1_with = tmp instanceof OptionDescriptor ? tmp : THROW_CCE();
|
|
1531
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1532
|
+
var tmp$ret$1;
|
|
1533
|
+
// Inline function 'kotlinx.cli.default.<anonymous>' call
|
|
1534
|
+
tmp$ret$1 = new SingleOption(new OptionDescriptor(tmp1_with.g1v_1, tmp1_with.h1v_1, tmp1_with.w1t_1, tmp1_with.x1t_1, tmp1_with.i1v_1, tmp1_with.y1t_1, value, tmp1_with.a1u_1, tmp1_with.j1v_1, tmp1_with.k1v_1, tmp1_with.b1u_1), _this__u8e3s4.s1u_1);
|
|
1535
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1536
|
+
var newOption = tmp$ret$2;
|
|
1537
|
+
_this__u8e3s4.s1u_1.q1u_1 = newOption;
|
|
1538
|
+
return newOption;
|
|
1539
|
+
}
|
|
1540
|
+
function SingleNullableOption(descriptor, owner) {
|
|
1541
|
+
AbstractSingleOption.call(this, new ArgumentSingleNullableValue(descriptor), owner);
|
|
1542
|
+
this.c1y(descriptor);
|
|
1543
|
+
}
|
|
1544
|
+
function MultipleOption(descriptor, owner) {
|
|
1545
|
+
Option.call(this, new ArgumentMultipleValues(descriptor), owner);
|
|
1546
|
+
if (!descriptor.j1v_1 ? descriptor.k1v_1 == null : false) {
|
|
1547
|
+
failAssertion("Option with multiple values can't be initialized with descriptor for single one.");
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
function multiple(_this__u8e3s4) {
|
|
1551
|
+
var tmp$ret$2;
|
|
1552
|
+
// Inline function 'kotlin.with' call
|
|
1553
|
+
var tmp$ret$0;
|
|
1554
|
+
// Inline function 'kotlinx.cli.cast' call
|
|
1555
|
+
var tmp0_cast = _this__u8e3s4.r1u_1;
|
|
1556
|
+
tmp$ret$0 = tmp0_cast instanceof ParsingValue ? tmp0_cast : THROW_CCE();
|
|
1557
|
+
var tmp = tmp$ret$0.d1u_1;
|
|
1558
|
+
var tmp1_with = tmp instanceof OptionDescriptor ? tmp : THROW_CCE();
|
|
1559
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1560
|
+
var tmp$ret$1;
|
|
1561
|
+
// Inline function 'kotlinx.cli.multiple.<anonymous>' call
|
|
1562
|
+
tmp$ret$1 = new MultipleOption(new OptionDescriptor(tmp1_with.g1v_1, tmp1_with.h1v_1, tmp1_with.w1t_1, tmp1_with.x1t_1, tmp1_with.i1v_1, tmp1_with.y1t_1, listOfNotNull(tmp1_with.z1t_1), tmp1_with.a1u_1, true, tmp1_with.k1v_1, tmp1_with.b1u_1), _this__u8e3s4.s1u_1);
|
|
1563
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1564
|
+
var newOption = tmp$ret$2;
|
|
1565
|
+
_this__u8e3s4.s1u_1.q1u_1 = newOption;
|
|
1566
|
+
return newOption;
|
|
1567
|
+
}
|
|
1568
|
+
function AbstractSingleOption(delegate, owner) {
|
|
1569
|
+
Option.call(this, delegate, owner);
|
|
1570
|
+
}
|
|
1571
|
+
protoOf(AbstractSingleOption).c1y = function (descriptor) {
|
|
1572
|
+
if (descriptor.j1v_1 ? true : !(descriptor.k1v_1 == null)) {
|
|
1573
|
+
failAssertion("Option with single value can't be initialized with descriptor for multiple values.");
|
|
1574
|
+
}
|
|
1575
|
+
};
|
|
1576
|
+
function Option(delegate, owner) {
|
|
1577
|
+
CLIEntity.call(this, delegate, owner);
|
|
1578
|
+
}
|
|
1579
|
+
function exitProcess(status) {
|
|
1580
|
+
// Inline function 'kotlin.error' call
|
|
1581
|
+
throw IllegalStateException_init_$Create$('Not implemented for JS!');
|
|
1582
|
+
}
|
|
1583
|
+
//region block: post-declaration
|
|
1584
|
+
protoOf(ArgumentSingleValue).k1w = getValue;
|
|
1585
|
+
protoOf(ArgumentSingleNullableValue).k1w = getValue;
|
|
1586
|
+
protoOf(ArgumentMultipleValues).k1w = getValue;
|
|
1587
|
+
//endregion
|
|
1588
|
+
//region block: exports
|
|
1589
|
+
_.$_$ = _.$_$ || {};
|
|
1590
|
+
_.$_$.a = Boolean_getInstance;
|
|
1591
|
+
_.$_$.b = Companion_getInstance;
|
|
1592
|
+
_.$_$.c = String_getInstance;
|
|
1593
|
+
_.$_$.d = ArgParser;
|
|
1594
|
+
_.$_$.e = Choice;
|
|
1595
|
+
_.$_$.f = default_0;
|
|
1596
|
+
_.$_$.g = multiple;
|
|
1597
|
+
//endregion
|
|
1598
|
+
return _;
|
|
1599
|
+
}));
|
|
1600
|
+
|
|
1601
|
+
//# sourceMappingURL=Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map
|