@qwik.dev/core 2.0.0-beta.16 → 2.0.0-beta.18

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/dist/server.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/server 2.0.0-beta.16-dev+a83ccf3
3
+ * @qwik.dev/core/server 2.0.0-beta.18-dev+a8081d4
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -20,7 +20,10 @@ import { setPlatform as setPlatform2 } from "@qwik.dev/core";
20
20
 
21
21
  // packages/qwik/src/server/platform.ts
22
22
  import { setPlatform } from "@qwik.dev/core";
23
- import { isDev as isDev3 } from "@qwik.dev/core/build";
23
+ import { isDev as isDev4 } from "@qwik.dev/core/build";
24
+
25
+ // packages/qwik/src/core/client/util-mapArray.ts
26
+ import { isDev } from "@qwik.dev/core/build";
24
27
 
25
28
  // packages/qwik/src/core/shared/utils/qdev.ts
26
29
  var qDev = globalThis.qDev !== false;
@@ -64,7 +67,7 @@ function assertTrue(value1, text, ...parts) {
64
67
 
65
68
  // packages/qwik/src/core/client/util-mapArray.ts
66
69
  var mapApp_findIndx = (array, key, start) => {
67
- assertTrue(start % 2 === 0, "Expecting even number.");
70
+ isDev && assertTrue(start % 2 === 0, "Expecting even number.");
68
71
  let bottom = start >> 1;
69
72
  let top = array.length - 2 >> 1;
70
73
  while (bottom <= top) {
@@ -195,7 +198,7 @@ See https://qwik.dev/docs/core/tasks/#use-method-rules`,
195
198
  // 30
196
199
  "WrappedSignal is read-only",
197
200
  // 31
198
- "Attribute value is unsafe for SSR",
201
+ "Attribute value is unsafe for SSR {{0}}",
199
202
  // 32
200
203
  "SerializerSymbol function returned rejected promise",
201
204
  // 33
@@ -223,122 +226,427 @@ var qError = (code, errorMessageArgs = []) => {
223
226
  };
224
227
 
225
228
  // packages/qwik/src/core/shared/qrl/qrl-utils.ts
226
- import { isDev } from "@qwik.dev/core/build";
229
+ import { isDev as isDev2 } from "@qwik.dev/core/build";
227
230
  var SYNC_QRL = "<sync>";
228
231
 
229
232
  // packages/qwik/src/core/shared/types.ts
230
233
  var DEBUG_TYPE = "q:type";
231
234
 
232
- // packages/qwik/src/core/shared/utils/character-escaping.ts
233
- function escapeHTML(html) {
234
- let escapedHTML = "";
235
- const length = html.length;
236
- let idx = 0;
237
- let lastIdx = idx;
238
- for (; idx < length; idx++) {
239
- const ch = html.charCodeAt(idx);
240
- if (ch === 60) {
241
- escapedHTML += html.substring(lastIdx, idx) + "&lt;";
242
- } else if (ch === 62) {
243
- escapedHTML += html.substring(lastIdx, idx) + "&gt;";
244
- } else if (ch === 38) {
245
- escapedHTML += html.substring(lastIdx, idx) + "&amp;";
246
- } else if (ch === 34) {
247
- escapedHTML += html.substring(lastIdx, idx) + "&quot;";
248
- } else if (ch === 39) {
249
- escapedHTML += html.substring(lastIdx, idx) + "&#39;";
250
- } else {
251
- continue;
252
- }
253
- lastIdx = idx + 1;
254
- }
255
- if (lastIdx === 0) {
256
- return html;
257
- } else {
258
- return escapedHTML + html.substring(lastIdx);
259
- }
260
- }
261
-
262
- // packages/qwik/src/core/shared/utils/markers.ts
263
- var OnRenderProp = "q:renderFn";
264
- var QSlot = "q:slot";
265
- var QSlotParent = "q:sparent";
266
- var QStyle = "q:style";
267
- var QStyleSelector = "style[q\\:style]";
268
- var QStyleSSelector = "style[q\\:sstyle]";
269
- var QStylesAllSelector = QStyleSelector + "," + QStyleSSelector;
270
- var QScopedStyle = "q:sstyle";
271
- var QCtxAttr = "q:ctx";
272
- var QBackRefs = "q:brefs";
273
- var QRenderAttr = "q:render";
274
- var QRuntimeAttr = "q:runtime";
275
- var QVersionAttr = "q:version";
276
- var QBaseAttr = "q:base";
277
- var QLocaleAttr = "q:locale";
278
- var QManifestHashAttr = "q:manifest-hash";
279
- var QInstanceAttr = "q:instance";
280
- var QContainerIsland = "q:container-island";
281
- var QContainerIslandEnd = "/" + QContainerIsland;
282
- var QIgnore = "q:ignore";
283
- var QIgnoreEnd = "/" + QIgnore;
284
- var QContainerAttr = "q:container";
285
- var QContainerAttrEnd = "/" + QContainerAttr;
286
- var QTemplate = "q:template";
287
- var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
288
- var QDefaultSlot = "";
289
- var ELEMENT_ID = "q:id";
290
- var ELEMENT_KEY = "q:key";
291
- var ELEMENT_PROPS = "q:props";
292
- var ELEMENT_SEQ = "q:seq";
293
- var ELEMENT_SEQ_IDX = "q:seqIdx";
294
- var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
295
- var NON_SERIALIZABLE_MARKER_PREFIX = ":";
296
- var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
297
- var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
298
- var USE_ON_LOCAL_FLAGS = NON_SERIALIZABLE_MARKER_PREFIX + "onFlags";
299
- var FLUSH_COMMENT = "qkssr-f";
300
- var STREAM_BLOCK_START_COMMENT = "qkssr-pu";
301
- var STREAM_BLOCK_END_COMMENT = "qkssr-po";
302
- var Q_PROPS_SEPARATOR = ":";
303
- var dangerouslySetInnerHTML = "dangerouslySetInnerHTML";
304
-
305
- // packages/qwik/src/core/shared/utils/promises.ts
306
- import { isDev as isDev2, isServer } from "@qwik.dev/core/build";
307
- var MAX_RETRY_ON_PROMISE_COUNT = 100;
308
- var isPromise = (value) => {
309
- return !!value && typeof value == "object" && typeof value.then === "function";
310
- };
311
- var maybeThen = (valueOrPromise, thenFn) => {
312
- return isPromise(valueOrPromise) ? valueOrPromise.then(thenFn, shouldNotError) : thenFn(valueOrPromise);
313
- };
314
- var shouldNotError = (reason) => {
315
- throwErrorAndStop(reason);
235
+ // packages/qwik/src/core/shared/vnode-data-types.ts
236
+ var VNodeDataSeparator = {
237
+ REFERENCE_CH: (
238
+ /* ***** */
239
+ `~`
240
+ ),
241
+ // `~` is a reference to the node. Save it.
242
+ REFERENCE: (
243
+ /* ******** */
244
+ 126
245
+ ),
246
+ // `~` is a reference to the node. Save it.
247
+ ADVANCE_1_CH: (
248
+ /* ***** */
249
+ `!`
250
+ ),
251
+ // `!` is vNodeData separator skipping 0. (ie next vNode)
252
+ ADVANCE_1: (
253
+ /* ********* */
254
+ 33
255
+ ),
256
+ // `!` is vNodeData separator skipping 0. (ie next vNode)
257
+ ADVANCE_2_CH: (
258
+ /* ***** */
259
+ `"`
260
+ ),
261
+ // `"` is vNodeData separator skipping 1.
262
+ ADVANCE_2: (
263
+ /* ********* */
264
+ 34
265
+ ),
266
+ // `"` is vNodeData separator skipping 1.
267
+ ADVANCE_4_CH: (
268
+ /* ***** */
269
+ `#`
270
+ ),
271
+ // `#` is vNodeData separator skipping 2.
272
+ ADVANCE_4: (
273
+ /* ********* */
274
+ 35
275
+ ),
276
+ // `#` is vNodeData separator skipping 2.
277
+ ADVANCE_8_CH: (
278
+ /* ***** */
279
+ `$`
280
+ ),
281
+ // `$` is vNodeData separator skipping 4.
282
+ ADVANCE_8: (
283
+ /* ********* */
284
+ 36
285
+ ),
286
+ // `$` is vNodeData separator skipping 4.
287
+ ADVANCE_16_CH: (
288
+ /* **** */
289
+ `%`
290
+ ),
291
+ // `%` is vNodeData separator skipping 8.
292
+ ADVANCE_16: (
293
+ /* ******** */
294
+ 37
295
+ ),
296
+ // `%` is vNodeData separator skipping 8.
297
+ ADVANCE_32_CH: (
298
+ /* **** */
299
+ `&`
300
+ ),
301
+ // `&` is vNodeData separator skipping 16.
302
+ ADVANCE_32: (
303
+ /* ******** */
304
+ 38
305
+ ),
306
+ // `&` is vNodeData separator skipping 16.
307
+ ADVANCE_64_CH: (
308
+ /* **** */
309
+ `'`
310
+ ),
311
+ // `'` is vNodeData separator skipping 32.
312
+ ADVANCE_64: (
313
+ /* ******** */
314
+ 39
315
+ ),
316
+ // `'` is vNodeData separator skipping 32.
317
+ ADVANCE_128_CH: (
318
+ /* *** */
319
+ `(`
320
+ ),
321
+ // `(` is vNodeData separator skipping 64.
322
+ ADVANCE_128: (
323
+ /* ******* */
324
+ 40
325
+ ),
326
+ // `(` is vNodeData separator skipping 64.
327
+ ADVANCE_256_CH: (
328
+ /* *** */
329
+ `)`
330
+ ),
331
+ // `)` is vNodeData separator skipping 128.
332
+ ADVANCE_256: (
333
+ /* ******* */
334
+ 41
335
+ ),
336
+ // `)` is vNodeData separator skipping 128.
337
+ ADVANCE_512_CH: (
338
+ /* *** */
339
+ `*`
340
+ ),
341
+ // `*` is vNodeData separator skipping 256.
342
+ ADVANCE_512: (
343
+ /* ******* */
344
+ 42
345
+ ),
346
+ // `*` is vNodeData separator skipping 256.
347
+ ADVANCE_1024_CH: (
348
+ /* ** */
349
+ `+`
350
+ ),
351
+ // `+` is vNodeData separator skipping 512.
352
+ ADVANCE_1024: (
353
+ /* ****** */
354
+ 43
355
+ ),
356
+ // `+` is vNodeData separator skipping 512.
357
+ ADVANCE_2048_CH: (
358
+ /* * */
359
+ ","
360
+ ),
361
+ // ',' is vNodeData separator skipping 1024.
362
+ ADVANCE_2048: (
363
+ /* ****** */
364
+ 44
365
+ ),
366
+ // ',' is vNodeData separator skipping 1024.
367
+ ADVANCE_4096_CH: (
368
+ /* * */
369
+ `-`
370
+ ),
371
+ // `-` is vNodeData separator skipping 2048.
372
+ ADVANCE_4096: (
373
+ /* ****** */
374
+ 45
375
+ ),
376
+ // `-` is vNodeData separator skipping 2048.
377
+ ADVANCE_8192_CH: (
378
+ /* * */
379
+ `.`
380
+ ),
381
+ // `.` is vNodeData separator skipping 4096.
382
+ ADVANCE_8192: (
383
+ /* ****** */
384
+ 46
385
+ )
386
+ // `.` is vNodeData separator skipping 4096.
316
387
  };
317
- function retryOnPromise(fn, retryCount = 0) {
318
- const retryOrThrow = (e) => {
319
- if (isPromise(e) && retryCount < MAX_RETRY_ON_PROMISE_COUNT) {
320
- return e.then(retryOnPromise.bind(null, fn, retryCount++));
321
- }
322
- throw e;
323
- };
324
- try {
325
- const result = fn();
326
- if (isPromise(result)) {
327
- return result.catch((e) => retryOrThrow(e));
328
- }
329
- return result;
330
- } catch (e) {
331
- if (isDev2 && isServer && e instanceof ReferenceError && e.message.includes("window")) {
332
- e.message = 'It seems like you forgot to add "if (isBrowser) {...}" here:' + e.message;
333
- throw e;
334
- }
335
- return retryOrThrow(e);
336
- }
388
+ var VNodeDataChar = {
389
+ OPEN: (
390
+ /* ************** */
391
+ 123
392
+ ),
393
+ // `{` is the start of the VNodeData for a virtual element.
394
+ OPEN_CHAR: (
395
+ /* ****** */
396
+ "{"
397
+ ),
398
+ CLOSE: (
399
+ /* ************* */
400
+ 125
401
+ ),
402
+ // `}` is the end of the VNodeData for a virtual element.
403
+ CLOSE_CHAR: (
404
+ /* ***** */
405
+ "}"
406
+ ),
407
+ SCOPED_STYLE: (
408
+ /* ******* */
409
+ 59
410
+ ),
411
+ // `;` - `q:sstyle` - Style attribute.
412
+ SCOPED_STYLE_CHAR: (
413
+ /* */
414
+ ";"
415
+ ),
416
+ RENDER_FN: (
417
+ /* ********** */
418
+ 60
419
+ ),
420
+ // `<` - `q:renderFn' - Component QRL render function (body)
421
+ RENDER_FN_CHAR: (
422
+ /* ** */
423
+ "<"
424
+ ),
425
+ ID: (
426
+ /* ***************** */
427
+ 61
428
+ ),
429
+ // `=` - `q:id` - ID of the element.
430
+ ID_CHAR: (
431
+ /* ********* */
432
+ "="
433
+ ),
434
+ PROPS: (
435
+ /* ************** */
436
+ 62
437
+ ),
438
+ // `>` - `q:props' - Component Props
439
+ PROPS_CHAR: (
440
+ /* ****** */
441
+ ">"
442
+ ),
443
+ SLOT_PARENT: (
444
+ /* ******** */
445
+ 63
446
+ ),
447
+ // `?` - `q:sparent` - Slot parent.
448
+ SLOT_PARENT_CHAR: (
449
+ /* */
450
+ "?"
451
+ ),
452
+ KEY: (
453
+ /* **************** */
454
+ 64
455
+ ),
456
+ // `@` - `q:key` - Element key.
457
+ KEY_CHAR: (
458
+ /* ******** */
459
+ "@"
460
+ ),
461
+ SEQ: (
462
+ /* **************** */
463
+ 91
464
+ ),
465
+ // `[` - `q:seq' - Seq value from `useSequentialScope()`
466
+ SEQ_CHAR: (
467
+ /* ******** */
468
+ "["
469
+ ),
470
+ DON_T_USE: (
471
+ /* ********** */
472
+ 92
473
+ ),
474
+ // `\` - SKIP because `\` is used as escaping
475
+ DON_T_USE_CHAR: "\\",
476
+ CONTEXT: (
477
+ /* ************ */
478
+ 93
479
+ ),
480
+ // `]` - `q:ctx' - Component context/props
481
+ CONTEXT_CHAR: (
482
+ /* **** */
483
+ "]"
484
+ ),
485
+ SEQ_IDX: (
486
+ /* ************ */
487
+ 94
488
+ ),
489
+ // `^` - `q:seqIdx' - Sequential scope id
490
+ SEQ_IDX_CHAR: (
491
+ /* **** */
492
+ "^"
493
+ ),
494
+ BACK_REFS: (
495
+ /* ********** */
496
+ 96
497
+ ),
498
+ // '`' - `q:brefs' - Effect dependencies/subscriptions
499
+ BACK_REFS_CHAR: (
500
+ /* ** */
501
+ "`"
502
+ ),
503
+ SEPARATOR: (
504
+ /* ********* */
505
+ 124
506
+ ),
507
+ // `|` - Separator char to encode any key/value pairs.
508
+ SEPARATOR_CHAR: (
509
+ /* ** */
510
+ "|"
511
+ ),
512
+ SLOT: (
513
+ /* ************** */
514
+ 126
515
+ ),
516
+ // `~` - `q:slot' - Slot name
517
+ SLOT_CHAR: (
518
+ /* ******* */
519
+ "~"
520
+ )
521
+ };
522
+
523
+ // packages/qwik/src/core/shared/utils/character-escaping.ts
524
+ function escapeHTML(html) {
525
+ let escapedHTML = "";
526
+ const length = html.length;
527
+ let idx = 0;
528
+ let lastIdx = idx;
529
+ for (; idx < length; idx++) {
530
+ const ch = html.charCodeAt(idx);
531
+ if (ch === 60) {
532
+ escapedHTML += html.substring(lastIdx, idx) + "&lt;";
533
+ } else if (ch === 62) {
534
+ escapedHTML += html.substring(lastIdx, idx) + "&gt;";
535
+ } else if (ch === 38) {
536
+ escapedHTML += html.substring(lastIdx, idx) + "&amp;";
537
+ } else if (ch === 34) {
538
+ escapedHTML += html.substring(lastIdx, idx) + "&quot;";
539
+ } else if (ch === 39) {
540
+ escapedHTML += html.substring(lastIdx, idx) + "&#39;";
541
+ } else {
542
+ continue;
543
+ }
544
+ lastIdx = idx + 1;
545
+ }
546
+ if (lastIdx === 0) {
547
+ return html;
548
+ } else {
549
+ return escapedHTML + html.substring(lastIdx);
550
+ }
551
+ }
552
+ function encodeVNodeDataString(str) {
553
+ let escapedHTML = "";
554
+ const length = str.length;
555
+ let idx = 0;
556
+ let lastIdx = idx;
557
+ for (; idx < length; idx++) {
558
+ const ch = str.charCodeAt(idx);
559
+ if (ch >= VNodeDataSeparator.ADVANCE_1 && ch <= VNodeDataSeparator.ADVANCE_8192) {
560
+ escapedHTML += str.substring(lastIdx, idx) + "\\" + str.charAt(idx);
561
+ } else {
562
+ continue;
563
+ }
564
+ lastIdx = idx + 1;
565
+ }
566
+ if (lastIdx === 0) {
567
+ return str;
568
+ } else {
569
+ return escapedHTML + str.substring(lastIdx);
570
+ }
571
+ }
572
+
573
+ // packages/qwik/src/core/shared/utils/markers.ts
574
+ var OnRenderProp = "q:renderFn";
575
+ var QSlot = "q:slot";
576
+ var QSlotParent = "q:sparent";
577
+ var QStyle = "q:style";
578
+ var QStyleSelector = "style[q\\:style]";
579
+ var QStyleSSelector = "style[q\\:sstyle]";
580
+ var QStylesAllSelector = QStyleSelector + "," + QStyleSSelector;
581
+ var QScopedStyle = "q:sstyle";
582
+ var QCtxAttr = "q:ctx";
583
+ var QBackRefs = "q:brefs";
584
+ var QRenderAttr = "q:render";
585
+ var QRuntimeAttr = "q:runtime";
586
+ var QVersionAttr = "q:version";
587
+ var QBaseAttr = "q:base";
588
+ var QLocaleAttr = "q:locale";
589
+ var QManifestHashAttr = "q:manifest-hash";
590
+ var QInstanceAttr = "q:instance";
591
+ var QContainerIsland = "q:container-island";
592
+ var QContainerIslandEnd = "/" + QContainerIsland;
593
+ var QIgnore = "q:ignore";
594
+ var QIgnoreEnd = "/" + QIgnore;
595
+ var QContainerAttr = "q:container";
596
+ var QContainerAttrEnd = "/" + QContainerAttr;
597
+ var QTemplate = "q:template";
598
+ var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
599
+ var QDefaultSlot = "";
600
+ var ELEMENT_ID = "q:id";
601
+ var ELEMENT_KEY = "q:key";
602
+ var ELEMENT_PROPS = "q:props";
603
+ var ELEMENT_SEQ = "q:seq";
604
+ var ELEMENT_SEQ_IDX = "q:seqIdx";
605
+ var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
606
+ var NON_SERIALIZABLE_MARKER_PREFIX = ":";
607
+ var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
608
+ var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
609
+ var USE_ON_LOCAL_FLAGS = NON_SERIALIZABLE_MARKER_PREFIX + "onFlags";
610
+ var FLUSH_COMMENT = "qkssr-f";
611
+ var STREAM_BLOCK_START_COMMENT = "qkssr-pu";
612
+ var STREAM_BLOCK_END_COMMENT = "qkssr-po";
613
+ var Q_PROPS_SEPARATOR = ":";
614
+ var dangerouslySetInnerHTML = "dangerouslySetInnerHTML";
615
+
616
+ // packages/qwik/src/core/shared/utils/promises.ts
617
+ import { isDev as isDev3, isServer } from "@qwik.dev/core/build";
618
+ var MAX_RETRY_ON_PROMISE_COUNT = 100;
619
+ var isPromise = (value) => {
620
+ return !!value && typeof value == "object" && typeof value.then === "function";
621
+ };
622
+ var maybeThen = (valueOrPromise, thenFn) => {
623
+ return isPromise(valueOrPromise) ? valueOrPromise.then(thenFn) : thenFn(valueOrPromise);
624
+ };
625
+ function retryOnPromise(fn, retryCount = 0) {
626
+ const retryOrThrow = (e) => {
627
+ if (isPromise(e) && retryCount < MAX_RETRY_ON_PROMISE_COUNT) {
628
+ return e.then(retryOnPromise.bind(null, fn, retryCount++));
629
+ }
630
+ throw e;
631
+ };
632
+ try {
633
+ const result = fn();
634
+ if (isPromise(result)) {
635
+ return result.catch((e) => retryOrThrow(e));
636
+ }
637
+ return result;
638
+ } catch (e) {
639
+ if (isDev3 && isServer && e instanceof ReferenceError && e.message.includes("window")) {
640
+ e.message = 'It seems like you forgot to add "if (isBrowser) {...}" here:' + e.message;
641
+ throw e;
642
+ }
643
+ return retryOrThrow(e);
644
+ }
337
645
  }
338
646
 
339
647
  // packages/qwik/src/core/shared/utils/scoped-styles.ts
340
648
  function isClassAttr(key) {
341
- return key === "class" || key === "className";
649
+ return key === "class";
342
650
  }
343
651
  function convertStyleIdsToString(scopedStyleIds) {
344
652
  return Array.from(scopedStyleIds).join(" ");
@@ -393,387 +701,99 @@ var unitlessNumbers = /* @__PURE__ */ new Set([
393
701
  "WebkitBoxOrdinalGroup",
394
702
  "WebkitColumnCount",
395
703
  "WebkitColumns",
396
- "WebkitFlex",
397
- "WebkitFlexGrow",
398
- "WebkitFlexShrink",
399
- "WebkitLineClamp"
400
- ]);
401
- var isUnitlessNumber = (name) => {
402
- return unitlessNumbers.has(name);
403
- };
404
-
405
- // packages/qwik/src/core/shared/utils/styles.ts
406
- var serializeClass = (obj) => {
407
- if (!obj) {
408
- return "";
409
- }
410
- if (isString(obj)) {
411
- return obj.trim();
412
- }
413
- const classes = [];
414
- if (isArray(obj)) {
415
- for (const o of obj) {
416
- const classList = serializeClass(o);
417
- if (classList) {
418
- classes.push(classList);
419
- }
420
- }
421
- } else {
422
- for (const [key, value] of Object.entries(obj)) {
423
- if (value) {
424
- classes.push(key.trim());
425
- }
426
- }
427
- }
428
- return classes.join(" ");
429
- };
430
- var fromCamelToKebabCaseWithDash = (text) => {
431
- return text.replace(/([A-Z])/g, "-$1").toLowerCase();
432
- };
433
- var stringifyStyle = (obj) => {
434
- if (obj == null) {
435
- return "";
436
- }
437
- if (typeof obj == "object") {
438
- if (isArray(obj)) {
439
- throw qError(0 /* stringifyClassOrStyle */, [obj, "style"]);
440
- } else {
441
- const chunks = [];
442
- for (const key in obj) {
443
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
444
- const value = obj[key];
445
- if (value != null && typeof value !== "function") {
446
- if (key.startsWith("--")) {
447
- chunks.push(key + ":" + value);
448
- } else {
449
- chunks.push(fromCamelToKebabCaseWithDash(key) + ":" + setValueForStyle(key, value));
450
- }
451
- }
452
- }
453
- }
454
- return chunks.join(";");
455
- }
456
- }
457
- return String(obj);
458
- };
459
- var serializeBooleanOrNumberAttribute = (value) => {
460
- return value != null ? String(value) : null;
461
- };
462
- function serializeAttribute(key, value, styleScopedId) {
463
- if (isClassAttr(key)) {
464
- const serializedClass = serializeClass(value);
465
- value = styleScopedId ? styleScopedId + (serializedClass.length ? " " + serializedClass : serializedClass) : serializedClass;
466
- } else if (key === "style") {
467
- value = stringifyStyle(value);
468
- } else if (isEnumeratedBooleanAttribute(key) || typeof value === "number") {
469
- value = serializeBooleanOrNumberAttribute(value);
470
- } else if (value === false || value == null) {
471
- value = null;
472
- } else if (value === true && isPreventDefault(key)) {
473
- value = "";
474
- }
475
- return value;
476
- }
477
- function isEnumeratedBooleanAttribute(key) {
478
- return isAriaAttribute(key) || ["spellcheck", "draggable", "contenteditable"].includes(key);
479
- }
480
- var setValueForStyle = (styleName, value) => {
481
- if (typeof value === "number" && value !== 0 && !isUnitlessNumber(styleName)) {
482
- return value + "px";
483
- }
484
- return value;
485
- };
486
- function isAriaAttribute(prop) {
487
- return prop.startsWith("aria-");
488
- }
489
-
490
- // packages/qwik/src/core/shared/vnode-data-types.ts
491
- var VNodeDataSeparator = {
492
- REFERENCE_CH: (
493
- /* ***** */
494
- `~`
495
- ),
496
- // `~` is a reference to the node. Save it.
497
- REFERENCE: (
498
- /* ******** */
499
- 126
500
- ),
501
- // `~` is a reference to the node. Save it.
502
- ADVANCE_1_CH: (
503
- /* ***** */
504
- `!`
505
- ),
506
- // `!` is vNodeData separator skipping 0. (ie next vNode)
507
- ADVANCE_1: (
508
- /* ********* */
509
- 33
510
- ),
511
- // `!` is vNodeData separator skipping 0. (ie next vNode)
512
- ADVANCE_2_CH: (
513
- /* ***** */
514
- `"`
515
- ),
516
- // `"` is vNodeData separator skipping 1.
517
- ADVANCE_2: (
518
- /* ********* */
519
- 34
520
- ),
521
- // `"` is vNodeData separator skipping 1.
522
- ADVANCE_4_CH: (
523
- /* ***** */
524
- `#`
525
- ),
526
- // `#` is vNodeData separator skipping 2.
527
- ADVANCE_4: (
528
- /* ********* */
529
- 35
530
- ),
531
- // `#` is vNodeData separator skipping 2.
532
- ADVANCE_8_CH: (
533
- /* ***** */
534
- `$`
535
- ),
536
- // `$` is vNodeData separator skipping 4.
537
- ADVANCE_8: (
538
- /* ********* */
539
- 36
540
- ),
541
- // `$` is vNodeData separator skipping 4.
542
- ADVANCE_16_CH: (
543
- /* **** */
544
- `%`
545
- ),
546
- // `%` is vNodeData separator skipping 8.
547
- ADVANCE_16: (
548
- /* ******** */
549
- 37
550
- ),
551
- // `%` is vNodeData separator skipping 8.
552
- ADVANCE_32_CH: (
553
- /* **** */
554
- `&`
555
- ),
556
- // `&` is vNodeData separator skipping 16.
557
- ADVANCE_32: (
558
- /* ******** */
559
- 38
560
- ),
561
- // `&` is vNodeData separator skipping 16.
562
- ADVANCE_64_CH: (
563
- /* **** */
564
- `'`
565
- ),
566
- // `'` is vNodeData separator skipping 32.
567
- ADVANCE_64: (
568
- /* ******** */
569
- 39
570
- ),
571
- // `'` is vNodeData separator skipping 32.
572
- ADVANCE_128_CH: (
573
- /* *** */
574
- `(`
575
- ),
576
- // `(` is vNodeData separator skipping 64.
577
- ADVANCE_128: (
578
- /* ******* */
579
- 40
580
- ),
581
- // `(` is vNodeData separator skipping 64.
582
- ADVANCE_256_CH: (
583
- /* *** */
584
- `)`
585
- ),
586
- // `)` is vNodeData separator skipping 128.
587
- ADVANCE_256: (
588
- /* ******* */
589
- 41
590
- ),
591
- // `)` is vNodeData separator skipping 128.
592
- ADVANCE_512_CH: (
593
- /* *** */
594
- `*`
595
- ),
596
- // `*` is vNodeData separator skipping 256.
597
- ADVANCE_512: (
598
- /* ******* */
599
- 42
600
- ),
601
- // `*` is vNodeData separator skipping 256.
602
- ADVANCE_1024_CH: (
603
- /* ** */
604
- `+`
605
- ),
606
- // `+` is vNodeData separator skipping 512.
607
- ADVANCE_1024: (
608
- /* ****** */
609
- 43
610
- ),
611
- // `+` is vNodeData separator skipping 512.
612
- ADVANCE_2048_CH: (
613
- /* * */
614
- ","
615
- ),
616
- // ',' is vNodeData separator skipping 1024.
617
- ADVANCE_2048: (
618
- /* ****** */
619
- 44
620
- ),
621
- // ',' is vNodeData separator skipping 1024.
622
- ADVANCE_4096_CH: (
623
- /* * */
624
- `-`
625
- ),
626
- // `-` is vNodeData separator skipping 2048.
627
- ADVANCE_4096: (
628
- /* ****** */
629
- 45
630
- ),
631
- // `-` is vNodeData separator skipping 2048.
632
- ADVANCE_8192_CH: (
633
- /* * */
634
- `.`
635
- ),
636
- // `.` is vNodeData separator skipping 4096.
637
- ADVANCE_8192: (
638
- /* ****** */
639
- 46
640
- )
641
- // `.` is vNodeData separator skipping 4096.
704
+ "WebkitFlex",
705
+ "WebkitFlexGrow",
706
+ "WebkitFlexShrink",
707
+ "WebkitLineClamp"
708
+ ]);
709
+ var isUnitlessNumber = (name) => {
710
+ return unitlessNumbers.has(name);
642
711
  };
643
- var VNodeDataChar = {
644
- OPEN: (
645
- /* ************** */
646
- 123
647
- ),
648
- // `{` is the start of the VNodeData for a virtual element.
649
- OPEN_CHAR: (
650
- /* ****** */
651
- "{"
652
- ),
653
- CLOSE: (
654
- /* ************* */
655
- 125
656
- ),
657
- // `}` is the end of the VNodeData for a virtual element.
658
- CLOSE_CHAR: (
659
- /* ***** */
660
- "}"
661
- ),
662
- SCOPED_STYLE: (
663
- /* ******* */
664
- 59
665
- ),
666
- // `;` - `q:sstyle` - Style attribute.
667
- SCOPED_STYLE_CHAR: (
668
- /* */
669
- ";"
670
- ),
671
- RENDER_FN: (
672
- /* ********** */
673
- 60
674
- ),
675
- // `<` - `q:renderFn' - Component QRL render function (body)
676
- RENDER_FN_CHAR: (
677
- /* ** */
678
- "<"
679
- ),
680
- ID: (
681
- /* ***************** */
682
- 61
683
- ),
684
- // `=` - `q:id` - ID of the element.
685
- ID_CHAR: (
686
- /* ********* */
687
- "="
688
- ),
689
- PROPS: (
690
- /* ************** */
691
- 62
692
- ),
693
- // `>` - `q:props' - Component Props
694
- PROPS_CHAR: (
695
- /* ****** */
696
- ">"
697
- ),
698
- SLOT_PARENT: (
699
- /* ******** */
700
- 63
701
- ),
702
- // `?` - `q:sparent` - Slot parent.
703
- SLOT_PARENT_CHAR: (
704
- /* */
705
- "?"
706
- ),
707
- KEY: (
708
- /* **************** */
709
- 64
710
- ),
711
- // `@` - `q:key` - Element key.
712
- KEY_CHAR: (
713
- /* ******** */
714
- "@"
715
- ),
716
- SEQ: (
717
- /* **************** */
718
- 91
719
- ),
720
- // `[` - `q:seq' - Seq value from `useSequentialScope()`
721
- SEQ_CHAR: (
722
- /* ******** */
723
- "["
724
- ),
725
- DON_T_USE: (
726
- /* ********** */
727
- 92
728
- ),
729
- // `\` - SKIP because `\` is used as escaping
730
- DON_T_USE_CHAR: "\\",
731
- CONTEXT: (
732
- /* ************ */
733
- 93
734
- ),
735
- // `]` - `q:ctx' - Component context/props
736
- CONTEXT_CHAR: (
737
- /* **** */
738
- "]"
739
- ),
740
- SEQ_IDX: (
741
- /* ************ */
742
- 94
743
- ),
744
- // `^` - `q:seqIdx' - Sequential scope id
745
- SEQ_IDX_CHAR: (
746
- /* **** */
747
- "^"
748
- ),
749
- BACK_REFS: (
750
- /* ********** */
751
- 96
752
- ),
753
- // '`' - `q:brefs' - Effect dependencies/subscriptions
754
- BACK_REFS_CHAR: (
755
- /* ** */
756
- "`"
757
- ),
758
- SEPARATOR: (
759
- /* ********* */
760
- 124
761
- ),
762
- // `|` - Separator char to encode any key/value pairs.
763
- SEPARATOR_CHAR: (
764
- /* ** */
765
- "|"
766
- ),
767
- SLOT: (
768
- /* ************** */
769
- 126
770
- ),
771
- // `~` - `q:slot' - Slot name
772
- SLOT_CHAR: (
773
- /* ******* */
774
- "~"
775
- )
712
+
713
+ // packages/qwik/src/core/shared/utils/styles.ts
714
+ var serializeClass = (obj) => {
715
+ if (!obj) {
716
+ return "";
717
+ }
718
+ if (isString(obj)) {
719
+ return obj.trim();
720
+ }
721
+ const classes = [];
722
+ if (isArray(obj)) {
723
+ for (const o of obj) {
724
+ const classList = serializeClass(o);
725
+ if (classList) {
726
+ classes.push(classList);
727
+ }
728
+ }
729
+ } else {
730
+ for (const [key, value] of Object.entries(obj)) {
731
+ if (value) {
732
+ classes.push(key.trim());
733
+ }
734
+ }
735
+ }
736
+ return classes.join(" ");
737
+ };
738
+ var fromCamelToKebabCaseWithDash = (text) => {
739
+ return text.replace(/([A-Z])/g, "-$1").toLowerCase();
740
+ };
741
+ var stringifyStyle = (obj) => {
742
+ if (obj == null) {
743
+ return "";
744
+ }
745
+ if (typeof obj == "object") {
746
+ if (isArray(obj)) {
747
+ throw qError(0 /* stringifyClassOrStyle */, [obj, "style"]);
748
+ } else {
749
+ const chunks = [];
750
+ for (const key in obj) {
751
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
752
+ const value = obj[key];
753
+ if (value != null && typeof value !== "function") {
754
+ if (key.startsWith("--")) {
755
+ chunks.push(key + ":" + value);
756
+ } else {
757
+ chunks.push(fromCamelToKebabCaseWithDash(key) + ":" + setValueForStyle(key, value));
758
+ }
759
+ }
760
+ }
761
+ }
762
+ return chunks.join(";");
763
+ }
764
+ }
765
+ return String(obj);
766
+ };
767
+ var serializeBooleanOrNumberAttribute = (value) => {
768
+ return value != null ? String(value) : null;
769
+ };
770
+ function serializeAttribute(key, value, styleScopedId) {
771
+ if (isClassAttr(key)) {
772
+ const serializedClass = serializeClass(value);
773
+ value = styleScopedId ? styleScopedId + (serializedClass.length ? " " + serializedClass : serializedClass) : serializedClass;
774
+ } else if (key === "style") {
775
+ value = stringifyStyle(value);
776
+ } else if (isEnumeratedBooleanAttribute(key) || typeof value === "number") {
777
+ value = serializeBooleanOrNumberAttribute(value);
778
+ } else if (value === false || value == null) {
779
+ value = null;
780
+ } else if (value === true && isPreventDefault(key)) {
781
+ value = "";
782
+ }
783
+ return value;
784
+ }
785
+ function isEnumeratedBooleanAttribute(key) {
786
+ return isAriaAttribute(key) || ["spellcheck", "draggable", "contenteditable"].includes(key);
787
+ }
788
+ var setValueForStyle = (styleName, value) => {
789
+ if (typeof value === "number" && value !== 0 && !isUnitlessNumber(styleName)) {
790
+ return value + "px";
791
+ }
792
+ return value;
776
793
  };
794
+ function isAriaAttribute(prop) {
795
+ return prop.startsWith("aria-");
796
+ }
777
797
 
778
798
  // packages/qwik/src/core/preloader/queue.ts
779
799
  import { isBrowser as isBrowser3 } from "@qwik.dev/core/build";
@@ -1072,9 +1092,9 @@ var getDevSegmentPath = (mapper, hash2, symbolName, parent) => {
1072
1092
  function createPlatform(opts, resolvedManifest) {
1073
1093
  const mapper = resolvedManifest?.mapper;
1074
1094
  const mapperFn = opts.symbolMapper ? opts.symbolMapper : (symbolName, _chunk, parent) => {
1075
- if (mapper || isDev3 && import.meta.env.MODE !== "test") {
1095
+ if (mapper || isDev4 && import.meta.env.MODE !== "test") {
1076
1096
  const hash2 = getSymbolHash(symbolName);
1077
- const result = !isDev3 ? mapper[hash2] : getDevSegmentPath(mapper, hash2, symbolName, parent);
1097
+ const result = !isDev4 ? mapper[hash2] : getDevSegmentPath(mapper, hash2, symbolName, parent);
1078
1098
  if (!result) {
1079
1099
  if (hash2 === SYNC_QRL) {
1080
1100
  return [hash2, ""];
@@ -1154,12 +1174,12 @@ function getBuildBase(opts) {
1154
1174
  return `${import.meta.env.BASE_URL || "/"}build/`;
1155
1175
  }
1156
1176
  var versions = {
1157
- qwik: "2.0.0-beta.16-dev+a83ccf3",
1177
+ qwik: "2.0.0-beta.18-dev+a8081d4",
1158
1178
  qwikDom: "2.1.19"
1159
1179
  };
1160
1180
 
1161
1181
  // packages/qwik/src/server/ssr-container.ts
1162
- import { isDev as isDev5 } from "@qwik.dev/core/build";
1182
+ import { isDev as isDev6 } from "@qwik.dev/core/build";
1163
1183
  import {
1164
1184
  _SubscriptionData as SubscriptionData,
1165
1185
  _SharedContainer,
@@ -1411,8 +1431,8 @@ var preLoaderOptionsDefault = {
1411
1431
  };
1412
1432
 
1413
1433
  // packages/qwik/src/server/scripts.ts
1414
- var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]),r={},s="-window",i="-document";let a;const c=(t,e)=>Array.from(t.querySelectorAll(e)),l=t=>{const e=[];return o.forEach(n=>e.push(...c(n,t))),e},f=t=>{A(t),c(t,"[q\\\\:shadowroot]").forEach(t=>{const e=t.shadowRoot;e&&f(e)})},p=t=>t&&"function"==typeof t.then,u=(t,e,n=e.type)=>{l("[on"+t+"\\\\:"+n+"]").forEach(o=>{h(o,t,e,n)})},b=e=>{if(void 0===e._qwikjson_){let n=(e===t.documentElement?t.body:e).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){e._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},q=(t,e)=>new CustomEvent(t,{detail:e}),h=async(e,n,o,s=o.type)=>{const i="on"+n+":"+s;e.hasAttribute("preventdefault:"+s)&&o.preventDefault(),e.hasAttribute("stoppropagation:"+s)&&o.stopPropagation();const a=e._qc_,c=a&&a.li.filter(t=>t[0]===i);if(c&&c.length>0){for(const t of c){const n=t[1].getFn([e,o],()=>e.isConnected)(o,e),r=o.cancelBubble;p(n)&&await n,r&&o.stopPropagation()}return}const l=e.qDispatchEvent;if(l)return l(o,n);const f=e.getAttribute(i);if(f){const n=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),s=n.getAttribute("q:base"),i=n.getAttribute("q:version")||"unknown",a=n.getAttribute("q:manifest-hash")||"dev",c=new URL(s,t.baseURI);for(const l of f.split("\\n")){const f=new URL(l,c),u=f.href,q=f.hash.replace(/^#?([^?[|]*).*$/,"$1")||"default",h=performance.now();let d,m,g;const y=l.startsWith("#"),v={qBase:s,qManifest:a,qVersion:i,href:u,symbol:q,element:e,reqTime:h};if(y){const e=n.getAttribute("q:instance");d=(t["qFuncs_"+e]||[])[Number.parseInt(q)],d||(m="sync",g=Error("sym:"+q))}else if(q in r)d=r[q];else{_("qsymbol",v);const t=f.href.split("#")[0];try{const e=import(t);b(n),d=(await e)[q],d?r[q]=d:(m="no-symbol",g=Error(`${q} not in ${t}`))}catch(t){m||(m="async"),g=t}}if(!d){_("qerror",{importError:m,error:g,...v}),console.error(g);break}const w=t.__q_context__;if(e.isConnected)try{t.__q_context__=[e,o,f];const n=d(o,e);p(n)&&await n}catch(t){_("qerror",{error:t,...v})}finally{t.__q_context__=w}}}},_=(e,n)=>{t.dispatchEvent(q(e,n))},d=t=>t.replace(/([A-Z-])/g,t=>"-"+t.toLowerCase()),m=async(t,e)=>{let n=d(t.type),o=t.target;if(e!==i)for(;o&&o.getAttribute;){const e=h(o,"",t,n);let r=t.cancelBubble;p(e)&&await e,r||(r=r||t.cancelBubble||o.hasAttribute("stoppropagation:"+t.type)),o=t.bubbles&&!0!==r?o.parentElement:null}else u(i,t,n)},g=t=>{u(s,t,d(t.type))},y=()=>{const r=t.readyState;if(!a&&("interactive"==r||"complete"==r)&&(o.forEach(f),a=1,_("qinit"),(e.requestIdleCallback??e.setTimeout).bind(e)(()=>_("qidle")),n.has(":qvisible"))){const t=l("[on\\\\:qvisible]"),e=new IntersectionObserver(t=>{for(const n of t)n.isIntersecting&&(e.unobserve(n.target),h(n.target,"",q("qvisible",n)))});t.forEach(t=>e.observe(t))}},v=(t,e,n,o=!1)=>{t.addEventListener(e,n,{capture:o,passive:!1})},w=t=>t.replace(/-./g,t=>t[1].toUpperCase()),E=t=>{const e=t.indexOf(":");let n="",o=t;if(e>=0){const r=t.substring(0,e);""!==r&&r!==s&&r!==i||(n=r,o=t.substring(e+1))}return{scope:n,eventName:w(o)}},A=(...t)=>{for(const r of t)if("string"==typeof r){if(!n.has(r)){n.add(r);const{scope:t,eventName:i}=E(r);t===s?v(e,i,g,!0):o.forEach(e=>v(e,i,e=>m(e,t),!0))}}else o.has(r)||(n.forEach(t=>{const{scope:e,eventName:n}=E(t);v(r,n,t=>m(t,e),!0)}),o.add(r))};if(!("__q_context__"in t)){t.__q_context__=0;const r=e.qwikevents;r&&(Array.isArray(r)?A(...r):A("click","input")),e.qwikevents={events:n,roots:o,push:A},v(t,"readystatechange",y),y()}';
1415
- var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = {};\nconst windowPrefix = "-window";\nconst documentPrefix = "-document";\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst findShadowRoots = (fragment) => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el) => {\n dispatch(el, infix, ev, type);\n });\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail\n});\nconst dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n if (element.hasAttribute("preventdefault:" + eventName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + eventName)) {\n ev.stopPropagation();\n }\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li) => li[0] === attrName);\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([element, ev], () => element.isConnected)(ev, element);\n const cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n if (cancelBubble) {\n ev.stopPropagation();\n }\n }\n return;\n }\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n const attrValue = element.getAttribute(attrName);\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase,\n qManifest,\n qVersion,\n href,\n symbol,\n element,\n reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sym:" + symbol);\n }\n } else if (symbol in symbols) {\n handler = symbols[symbol];\n } else {\n emitEvent("qsymbol", eventData);\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri\n );\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n } else {\n symbols[symbol] = handler;\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", {\n importError,\n error,\n ...eventData\n });\n console.error(error);\n break;\n }\n const previousCtx = doc.__q_context__;\n if (element.isConnected) {\n try {\n doc.__q_context__ = [element, ev, url];\n const results = handler(ev, element);\n if (isPromise(results)) {\n await results;\n }\n } catch (error2) {\n emitEvent("qerror", { error: error2, ...eventData });\n } finally {\n doc.__q_context__ = previousCtx;\n }\n }\n }\n }\n};\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nconst processDocumentEvent = async (ev, scope) => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n if (scope === documentPrefix) {\n broadcast(documentPrefix, ev, type);\n return;\n }\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n cancelBubble || (cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type));\n element = ev.bubbles && cancelBubble !== true ? element.parentElement : null;\n }\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev, camelToKebab(ev.type));\n};\nconst processReadyStateChange = () => {\n const readyState = doc.readyState;\n if (!hasInitialized && (readyState == "interactive" || readyState == "complete")) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n const riC = win.requestIdleCallback ?? win.setTimeout;\n riC.bind(win)(() => emitEvent("qidle"));\n if (events.has(":qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n });\n results.forEach((el) => observer.observe(el));\n }\n }\n};\nconst addEventListener = (el, eventName, handler, capture = false) => {\n el.addEventListener(eventName, handler, { capture, passive: false });\n};\nconst kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nconst processEventName = (event) => {\n const i = event.indexOf(":");\n let scope = "";\n let eventName = event;\n if (i >= 0) {\n const s = event.substring(0, i);\n if (s === "" || s === windowPrefix || s === documentPrefix) {\n scope = s;\n eventName = event.substring(i + 1);\n }\n }\n return { scope, eventName: kebabToCamel(eventName) };\n};\nconst processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if (typeof eventNameOrNode === "string") {\n if (!events.has(eventNameOrNode)) {\n events.add(eventNameOrNode);\n const { scope, eventName } = processEventName(eventNameOrNode);\n if (scope === windowPrefix) {\n addEventListener(win, eventName, processWindowEvent, true);\n } else {\n roots.forEach(\n (root) => addEventListener(root, eventName, (ev) => processDocumentEvent(ev, scope), true)\n );\n }\n }\n } else {\n if (!roots.has(eventNameOrNode)) {\n events.forEach((kebabEventName) => {\n const { scope, eventName } = processEventName(kebabEventName);\n addEventListener(\n eventNameOrNode,\n eventName,\n (ev) => processDocumentEvent(ev, scope),\n true\n );\n });\n roots.add(eventNameOrNode);\n }\n }\n }\n};\nif (!("__q_context__" in doc)) {\n doc.__q_context__ = 0;\n const qwikevents = win.qwikevents;\n if (qwikevents) {\n if (Array.isArray(qwikevents)) {\n processEventOrNode(...qwikevents);\n } else {\n processEventOrNode("click", "input");\n }\n }\n win.qwikevents = {\n events,\n roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n}';
1434
+ var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]),r={},s="-window",i="-document";let a;const c=(t,e)=>Array.from(t.querySelectorAll(e)),l=t=>{const e=[];return o.forEach(n=>e.push(...c(n,t))),e},f=t=>{A(t),c(t,"[q\\\\:shadowroot]").forEach(t=>{const e=t.shadowRoot;e&&f(e)})},p=t=>t&&"function"==typeof t.then,u=(t,e,n=e.type)=>{l("[on"+t+"\\\\:"+n+"]").forEach(o=>{h(o,t,e,n)})},b=e=>{if(void 0===e._qwikjson_){let n=(e===t.documentElement?t.body:e).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){e._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},q=(t,e)=>new CustomEvent(t,{detail:e}),h=async(e,n,o,s=o.type)=>{const i="on"+n+":"+s;e.hasAttribute("preventdefault:"+s)&&o.preventDefault(),e.hasAttribute("stoppropagation:"+s)&&o.stopPropagation();const a=e._qc_,c=a&&a.li.filter(t=>t[0]===i);if(c&&c.length>0){for(const t of c){const n=t[1].getFn([e,o],()=>e.isConnected)(o,e),r=o.cancelBubble;p(n)&&await n,r&&o.stopPropagation()}return}const l=e.qDispatchEvent;if(l)return l(o,n);const f=e.getAttribute(i);if(f){const n=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),s=n.getAttribute("q:base"),i=n.getAttribute("q:version")||"unknown",a=n.getAttribute("q:manifest-hash")||"dev",c=new URL(s,t.baseURI);for(const l of f.split("\\n")){const f=new URL(l,c),u=f.href,q=f.hash.replace(/^#?([^?[|]*).*$/,"$1")||"default",h=performance.now();let d,m,g;const y=l.startsWith("#"),v={qBase:s,qManifest:a,qVersion:i,href:u,symbol:q,element:e,reqTime:h};if(y){const e=n.getAttribute("q:instance");d=(t["qFuncs_"+e]||[])[Number.parseInt(q)],d||(m="sync",g=Error("sym:"+q))}else if(q in r)d=r[q];else{_("qsymbol",v);const t=f.href.split("#")[0];try{const e=import(t);b(n),d=(await e)[q],d?r[q]=d:(m="no-symbol",g=Error(`${q} not in ${t}`))}catch(t){m||(m="async"),g=t}}if(!d){_("qerror",{importError:m,error:g,...v}),console.error(g);break}const w=t.__q_context__;if(e.isConnected)try{t.__q_context__=[e,o,f];const n=d(o,e);p(n)&&await n}catch(t){_("qerror",{error:t,...v})}finally{t.__q_context__=w}}}},_=(e,n)=>{t.dispatchEvent(q(e,n))},d=t=>t.replace(/([A-Z-])/g,t=>"-"+t.toLowerCase()),m=async(t,e)=>{let n=d(t.type),o=t.target;if(e!==i)for(;o&&o.getAttribute;){const e=h(o,"",t,n);let r=t.cancelBubble;p(e)&&await e,r||(r=r||t.cancelBubble||o.hasAttribute("stoppropagation:"+t.type)),o=t.bubbles&&!0!==r?o.parentElement:null}else u(i,t,n)},g=t=>{u(s,t,d(t.type))},y=()=>{const r=t.readyState;if(!a&&("interactive"==r||"complete"==r)&&(o.forEach(f),a=1,_("qinit"),(e.requestIdleCallback??e.setTimeout).bind(e)(()=>_("qidle")),n.has(":qvisible"))){const t=l("[on\\\\:qvisible]"),e=new IntersectionObserver(t=>{for(const n of t)n.isIntersecting&&(e.unobserve(n.target),h(n.target,"",q("qvisible",n)))});t.forEach(t=>e.observe(t))}},v=(t,e,n,o=!1)=>{t.addEventListener(e,n,{capture:o,passive:!1})},w=t=>t.replace(/-./g,t=>t[1].toUpperCase()),E=t=>{const e=t.indexOf(":");let n="",o=t;if(e>=0){const r=t.substring(0,e);""!==r&&r!==s&&r!==i||(n=r,o=t.substring(e+1))}return{scope:n,eventName:w(o)}},A=(...t)=>{for(const r of t)if("string"==typeof r){if(!n.has(r)){n.add(r);const{scope:t,eventName:i}=E(r);t===s?v(e,i,g,!0):o.forEach(e=>v(e,i,e=>m(e,t),!0))}}else o.has(r)||(n.forEach(t=>{const{scope:e,eventName:n}=E(t);v(r,n,t=>m(t,e),!0)}),o.add(r))};if(!("__q_context__"in t)){t.__q_context__=0;const r=e.qwikevents;r&&(Array.isArray(r)?A(...r):A(":click",":input")),e.qwikevents={events:n,roots:o,push:A},v(t,"readystatechange",y),y()}';
1435
+ var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = {};\nconst windowPrefix = "-window";\nconst documentPrefix = "-document";\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst findShadowRoots = (fragment) => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el) => {\n dispatch(el, infix, ev, type);\n });\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail\n});\nconst dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n if (element.hasAttribute("preventdefault:" + eventName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + eventName)) {\n ev.stopPropagation();\n }\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li) => li[0] === attrName);\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([element, ev], () => element.isConnected)(ev, element);\n const cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n if (cancelBubble) {\n ev.stopPropagation();\n }\n }\n return;\n }\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n const attrValue = element.getAttribute(attrName);\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase,\n qManifest,\n qVersion,\n href,\n symbol,\n element,\n reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sym:" + symbol);\n }\n } else if (symbol in symbols) {\n handler = symbols[symbol];\n } else {\n emitEvent("qsymbol", eventData);\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri\n );\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n } else {\n symbols[symbol] = handler;\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", {\n importError,\n error,\n ...eventData\n });\n console.error(error);\n break;\n }\n const previousCtx = doc.__q_context__;\n if (element.isConnected) {\n try {\n doc.__q_context__ = [element, ev, url];\n const results = handler(ev, element);\n if (isPromise(results)) {\n await results;\n }\n } catch (error2) {\n emitEvent("qerror", { error: error2, ...eventData });\n } finally {\n doc.__q_context__ = previousCtx;\n }\n }\n }\n }\n};\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nconst processDocumentEvent = async (ev, scope) => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n if (scope === documentPrefix) {\n broadcast(documentPrefix, ev, type);\n return;\n }\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n cancelBubble || (cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type));\n element = ev.bubbles && cancelBubble !== true ? element.parentElement : null;\n }\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev, camelToKebab(ev.type));\n};\nconst processReadyStateChange = () => {\n const readyState = doc.readyState;\n if (!hasInitialized && (readyState == "interactive" || readyState == "complete")) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n const riC = win.requestIdleCallback ?? win.setTimeout;\n riC.bind(win)(() => emitEvent("qidle"));\n if (events.has(":qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n });\n results.forEach((el) => observer.observe(el));\n }\n }\n};\nconst addEventListener = (el, eventName, handler, capture = false) => {\n el.addEventListener(eventName, handler, { capture, passive: false });\n};\nconst kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nconst processEventName = (event) => {\n const i = event.indexOf(":");\n let scope = "";\n let eventName = event;\n if (i >= 0) {\n const s = event.substring(0, i);\n if (s === "" || s === windowPrefix || s === documentPrefix) {\n scope = s;\n eventName = event.substring(i + 1);\n }\n }\n return { scope, eventName: kebabToCamel(eventName) };\n};\nconst processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if (typeof eventNameOrNode === "string") {\n if (!events.has(eventNameOrNode)) {\n events.add(eventNameOrNode);\n const { scope, eventName } = processEventName(eventNameOrNode);\n if (scope === windowPrefix) {\n addEventListener(win, eventName, processWindowEvent, true);\n } else {\n roots.forEach(\n (root) => addEventListener(root, eventName, (ev) => processDocumentEvent(ev, scope), true)\n );\n }\n }\n } else {\n if (!roots.has(eventNameOrNode)) {\n events.forEach((kebabEventName) => {\n const { scope, eventName } = processEventName(kebabEventName);\n addEventListener(\n eventNameOrNode,\n eventName,\n (ev) => processDocumentEvent(ev, scope),\n true\n );\n });\n roots.add(eventNameOrNode);\n }\n }\n }\n};\nif (!("__q_context__" in doc)) {\n doc.__q_context__ = 0;\n const qwikevents = win.qwikevents;\n if (qwikevents) {\n if (Array.isArray(qwikevents)) {\n processEventOrNode(...qwikevents);\n } else {\n processEventOrNode(":click", ":input");\n }\n }\n win.qwikevents = {\n events,\n roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n}';
1416
1436
  var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `const t='script[type="qwik/backpatch"]',e=document.currentScript;if(e){const o=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||"[]"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=r.hasAttribute(":")?0:-1;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let s=t[e+2];for(;c<o&&(r=n.nextNode(),r);)r.hasAttribute(":")&&c++;const l=r;null==s||!1===s?l.removeAttribute(i):("boolean"==typeof s&&(s=""),l.setAttribute(i,s))}}}}`;
1417
1437
  var QWIK_BACKPATCH_EXECUTOR_DEBUG = `const BACKPATCH_DATA_SELECTOR = 'script[type="qwik/backpatch"]';
1418
1438
  const executorScript = document.currentScript;
@@ -1467,7 +1487,7 @@ function getQwikBackpatchExecutorScript(opts = {}) {
1467
1487
 
1468
1488
  // packages/qwik/src/server/ssr-node.ts
1469
1489
  import { _isJSXNode as isJSXNode, _EMPTY_ARRAY, _EFFECT_BACK_REF } from "@qwik.dev/core/internal";
1470
- import { isDev as isDev4 } from "@qwik.dev/core/build";
1490
+ import { isDev as isDev5 } from "@qwik.dev/core/build";
1471
1491
  var SsrNode = class {
1472
1492
  constructor(parentComponent, id, attributesIndex, cleanupQueue, vnodeData, currentFile) {
1473
1493
  this.parentComponent = parentComponent;
@@ -1483,6 +1503,7 @@ var SsrNode = class {
1483
1503
  */
1484
1504
  __publicField(this, "id");
1485
1505
  __publicField(this, "flags");
1506
+ __publicField(this, "dirty", 0 /* NONE */);
1486
1507
  __publicField(this, "children", null);
1487
1508
  __publicField(this, "attrs");
1488
1509
  /** Local props which don't serialize; */
@@ -1491,7 +1512,7 @@ var SsrNode = class {
1491
1512
  this.flags = 1 /* Updatable */;
1492
1513
  this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : _EMPTY_ARRAY;
1493
1514
  this.parentComponent?.addChild(this);
1494
- if (isDev4 && id.indexOf("undefined") != -1) {
1515
+ if (isDev5 && id.indexOf("undefined") != -1) {
1495
1516
  throw new Error(`Invalid SSR node id: ${id}`);
1496
1517
  }
1497
1518
  }
@@ -1555,7 +1576,7 @@ var SsrNode = class {
1555
1576
  }
1556
1577
  }
1557
1578
  toString() {
1558
- if (isDev4) {
1579
+ if (isDev5) {
1559
1580
  let stringifiedAttrs = "";
1560
1581
  for (let i = 0; i < this.attrs.length; i += 2) {
1561
1582
  const key = this.attrs[i];
@@ -1639,13 +1660,6 @@ var SsrComponentFrame = class {
1639
1660
  projectionNode.setProp(QSlotParent, this.componentNode.id);
1640
1661
  return children;
1641
1662
  }
1642
- releaseUnclaimedProjections(unclaimedProjections) {
1643
- if (this.slots.length) {
1644
- unclaimedProjections.push(this);
1645
- unclaimedProjections.push(this.projectionScopedStyle);
1646
- unclaimedProjections.push.apply(unclaimedProjections, this.slots);
1647
- }
1648
- }
1649
1663
  };
1650
1664
 
1651
1665
  // packages/qwik/src/server/tag-nesting.ts
@@ -2096,7 +2110,7 @@ var StringBufferWriter = class {
2096
2110
  var EMPTY_OBJ = {};
2097
2111
  var SSRContainer = class extends _SharedContainer {
2098
2112
  constructor(opts) {
2099
- super(() => null, opts.renderOptions.serverData ?? EMPTY_OBJ, opts.locale);
2113
+ super(opts.renderOptions.serverData ?? EMPTY_OBJ, opts.locale);
2100
2114
  __publicField(this, "tag");
2101
2115
  __publicField(this, "isHtml");
2102
2116
  __publicField(this, "writer");
@@ -2135,8 +2149,6 @@ var SSRContainer = class extends _SharedContainer {
2135
2149
  __publicField(this, "depthFirstElementCount", -1);
2136
2150
  __publicField(this, "vNodeDatas", []);
2137
2151
  __publicField(this, "componentStack", []);
2138
- __publicField(this, "unclaimedProjections", []);
2139
- __publicField(this, "unclaimedProjectionComponentFrameQueue", []);
2140
2152
  __publicField(this, "cleanupQueue", []);
2141
2153
  __publicField(this, "$instanceHash$", hash());
2142
2154
  // Temporary flag to find missing roots after the state was serialized
@@ -2242,7 +2254,7 @@ var SSRContainer = class extends _SharedContainer {
2242
2254
  containerAttributes[QContainerAttr] = "paused" /* PAUSED */;
2243
2255
  containerAttributes[QRuntimeAttr] = "2";
2244
2256
  containerAttributes[QVersionAttr] = this.$version$ ?? "dev";
2245
- containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (isDev5 ? "ssr-dev" : "ssr");
2257
+ containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (isDev6 ? "ssr-dev" : "ssr");
2246
2258
  containerAttributes[QBaseAttr] = this.$buildBase$ || "";
2247
2259
  containerAttributes[QLocaleAttr] = this.$locale$;
2248
2260
  containerAttributes[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
@@ -2255,14 +2267,14 @@ var SSRContainer = class extends _SharedContainer {
2255
2267
  },
2256
2268
  []
2257
2269
  );
2258
- this.openElement(this.tag, containerAttributeArray);
2270
+ this.openElement(this.tag, null, containerAttributeArray);
2259
2271
  }
2260
2272
  /** Renders closing tag for current container */
2261
2273
  closeContainer() {
2262
2274
  return this.closeElement();
2263
2275
  }
2264
2276
  /** Renders opening tag for DOM element */
2265
- openElement(elementName, varAttrs, constAttrs, currentFile) {
2277
+ openElement(elementName, key, varAttrs, constAttrs, currentFile) {
2266
2278
  const isQwikStyle = isQwikStyleElement(elementName, varAttrs) || isQwikStyleElement(elementName, constAttrs);
2267
2279
  if (
2268
2280
  // don't append qwik loader before qwik style elements
@@ -2289,7 +2301,11 @@ var SSRContainer = class extends _SharedContainer {
2289
2301
  innerHTML = this.writeAttrs(elementName, varAttrs, false, currentFile);
2290
2302
  }
2291
2303
  this.write(" " + Q_PROPS_SEPARATOR);
2292
- isDev5 && this.write('=""');
2304
+ if (key !== null) {
2305
+ this.write(`="${key}"`);
2306
+ } else if (isDev6) {
2307
+ this.write('=""');
2308
+ }
2293
2309
  if (constAttrs && constAttrs.length) {
2294
2310
  innerHTML = this.writeAttrs(elementName, constAttrs, true, currentFile) || innerHTML;
2295
2311
  }
@@ -2406,13 +2422,38 @@ var SSRContainer = class extends _SharedContainer {
2406
2422
  const localProjectionDepth = this.getComponentFrame()?.projectionDepth || 0;
2407
2423
  return this.getComponentFrame(localProjectionDepth);
2408
2424
  }
2409
- /** Writes closing data to vNodeData for component boundaries and mark unclaimed projections */
2410
- closeComponent() {
2425
+ /** Writes closing data to vNodeData for component boundaries and emit unclaimed projections inline */
2426
+ async closeComponent() {
2411
2427
  const componentFrame = this.componentStack.pop();
2412
- componentFrame.releaseUnclaimedProjections(this.unclaimedProjections);
2428
+ await this.emitUnclaimedProjectionForComponent(componentFrame);
2413
2429
  this.closeFragment();
2414
2430
  this.currentComponentNode = this.currentComponentNode?.parentComponent || null;
2415
2431
  }
2432
+ async emitUnclaimedProjectionForComponent(componentFrame) {
2433
+ if (componentFrame.slots.length === 0) {
2434
+ return;
2435
+ }
2436
+ this.openElement(QTemplate, null, ["hidden", true, "aria-hidden", "true"], null);
2437
+ const scopedStyleId = componentFrame.projectionScopedStyle;
2438
+ for (let i = 0; i < componentFrame.slots.length; i += 2) {
2439
+ const slotName = componentFrame.slots[i];
2440
+ const children = componentFrame.slots[i + 1];
2441
+ this.openFragment(
2442
+ isDev6 ? [DEBUG_TYPE, "P" /* Projection */, QSlotParent, componentFrame.componentNode.id] : [QSlotParent, componentFrame.componentNode.id]
2443
+ );
2444
+ const lastNode = this.getOrCreateLastNode();
2445
+ if (lastNode.vnodeData) {
2446
+ lastNode.vnodeData[0] |= 16 /* SERIALIZE */;
2447
+ }
2448
+ componentFrame.componentNode.setProp(slotName, lastNode.id);
2449
+ await _walkJSX(this, children, {
2450
+ currentStyleScoped: scopedStyleId,
2451
+ parentComponentFrame: componentFrame.projectionComponentFrame
2452
+ });
2453
+ this.closeFragment();
2454
+ }
2455
+ this.closeElement();
2456
+ }
2416
2457
  /** Write a text node with correct escaping. Save the length of the text node in the vNodeData. */
2417
2458
  textNode(text) {
2418
2459
  this.write(escapeHTML(text));
@@ -2445,7 +2486,7 @@ var SSRContainer = class extends _SharedContainer {
2445
2486
  return this.lastNode;
2446
2487
  }
2447
2488
  addUnclaimedProjection(frame, name, children) {
2448
- this.unclaimedProjections.push(frame, null, name, children);
2489
+ frame.slots.push(name, children);
2449
2490
  }
2450
2491
  $processInjectionsFromManifest$() {
2451
2492
  const injections = this.resolvedManifest.manifest.injections;
@@ -2488,7 +2529,7 @@ var SSRContainer = class extends _SharedContainer {
2488
2529
  }
2489
2530
  }
2490
2531
  _styleNode(styleId, content) {
2491
- this.openElement("style", [QStyle, styleId]);
2532
+ this.openElement("style", null, [QStyle, styleId]);
2492
2533
  this.write(content);
2493
2534
  this.closeElement();
2494
2535
  }
@@ -2496,18 +2537,15 @@ var SSRContainer = class extends _SharedContainer {
2496
2537
  emitContainerData() {
2497
2538
  return maybeThen(
2498
2539
  this.resolvePromiseAttributes(),
2499
- () => maybeThen(
2500
- this.emitUnclaimedProjection(),
2501
- () => maybeThen(this.emitStateData(), () => {
2502
- this.$noMoreRoots$ = true;
2503
- this.emitVNodeData();
2504
- preloaderPost(this, this.renderOptions, this.$serverData$?.nonce);
2505
- this.emitSyncFnsData();
2506
- this.emitPatchDataIfNeeded();
2507
- this.emitExecutorIfNeeded();
2508
- this.emitQwikLoaderAtBottomIfNeeded();
2509
- })
2510
- )
2540
+ () => maybeThen(this.emitStateData(), () => {
2541
+ this.$noMoreRoots$ = true;
2542
+ this.emitVNodeData();
2543
+ preloaderPost(this, this.renderOptions, this.$serverData$?.nonce);
2544
+ this.emitSyncFnsData();
2545
+ this.emitPatchDataIfNeeded();
2546
+ this.emitExecutorIfNeeded();
2547
+ this.emitQwikLoaderAtBottomIfNeeded();
2548
+ })
2511
2549
  );
2512
2550
  }
2513
2551
  /**
@@ -2532,7 +2570,7 @@ var SSRContainer = class extends _SharedContainer {
2532
2570
  if (!this.serializationCtx.$roots$.length) {
2533
2571
  return;
2534
2572
  }
2535
- this.openElement("script", ["type", "qwik/vnode"]);
2573
+ this.openElement("script", null, ["type", "qwik/vnode"]);
2536
2574
  const vNodeAttrsStack = [];
2537
2575
  const vNodeData = this.vNodeDatas;
2538
2576
  let lastSerializedIdx = 0;
@@ -2564,9 +2602,11 @@ var SSRContainer = class extends _SharedContainer {
2564
2602
  this.write(VNodeDataChar.CLOSE_CHAR);
2565
2603
  } else if (value === WRITE_ELEMENT_ATTRS) {
2566
2604
  if (fragmentAttrs && fragmentAttrs.length) {
2605
+ this.write(VNodeDataChar.SEPARATOR_CHAR);
2567
2606
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2568
2607
  this.writeFragmentAttrs(fragmentAttrs);
2569
2608
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2609
+ this.write(VNodeDataChar.SEPARATOR_CHAR);
2570
2610
  fragmentAttrs = vNodeAttrsStack.pop();
2571
2611
  }
2572
2612
  } else if (value >= 0) {
@@ -2635,12 +2675,14 @@ var SSRContainer = class extends _SharedContainer {
2635
2675
  case QSlot:
2636
2676
  this.write(VNodeDataChar.SLOT_CHAR);
2637
2677
  break;
2638
- default:
2678
+ default: {
2679
+ encodeValue = true;
2639
2680
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2640
- this.write(key);
2681
+ this.write(encodeVNodeDataString(key));
2641
2682
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2683
+ }
2642
2684
  }
2643
- const encodedValue = encodeValue ? encodeURI(value) : value;
2685
+ const encodedValue = encodeVNodeDataString(encodeValue ? encodeURI(value) : value);
2644
2686
  const isEncoded = encodeValue ? encodedValue !== value : false;
2645
2687
  if (isEncoded) {
2646
2688
  this.write(VNodeDataChar.SEPARATOR_CHAR);
@@ -2655,7 +2697,7 @@ var SSRContainer = class extends _SharedContainer {
2655
2697
  if (!this.serializationCtx.$roots$.length) {
2656
2698
  return;
2657
2699
  }
2658
- this.openElement("script", ["type", "qwik/state"]);
2700
+ this.openElement("script", null, ["type", "qwik/state"]);
2659
2701
  return maybeThen(this.serializationCtx.$serialize$(), () => {
2660
2702
  this.closeElement();
2661
2703
  });
@@ -2667,7 +2709,7 @@ var SSRContainer = class extends _SharedContainer {
2667
2709
  if (this.renderOptions.serverData?.nonce) {
2668
2710
  scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
2669
2711
  }
2670
- this.openElement("script", scriptAttrs);
2712
+ this.openElement("script", null, scriptAttrs);
2671
2713
  this.write(Q_FUNCS_PREFIX.replace("HASH", this.$instanceHash$));
2672
2714
  this.write("[");
2673
2715
  this.writeArray(fns, ",");
@@ -2689,7 +2731,7 @@ var SSRContainer = class extends _SharedContainer {
2689
2731
  if (this.renderOptions.serverData?.nonce) {
2690
2732
  scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
2691
2733
  }
2692
- this.openElement("script", scriptAttrs);
2734
+ this.openElement("script", null, scriptAttrs);
2693
2735
  this.write(JSON.stringify(patches));
2694
2736
  this.closeElement();
2695
2737
  }
@@ -2702,8 +2744,8 @@ var SSRContainer = class extends _SharedContainer {
2702
2744
  if (this.renderOptions.serverData?.nonce) {
2703
2745
  scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
2704
2746
  }
2705
- this.openElement("script", scriptAttrs);
2706
- const backpatchScript = getQwikBackpatchExecutorScript({ debug: isDev5 });
2747
+ this.openElement("script", null, scriptAttrs);
2748
+ const backpatchScript = getQwikBackpatchExecutorScript({ debug: isDev6 });
2707
2749
  this.write(backpatchScript);
2708
2750
  this.closeElement();
2709
2751
  }
@@ -2722,13 +2764,13 @@ var SSRContainer = class extends _SharedContainer {
2722
2764
  if (nonce) {
2723
2765
  linkAttrs.push("nonce", nonce);
2724
2766
  }
2725
- this.openElement("link", linkAttrs);
2767
+ this.openElement("link", null, linkAttrs);
2726
2768
  this.closeElement();
2727
2769
  const scriptAttrs = ["async", true, "type", "module", "src", qwikLoaderBundle];
2728
2770
  if (nonce) {
2729
2771
  scriptAttrs.push("nonce", nonce);
2730
2772
  }
2731
- this.openElement("script", scriptAttrs);
2773
+ this.openElement("script", null, scriptAttrs);
2732
2774
  this.closeElement();
2733
2775
  }
2734
2776
  }
@@ -2739,7 +2781,7 @@ var SSRContainer = class extends _SharedContainer {
2739
2781
  if (this.renderOptions.serverData?.nonce) {
2740
2782
  scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
2741
2783
  }
2742
- this.openElement("script", scriptAttrs);
2784
+ this.openElement("script", null, scriptAttrs);
2743
2785
  this.write(qwikLoaderScript);
2744
2786
  this.closeElement();
2745
2787
  }
@@ -2758,64 +2800,13 @@ var SSRContainer = class extends _SharedContainer {
2758
2800
  if (nonce) {
2759
2801
  scriptAttrs.push("nonce", nonce);
2760
2802
  }
2761
- this.openElement("script", scriptAttrs);
2803
+ this.openElement("script", null, scriptAttrs);
2762
2804
  this.write(`(window.qwikevents||(window.qwikevents=[])).push(`);
2763
2805
  this.writeArray(eventNames, ", ");
2764
2806
  this.write(")");
2765
2807
  this.closeElement();
2766
2808
  }
2767
2809
  }
2768
- async emitUnclaimedProjection() {
2769
- const unclaimedProjections = this.unclaimedProjections;
2770
- if (unclaimedProjections.length) {
2771
- const previousCurrentComponentNode = this.currentComponentNode;
2772
- try {
2773
- this.openElement(QTemplate, ["hidden", true, "aria-hidden", "true"], null);
2774
- let idx = 0;
2775
- let ssrComponentNode = null;
2776
- let ssrComponentFrame = null;
2777
- let scopedStyleId = null;
2778
- for (let i = 0; i < unclaimedProjections.length; i += 4) {
2779
- this.unclaimedProjectionComponentFrameQueue.push(
2780
- unclaimedProjections[i]
2781
- );
2782
- }
2783
- while (idx < unclaimedProjections.length) {
2784
- const value = unclaimedProjections[idx++];
2785
- if (value instanceof SsrComponentFrame) {
2786
- ssrComponentNode = this.currentComponentNode = value.componentNode;
2787
- ssrComponentFrame = value;
2788
- scopedStyleId = unclaimedProjections[idx++];
2789
- } else if (typeof value === "string") {
2790
- const children = unclaimedProjections[idx++];
2791
- if (!ssrComponentFrame?.hasSlot(value)) {
2792
- ssrComponentFrame && ssrComponentFrame.componentNode.removeProp(value);
2793
- continue;
2794
- }
2795
- this.unclaimedProjectionComponentFrameQueue.shift();
2796
- this.openFragment(
2797
- isDev5 ? [DEBUG_TYPE, "P" /* Projection */, QSlotParent, ssrComponentNode.id] : [QSlotParent, ssrComponentNode.id]
2798
- );
2799
- const lastNode = this.getOrCreateLastNode();
2800
- if (lastNode.vnodeData) {
2801
- lastNode.vnodeData[0] |= 16 /* SERIALIZE */;
2802
- }
2803
- ssrComponentNode?.setProp(value, lastNode.id);
2804
- await _walkJSX(this, children, {
2805
- currentStyleScoped: scopedStyleId,
2806
- parentComponentFrame: null
2807
- });
2808
- this.closeFragment();
2809
- } else {
2810
- throw Error();
2811
- }
2812
- }
2813
- this.closeElement();
2814
- } finally {
2815
- this.currentComponentNode = previousCurrentComponentNode;
2816
- }
2817
- }
2818
- }
2819
2810
  // Keep in sync with process-vnode-data.unit.ts
2820
2811
  emitVNodeSeparators(lastSerializedIdx, elementIdx) {
2821
2812
  let skipCount = elementIdx - lastSerializedIdx;
@@ -2844,7 +2835,7 @@ var SSRContainer = class extends _SharedContainer {
2844
2835
  }
2845
2836
  createAndPushFrame(elementName, depthFirstElementIdx, currentFile) {
2846
2837
  let tagNesting = 10 /* ANYTHING */;
2847
- if (isDev5) {
2838
+ if (isDev6) {
2848
2839
  if (!this.currentElementFrame) {
2849
2840
  tagNesting = initialTag(elementName);
2850
2841
  } else {
@@ -2890,7 +2881,7 @@ var SSRContainer = class extends _SharedContainer {
2890
2881
  elementName,
2891
2882
  depthFirstElementIdx,
2892
2883
  vNodeData: [0 /* NONE */],
2893
- currentFile: isDev5 ? currentFile || null : null
2884
+ currentFile: isDev6 ? currentFile || null : null
2894
2885
  };
2895
2886
  this.currentElementFrame = frame;
2896
2887
  this.vNodeDatas.push(frame.vNodeData);
@@ -2922,8 +2913,8 @@ var SSRContainer = class extends _SharedContainer {
2922
2913
  let value = attrs[i];
2923
2914
  let styleScopedId = null;
2924
2915
  if (isSSRUnsafeAttr(key)) {
2925
- if (isDev5) {
2926
- throw qError(32 /* unsafeAttr */);
2916
+ if (isDev6) {
2917
+ throw qError(32 /* unsafeAttr */, [key]);
2927
2918
  }
2928
2919
  continue;
2929
2920
  }
@@ -2977,7 +2968,7 @@ var SSRContainer = class extends _SharedContainer {
2977
2968
  }
2978
2969
  if (tag === "textarea" && key === "value") {
2979
2970
  if (value && typeof value !== "string") {
2980
- if (isDev5) {
2971
+ if (isDev6) {
2981
2972
  throw qError(23 /* wrongTextareaValue */, [currentFile, value]);
2982
2973
  }
2983
2974
  continue;
@@ -3082,7 +3073,7 @@ var renderToStream = async (jsx, opts) => {
3082
3073
  });
3083
3074
  await setServerPlatform(opts, resolvedManifest);
3084
3075
  await ssrContainer.render(jsx);
3085
- await ssrContainer.$scheduler$(255 /* WAIT_FOR_QUEUE */).$returnValue$;
3076
+ await ssrContainer.$renderPromise$;
3086
3077
  flush();
3087
3078
  const snapshotResult = getSnapshotResult(ssrContainer);
3088
3079
  const isDynamic = snapshotResult.resources.some((r) => r._cache !== Infinity);