@loaders.gl/loader-utils 3.1.0-alpha.2 → 3.1.0-beta.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.
Files changed (199) hide show
  1. package/dist/es5/index.js +323 -0
  2. package/dist/es5/index.js.map +1 -0
  3. package/dist/es5/json-loader.js +29 -0
  4. package/dist/es5/json-loader.js.map +1 -0
  5. package/dist/es5/lib/binary-utils/array-buffer-utils.js +102 -0
  6. package/dist/es5/lib/binary-utils/array-buffer-utils.js.map +1 -0
  7. package/dist/es5/lib/binary-utils/binary-copy-utils.js +35 -0
  8. package/dist/es5/lib/binary-utils/binary-copy-utils.js.map +1 -0
  9. package/dist/es5/lib/binary-utils/buffer-utils.js +32 -0
  10. package/dist/es5/lib/binary-utils/buffer-utils.js.map +1 -0
  11. package/dist/es5/lib/binary-utils/encode-utils.js +42 -0
  12. package/dist/es5/lib/binary-utils/encode-utils.js.map +1 -0
  13. package/dist/es5/lib/binary-utils/get-first-characters.js +36 -0
  14. package/dist/es5/lib/binary-utils/get-first-characters.js.map +1 -0
  15. package/dist/es5/lib/binary-utils/memory-copy-utils.js +39 -0
  16. package/dist/es5/lib/binary-utils/memory-copy-utils.js.map +1 -0
  17. package/dist/es5/lib/env-utils/assert.js +13 -0
  18. package/dist/es5/lib/env-utils/assert.js.map +1 -0
  19. package/dist/es5/lib/env-utils/globals.js +28 -0
  20. package/dist/es5/lib/env-utils/globals.js.map +1 -0
  21. package/dist/es5/lib/filesystems/node-filesystem.js +74 -0
  22. package/dist/es5/lib/filesystems/node-filesystem.js.map +1 -0
  23. package/dist/es5/lib/iterators/async-iteration.js +51 -0
  24. package/dist/es5/lib/iterators/async-iteration.js.map +1 -0
  25. package/dist/es5/lib/iterators/text-iterators.js +59 -0
  26. package/dist/es5/lib/iterators/text-iterators.js.map +1 -0
  27. package/dist/es5/lib/node/buffer.js +38 -0
  28. package/dist/es5/lib/node/buffer.js.map +1 -0
  29. package/dist/es5/lib/node/fs.js +52 -0
  30. package/dist/es5/lib/node/fs.js.map +1 -0
  31. package/dist/es5/lib/node/util.js +16 -0
  32. package/dist/es5/lib/node/util.js.map +1 -0
  33. package/dist/es5/lib/parser-utils/parse-json.js +17 -0
  34. package/dist/es5/lib/parser-utils/parse-json.js.map +1 -0
  35. package/dist/es5/lib/path-utils/file-aliases.js +39 -0
  36. package/dist/es5/lib/path-utils/file-aliases.js.map +1 -0
  37. package/dist/es5/lib/path-utils/path.js +35 -0
  38. package/dist/es5/lib/path-utils/path.js.map +1 -0
  39. package/dist/es5/lib/request-utils/request-scheduler.js +154 -0
  40. package/dist/es5/lib/request-utils/request-scheduler.js.map +1 -0
  41. package/dist/es5/lib/worker-loader-utils/create-loader-worker.js +117 -0
  42. package/dist/es5/lib/worker-loader-utils/create-loader-worker.js.map +1 -0
  43. package/dist/es5/lib/worker-loader-utils/parse-with-worker.js +76 -0
  44. package/dist/es5/lib/worker-loader-utils/parse-with-worker.js.map +1 -0
  45. package/dist/es5/types.js +2 -0
  46. package/dist/{types.js.map → es5/types.js.map} +0 -0
  47. package/dist/es5/workers/json-worker.js +8 -0
  48. package/dist/es5/workers/json-worker.js.map +1 -0
  49. package/dist/esm/index.js +26 -0
  50. package/dist/esm/index.js.map +1 -0
  51. package/dist/esm/json-loader.js +21 -0
  52. package/dist/esm/json-loader.js.map +1 -0
  53. package/dist/esm/lib/binary-utils/array-buffer-utils.js +86 -0
  54. package/dist/esm/lib/binary-utils/array-buffer-utils.js.map +1 -0
  55. package/dist/esm/lib/binary-utils/binary-copy-utils.js +25 -0
  56. package/dist/esm/lib/binary-utils/binary-copy-utils.js.map +1 -0
  57. package/dist/esm/lib/binary-utils/buffer-utils.js +16 -0
  58. package/dist/esm/lib/binary-utils/buffer-utils.js.map +1 -0
  59. package/dist/esm/lib/binary-utils/encode-utils.js +31 -0
  60. package/dist/esm/lib/binary-utils/encode-utils.js.map +1 -0
  61. package/dist/esm/lib/binary-utils/get-first-characters.js +27 -0
  62. package/dist/esm/lib/binary-utils/get-first-characters.js.map +1 -0
  63. package/dist/esm/lib/binary-utils/memory-copy-utils.js +27 -0
  64. package/dist/esm/lib/binary-utils/memory-copy-utils.js.map +1 -0
  65. package/dist/esm/lib/env-utils/assert.js +6 -0
  66. package/dist/esm/lib/env-utils/assert.js.map +1 -0
  67. package/dist/esm/lib/env-utils/globals.js +16 -0
  68. package/dist/esm/lib/env-utils/globals.js.map +1 -0
  69. package/dist/esm/lib/filesystems/node-filesystem.js +60 -0
  70. package/dist/esm/lib/filesystems/node-filesystem.js.map +1 -0
  71. package/dist/esm/lib/iterators/async-iteration.js +39 -0
  72. package/dist/esm/lib/iterators/async-iteration.js.map +1 -0
  73. package/dist/esm/lib/iterators/text-iterators.js +46 -0
  74. package/dist/esm/lib/iterators/text-iterators.js.map +1 -0
  75. package/dist/{lib/node/buffer-utils.node.js → esm/lib/node/buffer.js} +1 -1
  76. package/dist/esm/lib/node/buffer.js.map +1 -0
  77. package/dist/esm/lib/node/fs.js +27 -0
  78. package/dist/esm/lib/node/fs.js.map +1 -0
  79. package/dist/esm/lib/node/util.js +3 -0
  80. package/dist/esm/lib/node/util.js.map +1 -0
  81. package/dist/esm/lib/parser-utils/parse-json.js +9 -0
  82. package/dist/esm/lib/parser-utils/parse-json.js.map +1 -0
  83. package/dist/esm/lib/path-utils/file-aliases.js +26 -0
  84. package/dist/esm/lib/path-utils/file-aliases.js.map +1 -0
  85. package/dist/esm/lib/path-utils/path.js +24 -0
  86. package/dist/esm/lib/path-utils/path.js.map +1 -0
  87. package/dist/esm/lib/request-utils/request-scheduler.js +146 -0
  88. package/dist/esm/lib/request-utils/request-scheduler.js.map +1 -0
  89. package/dist/esm/lib/worker-loader-utils/create-loader-worker.js +102 -0
  90. package/dist/esm/lib/worker-loader-utils/create-loader-worker.js.map +1 -0
  91. package/dist/esm/lib/worker-loader-utils/parse-with-worker.js +64 -0
  92. package/dist/esm/lib/worker-loader-utils/parse-with-worker.js.map +1 -0
  93. package/dist/esm/types.js +2 -0
  94. package/dist/esm/types.js.map +1 -0
  95. package/dist/esm/workers/json-worker.js +4 -0
  96. package/dist/esm/workers/json-worker.js.map +1 -0
  97. package/dist/index.d.ts +27 -0
  98. package/dist/index.d.ts.map +1 -0
  99. package/dist/index.js +111 -22
  100. package/dist/json-loader.d.ts +22 -0
  101. package/dist/json-loader.d.ts.map +1 -0
  102. package/dist/json-loader.js +25 -18
  103. package/dist/lib/binary-utils/array-buffer-utils.d.ts +31 -0
  104. package/dist/lib/binary-utils/array-buffer-utils.d.ts.map +1 -0
  105. package/dist/lib/binary-utils/array-buffer-utils.js +108 -79
  106. package/dist/lib/binary-utils/binary-copy-utils.d.ts +24 -0
  107. package/dist/lib/binary-utils/binary-copy-utils.d.ts.map +1 -0
  108. package/dist/lib/binary-utils/binary-copy-utils.js +48 -22
  109. package/dist/lib/binary-utils/buffer-utils.d.ts +16 -0
  110. package/dist/lib/binary-utils/buffer-utils.d.ts.map +1 -0
  111. package/dist/lib/binary-utils/buffer-utils.js +47 -13
  112. package/dist/lib/binary-utils/encode-utils.d.ts +4 -0
  113. package/dist/lib/binary-utils/encode-utils.d.ts.map +1 -0
  114. package/dist/lib/binary-utils/encode-utils.js +30 -26
  115. package/dist/lib/binary-utils/get-first-characters.d.ts +3 -0
  116. package/dist/lib/binary-utils/get-first-characters.d.ts.map +1 -0
  117. package/dist/lib/binary-utils/get-first-characters.js +28 -25
  118. package/dist/lib/binary-utils/memory-copy-utils.d.ts +25 -0
  119. package/dist/lib/binary-utils/memory-copy-utils.d.ts.map +1 -0
  120. package/dist/lib/binary-utils/memory-copy-utils.js +58 -24
  121. package/dist/lib/env-utils/assert.d.ts +6 -0
  122. package/dist/lib/env-utils/assert.d.ts.map +1 -0
  123. package/dist/lib/env-utils/assert.js +12 -5
  124. package/dist/lib/env-utils/globals.d.ts +15 -0
  125. package/dist/lib/env-utils/globals.d.ts.map +1 -0
  126. package/dist/lib/env-utils/globals.js +23 -9
  127. package/dist/lib/filesystems/node-filesystem.d.ts +38 -0
  128. package/dist/lib/filesystems/node-filesystem.d.ts.map +1 -0
  129. package/dist/lib/filesystems/node-filesystem.js +69 -0
  130. package/dist/lib/iterators/async-iteration.d.ts +20 -0
  131. package/dist/lib/iterators/async-iteration.d.ts.map +1 -0
  132. package/dist/lib/iterators/async-iteration.js +49 -35
  133. package/dist/lib/iterators/text-iterators.d.ts +19 -0
  134. package/dist/lib/iterators/text-iterators.d.ts.map +1 -0
  135. package/dist/lib/iterators/text-iterators.js +56 -41
  136. package/dist/lib/node/buffer.d.ts +10 -0
  137. package/dist/lib/node/buffer.d.ts.map +1 -0
  138. package/dist/lib/node/buffer.js +36 -0
  139. package/dist/lib/node/fs.d.ts +26 -0
  140. package/dist/lib/node/fs.d.ts.map +1 -0
  141. package/dist/lib/node/fs.js +40 -27
  142. package/dist/lib/node/util.d.ts +5 -0
  143. package/dist/lib/node/util.d.ts.map +1 -0
  144. package/dist/lib/node/util.js +25 -0
  145. package/dist/lib/parser-utils/parse-json.d.ts +5 -0
  146. package/dist/lib/parser-utils/parse-json.d.ts.map +1 -0
  147. package/dist/lib/parser-utils/parse-json.js +15 -8
  148. package/dist/lib/path-utils/file-aliases.d.ts +17 -0
  149. package/dist/lib/path-utils/file-aliases.d.ts.map +1 -0
  150. package/dist/lib/path-utils/file-aliases.js +40 -19
  151. package/dist/lib/path-utils/path.d.ts +16 -0
  152. package/dist/lib/path-utils/path.d.ts.map +1 -0
  153. package/dist/lib/path-utils/path.js +38 -18
  154. package/dist/lib/request-utils/request-scheduler.d.ts +62 -0
  155. package/dist/lib/request-utils/request-scheduler.d.ts.map +1 -0
  156. package/dist/lib/request-utils/request-scheduler.js +127 -131
  157. package/dist/lib/worker-loader-utils/create-loader-worker.d.ts +7 -0
  158. package/dist/lib/worker-loader-utils/create-loader-worker.d.ts.map +1 -0
  159. package/dist/lib/worker-loader-utils/create-loader-worker.js +91 -96
  160. package/dist/lib/worker-loader-utils/parse-with-worker.d.ts +15 -0
  161. package/dist/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -0
  162. package/dist/lib/worker-loader-utils/parse-with-worker.js +69 -60
  163. package/dist/types.d.ts +207 -0
  164. package/dist/types.d.ts.map +1 -0
  165. package/dist/types.js +3 -2
  166. package/dist/workers/json-worker.d.ts +2 -0
  167. package/dist/workers/json-worker.d.ts.map +1 -0
  168. package/dist/workers/json-worker.js +5 -4
  169. package/package.json +15 -14
  170. package/src/index.ts +26 -8
  171. package/src/lib/binary-utils/buffer-utils.ts +1 -1
  172. package/src/lib/env-utils/globals.ts +1 -1
  173. package/src/lib/filesystems/node-filesystem.ts +79 -0
  174. package/src/lib/node/{buffer-utils.node.ts → buffer.ts} +0 -0
  175. package/src/lib/node/fs.ts +29 -13
  176. package/src/lib/node/util.ts +4 -0
  177. package/src/lib/path-utils/path.ts +9 -0
  178. package/src/lib/worker-loader-utils/parse-with-worker.ts +6 -5
  179. package/dist/index.js.map +0 -1
  180. package/dist/json-loader.js.map +0 -1
  181. package/dist/lib/binary-utils/array-buffer-utils.js.map +0 -1
  182. package/dist/lib/binary-utils/binary-copy-utils.js.map +0 -1
  183. package/dist/lib/binary-utils/buffer-utils.js.map +0 -1
  184. package/dist/lib/binary-utils/encode-utils.js.map +0 -1
  185. package/dist/lib/binary-utils/get-first-characters.js.map +0 -1
  186. package/dist/lib/binary-utils/memory-copy-utils.js.map +0 -1
  187. package/dist/lib/env-utils/assert.js.map +0 -1
  188. package/dist/lib/env-utils/globals.js.map +0 -1
  189. package/dist/lib/iterators/async-iteration.js.map +0 -1
  190. package/dist/lib/iterators/text-iterators.js.map +0 -1
  191. package/dist/lib/node/buffer-utils.node.js.map +0 -1
  192. package/dist/lib/node/fs.js.map +0 -1
  193. package/dist/lib/parser-utils/parse-json.js.map +0 -1
  194. package/dist/lib/path-utils/file-aliases.js.map +0 -1
  195. package/dist/lib/path-utils/path.js.map +0 -1
  196. package/dist/lib/request-utils/request-scheduler.js.map +0 -1
  197. package/dist/lib/worker-loader-utils/create-loader-worker.js.map +0 -1
  198. package/dist/lib/worker-loader-utils/parse-with-worker.js.map +0 -1
  199. package/dist/workers/json-worker.js.map +0 -1
@@ -1,27 +1,61 @@
1
- import { assert } from '../env-utils/assert';
2
- export function padToNBytes(byteLength, padding) {
3
- assert(byteLength >= 0);
4
- assert(padding > 0);
5
- return byteLength + (padding - 1) & ~(padding - 1);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.copyToArray = exports.copyArrayBuffer = exports.padToNBytes = void 0;
4
+ const assert_1 = require("../env-utils/assert");
5
+ /**
6
+ * Calculate new size of an arrayBuffer to be aligned to an n-byte boundary
7
+ * This function increases `byteLength` by the minimum delta,
8
+ * allowing the total length to be divided by `padding`
9
+ * @param byteLength
10
+ * @param padding
11
+ */
12
+ function padToNBytes(byteLength, padding) {
13
+ (0, assert_1.assert)(byteLength >= 0); // `Incorrect 'byteLength' value: ${byteLength}`
14
+ (0, assert_1.assert)(padding > 0); // `Incorrect 'padding' value: ${padding}`
15
+ return (byteLength + (padding - 1)) & ~(padding - 1);
6
16
  }
7
- export function copyArrayBuffer(targetBuffer, sourceBuffer, byteOffset, byteLength = sourceBuffer.byteLength) {
8
- const targetArray = new Uint8Array(targetBuffer, byteOffset, byteLength);
9
- const sourceArray = new Uint8Array(sourceBuffer);
10
- targetArray.set(sourceArray);
11
- return targetBuffer;
17
+ exports.padToNBytes = padToNBytes;
18
+ /**
19
+ * Creates a new Uint8Array based on two different ArrayBuffers
20
+ * @param targetBuffer The first buffer.
21
+ * @param sourceBuffer The second buffer.
22
+ * @return The new ArrayBuffer created out of the two.
23
+ */
24
+ function copyArrayBuffer(targetBuffer, sourceBuffer, byteOffset, byteLength = sourceBuffer.byteLength) {
25
+ const targetArray = new Uint8Array(targetBuffer, byteOffset, byteLength);
26
+ const sourceArray = new Uint8Array(sourceBuffer);
27
+ targetArray.set(sourceArray);
28
+ return targetBuffer;
12
29
  }
13
- export function copyToArray(source, target, targetOffset) {
14
- let sourceArray;
15
-
16
- if (source instanceof ArrayBuffer) {
17
- sourceArray = new Uint8Array(source);
18
- } else {
19
- const srcByteOffset = source.byteOffset;
20
- const srcByteLength = source.byteLength;
21
- sourceArray = new Uint8Array(source.buffer || source.arrayBuffer, srcByteOffset, srcByteLength);
22
- }
23
-
24
- target.set(sourceArray, targetOffset);
25
- return targetOffset + padToNBytes(sourceArray.byteLength, 4);
30
+ exports.copyArrayBuffer = copyArrayBuffer;
31
+ /**
32
+ * Copy from source to target at the targetOffset
33
+ *
34
+ * @param source - The data to copy
35
+ * @param target - The destination to copy data into
36
+ * @param targetOffset - The start offset into target to place the copied data
37
+ * @returns the new offset taking into account proper padding
38
+ */
39
+ function copyToArray(source, target, targetOffset) {
40
+ let sourceArray;
41
+ if (source instanceof ArrayBuffer) {
42
+ sourceArray = new Uint8Array(source);
43
+ }
44
+ else {
45
+ // Pack buffer onto the big target array
46
+ //
47
+ // 'source.data.buffer' could be a view onto a larger buffer.
48
+ // We MUST use this constructor to ensure the byteOffset and byteLength is
49
+ // set to correct values from 'source.data' and not the underlying
50
+ // buffer for target.set() to work properly.
51
+ const srcByteOffset = source.byteOffset;
52
+ const srcByteLength = source.byteLength;
53
+ // In gltf parser it is set as "arrayBuffer" instead of "buffer"
54
+ // https://github.com/visgl/loaders.gl/blob/1e3a82a0a65d7b6a67b1e60633453e5edda2960a/modules/gltf/src/lib/parse-gltf.js#L85
55
+ sourceArray = new Uint8Array(source.buffer || source.arrayBuffer, srcByteOffset, srcByteLength);
56
+ }
57
+ // Pack buffer onto the big target array
58
+ target.set(sourceArray, targetOffset);
59
+ return targetOffset + padToNBytes(sourceArray.byteLength, 4);
26
60
  }
27
- //# sourceMappingURL=memory-copy-utils.js.map
61
+ exports.copyToArray = copyToArray;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Throws an `Error` with the optional `message` if `condition` is falsy
3
+ * @note Replacement for the external assert method to reduce bundle size
4
+ */
5
+ export declare function assert(condition: any, message?: string): void;
6
+ //# sourceMappingURL=assert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../src/lib/env-utils/assert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAI7D"}
@@ -1,6 +1,13 @@
1
- export function assert(condition, message) {
2
- if (!condition) {
3
- throw new Error(message || 'loader assertion failed.');
4
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assert = void 0;
4
+ /**
5
+ * Throws an `Error` with the optional `message` if `condition` is falsy
6
+ * @note Replacement for the external assert method to reduce bundle size
7
+ */
8
+ function assert(condition, message) {
9
+ if (!condition) {
10
+ throw new Error(message || 'loader assertion failed.');
11
+ }
5
12
  }
6
- //# sourceMappingURL=assert.js.map
13
+ exports.assert = assert;
@@ -0,0 +1,15 @@
1
+ declare type obj = {
2
+ [key: string]: any;
3
+ };
4
+ declare const self_: obj;
5
+ declare const window_: obj;
6
+ declare const global_: obj;
7
+ declare const document_: obj;
8
+ export { self_ as self, window_ as window, global_ as global, document_ as document };
9
+ /** true if running in a browser */
10
+ export declare const isBrowser: boolean;
11
+ /** true if running in a worker thread */
12
+ export declare const isWorker: boolean;
13
+ /** Major Node version (as a number) */
14
+ export declare const nodeVersion: number;
15
+ //# sourceMappingURL=globals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/lib/env-utils/globals.ts"],"names":[],"mappings":"AAWA,aAAK,GAAG,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAC;AAChC,QAAA,MAAM,KAAK,EAAE,GAA4D,CAAC;AAC1E,QAAA,MAAM,OAAO,EAAE,GAA4D,CAAC;AAC5E,QAAA,MAAM,OAAO,EAAE,GAA4D,CAAC;AAC5E,QAAA,MAAM,SAAS,EAAE,GAA4B,CAAC;AAE9C,OAAO,EAAC,KAAK,IAAI,IAAI,EAAE,OAAO,IAAI,MAAM,EAAE,OAAO,IAAI,MAAM,EAAE,SAAS,IAAI,QAAQ,EAAC,CAAC;AAEpF,mCAAmC;AACnC,eAAO,MAAM,SAAS,EAAE,OAE2E,CAAC;AAEpG,yCAAyC;AACzC,eAAO,MAAM,QAAQ,EAAE,OAA6C,CAAC;AAKrE,uCAAuC;AACvC,eAAO,MAAM,WAAW,EAAE,MAAiD,CAAC"}
@@ -1,16 +1,30 @@
1
+ "use strict";
2
+ // Purpose: include this in your module to avoid
3
+ // dependencies on micro modules like 'global' and 'is-browser';
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.nodeVersion = exports.isWorker = exports.isBrowser = exports.document = exports.global = exports.window = exports.self = void 0;
6
+ /* eslint-disable no-restricted-globals */
1
7
  const globals = {
2
- self: typeof self !== 'undefined' && self,
3
- window: typeof window !== 'undefined' && window,
4
- global: typeof global !== 'undefined' && global,
5
- document: typeof document !== 'undefined' && document
8
+ self: typeof self !== 'undefined' && self,
9
+ window: typeof window !== 'undefined' && window,
10
+ global: typeof global !== 'undefined' && global,
11
+ document: typeof document !== 'undefined' && document
6
12
  };
7
13
  const self_ = globals.self || globals.window || globals.global || {};
14
+ exports.self = self_;
8
15
  const window_ = globals.window || globals.self || globals.global || {};
16
+ exports.window = window_;
9
17
  const global_ = globals.global || globals.self || globals.window || {};
18
+ exports.global = global_;
10
19
  const document_ = globals.document || {};
11
- export { self_ as self, window_ as window, global_ as global, document_ as document };
12
- export const isBrowser = typeof process !== 'object' || String(process) !== '[object process]' || process.browser;
13
- export const isWorker = typeof importScripts === 'function';
20
+ exports.document = document_;
21
+ /** true if running in a browser */
22
+ exports.isBrowser =
23
+ // @ts-ignore process does not exist on browser
24
+ Boolean(typeof process !== 'object' || String(process) !== '[object process]' || process.browser);
25
+ /** true if running in a worker thread */
26
+ exports.isWorker = typeof importScripts === 'function';
27
+ // Extract node major version
14
28
  const matches = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
15
- export const nodeVersion = matches && parseFloat(matches[1]) || 0;
16
- //# sourceMappingURL=globals.js.map
29
+ /** Major Node version (as a number) */
30
+ exports.nodeVersion = (matches && parseFloat(matches[1])) || 0;
@@ -0,0 +1,38 @@
1
+ /// <reference types="node" />
2
+ import * as fs from '../node/fs';
3
+ import { IFileSystem, IRandomAccessReadFileSystem } from '../../types';
4
+ declare type Stat = {
5
+ size: number;
6
+ isDirectory: () => boolean;
7
+ info?: fs.Stats;
8
+ };
9
+ declare type ReadOptions = {
10
+ buffer?: Buffer;
11
+ offset?: number;
12
+ length?: number;
13
+ position?: number;
14
+ };
15
+ /**
16
+ * FileSystem pass-through for Node.js
17
+ * Compatible with BrowserFileSystem.
18
+ * @param options
19
+ */
20
+ export default class NodeFileSystem implements IFileSystem, IRandomAccessReadFileSystem {
21
+ constructor(options: {
22
+ [key: string]: any;
23
+ });
24
+ readdir(dirname?: string, options?: {}): Promise<any[]>;
25
+ stat(path: string, options?: {}): Promise<Stat>;
26
+ fetch(path: string, options: {
27
+ [key: string]: any;
28
+ }): Promise<any>;
29
+ open(path: string, flags: string | number, mode?: any): Promise<number>;
30
+ close(fd: number): Promise<void>;
31
+ fstat(fd: number): Promise<Stat>;
32
+ read(fd: number, { buffer, offset, length, position }: ReadOptions): Promise<{
33
+ bytesRead: number;
34
+ buffer: Buffer;
35
+ }>;
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=node-filesystem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-filesystem.d.ts","sourceRoot":"","sources":["../../../src/lib/filesystems/node-filesystem.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,WAAW,EAAE,2BAA2B,EAAC,MAAM,aAAa,CAAC;AAIrE,aAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;CACjB,CAAC;AAEF,aAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,WAAW,EAAE,2BAA2B;gBAEzE,OAAO,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC;IAInC,OAAO,CAAC,OAAO,SAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAIpD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/C,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC;IAQjD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAIvE,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhC,IAAI,CACR,EAAE,EAAE,MAAM,EAEV,EAAC,MAAa,EAAE,MAAU,EAAE,MAA0B,EAAE,QAAe,EAAC,EAAE,WAAW,GACpF,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;CAehD"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const fs = __importStar(require("../node/fs"));
23
+ /**
24
+ * FileSystem pass-through for Node.js
25
+ * Compatible with BrowserFileSystem.
26
+ * @param options
27
+ */
28
+ class NodeFileSystem {
29
+ // implements IFileSystem
30
+ constructor(options) {
31
+ this.fetch = options._fetch;
32
+ }
33
+ async readdir(dirname = '.', options) {
34
+ return await fs.readdir(dirname, options);
35
+ }
36
+ async stat(path, options) {
37
+ const info = await fs.stat(path, options);
38
+ return { size: Number(info.size), isDirectory: () => false, info };
39
+ }
40
+ async fetch(path, options) {
41
+ // Falls back to handle https:/http:/data: etc fetches
42
+ // eslint-disable-next-line
43
+ const fallbackFetch = options.fetch || this.fetch;
44
+ return fallbackFetch(path, options);
45
+ }
46
+ // implements IRandomAccessFileSystem
47
+ async open(path, flags, mode) {
48
+ return await fs.open(path, flags);
49
+ }
50
+ async close(fd) {
51
+ return await fs.close(fd);
52
+ }
53
+ async fstat(fd) {
54
+ const info = await fs.fstat(fd);
55
+ return info;
56
+ }
57
+ async read(fd,
58
+ // @ts-ignore Possibly null
59
+ { buffer = null, offset = 0, length = buffer.byteLength, position = null }) {
60
+ let totalBytesRead = 0;
61
+ // Read in loop until we get required number of bytes
62
+ while (totalBytesRead < length) {
63
+ const { bytesRead } = await fs.read(fd, buffer, offset + totalBytesRead, length - totalBytesRead, position + totalBytesRead);
64
+ totalBytesRead += bytesRead;
65
+ }
66
+ return { bytesRead: totalBytesRead, buffer };
67
+ }
68
+ }
69
+ exports.default = NodeFileSystem;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Iterate over async iterator, without resetting iterator if end is not reached
3
+ * - forEach intentionally does not reset iterator if exiting loop prematurely
4
+ * so that iteration can continue in a second loop
5
+ * - It is recommended to use a standard for-await as last loop to ensure
6
+ * iterator gets properly reset
7
+ *
8
+ * TODO - optimize using sync iteration if argument is an Iterable?
9
+ *
10
+ * @param iterator
11
+ * @param visitor
12
+ */
13
+ export declare function forEach(iterator: any, visitor: any): Promise<void>;
14
+ /**
15
+ * Concatenates all data chunks yielded by an (async) iterator
16
+ * This function can e.g. be used to enable atomic parsers to work on (async) iterator inputs
17
+ */
18
+ export declare function concatenateArrayBuffersAsync(asyncIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>): Promise<ArrayBuffer>;
19
+ export declare function concatenateStringsAsync(asyncIterator: AsyncIterable<string> | Iterable<string>): Promise<string>;
20
+ //# sourceMappingURL=async-iteration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-iteration.d.ts","sourceRoot":"","sources":["../../../src/lib/iterators/async-iteration.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAsB,OAAO,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAA,iBAa9C;AAID;;;GAGG;AAEH,wBAAsB,4BAA4B,CAChD,aAAa,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,GAChE,OAAO,CAAC,WAAW,CAAC,CAMtB;AAED,wBAAsB,uBAAuB,CAC3C,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,GACtD,OAAO,CAAC,MAAM,CAAC,CAMjB"}
@@ -1,39 +1,53 @@
1
- import { concatenateArrayBuffers } from '../binary-utils/array-buffer-utils';
2
- export async function forEach(iterator, visitor) {
3
- while (true) {
4
- const {
5
- done,
6
- value
7
- } = await iterator.next();
8
-
9
- if (done) {
10
- iterator.return();
11
- return;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.concatenateStringsAsync = exports.concatenateArrayBuffersAsync = exports.forEach = void 0;
4
+ const array_buffer_utils_1 = require("../binary-utils/array-buffer-utils");
5
+ // GENERAL UTILITIES
6
+ /**
7
+ * Iterate over async iterator, without resetting iterator if end is not reached
8
+ * - forEach intentionally does not reset iterator if exiting loop prematurely
9
+ * so that iteration can continue in a second loop
10
+ * - It is recommended to use a standard for-await as last loop to ensure
11
+ * iterator gets properly reset
12
+ *
13
+ * TODO - optimize using sync iteration if argument is an Iterable?
14
+ *
15
+ * @param iterator
16
+ * @param visitor
17
+ */
18
+ async function forEach(iterator, visitor) {
19
+ // eslint-disable-next-line
20
+ while (true) {
21
+ const { done, value } = await iterator.next();
22
+ if (done) {
23
+ iterator.return();
24
+ return;
25
+ }
26
+ const cancel = visitor(value);
27
+ if (cancel) {
28
+ return;
29
+ }
12
30
  }
13
-
14
- const cancel = visitor(value);
15
-
16
- if (cancel) {
17
- return;
18
- }
19
- }
20
31
  }
21
- export async function concatenateArrayBuffersAsync(asyncIterator) {
22
- const arrayBuffers = [];
23
-
24
- for await (const chunk of asyncIterator) {
25
- arrayBuffers.push(chunk);
26
- }
27
-
28
- return concatenateArrayBuffers(...arrayBuffers);
32
+ exports.forEach = forEach;
33
+ // Breaking big data into iterable chunks, concatenating iterable chunks into big data objects
34
+ /**
35
+ * Concatenates all data chunks yielded by an (async) iterator
36
+ * This function can e.g. be used to enable atomic parsers to work on (async) iterator inputs
37
+ */
38
+ async function concatenateArrayBuffersAsync(asyncIterator) {
39
+ const arrayBuffers = [];
40
+ for await (const chunk of asyncIterator) {
41
+ arrayBuffers.push(chunk);
42
+ }
43
+ return (0, array_buffer_utils_1.concatenateArrayBuffers)(...arrayBuffers);
29
44
  }
30
- export async function concatenateStringsAsync(asyncIterator) {
31
- const strings = [];
32
-
33
- for await (const chunk of asyncIterator) {
34
- strings.push(chunk);
35
- }
36
-
37
- return strings.join('');
45
+ exports.concatenateArrayBuffersAsync = concatenateArrayBuffersAsync;
46
+ async function concatenateStringsAsync(asyncIterator) {
47
+ const strings = [];
48
+ for await (const chunk of asyncIterator) {
49
+ strings.push(chunk);
50
+ }
51
+ return strings.join('');
38
52
  }
39
- //# sourceMappingURL=async-iteration.js.map
53
+ exports.concatenateStringsAsync = concatenateStringsAsync;
@@ -0,0 +1,19 @@
1
+ export declare function makeTextDecoderIterator(arrayBufferIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>, options?: TextDecoderOptions): AsyncIterable<string>;
2
+ export declare function makeTextEncoderIterator(textIterator: AsyncIterable<string> | Iterable<ArrayBuffer>): AsyncIterable<ArrayBuffer>;
3
+ /**
4
+ * @param textIterator async iterable yielding strings
5
+ * @returns an async iterable over lines
6
+ * See http://2ality.com/2018/04/async-iter-nodejs.html
7
+ */
8
+ export declare function makeLineIterator(textIterator: AsyncIterable<string>): AsyncIterable<string>;
9
+ /**
10
+ * @param lineIterator async iterable yielding lines
11
+ * @returns async iterable yielding numbered lines
12
+ *
13
+ * See http://2ality.com/2018/04/async-iter-nodejs.html
14
+ */
15
+ export declare function makeNumberedLineIterator(lineIterator: AsyncIterable<string>): AsyncIterable<{
16
+ counter: number;
17
+ line: string;
18
+ }>;
19
+ //# sourceMappingURL=text-iterators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-iterators.d.ts","sourceRoot":"","sources":["../../../src/lib/iterators/text-iterators.ts"],"names":[],"mappings":"AAGA,wBAAuB,uBAAuB,CAC5C,mBAAmB,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,EACvE,OAAO,GAAE,kBAAuB,GAC/B,aAAa,CAAC,MAAM,CAAC,CAOvB;AAOD,wBAAuB,uBAAuB,CAC5C,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,GAC1D,aAAa,CAAC,WAAW,CAAC,CAK5B;AAED;;;;GAIG;AAEH,wBAAuB,gBAAgB,CACrC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,GAClC,aAAa,CAAC,MAAM,CAAC,CAgBvB;AAED;;;;;GAKG;AACH,wBAAuB,wBAAwB,CAC7C,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,GAClC,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAC,CAMhD"}
@@ -1,46 +1,61 @@
1
- export async function* makeTextDecoderIterator(arrayBufferIterator, options = {}) {
2
- const textDecoder = new TextDecoder(undefined, options);
3
-
4
- for await (const arrayBuffer of arrayBufferIterator) {
5
- yield typeof arrayBuffer === 'string' ? arrayBuffer : textDecoder.decode(arrayBuffer, {
6
- stream: true
7
- });
8
- }
1
+ "use strict";
2
+ // TextDecoder iterators
3
+ // TextDecoder will keep any partial undecoded bytes between calls to `decode`
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.makeNumberedLineIterator = exports.makeLineIterator = exports.makeTextEncoderIterator = exports.makeTextDecoderIterator = void 0;
6
+ async function* makeTextDecoderIterator(arrayBufferIterator, options = {}) {
7
+ const textDecoder = new TextDecoder(undefined, options);
8
+ for await (const arrayBuffer of arrayBufferIterator) {
9
+ yield typeof arrayBuffer === 'string'
10
+ ? arrayBuffer
11
+ : textDecoder.decode(arrayBuffer, { stream: true });
12
+ }
9
13
  }
10
- export async function* makeTextEncoderIterator(textIterator) {
11
- const textEncoder = new TextEncoder();
12
-
13
- for await (const text of textIterator) {
14
- yield typeof text === 'string' ? textEncoder.encode(text) : text;
15
- }
14
+ exports.makeTextDecoderIterator = makeTextDecoderIterator;
15
+ // TextEncoder iterator
16
+ // TODO - this is not useful unless min chunk size is given
17
+ // TextEncoder will keep any partial undecoded bytes between calls to `encode`
18
+ // If iterator does not yield strings, assume arrayBuffer and return unencoded
19
+ async function* makeTextEncoderIterator(textIterator) {
20
+ const textEncoder = new TextEncoder();
21
+ for await (const text of textIterator) {
22
+ yield typeof text === 'string' ? textEncoder.encode(text) : text;
23
+ }
16
24
  }
17
- export async function* makeLineIterator(textIterator) {
18
- let previous = '';
19
-
20
- for await (const textChunk of textIterator) {
21
- previous += textChunk;
22
- let eolIndex;
23
-
24
- while ((eolIndex = previous.indexOf('\n')) >= 0) {
25
- const line = previous.slice(0, eolIndex + 1);
26
- previous = previous.slice(eolIndex + 1);
27
- yield line;
25
+ exports.makeTextEncoderIterator = makeTextEncoderIterator;
26
+ /**
27
+ * @param textIterator async iterable yielding strings
28
+ * @returns an async iterable over lines
29
+ * See http://2ality.com/2018/04/async-iter-nodejs.html
30
+ */
31
+ async function* makeLineIterator(textIterator) {
32
+ let previous = '';
33
+ for await (const textChunk of textIterator) {
34
+ previous += textChunk;
35
+ let eolIndex;
36
+ while ((eolIndex = previous.indexOf('\n')) >= 0) {
37
+ // line includes the EOL
38
+ const line = previous.slice(0, eolIndex + 1);
39
+ previous = previous.slice(eolIndex + 1);
40
+ yield line;
41
+ }
42
+ }
43
+ if (previous.length > 0) {
44
+ yield previous;
28
45
  }
29
- }
30
-
31
- if (previous.length > 0) {
32
- yield previous;
33
- }
34
46
  }
35
- export async function* makeNumberedLineIterator(lineIterator) {
36
- let counter = 1;
37
-
38
- for await (const line of lineIterator) {
39
- yield {
40
- counter,
41
- line
42
- };
43
- counter++;
44
- }
47
+ exports.makeLineIterator = makeLineIterator;
48
+ /**
49
+ * @param lineIterator async iterable yielding lines
50
+ * @returns async iterable yielding numbered lines
51
+ *
52
+ * See http://2ality.com/2018/04/async-iter-nodejs.html
53
+ */
54
+ async function* makeNumberedLineIterator(lineIterator) {
55
+ let counter = 1;
56
+ for await (const line of lineIterator) {
57
+ yield { counter, line };
58
+ counter++;
59
+ }
45
60
  }
46
- //# sourceMappingURL=text-iterators.js.map
61
+ exports.makeNumberedLineIterator = makeNumberedLineIterator;
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Convert Buffer to ArrayBuffer
4
+ */
5
+ export declare function toArrayBuffer(buffer: any): any;
6
+ /**
7
+ * Convert (copy) ArrayBuffer to Buffer
8
+ */
9
+ export declare function toBuffer(binaryData: any): void | Buffer;
10
+ //# sourceMappingURL=buffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../src/lib/node/buffer.ts"],"names":[],"mappings":";AAKA;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,KAAA,OAOnC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,UAAU,KAAA,iBAelC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ // Isolates Buffer references to ensure they are only bundled under Node.js (avoids big webpack polyfill)
3
+ // this file is not visible to webpack (it is excluded in the package.json "browser" field).
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.toBuffer = exports.toArrayBuffer = void 0;
6
+ const assert_1 = require("../env-utils/assert");
7
+ /**
8
+ * Convert Buffer to ArrayBuffer
9
+ */
10
+ function toArrayBuffer(buffer) {
11
+ // TODO - per docs we should just be able to call buffer.buffer, but there are issues
12
+ if (Buffer.isBuffer(buffer)) {
13
+ const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
14
+ return typedArray.slice().buffer;
15
+ }
16
+ return buffer;
17
+ }
18
+ exports.toArrayBuffer = toArrayBuffer;
19
+ /**
20
+ * Convert (copy) ArrayBuffer to Buffer
21
+ */
22
+ function toBuffer(binaryData) {
23
+ if (ArrayBuffer.isView(binaryData)) {
24
+ binaryData = binaryData.buffer;
25
+ }
26
+ if (typeof Buffer !== 'undefined' && binaryData instanceof ArrayBuffer) {
27
+ const buffer = new Buffer(binaryData.byteLength);
28
+ const view = new Uint8Array(binaryData);
29
+ for (let i = 0; i < buffer.length; ++i) {
30
+ buffer[i] = view[i];
31
+ }
32
+ return buffer;
33
+ }
34
+ return (0, assert_1.assert)(false);
35
+ }
36
+ exports.toBuffer = toBuffer;
@@ -0,0 +1,26 @@
1
+ /// <reference types="node" />
2
+ import fs from 'fs';
3
+ export type { Stats } from 'fs';
4
+ /** Wrapper for Node.js fs method */
5
+ export declare const readdir: typeof fs.readdir.__promisify__;
6
+ /** Wrapper for Node.js fs method */
7
+ export declare const stat: typeof fs.stat.__promisify__;
8
+ /** Wrapper for Node.js fs method */
9
+ export declare const readFile: typeof fs.readFile.__promisify__;
10
+ /** Wrapper for Node.js fs method */
11
+ export declare const readFileSync: typeof fs.readFileSync;
12
+ /** Wrapper for Node.js fs method */
13
+ export declare const writeFile: typeof fs.writeFile.__promisify__;
14
+ /** Wrapper for Node.js fs method */
15
+ export declare const writeFileSync: typeof fs.writeFileSync;
16
+ /** Wrapper for Node.js fs method */
17
+ export declare const open: typeof fs.open.__promisify__;
18
+ /** Wrapper for Node.js fs method */
19
+ export declare const close: typeof fs.close.__promisify__;
20
+ /** Wrapper for Node.js fs method */
21
+ export declare const read: typeof fs.read.__promisify__;
22
+ /** Wrapper for Node.js fs method */
23
+ export declare const fstat: typeof fs.fstat.__promisify__;
24
+ export declare const isSupported: boolean;
25
+ export declare function _readToArrayBuffer(fd: number, start: number, length: number): Promise<any>;
26
+ //# sourceMappingURL=fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/lib/node/fs.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,IAAI,CAAC;AAIpB,YAAY,EAAC,KAAK,EAAC,MAAM,IAAI,CAAC;AAI9B,oCAAoC;AACpC,eAAO,MAAM,OAAO,iCAAwB,CAAC;AAC7C,oCAAoC;AACpC,eAAO,MAAM,IAAI,8BAAqB,CAAC;AAEvC,oCAAoC;AACpC,eAAO,MAAM,QAAQ,kCAAyB,CAAC;AAC/C,oCAAoC;AACpC,eAAO,MAAM,YAAY,wBAAkB,CAAC;AAC5C,oCAAoC;AACpC,eAAO,MAAM,SAAS,mCAA0B,CAAC;AACjD,oCAAoC;AACpC,eAAO,MAAM,aAAa,yBAAmB,CAAC;AAI9C,oCAAoC;AACpC,eAAO,MAAM,IAAI,8BAAqB,CAAC;AACvC,oCAAoC;AACpC,eAAO,MAAM,KAAK,+BAAsB,CAAC;AACzC,oCAAoC;AACpC,eAAO,MAAM,IAAI,8BAAqB,CAAC;AACvC,oCAAoC;AACpC,eAAO,MAAM,KAAK,+BAAsB,CAAC;AAEzC,eAAO,MAAM,WAAW,SAAc,CAAC;AAEvC,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAOjF"}