kaitai-struct-compiler 0.10.0-SNAPSHOT20220702.153738.54691da3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@ a nice, easy-to-comprehend API.
16
16
 
17
17
  For more info on Kaitai Struct, please refer to http://kaitai.io/
18
18
 
19
- Note that reference Kaitai Struct compiler is written Scala, and thus
19
+ Note that reference Kaitai Struct compiler is written in Scala, and thus
20
20
  can be compiled for a variety of platforms, such as JVM, JavaScript
21
21
  and native binaries. This package is compiled to be run JavaScript
22
22
  environments.
@@ -33,7 +33,8 @@ the compiler). If you:
33
33
  (compiling it on the fly) => use
34
34
  [Kaitai Struct loader for JavaScript](https://github.com/kaitai-io/kaitai-struct-loader).
35
35
  * want to integrate compiler into your build flow => use a JVM-based
36
- desktop compiler, which can be called as a command-line utility
36
+ [desktop compiler](https://kaitai.io/#download), which can be called
37
+ as a command-line utility
37
38
 
38
39
  ## Installation
39
40
 
@@ -53,9 +54,9 @@ Our [examples repository](https://github.com/kaitai-io/kaitai_struct_examples) c
53
54
 
54
55
  ## Plugging in
55
56
 
56
- We publish the compiler as an [UMD module](https://github.com/umdjs/umd), so it works from various environments, including server-side (eg. node) and client-side (eg. web browser) ones.
57
+ We publish the compiler as a [UMD module](https://github.com/umdjs/umd), so it works from various environments, including server-side (e.g. Node.js) and client-side (e.g. web browser) ones.
57
58
 
58
- Note: currently we don't publish the compiler as standard ES module. This will probably change in the future. If you need ES module please comment on [this issue](https://github.com/kaitai-io/kaitai_struct/issues/180).
59
+ Note: currently we don't publish the compiler as standard ES module. This will probably change in the future. If you need ES module, please comment on [this issue](https://github.com/kaitai-io/kaitai_struct/issues/180).
59
60
 
60
61
  ### node
61
62
 
@@ -67,18 +68,18 @@ var compiler = new KaitaiStructCompiler();
67
68
  ### browser using script tags
68
69
 
69
70
  ```html
70
- <script src="node_modules/kaitai-struct-compiler/kaitai-struct-compiler.js"></script>
71
+ <script src="node_modules/kaitai-struct-compiler/kaitai-struct-compiler.js"></script>
71
72
  <script>
72
73
  var compiler = new KaitaiStructCompiler();
73
74
  </script>
74
75
  ```
75
76
 
76
- ### browser using AMD loader (eg. require.js)
77
+ ### browser using AMD loader (e.g. require.js)
77
78
 
78
79
  ```html
79
80
  <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
80
81
  <script>
81
- requirejs.config({
82
+ requirejs.config({
82
83
  paths: {
83
84
  'kaitai-struct-compiler': 'node_modules/kaitai-struct-compiler/kaitai-struct-compiler'
84
85
  }
@@ -132,32 +133,45 @@ yamlImporter.importYaml("import_outer.ksy").then(function(ksy) {
132
133
 
133
134
  ### Debug mode
134
135
 
135
- You can compile in debug mode which adds `_debug` property to every object and this `_debug` object contains the start and end offsets of the parsed fields so you can find bytes of the field in the original binary.
136
+ You can compile `.ksy` source files in debug mode by setting the `debugMode` parameter to `true`. This has two effects (these can be controlled separately in the JVM-based desktop compiler since 0.9 - see [#332](https://github.com/kaitai-io/kaitai_struct/issues/332#issuecomment-454795155), but not yet in this JS compiler):
136
137
 
137
- ## Copyrights and licensing
138
+ * objects created from user-defined `types` (and the top-level type with name specified in `/meta/id`) in the .ksy file will have a `_debug` map, which stores start and end offsets of each attribute - this is used in visualizers.
139
+
140
+ On the JVM-based desktop compiler, this can be enabled with `--read-pos`.
141
+
142
+ * the `_read` method (responsible for reading the `seq` structure defined in the .ksy file) will no longer be automatically called from constructors in the generated parser code, so you have to call it manually like this:
143
+
144
+ ```diff
145
+ var g = new Gif(new KaitaiStream(data));
146
+ +g._read();
147
+ ```
148
+
149
+ On the JVM-based desktop compiler, this can be enabled with `--no-auto-read`.
150
+
151
+ ## Licensing
138
152
 
139
153
  ### Main code
140
154
 
141
- Kaitai Struct compiler itself is copyright (C) 2015-2021 Kaitai
155
+ Kaitai Struct compiler itself is copyright (C) 2015-2022 Kaitai
142
156
  Project.
143
157
 
144
158
  This program is free software: you can redistribute it and/or modify
145
159
  it under the terms of the GNU General Public License as published by
146
- the Free Software Foundation, either version 3 of the License, or (at
147
- your option) any later version.
160
+ the Free Software Foundation, either version 3 of the License, or
161
+ (at your option) any later version.
148
162
 
149
- This program is distributed in the hope that it will be useful, but
150
- WITHOUT ANY WARRANTY; without even the implied warranty of
151
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
152
- General Public License for more details.
163
+ This program is distributed in the hope that it will be useful,
164
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
165
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
166
+ GNU General Public License for more details.
153
167
 
154
168
  You should have received a copy of the GNU General Public License
155
- along with this program. If not, see <http://www.gnu.org/licenses/>.
169
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
156
170
 
157
171
  ### FastParse
158
172
 
159
173
  Portions of Kaitai Struct compiler are loosely based on
160
- [pythonparse](https://github.com/lihaoyi/fastparse/tree/master/pythonparse/shared/src/main/scala/pythonparse)
174
+ [pythonparse](https://github.com/com-lihaoyi/fastparse/tree/1.0.0/pythonparse/shared/src/main/scala/pythonparse)
161
175
  from [FastParse](https://com-lihaoyi.github.io/fastparse/) and are copyright
162
176
  (c) 2014 Li Haoyi (haoyi.sg@gmail.com).
163
177
 
@@ -182,11 +196,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
182
196
 
183
197
  ### Libraries used
184
198
 
185
- Kaitai Struct compiler depends on the following libraries:
199
+ Kaitai Struct compiler in JavaScript depends on the following libraries:
186
200
 
187
- * [scopt](https://github.com/scopt/scopt) — MIT license
188
201
  * [fastparse](https://com-lihaoyi.github.io/fastparse/) — MIT license
189
- * [snakeyaml](https://bitbucket.org/asomov/snakeyaml) — Apache 2.0 license
190
202
 
191
203
  ---
192
204
 
@@ -6,7 +6,7 @@
6
6
  } else {
7
7
  root.KaitaiStructCompiler = factory();
8
8
  }
9
- }(this, function () {
9
+ }(typeof self !== 'undefined' ? self : this, function () {
10
10
 
11
11
  var exports = {};
12
12
  var __ScalaJSEnv = { exportsNamespace: exports };
@@ -2192,30 +2192,6 @@ function $isArrayOf_ju_Formattable(obj, depth) {
2192
2192
  function $asArrayOf_ju_Formattable(obj, depth) {
2193
2193
  return (($isArrayOf_ju_Formattable(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Ljava.util.Formattable;", depth))
2194
2194
  }
2195
- function $is_ju_Map(obj) {
2196
- return (!(!((obj && obj.$classData) && obj.$classData.ancestors.ju_Map)))
2197
- }
2198
- function $as_ju_Map(obj) {
2199
- return (($is_ju_Map(obj) || (obj === null)) ? obj : $throwClassCastException(obj, "java.util.Map"))
2200
- }
2201
- function $isArrayOf_ju_Map(obj, depth) {
2202
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.ju_Map)))
2203
- }
2204
- function $asArrayOf_ju_Map(obj, depth) {
2205
- return (($isArrayOf_ju_Map(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Ljava.util.Map;", depth))
2206
- }
2207
- function $is_ju_Map$Entry(obj) {
2208
- return (!(!((obj && obj.$classData) && obj.$classData.ancestors.ju_Map$Entry)))
2209
- }
2210
- function $as_ju_Map$Entry(obj) {
2211
- return (($is_ju_Map$Entry(obj) || (obj === null)) ? obj : $throwClassCastException(obj, "java.util.Map$Entry"))
2212
- }
2213
- function $isArrayOf_ju_Map$Entry(obj, depth) {
2214
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.ju_Map$Entry)))
2215
- }
2216
- function $asArrayOf_ju_Map$Entry(obj, depth) {
2217
- return (($isArrayOf_ju_Map$Entry(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Ljava.util.Map$Entry;", depth))
2218
- }
2219
2195
  function $f_s_Proxy__equals__O__Z($thiz, that) {
2220
2196
  return ((that !== null) && (((that === $thiz) || (that === $thiz.self__O())) || $objectEquals(that, $thiz.self__O())))
2221
2197
  }
@@ -2352,17 +2328,6 @@ function $isArrayOf_sc_GenTraversableOnce(obj, depth) {
2352
2328
  function $asArrayOf_sc_GenTraversableOnce(obj, depth) {
2353
2329
  return (($isArrayOf_sc_GenTraversableOnce(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lscala.collection.GenTraversableOnce;", depth))
2354
2330
  }
2355
- function $f_sc_convert_LowPriorityWrapAsJava__mapAsJavaMap__sc_Map__ju_Map($thiz, m) {
2356
- if ((m === null)) {
2357
- return null
2358
- } else if (((m instanceof $c_sc_convert_Wrappers$JMapWrapper) && ($as_sc_convert_Wrappers$JMapWrapper(m).scala$collection$convert$Wrappers$JMapWrapper$$$outer__sc_convert_Wrappers() === $m_sc_convert_Wrappers$()))) {
2359
- var x2 = $as_sc_convert_Wrappers$JMapWrapper(m);
2360
- var wrapped = x2.underlying__ju_Map();
2361
- return wrapped
2362
- } else {
2363
- return new $c_sc_convert_Wrappers$MapWrapper().init___sc_convert_Wrappers__sc_Map($m_sc_convert_Wrappers$(), m)
2364
- }
2365
- }
2366
2331
  function $f_sci_VectorPointer__copyOf__AO__AO($thiz, a) {
2367
2332
  var copy = $newArrayObject($d_O.getArrayOf(), [a.u.length]);
2368
2333
  $systemArraycopy(a, 0, copy, 0, a.u.length);
@@ -4430,9 +4395,9 @@ function $h_Lio_kaitai_struct_Version$() {
4430
4395
  $h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
4431
4396
  $c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
4432
4397
  this.name$1 = "kaitai-struct-compiler-js";
4433
- this.version$1 = "0.10-SNAPSHOT20220702.153738.54691da3";
4434
- this.gitCommit$1 = "54691da3";
4435
- this.gitTime$1 = "2022-07-02T15:37:38+00:00";
4398
+ this.version$1 = "0.10";
4399
+ this.gitCommit$1 = "59a7d156";
4400
+ this.gitTime$1 = "2022-07-08T16:31:07+00:00";
4436
4401
  return this
4437
4402
  });
4438
4403
  var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
@@ -15246,18 +15211,6 @@ function $m_ju_Arrays$() {
15246
15211
  };
15247
15212
  return $n_ju_Arrays$
15248
15213
  }
15249
- function $is_ju_Collection(obj) {
15250
- return (!(!((obj && obj.$classData) && obj.$classData.ancestors.ju_Collection)))
15251
- }
15252
- function $as_ju_Collection(obj) {
15253
- return (($is_ju_Collection(obj) || (obj === null)) ? obj : $throwClassCastException(obj, "java.util.Collection"))
15254
- }
15255
- function $isArrayOf_ju_Collection(obj, depth) {
15256
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.ju_Collection)))
15257
- }
15258
- function $asArrayOf_ju_Collection(obj, depth) {
15259
- return (($isArrayOf_ju_Collection(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Ljava.util.Collection;", depth))
15260
- }
15261
15214
  /** @constructor */
15262
15215
  function $c_ju_Formatter$() {
15263
15216
  $c_O.call(this);
@@ -24517,73 +24470,6 @@ function $asArrayOf_jl_Throwable(obj, depth) {
24517
24470
  return (($isArrayOf_jl_Throwable(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Ljava.lang.Throwable;", depth))
24518
24471
  }
24519
24472
  /** @constructor */
24520
- function $c_ju_AbstractMap() {
24521
- $c_O.call(this)
24522
- }
24523
- $c_ju_AbstractMap.prototype = new $h_O();
24524
- $c_ju_AbstractMap.prototype.constructor = $c_ju_AbstractMap;
24525
- /** @constructor */
24526
- function $h_ju_AbstractMap() {
24527
- /*<skip>*/
24528
- }
24529
- $h_ju_AbstractMap.prototype = $c_ju_AbstractMap.prototype;
24530
- $c_ju_AbstractMap.prototype.equals__O__Z = (function(o) {
24531
- if ((o === this)) {
24532
- return true
24533
- } else if ($is_ju_Map(o)) {
24534
- var x2 = $as_ju_Map(o);
24535
- if ((this.size__I() === x2.size__I())) {
24536
- var __self = new $c_sc_convert_Wrappers$MapWrapper$$anon$2().init___sc_convert_Wrappers$MapWrapper(this);
24537
- var __self$1 = new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3().init___sc_convert_Wrappers$MapWrapper$$anon$2(__self);
24538
- inlinereturn$8: {
24539
- while (__self$1.ui$1.hasNext__Z()) {
24540
- var arg1 = __self$1.next__ju_Map$Entry();
24541
- var a = x2.get__O__O(arg1.k$1$1);
24542
- var b = arg1.v$1$1;
24543
- if ((!((a === null) ? (b === null) : $objectEquals(a, b)))) {
24544
- var jsx$1 = true;
24545
- break inlinereturn$8
24546
- }
24547
- };
24548
- var jsx$1 = false
24549
- };
24550
- return (!jsx$1)
24551
- } else {
24552
- return false
24553
- }
24554
- } else {
24555
- return false
24556
- }
24557
- });
24558
- $c_ju_AbstractMap.prototype.toString__T = (function() {
24559
- var result = "{";
24560
- var first = true;
24561
- var this$1 = new $c_sc_convert_Wrappers$MapWrapper$$anon$2().init___sc_convert_Wrappers$MapWrapper(this);
24562
- var iter = new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3().init___sc_convert_Wrappers$MapWrapper$$anon$2(this$1);
24563
- while (iter.ui$1.hasNext__Z()) {
24564
- var entry = iter.next__ju_Map$Entry();
24565
- if (first) {
24566
- first = false
24567
- } else {
24568
- result = (result + ", ")
24569
- };
24570
- result = (((("" + result) + entry.k$1$1) + "=") + entry.v$1$1)
24571
- };
24572
- return (result + "}")
24573
- });
24574
- $c_ju_AbstractMap.prototype.hashCode__I = (function() {
24575
- var __self = new $c_sc_convert_Wrappers$MapWrapper$$anon$2().init___sc_convert_Wrappers$MapWrapper(this);
24576
- var __self$1 = new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3().init___sc_convert_Wrappers$MapWrapper$$anon$2(__self);
24577
- var result = 0;
24578
- while (__self$1.ui$1.hasNext__Z()) {
24579
- var arg1 = result;
24580
- var arg2 = __self$1.next__ju_Map$Entry();
24581
- var prev = $uI(arg1);
24582
- result = ((arg2.hashCode__I() + prev) | 0)
24583
- };
24584
- return $uI(result)
24585
- });
24586
- /** @constructor */
24587
24473
  function $c_ju_regex_Matcher() {
24588
24474
  $c_O.call(this);
24589
24475
  this.pattern0$1 = null;
@@ -25427,91 +25313,6 @@ var $d_sc_TraversableOnce$reducer$1$ = new $TypeData().initClass({
25427
25313
  });
25428
25314
  $c_sc_TraversableOnce$reducer$1$.prototype.$classData = $d_sc_TraversableOnce$reducer$1$;
25429
25315
  /** @constructor */
25430
- function $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3() {
25431
- $c_O.call(this);
25432
- this.ui$1 = null;
25433
- this.prev$1 = null;
25434
- this.$$outer$1 = null
25435
- }
25436
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3.prototype = new $h_O();
25437
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3.prototype.constructor = $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3;
25438
- /** @constructor */
25439
- function $h_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3() {
25440
- /*<skip>*/
25441
- }
25442
- $h_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3.prototype = $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3.prototype;
25443
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3.prototype.next__ju_Map$Entry = (function() {
25444
- var x1 = $as_T2(this.ui$1.next__O());
25445
- if ((x1 === null)) {
25446
- throw new $c_s_MatchError().init___O(x1)
25447
- };
25448
- var k = x1.$$und1__O();
25449
- var v = x1.$$und2__O();
25450
- this.prev$1 = new $c_s_Some().init___O(k);
25451
- return new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4().init___sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3__O__O(this, k, v)
25452
- });
25453
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3.prototype.init___sc_convert_Wrappers$MapWrapper$$anon$2 = (function($$outer) {
25454
- if (($$outer === null)) {
25455
- throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(null)
25456
- } else {
25457
- this.$$outer$1 = $$outer
25458
- };
25459
- this.ui$1 = $$outer.$$outer$3.scala$collection$convert$Wrappers$MapWrapper$$underlying$f.iterator__sc_Iterator();
25460
- this.prev$1 = $m_s_None$();
25461
- return this
25462
- });
25463
- var $d_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3 = new $TypeData().initClass({
25464
- sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3: 0
25465
- }, false, "scala.collection.convert.Wrappers$MapWrapper$$anon$2$$anon$3", {
25466
- sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3: 1,
25467
- O: 1,
25468
- ju_Iterator: 1
25469
- });
25470
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3.prototype.$classData = $d_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3;
25471
- /** @constructor */
25472
- function $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4() {
25473
- $c_O.call(this);
25474
- this.$$outer$1 = null;
25475
- this.k$1$1 = null;
25476
- this.v$1$1 = null
25477
- }
25478
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype = new $h_O();
25479
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype.constructor = $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4;
25480
- /** @constructor */
25481
- function $h_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4() {
25482
- /*<skip>*/
25483
- }
25484
- $h_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype = $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype;
25485
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype.equals__O__Z = (function(other) {
25486
- if ($is_ju_Map$Entry(other)) {
25487
- var x2 = $as_ju_Map$Entry(other);
25488
- return ($m_sr_BoxesRunTime$().equals__O__O__Z(this.k$1$1, x2.k$1$1) && $m_sr_BoxesRunTime$().equals__O__O__Z(this.v$1$1, x2.v$1$1))
25489
- } else {
25490
- return false
25491
- }
25492
- });
25493
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype.hashCode__I = (function() {
25494
- return (((this.k$1$1 === null) ? 0 : $objectHashCode(this.k$1$1)) ^ ((this.v$1$1 === null) ? 0 : $objectHashCode(this.v$1$1)))
25495
- });
25496
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype.init___sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3__O__O = (function($$outer, k$1, v$1) {
25497
- if (($$outer === null)) {
25498
- throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(null)
25499
- } else {
25500
- this.$$outer$1 = $$outer
25501
- };
25502
- this.k$1$1 = k$1;
25503
- this.v$1$1 = v$1;
25504
- return this
25505
- });
25506
- var $d_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4 = new $TypeData().initClass({
25507
- sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4: 0
25508
- }, false, "scala.collection.convert.Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4", {
25509
- sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4: 1,
25510
- O: 1,
25511
- ju_Map$Entry: 1
25512
- });
25513
- $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4.prototype.$classData = $d_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3$$anon$4;
25514
- /** @constructor */
25515
25316
  function $c_sc_package$WrappedCanBuildFrom() {
25516
25317
  /*<skip>*/
25517
25318
  }
@@ -27866,8 +27667,7 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.parseSwitch__p1__sci_Map__sci_Li
27866
27667
  })(this, path, metaDef, arg));
27867
27668
  var bf = $m_sci_Map$().ReusableCBF$4;
27868
27669
  var cases = $as_sci_Map($f_sc_TraversableLike__map__F1__scg_CanBuildFrom__O(_cases, f, bf));
27869
- var this$10 = $m_sc_JavaConversions$();
27870
- if ($f_sc_convert_LowPriorityWrapAsJava__mapAsJavaMap__sc_Map__ju_Map(this$10, cases).containsKey__O__Z($m_Lio_kaitai_struct_datatype_DataType$SwitchType$().ELSE$undCONST$1)) {
27670
+ if (cases.contains__O__Z($m_Lio_kaitai_struct_datatype_DataType$SwitchType$().ELSE$undCONST$1)) {
27871
27671
  var addCases = $as_sci_Map($m_s_Predef$().Map$2.apply__sc_Seq__sc_GenMap($m_sci_Nil$()))
27872
27672
  } else {
27873
27673
  var x1 = new $c_T2().init___O__O(arg.size$1, arg.sizeEos$1);
@@ -27882,16 +27682,16 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.parseSwitch__p1__sci_Map__sci_Li
27882
27682
  var self$1 = $m_Lio_kaitai_struct_datatype_DataType$SwitchType$().ELSE$undCONST$1;
27883
27683
  var y = new $c_Lio_kaitai_struct_datatype_DataType$BytesLimitType().init___Lio_kaitai_struct_exprlang_Ast$expr__s_Option__Z__s_Option__s_Option(sizeValue, $m_s_None$(), false, $m_s_None$(), arg.process$1);
27884
27684
  var array$1 = [new $c_T2().init___O__O(self$1, y)];
27885
- var this$16 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
27685
+ var this$15 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
27886
27686
  var i$1 = 0;
27887
27687
  var len = $uI(array$1.length);
27888
27688
  while ((i$1 < len)) {
27889
27689
  var index$1 = i$1;
27890
27690
  var arg1 = array$1[index$1];
27891
- this$16.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
27691
+ this$15.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1));
27892
27692
  i$1 = ((1 + i$1) | 0)
27893
27693
  };
27894
- var addCases = $as_sci_Map(this$16.elems$1);
27694
+ var addCases = $as_sci_Map(this$15.elems$1);
27895
27695
  break matchEnd20
27896
27696
  }
27897
27697
  };
@@ -27902,16 +27702,16 @@ $c_Lio_kaitai_struct_format_AttrSpec$.prototype.parseSwitch__p1__sci_Map__sci_Li
27902
27702
  var self$2 = $m_Lio_kaitai_struct_datatype_DataType$SwitchType$().ELSE$undCONST$1;
27903
27703
  var y$1 = new $c_Lio_kaitai_struct_datatype_DataType$BytesEosType().init___s_Option__Z__s_Option__s_Option($m_s_None$(), false, $m_s_None$(), arg.process$1);
27904
27704
  var array$2 = [new $c_T2().init___O__O(self$2, y$1)];
27905
- var this$22 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
27705
+ var this$21 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
27906
27706
  var i$2 = 0;
27907
27707
  var len$1 = $uI(array$2.length);
27908
27708
  while ((i$2 < len$1)) {
27909
27709
  var index$2 = i$2;
27910
27710
  var arg1$1 = array$2[index$2];
27911
- this$22.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1$1));
27711
+ this$21.$$plus$eq__T2__scm_MapBuilder($as_T2(arg1$1));
27912
27712
  i$2 = ((1 + i$2) | 0)
27913
27713
  };
27914
- var addCases = $as_sci_Map(this$22.elems$1);
27714
+ var addCases = $as_sci_Map(this$21.elems$1);
27915
27715
  break matchEnd20
27916
27716
  };
27917
27717
  var p7 = $as_s_Option(x1.$$und1$f);
@@ -31457,55 +31257,6 @@ function $m_jl_Long$() {
31457
31257
  return $n_jl_Long$
31458
31258
  }
31459
31259
  /** @constructor */
31460
- function $c_ju_AbstractCollection() {
31461
- $c_O.call(this)
31462
- }
31463
- $c_ju_AbstractCollection.prototype = new $h_O();
31464
- $c_ju_AbstractCollection.prototype.constructor = $c_ju_AbstractCollection;
31465
- /** @constructor */
31466
- function $h_ju_AbstractCollection() {
31467
- /*<skip>*/
31468
- }
31469
- $h_ju_AbstractCollection.prototype = $c_ju_AbstractCollection.prototype;
31470
- $c_ju_AbstractCollection.prototype.containsAll__ju_Collection__Z = (function(c) {
31471
- var __self = new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3().init___sc_convert_Wrappers$MapWrapper$$anon$2(c);
31472
- inlinereturn$7: {
31473
- while (__self.ui$1.hasNext__Z()) {
31474
- var arg1 = __self.next__ju_Map$Entry();
31475
- if ((!this.contains__O__Z(arg1))) {
31476
- var jsx$1 = true;
31477
- break inlinereturn$7
31478
- }
31479
- };
31480
- var jsx$1 = false
31481
- };
31482
- return (!jsx$1)
31483
- });
31484
- $c_ju_AbstractCollection.prototype.toString__T = (function() {
31485
- var __self = new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3().init___sc_convert_Wrappers$MapWrapper$$anon$2(this);
31486
- var result = "[";
31487
- var first = true;
31488
- while (__self.ui$1.hasNext__Z()) {
31489
- if (first) {
31490
- first = false
31491
- } else {
31492
- result = (result + ", ")
31493
- };
31494
- result = (("" + result) + __self.next__ju_Map$Entry())
31495
- };
31496
- return (result + "]")
31497
- });
31498
- $c_ju_AbstractCollection.prototype.contains__O__Z = (function(o) {
31499
- var __self = new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3().init___sc_convert_Wrappers$MapWrapper$$anon$2(this);
31500
- while (__self.ui$1.hasNext__Z()) {
31501
- var arg1 = __self.next__ju_Map$Entry();
31502
- if (((o === null) ? (arg1 === null) : $objectEquals(o, arg1))) {
31503
- return true
31504
- }
31505
- };
31506
- return false
31507
- });
31508
- /** @constructor */
31509
31260
  function $c_ju_concurrent_atomic_AtomicReference() {
31510
31261
  $c_O.call(this);
31511
31262
  this.value$1 = null
@@ -38298,55 +38049,6 @@ $c_sc_AbstractIterator.prototype.reduceLeft__F2__O = (function(op) {
38298
38049
  return $f_sc_TraversableOnce__reduceLeft__F2__O(this, op)
38299
38050
  });
38300
38051
  /** @constructor */
38301
- function $c_sc_convert_Wrappers$() {
38302
- $c_O.call(this);
38303
- this.IteratorWrapper$module$1 = null;
38304
- this.JIteratorWrapper$module$1 = null;
38305
- this.JEnumerationWrapper$module$1 = null;
38306
- this.IterableWrapper$module$1 = null;
38307
- this.JIterableWrapper$module$1 = null;
38308
- this.JCollectionWrapper$module$1 = null;
38309
- this.SeqWrapper$module$1 = null;
38310
- this.MutableSeqWrapper$module$1 = null;
38311
- this.MutableBufferWrapper$module$1 = null;
38312
- this.JListWrapper$module$1 = null;
38313
- this.MutableSetWrapper$module$1 = null;
38314
- this.JSetWrapper$module$1 = null;
38315
- this.MutableMapWrapper$module$1 = null;
38316
- this.JMapWrapper$module$1 = null;
38317
- this.JConcurrentMapWrapper$module$1 = null;
38318
- this.DictionaryWrapper$module$1 = null;
38319
- this.JDictionaryWrapper$module$1 = null;
38320
- this.JPropertiesWrapper$module$1 = null
38321
- }
38322
- $c_sc_convert_Wrappers$.prototype = new $h_O();
38323
- $c_sc_convert_Wrappers$.prototype.constructor = $c_sc_convert_Wrappers$;
38324
- /** @constructor */
38325
- function $h_sc_convert_Wrappers$() {
38326
- /*<skip>*/
38327
- }
38328
- $h_sc_convert_Wrappers$.prototype = $c_sc_convert_Wrappers$.prototype;
38329
- $c_sc_convert_Wrappers$.prototype.init___ = (function() {
38330
- return this
38331
- });
38332
- var $d_sc_convert_Wrappers$ = new $TypeData().initClass({
38333
- sc_convert_Wrappers$: 0
38334
- }, false, "scala.collection.convert.Wrappers$", {
38335
- sc_convert_Wrappers$: 1,
38336
- O: 1,
38337
- sc_convert_Wrappers: 1,
38338
- s_Serializable: 1,
38339
- Ljava_io_Serializable: 1
38340
- });
38341
- $c_sc_convert_Wrappers$.prototype.$classData = $d_sc_convert_Wrappers$;
38342
- var $n_sc_convert_Wrappers$ = (void 0);
38343
- function $m_sc_convert_Wrappers$() {
38344
- if ((!$n_sc_convert_Wrappers$)) {
38345
- $n_sc_convert_Wrappers$ = new $c_sc_convert_Wrappers$().init___()
38346
- };
38347
- return $n_sc_convert_Wrappers$
38348
- }
38349
- /** @constructor */
38350
38052
  function $c_scg_SetFactory() {
38351
38053
  $c_scg_GenSetFactory.call(this)
38352
38054
  }
@@ -43134,38 +42836,6 @@ var $d_jl_UnsupportedOperationException = new $TypeData().initClass({
43134
42836
  });
43135
42837
  $c_jl_UnsupportedOperationException.prototype.$classData = $d_jl_UnsupportedOperationException;
43136
42838
  /** @constructor */
43137
- function $c_ju_AbstractSet() {
43138
- $c_ju_AbstractCollection.call(this)
43139
- }
43140
- $c_ju_AbstractSet.prototype = new $h_ju_AbstractCollection();
43141
- $c_ju_AbstractSet.prototype.constructor = $c_ju_AbstractSet;
43142
- /** @constructor */
43143
- function $h_ju_AbstractSet() {
43144
- /*<skip>*/
43145
- }
43146
- $h_ju_AbstractSet.prototype = $c_ju_AbstractSet.prototype;
43147
- $c_ju_AbstractSet.prototype.equals__O__Z = (function(that) {
43148
- if ((that === this)) {
43149
- return true
43150
- } else if ($is_ju_Collection(that)) {
43151
- var x2 = $as_ju_Collection(that);
43152
- return ((x2.size__I() === this.size__I()) && this.containsAll__ju_Collection__Z(x2))
43153
- } else {
43154
- return false
43155
- }
43156
- });
43157
- $c_ju_AbstractSet.prototype.hashCode__I = (function() {
43158
- var __self = new $c_sc_convert_Wrappers$MapWrapper$$anon$2$$anon$3().init___sc_convert_Wrappers$MapWrapper$$anon$2(this);
43159
- var result = 0;
43160
- while (__self.ui$1.hasNext__Z()) {
43161
- var arg1 = result;
43162
- var arg2 = __self.next__ju_Map$Entry();
43163
- var prev = $uI(arg1);
43164
- result = ((arg2.hashCode__I() + prev) | 0)
43165
- };
43166
- return $uI(result)
43167
- });
43168
- /** @constructor */
43169
42839
  function $c_ju_NoSuchElementException() {
43170
42840
  $c_jl_RuntimeException.call(this)
43171
42841
  }
@@ -43873,38 +43543,6 @@ var $d_sc_Iterator$$anon$2 = new $TypeData().initClass({
43873
43543
  });
43874
43544
  $c_sc_Iterator$$anon$2.prototype.$classData = $d_sc_Iterator$$anon$2;
43875
43545
  /** @constructor */
43876
- function $c_sc_JavaConversions$() {
43877
- $c_O.call(this)
43878
- }
43879
- $c_sc_JavaConversions$.prototype = new $h_O();
43880
- $c_sc_JavaConversions$.prototype.constructor = $c_sc_JavaConversions$;
43881
- /** @constructor */
43882
- function $h_sc_JavaConversions$() {
43883
- /*<skip>*/
43884
- }
43885
- $h_sc_JavaConversions$.prototype = $c_sc_JavaConversions$.prototype;
43886
- $c_sc_JavaConversions$.prototype.init___ = (function() {
43887
- return this
43888
- });
43889
- var $d_sc_JavaConversions$ = new $TypeData().initClass({
43890
- sc_JavaConversions$: 0
43891
- }, false, "scala.collection.JavaConversions$", {
43892
- sc_JavaConversions$: 1,
43893
- O: 1,
43894
- sc_convert_WrapAsScala: 1,
43895
- sc_convert_LowPriorityWrapAsScala: 1,
43896
- sc_convert_WrapAsJava: 1,
43897
- sc_convert_LowPriorityWrapAsJava: 1
43898
- });
43899
- $c_sc_JavaConversions$.prototype.$classData = $d_sc_JavaConversions$;
43900
- var $n_sc_JavaConversions$ = (void 0);
43901
- function $m_sc_JavaConversions$() {
43902
- if ((!$n_sc_JavaConversions$)) {
43903
- $n_sc_JavaConversions$ = new $c_sc_JavaConversions$().init___()
43904
- };
43905
- return $n_sc_JavaConversions$
43906
- }
43907
- /** @constructor */
43908
43546
  function $c_sc_LinearSeqLike$$anon$1() {
43909
43547
  $c_sc_AbstractIterator.call(this);
43910
43548
  this.these$2 = null
@@ -44099,76 +43737,6 @@ var $d_sc_TraversableOnce$FlattenOps$$anon$2 = new $TypeData().initClass({
44099
43737
  });
44100
43738
  $c_sc_TraversableOnce$FlattenOps$$anon$2.prototype.$classData = $d_sc_TraversableOnce$FlattenOps$$anon$2;
44101
43739
  /** @constructor */
44102
- function $c_sc_convert_Wrappers$MapWrapper() {
44103
- $c_ju_AbstractMap.call(this);
44104
- this.scala$collection$convert$Wrappers$MapWrapper$$underlying$f = null;
44105
- this.$$outer$2 = null
44106
- }
44107
- $c_sc_convert_Wrappers$MapWrapper.prototype = new $h_ju_AbstractMap();
44108
- $c_sc_convert_Wrappers$MapWrapper.prototype.constructor = $c_sc_convert_Wrappers$MapWrapper;
44109
- /** @constructor */
44110
- function $h_sc_convert_Wrappers$MapWrapper() {
44111
- /*<skip>*/
44112
- }
44113
- $h_sc_convert_Wrappers$MapWrapper.prototype = $c_sc_convert_Wrappers$MapWrapper.prototype;
44114
- $c_sc_convert_Wrappers$MapWrapper.prototype.containsKey__O__Z = (function(key) {
44115
- try {
44116
- return this.scala$collection$convert$Wrappers$MapWrapper$$underlying$f.contains__O__Z(key)
44117
- } catch (e) {
44118
- if ((e instanceof $c_jl_ClassCastException)) {
44119
- $as_jl_ClassCastException(e);
44120
- return false
44121
- } else {
44122
- throw e
44123
- }
44124
- }
44125
- });
44126
- $c_sc_convert_Wrappers$MapWrapper.prototype.get__O__O = (function(key) {
44127
- try {
44128
- var x1 = this.scala$collection$convert$Wrappers$MapWrapper$$underlying$f.get__O__s_Option(key);
44129
- var x = $m_s_None$();
44130
- if ((x === x1)) {
44131
- return null
44132
- } else if ((x1 instanceof $c_s_Some)) {
44133
- var x2 = $as_s_Some(x1);
44134
- var v = x2.value$2;
44135
- return v
44136
- } else {
44137
- throw new $c_s_MatchError().init___O(x1)
44138
- }
44139
- } catch (e) {
44140
- if ((e instanceof $c_jl_ClassCastException)) {
44141
- $as_jl_ClassCastException(e);
44142
- return null
44143
- } else {
44144
- throw e
44145
- }
44146
- }
44147
- });
44148
- $c_sc_convert_Wrappers$MapWrapper.prototype.init___sc_convert_Wrappers__sc_Map = (function($$outer, underlying) {
44149
- this.scala$collection$convert$Wrappers$MapWrapper$$underlying$f = underlying;
44150
- if (($$outer === null)) {
44151
- throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(null)
44152
- } else {
44153
- this.$$outer$2 = $$outer
44154
- };
44155
- return this
44156
- });
44157
- $c_sc_convert_Wrappers$MapWrapper.prototype.size__I = (function() {
44158
- return this.scala$collection$convert$Wrappers$MapWrapper$$underlying$f.size__I()
44159
- });
44160
- var $d_sc_convert_Wrappers$MapWrapper = new $TypeData().initClass({
44161
- sc_convert_Wrappers$MapWrapper: 0
44162
- }, false, "scala.collection.convert.Wrappers$MapWrapper", {
44163
- sc_convert_Wrappers$MapWrapper: 1,
44164
- ju_AbstractMap: 1,
44165
- O: 1,
44166
- ju_Map: 1,
44167
- s_Serializable: 1,
44168
- Ljava_io_Serializable: 1
44169
- });
44170
- $c_sc_convert_Wrappers$MapWrapper.prototype.$classData = $d_sc_convert_Wrappers$MapWrapper;
44171
- /** @constructor */
44172
43740
  function $c_scg_ImmutableSetFactory() {
44173
43741
  $c_scg_SetFactory.call(this)
44174
43742
  }
@@ -54780,41 +54348,6 @@ function $asArrayOf_sc_TraversableLike(obj, depth) {
54780
54348
  return (($isArrayOf_sc_TraversableLike(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lscala.collection.TraversableLike;", depth))
54781
54349
  }
54782
54350
  /** @constructor */
54783
- function $c_sc_convert_Wrappers$MapWrapper$$anon$2() {
54784
- $c_ju_AbstractSet.call(this);
54785
- this.$$outer$3 = null
54786
- }
54787
- $c_sc_convert_Wrappers$MapWrapper$$anon$2.prototype = new $h_ju_AbstractSet();
54788
- $c_sc_convert_Wrappers$MapWrapper$$anon$2.prototype.constructor = $c_sc_convert_Wrappers$MapWrapper$$anon$2;
54789
- /** @constructor */
54790
- function $h_sc_convert_Wrappers$MapWrapper$$anon$2() {
54791
- /*<skip>*/
54792
- }
54793
- $h_sc_convert_Wrappers$MapWrapper$$anon$2.prototype = $c_sc_convert_Wrappers$MapWrapper$$anon$2.prototype;
54794
- $c_sc_convert_Wrappers$MapWrapper$$anon$2.prototype.init___sc_convert_Wrappers$MapWrapper = (function($$outer) {
54795
- if (($$outer === null)) {
54796
- throw $m_sjsr_package$().unwrapJavaScriptException__jl_Throwable__O(null)
54797
- } else {
54798
- this.$$outer$3 = $$outer
54799
- };
54800
- return this
54801
- });
54802
- $c_sc_convert_Wrappers$MapWrapper$$anon$2.prototype.size__I = (function() {
54803
- return this.$$outer$3.size__I()
54804
- });
54805
- var $d_sc_convert_Wrappers$MapWrapper$$anon$2 = new $TypeData().initClass({
54806
- sc_convert_Wrappers$MapWrapper$$anon$2: 0
54807
- }, false, "scala.collection.convert.Wrappers$MapWrapper$$anon$2", {
54808
- sc_convert_Wrappers$MapWrapper$$anon$2: 1,
54809
- ju_AbstractSet: 1,
54810
- ju_AbstractCollection: 1,
54811
- O: 1,
54812
- ju_Collection: 1,
54813
- jl_Iterable: 1,
54814
- ju_Set: 1
54815
- });
54816
- $c_sc_convert_Wrappers$MapWrapper$$anon$2.prototype.$classData = $d_sc_convert_Wrappers$MapWrapper$$anon$2;
54817
- /** @constructor */
54818
54351
  function $c_scg_SeqFactory() {
54819
54352
  $c_scg_GenSeqFactory.call(this)
54820
54353
  }
@@ -93484,19 +93017,6 @@ $c_scm_WrappedArray.prototype.stringPrefix__T = (function() {
93484
93017
  return "WrappedArray"
93485
93018
  });
93486
93019
  /** @constructor */
93487
- function $c_sc_convert_Wrappers$JMapWrapper() {
93488
- /*<skip>*/
93489
- }
93490
- function $as_sc_convert_Wrappers$JMapWrapper(obj) {
93491
- return (((obj instanceof $c_sc_convert_Wrappers$JMapWrapper) || (obj === null)) ? obj : $throwClassCastException(obj, "scala.collection.convert.Wrappers$JMapWrapper"))
93492
- }
93493
- function $isArrayOf_sc_convert_Wrappers$JMapWrapper(obj, depth) {
93494
- return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.sc_convert_Wrappers$JMapWrapper)))
93495
- }
93496
- function $asArrayOf_sc_convert_Wrappers$JMapWrapper(obj, depth) {
93497
- return (($isArrayOf_sc_convert_Wrappers$JMapWrapper(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lscala.collection.convert.Wrappers$JMapWrapper;", depth))
93498
- }
93499
- /** @constructor */
93500
93020
  function $c_scm_ArraySeq() {
93501
93021
  $c_scm_AbstractSeq.call(this);
93502
93022
  this.length$5 = 0;
@@ -96361,4 +95881,3 @@ $e.io.kaitai.struct.MainJs = $m_Lio_kaitai_struct_MainJs$;
96361
95881
  return exports.io.kaitai.struct.MainJs;
96362
95882
 
96363
95883
  }));
96364
-
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "scripts": {
36
36
  "test": "echo \"Error: no test specified\" && exit 1"
37
37
  },
38
- "version": "0.10.0-SNAPSHOT20220702.153738.54691da3"
38
+ "version": "0.10.0"
39
39
  }