@bleedingdev/modern-js-runtime-extensions 3.8.3-ultramodern.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/helmetCompat.js +419 -0
  3. package/dist/cjs/html.js +45 -0
  4. package/dist/cjs/index.js +83 -0
  5. package/dist/cjs/navigationWarmup.js +59 -0
  6. package/dist/cjs/node.js +143 -0
  7. package/dist/cjs/rendererHead.js +263 -0
  8. package/dist/cjs/rscHtmlStream.js +128 -0
  9. package/dist/cjs/safeFailure.js +125 -0
  10. package/dist/cjs/shellStream.js +76 -0
  11. package/dist/esm/helmetCompat.mjs +357 -0
  12. package/dist/esm/html.mjs +4 -0
  13. package/dist/esm/index.mjs +4 -0
  14. package/dist/esm/navigationWarmup.mjs +21 -0
  15. package/dist/esm/node.mjs +61 -0
  16. package/dist/esm/rendererHead.mjs +162 -0
  17. package/dist/esm/rscHtmlStream.mjs +86 -0
  18. package/dist/esm/safeFailure.mjs +78 -0
  19. package/dist/esm/shellStream.mjs +38 -0
  20. package/dist/esm-node/helmetCompat.mjs +358 -0
  21. package/dist/esm-node/html.mjs +5 -0
  22. package/dist/esm-node/index.mjs +5 -0
  23. package/dist/esm-node/navigationWarmup.mjs +22 -0
  24. package/dist/esm-node/node.mjs +62 -0
  25. package/dist/esm-node/rendererHead.mjs +163 -0
  26. package/dist/esm-node/rscHtmlStream.mjs +87 -0
  27. package/dist/esm-node/safeFailure.mjs +79 -0
  28. package/dist/esm-node/shellStream.mjs +39 -0
  29. package/dist/types/helmetCompat.d.ts +75 -0
  30. package/dist/types/html.d.ts +2 -0
  31. package/dist/types/index.d.ts +4 -0
  32. package/dist/types/navigationWarmup.d.ts +8 -0
  33. package/dist/types/node.d.ts +11 -0
  34. package/dist/types/rendererHead.d.ts +17 -0
  35. package/dist/types/rscHtmlStream.d.ts +4 -0
  36. package/dist/types/safeFailure.d.ts +17 -0
  37. package/dist/types/shellStream.d.ts +1 -0
  38. package/package.json +90 -0
  39. package/rslib.config.mts +4 -0
  40. package/rstest.config.mts +7 -0
  41. package/src/helmetCompat.ts +628 -0
  42. package/src/html.ts +11 -0
  43. package/src/index.ts +4 -0
  44. package/src/navigationWarmup.ts +39 -0
  45. package/src/node.ts +93 -0
  46. package/src/rendererHead.ts +236 -0
  47. package/src/rscHtmlStream.ts +142 -0
  48. package/src/safeFailure.ts +137 -0
  49. package/src/shellStream.ts +53 -0
  50. package/tests/rendererHead.test.ts +299 -0
  51. package/tests/rscHtmlStream.test.ts +153 -0
  52. package/tests/safeFailure.test.ts +154 -0
  53. package/tests/shellStream.test.ts +85 -0
  54. package/tsconfig.json +10 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021-present Modern.js
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,419 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ const CONTENT_PROPERTIES = new Set([
31
+ 'innerHTML',
32
+ 'cssText'
33
+ ]);
34
+ const HTML_ATTRIBUTE_NAMES = {
35
+ charSet: 'charset',
36
+ className: 'class',
37
+ contentEditable: 'contenteditable',
38
+ httpEquiv: 'http-equiv',
39
+ hrefLang: 'hreflang',
40
+ itemProp: 'itemprop',
41
+ tabIndex: 'tabindex'
42
+ };
43
+ const REACT_ATTRIBUTE_NAMES = {
44
+ accesskey: 'accessKey',
45
+ charset: 'charSet',
46
+ class: 'className',
47
+ contenteditable: 'contentEditable',
48
+ contextmenu: 'contextMenu',
49
+ 'http-equiv': 'httpEquiv',
50
+ hreflang: 'hrefLang',
51
+ itemprop: 'itemProp',
52
+ tabindex: 'tabIndex'
53
+ };
54
+ const SEO_PRIORITY_VALUES = {
55
+ link: {
56
+ rel: [
57
+ 'amphtml',
58
+ 'canonical',
59
+ 'alternate'
60
+ ]
61
+ },
62
+ meta: {
63
+ charset: [
64
+ ''
65
+ ],
66
+ name: [
67
+ 'generator',
68
+ 'robots',
69
+ "description"
70
+ ],
71
+ property: [
72
+ 'og:type',
73
+ 'og:title',
74
+ 'og:url',
75
+ 'og:image',
76
+ 'og:image:alt',
77
+ "og:description",
78
+ 'twitter:url',
79
+ 'twitter:title',
80
+ "twitter:description",
81
+ 'twitter:image',
82
+ 'twitter:image:alt',
83
+ 'twitter:card',
84
+ 'twitter:site'
85
+ ]
86
+ },
87
+ script: {
88
+ type: [
89
+ 'application/ld+json'
90
+ ]
91
+ }
92
+ };
93
+ const TAG_PRIMARY_ATTRIBUTES = {
94
+ link: [
95
+ 'rel',
96
+ 'href'
97
+ ],
98
+ meta: [
99
+ 'name',
100
+ 'charset',
101
+ 'http-equiv',
102
+ 'property',
103
+ 'itemprop'
104
+ ],
105
+ noscript: [
106
+ 'innerHTML'
107
+ ],
108
+ script: [
109
+ 'src',
110
+ 'innerHTML'
111
+ ],
112
+ style: [
113
+ 'cssText'
114
+ ]
115
+ };
116
+ const priorityRecords = new WeakSet();
117
+ const priorityTags = new WeakSet();
118
+ const immediateRecords = new WeakMap();
119
+ const createElementFactory = (react)=>react.createElement;
120
+ const renderHeadMarker = (react, marker)=>marker ? createElementFactory(react)('template', marker) : null;
121
+ const toReactAttributes = (tag)=>{
122
+ const props = {};
123
+ for (const [attribute, value] of Object.entries(tag))if (!CONTENT_PROPERTIES.has(attribute)) props[REACT_ATTRIBUTE_NAMES[attribute] ?? attribute] = value;
124
+ return props;
125
+ };
126
+ const toReactProps = (tag, key)=>{
127
+ const props = {
128
+ ...toReactAttributes(tag),
129
+ key,
130
+ 'data-rh': true
131
+ };
132
+ if ('innerHTML' in tag || 'cssText' in tag) props.dangerouslySetInnerHTML = {
133
+ __html: tag.innerHTML ?? tag.cssText ?? ''
134
+ };
135
+ return props;
136
+ };
137
+ const escapeHtml = (value)=>String(value).replaceAll('&', '&amp;').replaceAll('"', '&quot;').replaceAll('<', '&lt;').replaceAll('>', '&gt;');
138
+ const toHtmlAttributeName = (name)=>HTML_ATTRIBUTE_NAMES[name] ?? name;
139
+ const attributesToString = (tag, includeHelmetAttribute = false)=>{
140
+ const attributes = includeHelmetAttribute ? [
141
+ 'data-rh="true"'
142
+ ] : [];
143
+ for (const [name, value] of Object.entries(tag)){
144
+ if (CONTENT_PROPERTIES.has(name) || false === value || null == value) continue;
145
+ const attribute = toHtmlAttributeName(name);
146
+ attributes.push(true === value ? attribute : `${attribute}="${escapeHtml(value)}"`);
147
+ }
148
+ return attributes.join(' ');
149
+ };
150
+ const tagsToString = (tagName, tags)=>tags.map((tag)=>{
151
+ const attributes = attributesToString(tag, true);
152
+ if (("script" === tagName || "noscript" === tagName) && 'string' == typeof tag.innerHTML) return `<${tagName} ${attributes}>${tag.innerHTML}</${tagName}>`;
153
+ if ('style' === tagName && 'string' == typeof tag.cssText) return `<style ${attributes}>${tag.cssText}</style>`;
154
+ return `<${tagName} ${attributes}>`;
155
+ }).join('');
156
+ const markPriorityHeadRecord = (record, prioritize)=>{
157
+ if (prioritize) priorityRecords.add(record);
158
+ };
159
+ const isPriorityHeadTag = (tag)=>priorityTags.has(tag);
160
+ const headTagsToComponents = (react, tagName, tags)=>{
161
+ const createElement = createElementFactory(react);
162
+ return tags.filter((tag)=>!priorityTags.has(tag)).map((tag, index)=>createElement(tagName, toReactProps(tag, index)));
163
+ };
164
+ const headTitleToComponent = (react, title, attributes)=>{
165
+ if (!title) return [];
166
+ const createElement = createElementFactory(react);
167
+ return [
168
+ createElement('title', toReactProps(attributes, title), title)
169
+ ];
170
+ };
171
+ const normalizedEntries = (tag)=>Object.entries(tag).map(([name, value])=>[
172
+ toHtmlAttributeName(name).toLowerCase(),
173
+ String(value).toLowerCase()
174
+ ]);
175
+ const isSeoPriorityTag = (tagName, tag)=>{
176
+ const values = SEO_PRIORITY_VALUES[tagName];
177
+ return normalizedEntries(tag).some(([name, value])=>{
178
+ const allowed = values[name];
179
+ return void 0 !== allowed && ('charset' === name || allowed.includes(value));
180
+ });
181
+ };
182
+ const createPriorityHeadDatum = (react, records, dedupe)=>{
183
+ if (!records.some((record)=>'object' == typeof record && null !== record && priorityRecords.has(record))) return {
184
+ toComponent: ()=>[],
185
+ toString: ()=>''
186
+ };
187
+ const groups = [
188
+ 'meta',
189
+ 'link',
190
+ "script"
191
+ ].map((tagName)=>({
192
+ tagName,
193
+ tags: dedupe(tagName, records).filter((tag)=>isSeoPriorityTag(tagName, tag))
194
+ }));
195
+ for (const { tags } of groups)for (const tag of tags)priorityTags.add(tag);
196
+ const createElement = createElementFactory(react);
197
+ return {
198
+ toComponent: ()=>groups.flatMap(({ tagName, tags })=>tags.map((tag, index)=>createElement(tagName, toReactProps(tag, `${tagName}-${index}`)))),
199
+ toString: ()=>groups.map(({ tagName, tags })=>tagsToString(tagName, tags)).join('')
200
+ };
201
+ };
202
+ const createDatum = (react, tagName, tags)=>({
203
+ toComponent: ()=>headTagsToComponents(react, tagName, tags),
204
+ toString: ()=>tagsToString(tagName, tags.filter((tag)=>!priorityTags.has(tag)))
205
+ });
206
+ const createAttributeDatum = (attributes)=>({
207
+ toComponent: ()=>toReactAttributes(attributes),
208
+ toString: ()=>attributesToString(attributes)
209
+ });
210
+ const createTitleDatum = (react, title, attributes)=>({
211
+ toComponent: ()=>headTitleToComponent(react, title, attributes),
212
+ toString: ()=>{
213
+ if (!title) return '';
214
+ const serialized = attributesToString(attributes, true);
215
+ return `<title ${serialized}>${escapeHtml(title)}</title>`;
216
+ }
217
+ });
218
+ const normalizeHelmetTitle = (title)=>{
219
+ if ('string' == typeof title) return title;
220
+ if (Array.isArray(title)) return title.map((part)=>String(part)).join('');
221
+ };
222
+ const mergeAttributes = (current, next)=>({
223
+ ...current,
224
+ ...next ?? {}
225
+ });
226
+ const isHeadElement = (value)=>'object' == typeof value && null !== value && 'type' in value && 'props' in value && 'object' == typeof value.props && null !== value.props;
227
+ const collectChildren = (react, children, draft)=>{
228
+ react.Children.forEach(children, (child)=>{
229
+ if (!react.isValidElement(child) || !isHeadElement(child)) return;
230
+ const element = child;
231
+ if (element.type === react.Fragment) return void collectChildren(react, element.props.children, draft);
232
+ if ('string' != typeof element.type) return;
233
+ const { children: nestedChildren, ...props } = element.props;
234
+ if ('title' === element.type) {
235
+ draft.title = react.Children.toArray(nestedChildren).join('');
236
+ draft.titleAttributes = mergeAttributes(draft.titleAttributes, props);
237
+ return;
238
+ }
239
+ if ('html' === element.type) {
240
+ draft.htmlAttributes = mergeAttributes(draft.htmlAttributes ?? {}, props);
241
+ return;
242
+ }
243
+ if ('body' === element.type) {
244
+ draft.bodyAttributes = mergeAttributes(draft.bodyAttributes ?? {}, props);
245
+ return;
246
+ }
247
+ if ('base' === element.type || 'link' === element.type || 'meta' === element.type || "noscript" === element.type || "script" === element.type || 'style' === element.type) {
248
+ const tag = {
249
+ ...props
250
+ };
251
+ if (("script" === element.type || 'style' === element.type || "noscript" === element.type) && 'string' == typeof nestedChildren) tag['style' === element.type ? 'cssText' : 'innerHTML'] = nestedChildren;
252
+ draft[element.type].push(tag);
253
+ }
254
+ });
255
+ };
256
+ const createHelmetRecord = (reactValue, props)=>{
257
+ const draft = {
258
+ base: void 0 === props.base ? [] : [
259
+ {
260
+ ...props.base
261
+ }
262
+ ],
263
+ bodyAttributes: void 0 === props.bodyAttributes ? void 0 : {
264
+ ...props.bodyAttributes
265
+ },
266
+ htmlAttributes: void 0 === props.htmlAttributes ? void 0 : {
267
+ ...props.htmlAttributes
268
+ },
269
+ link: (props.link ?? []).map((tag)=>({
270
+ ...tag
271
+ })),
272
+ meta: (props.meta ?? []).map((tag)=>({
273
+ ...tag
274
+ })),
275
+ noscript: (props.noscript ?? []).map((tag)=>({
276
+ ...tag
277
+ })),
278
+ script: (props.script ?? []).map((tag)=>({
279
+ ...tag
280
+ })),
281
+ style: (props.style ?? []).map((tag)=>({
282
+ ...tag
283
+ })),
284
+ title: normalizeHelmetTitle(props.title),
285
+ titleAttributes: {
286
+ ...props.titleAttributes ?? {}
287
+ }
288
+ };
289
+ collectChildren(reactValue, props.children, draft);
290
+ const record = {
291
+ ...draft,
292
+ defaultTitle: props.defaultTitle,
293
+ prioritizeSeoTags: true === props.prioritizeSeoTags,
294
+ titleTemplate: props.titleTemplate
295
+ };
296
+ markPriorityHeadRecord(record, record.prioritizeSeoTags);
297
+ return record;
298
+ };
299
+ const getInnermostDefined = (records, pick)=>{
300
+ for(let index = records.length - 1; index >= 0; index -= 1){
301
+ const value = pick(records[index]);
302
+ if (void 0 !== value) return value;
303
+ }
304
+ };
305
+ const deriveTitle = (records)=>{
306
+ const title = getInnermostDefined(records, (record)=>record.title);
307
+ const template = getInnermostDefined(records, (record)=>record.titleTemplate);
308
+ if (template && title) return template.replaceAll('%s', title);
309
+ return title || getInnermostDefined(records, (record)=>record.defaultTitle);
310
+ };
311
+ const mergeRecordAttributes = (records, pick)=>records.reduce((merged, record)=>mergeAttributes(merged, pick(record)), {});
312
+ const deriveBaseTags = (records)=>{
313
+ for(let recordIndex = records.length - 1; recordIndex >= 0; recordIndex--){
314
+ const tags = records[recordIndex].base;
315
+ for(let tagIndex = tags.length - 1; tagIndex >= 0; tagIndex--)if (tags[tagIndex].href) return [
316
+ tags[tagIndex]
317
+ ];
318
+ }
319
+ return [];
320
+ };
321
+ const getPrimaryAttribute = (tagName, tag)=>{
322
+ const candidates = TAG_PRIMARY_ATTRIBUTES[tagName];
323
+ let selectedKey;
324
+ let selectedValue;
325
+ for (const [key, value] of Object.entries(tag)){
326
+ const normalizedKey = CONTENT_PROPERTIES.has(key) ? key : toHtmlAttributeName(key).toLowerCase();
327
+ if (candidates.includes(normalizedKey)) {
328
+ if ('rel' !== selectedKey || 'canonical' !== String(selectedValue).toLowerCase()) {
329
+ if ('rel' !== normalizedKey || 'stylesheet' !== String(value).toLowerCase()) {
330
+ selectedKey = normalizedKey;
331
+ selectedValue = value;
332
+ }
333
+ }
334
+ }
335
+ }
336
+ if (void 0 === selectedKey || !selectedValue) return;
337
+ return {
338
+ key: selectedKey,
339
+ value: String(selectedValue).toLowerCase()
340
+ };
341
+ };
342
+ const dedupeTags = (tagName, records)=>{
343
+ const approvedValues = new Map();
344
+ const approved = [];
345
+ for(let index = records.length - 1; index >= 0; index -= 1){
346
+ const instanceValues = new Map();
347
+ const kept = [];
348
+ for (const tag of records[index][tagName]){
349
+ const primary = getPrimaryAttribute(tagName, tag);
350
+ if (void 0 === primary || approvedValues.get(primary.key)?.has(primary.value)) continue;
351
+ const seen = instanceValues.get(primary.key) ?? new Set();
352
+ seen.add(primary.value);
353
+ instanceValues.set(primary.key, seen);
354
+ kept.push(tag);
355
+ }
356
+ approved.unshift(...kept);
357
+ for (const [key, values] of instanceValues){
358
+ const target = approvedValues.get(key);
359
+ if (void 0 === target) approvedValues.set(key, values);
360
+ else for (const value of values)target.add(value);
361
+ }
362
+ }
363
+ return approved;
364
+ };
365
+ const deriveHelmetServerState = (react, records)=>{
366
+ const priority = createPriorityHeadDatum(react, records, dedupeTags);
367
+ return {
368
+ base: createDatum(react, 'base', deriveBaseTags(records)),
369
+ bodyAttributes: createAttributeDatum(mergeRecordAttributes(records, (record)=>record.bodyAttributes)),
370
+ htmlAttributes: createAttributeDatum(mergeRecordAttributes(records, (record)=>record.htmlAttributes)),
371
+ link: createDatum(react, 'link', dedupeTags('link', records)),
372
+ meta: createDatum(react, 'meta', dedupeTags('meta', records)),
373
+ noscript: createDatum(react, "noscript", dedupeTags("noscript", records)),
374
+ priority,
375
+ script: createDatum(react, "script", dedupeTags("script", records)),
376
+ style: createDatum(react, 'style', dedupeTags('style', records)),
377
+ title: createTitleDatum(react, deriveTitle(records), mergeRecordAttributes(records, (record)=>record.titleAttributes))
378
+ };
379
+ };
380
+ const collectImmediateHelmetState = (react, context, record)=>{
381
+ const records = immediateRecords.get(context) ?? [];
382
+ if (!immediateRecords.has(context)) immediateRecords.set(context, records);
383
+ records.push(record);
384
+ return deriveHelmetServerState(react, records);
385
+ };
386
+ __webpack_require__.d(__webpack_exports__, {}, {
387
+ collectImmediateHelmetState: collectImmediateHelmetState,
388
+ createHelmetRecord: createHelmetRecord,
389
+ createPriorityHeadDatum: createPriorityHeadDatum,
390
+ deriveHelmetServerState: deriveHelmetServerState,
391
+ headTagsToComponents: headTagsToComponents,
392
+ headTitleToComponent: headTitleToComponent,
393
+ isPriorityHeadTag: isPriorityHeadTag,
394
+ markPriorityHeadRecord: markPriorityHeadRecord,
395
+ renderHeadMarker: renderHeadMarker
396
+ });
397
+ exports.collectImmediateHelmetState = __webpack_exports__.collectImmediateHelmetState;
398
+ exports.createHelmetRecord = __webpack_exports__.createHelmetRecord;
399
+ exports.createPriorityHeadDatum = __webpack_exports__.createPriorityHeadDatum;
400
+ exports.deriveHelmetServerState = __webpack_exports__.deriveHelmetServerState;
401
+ exports.headTagsToComponents = __webpack_exports__.headTagsToComponents;
402
+ exports.headTitleToComponent = __webpack_exports__.headTitleToComponent;
403
+ exports.isPriorityHeadTag = __webpack_exports__.isPriorityHeadTag;
404
+ exports.markPriorityHeadRecord = __webpack_exports__.markPriorityHeadRecord;
405
+ exports.renderHeadMarker = __webpack_exports__.renderHeadMarker;
406
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
407
+ "collectImmediateHelmetState",
408
+ "createHelmetRecord",
409
+ "createPriorityHeadDatum",
410
+ "deriveHelmetServerState",
411
+ "headTagsToComponents",
412
+ "headTitleToComponent",
413
+ "isPriorityHeadTag",
414
+ "markPriorityHeadRecord",
415
+ "renderHeadMarker"
416
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
417
+ Object.defineProperty(exports, '__esModule', {
418
+ value: true
419
+ });
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ const SAFE_HTML_ATTRIBUTE_NAME = /^[^\u0000-\u0020"'<>/=]+$/u;
31
+ const isSafeHtmlAttributeName = (name)=>SAFE_HTML_ATTRIBUTE_NAME.test(name);
32
+ const escapeHtmlAttribute = (value)=>String(value).replaceAll('&', '&amp;').replaceAll('"', '&quot;').replaceAll('<', '&lt;').replaceAll('>', '&gt;');
33
+ __webpack_require__.d(__webpack_exports__, {}, {
34
+ escapeHtmlAttribute: escapeHtmlAttribute,
35
+ isSafeHtmlAttributeName: isSafeHtmlAttributeName
36
+ });
37
+ exports.escapeHtmlAttribute = __webpack_exports__.escapeHtmlAttribute;
38
+ exports.isSafeHtmlAttributeName = __webpack_exports__.isSafeHtmlAttributeName;
39
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
40
+ "escapeHtmlAttribute",
41
+ "isSafeHtmlAttributeName"
42
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
43
+ Object.defineProperty(exports, '__esModule', {
44
+ value: true
45
+ });
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __webpack_modules__ = {
3
+ "./html" (module) {
4
+ module.exports = require("./html.js");
5
+ },
6
+ "./navigationWarmup" (module) {
7
+ module.exports = require("./navigationWarmup.js");
8
+ },
9
+ "./rendererHead" (module) {
10
+ module.exports = require("./rendererHead.js");
11
+ },
12
+ "./shellStream" (module) {
13
+ module.exports = require("./shellStream.js");
14
+ }
15
+ };
16
+ var __webpack_module_cache__ = {};
17
+ function __webpack_require__(moduleId) {
18
+ var cachedModule = __webpack_module_cache__[moduleId];
19
+ if (void 0 !== cachedModule) return cachedModule.exports;
20
+ var module = __webpack_module_cache__[moduleId] = {
21
+ exports: {}
22
+ };
23
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
24
+ return module.exports;
25
+ }
26
+ (()=>{
27
+ __webpack_require__.n = (module)=>{
28
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
29
+ __webpack_require__.d(getter, {
30
+ a: getter
31
+ });
32
+ return getter;
33
+ };
34
+ })();
35
+ (()=>{
36
+ __webpack_require__.d = (exports1, getters, values)=>{
37
+ var define = (defs, kind)=>{
38
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
39
+ enumerable: true,
40
+ [kind]: defs[key]
41
+ });
42
+ };
43
+ define(getters, "get");
44
+ define(values, "value");
45
+ };
46
+ })();
47
+ (()=>{
48
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
49
+ })();
50
+ (()=>{
51
+ __webpack_require__.r = (exports1)=>{
52
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
53
+ value: 'Module'
54
+ });
55
+ Object.defineProperty(exports1, '__esModule', {
56
+ value: true
57
+ });
58
+ };
59
+ })();
60
+ var __webpack_exports__ = {};
61
+ (()=>{
62
+ __webpack_require__.r(__webpack_exports__);
63
+ var _html__rspack_import_0 = __webpack_require__("./html");
64
+ var __rspack_reexport = {};
65
+ for(const __rspack_import_key in _html__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_html__rspack_import_0[__rspack_import_key];
66
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
67
+ var _navigationWarmup__rspack_import_1 = __webpack_require__("./navigationWarmup");
68
+ var __rspack_reexport = {};
69
+ for(const __rspack_import_key in _navigationWarmup__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_navigationWarmup__rspack_import_1[__rspack_import_key];
70
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
71
+ var _rendererHead__rspack_import_2 = __webpack_require__("./rendererHead");
72
+ var __rspack_reexport = {};
73
+ for(const __rspack_import_key in _rendererHead__rspack_import_2)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_rendererHead__rspack_import_2[__rspack_import_key];
74
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
75
+ var _shellStream__rspack_import_3 = __webpack_require__("./shellStream");
76
+ var __rspack_reexport = {};
77
+ for(const __rspack_import_key in _shellStream__rspack_import_3)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_shellStream__rspack_import_3[__rspack_import_key];
78
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
79
+ })();
80
+ for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
81
+ Object.defineProperty(exports, '__esModule', {
82
+ value: true
83
+ });
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ const realmNamespaces = new WeakMap();
31
+ let nextRealmNamespace = 0;
32
+ function getNavigationWarmupCacheKey(runtimeContext, chunkLoader, publicPath, warmupKey) {
33
+ let loaderNamespaces = realmNamespaces.get(runtimeContext);
34
+ if (void 0 === loaderNamespaces) {
35
+ loaderNamespaces = new WeakMap();
36
+ realmNamespaces.set(runtimeContext, loaderNamespaces);
37
+ }
38
+ let publicPathNamespaces = loaderNamespaces.get(chunkLoader);
39
+ if (void 0 === publicPathNamespaces) {
40
+ publicPathNamespaces = new Map();
41
+ loaderNamespaces.set(chunkLoader, publicPathNamespaces);
42
+ }
43
+ let namespace = publicPathNamespaces.get(publicPath);
44
+ if (void 0 === namespace) {
45
+ namespace = `realm-${++nextRealmNamespace}`;
46
+ publicPathNamespaces.set(publicPath, namespace);
47
+ }
48
+ return `${namespace}:${warmupKey}`;
49
+ }
50
+ __webpack_require__.d(__webpack_exports__, {
51
+ getNavigationWarmupCacheKey: ()=>getNavigationWarmupCacheKey
52
+ });
53
+ exports.getNavigationWarmupCacheKey = __webpack_exports__.getNavigationWarmupCacheKey;
54
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
55
+ "getNavigationWarmupCacheKey"
56
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
57
+ Object.defineProperty(exports, '__esModule', {
58
+ value: true
59
+ });