@qwik.dev/core 2.0.0-alpha.1 → 2.0.0-alpha.10

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 (105) hide show
  1. package/bindings/qwik.darwin-arm64.node +0 -0
  2. package/bindings/qwik.darwin-x64.node +0 -0
  3. package/bindings/qwik.linux-x64-gnu.node +0 -0
  4. package/bindings/qwik.wasm.cjs +259 -272
  5. package/bindings/qwik.wasm.mjs +259 -272
  6. package/bindings/qwik.win32-x64-msvc.node +0 -0
  7. package/bindings/qwik_wasm_bg.wasm +0 -0
  8. package/dist/build/index.cjs +3 -3
  9. package/dist/build/index.d.ts +22 -22
  10. package/dist/build/package.json +1 -1
  11. package/dist/cli.cjs +1453 -798
  12. package/dist/core-internal.d.ts +4368 -3895
  13. package/dist/core.cjs +6786 -6121
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.min.mjs +1 -1
  16. package/dist/core.mjs +6759 -6117
  17. package/dist/core.mjs.map +1 -1
  18. package/dist/core.prod.cjs +3568 -3206
  19. package/dist/core.prod.mjs +3916 -3586
  20. package/dist/insights/index.qwik.cjs +1 -751
  21. package/dist/insights/index.qwik.mjs +62 -741
  22. package/dist/insights/vite/index.cjs +1 -82
  23. package/dist/insights/vite/index.mjs +65 -37
  24. package/dist/insights/vite.d.ts +22 -0
  25. package/dist/{insights/insights.d.ts → insights.d.ts} +33 -22
  26. package/dist/loader/index.cjs +2 -2
  27. package/dist/loader/index.mjs +2 -2
  28. package/dist/loader/package.json +1 -1
  29. package/dist/optimizer.cjs +703 -5856
  30. package/dist/optimizer.d.ts +741 -707
  31. package/dist/optimizer.mjs +690 -6282
  32. package/dist/preloader.cjs +243 -0
  33. package/dist/preloader.mjs +183 -0
  34. package/dist/qwikloader.debug.js +211 -220
  35. package/dist/qwikloader.js +1 -3
  36. package/dist/server.cjs +1371 -7279
  37. package/dist/server.d.ts +467 -402
  38. package/dist/server.mjs +1339 -7230
  39. package/dist/starters/adapters/aws-lambda/serverless.yml +15 -0
  40. package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +0 -2
  41. package/dist/starters/adapters/azure-swa/public/staticwebapp.config.json +7 -0
  42. package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +1 -2
  43. package/dist/starters/adapters/bun/src/entry.bun.ts +3 -2
  44. package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +1 -3
  45. package/dist/starters/adapters/cloudflare-pages/public/_headers +2 -0
  46. package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +1 -2
  47. package/dist/starters/adapters/deno/src/entry.deno.ts +3 -2
  48. package/dist/starters/adapters/express/src/entry.express.tsx +5 -2
  49. package/dist/starters/adapters/fastify/src/entry.fastify.tsx +2 -1
  50. package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +11 -1
  51. package/dist/starters/adapters/firebase/firebase.json +12 -1
  52. package/dist/starters/adapters/firebase/functions/index.js +2 -3
  53. package/dist/starters/adapters/firebase/src/entry-firebase.tsx +1 -2
  54. package/dist/starters/adapters/netlify-edge/public/_headers +2 -0
  55. package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +1 -2
  56. package/dist/starters/adapters/node-server/src/entry.node-server.tsx +3 -2
  57. package/dist/starters/adapters/static/README.md +4 -0
  58. package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +1 -2
  59. package/dist/starters/adapters/vercel-edge/vercel.json +1 -1
  60. package/dist/starters/features/auth/package.json +3 -1
  61. package/dist/starters/features/bootstrap/src/routes/bootstrap/layout.tsx +0 -11
  62. package/dist/starters/features/cypress/package.json +1 -1
  63. package/dist/starters/features/drizzle/drizzle/schema.ts +6 -18
  64. package/dist/starters/features/drizzle/drizzle.config.ts +5 -4
  65. package/dist/starters/features/drizzle/package.json +16 -12
  66. package/dist/starters/features/localize/src/entry.ssr.tsx +0 -2
  67. package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +1 -1
  68. package/dist/starters/features/pandacss/package.json +1 -1
  69. package/dist/starters/features/partytown/package.json +1 -1
  70. package/dist/starters/features/postcss/package.json +4 -1
  71. package/dist/starters/features/postcss/postcss.config.js +1 -1
  72. package/dist/starters/features/prisma/package.json +3 -2
  73. package/dist/starters/features/react/package.json +1 -1
  74. package/dist/starters/features/service-worker/package.json +13 -0
  75. package/dist/starters/features/service-worker/src/routes/service-worker.ts +14 -0
  76. package/dist/starters/features/storybook/package.json +1 -1
  77. package/dist/starters/features/styled-vanilla-extract/package.json +4 -2
  78. package/dist/starters/features/tailwind/package.json +19 -9
  79. package/dist/starters/features/tailwind/src/global.css +1 -7
  80. package/dist/starters/features/tailwind-v3/package.json +21 -0
  81. package/dist/starters/features/{tailwind → tailwind-v3}/postcss.config.cjs +1 -1
  82. package/dist/starters/features/tailwind-v3/src/global.css +7 -0
  83. package/dist/starters/features/{tailwind → tailwind-v3}/tailwind.config.js +1 -1
  84. package/dist/starters/features/turso/package.json +5 -2
  85. package/dist/starters/features/turso/src/utils/turso.ts +1 -1
  86. package/dist/starters/features/vitest/package.json +1 -1
  87. package/dist/testing/index.cjs +7562 -6858
  88. package/dist/testing/index.d.ts +141 -140
  89. package/dist/testing/index.mjs +7495 -6790
  90. package/dist/testing/package.json +1 -1
  91. package/handlers.mjs +9 -0
  92. package/package.json +25 -13
  93. package/public.d.ts +13 -0
  94. package/server.d.ts +1 -0
  95. package/dist/index.d.ts +0 -2
  96. package/dist/insights/index.d.ts +0 -1
  97. package/dist/insights/vite/index.d.ts +0 -1
  98. package/dist/insights/vite/insights-plugin.d.ts +0 -10
  99. package/dist/prefetch/index.cjs +0 -4
  100. package/dist/prefetch/index.d.ts +0 -2
  101. package/dist/prefetch/index.mjs +0 -3
  102. package/dist/prefetch/package.json +0 -8
  103. package/dist/qwik-prefetch.debug.js +0 -244
  104. package/dist/qwik-prefetch.js +0 -1
  105. /package/dist/starters/features/{tailwind → tailwind-v3}/.vscode/settings.json +0 -0
@@ -5,21 +5,95 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
6
6
  let wasm;
7
7
 
8
- const heap = new Array(128).fill(undefined);
8
+ function addToExternrefTable0(obj) {
9
+ const idx = wasm.__externref_table_alloc();
10
+ wasm.__wbindgen_export_2.set(idx, obj);
11
+ return idx;
12
+ }
9
13
 
10
- heap.push(undefined, null, true, false);
14
+ function handleError(f, args) {
15
+ try {
16
+ return f.apply(this, args);
17
+ } catch (e) {
18
+ const idx = addToExternrefTable0(e);
19
+ wasm.__wbindgen_exn_store(idx);
20
+ }
21
+ }
11
22
 
12
- function getObject(idx) { return heap[idx]; }
23
+ function debugString(val) {
24
+ // primitive types
25
+ const type = typeof val;
26
+ if (type == 'number' || type == 'boolean' || val == null) {
27
+ return `${val}`;
28
+ }
29
+ if (type == 'string') {
30
+ return `"${val}"`;
31
+ }
32
+ if (type == 'symbol') {
33
+ const description = val.description;
34
+ if (description == null) {
35
+ return 'Symbol';
36
+ } else {
37
+ return `Symbol(${description})`;
38
+ }
39
+ }
40
+ if (type == 'function') {
41
+ const name = val.name;
42
+ if (typeof name == 'string' && name.length > 0) {
43
+ return `Function(${name})`;
44
+ } else {
45
+ return 'Function';
46
+ }
47
+ }
48
+ // objects
49
+ if (Array.isArray(val)) {
50
+ const length = val.length;
51
+ let debug = '[';
52
+ if (length > 0) {
53
+ debug += debugString(val[0]);
54
+ }
55
+ for(let i = 1; i < length; i++) {
56
+ debug += ', ' + debugString(val[i]);
57
+ }
58
+ debug += ']';
59
+ return debug;
60
+ }
61
+ // Test for built-in
62
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
63
+ let className;
64
+ if (builtInMatches && builtInMatches.length > 1) {
65
+ className = builtInMatches[1];
66
+ } else {
67
+ // Failed to match the standard '[object ClassName]'
68
+ return toString.call(val);
69
+ }
70
+ if (className == 'Object') {
71
+ // we're a user defined class or Object
72
+ // JSON.stringify avoids problems with cycles, and is generally much
73
+ // easier than looping through ownProperties of `val`.
74
+ try {
75
+ return 'Object(' + JSON.stringify(val) + ')';
76
+ } catch (_) {
77
+ return 'Object';
78
+ }
79
+ }
80
+ // errors
81
+ if (val instanceof Error) {
82
+ return `${val.name}: ${val.message}\n${val.stack}`;
83
+ }
84
+ // TODO we could test for more things here, like `Set`s and `Map`s.
85
+ return className;
86
+ }
13
87
 
14
88
  let WASM_VECTOR_LEN = 0;
15
89
 
16
- let cachedUint8Memory0 = null;
90
+ let cachedUint8ArrayMemory0 = null;
17
91
 
18
- function getUint8Memory0() {
19
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
20
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
92
+ function getUint8ArrayMemory0() {
93
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
94
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
21
95
  }
22
- return cachedUint8Memory0;
96
+ return cachedUint8ArrayMemory0;
23
97
  }
24
98
 
25
99
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -42,7 +116,7 @@ function passStringToWasm0(arg, malloc, realloc) {
42
116
  if (realloc === undefined) {
43
117
  const buf = cachedTextEncoder.encode(arg);
44
118
  const ptr = malloc(buf.length, 1) >>> 0;
45
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
119
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
46
120
  WASM_VECTOR_LEN = buf.length;
47
121
  return ptr;
48
122
  }
@@ -50,7 +124,7 @@ function passStringToWasm0(arg, malloc, realloc) {
50
124
  let len = arg.length;
51
125
  let ptr = malloc(len, 1) >>> 0;
52
126
 
53
- const mem = getUint8Memory0();
127
+ const mem = getUint8ArrayMemory0();
54
128
 
55
129
  let offset = 0;
56
130
 
@@ -65,7 +139,7 @@ function passStringToWasm0(arg, malloc, realloc) {
65
139
  arg = arg.slice(offset);
66
140
  }
67
141
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
68
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
142
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
69
143
  const ret = encodeString(arg, view);
70
144
 
71
145
  offset += ret.written;
@@ -76,40 +150,13 @@ function passStringToWasm0(arg, malloc, realloc) {
76
150
  return ptr;
77
151
  }
78
152
 
79
- function isLikeNone(x) {
80
- return x === undefined || x === null;
81
- }
153
+ let cachedDataViewMemory0 = null;
82
154
 
83
- let cachedInt32Memory0 = null;
84
-
85
- function getInt32Memory0() {
86
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
87
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
155
+ function getDataViewMemory0() {
156
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
157
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
88
158
  }
89
- return cachedInt32Memory0;
90
- }
91
-
92
- let heap_next = heap.length;
93
-
94
- function dropObject(idx) {
95
- if (idx < 132) return;
96
- heap[idx] = heap_next;
97
- heap_next = idx;
98
- }
99
-
100
- function takeObject(idx) {
101
- const ret = getObject(idx);
102
- dropObject(idx);
103
- return ret;
104
- }
105
-
106
- function addHeapObject(obj) {
107
- if (heap_next === heap.length) heap.push(heap.length + 1);
108
- const idx = heap_next;
109
- heap_next = heap[idx];
110
-
111
- heap[idx] = obj;
112
- return idx;
159
+ return cachedDataViewMemory0;
113
160
  }
114
161
 
115
162
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
@@ -117,108 +164,28 @@ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder(
117
164
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }
118
165
  function getStringFromWasm0(ptr, len) {
119
166
  ptr = ptr >>> 0;
120
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
167
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
121
168
  }
122
169
 
123
- let cachedFloat64Memory0 = null;
124
-
125
- function getFloat64Memory0() {
126
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
127
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
128
- }
129
- return cachedFloat64Memory0;
130
- }
131
-
132
- function debugString(val) {
133
- // primitive types
134
- const type = typeof val;
135
- if (type == 'number' || type == 'boolean' || val == null) {
136
- return `${val}`;
137
- }
138
- if (type == 'string') {
139
- return `"${val}"`;
140
- }
141
- if (type == 'symbol') {
142
- const description = val.description;
143
- if (description == null) {
144
- return 'Symbol';
145
- } else {
146
- return `Symbol(${description})`;
147
- }
148
- }
149
- if (type == 'function') {
150
- const name = val.name;
151
- if (typeof name == 'string' && name.length > 0) {
152
- return `Function(${name})`;
153
- } else {
154
- return 'Function';
155
- }
156
- }
157
- // objects
158
- if (Array.isArray(val)) {
159
- const length = val.length;
160
- let debug = '[';
161
- if (length > 0) {
162
- debug += debugString(val[0]);
163
- }
164
- for(let i = 1; i < length; i++) {
165
- debug += ', ' + debugString(val[i]);
166
- }
167
- debug += ']';
168
- return debug;
169
- }
170
- // Test for built-in
171
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
172
- let className;
173
- if (builtInMatches.length > 1) {
174
- className = builtInMatches[1];
175
- } else {
176
- // Failed to match the standard '[object ClassName]'
177
- return toString.call(val);
178
- }
179
- if (className == 'Object') {
180
- // we're a user defined class or Object
181
- // JSON.stringify avoids problems with cycles, and is generally much
182
- // easier than looping through ownProperties of `val`.
183
- try {
184
- return 'Object(' + JSON.stringify(val) + ')';
185
- } catch (_) {
186
- return 'Object';
187
- }
188
- }
189
- // errors
190
- if (val instanceof Error) {
191
- return `${val.name}: ${val.message}\n${val.stack}`;
192
- }
193
- // TODO we could test for more things here, like `Set`s and `Map`s.
194
- return className;
170
+ function isLikeNone(x) {
171
+ return x === undefined || x === null;
195
172
  }
196
173
 
197
- function handleError(f, args) {
198
- try {
199
- return f.apply(this, args);
200
- } catch (e) {
201
- wasm.__wbindgen_exn_store(addHeapObject(e));
202
- }
174
+ function takeFromExternrefTable0(idx) {
175
+ const value = wasm.__wbindgen_export_2.get(idx);
176
+ wasm.__externref_table_dealloc(idx);
177
+ return value;
203
178
  }
204
179
  /**
205
- * @param {any} config_val
206
- * @returns {any}
207
- */
180
+ * @param {any} config_val
181
+ * @returns {any}
182
+ */
208
183
  function transform_modules(config_val) {
209
- try {
210
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
211
- wasm.transform_modules(retptr, addHeapObject(config_val));
212
- var r0 = getInt32Memory0()[retptr / 4 + 0];
213
- var r1 = getInt32Memory0()[retptr / 4 + 1];
214
- var r2 = getInt32Memory0()[retptr / 4 + 2];
215
- if (r2) {
216
- throw takeObject(r1);
217
- }
218
- return takeObject(r0);
219
- } finally {
220
- wasm.__wbindgen_add_to_stack_pointer(16);
184
+ const ret = wasm.transform_modules(config_val);
185
+ if (ret[2]) {
186
+ throw takeFromExternrefTable0(ret[1]);
221
187
  }
188
+ return takeFromExternrefTable0(ret[0]);
222
189
  }
223
190
 
224
191
  async function __wbg_load(module, imports) {
@@ -229,7 +196,7 @@ async function __wbg_load(module, imports) {
229
196
 
230
197
  } catch (e) {
231
198
  if (module.headers.get('Content-Type') != 'application/wasm') {
232
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
199
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
233
200
 
234
201
  } else {
235
202
  throw e;
@@ -255,180 +222,182 @@ async function __wbg_load(module, imports) {
255
222
  function __wbg_get_imports() {
256
223
  const imports = {};
257
224
  imports.wbg = {};
258
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
259
- const ret = getObject(arg0) === undefined;
225
+ imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
226
+ const ret = arg0.buffer;
260
227
  return ret;
261
228
  };
262
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
263
- const ret = getObject(arg0) in getObject(arg1);
229
+ imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
230
+ const ret = arg0.call(arg1);
264
231
  return ret;
265
- };
266
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
267
- const obj = getObject(arg1);
268
- const ret = typeof(obj) === 'string' ? obj : undefined;
269
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
270
- var len1 = WASM_VECTOR_LEN;
271
- getInt32Memory0()[arg0 / 4 + 1] = len1;
272
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
273
- };
274
- imports.wbg.__wbindgen_is_object = function(arg0) {
275
- const val = getObject(arg0);
276
- const ret = typeof(val) === 'object' && val !== null;
232
+ }, arguments) };
233
+ imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
234
+ const ret = arg0.done;
277
235
  return ret;
278
236
  };
279
- imports.wbg.__wbindgen_is_string = function(arg0) {
280
- const ret = typeof(getObject(arg0)) === 'string';
237
+ imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
238
+ const ret = Object.entries(arg0);
281
239
  return ret;
282
240
  };
283
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
284
- takeObject(arg0);
241
+ imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
242
+ const ret = Reflect.get(arg0, arg1);
243
+ return ret;
244
+ }, arguments) };
245
+ imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
246
+ const ret = arg0[arg1 >>> 0];
247
+ return ret;
285
248
  };
286
- imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
287
- const ret = getObject(arg0)[arg1 >>> 0];
288
- return addHeapObject(ret);
249
+ imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
250
+ const ret = arg0[arg1];
251
+ return ret;
289
252
  };
290
- imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
291
- const ret = getObject(arg0).length;
253
+ imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
254
+ let result;
255
+ try {
256
+ result = arg0 instanceof ArrayBuffer;
257
+ } catch (_) {
258
+ result = false;
259
+ }
260
+ const ret = result;
292
261
  return ret;
293
262
  };
294
- imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
295
- const ret = getObject(arg0).next();
296
- return addHeapObject(ret);
297
- }, arguments) };
298
- imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
299
- const ret = getObject(arg0).done;
263
+ imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
264
+ let result;
265
+ try {
266
+ result = arg0 instanceof Uint8Array;
267
+ } catch (_) {
268
+ result = false;
269
+ }
270
+ const ret = result;
300
271
  return ret;
301
272
  };
302
- imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
303
- const ret = getObject(arg0).value;
304
- return addHeapObject(ret);
273
+ imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
274
+ const ret = Array.isArray(arg0);
275
+ return ret;
305
276
  };
306
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
277
+ imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
307
278
  const ret = Symbol.iterator;
308
- return addHeapObject(ret);
279
+ return ret;
309
280
  };
310
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
311
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
312
- return addHeapObject(ret);
313
- }, arguments) };
314
- imports.wbg.__wbindgen_is_function = function(arg0) {
315
- const ret = typeof(getObject(arg0)) === 'function';
281
+ imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
282
+ const ret = arg0.length;
316
283
  return ret;
317
284
  };
318
- imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
319
- const ret = getObject(arg0).call(getObject(arg1));
320
- return addHeapObject(ret);
321
- }, arguments) };
322
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
323
- const ret = getObject(arg0).next;
324
- return addHeapObject(ret);
285
+ imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
286
+ const ret = arg0.length;
287
+ return ret;
325
288
  };
326
- imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
327
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
289
+ imports.wbg.__wbg_new_405e22f390576ce2 = function() {
290
+ const ret = new Object();
291
+ return ret;
328
292
  };
329
- imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
330
- const ret = getObject(arg0).length;
293
+ imports.wbg.__wbg_new_78feb108b6472713 = function() {
294
+ const ret = new Array();
331
295
  return ret;
332
296
  };
333
- imports.wbg.__wbindgen_memory = function() {
334
- const ret = wasm.memory;
335
- return addHeapObject(ret);
297
+ imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
298
+ const ret = new Uint8Array(arg0);
299
+ return ret;
300
+ };
301
+ imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
302
+ const ret = arg0.next;
303
+ return ret;
336
304
  };
337
- imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
338
- const ret = getObject(arg0).buffer;
339
- return addHeapObject(ret);
305
+ imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
306
+ const ret = arg0.next();
307
+ return ret;
308
+ }, arguments) };
309
+ imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
310
+ arg0[arg1 >>> 0] = arg2;
340
311
  };
341
- imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
342
- const ret = new Uint8Array(getObject(arg0));
343
- return addHeapObject(ret);
312
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
313
+ arg0[arg1] = arg2;
344
314
  };
345
- imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
346
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
315
+ imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
316
+ arg0.set(arg1, arg2 >>> 0);
347
317
  };
348
- imports.wbg.__wbindgen_number_new = function(arg0) {
349
- const ret = arg0;
350
- return addHeapObject(ret);
318
+ imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
319
+ const ret = arg0.value;
320
+ return ret;
351
321
  };
352
322
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
353
323
  const ret = BigInt.asUintN(64, arg0);
354
- return addHeapObject(ret);
324
+ return ret;
355
325
  };
356
- imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
357
- const ret = getObject(arg0)[getObject(arg1)];
358
- return addHeapObject(ret);
326
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
327
+ const v = arg0;
328
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
329
+ return ret;
359
330
  };
360
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
361
- const ret = getStringFromWasm0(arg0, arg1);
362
- return addHeapObject(ret);
331
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
332
+ const ret = debugString(arg1);
333
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
334
+ const len1 = WASM_VECTOR_LEN;
335
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
336
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
363
337
  };
364
- imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
365
- const ret = new Object();
366
- return addHeapObject(ret);
338
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
339
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
340
+ return ret;
367
341
  };
368
- imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
369
- const ret = new Array();
370
- return addHeapObject(ret);
342
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
343
+ const ret = arg0 in arg1;
344
+ return ret;
371
345
  };
372
- imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
373
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
346
+ imports.wbg.__wbindgen_init_externref_table = function() {
347
+ const table = wasm.__wbindgen_export_2;
348
+ const offset = table.grow(4);
349
+ table.set(0, undefined);
350
+ table.set(offset + 0, undefined);
351
+ table.set(offset + 1, null);
352
+ table.set(offset + 2, true);
353
+ table.set(offset + 3, false);
374
354
  };
375
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
376
- const v = getObject(arg0);
377
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
355
+ imports.wbg.__wbindgen_is_function = function(arg0) {
356
+ const ret = typeof(arg0) === 'function';
378
357
  return ret;
379
358
  };
380
- imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
381
- const ret = Array.isArray(getObject(arg0));
359
+ imports.wbg.__wbindgen_is_object = function(arg0) {
360
+ const val = arg0;
361
+ const ret = typeof(val) === 'object' && val !== null;
382
362
  return ret;
383
363
  };
384
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
385
- const ret = new Error(getStringFromWasm0(arg0, arg1));
386
- return addHeapObject(ret);
364
+ imports.wbg.__wbindgen_is_string = function(arg0) {
365
+ const ret = typeof(arg0) === 'string';
366
+ return ret;
367
+ };
368
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
369
+ const ret = arg0 === undefined;
370
+ return ret;
387
371
  };
388
372
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
389
- const ret = getObject(arg0) == getObject(arg1);
373
+ const ret = arg0 == arg1;
374
+ return ret;
375
+ };
376
+ imports.wbg.__wbindgen_memory = function() {
377
+ const ret = wasm.memory;
390
378
  return ret;
391
379
  };
392
380
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
393
- const obj = getObject(arg1);
381
+ const obj = arg1;
394
382
  const ret = typeof(obj) === 'number' ? obj : undefined;
395
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
396
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
383
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
384
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
397
385
  };
398
- imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
399
- let result;
400
- try {
401
- result = getObject(arg0) instanceof Uint8Array;
402
- } catch (_) {
403
- result = false;
404
- }
405
- const ret = result;
406
- return ret;
407
- };
408
- imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
409
- let result;
410
- try {
411
- result = getObject(arg0) instanceof ArrayBuffer;
412
- } catch (_) {
413
- result = false;
414
- }
415
- const ret = result;
386
+ imports.wbg.__wbindgen_number_new = function(arg0) {
387
+ const ret = arg0;
416
388
  return ret;
417
389
  };
418
- imports.wbg.__wbg_entries_95cc2c823b285a09 = function(arg0) {
419
- const ret = Object.entries(getObject(arg0));
420
- return addHeapObject(ret);
421
- };
422
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
423
- const ret = getObject(arg0);
424
- return addHeapObject(ret);
390
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
391
+ const obj = arg1;
392
+ const ret = typeof(obj) === 'string' ? obj : undefined;
393
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
394
+ var len1 = WASM_VECTOR_LEN;
395
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
396
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
425
397
  };
426
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
427
- const ret = debugString(getObject(arg1));
428
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
429
- const len1 = WASM_VECTOR_LEN;
430
- getInt32Memory0()[arg0 / 4 + 1] = len1;
431
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
398
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
399
+ const ret = getStringFromWasm0(arg0, arg1);
400
+ return ret;
432
401
  };
433
402
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
434
403
  throw new Error(getStringFromWasm0(arg0, arg1));
@@ -440,17 +409,26 @@ function __wbg_get_imports() {
440
409
  function __wbg_finalize_init(instance, module) {
441
410
  wasm = instance.exports;
442
411
  __wbg_init.__wbindgen_wasm_module = module;
443
- cachedFloat64Memory0 = null;
444
- cachedInt32Memory0 = null;
445
- cachedUint8Memory0 = null;
412
+ cachedDataViewMemory0 = null;
413
+ cachedUint8ArrayMemory0 = null;
446
414
 
447
415
 
416
+ wasm.__wbindgen_start();
448
417
  return wasm;
449
418
  }
450
419
 
451
420
  function initSync(module) {
452
421
  if (wasm !== undefined) return wasm;
453
422
 
423
+
424
+ if (typeof module !== 'undefined') {
425
+ if (Object.getPrototypeOf(module) === Object.prototype) {
426
+ ({module} = module);
427
+ } else {
428
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
429
+ }
430
+ }
431
+
454
432
  const imports = __wbg_get_imports();
455
433
 
456
434
  if (!(module instanceof WebAssembly.Module)) {
@@ -462,19 +440,28 @@ function initSync(module) {
462
440
  return __wbg_finalize_init(instance, module);
463
441
  }
464
442
 
465
- async function __wbg_init(input) {
443
+ async function __wbg_init(module_or_path) {
466
444
  if (wasm !== undefined) return wasm;
467
445
 
468
- if (typeof input === 'undefined') {
469
- input = new URL('qwik_wasm_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('qwik.wasm.cjs', document.baseURI).href)));
446
+
447
+ if (typeof module_or_path !== 'undefined') {
448
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
449
+ ({module_or_path} = module_or_path);
450
+ } else {
451
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead');
452
+ }
453
+ }
454
+
455
+ if (typeof module_or_path === 'undefined') {
456
+ module_or_path = new URL('qwik_wasm_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('qwik.wasm.cjs', document.baseURI).href)));
470
457
  }
471
458
  const imports = __wbg_get_imports();
472
459
 
473
- if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
474
- input = fetch(input);
460
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
461
+ module_or_path = fetch(module_or_path);
475
462
  }
476
463
 
477
- const { instance, module } = await __wbg_load(await input, imports);
464
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
478
465
 
479
466
  return __wbg_finalize_init(instance, module);
480
467
  }