@qwik.dev/core 2.0.0-beta.1 → 2.0.0-beta.3

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/testing 2.0.0-beta.1-dev+495e8d9
3
+ * @qwik.dev/core/testing 2.0.0-beta.3-dev+aa098fc
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
@@ -22151,7 +22151,7 @@ module.exports = __toCommonJS(index_exports);
22151
22151
 
22152
22152
  // packages/qwik/src/testing/vdom-diff.unit-util.ts
22153
22153
  var import_core = require("../core.cjs");
22154
- var import_internal3 = require("@qwik.dev/core/internal");
22154
+ var import_internal4 = require("@qwik.dev/core/internal");
22155
22155
  var import_vitest = require("vitest");
22156
22156
 
22157
22157
  // packages/qwik/src/core/client/vnode.ts
@@ -23083,6 +23083,7 @@ var isServerPlatform = () => {
23083
23083
  // packages/qwik/src/core/shared/qrl/qrl-class.ts
23084
23084
  var import_build6 = require("@qwik.dev/core/build");
23085
23085
  var import_preloader = require("@qwik.dev/core/preloader");
23086
+ var resolvedSymbol = Symbol("resolved");
23086
23087
  var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef) => {
23087
23088
  if (qDev && qSerialize) {
23088
23089
  if (captureRef) {
@@ -23131,9 +23132,6 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef) => {
23131
23132
  };
23132
23133
  return bound;
23133
23134
  }
23134
- const resolveLazy = (containerEl) => {
23135
- return symbolRef !== null ? symbolRef : resolve(containerEl);
23136
- };
23137
23135
  const wrapFn = (fn) => {
23138
23136
  if (typeof fn !== "function" || !(capture == null ? void 0 : capture.length) && !(captureRef == null ? void 0 : captureRef.length)) {
23139
23137
  return fn;
@@ -23159,7 +23157,10 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef) => {
23159
23157
  return invoke.call(this, context, fn, ...args);
23160
23158
  };
23161
23159
  };
23162
- const resolve = async (containerEl) => {
23160
+ if (symbolFn && resolvedSymbol in symbolFn) {
23161
+ symbolRef = symbolFn[resolvedSymbol];
23162
+ }
23163
+ const resolve = symbolRef ? async () => symbolRef : async (containerEl) => {
23163
23164
  if (symbolRef !== null) {
23164
23165
  return symbolRef;
23165
23166
  }
@@ -23179,14 +23180,17 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef) => {
23179
23180
  const start = now();
23180
23181
  const ctx = tryGetInvokeContext();
23181
23182
  if (symbolFn !== null) {
23182
- symbolRef = symbolFn().then(
23183
- (module2) => qrl.resolved = wrapFn(symbolRef = module2[symbol])
23184
- );
23183
+ symbolRef = symbolFn().then((module2) => {
23184
+ const resolved = wrapFn(symbolRef = module2[symbol]);
23185
+ symbolFn[resolvedSymbol] = resolved;
23186
+ qrl.resolved = resolved;
23187
+ return resolved;
23188
+ });
23185
23189
  } else {
23186
23190
  const imported = getPlatform().importSymbol(_containerEl, chunk, symbol);
23187
23191
  symbolRef = maybeThen(imported, (ref) => qrl.resolved = wrapFn(symbolRef = ref));
23188
23192
  }
23189
- if (typeof symbolRef === "object" && isPromise(symbolRef)) {
23193
+ if (isPromise(symbolRef)) {
23190
23194
  symbolRef.then(
23191
23195
  () => emitUsedSymbol(symbol, ctx == null ? void 0 : ctx.$element$, start),
23192
23196
  (err) => {
@@ -23212,7 +23216,6 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef) => {
23212
23216
  getHash: () => hash3,
23213
23217
  getCaptured: () => captureRef,
23214
23218
  resolve,
23215
- $resolveLazy$: resolveLazy,
23216
23219
  $setContainer$: setContainer,
23217
23220
  $chunk$: chunk,
23218
23221
  $symbol$: symbol,
@@ -24148,7 +24151,6 @@ var executeComponent = (container, renderHost, subscriptionHost, componentQRL, p
24148
24151
  if (!isInlineComponent) {
24149
24152
  container.setHostProp(renderHost, ELEMENT_SEQ_IDX, null);
24150
24153
  container.setHostProp(renderHost, USE_ON_LOCAL_SEQ_IDX, null);
24151
- container.setHostProp(renderHost, ELEMENT_PROPS, props);
24152
24154
  }
24153
24155
  if (vnode_isVNode(renderHost)) {
24154
24156
  clearAllEffects(container, renderHost);
@@ -25160,11 +25162,22 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
25160
25162
  shouldRender = true;
25161
25163
  }
25162
25164
  if (host) {
25163
- const vNodeProps = vnode_getProp(host, ELEMENT_PROPS, container.$getObjectById$);
25164
- shouldRender = shouldRender || propsDiffer(jsxProps, vNodeProps);
25165
+ let vNodeProps = vnode_getProp(host, ELEMENT_PROPS, container.$getObjectById$);
25166
+ const propsAreDifferent = propsDiffer(jsxProps, vNodeProps);
25167
+ shouldRender = shouldRender || propsAreDifferent;
25165
25168
  if (shouldRender) {
25169
+ if (propsAreDifferent) {
25170
+ if (vNodeProps) {
25171
+ vNodeProps[_CONST_PROPS] = jsxProps[_CONST_PROPS];
25172
+ vNodeProps[_VAR_PROPS] = jsxProps[_VAR_PROPS];
25173
+ } else if (jsxProps) {
25174
+ vnode_setProp(host, ELEMENT_PROPS, jsxProps);
25175
+ vNodeProps = jsxProps;
25176
+ }
25177
+ }
25178
+ vnode_setProp(host, OnRenderProp, componentQRL);
25166
25179
  host[0 /* flags */] &= ~32 /* Deleted */;
25167
- container.$scheduler$(6 /* COMPONENT */, host, componentQRL, jsxProps);
25180
+ container.$scheduler$(6 /* COMPONENT */, host, componentQRL, vNodeProps);
25168
25181
  }
25169
25182
  }
25170
25183
  descendContentToProject(jsxNode2.children, host);
@@ -25572,7 +25585,7 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
25572
25585
  return runUptoChore.$returnValue$;
25573
25586
  }
25574
25587
  function executeChore(chore, isServer5) {
25575
- var _a, _b, _c;
25588
+ var _a, _b;
25576
25589
  const host = chore.$host$;
25577
25590
  DEBUG6 && debugTrace("execute", chore, currentChore, choreQueue);
25578
25591
  assertEqual(currentChore, null, "Chore already running.");
@@ -25708,21 +25721,24 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
25708
25721
  {
25709
25722
  const target = chore.$target$;
25710
25723
  const effects = chore.$payload$;
25724
+ const ctx = newInvokeContext();
25725
+ ctx.$container$ = container;
25711
25726
  if (target instanceof ComputedSignalImpl || target instanceof WrappedSignalImpl) {
25712
25727
  const forceRunEffects = target.$forceRunEffects$;
25713
25728
  target.$forceRunEffects$ = false;
25714
- if (!((_b = target.$effects$) == null ? void 0 : _b.size)) {
25729
+ if (!(effects == null ? void 0 : effects.size)) {
25715
25730
  break;
25716
25731
  }
25717
- returnValue = retryOnPromise(() => {
25718
- if (target.$computeIfNeeded$() || forceRunEffects) {
25719
- triggerEffects(container, target, effects);
25732
+ returnValue = maybeThen(
25733
+ retryOnPromise(() => invoke.call(target, ctx, target.$computeIfNeeded$)),
25734
+ (didChange) => {
25735
+ if (didChange || forceRunEffects) {
25736
+ return retryOnPromise(() => triggerEffects(container, target, effects));
25737
+ }
25720
25738
  }
25721
- });
25739
+ );
25722
25740
  } else {
25723
- returnValue = retryOnPromise(() => {
25724
- triggerEffects(container, target, effects);
25725
- });
25741
+ returnValue = retryOnPromise(() => triggerEffects(container, target, effects));
25726
25742
  }
25727
25743
  }
25728
25744
  break;
@@ -25746,7 +25762,7 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
25746
25762
  };
25747
25763
  if (isPromise(returnValue)) {
25748
25764
  chore.$promise$ = returnValue.then(after, (error) => after(void 0, error));
25749
- (_c = chore.$resolve$) == null ? void 0 : _c.call(chore, chore.$promise$);
25765
+ (_b = chore.$resolve$) == null ? void 0 : _b.call(chore, chore.$promise$);
25750
25766
  chore.$resolve$ = void 0;
25751
25767
  } else {
25752
25768
  after(returnValue);
@@ -25787,7 +25803,10 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
25787
25803
  if (idxDiff !== 0) {
25788
25804
  return idxDiff;
25789
25805
  }
25790
- if (a.$target$ !== b.$target$ || a.$payload$ !== b.$payload$) {
25806
+ if (a.$target$ !== b.$target$) {
25807
+ if (isQrl(a.$target$) && isQrl(b.$target$) && a.$target$.$hash$ === b.$target$.$hash$) {
25808
+ return 0;
25809
+ }
25791
25810
  return 1;
25792
25811
  }
25793
25812
  if (b === currentChore) {
@@ -25819,7 +25838,7 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
25819
25838
  return value;
25820
25839
  }
25821
25840
  const existing = sortedArray[idx];
25822
- if (existing.$type$ === 4 /* NODE_DIFF */) {
25841
+ if (existing.$payload$ !== value.$payload$) {
25823
25842
  existing.$payload$ = value.$payload$;
25824
25843
  }
25825
25844
  if (existing.$executed$) {
@@ -29674,11 +29693,14 @@ var processVNodeData2 = (vData, callback) => {
29674
29693
  let nextToConsumeIdx = 0;
29675
29694
  let ch = 0;
29676
29695
  let peekCh = 0;
29696
+ const getChar = (idx) => {
29697
+ return idx < vData.length ? vData.charCodeAt(idx) : 0;
29698
+ };
29677
29699
  const peek = () => {
29678
29700
  if (peekCh !== 0) {
29679
29701
  return peekCh;
29680
29702
  } else {
29681
- return peekCh = nextToConsumeIdx < vData.length ? vData.charCodeAt(nextToConsumeIdx) : 0;
29703
+ return peekCh = getChar(nextToConsumeIdx);
29682
29704
  }
29683
29705
  };
29684
29706
  const consume = () => {
@@ -29696,7 +29718,7 @@ var processVNodeData2 = (vData, callback) => {
29696
29718
  return vData.substring(start, nextToConsumeIdx);
29697
29719
  };
29698
29720
  while (peek() !== 0) {
29699
- callback(peek, consumeValue, consume, nextToConsumeIdx);
29721
+ callback(peek, consumeValue, consume, getChar, nextToConsumeIdx);
29700
29722
  }
29701
29723
  };
29702
29724
  var vnode_getNextSibling = (vnode) => {
@@ -29905,17 +29927,17 @@ function materializeFromVNodeData(vParent, vData, element, child) {
29905
29927
  let textIdx = 0;
29906
29928
  let combinedText = null;
29907
29929
  let container = null;
29908
- processVNodeData2(vData, (peek, consumeValue, consume, nextToConsumeIdx) => {
29930
+ processVNodeData2(vData, (peek, consumeValue, consume, getChar, nextToConsumeIdx) => {
29909
29931
  if (isNumber(peek())) {
29910
- while (!isElement2(child)) {
29932
+ while (!isElement2(child) || // We pretend that style element's don't exist as they can get moved out.
29933
+ // skip over style elements, as those need to be moved to the head
29934
+ // and are not included in the counts.
29935
+ isQStyleElement(child)) {
29911
29936
  child = fastNextSibling(child);
29912
29937
  if (!child) {
29913
29938
  throw qError(27 /* materializeVNodeDataError */, [vData, peek(), nextToConsumeIdx]);
29914
29939
  }
29915
29940
  }
29916
- while (isQStyleElement(child)) {
29917
- child = fastNextSibling(child);
29918
- }
29919
29941
  combinedText = null;
29920
29942
  previousTextNode = null;
29921
29943
  let value = 0;
@@ -29941,7 +29963,16 @@ function materializeFromVNodeData(vParent, vData, element, child) {
29941
29963
  } else if (peek() === VNodeDataChar.PROPS) {
29942
29964
  vnode_setAttr(null, vParent, ELEMENT_PROPS, consumeValue());
29943
29965
  } else if (peek() === VNodeDataChar.KEY) {
29944
- vnode_setAttr(null, vParent, ELEMENT_KEY, consumeValue());
29966
+ const isEscapedValue = getChar(nextToConsumeIdx + 1) === VNodeDataChar.SEPARATOR;
29967
+ let value;
29968
+ if (isEscapedValue) {
29969
+ consume();
29970
+ value = decodeURI(consumeValue());
29971
+ consume();
29972
+ } else {
29973
+ value = consumeValue();
29974
+ }
29975
+ vnode_setAttr(null, vParent, ELEMENT_KEY, value);
29945
29976
  } else if (peek() === VNodeDataChar.SEQ) {
29946
29977
  vnode_setAttr(null, vParent, ELEMENT_SEQ, consumeValue());
29947
29978
  } else if (peek() === VNodeDataChar.SEQ_IDX) {
@@ -29977,6 +30008,9 @@ function materializeFromVNodeData(vParent, vData, element, child) {
29977
30008
  } else if (peek() === VNodeDataChar.SLOT) {
29978
30009
  vnode_setAttr(null, vParent, QSlot, consumeValue());
29979
30010
  } else {
30011
+ while (isQStyleElement(child)) {
30012
+ child = fastNextSibling(child);
30013
+ }
29980
30014
  const textNode = child && fastNodeType(child) === /* Node.TEXT_NODE */
29981
30015
  3 ? child : null;
29982
30016
  if (combinedText === null) {
@@ -30633,7 +30667,7 @@ function diffJsxVNodeChildren(received, expected, path, container, isSsr, diffs)
30633
30667
  const expectedChildren = getFilteredJSXChildren(allExpectedChildren, isSsr, {
30634
30668
  mergedText: void 0
30635
30669
  });
30636
- if ((0, import_internal3._isJSXNode)(expected)) {
30670
+ if ((0, import_internal4._isJSXNode)(expected)) {
30637
30671
  expected.children = expectedChildren;
30638
30672
  }
30639
30673
  const receivedChildren = getVNodeChildren(container, received);
@@ -30670,7 +30704,7 @@ function getFilteredJSXChildren(children, isSsr, data) {
30670
30704
  }
30671
30705
  continue;
30672
30706
  }
30673
- if (isSsr && (0, import_internal3._isJSXNode)(child) && isSkippableNode(child)) {
30707
+ if (isSsr && (0, import_internal4._isJSXNode)(child) && isSkippableNode(child)) {
30674
30708
  const skippedNodeChildren = getJSXChildren(child);
30675
30709
  processChildren(skippedNodeChildren);
30676
30710
  } else {
@@ -30751,7 +30785,7 @@ function shouldSkip(vNode) {
30751
30785
  return false;
30752
30786
  }
30753
30787
  function walkJSX(jsx3, apply) {
30754
- if ((0, import_internal3._isJSXNode)(jsx3)) {
30788
+ if ((0, import_internal4._isJSXNode)(jsx3)) {
30755
30789
  apply.enter(jsx3);
30756
30790
  if (Array.isArray(jsx3.children)) {
30757
30791
  for (const child of jsx3.children) {
@@ -30768,9 +30802,9 @@ function walkJSX(jsx3, apply) {
30768
30802
  if ((0, import_core.isSignal)(child)) {
30769
30803
  child = child.value;
30770
30804
  }
30771
- if ((0, import_internal3._isStringifiable)(child)) {
30805
+ if ((0, import_internal4._isStringifiable)(child)) {
30772
30806
  apply.text(child);
30773
- } else if ((0, import_internal3._isJSXNode)(child)) {
30807
+ } else if ((0, import_internal4._isJSXNode)(child)) {
30774
30808
  walkJSX(child, apply);
30775
30809
  } else {
30776
30810
  throw new Error("Unknown type: " + child);
@@ -31116,7 +31150,7 @@ async function expectDOM(actual, expected) {
31116
31150
  }
31117
31151
 
31118
31152
  // packages/qwik/src/testing/rendering.unit-util.tsx
31119
- var import_core8 = require("../core.cjs");
31153
+ var import_core7 = require("../core.cjs");
31120
31154
  var import_vitest3 = require("vitest");
31121
31155
 
31122
31156
  // packages/qwik/src/server/platform.ts
@@ -31501,7 +31535,7 @@ var versions = {
31501
31535
  };
31502
31536
 
31503
31537
  // packages/qwik/src/server/ssr-container.ts
31504
- var import_core7 = require("../core.cjs");
31538
+ var import_core6 = require("../core.cjs");
31505
31539
  var import_build15 = require("@qwik.dev/core/build");
31506
31540
 
31507
31541
  // packages/qwik/src/server/scripts.ts
@@ -31517,14 +31551,15 @@ var QWIK_PREFETCH_DEBUG = globalThis.QWIK_PREFETCH_DEBUG;
31517
31551
  var import_core4 = require("../core.cjs");
31518
31552
  var import_build14 = require("@qwik.dev/core/build");
31519
31553
  var SsrNode = class {
31520
- constructor(parentSsrNode, id, attrs, cleanupQueue, vnodeData) {
31521
- this.attrs = attrs;
31554
+ constructor(parentSsrNode, id, attributesIndex, cleanupQueue, vnodeData) {
31555
+ this.attributesIndex = attributesIndex;
31522
31556
  this.cleanupQueue = cleanupQueue;
31523
31557
  this.vnodeData = vnodeData;
31524
31558
  var _a;
31525
31559
  this.parentSsrNode = parentSsrNode;
31526
31560
  (_a = this.parentSsrNode) == null ? void 0 : _a.addChild(this);
31527
31561
  this.id = id;
31562
+ this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : import_core4._EMPTY_ARRAY;
31528
31563
  if (import_build14.isDev && id.indexOf("undefined") != -1) {
31529
31564
  throw new Error(`Invalid SSR node id: ${id}`);
31530
31565
  }
@@ -31538,6 +31573,7 @@ var SsrNode = class {
31538
31573
  id;
31539
31574
  parentSsrNode;
31540
31575
  children = null;
31576
+ attrs;
31541
31577
  /** Local props which don't serialize; */
31542
31578
  localProps = null;
31543
31579
  get [import_core4._EFFECT_BACK_REF]() {
@@ -31545,7 +31581,7 @@ var SsrNode = class {
31545
31581
  }
31546
31582
  setProp(name, value) {
31547
31583
  if (this.attrs === import_core4._EMPTY_ARRAY) {
31548
- this.attrs = [];
31584
+ this.setEmptyArrayAsVNodeDataAttributes();
31549
31585
  }
31550
31586
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
31551
31587
  mapArray_set(this.localProps || (this.localProps = []), name, value, 0);
@@ -31556,6 +31592,17 @@ var SsrNode = class {
31556
31592
  this.cleanupQueue.push(value);
31557
31593
  }
31558
31594
  }
31595
+ setEmptyArrayAsVNodeDataAttributes() {
31596
+ if (this.attributesIndex >= 0) {
31597
+ this.vnodeData[this.attributesIndex] = [];
31598
+ this.attrs = this.vnodeData[this.attributesIndex];
31599
+ } else {
31600
+ const newAttributesIndex = this.vnodeData.length > 1 ? 1 : 0;
31601
+ this.vnodeData.splice(newAttributesIndex, 0, []);
31602
+ this.attributesIndex = newAttributesIndex;
31603
+ this.attrs = this.vnodeData[this.attributesIndex];
31604
+ }
31605
+ }
31559
31606
  getProp(name) {
31560
31607
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
31561
31608
  return this.localProps ? mapArray_get(this.localProps, name, 0) : null;
@@ -31669,7 +31716,6 @@ var SsrComponentFrame = class {
31669
31716
  };
31670
31717
 
31671
31718
  // packages/qwik/src/server/vnode-data.ts
31672
- var import_core5 = require("../core.cjs");
31673
31719
  var OPEN_FRAGMENT = Number.MAX_SAFE_INTEGER;
31674
31720
  var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
31675
31721
  var WRITE_ELEMENT_ATTRS = Number.MAX_SAFE_INTEGER - 2;
@@ -31706,12 +31752,12 @@ function vNodeData_openElement(vNodeData) {
31706
31752
  }
31707
31753
  function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue) {
31708
31754
  vNodeData[0] |= 8 /* REFERENCE */;
31709
- let fragmentAttrs = import_core5._EMPTY_ARRAY;
31710
31755
  const stack2 = [-1];
31756
+ let attributesIndex = -1;
31711
31757
  for (let i = 1; i < vNodeData.length; i++) {
31712
31758
  const value = vNodeData[i];
31713
31759
  if (Array.isArray(value)) {
31714
- fragmentAttrs = value;
31760
+ attributesIndex = i;
31715
31761
  i++;
31716
31762
  if (vNodeData[i] !== WRITE_ELEMENT_ATTRS) {
31717
31763
  stack2[stack2.length - 1]++;
@@ -31719,7 +31765,6 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
31719
31765
  }
31720
31766
  } else if (value === CLOSE_FRAGMENT) {
31721
31767
  stack2.pop();
31722
- fragmentAttrs = import_core5._EMPTY_ARRAY;
31723
31768
  } else if (value < 0) {
31724
31769
  const numberOfElements = 0 - value;
31725
31770
  stack2[stack2.length - 1] += numberOfElements;
@@ -31736,7 +31781,7 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
31736
31781
  }
31737
31782
  }
31738
31783
  }
31739
- return new SsrNode(currentComponentNode, refId, fragmentAttrs, cleanupQueue, vNodeData);
31784
+ return new SsrNode(currentComponentNode, refId, attributesIndex, cleanupQueue, vNodeData);
31740
31785
  }
31741
31786
  var ALPHANUMERIC = [];
31742
31787
  function encodeAsAlphanumeric(value) {
@@ -31759,7 +31804,7 @@ function encodeAsAlphanumeric(value) {
31759
31804
  }
31760
31805
 
31761
31806
  // packages/qwik/src/server/preload-strategy.ts
31762
- var import_core6 = require("../core.cjs");
31807
+ var import_core5 = require("../core.cjs");
31763
31808
 
31764
31809
  // packages/qwik/src/server/preload-utils.ts
31765
31810
  function flattenPrefetchResources(prefetchResources) {
@@ -31782,7 +31827,7 @@ function flattenPrefetchResources(prefetchResources) {
31782
31827
 
31783
31828
  // packages/qwik/src/server/preload-strategy.ts
31784
31829
  var getBundles = (qrls) => {
31785
- const platform = (0, import_core6.getPlatform)();
31830
+ const platform = (0, import_core5.getPlatform)();
31786
31831
  return qrls == null ? void 0 : qrls.map((qrl) => {
31787
31832
  var _a;
31788
31833
  const symbol = qrl.$symbol$;
@@ -32026,7 +32071,7 @@ var StringBufferWriter = class {
32026
32071
  }
32027
32072
  };
32028
32073
  var EMPTY_OBJ2 = {};
32029
- var SSRContainer = class extends import_core7._SharedContainer {
32074
+ var SSRContainer = class extends import_core6._SharedContainer {
32030
32075
  tag;
32031
32076
  isHtml;
32032
32077
  writer;
@@ -32109,7 +32154,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32109
32154
  }
32110
32155
  async render(jsx3) {
32111
32156
  this.openContainer();
32112
- await (0, import_core7._walkJSX)(this, jsx3, {
32157
+ await (0, import_core6._walkJSX)(this, jsx3, {
32113
32158
  currentStyleScoped: null,
32114
32159
  parentComponentFrame: this.getComponentFrame()
32115
32160
  });
@@ -32354,7 +32399,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32354
32399
  }
32355
32400
  for (let i = 0; i < injections.length; i++) {
32356
32401
  const injection = injections[i];
32357
- const jsxNode = (0, import_core7._jsxSplit)(injection.tag, null, injection.attributes || {}, null, 0, null);
32402
+ const jsxNode = (0, import_core6._jsxSplit)(injection.tag, null, injection.attributes || {}, null, 0, null);
32358
32403
  if (injection.location === "head") {
32359
32404
  this.additionalHeadNodes.push(jsxNode);
32360
32405
  } else {
@@ -32374,7 +32419,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32374
32419
  this.styleIds.add(styleId);
32375
32420
  if (((_a = this.currentElementFrame) == null ? void 0 : _a.elementName) === "html") {
32376
32421
  this.additionalHeadNodes.push(
32377
- (0, import_core7._jsxSorted)(
32422
+ (0, import_core6._jsxSorted)(
32378
32423
  "style",
32379
32424
  null,
32380
32425
  { dangerouslySetInnerHTML: content, [QStyle]: styleId },
@@ -32486,6 +32531,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32486
32531
  for (let i = 0; i < fragmentAttrs.length; ) {
32487
32532
  const key = fragmentAttrs[i++];
32488
32533
  let value = fragmentAttrs[i++];
32534
+ let encodeValue = false;
32489
32535
  if (typeof value !== "string") {
32490
32536
  const rootId = addRoot(value);
32491
32537
  if (rootId === void 0) {
@@ -32507,6 +32553,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32507
32553
  write(VNodeDataChar.PROPS_CHAR);
32508
32554
  break;
32509
32555
  case ELEMENT_KEY:
32556
+ encodeValue = true;
32510
32557
  write(VNodeDataChar.KEY_CHAR);
32511
32558
  break;
32512
32559
  case ELEMENT_SEQ:
@@ -32533,7 +32580,15 @@ var SSRContainer = class extends import_core7._SharedContainer {
32533
32580
  write(key);
32534
32581
  write(VNodeDataChar.SEPARATOR_CHAR);
32535
32582
  }
32536
- write(value);
32583
+ const encodedValue = encodeValue ? encodeURI(value) : value;
32584
+ const isEncoded = encodeValue ? encodedValue !== value : false;
32585
+ if (isEncoded) {
32586
+ write(VNodeDataChar.SEPARATOR_CHAR);
32587
+ write(encodedValue);
32588
+ write(VNodeDataChar.SEPARATOR_CHAR);
32589
+ } else {
32590
+ write(value);
32591
+ }
32537
32592
  }
32538
32593
  }
32539
32594
  this.closeElement();
@@ -32627,7 +32682,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32627
32682
  if (unclaimedProjections.length) {
32628
32683
  const previousCurrentComponentNode = this.currentComponentNode;
32629
32684
  try {
32630
- this.openElement(QTemplate, ["style", "display:none"], null);
32685
+ this.openElement(QTemplate, ["hidden", true, "aria-hidden", "true"], null);
32631
32686
  let idx = 0;
32632
32687
  let ssrComponentNode = null;
32633
32688
  let ssrComponentFrame = null;
@@ -32658,7 +32713,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32658
32713
  lastNode.vnodeData[0] |= 16 /* SERIALIZE */;
32659
32714
  }
32660
32715
  ssrComponentNode == null ? void 0 : ssrComponentNode.setProp(value, lastNode.id);
32661
- await (0, import_core7._walkJSX)(this, children, {
32716
+ await (0, import_core6._walkJSX)(this, children, {
32662
32717
  currentStyleScoped: scopedStyleId,
32663
32718
  parentComponentFrame: null
32664
32719
  });
@@ -32788,7 +32843,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32788
32843
  }
32789
32844
  if (key === "ref") {
32790
32845
  const lastNode = this.getOrCreateLastNode();
32791
- if ((0, import_core7.isSignal)(value)) {
32846
+ if ((0, import_core6.isSignal)(value)) {
32792
32847
  value.$untrackedValue$ = new DomRef(lastNode);
32793
32848
  continue;
32794
32849
  } else if (typeof value === "function") {
@@ -32800,9 +32855,9 @@ var SSRContainer = class extends import_core7._SharedContainer {
32800
32855
  throw qError(15 /* invalidRefValue */, [currentFile]);
32801
32856
  }
32802
32857
  }
32803
- if ((0, import_core7.isSignal)(value)) {
32858
+ if ((0, import_core6.isSignal)(value)) {
32804
32859
  const lastNode = this.getOrCreateLastNode();
32805
- const signalData = new import_core7._SubscriptionData({
32860
+ const signalData = new import_core6._SubscriptionData({
32806
32861
  $scopedStyleIdPrefix$: styleScopedId,
32807
32862
  $isConst$: isConst
32808
32863
  });
@@ -33059,10 +33114,10 @@ var Q_FUNCS_PREFIX2 = 'document["qFuncs_HASH"]=';
33059
33114
  var import_jsx_runtime13 = require("@qwik.dev/core/jsx-runtime");
33060
33115
  async function domRender(jsx3, opts = {}) {
33061
33116
  const document2 = createDocument();
33062
- await (0, import_core8.render)(document2.body, jsx3);
33117
+ await (0, import_core7.render)(document2.body, jsx3);
33063
33118
  await getTestPlatform().flush();
33064
33119
  const getStyles = getStylesFactory(document2);
33065
- const container = (0, import_core8._getDomContainer)(document2.body);
33120
+ const container = (0, import_core7._getDomContainer)(document2.body);
33066
33121
  if (opts.debug) {
33067
33122
  console.log("========================================================");
33068
33123
  console.log("------------------------- CSR --------------------------");
@@ -33112,7 +33167,7 @@ async function ssrRenderToDom(jsx3, opts = {}) {
33112
33167
  const document2 = createDocument({ html });
33113
33168
  const containerElement2 = document2.querySelector(QContainerSelector);
33114
33169
  emulateExecutionOfQwikFuncs(document2);
33115
- const container = (0, import_core8._getDomContainer)(containerElement2);
33170
+ const container = (0, import_core7._getDomContainer)(containerElement2);
33116
33171
  await getTestPlatform().flush();
33117
33172
  const getStyles = getStylesFactory(document2);
33118
33173
  if (opts.debug) {
@@ -33208,7 +33263,7 @@ function renderStyles(getStyles) {
33208
33263
  });
33209
33264
  }
33210
33265
  async function rerenderComponent(element, flush) {
33211
- const container = (0, import_core8._getDomContainer)(element);
33266
+ const container = (0, import_core7._getDomContainer)(element);
33212
33267
  const vElement = vnode_locate(container.rootVNode, element);
33213
33268
  const host = getHostVNode(vElement);
33214
33269
  const qrl = container.getHostProp(host, OnRenderProp);
@@ -33228,11 +33283,11 @@ function getHostVNode(vElement) {
33228
33283
  return vElement;
33229
33284
  }
33230
33285
  var ErrorProvider = Object.assign(
33231
- (0, import_core8.componentQrl)(
33286
+ (0, import_core7.componentQrl)(
33232
33287
  inlinedQrl(() => {
33233
33288
  ErrorProvider.error = null;
33234
33289
  useContextProvider(ERROR_CONTEXT, ErrorProvider);
33235
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core8.Slot, {});
33290
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core7.Slot, {});
33236
33291
  }, "s_ErrorProvider")
33237
33292
  ),
33238
33293
  { error: null }