1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | "use strict";
|
12 | var React = require("react"),
|
13 | ReactDOM = require("react-dom"),
|
14 | REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
15 | REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
16 | REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
17 | REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
18 | REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
19 | REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
20 | REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
21 | REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
22 | REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
23 | REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
24 | REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
25 | REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
26 | REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
27 | REACT_SCOPE_TYPE = Symbol.for("react.scope"),
|
28 | REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"),
|
29 | REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
|
30 | REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
|
31 | MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
32 | isArrayImpl = Array.isArray;
|
33 | function flushBuffered(destination) {
|
34 | "function" === typeof destination.flush && destination.flush();
|
35 | }
|
36 | function writeChunk(destination, chunk) {
|
37 | 0 !== chunk.length && destination.write(chunk);
|
38 | }
|
39 | function closeWithError(destination, error) {
|
40 | "function" === typeof destination.error
|
41 | ? destination.error(error)
|
42 | : destination.close();
|
43 | }
|
44 | var assign = Object.assign,
|
45 | hasOwnProperty = Object.prototype.hasOwnProperty,
|
46 | VALID_ATTRIBUTE_NAME_REGEX = RegExp(
|
47 | "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
|
48 | ),
|
49 | illegalAttributeNameCache = {},
|
50 | validatedAttributeNameCache = {};
|
51 | function isAttributeNameSafe(attributeName) {
|
52 | if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
|
53 | return !0;
|
54 | if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
|
55 | if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
|
56 | return (validatedAttributeNameCache[attributeName] = !0);
|
57 | illegalAttributeNameCache[attributeName] = !0;
|
58 | return !1;
|
59 | }
|
60 | var unitlessNumbers = new Set(
|
61 | "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
|
62 | " "
|
63 | )
|
64 | ),
|
65 | aliases = new Map([
|
66 | ["acceptCharset", "accept-charset"],
|
67 | ["htmlFor", "for"],
|
68 | ["httpEquiv", "http-equiv"],
|
69 | ["crossOrigin", "crossorigin"],
|
70 | ["accentHeight", "accent-height"],
|
71 | ["alignmentBaseline", "alignment-baseline"],
|
72 | ["arabicForm", "arabic-form"],
|
73 | ["baselineShift", "baseline-shift"],
|
74 | ["capHeight", "cap-height"],
|
75 | ["clipPath", "clip-path"],
|
76 | ["clipRule", "clip-rule"],
|
77 | ["colorInterpolation", "color-interpolation"],
|
78 | ["colorInterpolationFilters", "color-interpolation-filters"],
|
79 | ["colorProfile", "color-profile"],
|
80 | ["colorRendering", "color-rendering"],
|
81 | ["dominantBaseline", "dominant-baseline"],
|
82 | ["enableBackground", "enable-background"],
|
83 | ["fillOpacity", "fill-opacity"],
|
84 | ["fillRule", "fill-rule"],
|
85 | ["floodColor", "flood-color"],
|
86 | ["floodOpacity", "flood-opacity"],
|
87 | ["fontFamily", "font-family"],
|
88 | ["fontSize", "font-size"],
|
89 | ["fontSizeAdjust", "font-size-adjust"],
|
90 | ["fontStretch", "font-stretch"],
|
91 | ["fontStyle", "font-style"],
|
92 | ["fontVariant", "font-variant"],
|
93 | ["fontWeight", "font-weight"],
|
94 | ["glyphName", "glyph-name"],
|
95 | ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
|
96 | ["glyphOrientationVertical", "glyph-orientation-vertical"],
|
97 | ["horizAdvX", "horiz-adv-x"],
|
98 | ["horizOriginX", "horiz-origin-x"],
|
99 | ["imageRendering", "image-rendering"],
|
100 | ["letterSpacing", "letter-spacing"],
|
101 | ["lightingColor", "lighting-color"],
|
102 | ["markerEnd", "marker-end"],
|
103 | ["markerMid", "marker-mid"],
|
104 | ["markerStart", "marker-start"],
|
105 | ["overlinePosition", "overline-position"],
|
106 | ["overlineThickness", "overline-thickness"],
|
107 | ["paintOrder", "paint-order"],
|
108 | ["panose-1", "panose-1"],
|
109 | ["pointerEvents", "pointer-events"],
|
110 | ["renderingIntent", "rendering-intent"],
|
111 | ["shapeRendering", "shape-rendering"],
|
112 | ["stopColor", "stop-color"],
|
113 | ["stopOpacity", "stop-opacity"],
|
114 | ["strikethroughPosition", "strikethrough-position"],
|
115 | ["strikethroughThickness", "strikethrough-thickness"],
|
116 | ["strokeDasharray", "stroke-dasharray"],
|
117 | ["strokeDashoffset", "stroke-dashoffset"],
|
118 | ["strokeLinecap", "stroke-linecap"],
|
119 | ["strokeLinejoin", "stroke-linejoin"],
|
120 | ["strokeMiterlimit", "stroke-miterlimit"],
|
121 | ["strokeOpacity", "stroke-opacity"],
|
122 | ["strokeWidth", "stroke-width"],
|
123 | ["textAnchor", "text-anchor"],
|
124 | ["textDecoration", "text-decoration"],
|
125 | ["textRendering", "text-rendering"],
|
126 | ["transformOrigin", "transform-origin"],
|
127 | ["underlinePosition", "underline-position"],
|
128 | ["underlineThickness", "underline-thickness"],
|
129 | ["unicodeBidi", "unicode-bidi"],
|
130 | ["unicodeRange", "unicode-range"],
|
131 | ["unitsPerEm", "units-per-em"],
|
132 | ["vAlphabetic", "v-alphabetic"],
|
133 | ["vHanging", "v-hanging"],
|
134 | ["vIdeographic", "v-ideographic"],
|
135 | ["vMathematical", "v-mathematical"],
|
136 | ["vectorEffect", "vector-effect"],
|
137 | ["vertAdvY", "vert-adv-y"],
|
138 | ["vertOriginX", "vert-origin-x"],
|
139 | ["vertOriginY", "vert-origin-y"],
|
140 | ["wordSpacing", "word-spacing"],
|
141 | ["writingMode", "writing-mode"],
|
142 | ["xmlnsXlink", "xmlns:xlink"],
|
143 | ["xHeight", "x-height"]
|
144 | ]),
|
145 | matchHtmlRegExp = /["'&<>]/;
|
146 | function escapeTextForBrowser(text) {
|
147 | if (
|
148 | "boolean" === typeof text ||
|
149 | "number" === typeof text ||
|
150 | "bigint" === typeof text
|
151 | )
|
152 | return "" + text;
|
153 | text = "" + text;
|
154 | var match = matchHtmlRegExp.exec(text);
|
155 | if (match) {
|
156 | var html = "",
|
157 | index,
|
158 | lastIndex = 0;
|
159 | for (index = match.index; index < text.length; index++) {
|
160 | switch (text.charCodeAt(index)) {
|
161 | case 34:
|
162 | match = """;
|
163 | break;
|
164 | case 38:
|
165 | match = "&";
|
166 | break;
|
167 | case 39:
|
168 | match = "'";
|
169 | break;
|
170 | case 60:
|
171 | match = "<";
|
172 | break;
|
173 | case 62:
|
174 | match = ">";
|
175 | break;
|
176 | default:
|
177 | continue;
|
178 | }
|
179 | lastIndex !== index && (html += text.slice(lastIndex, index));
|
180 | lastIndex = index + 1;
|
181 | html += match;
|
182 | }
|
183 | text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;
|
184 | }
|
185 | return text;
|
186 | }
|
187 | var uppercasePattern = /([A-Z])/g,
|
188 | msPattern = /^ms-/,
|
189 | isJavaScriptProtocol =
|
190 | /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
|
191 | function sanitizeURL(url) {
|
192 | return isJavaScriptProtocol.test("" + url)
|
193 | ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
|
194 | : url;
|
195 | }
|
196 | var ReactSharedInternals =
|
197 | React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
198 | ReactDOMSharedInternals =
|
199 | ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
200 | sharedNotPendingObject = {
|
201 | pending: !1,
|
202 | data: null,
|
203 | method: null,
|
204 | action: null
|
205 | },
|
206 | previousDispatcher = ReactDOMSharedInternals.d;
|
207 | ReactDOMSharedInternals.d = {
|
208 | f: previousDispatcher.f,
|
209 | r: previousDispatcher.r,
|
210 | D: prefetchDNS,
|
211 | C: preconnect,
|
212 | L: preload,
|
213 | m: preloadModule,
|
214 | X: preinitScript,
|
215 | S: preinitStyle,
|
216 | M: preinitModuleScript
|
217 | };
|
218 | var PRELOAD_NO_CREDS = [],
|
219 | scriptRegex = /(<\/|<)(s)(cript)/gi;
|
220 | function scriptReplacer(match, prefix, s, suffix) {
|
221 | return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
|
222 | }
|
223 | function createRenderState(
|
224 | resumableState,
|
225 | nonce,
|
226 | externalRuntimeConfig,
|
227 | importMap,
|
228 | onHeaders,
|
229 | maxHeadersLength
|
230 | ) {
|
231 | var inlineScriptWithNonce =
|
232 | void 0 === nonce
|
233 | ? "<script>"
|
234 | : '<script nonce="' + escapeTextForBrowser(nonce) + '">',
|
235 | idPrefix = resumableState.idPrefix;
|
236 | externalRuntimeConfig = [];
|
237 | var bootstrapScriptContent = resumableState.bootstrapScriptContent,
|
238 | bootstrapScripts = resumableState.bootstrapScripts,
|
239 | bootstrapModules = resumableState.bootstrapModules;
|
240 | void 0 !== bootstrapScriptContent &&
|
241 | externalRuntimeConfig.push(
|
242 | inlineScriptWithNonce,
|
243 | ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
|
244 | "\x3c/script>"
|
245 | );
|
246 | bootstrapScriptContent = [];
|
247 | void 0 !== importMap &&
|
248 | (bootstrapScriptContent.push('<script type="importmap">'),
|
249 | bootstrapScriptContent.push(
|
250 | ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
|
251 | ),
|
252 | bootstrapScriptContent.push("\x3c/script>"));
|
253 | importMap = {
|
254 | placeholderPrefix: idPrefix + "P:",
|
255 | segmentPrefix: idPrefix + "S:",
|
256 | boundaryPrefix: idPrefix + "B:",
|
257 | startInlineScript: inlineScriptWithNonce,
|
258 | htmlChunks: null,
|
259 | headChunks: null,
|
260 | externalRuntimeScript: null,
|
261 | bootstrapChunks: externalRuntimeConfig,
|
262 | importMapChunks: bootstrapScriptContent,
|
263 | onHeaders: onHeaders,
|
264 | headers: onHeaders
|
265 | ? {
|
266 | preconnects: "",
|
267 | fontPreloads: "",
|
268 | highImagePreloads: "",
|
269 | remainingCapacity:
|
270 | "number" === typeof maxHeadersLength ? maxHeadersLength : 2e3
|
271 | }
|
272 | : null,
|
273 | resets: {
|
274 | font: {},
|
275 | dns: {},
|
276 | connect: { default: {}, anonymous: {}, credentials: {} },
|
277 | image: {},
|
278 | style: {}
|
279 | },
|
280 | charsetChunks: [],
|
281 | viewportChunks: [],
|
282 | hoistableChunks: [],
|
283 | preconnects: new Set(),
|
284 | fontPreloads: new Set(),
|
285 | highImagePreloads: new Set(),
|
286 | styles: new Map(),
|
287 | bootstrapScripts: new Set(),
|
288 | scripts: new Set(),
|
289 | bulkPreloads: new Set(),
|
290 | preloads: {
|
291 | images: new Map(),
|
292 | stylesheets: new Map(),
|
293 | scripts: new Map(),
|
294 | moduleScripts: new Map()
|
295 | },
|
296 | nonce: nonce,
|
297 | hoistableState: null,
|
298 | stylesToHoist: !1
|
299 | };
|
300 | if (void 0 !== bootstrapScripts)
|
301 | for (onHeaders = 0; onHeaders < bootstrapScripts.length; onHeaders++) {
|
302 | var scriptConfig = bootstrapScripts[onHeaders];
|
303 | idPrefix = inlineScriptWithNonce = void 0;
|
304 | bootstrapScriptContent = {
|
305 | rel: "preload",
|
306 | as: "script",
|
307 | fetchPriority: "low",
|
308 | nonce: nonce
|
309 | };
|
310 | "string" === typeof scriptConfig
|
311 | ? (bootstrapScriptContent.href = maxHeadersLength = scriptConfig)
|
312 | : ((bootstrapScriptContent.href = maxHeadersLength = scriptConfig.src),
|
313 | (bootstrapScriptContent.integrity = idPrefix =
|
314 | "string" === typeof scriptConfig.integrity
|
315 | ? scriptConfig.integrity
|
316 | : void 0),
|
317 | (bootstrapScriptContent.crossOrigin = inlineScriptWithNonce =
|
318 | "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
|
319 | ? void 0
|
320 | : "use-credentials" === scriptConfig.crossOrigin
|
321 | ? "use-credentials"
|
322 | : ""));
|
323 | scriptConfig = resumableState;
|
324 | var href = maxHeadersLength;
|
325 | scriptConfig.scriptResources[href] = null;
|
326 | scriptConfig.moduleScriptResources[href] = null;
|
327 | scriptConfig = [];
|
328 | pushLinkImpl(scriptConfig, bootstrapScriptContent);
|
329 | importMap.bootstrapScripts.add(scriptConfig);
|
330 | externalRuntimeConfig.push(
|
331 | '<script src="',
|
332 | escapeTextForBrowser(maxHeadersLength)
|
333 | );
|
334 | nonce &&
|
335 | externalRuntimeConfig.push('" nonce="', escapeTextForBrowser(nonce));
|
336 | "string" === typeof idPrefix &&
|
337 | externalRuntimeConfig.push(
|
338 | '" integrity="',
|
339 | escapeTextForBrowser(idPrefix)
|
340 | );
|
341 | "string" === typeof inlineScriptWithNonce &&
|
342 | externalRuntimeConfig.push(
|
343 | '" crossorigin="',
|
344 | escapeTextForBrowser(inlineScriptWithNonce)
|
345 | );
|
346 | externalRuntimeConfig.push('" async="">\x3c/script>');
|
347 | }
|
348 | if (void 0 !== bootstrapModules)
|
349 | for (
|
350 | bootstrapScripts = 0;
|
351 | bootstrapScripts < bootstrapModules.length;
|
352 | bootstrapScripts++
|
353 | )
|
354 | (bootstrapScriptContent = bootstrapModules[bootstrapScripts]),
|
355 | (inlineScriptWithNonce = maxHeadersLength = void 0),
|
356 | (idPrefix = {
|
357 | rel: "modulepreload",
|
358 | fetchPriority: "low",
|
359 | nonce: nonce
|
360 | }),
|
361 | "string" === typeof bootstrapScriptContent
|
362 | ? (idPrefix.href = onHeaders = bootstrapScriptContent)
|
363 | : ((idPrefix.href = onHeaders = bootstrapScriptContent.src),
|
364 | (idPrefix.integrity = inlineScriptWithNonce =
|
365 | "string" === typeof bootstrapScriptContent.integrity
|
366 | ? bootstrapScriptContent.integrity
|
367 | : void 0),
|
368 | (idPrefix.crossOrigin = maxHeadersLength =
|
369 | "string" === typeof bootstrapScriptContent ||
|
370 | null == bootstrapScriptContent.crossOrigin
|
371 | ? void 0
|
372 | : "use-credentials" === bootstrapScriptContent.crossOrigin
|
373 | ? "use-credentials"
|
374 | : "")),
|
375 | (bootstrapScriptContent = resumableState),
|
376 | (scriptConfig = onHeaders),
|
377 | (bootstrapScriptContent.scriptResources[scriptConfig] = null),
|
378 | (bootstrapScriptContent.moduleScriptResources[scriptConfig] = null),
|
379 | (bootstrapScriptContent = []),
|
380 | pushLinkImpl(bootstrapScriptContent, idPrefix),
|
381 | importMap.bootstrapScripts.add(bootstrapScriptContent),
|
382 | externalRuntimeConfig.push(
|
383 | '<script type="module" src="',
|
384 | escapeTextForBrowser(onHeaders)
|
385 | ),
|
386 | nonce &&
|
387 | externalRuntimeConfig.push('" nonce="', escapeTextForBrowser(nonce)),
|
388 | "string" === typeof inlineScriptWithNonce &&
|
389 | externalRuntimeConfig.push(
|
390 | '" integrity="',
|
391 | escapeTextForBrowser(inlineScriptWithNonce)
|
392 | ),
|
393 | "string" === typeof maxHeadersLength &&
|
394 | externalRuntimeConfig.push(
|
395 | '" crossorigin="',
|
396 | escapeTextForBrowser(maxHeadersLength)
|
397 | ),
|
398 | externalRuntimeConfig.push('" async="">\x3c/script>');
|
399 | return importMap;
|
400 | }
|
401 | function createResumableState(
|
402 | identifierPrefix,
|
403 | externalRuntimeConfig,
|
404 | bootstrapScriptContent,
|
405 | bootstrapScripts,
|
406 | bootstrapModules
|
407 | ) {
|
408 | return {
|
409 | idPrefix: void 0 === identifierPrefix ? "" : identifierPrefix,
|
410 | nextFormID: 0,
|
411 | streamingFormat: 0,
|
412 | bootstrapScriptContent: bootstrapScriptContent,
|
413 | bootstrapScripts: bootstrapScripts,
|
414 | bootstrapModules: bootstrapModules,
|
415 | instructions: 0,
|
416 | hasBody: !1,
|
417 | hasHtml: !1,
|
418 | unknownResources: {},
|
419 | dnsResources: {},
|
420 | connectResources: { default: {}, anonymous: {}, credentials: {} },
|
421 | imageResources: {},
|
422 | styleResources: {},
|
423 | scriptResources: {},
|
424 | moduleUnknownResources: {},
|
425 | moduleScriptResources: {}
|
426 | };
|
427 | }
|
428 | function createFormatContext(insertionMode, selectedValue, tagScope) {
|
429 | return {
|
430 | insertionMode: insertionMode,
|
431 | selectedValue: selectedValue,
|
432 | tagScope: tagScope
|
433 | };
|
434 | }
|
435 | function createRootFormatContext(namespaceURI) {
|
436 | return createFormatContext(
|
437 | "http://www.w3.org/2000/svg" === namespaceURI
|
438 | ? 3
|
439 | : "http://www.w3.org/1998/Math/MathML" === namespaceURI
|
440 | ? 4
|
441 | : 0,
|
442 | null,
|
443 | 0
|
444 | );
|
445 | }
|
446 | function getChildFormatContext(parentContext, type, props) {
|
447 | switch (type) {
|
448 | case "noscript":
|
449 | return createFormatContext(2, null, parentContext.tagScope | 1);
|
450 | case "select":
|
451 | return createFormatContext(
|
452 | 2,
|
453 | null != props.value ? props.value : props.defaultValue,
|
454 | parentContext.tagScope
|
455 | );
|
456 | case "svg":
|
457 | return createFormatContext(3, null, parentContext.tagScope);
|
458 | case "picture":
|
459 | return createFormatContext(2, null, parentContext.tagScope | 2);
|
460 | case "math":
|
461 | return createFormatContext(4, null, parentContext.tagScope);
|
462 | case "foreignObject":
|
463 | return createFormatContext(2, null, parentContext.tagScope);
|
464 | case "table":
|
465 | return createFormatContext(5, null, parentContext.tagScope);
|
466 | case "thead":
|
467 | case "tbody":
|
468 | case "tfoot":
|
469 | return createFormatContext(6, null, parentContext.tagScope);
|
470 | case "colgroup":
|
471 | return createFormatContext(8, null, parentContext.tagScope);
|
472 | case "tr":
|
473 | return createFormatContext(7, null, parentContext.tagScope);
|
474 | }
|
475 | return 5 <= parentContext.insertionMode
|
476 | ? createFormatContext(2, null, parentContext.tagScope)
|
477 | : 0 === parentContext.insertionMode
|
478 | ? "html" === type
|
479 | ? createFormatContext(1, null, parentContext.tagScope)
|
480 | : createFormatContext(2, null, parentContext.tagScope)
|
481 | : 1 === parentContext.insertionMode
|
482 | ? createFormatContext(2, null, parentContext.tagScope)
|
483 | : parentContext;
|
484 | }
|
485 | function pushTextInstance(target, text, renderState, textEmbedded) {
|
486 | if ("" === text) return textEmbedded;
|
487 | textEmbedded && target.push("\x3c!-- --\x3e");
|
488 | target.push(escapeTextForBrowser(text));
|
489 | return !0;
|
490 | }
|
491 | var styleNameCache = new Map();
|
492 | function pushStyleAttribute(target, style) {
|
493 | if ("object" !== typeof style)
|
494 | throw Error(
|
495 | "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
|
496 | );
|
497 | var isFirst = !0,
|
498 | styleName;
|
499 | for (styleName in style)
|
500 | if (hasOwnProperty.call(style, styleName)) {
|
501 | var styleValue = style[styleName];
|
502 | if (
|
503 | null != styleValue &&
|
504 | "boolean" !== typeof styleValue &&
|
505 | "" !== styleValue
|
506 | ) {
|
507 | if (0 === styleName.indexOf("--")) {
|
508 | var nameChunk = escapeTextForBrowser(styleName);
|
509 | styleValue = escapeTextForBrowser(("" + styleValue).trim());
|
510 | } else
|
511 | (nameChunk = styleNameCache.get(styleName)),
|
512 | void 0 === nameChunk &&
|
513 | ((nameChunk = escapeTextForBrowser(
|
514 | styleName
|
515 | .replace(uppercasePattern, "-$1")
|
516 | .toLowerCase()
|
517 | .replace(msPattern, "-ms-")
|
518 | )),
|
519 | styleNameCache.set(styleName, nameChunk)),
|
520 | (styleValue =
|
521 | "number" === typeof styleValue
|
522 | ? 0 === styleValue || unitlessNumbers.has(styleName)
|
523 | ? "" + styleValue
|
524 | : styleValue + "px"
|
525 | : escapeTextForBrowser(("" + styleValue).trim()));
|
526 | isFirst
|
527 | ? ((isFirst = !1),
|
528 | target.push(' style="', nameChunk, ":", styleValue))
|
529 | : target.push(";", nameChunk, ":", styleValue);
|
530 | }
|
531 | }
|
532 | isFirst || target.push('"');
|
533 | }
|
534 | function pushBooleanAttribute(target, name, value) {
|
535 | value &&
|
536 | "function" !== typeof value &&
|
537 | "symbol" !== typeof value &&
|
538 | target.push(" ", name, '=""');
|
539 | }
|
540 | function pushStringAttribute(target, name, value) {
|
541 | "function" !== typeof value &&
|
542 | "symbol" !== typeof value &&
|
543 | "boolean" !== typeof value &&
|
544 | target.push(" ", name, '="', escapeTextForBrowser(value), '"');
|
545 | }
|
546 | var actionJavaScriptURL = escapeTextForBrowser(
|
547 | "javascript:throw new Error('React form unexpectedly submitted.')"
|
548 | );
|
549 | function pushAdditionalFormField(value, key) {
|
550 | this.push('<input type="hidden"');
|
551 | if ("string" !== typeof value)
|
552 | throw Error(
|
553 | "File/Blob fields are not yet supported in progressive forms. It probably means you are closing over binary data or FormData in a Server Action."
|
554 | );
|
555 | pushStringAttribute(this, "name", key);
|
556 | pushStringAttribute(this, "value", value);
|
557 | this.push("/>");
|
558 | }
|
559 | function getCustomFormFields(resumableState, formAction) {
|
560 | if ("function" === typeof formAction.$$FORM_ACTION) {
|
561 | var id = resumableState.nextFormID++;
|
562 | resumableState = resumableState.idPrefix + id;
|
563 | try {
|
564 | return formAction.$$FORM_ACTION(resumableState);
|
565 | } catch (x) {
|
566 | if ("object" === typeof x && null !== x && "function" === typeof x.then)
|
567 | throw x;
|
568 | }
|
569 | }
|
570 | return null;
|
571 | }
|
572 | function pushFormActionAttribute(
|
573 | target,
|
574 | resumableState,
|
575 | renderState,
|
576 | formAction,
|
577 | formEncType,
|
578 | formMethod,
|
579 | formTarget,
|
580 | name
|
581 | ) {
|
582 | var formData = null;
|
583 | if ("function" === typeof formAction) {
|
584 | var customFields = getCustomFormFields(resumableState, formAction);
|
585 | null !== customFields
|
586 | ? ((name = customFields.name),
|
587 | (formAction = customFields.action || ""),
|
588 | (formEncType = customFields.encType),
|
589 | (formMethod = customFields.method),
|
590 | (formTarget = customFields.target),
|
591 | (formData = customFields.data))
|
592 | : (target.push(" ", "formAction", '="', actionJavaScriptURL, '"'),
|
593 | (formTarget = formMethod = formEncType = formAction = name = null),
|
594 | injectFormReplayingRuntime(resumableState, renderState));
|
595 | }
|
596 | null != name && pushAttribute(target, "name", name);
|
597 | null != formAction && pushAttribute(target, "formAction", formAction);
|
598 | null != formEncType && pushAttribute(target, "formEncType", formEncType);
|
599 | null != formMethod && pushAttribute(target, "formMethod", formMethod);
|
600 | null != formTarget && pushAttribute(target, "formTarget", formTarget);
|
601 | return formData;
|
602 | }
|
603 | function pushAttribute(target, name, value) {
|
604 | switch (name) {
|
605 | case "className":
|
606 | pushStringAttribute(target, "class", value);
|
607 | break;
|
608 | case "tabIndex":
|
609 | pushStringAttribute(target, "tabindex", value);
|
610 | break;
|
611 | case "dir":
|
612 | case "role":
|
613 | case "viewBox":
|
614 | case "width":
|
615 | case "height":
|
616 | pushStringAttribute(target, name, value);
|
617 | break;
|
618 | case "style":
|
619 | pushStyleAttribute(target, value);
|
620 | break;
|
621 | case "src":
|
622 | case "href":
|
623 | if ("" === value) break;
|
624 | case "action":
|
625 | case "formAction":
|
626 | if (
|
627 | null == value ||
|
628 | "function" === typeof value ||
|
629 | "symbol" === typeof value ||
|
630 | "boolean" === typeof value
|
631 | )
|
632 | break;
|
633 | value = sanitizeURL("" + value);
|
634 | target.push(" ", name, '="', escapeTextForBrowser(value), '"');
|
635 | break;
|
636 | case "defaultValue":
|
637 | case "defaultChecked":
|
638 | case "innerHTML":
|
639 | case "suppressContentEditableWarning":
|
640 | case "suppressHydrationWarning":
|
641 | case "ref":
|
642 | break;
|
643 | case "autoFocus":
|
644 | case "multiple":
|
645 | case "muted":
|
646 | pushBooleanAttribute(target, name.toLowerCase(), value);
|
647 | break;
|
648 | case "xlinkHref":
|
649 | if (
|
650 | "function" === typeof value ||
|
651 | "symbol" === typeof value ||
|
652 | "boolean" === typeof value
|
653 | )
|
654 | break;
|
655 | value = sanitizeURL("" + value);
|
656 | target.push(" ", "xlink:href", '="', escapeTextForBrowser(value), '"');
|
657 | break;
|
658 | case "contentEditable":
|
659 | case "spellCheck":
|
660 | case "draggable":
|
661 | case "value":
|
662 | case "autoReverse":
|
663 | case "externalResourcesRequired":
|
664 | case "focusable":
|
665 | case "preserveAlpha":
|
666 | "function" !== typeof value &&
|
667 | "symbol" !== typeof value &&
|
668 | target.push(" ", name, '="', escapeTextForBrowser(value), '"');
|
669 | break;
|
670 | case "inert":
|
671 | case "allowFullScreen":
|
672 | case "async":
|
673 | case "autoPlay":
|
674 | case "controls":
|
675 | case "default":
|
676 | case "defer":
|
677 | case "disabled":
|
678 | case "disablePictureInPicture":
|
679 | case "disableRemotePlayback":
|
680 | case "formNoValidate":
|
681 | case "hidden":
|
682 | case "loop":
|
683 | case "noModule":
|
684 | case "noValidate":
|
685 | case "open":
|
686 | case "playsInline":
|
687 | case "readOnly":
|
688 | case "required":
|
689 | case "reversed":
|
690 | case "scoped":
|
691 | case "seamless":
|
692 | case "itemScope":
|
693 | value &&
|
694 | "function" !== typeof value &&
|
695 | "symbol" !== typeof value &&
|
696 | target.push(" ", name, '=""');
|
697 | break;
|
698 | case "capture":
|
699 | case "download":
|
700 | !0 === value
|
701 | ? target.push(" ", name, '=""')
|
702 | : !1 !== value &&
|
703 | "function" !== typeof value &&
|
704 | "symbol" !== typeof value &&
|
705 | target.push(" ", name, '="', escapeTextForBrowser(value), '"');
|
706 | break;
|
707 | case "cols":
|
708 | case "rows":
|
709 | case "size":
|
710 | case "span":
|
711 | "function" !== typeof value &&
|
712 | "symbol" !== typeof value &&
|
713 | !isNaN(value) &&
|
714 | 1 <= value &&
|
715 | target.push(" ", name, '="', escapeTextForBrowser(value), '"');
|
716 | break;
|
717 | case "rowSpan":
|
718 | case "start":
|
719 | "function" === typeof value ||
|
720 | "symbol" === typeof value ||
|
721 | isNaN(value) ||
|
722 | target.push(" ", name, '="', escapeTextForBrowser(value), '"');
|
723 | break;
|
724 | case "xlinkActuate":
|
725 | pushStringAttribute(target, "xlink:actuate", value);
|
726 | break;
|
727 | case "xlinkArcrole":
|
728 | pushStringAttribute(target, "xlink:arcrole", value);
|
729 | break;
|
730 | case "xlinkRole":
|
731 | pushStringAttribute(target, "xlink:role", value);
|
732 | break;
|
733 | case "xlinkShow":
|
734 | pushStringAttribute(target, "xlink:show", value);
|
735 | break;
|
736 | case "xlinkTitle":
|
737 | pushStringAttribute(target, "xlink:title", value);
|
738 | break;
|
739 | case "xlinkType":
|
740 | pushStringAttribute(target, "xlink:type", value);
|
741 | break;
|
742 | case "xmlBase":
|
743 | pushStringAttribute(target, "xml:base", value);
|
744 | break;
|
745 | case "xmlLang":
|
746 | pushStringAttribute(target, "xml:lang", value);
|
747 | break;
|
748 | case "xmlSpace":
|
749 | pushStringAttribute(target, "xml:space", value);
|
750 | break;
|
751 | default:
|
752 | if (
|
753 | !(2 < name.length) ||
|
754 | ("o" !== name[0] && "O" !== name[0]) ||
|
755 | ("n" !== name[1] && "N" !== name[1])
|
756 | )
|
757 | if (((name = aliases.get(name) || name), isAttributeNameSafe(name))) {
|
758 | switch (typeof value) {
|
759 | case "function":
|
760 | case "symbol":
|
761 | return;
|
762 | case "boolean":
|
763 | var prefix$8 = name.toLowerCase().slice(0, 5);
|
764 | if ("data-" !== prefix$8 && "aria-" !== prefix$8) return;
|
765 | }
|
766 | target.push(" ", name, '="', escapeTextForBrowser(value), '"');
|
767 | }
|
768 | }
|
769 | }
|
770 | function pushInnerHTML(target, innerHTML, children) {
|
771 | if (null != innerHTML) {
|
772 | if (null != children)
|
773 | throw Error(
|
774 | "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
|
775 | );
|
776 | if ("object" !== typeof innerHTML || !("__html" in innerHTML))
|
777 | throw Error(
|
778 | "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
|
779 | );
|
780 | innerHTML = innerHTML.__html;
|
781 | null !== innerHTML && void 0 !== innerHTML && target.push("" + innerHTML);
|
782 | }
|
783 | }
|
784 | function flattenOptionChildren(children) {
|
785 | var content = "";
|
786 | React.Children.forEach(children, function (child) {
|
787 | null != child && (content += child);
|
788 | });
|
789 | return content;
|
790 | }
|
791 | function injectFormReplayingRuntime(resumableState, renderState) {
|
792 | 0 === (resumableState.instructions & 16) &&
|
793 | ((resumableState.instructions |= 16),
|
794 | renderState.bootstrapChunks.unshift(
|
795 | renderState.startInlineScript,
|
796 | 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});',
|
797 | "\x3c/script>"
|
798 | ));
|
799 | }
|
800 | function pushLinkImpl(target, props) {
|
801 | target.push(startChunkForTag("link"));
|
802 | for (var propKey in props)
|
803 | if (hasOwnProperty.call(props, propKey)) {
|
804 | var propValue = props[propKey];
|
805 | if (null != propValue)
|
806 | switch (propKey) {
|
807 | case "children":
|
808 | case "dangerouslySetInnerHTML":
|
809 | throw Error(
|
810 | "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
|
811 | );
|
812 | default:
|
813 | pushAttribute(target, propKey, propValue);
|
814 | }
|
815 | }
|
816 | target.push("/>");
|
817 | return null;
|
818 | }
|
819 | var styleRegex = /(<\/|<)(s)(tyle)/gi;
|
820 | function styleReplacer(match, prefix, s, suffix) {
|
821 | return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix;
|
822 | }
|
823 | function pushSelfClosing(target, props, tag) {
|
824 | target.push(startChunkForTag(tag));
|
825 | for (var propKey in props)
|
826 | if (hasOwnProperty.call(props, propKey)) {
|
827 | var propValue = props[propKey];
|
828 | if (null != propValue)
|
829 | switch (propKey) {
|
830 | case "children":
|
831 | case "dangerouslySetInnerHTML":
|
832 | throw Error(
|
833 | tag +
|
834 | " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
|
835 | );
|
836 | default:
|
837 | pushAttribute(target, propKey, propValue);
|
838 | }
|
839 | }
|
840 | target.push("/>");
|
841 | return null;
|
842 | }
|
843 | function pushTitleImpl(target, props) {
|
844 | target.push(startChunkForTag("title"));
|
845 | var children = null,
|
846 | innerHTML = null,
|
847 | propKey;
|
848 | for (propKey in props)
|
849 | if (hasOwnProperty.call(props, propKey)) {
|
850 | var propValue = props[propKey];
|
851 | if (null != propValue)
|
852 | switch (propKey) {
|
853 | case "children":
|
854 | children = propValue;
|
855 | break;
|
856 | case "dangerouslySetInnerHTML":
|
857 | innerHTML = propValue;
|
858 | break;
|
859 | default:
|
860 | pushAttribute(target, propKey, propValue);
|
861 | }
|
862 | }
|
863 | target.push(">");
|
864 | props = Array.isArray(children)
|
865 | ? 2 > children.length
|
866 | ? children[0]
|
867 | : null
|
868 | : children;
|
869 | "function" !== typeof props &&
|
870 | "symbol" !== typeof props &&
|
871 | null !== props &&
|
872 | void 0 !== props &&
|
873 | target.push(escapeTextForBrowser("" + props));
|
874 | pushInnerHTML(target, innerHTML, children);
|
875 | target.push(endChunkForTag("title"));
|
876 | return null;
|
877 | }
|
878 | function pushScriptImpl(target, props) {
|
879 | target.push(startChunkForTag("script"));
|
880 | var children = null,
|
881 | innerHTML = null,
|
882 | propKey;
|
883 | for (propKey in props)
|
884 | if (hasOwnProperty.call(props, propKey)) {
|
885 | var propValue = props[propKey];
|
886 | if (null != propValue)
|
887 | switch (propKey) {
|
888 | case "children":
|
889 | children = propValue;
|
890 | break;
|
891 | case "dangerouslySetInnerHTML":
|
892 | innerHTML = propValue;
|
893 | break;
|
894 | default:
|
895 | pushAttribute(target, propKey, propValue);
|
896 | }
|
897 | }
|
898 | target.push(">");
|
899 | pushInnerHTML(target, innerHTML, children);
|
900 | "string" === typeof children &&
|
901 | target.push(("" + children).replace(scriptRegex, scriptReplacer));
|
902 | target.push(endChunkForTag("script"));
|
903 | return null;
|
904 | }
|
905 | function pushStartGenericElement(target, props, tag) {
|
906 | target.push(startChunkForTag(tag));
|
907 | var innerHTML = (tag = null),
|
908 | propKey;
|
909 | for (propKey in props)
|
910 | if (hasOwnProperty.call(props, propKey)) {
|
911 | var propValue = props[propKey];
|
912 | if (null != propValue)
|
913 | switch (propKey) {
|
914 | case "children":
|
915 | tag = propValue;
|
916 | break;
|
917 | case "dangerouslySetInnerHTML":
|
918 | innerHTML = propValue;
|
919 | break;
|
920 | default:
|
921 | pushAttribute(target, propKey, propValue);
|
922 | }
|
923 | }
|
924 | target.push(">");
|
925 | pushInnerHTML(target, innerHTML, tag);
|
926 | return "string" === typeof tag
|
927 | ? (target.push(escapeTextForBrowser(tag)), null)
|
928 | : tag;
|
929 | }
|
930 | var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
|
931 | validatedTagCache = new Map();
|
932 | function startChunkForTag(tag) {
|
933 | var tagStartChunk = validatedTagCache.get(tag);
|
934 | if (void 0 === tagStartChunk) {
|
935 | if (!VALID_TAG_REGEX.test(tag)) throw Error("Invalid tag: " + tag);
|
936 | tagStartChunk = "<" + tag;
|
937 | validatedTagCache.set(tag, tagStartChunk);
|
938 | }
|
939 | return tagStartChunk;
|
940 | }
|
941 | function pushStartInstance(
|
942 | target$jscomp$0,
|
943 | type,
|
944 | props,
|
945 | resumableState,
|
946 | renderState,
|
947 | hoistableState,
|
948 | formatContext,
|
949 | textEmbedded,
|
950 | isFallback
|
951 | ) {
|
952 | switch (type) {
|
953 | case "div":
|
954 | case "span":
|
955 | case "svg":
|
956 | case "path":
|
957 | break;
|
958 | case "a":
|
959 | target$jscomp$0.push(startChunkForTag("a"));
|
960 | var children = null,
|
961 | innerHTML = null,
|
962 | propKey;
|
963 | for (propKey in props)
|
964 | if (hasOwnProperty.call(props, propKey)) {
|
965 | var propValue = props[propKey];
|
966 | if (null != propValue)
|
967 | switch (propKey) {
|
968 | case "children":
|
969 | children = propValue;
|
970 | break;
|
971 | case "dangerouslySetInnerHTML":
|
972 | innerHTML = propValue;
|
973 | break;
|
974 | case "href":
|
975 | "" === propValue
|
976 | ? pushStringAttribute(target$jscomp$0, "href", "")
|
977 | : pushAttribute(target$jscomp$0, propKey, propValue);
|
978 | break;
|
979 | default:
|
980 | pushAttribute(target$jscomp$0, propKey, propValue);
|
981 | }
|
982 | }
|
983 | target$jscomp$0.push(">");
|
984 | pushInnerHTML(target$jscomp$0, innerHTML, children);
|
985 | if ("string" === typeof children) {
|
986 | target$jscomp$0.push(escapeTextForBrowser(children));
|
987 | var JSCompiler_inline_result = null;
|
988 | } else JSCompiler_inline_result = children;
|
989 | return JSCompiler_inline_result;
|
990 | case "g":
|
991 | case "p":
|
992 | case "li":
|
993 | break;
|
994 | case "select":
|
995 | target$jscomp$0.push(startChunkForTag("select"));
|
996 | var children$jscomp$0 = null,
|
997 | innerHTML$jscomp$0 = null,
|
998 | propKey$jscomp$0;
|
999 | for (propKey$jscomp$0 in props)
|
1000 | if (hasOwnProperty.call(props, propKey$jscomp$0)) {
|
1001 | var propValue$jscomp$0 = props[propKey$jscomp$0];
|
1002 | if (null != propValue$jscomp$0)
|
1003 | switch (propKey$jscomp$0) {
|
1004 | case "children":
|
1005 | children$jscomp$0 = propValue$jscomp$0;
|
1006 | break;
|
1007 | case "dangerouslySetInnerHTML":
|
1008 | innerHTML$jscomp$0 = propValue$jscomp$0;
|
1009 | break;
|
1010 | case "defaultValue":
|
1011 | case "value":
|
1012 | break;
|
1013 | default:
|
1014 | pushAttribute(
|
1015 | target$jscomp$0,
|
1016 | propKey$jscomp$0,
|
1017 | propValue$jscomp$0
|
1018 | );
|
1019 | }
|
1020 | }
|
1021 | target$jscomp$0.push(">");
|
1022 | pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
|
1023 | return children$jscomp$0;
|
1024 | case "option":
|
1025 | var selectedValue = formatContext.selectedValue;
|
1026 | target$jscomp$0.push(startChunkForTag("option"));
|
1027 | var children$jscomp$1 = null,
|
1028 | value = null,
|
1029 | selected = null,
|
1030 | innerHTML$jscomp$1 = null,
|
1031 | propKey$jscomp$1;
|
1032 | for (propKey$jscomp$1 in props)
|
1033 | if (hasOwnProperty.call(props, propKey$jscomp$1)) {
|
1034 | var propValue$jscomp$1 = props[propKey$jscomp$1];
|
1035 | if (null != propValue$jscomp$1)
|
1036 | switch (propKey$jscomp$1) {
|
1037 | case "children":
|
1038 | children$jscomp$1 = propValue$jscomp$1;
|
1039 | break;
|
1040 | case "selected":
|
1041 | selected = propValue$jscomp$1;
|
1042 | break;
|
1043 | case "dangerouslySetInnerHTML":
|
1044 | innerHTML$jscomp$1 = propValue$jscomp$1;
|
1045 | break;
|
1046 | case "value":
|
1047 | value = propValue$jscomp$1;
|
1048 | default:
|
1049 | pushAttribute(
|
1050 | target$jscomp$0,
|
1051 | propKey$jscomp$1,
|
1052 | propValue$jscomp$1
|
1053 | );
|
1054 | }
|
1055 | }
|
1056 | if (null != selectedValue) {
|
1057 | var stringValue =
|
1058 | null !== value
|
1059 | ? "" + value
|
1060 | : flattenOptionChildren(children$jscomp$1);
|
1061 | if (isArrayImpl(selectedValue))
|
1062 | for (var i = 0; i < selectedValue.length; i++) {
|
1063 | if ("" + selectedValue[i] === stringValue) {
|
1064 | target$jscomp$0.push(' selected=""');
|
1065 | break;
|
1066 | }
|
1067 | }
|
1068 | else
|
1069 | "" + selectedValue === stringValue &&
|
1070 | target$jscomp$0.push(' selected=""');
|
1071 | } else selected && target$jscomp$0.push(' selected=""');
|
1072 | target$jscomp$0.push(">");
|
1073 | pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);
|
1074 | return children$jscomp$1;
|
1075 | case "textarea":
|
1076 | target$jscomp$0.push(startChunkForTag("textarea"));
|
1077 | var value$jscomp$0 = null,
|
1078 | defaultValue = null,
|
1079 | children$jscomp$2 = null,
|
1080 | propKey$jscomp$2;
|
1081 | for (propKey$jscomp$2 in props)
|
1082 | if (hasOwnProperty.call(props, propKey$jscomp$2)) {
|
1083 | var propValue$jscomp$2 = props[propKey$jscomp$2];
|
1084 | if (null != propValue$jscomp$2)
|
1085 | switch (propKey$jscomp$2) {
|
1086 | case "children":
|
1087 | children$jscomp$2 = propValue$jscomp$2;
|
1088 | break;
|
1089 | case "value":
|
1090 | value$jscomp$0 = propValue$jscomp$2;
|
1091 | break;
|
1092 | case "defaultValue":
|
1093 | defaultValue = propValue$jscomp$2;
|
1094 | break;
|
1095 | case "dangerouslySetInnerHTML":
|
1096 | throw Error(
|
1097 | "`dangerouslySetInnerHTML` does not make sense on <textarea>."
|
1098 | );
|
1099 | default:
|
1100 | pushAttribute(
|
1101 | target$jscomp$0,
|
1102 | propKey$jscomp$2,
|
1103 | propValue$jscomp$2
|
1104 | );
|
1105 | }
|
1106 | }
|
1107 | null === value$jscomp$0 &&
|
1108 | null !== defaultValue &&
|
1109 | (value$jscomp$0 = defaultValue);
|
1110 | target$jscomp$0.push(">");
|
1111 | if (null != children$jscomp$2) {
|
1112 | if (null != value$jscomp$0)
|
1113 | throw Error(
|
1114 | "If you supply `defaultValue` on a <textarea>, do not pass children."
|
1115 | );
|
1116 | if (isArrayImpl(children$jscomp$2)) {
|
1117 | if (1 < children$jscomp$2.length)
|
1118 | throw Error("<textarea> can only have at most one child.");
|
1119 | value$jscomp$0 = "" + children$jscomp$2[0];
|
1120 | }
|
1121 | value$jscomp$0 = "" + children$jscomp$2;
|
1122 | }
|
1123 | "string" === typeof value$jscomp$0 &&
|
1124 | "\n" === value$jscomp$0[0] &&
|
1125 | target$jscomp$0.push("\n");
|
1126 | null !== value$jscomp$0 &&
|
1127 | target$jscomp$0.push(escapeTextForBrowser("" + value$jscomp$0));
|
1128 | return null;
|
1129 | case "input":
|
1130 | target$jscomp$0.push(startChunkForTag("input"));
|
1131 | var name = null,
|
1132 | formAction = null,
|
1133 | formEncType = null,
|
1134 | formMethod = null,
|
1135 | formTarget = null,
|
1136 | value$jscomp$1 = null,
|
1137 | defaultValue$jscomp$0 = null,
|
1138 | checked = null,
|
1139 | defaultChecked = null,
|
1140 | propKey$jscomp$3;
|
1141 | for (propKey$jscomp$3 in props)
|
1142 | if (hasOwnProperty.call(props, propKey$jscomp$3)) {
|
1143 | var propValue$jscomp$3 = props[propKey$jscomp$3];
|
1144 | if (null != propValue$jscomp$3)
|
1145 | switch (propKey$jscomp$3) {
|
1146 | case "children":
|
1147 | case "dangerouslySetInnerHTML":
|
1148 | throw Error(
|
1149 | "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
|
1150 | );
|
1151 | case "name":
|
1152 | name = propValue$jscomp$3;
|
1153 | break;
|
1154 | case "formAction":
|
1155 | formAction = propValue$jscomp$3;
|
1156 | break;
|
1157 | case "formEncType":
|
1158 | formEncType = propValue$jscomp$3;
|
1159 | break;
|
1160 | case "formMethod":
|
1161 | formMethod = propValue$jscomp$3;
|
1162 | break;
|
1163 | case "formTarget":
|
1164 | formTarget = propValue$jscomp$3;
|
1165 | break;
|
1166 | case "defaultChecked":
|
1167 | defaultChecked = propValue$jscomp$3;
|
1168 | break;
|
1169 | case "defaultValue":
|
1170 | defaultValue$jscomp$0 = propValue$jscomp$3;
|
1171 | break;
|
1172 | case "checked":
|
1173 | checked = propValue$jscomp$3;
|
1174 | break;
|
1175 | case "value":
|
1176 | value$jscomp$1 = propValue$jscomp$3;
|
1177 | break;
|
1178 | default:
|
1179 | pushAttribute(
|
1180 | target$jscomp$0,
|
1181 | propKey$jscomp$3,
|
1182 | propValue$jscomp$3
|
1183 | );
|
1184 | }
|
1185 | }
|
1186 | var formData = pushFormActionAttribute(
|
1187 | target$jscomp$0,
|
1188 | resumableState,
|
1189 | renderState,
|
1190 | formAction,
|
1191 | formEncType,
|
1192 | formMethod,
|
1193 | formTarget,
|
1194 | name
|
1195 | );
|
1196 | null !== checked
|
1197 | ? pushBooleanAttribute(target$jscomp$0, "checked", checked)
|
1198 | : null !== defaultChecked &&
|
1199 | pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked);
|
1200 | null !== value$jscomp$1
|
1201 | ? pushAttribute(target$jscomp$0, "value", value$jscomp$1)
|
1202 | : null !== defaultValue$jscomp$0 &&
|
1203 | pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
|
1204 | target$jscomp$0.push("/>");
|
1205 | null != formData &&
|
1206 | formData.forEach(pushAdditionalFormField, target$jscomp$0);
|
1207 | return null;
|
1208 | case "button":
|
1209 | target$jscomp$0.push(startChunkForTag("button"));
|
1210 | var children$jscomp$3 = null,
|
1211 | innerHTML$jscomp$2 = null,
|
1212 | name$jscomp$0 = null,
|
1213 | formAction$jscomp$0 = null,
|
1214 | formEncType$jscomp$0 = null,
|
1215 | formMethod$jscomp$0 = null,
|
1216 | formTarget$jscomp$0 = null,
|
1217 | propKey$jscomp$4;
|
1218 | for (propKey$jscomp$4 in props)
|
1219 | if (hasOwnProperty.call(props, propKey$jscomp$4)) {
|
1220 | var propValue$jscomp$4 = props[propKey$jscomp$4];
|
1221 | if (null != propValue$jscomp$4)
|
1222 | switch (propKey$jscomp$4) {
|
1223 | case "children":
|
1224 | children$jscomp$3 = propValue$jscomp$4;
|
1225 | break;
|
1226 | case "dangerouslySetInnerHTML":
|
1227 | innerHTML$jscomp$2 = propValue$jscomp$4;
|
1228 | break;
|
1229 | case "name":
|
1230 | name$jscomp$0 = propValue$jscomp$4;
|
1231 | break;
|
1232 | case "formAction":
|
1233 | formAction$jscomp$0 = propValue$jscomp$4;
|
1234 | break;
|
1235 | case "formEncType":
|
1236 | formEncType$jscomp$0 = propValue$jscomp$4;
|
1237 | break;
|
1238 | case "formMethod":
|
1239 | formMethod$jscomp$0 = propValue$jscomp$4;
|
1240 | break;
|
1241 | case "formTarget":
|
1242 | formTarget$jscomp$0 = propValue$jscomp$4;
|
1243 | break;
|
1244 | default:
|
1245 | pushAttribute(
|
1246 | target$jscomp$0,
|
1247 | propKey$jscomp$4,
|
1248 | propValue$jscomp$4
|
1249 | );
|
1250 | }
|
1251 | }
|
1252 | var formData$jscomp$0 = pushFormActionAttribute(
|
1253 | target$jscomp$0,
|
1254 | resumableState,
|
1255 | renderState,
|
1256 | formAction$jscomp$0,
|
1257 | formEncType$jscomp$0,
|
1258 | formMethod$jscomp$0,
|
1259 | formTarget$jscomp$0,
|
1260 | name$jscomp$0
|
1261 | );
|
1262 | target$jscomp$0.push(">");
|
1263 | null != formData$jscomp$0 &&
|
1264 | formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
|
1265 | pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);
|
1266 | if ("string" === typeof children$jscomp$3) {
|
1267 | target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));
|
1268 | var JSCompiler_inline_result$jscomp$0 = null;
|
1269 | } else JSCompiler_inline_result$jscomp$0 = children$jscomp$3;
|
1270 | return JSCompiler_inline_result$jscomp$0;
|
1271 | case "form":
|
1272 | target$jscomp$0.push(startChunkForTag("form"));
|
1273 | var children$jscomp$4 = null,
|
1274 | innerHTML$jscomp$3 = null,
|
1275 | formAction$jscomp$1 = null,
|
1276 | formEncType$jscomp$1 = null,
|
1277 | formMethod$jscomp$1 = null,
|
1278 | formTarget$jscomp$1 = null,
|
1279 | propKey$jscomp$5;
|
1280 | for (propKey$jscomp$5 in props)
|
1281 | if (hasOwnProperty.call(props, propKey$jscomp$5)) {
|
1282 | var propValue$jscomp$5 = props[propKey$jscomp$5];
|
1283 | if (null != propValue$jscomp$5)
|
1284 | switch (propKey$jscomp$5) {
|
1285 | case "children":
|
1286 | children$jscomp$4 = propValue$jscomp$5;
|
1287 | break;
|
1288 | case "dangerouslySetInnerHTML":
|
1289 | innerHTML$jscomp$3 = propValue$jscomp$5;
|
1290 | break;
|
1291 | case "action":
|
1292 | formAction$jscomp$1 = propValue$jscomp$5;
|
1293 | break;
|
1294 | case "encType":
|
1295 | formEncType$jscomp$1 = propValue$jscomp$5;
|
1296 | break;
|
1297 | case "method":
|
1298 | formMethod$jscomp$1 = propValue$jscomp$5;
|
1299 | break;
|
1300 | case "target":
|
1301 | formTarget$jscomp$1 = propValue$jscomp$5;
|
1302 | break;
|
1303 | default:
|
1304 | pushAttribute(
|
1305 | target$jscomp$0,
|
1306 | propKey$jscomp$5,
|
1307 | propValue$jscomp$5
|
1308 | );
|
1309 | }
|
1310 | }
|
1311 | var formData$jscomp$1 = null,
|
1312 | formActionName = null;
|
1313 | if ("function" === typeof formAction$jscomp$1) {
|
1314 | var customFields = getCustomFormFields(
|
1315 | resumableState,
|
1316 | formAction$jscomp$1
|
1317 | );
|
1318 | null !== customFields
|
1319 | ? ((formAction$jscomp$1 = customFields.action || ""),
|
1320 | (formEncType$jscomp$1 = customFields.encType),
|
1321 | (formMethod$jscomp$1 = customFields.method),
|
1322 | (formTarget$jscomp$1 = customFields.target),
|
1323 | (formData$jscomp$1 = customFields.data),
|
1324 | (formActionName = customFields.name))
|
1325 | : (target$jscomp$0.push(
|
1326 | " ",
|
1327 | "action",
|
1328 | '="',
|
1329 | actionJavaScriptURL,
|
1330 | '"'
|
1331 | ),
|
1332 | (formTarget$jscomp$1 =
|
1333 | formMethod$jscomp$1 =
|
1334 | formEncType$jscomp$1 =
|
1335 | formAction$jscomp$1 =
|
1336 | null),
|
1337 | injectFormReplayingRuntime(resumableState, renderState));
|
1338 | }
|
1339 | null != formAction$jscomp$1 &&
|
1340 | pushAttribute(target$jscomp$0, "action", formAction$jscomp$1);
|
1341 | null != formEncType$jscomp$1 &&
|
1342 | pushAttribute(target$jscomp$0, "encType", formEncType$jscomp$1);
|
1343 | null != formMethod$jscomp$1 &&
|
1344 | pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
|
1345 | null != formTarget$jscomp$1 &&
|
1346 | pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
|
1347 | target$jscomp$0.push(">");
|
1348 | null !== formActionName &&
|
1349 | (target$jscomp$0.push('<input type="hidden"'),
|
1350 | pushStringAttribute(target$jscomp$0, "name", formActionName),
|
1351 | target$jscomp$0.push("/>"),
|
1352 | null != formData$jscomp$1 &&
|
1353 | formData$jscomp$1.forEach(pushAdditionalFormField, target$jscomp$0));
|
1354 | pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);
|
1355 | if ("string" === typeof children$jscomp$4) {
|
1356 | target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));
|
1357 | var JSCompiler_inline_result$jscomp$1 = null;
|
1358 | } else JSCompiler_inline_result$jscomp$1 = children$jscomp$4;
|
1359 | return JSCompiler_inline_result$jscomp$1;
|
1360 | case "menuitem":
|
1361 | target$jscomp$0.push(startChunkForTag("menuitem"));
|
1362 | for (var propKey$jscomp$6 in props)
|
1363 | if (hasOwnProperty.call(props, propKey$jscomp$6)) {
|
1364 | var propValue$jscomp$6 = props[propKey$jscomp$6];
|
1365 | if (null != propValue$jscomp$6)
|
1366 | switch (propKey$jscomp$6) {
|
1367 | case "children":
|
1368 | case "dangerouslySetInnerHTML":
|
1369 | throw Error(
|
1370 | "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
|
1371 | );
|
1372 | default:
|
1373 | pushAttribute(
|
1374 | target$jscomp$0,
|
1375 | propKey$jscomp$6,
|
1376 | propValue$jscomp$6
|
1377 | );
|
1378 | }
|
1379 | }
|
1380 | target$jscomp$0.push(">");
|
1381 | return null;
|
1382 | case "title":
|
1383 | if (
|
1384 | 3 === formatContext.insertionMode ||
|
1385 | formatContext.tagScope & 1 ||
|
1386 | null != props.itemProp
|
1387 | )
|
1388 | var JSCompiler_inline_result$jscomp$2 = pushTitleImpl(
|
1389 | target$jscomp$0,
|
1390 | props
|
1391 | );
|
1392 | else
|
1393 | isFallback
|
1394 | ? (JSCompiler_inline_result$jscomp$2 = null)
|
1395 | : (pushTitleImpl(renderState.hoistableChunks, props),
|
1396 | (JSCompiler_inline_result$jscomp$2 = void 0));
|
1397 | return JSCompiler_inline_result$jscomp$2;
|
1398 | case "link":
|
1399 | var rel = props.rel,
|
1400 | href = props.href,
|
1401 | precedence = props.precedence;
|
1402 | if (
|
1403 | 3 === formatContext.insertionMode ||
|
1404 | formatContext.tagScope & 1 ||
|
1405 | null != props.itemProp ||
|
1406 | "string" !== typeof rel ||
|
1407 | "string" !== typeof href ||
|
1408 | "" === href
|
1409 | ) {
|
1410 | pushLinkImpl(target$jscomp$0, props);
|
1411 | var JSCompiler_inline_result$jscomp$3 = null;
|
1412 | } else if ("stylesheet" === props.rel)
|
1413 | if (
|
1414 | "string" !== typeof precedence ||
|
1415 | null != props.disabled ||
|
1416 | props.onLoad ||
|
1417 | props.onError
|
1418 | )
|
1419 | JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
|
1420 | target$jscomp$0,
|
1421 | props
|
1422 | );
|
1423 | else {
|
1424 | var styleQueue = renderState.styles.get(precedence),
|
1425 | resourceState = resumableState.styleResources.hasOwnProperty(href)
|
1426 | ? resumableState.styleResources[href]
|
1427 | : void 0;
|
1428 | if (null !== resourceState) {
|
1429 | resumableState.styleResources[href] = null;
|
1430 | styleQueue ||
|
1431 | ((styleQueue = {
|
1432 | precedence: escapeTextForBrowser(precedence),
|
1433 | rules: [],
|
1434 | hrefs: [],
|
1435 | sheets: new Map()
|
1436 | }),
|
1437 | renderState.styles.set(precedence, styleQueue));
|
1438 | var resource = {
|
1439 | state: 0,
|
1440 | props: assign({}, props, {
|
1441 | "data-precedence": props.precedence,
|
1442 | precedence: null
|
1443 | })
|
1444 | };
|
1445 | if (resourceState) {
|
1446 | 2 === resourceState.length &&
|
1447 | adoptPreloadCredentials(resource.props, resourceState);
|
1448 | var preloadResource = renderState.preloads.stylesheets.get(href);
|
1449 | preloadResource && 0 < preloadResource.length
|
1450 | ? (preloadResource.length = 0)
|
1451 | : (resource.state = 1);
|
1452 | }
|
1453 | styleQueue.sheets.set(href, resource);
|
1454 | hoistableState && hoistableState.stylesheets.add(resource);
|
1455 | } else if (styleQueue) {
|
1456 | var resource$9 = styleQueue.sheets.get(href);
|
1457 | resource$9 &&
|
1458 | hoistableState &&
|
1459 | hoistableState.stylesheets.add(resource$9);
|
1460 | }
|
1461 | textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
|
1462 | JSCompiler_inline_result$jscomp$3 = null;
|
1463 | }
|
1464 | else
|
1465 | props.onLoad || props.onError
|
1466 | ? (JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
|
1467 | target$jscomp$0,
|
1468 | props
|
1469 | ))
|
1470 | : (textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
|
1471 | (JSCompiler_inline_result$jscomp$3 = isFallback
|
1472 | ? null
|
1473 | : pushLinkImpl(renderState.hoistableChunks, props)));
|
1474 | return JSCompiler_inline_result$jscomp$3;
|
1475 | case "script":
|
1476 | var asyncProp = props.async;
|
1477 | if (
|
1478 | "string" !== typeof props.src ||
|
1479 | !props.src ||
|
1480 | !asyncProp ||
|
1481 | "function" === typeof asyncProp ||
|
1482 | "symbol" === typeof asyncProp ||
|
1483 | props.onLoad ||
|
1484 | props.onError ||
|
1485 | 3 === formatContext.insertionMode ||
|
1486 | formatContext.tagScope & 1 ||
|
1487 | null != props.itemProp
|
1488 | )
|
1489 | var JSCompiler_inline_result$jscomp$4 = pushScriptImpl(
|
1490 | target$jscomp$0,
|
1491 | props
|
1492 | );
|
1493 | else {
|
1494 | var key = props.src;
|
1495 | if ("module" === props.type) {
|
1496 | var resources = resumableState.moduleScriptResources;
|
1497 | var preloads = renderState.preloads.moduleScripts;
|
1498 | } else
|
1499 | (resources = resumableState.scriptResources),
|
1500 | (preloads = renderState.preloads.scripts);
|
1501 | var resourceState$jscomp$0 = resources.hasOwnProperty(key)
|
1502 | ? resources[key]
|
1503 | : void 0;
|
1504 | if (null !== resourceState$jscomp$0) {
|
1505 | resources[key] = null;
|
1506 | var scriptProps = props;
|
1507 | if (resourceState$jscomp$0) {
|
1508 | 2 === resourceState$jscomp$0.length &&
|
1509 | ((scriptProps = assign({}, props)),
|
1510 | adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));
|
1511 | var preloadResource$jscomp$0 = preloads.get(key);
|
1512 | preloadResource$jscomp$0 && (preloadResource$jscomp$0.length = 0);
|
1513 | }
|
1514 | var resource$jscomp$0 = [];
|
1515 | renderState.scripts.add(resource$jscomp$0);
|
1516 | pushScriptImpl(resource$jscomp$0, scriptProps);
|
1517 | }
|
1518 | textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
|
1519 | JSCompiler_inline_result$jscomp$4 = null;
|
1520 | }
|
1521 | return JSCompiler_inline_result$jscomp$4;
|
1522 | case "style":
|
1523 | var precedence$jscomp$0 = props.precedence,
|
1524 | href$jscomp$0 = props.href;
|
1525 | if (
|
1526 | 3 === formatContext.insertionMode ||
|
1527 | formatContext.tagScope & 1 ||
|
1528 | null != props.itemProp ||
|
1529 | "string" !== typeof precedence$jscomp$0 ||
|
1530 | "string" !== typeof href$jscomp$0 ||
|
1531 | "" === href$jscomp$0
|
1532 | ) {
|
1533 | target$jscomp$0.push(startChunkForTag("style"));
|
1534 | var children$jscomp$5 = null,
|
1535 | innerHTML$jscomp$4 = null,
|
1536 | propKey$jscomp$7;
|
1537 | for (propKey$jscomp$7 in props)
|
1538 | if (hasOwnProperty.call(props, propKey$jscomp$7)) {
|
1539 | var propValue$jscomp$7 = props[propKey$jscomp$7];
|
1540 | if (null != propValue$jscomp$7)
|
1541 | switch (propKey$jscomp$7) {
|
1542 | case "children":
|
1543 | children$jscomp$5 = propValue$jscomp$7;
|
1544 | break;
|
1545 | case "dangerouslySetInnerHTML":
|
1546 | innerHTML$jscomp$4 = propValue$jscomp$7;
|
1547 | break;
|
1548 | default:
|
1549 | pushAttribute(
|
1550 | target$jscomp$0,
|
1551 | propKey$jscomp$7,
|
1552 | propValue$jscomp$7
|
1553 | );
|
1554 | }
|
1555 | }
|
1556 | target$jscomp$0.push(">");
|
1557 | var child = Array.isArray(children$jscomp$5)
|
1558 | ? 2 > children$jscomp$5.length
|
1559 | ? children$jscomp$5[0]
|
1560 | : null
|
1561 | : children$jscomp$5;
|
1562 | "function" !== typeof child &&
|
1563 | "symbol" !== typeof child &&
|
1564 | null !== child &&
|
1565 | void 0 !== child &&
|
1566 | target$jscomp$0.push(("" + child).replace(styleRegex, styleReplacer));
|
1567 | pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
|
1568 | target$jscomp$0.push(endChunkForTag("style"));
|
1569 | var JSCompiler_inline_result$jscomp$5 = null;
|
1570 | } else {
|
1571 | var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
|
1572 | if (
|
1573 | null !==
|
1574 | (resumableState.styleResources.hasOwnProperty(href$jscomp$0)
|
1575 | ? resumableState.styleResources[href$jscomp$0]
|
1576 | : void 0)
|
1577 | ) {
|
1578 | resumableState.styleResources[href$jscomp$0] = null;
|
1579 | styleQueue$jscomp$0
|
1580 | ? styleQueue$jscomp$0.hrefs.push(
|
1581 | escapeTextForBrowser(href$jscomp$0)
|
1582 | )
|
1583 | : ((styleQueue$jscomp$0 = {
|
1584 | precedence: escapeTextForBrowser(precedence$jscomp$0),
|
1585 | rules: [],
|
1586 | hrefs: [escapeTextForBrowser(href$jscomp$0)],
|
1587 | sheets: new Map()
|
1588 | }),
|
1589 | renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
|
1590 | var target = styleQueue$jscomp$0.rules,
|
1591 | children$jscomp$6 = null,
|
1592 | innerHTML$jscomp$5 = null,
|
1593 | propKey$jscomp$8;
|
1594 | for (propKey$jscomp$8 in props)
|
1595 | if (hasOwnProperty.call(props, propKey$jscomp$8)) {
|
1596 | var propValue$jscomp$8 = props[propKey$jscomp$8];
|
1597 | if (null != propValue$jscomp$8)
|
1598 | switch (propKey$jscomp$8) {
|
1599 | case "children":
|
1600 | children$jscomp$6 = propValue$jscomp$8;
|
1601 | break;
|
1602 | case "dangerouslySetInnerHTML":
|
1603 | innerHTML$jscomp$5 = propValue$jscomp$8;
|
1604 | }
|
1605 | }
|
1606 | var child$jscomp$0 = Array.isArray(children$jscomp$6)
|
1607 | ? 2 > children$jscomp$6.length
|
1608 | ? children$jscomp$6[0]
|
1609 | : null
|
1610 | : children$jscomp$6;
|
1611 | "function" !== typeof child$jscomp$0 &&
|
1612 | "symbol" !== typeof child$jscomp$0 &&
|
1613 | null !== child$jscomp$0 &&
|
1614 | void 0 !== child$jscomp$0 &&
|
1615 | target.push(
|
1616 | ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
|
1617 | );
|
1618 | pushInnerHTML(target, innerHTML$jscomp$5, children$jscomp$6);
|
1619 | }
|
1620 | styleQueue$jscomp$0 &&
|
1621 | hoistableState &&
|
1622 | hoistableState.styles.add(styleQueue$jscomp$0);
|
1623 | textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
|
1624 | JSCompiler_inline_result$jscomp$5 = void 0;
|
1625 | }
|
1626 | return JSCompiler_inline_result$jscomp$5;
|
1627 | case "meta":
|
1628 | if (
|
1629 | 3 === formatContext.insertionMode ||
|
1630 | formatContext.tagScope & 1 ||
|
1631 | null != props.itemProp
|
1632 | )
|
1633 | var JSCompiler_inline_result$jscomp$6 = pushSelfClosing(
|
1634 | target$jscomp$0,
|
1635 | props,
|
1636 | "meta"
|
1637 | );
|
1638 | else
|
1639 | textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
|
1640 | (JSCompiler_inline_result$jscomp$6 = isFallback
|
1641 | ? null
|
1642 | : "string" === typeof props.charSet
|
1643 | ? pushSelfClosing(renderState.charsetChunks, props, "meta")
|
1644 | : "viewport" === props.name
|
1645 | ? pushSelfClosing(renderState.viewportChunks, props, "meta")
|
1646 | : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
|
1647 | return JSCompiler_inline_result$jscomp$6;
|
1648 | case "listing":
|
1649 | case "pre":
|
1650 | target$jscomp$0.push(startChunkForTag(type));
|
1651 | var children$jscomp$7 = null,
|
1652 | innerHTML$jscomp$6 = null,
|
1653 | propKey$jscomp$9;
|
1654 | for (propKey$jscomp$9 in props)
|
1655 | if (hasOwnProperty.call(props, propKey$jscomp$9)) {
|
1656 | var propValue$jscomp$9 = props[propKey$jscomp$9];
|
1657 | if (null != propValue$jscomp$9)
|
1658 | switch (propKey$jscomp$9) {
|
1659 | case "children":
|
1660 | children$jscomp$7 = propValue$jscomp$9;
|
1661 | break;
|
1662 | case "dangerouslySetInnerHTML":
|
1663 | innerHTML$jscomp$6 = propValue$jscomp$9;
|
1664 | break;
|
1665 | default:
|
1666 | pushAttribute(
|
1667 | target$jscomp$0,
|
1668 | propKey$jscomp$9,
|
1669 | propValue$jscomp$9
|
1670 | );
|
1671 | }
|
1672 | }
|
1673 | target$jscomp$0.push(">");
|
1674 | if (null != innerHTML$jscomp$6) {
|
1675 | if (null != children$jscomp$7)
|
1676 | throw Error(
|
1677 | "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
|
1678 | );
|
1679 | if (
|
1680 | "object" !== typeof innerHTML$jscomp$6 ||
|
1681 | !("__html" in innerHTML$jscomp$6)
|
1682 | )
|
1683 | throw Error(
|
1684 | "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
|
1685 | );
|
1686 | var html = innerHTML$jscomp$6.__html;
|
1687 | null !== html &&
|
1688 | void 0 !== html &&
|
1689 | ("string" === typeof html && 0 < html.length && "\n" === html[0]
|
1690 | ? target$jscomp$0.push("\n", html)
|
1691 | : target$jscomp$0.push("" + html));
|
1692 | }
|
1693 | "string" === typeof children$jscomp$7 &&
|
1694 | "\n" === children$jscomp$7[0] &&
|
1695 | target$jscomp$0.push("\n");
|
1696 | return children$jscomp$7;
|
1697 | case "img":
|
1698 | var src = props.src,
|
1699 | srcSet = props.srcSet;
|
1700 | if (
|
1701 | !(
|
1702 | "lazy" === props.loading ||
|
1703 | (!src && !srcSet) ||
|
1704 | ("string" !== typeof src && null != src) ||
|
1705 | ("string" !== typeof srcSet && null != srcSet)
|
1706 | ) &&
|
1707 | "low" !== props.fetchPriority &&
|
1708 | !1 === !!(formatContext.tagScope & 3) &&
|
1709 | ("string" !== typeof src ||
|
1710 | ":" !== src[4] ||
|
1711 | ("d" !== src[0] && "D" !== src[0]) ||
|
1712 | ("a" !== src[1] && "A" !== src[1]) ||
|
1713 | ("t" !== src[2] && "T" !== src[2]) ||
|
1714 | ("a" !== src[3] && "A" !== src[3])) &&
|
1715 | ("string" !== typeof srcSet ||
|
1716 | ":" !== srcSet[4] ||
|
1717 | ("d" !== srcSet[0] && "D" !== srcSet[0]) ||
|
1718 | ("a" !== srcSet[1] && "A" !== srcSet[1]) ||
|
1719 | ("t" !== srcSet[2] && "T" !== srcSet[2]) ||
|
1720 | ("a" !== srcSet[3] && "A" !== srcSet[3]))
|
1721 | ) {
|
1722 | var sizes = "string" === typeof props.sizes ? props.sizes : void 0,
|
1723 | key$jscomp$0 = srcSet ? srcSet + "\n" + (sizes || "") : src,
|
1724 | promotablePreloads = renderState.preloads.images,
|
1725 | resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);
|
1726 | if (resource$jscomp$1) {
|
1727 | if (
|
1728 | "high" === props.fetchPriority ||
|
1729 | 10 > renderState.highImagePreloads.size
|
1730 | )
|
1731 | promotablePreloads.delete(key$jscomp$0),
|
1732 | renderState.highImagePreloads.add(resource$jscomp$1);
|
1733 | } else if (
|
1734 | !resumableState.imageResources.hasOwnProperty(key$jscomp$0)
|
1735 | ) {
|
1736 | resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
|
1737 | var input = props.crossOrigin;
|
1738 | var JSCompiler_inline_result$jscomp$7 =
|
1739 | "string" === typeof input
|
1740 | ? "use-credentials" === input
|
1741 | ? input
|
1742 | : ""
|
1743 | : void 0;
|
1744 | var headers = renderState.headers,
|
1745 | header;
|
1746 | headers &&
|
1747 | 0 < headers.remainingCapacity &&
|
1748 | ("high" === props.fetchPriority ||
|
1749 | 500 > headers.highImagePreloads.length) &&
|
1750 | ((header = getPreloadAsHeader(src, "image", {
|
1751 | imageSrcSet: props.srcSet,
|
1752 | imageSizes: props.sizes,
|
1753 | crossOrigin: JSCompiler_inline_result$jscomp$7,
|
1754 | integrity: props.integrity,
|
1755 | nonce: props.nonce,
|
1756 | type: props.type,
|
1757 | fetchPriority: props.fetchPriority,
|
1758 | referrerPolicy: props.refererPolicy
|
1759 | })),
|
1760 | 2 <= (headers.remainingCapacity -= header.length))
|
1761 | ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
|
1762 | headers.highImagePreloads && (headers.highImagePreloads += ", "),
|
1763 | (headers.highImagePreloads += header))
|
1764 | : ((resource$jscomp$1 = []),
|
1765 | pushLinkImpl(resource$jscomp$1, {
|
1766 | rel: "preload",
|
1767 | as: "image",
|
1768 | href: srcSet ? void 0 : src,
|
1769 | imageSrcSet: srcSet,
|
1770 | imageSizes: sizes,
|
1771 | crossOrigin: JSCompiler_inline_result$jscomp$7,
|
1772 | integrity: props.integrity,
|
1773 | type: props.type,
|
1774 | fetchPriority: props.fetchPriority,
|
1775 | referrerPolicy: props.referrerPolicy
|
1776 | }),
|
1777 | "high" === props.fetchPriority ||
|
1778 | 10 > renderState.highImagePreloads.size
|
1779 | ? renderState.highImagePreloads.add(resource$jscomp$1)
|
1780 | : (renderState.bulkPreloads.add(resource$jscomp$1),
|
1781 | promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
|
1782 | }
|
1783 | }
|
1784 | return pushSelfClosing(target$jscomp$0, props, "img");
|
1785 | case "base":
|
1786 | case "area":
|
1787 | case "br":
|
1788 | case "col":
|
1789 | case "embed":
|
1790 | case "hr":
|
1791 | case "keygen":
|
1792 | case "param":
|
1793 | case "source":
|
1794 | case "track":
|
1795 | case "wbr":
|
1796 | return pushSelfClosing(target$jscomp$0, props, type);
|
1797 | case "annotation-xml":
|
1798 | case "color-profile":
|
1799 | case "font-face":
|
1800 | case "font-face-src":
|
1801 | case "font-face-uri":
|
1802 | case "font-face-format":
|
1803 | case "font-face-name":
|
1804 | case "missing-glyph":
|
1805 | break;
|
1806 | case "head":
|
1807 | if (2 > formatContext.insertionMode && null === renderState.headChunks) {
|
1808 | renderState.headChunks = [];
|
1809 | var JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
|
1810 | renderState.headChunks,
|
1811 | props,
|
1812 | "head"
|
1813 | );
|
1814 | } else
|
1815 | JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
|
1816 | target$jscomp$0,
|
1817 | props,
|
1818 | "head"
|
1819 | );
|
1820 | return JSCompiler_inline_result$jscomp$8;
|
1821 | case "html":
|
1822 | if (
|
1823 | 0 === formatContext.insertionMode &&
|
1824 | null === renderState.htmlChunks
|
1825 | ) {
|
1826 | renderState.htmlChunks = ["<!DOCTYPE html>"];
|
1827 | var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
|
1828 | renderState.htmlChunks,
|
1829 | props,
|
1830 | "html"
|
1831 | );
|
1832 | } else
|
1833 | JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
|
1834 | target$jscomp$0,
|
1835 | props,
|
1836 | "html"
|
1837 | );
|
1838 | return JSCompiler_inline_result$jscomp$9;
|
1839 | default:
|
1840 | if (-1 !== type.indexOf("-")) {
|
1841 | target$jscomp$0.push(startChunkForTag(type));
|
1842 | var children$jscomp$8 = null,
|
1843 | innerHTML$jscomp$7 = null,
|
1844 | propKey$jscomp$10;
|
1845 | for (propKey$jscomp$10 in props)
|
1846 | if (hasOwnProperty.call(props, propKey$jscomp$10)) {
|
1847 | var propValue$jscomp$10 = props[propKey$jscomp$10];
|
1848 | if (null != propValue$jscomp$10) {
|
1849 | var attributeName = propKey$jscomp$10;
|
1850 | switch (propKey$jscomp$10) {
|
1851 | case "children":
|
1852 | children$jscomp$8 = propValue$jscomp$10;
|
1853 | break;
|
1854 | case "dangerouslySetInnerHTML":
|
1855 | innerHTML$jscomp$7 = propValue$jscomp$10;
|
1856 | break;
|
1857 | case "style":
|
1858 | pushStyleAttribute(target$jscomp$0, propValue$jscomp$10);
|
1859 | break;
|
1860 | case "suppressContentEditableWarning":
|
1861 | case "suppressHydrationWarning":
|
1862 | case "ref":
|
1863 | break;
|
1864 | case "className":
|
1865 | attributeName = "class";
|
1866 | default:
|
1867 | if (
|
1868 | isAttributeNameSafe(propKey$jscomp$10) &&
|
1869 | "function" !== typeof propValue$jscomp$10 &&
|
1870 | "symbol" !== typeof propValue$jscomp$10 &&
|
1871 | !1 !== propValue$jscomp$10
|
1872 | ) {
|
1873 | if (!0 === propValue$jscomp$10) propValue$jscomp$10 = "";
|
1874 | else if ("object" === typeof propValue$jscomp$10) continue;
|
1875 | target$jscomp$0.push(
|
1876 | " ",
|
1877 | attributeName,
|
1878 | '="',
|
1879 | escapeTextForBrowser(propValue$jscomp$10),
|
1880 | '"'
|
1881 | );
|
1882 | }
|
1883 | }
|
1884 | }
|
1885 | }
|
1886 | target$jscomp$0.push(">");
|
1887 | pushInnerHTML(target$jscomp$0, innerHTML$jscomp$7, children$jscomp$8);
|
1888 | return children$jscomp$8;
|
1889 | }
|
1890 | }
|
1891 | return pushStartGenericElement(target$jscomp$0, props, type);
|
1892 | }
|
1893 | var endTagCache = new Map();
|
1894 | function endChunkForTag(tag) {
|
1895 | var chunk = endTagCache.get(tag);
|
1896 | void 0 === chunk && ((chunk = "</" + tag + ">"), endTagCache.set(tag, chunk));
|
1897 | return chunk;
|
1898 | }
|
1899 | function writeBootstrap(destination, renderState) {
|
1900 | renderState = renderState.bootstrapChunks;
|
1901 | for (var i = 0; i < renderState.length - 1; i++)
|
1902 | writeChunk(destination, renderState[i]);
|
1903 | return i < renderState.length
|
1904 | ? ((i = renderState[i]), (renderState.length = 0), !!destination.write(i))
|
1905 | : !0;
|
1906 | }
|
1907 | function writeStartPendingSuspenseBoundary(destination, renderState, id) {
|
1908 | writeChunk(destination, '\x3c!--$?--\x3e<template id="');
|
1909 | if (null === id)
|
1910 | throw Error(
|
1911 | "An ID must have been assigned before we can complete the boundary."
|
1912 | );
|
1913 | writeChunk(destination, renderState.boundaryPrefix);
|
1914 | writeChunk(destination, id.toString(16));
|
1915 | return !!destination.write('"></template>');
|
1916 | }
|
1917 | function writeStartSegment(destination, renderState, formatContext, id) {
|
1918 | switch (formatContext.insertionMode) {
|
1919 | case 0:
|
1920 | case 1:
|
1921 | case 2:
|
1922 | return (
|
1923 | writeChunk(destination, '<div hidden id="'),
|
1924 | writeChunk(destination, renderState.segmentPrefix),
|
1925 | writeChunk(destination, id.toString(16)),
|
1926 | !!destination.write('">')
|
1927 | );
|
1928 | case 3:
|
1929 | return (
|
1930 | writeChunk(
|
1931 | destination,
|
1932 | '<svg aria-hidden="true" style="display:none" id="'
|
1933 | ),
|
1934 | writeChunk(destination, renderState.segmentPrefix),
|
1935 | writeChunk(destination, id.toString(16)),
|
1936 | !!destination.write('">')
|
1937 | );
|
1938 | case 4:
|
1939 | return (
|
1940 | writeChunk(
|
1941 | destination,
|
1942 | '<math aria-hidden="true" style="display:none" id="'
|
1943 | ),
|
1944 | writeChunk(destination, renderState.segmentPrefix),
|
1945 | writeChunk(destination, id.toString(16)),
|
1946 | !!destination.write('">')
|
1947 | );
|
1948 | case 5:
|
1949 | return (
|
1950 | writeChunk(destination, '<table hidden id="'),
|
1951 | writeChunk(destination, renderState.segmentPrefix),
|
1952 | writeChunk(destination, id.toString(16)),
|
1953 | !!destination.write('">')
|
1954 | );
|
1955 | case 6:
|
1956 | return (
|
1957 | writeChunk(destination, '<table hidden><tbody id="'),
|
1958 | writeChunk(destination, renderState.segmentPrefix),
|
1959 | writeChunk(destination, id.toString(16)),
|
1960 | !!destination.write('">')
|
1961 | );
|
1962 | case 7:
|
1963 | return (
|
1964 | writeChunk(destination, '<table hidden><tr id="'),
|
1965 | writeChunk(destination, renderState.segmentPrefix),
|
1966 | writeChunk(destination, id.toString(16)),
|
1967 | !!destination.write('">')
|
1968 | );
|
1969 | case 8:
|
1970 | return (
|
1971 | writeChunk(destination, '<table hidden><colgroup id="'),
|
1972 | writeChunk(destination, renderState.segmentPrefix),
|
1973 | writeChunk(destination, id.toString(16)),
|
1974 | !!destination.write('">')
|
1975 | );
|
1976 | default:
|
1977 | throw Error("Unknown insertion mode. This is a bug in React.");
|
1978 | }
|
1979 | }
|
1980 | function writeEndSegment(destination, formatContext) {
|
1981 | switch (formatContext.insertionMode) {
|
1982 | case 0:
|
1983 | case 1:
|
1984 | case 2:
|
1985 | return !!destination.write("</div>");
|
1986 | case 3:
|
1987 | return !!destination.write("</svg>");
|
1988 | case 4:
|
1989 | return !!destination.write("</math>");
|
1990 | case 5:
|
1991 | return !!destination.write("</table>");
|
1992 | case 6:
|
1993 | return !!destination.write("</tbody></table>");
|
1994 | case 7:
|
1995 | return !!destination.write("</tr></table>");
|
1996 | case 8:
|
1997 | return !!destination.write("</colgroup></table>");
|
1998 | default:
|
1999 | throw Error("Unknown insertion mode. This is a bug in React.");
|
2000 | }
|
2001 | }
|
2002 | var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
|
2003 | function escapeJSStringsForInstructionScripts(input) {
|
2004 | return JSON.stringify(input).replace(
|
2005 | regexForJSStringsInInstructionScripts,
|
2006 | function (match) {
|
2007 | switch (match) {
|
2008 | case "<":
|
2009 | return "\\u003c";
|
2010 | case "\u2028":
|
2011 | return "\\u2028";
|
2012 | case "\u2029":
|
2013 | return "\\u2029";
|
2014 | default:
|
2015 | throw Error(
|
2016 | "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
|
2017 | );
|
2018 | }
|
2019 | }
|
2020 | );
|
2021 | }
|
2022 | var regexForJSStringsInScripts = /[&><\u2028\u2029]/g;
|
2023 | function escapeJSObjectForInstructionScripts(input) {
|
2024 | return JSON.stringify(input).replace(
|
2025 | regexForJSStringsInScripts,
|
2026 | function (match) {
|
2027 | switch (match) {
|
2028 | case "&":
|
2029 | return "\\u0026";
|
2030 | case ">":
|
2031 | return "\\u003e";
|
2032 | case "<":
|
2033 | return "\\u003c";
|
2034 | case "\u2028":
|
2035 | return "\\u2028";
|
2036 | case "\u2029":
|
2037 | return "\\u2029";
|
2038 | default:
|
2039 | throw Error(
|
2040 | "escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
|
2041 | );
|
2042 | }
|
2043 | }
|
2044 | );
|
2045 | }
|
2046 | var currentlyRenderingBoundaryHasStylesToHoist = !1,
|
2047 | destinationHasCapacity = !0;
|
2048 | function flushStyleTagsLateForBoundary(styleQueue) {
|
2049 | var rules = styleQueue.rules,
|
2050 | hrefs = styleQueue.hrefs,
|
2051 | i = 0;
|
2052 | if (hrefs.length) {
|
2053 | writeChunk(this, '<style media="not all" data-precedence="');
|
2054 | writeChunk(this, styleQueue.precedence);
|
2055 | for (writeChunk(this, '" data-href="'); i < hrefs.length - 1; i++)
|
2056 | writeChunk(this, hrefs[i]), writeChunk(this, " ");
|
2057 | writeChunk(this, hrefs[i]);
|
2058 | writeChunk(this, '">');
|
2059 | for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);
|
2060 | destinationHasCapacity = !!this.write("</style>");
|
2061 | currentlyRenderingBoundaryHasStylesToHoist = !0;
|
2062 | rules.length = 0;
|
2063 | hrefs.length = 0;
|
2064 | }
|
2065 | }
|
2066 | function hasStylesToHoist(stylesheet) {
|
2067 | return 2 !== stylesheet.state
|
2068 | ? (currentlyRenderingBoundaryHasStylesToHoist = !0)
|
2069 | : !1;
|
2070 | }
|
2071 | function writeHoistablesForBoundary(destination, hoistableState, renderState) {
|
2072 | currentlyRenderingBoundaryHasStylesToHoist = !1;
|
2073 | destinationHasCapacity = !0;
|
2074 | hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
|
2075 | hoistableState.stylesheets.forEach(hasStylesToHoist);
|
2076 | currentlyRenderingBoundaryHasStylesToHoist &&
|
2077 | (renderState.stylesToHoist = !0);
|
2078 | return destinationHasCapacity;
|
2079 | }
|
2080 | function flushResource(resource) {
|
2081 | for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);
|
2082 | resource.length = 0;
|
2083 | }
|
2084 | var stylesheetFlushingQueue = [];
|
2085 | function flushStyleInPreamble(stylesheet) {
|
2086 | pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);
|
2087 | for (var i = 0; i < stylesheetFlushingQueue.length; i++)
|
2088 | writeChunk(this, stylesheetFlushingQueue[i]);
|
2089 | stylesheetFlushingQueue.length = 0;
|
2090 | stylesheet.state = 2;
|
2091 | }
|
2092 | function flushStylesInPreamble(styleQueue) {
|
2093 | var hasStylesheets = 0 < styleQueue.sheets.size;
|
2094 | styleQueue.sheets.forEach(flushStyleInPreamble, this);
|
2095 | styleQueue.sheets.clear();
|
2096 | var rules = styleQueue.rules,
|
2097 | hrefs = styleQueue.hrefs;
|
2098 | if (!hasStylesheets || hrefs.length) {
|
2099 | writeChunk(this, '<style data-precedence="');
|
2100 | writeChunk(this, styleQueue.precedence);
|
2101 | styleQueue = 0;
|
2102 | if (hrefs.length) {
|
2103 | for (
|
2104 | writeChunk(this, '" data-href="');
|
2105 | styleQueue < hrefs.length - 1;
|
2106 | styleQueue++
|
2107 | )
|
2108 | writeChunk(this, hrefs[styleQueue]), writeChunk(this, " ");
|
2109 | writeChunk(this, hrefs[styleQueue]);
|
2110 | }
|
2111 | writeChunk(this, '">');
|
2112 | for (styleQueue = 0; styleQueue < rules.length; styleQueue++)
|
2113 | writeChunk(this, rules[styleQueue]);
|
2114 | writeChunk(this, "</style>");
|
2115 | rules.length = 0;
|
2116 | hrefs.length = 0;
|
2117 | }
|
2118 | }
|
2119 | function preloadLateStyle(stylesheet) {
|
2120 | if (0 === stylesheet.state) {
|
2121 | stylesheet.state = 1;
|
2122 | var props = stylesheet.props;
|
2123 | pushLinkImpl(stylesheetFlushingQueue, {
|
2124 | rel: "preload",
|
2125 | as: "style",
|
2126 | href: stylesheet.props.href,
|
2127 | crossOrigin: props.crossOrigin,
|
2128 | fetchPriority: props.fetchPriority,
|
2129 | integrity: props.integrity,
|
2130 | media: props.media,
|
2131 | hrefLang: props.hrefLang,
|
2132 | referrerPolicy: props.referrerPolicy
|
2133 | });
|
2134 | for (
|
2135 | stylesheet = 0;
|
2136 | stylesheet < stylesheetFlushingQueue.length;
|
2137 | stylesheet++
|
2138 | )
|
2139 | writeChunk(this, stylesheetFlushingQueue[stylesheet]);
|
2140 | stylesheetFlushingQueue.length = 0;
|
2141 | }
|
2142 | }
|
2143 | function preloadLateStyles(styleQueue) {
|
2144 | styleQueue.sheets.forEach(preloadLateStyle, this);
|
2145 | styleQueue.sheets.clear();
|
2146 | }
|
2147 | function writeStyleResourceDependenciesInJS(destination, hoistableState) {
|
2148 | writeChunk(destination, "[");
|
2149 | var nextArrayOpenBrackChunk = "[";
|
2150 | hoistableState.stylesheets.forEach(function (resource) {
|
2151 | if (2 !== resource.state)
|
2152 | if (3 === resource.state)
|
2153 | writeChunk(destination, nextArrayOpenBrackChunk),
|
2154 | writeChunk(
|
2155 | destination,
|
2156 | escapeJSObjectForInstructionScripts("" + resource.props.href)
|
2157 | ),
|
2158 | writeChunk(destination, "]"),
|
2159 | (nextArrayOpenBrackChunk = ",[");
|
2160 | else {
|
2161 | writeChunk(destination, nextArrayOpenBrackChunk);
|
2162 | var precedence = resource.props["data-precedence"],
|
2163 | props = resource.props,
|
2164 | coercedHref = sanitizeURL("" + resource.props.href);
|
2165 | writeChunk(
|
2166 | destination,
|
2167 | escapeJSObjectForInstructionScripts(coercedHref)
|
2168 | );
|
2169 | precedence = "" + precedence;
|
2170 | writeChunk(destination, ",");
|
2171 | writeChunk(
|
2172 | destination,
|
2173 | escapeJSObjectForInstructionScripts(precedence)
|
2174 | );
|
2175 | for (var propKey in props)
|
2176 | if (
|
2177 | hasOwnProperty.call(props, propKey) &&
|
2178 | ((precedence = props[propKey]), null != precedence)
|
2179 | )
|
2180 | switch (propKey) {
|
2181 | case "href":
|
2182 | case "rel":
|
2183 | case "precedence":
|
2184 | case "data-precedence":
|
2185 | break;
|
2186 | case "children":
|
2187 | case "dangerouslySetInnerHTML":
|
2188 | throw Error(
|
2189 | "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
|
2190 | );
|
2191 | default:
|
2192 | writeStyleResourceAttributeInJS(
|
2193 | destination,
|
2194 | propKey,
|
2195 | precedence
|
2196 | );
|
2197 | }
|
2198 | writeChunk(destination, "]");
|
2199 | nextArrayOpenBrackChunk = ",[";
|
2200 | resource.state = 3;
|
2201 | }
|
2202 | });
|
2203 | writeChunk(destination, "]");
|
2204 | }
|
2205 | function writeStyleResourceAttributeInJS(destination, name, value) {
|
2206 | var attributeName = name.toLowerCase();
|
2207 | switch (typeof value) {
|
2208 | case "function":
|
2209 | case "symbol":
|
2210 | return;
|
2211 | }
|
2212 | switch (name) {
|
2213 | case "innerHTML":
|
2214 | case "dangerouslySetInnerHTML":
|
2215 | case "suppressContentEditableWarning":
|
2216 | case "suppressHydrationWarning":
|
2217 | case "style":
|
2218 | case "ref":
|
2219 | return;
|
2220 | case "className":
|
2221 | attributeName = "class";
|
2222 | name = "" + value;
|
2223 | break;
|
2224 | case "hidden":
|
2225 | if (!1 === value) return;
|
2226 | name = "";
|
2227 | break;
|
2228 | case "src":
|
2229 | case "href":
|
2230 | value = sanitizeURL(value);
|
2231 | name = "" + value;
|
2232 | break;
|
2233 | default:
|
2234 | if (
|
2235 | (2 < name.length &&
|
2236 | ("o" === name[0] || "O" === name[0]) &&
|
2237 | ("n" === name[1] || "N" === name[1])) ||
|
2238 | !isAttributeNameSafe(name)
|
2239 | )
|
2240 | return;
|
2241 | name = "" + value;
|
2242 | }
|
2243 | writeChunk(destination, ",");
|
2244 | writeChunk(destination, escapeJSObjectForInstructionScripts(attributeName));
|
2245 | writeChunk(destination, ",");
|
2246 | writeChunk(destination, escapeJSObjectForInstructionScripts(name));
|
2247 | }
|
2248 | function createHoistableState() {
|
2249 | return { styles: new Set(), stylesheets: new Set() };
|
2250 | }
|
2251 | function prefetchDNS(href) {
|
2252 | var request = currentRequest ? currentRequest : null;
|
2253 | if (request) {
|
2254 | var resumableState = request.resumableState,
|
2255 | renderState = request.renderState;
|
2256 | if ("string" === typeof href && href) {
|
2257 | if (!resumableState.dnsResources.hasOwnProperty(href)) {
|
2258 | resumableState.dnsResources[href] = null;
|
2259 | resumableState = renderState.headers;
|
2260 | var header, JSCompiler_temp;
|
2261 | if (
|
2262 | (JSCompiler_temp =
|
2263 | resumableState && 0 < resumableState.remainingCapacity)
|
2264 | )
|
2265 | JSCompiler_temp =
|
2266 | ((header =
|
2267 | "<" +
|
2268 | ("" + href).replace(
|
2269 | regexForHrefInLinkHeaderURLContext,
|
2270 | escapeHrefForLinkHeaderURLContextReplacer
|
2271 | ) +
|
2272 | ">; rel=dns-prefetch"),
|
2273 | 2 <= (resumableState.remainingCapacity -= header.length));
|
2274 | JSCompiler_temp
|
2275 | ? ((renderState.resets.dns[href] = null),
|
2276 | resumableState.preconnects && (resumableState.preconnects += ", "),
|
2277 | (resumableState.preconnects += header))
|
2278 | : ((header = []),
|
2279 | pushLinkImpl(header, { href: href, rel: "dns-prefetch" }),
|
2280 | renderState.preconnects.add(header));
|
2281 | }
|
2282 | enqueueFlush(request);
|
2283 | }
|
2284 | } else previousDispatcher.D(href);
|
2285 | }
|
2286 | function preconnect(href, crossOrigin) {
|
2287 | var request = currentRequest ? currentRequest : null;
|
2288 | if (request) {
|
2289 | var resumableState = request.resumableState,
|
2290 | renderState = request.renderState;
|
2291 | if ("string" === typeof href && href) {
|
2292 | var bucket =
|
2293 | "use-credentials" === crossOrigin
|
2294 | ? "credentials"
|
2295 | : "string" === typeof crossOrigin
|
2296 | ? "anonymous"
|
2297 | : "default";
|
2298 | if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
|
2299 | resumableState.connectResources[bucket][href] = null;
|
2300 | resumableState = renderState.headers;
|
2301 | var header, JSCompiler_temp;
|
2302 | if (
|
2303 | (JSCompiler_temp =
|
2304 | resumableState && 0 < resumableState.remainingCapacity)
|
2305 | ) {
|
2306 | JSCompiler_temp =
|
2307 | "<" +
|
2308 | ("" + href).replace(
|
2309 | regexForHrefInLinkHeaderURLContext,
|
2310 | escapeHrefForLinkHeaderURLContextReplacer
|
2311 | ) +
|
2312 | ">; rel=preconnect";
|
2313 | if ("string" === typeof crossOrigin) {
|
2314 | var escapedCrossOrigin = ("" + crossOrigin).replace(
|
2315 | regexForLinkHeaderQuotedParamValueContext,
|
2316 | escapeStringForLinkHeaderQuotedParamValueContextReplacer
|
2317 | );
|
2318 | JSCompiler_temp += '; crossorigin="' + escapedCrossOrigin + '"';
|
2319 | }
|
2320 | JSCompiler_temp =
|
2321 | ((header = JSCompiler_temp),
|
2322 | 2 <= (resumableState.remainingCapacity -= header.length));
|
2323 | }
|
2324 | JSCompiler_temp
|
2325 | ? ((renderState.resets.connect[bucket][href] = null),
|
2326 | resumableState.preconnects && (resumableState.preconnects += ", "),
|
2327 | (resumableState.preconnects += header))
|
2328 | : ((bucket = []),
|
2329 | pushLinkImpl(bucket, {
|
2330 | rel: "preconnect",
|
2331 | href: href,
|
2332 | crossOrigin: crossOrigin
|
2333 | }),
|
2334 | renderState.preconnects.add(bucket));
|
2335 | }
|
2336 | enqueueFlush(request);
|
2337 | }
|
2338 | } else previousDispatcher.C(href, crossOrigin);
|
2339 | }
|
2340 | function preload(href, as, options) {
|
2341 | var request = currentRequest ? currentRequest : null;
|
2342 | if (request) {
|
2343 | var resumableState = request.resumableState,
|
2344 | renderState = request.renderState;
|
2345 | if (as && href) {
|
2346 | switch (as) {
|
2347 | case "image":
|
2348 | if (options) {
|
2349 | var imageSrcSet = options.imageSrcSet;
|
2350 | var imageSizes = options.imageSizes;
|
2351 | var fetchPriority = options.fetchPriority;
|
2352 | }
|
2353 | var key = imageSrcSet
|
2354 | ? imageSrcSet + "\n" + (imageSizes || "")
|
2355 | : href;
|
2356 | if (resumableState.imageResources.hasOwnProperty(key)) return;
|
2357 | resumableState.imageResources[key] = PRELOAD_NO_CREDS;
|
2358 | resumableState = renderState.headers;
|
2359 | var header;
|
2360 | resumableState &&
|
2361 | 0 < resumableState.remainingCapacity &&
|
2362 | "high" === fetchPriority &&
|
2363 | ((header = getPreloadAsHeader(href, as, options)),
|
2364 | 2 <= (resumableState.remainingCapacity -= header.length))
|
2365 | ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
|
2366 | resumableState.highImagePreloads &&
|
2367 | (resumableState.highImagePreloads += ", "),
|
2368 | (resumableState.highImagePreloads += header))
|
2369 | : ((resumableState = []),
|
2370 | pushLinkImpl(
|
2371 | resumableState,
|
2372 | assign(
|
2373 | { rel: "preload", href: imageSrcSet ? void 0 : href, as: as },
|
2374 | options
|
2375 | )
|
2376 | ),
|
2377 | "high" === fetchPriority
|
2378 | ? renderState.highImagePreloads.add(resumableState)
|
2379 | : (renderState.bulkPreloads.add(resumableState),
|
2380 | renderState.preloads.images.set(key, resumableState)));
|
2381 | break;
|
2382 | case "style":
|
2383 | if (resumableState.styleResources.hasOwnProperty(href)) return;
|
2384 | imageSrcSet = [];
|
2385 | pushLinkImpl(
|
2386 | imageSrcSet,
|
2387 | assign({ rel: "preload", href: href, as: as }, options)
|
2388 | );
|
2389 | resumableState.styleResources[href] =
|
2390 | !options ||
|
2391 | ("string" !== typeof options.crossOrigin &&
|
2392 | "string" !== typeof options.integrity)
|
2393 | ? PRELOAD_NO_CREDS
|
2394 | : [options.crossOrigin, options.integrity];
|
2395 | renderState.preloads.stylesheets.set(href, imageSrcSet);
|
2396 | renderState.bulkPreloads.add(imageSrcSet);
|
2397 | break;
|
2398 | case "script":
|
2399 | if (resumableState.scriptResources.hasOwnProperty(href)) return;
|
2400 | imageSrcSet = [];
|
2401 | renderState.preloads.scripts.set(href, imageSrcSet);
|
2402 | renderState.bulkPreloads.add(imageSrcSet);
|
2403 | pushLinkImpl(
|
2404 | imageSrcSet,
|
2405 | assign({ rel: "preload", href: href, as: as }, options)
|
2406 | );
|
2407 | resumableState.scriptResources[href] =
|
2408 | !options ||
|
2409 | ("string" !== typeof options.crossOrigin &&
|
2410 | "string" !== typeof options.integrity)
|
2411 | ? PRELOAD_NO_CREDS
|
2412 | : [options.crossOrigin, options.integrity];
|
2413 | break;
|
2414 | default:
|
2415 | if (resumableState.unknownResources.hasOwnProperty(as)) {
|
2416 | if (
|
2417 | ((imageSrcSet = resumableState.unknownResources[as]),
|
2418 | imageSrcSet.hasOwnProperty(href))
|
2419 | )
|
2420 | return;
|
2421 | } else
|
2422 | (imageSrcSet = {}),
|
2423 | (resumableState.unknownResources[as] = imageSrcSet);
|
2424 | imageSrcSet[href] = PRELOAD_NO_CREDS;
|
2425 | if (
|
2426 | (resumableState = renderState.headers) &&
|
2427 | 0 < resumableState.remainingCapacity &&
|
2428 | "font" === as &&
|
2429 | ((key = getPreloadAsHeader(href, as, options)),
|
2430 | 2 <= (resumableState.remainingCapacity -= key.length))
|
2431 | )
|
2432 | (renderState.resets.font[href] = PRELOAD_NO_CREDS),
|
2433 | resumableState.fontPreloads &&
|
2434 | (resumableState.fontPreloads += ", "),
|
2435 | (resumableState.fontPreloads += key);
|
2436 | else
|
2437 | switch (
|
2438 | ((resumableState = []),
|
2439 | (href = assign({ rel: "preload", href: href, as: as }, options)),
|
2440 | pushLinkImpl(resumableState, href),
|
2441 | as)
|
2442 | ) {
|
2443 | case "font":
|
2444 | renderState.fontPreloads.add(resumableState);
|
2445 | break;
|
2446 | default:
|
2447 | renderState.bulkPreloads.add(resumableState);
|
2448 | }
|
2449 | }
|
2450 | enqueueFlush(request);
|
2451 | }
|
2452 | } else previousDispatcher.L(href, as, options);
|
2453 | }
|
2454 | function preloadModule(href, options) {
|
2455 | var request = currentRequest ? currentRequest : null;
|
2456 | if (request) {
|
2457 | var resumableState = request.resumableState,
|
2458 | renderState = request.renderState;
|
2459 | if (href) {
|
2460 | var as =
|
2461 | options && "string" === typeof options.as ? options.as : "script";
|
2462 | switch (as) {
|
2463 | case "script":
|
2464 | if (resumableState.moduleScriptResources.hasOwnProperty(href)) return;
|
2465 | as = [];
|
2466 | resumableState.moduleScriptResources[href] =
|
2467 | !options ||
|
2468 | ("string" !== typeof options.crossOrigin &&
|
2469 | "string" !== typeof options.integrity)
|
2470 | ? PRELOAD_NO_CREDS
|
2471 | : [options.crossOrigin, options.integrity];
|
2472 | renderState.preloads.moduleScripts.set(href, as);
|
2473 | break;
|
2474 | default:
|
2475 | if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {
|
2476 | var resources = resumableState.unknownResources[as];
|
2477 | if (resources.hasOwnProperty(href)) return;
|
2478 | } else
|
2479 | (resources = {}),
|
2480 | (resumableState.moduleUnknownResources[as] = resources);
|
2481 | as = [];
|
2482 | resources[href] = PRELOAD_NO_CREDS;
|
2483 | }
|
2484 | pushLinkImpl(as, assign({ rel: "modulepreload", href: href }, options));
|
2485 | renderState.bulkPreloads.add(as);
|
2486 | enqueueFlush(request);
|
2487 | }
|
2488 | } else previousDispatcher.m(href, options);
|
2489 | }
|
2490 | function preinitStyle(href, precedence, options) {
|
2491 | var request = currentRequest ? currentRequest : null;
|
2492 | if (request) {
|
2493 | var resumableState = request.resumableState,
|
2494 | renderState = request.renderState;
|
2495 | if (href) {
|
2496 | precedence = precedence || "default";
|
2497 | var styleQueue = renderState.styles.get(precedence),
|
2498 | resourceState = resumableState.styleResources.hasOwnProperty(href)
|
2499 | ? resumableState.styleResources[href]
|
2500 | : void 0;
|
2501 | null !== resourceState &&
|
2502 | ((resumableState.styleResources[href] = null),
|
2503 | styleQueue ||
|
2504 | ((styleQueue = {
|
2505 | precedence: escapeTextForBrowser(precedence),
|
2506 | rules: [],
|
2507 | hrefs: [],
|
2508 | sheets: new Map()
|
2509 | }),
|
2510 | renderState.styles.set(precedence, styleQueue)),
|
2511 | (precedence = {
|
2512 | state: 0,
|
2513 | props: assign(
|
2514 | { rel: "stylesheet", href: href, "data-precedence": precedence },
|
2515 | options
|
2516 | )
|
2517 | }),
|
2518 | resourceState &&
|
2519 | (2 === resourceState.length &&
|
2520 | adoptPreloadCredentials(precedence.props, resourceState),
|
2521 | (renderState = renderState.preloads.stylesheets.get(href)) &&
|
2522 | 0 < renderState.length
|
2523 | ? (renderState.length = 0)
|
2524 | : (precedence.state = 1)),
|
2525 | styleQueue.sheets.set(href, precedence),
|
2526 | enqueueFlush(request));
|
2527 | }
|
2528 | } else previousDispatcher.S(href, precedence, options);
|
2529 | }
|
2530 | function preinitScript(src, options) {
|
2531 | var request = currentRequest ? currentRequest : null;
|
2532 | if (request) {
|
2533 | var resumableState = request.resumableState,
|
2534 | renderState = request.renderState;
|
2535 | if (src) {
|
2536 | var resourceState = resumableState.scriptResources.hasOwnProperty(src)
|
2537 | ? resumableState.scriptResources[src]
|
2538 | : void 0;
|
2539 | null !== resourceState &&
|
2540 | ((resumableState.scriptResources[src] = null),
|
2541 | (options = assign({ src: src, async: !0 }, options)),
|
2542 | resourceState &&
|
2543 | (2 === resourceState.length &&
|
2544 | adoptPreloadCredentials(options, resourceState),
|
2545 | (src = renderState.preloads.scripts.get(src))) &&
|
2546 | (src.length = 0),
|
2547 | (src = []),
|
2548 | renderState.scripts.add(src),
|
2549 | pushScriptImpl(src, options),
|
2550 | enqueueFlush(request));
|
2551 | }
|
2552 | } else previousDispatcher.X(src, options);
|
2553 | }
|
2554 | function preinitModuleScript(src, options) {
|
2555 | var request = currentRequest ? currentRequest : null;
|
2556 | if (request) {
|
2557 | var resumableState = request.resumableState,
|
2558 | renderState = request.renderState;
|
2559 | if (src) {
|
2560 | var resourceState = resumableState.moduleScriptResources.hasOwnProperty(
|
2561 | src
|
2562 | )
|
2563 | ? resumableState.moduleScriptResources[src]
|
2564 | : void 0;
|
2565 | null !== resourceState &&
|
2566 | ((resumableState.moduleScriptResources[src] = null),
|
2567 | (options = assign({ src: src, type: "module", async: !0 }, options)),
|
2568 | resourceState &&
|
2569 | (2 === resourceState.length &&
|
2570 | adoptPreloadCredentials(options, resourceState),
|
2571 | (src = renderState.preloads.moduleScripts.get(src))) &&
|
2572 | (src.length = 0),
|
2573 | (src = []),
|
2574 | renderState.scripts.add(src),
|
2575 | pushScriptImpl(src, options),
|
2576 | enqueueFlush(request));
|
2577 | }
|
2578 | } else previousDispatcher.M(src, options);
|
2579 | }
|
2580 | function adoptPreloadCredentials(target, preloadState) {
|
2581 | null == target.crossOrigin && (target.crossOrigin = preloadState[0]);
|
2582 | null == target.integrity && (target.integrity = preloadState[1]);
|
2583 | }
|
2584 | function getPreloadAsHeader(href, as, params) {
|
2585 | href = ("" + href).replace(
|
2586 | regexForHrefInLinkHeaderURLContext,
|
2587 | escapeHrefForLinkHeaderURLContextReplacer
|
2588 | );
|
2589 | as = ("" + as).replace(
|
2590 | regexForLinkHeaderQuotedParamValueContext,
|
2591 | escapeStringForLinkHeaderQuotedParamValueContextReplacer
|
2592 | );
|
2593 | as = "<" + href + '>; rel=preload; as="' + as + '"';
|
2594 | for (var paramName in params)
|
2595 | hasOwnProperty.call(params, paramName) &&
|
2596 | ((href = params[paramName]),
|
2597 | "string" === typeof href &&
|
2598 | (as +=
|
2599 | "; " +
|
2600 | paramName.toLowerCase() +
|
2601 | '="' +
|
2602 | ("" + href).replace(
|
2603 | regexForLinkHeaderQuotedParamValueContext,
|
2604 | escapeStringForLinkHeaderQuotedParamValueContextReplacer
|
2605 | ) +
|
2606 | '"'));
|
2607 | return as;
|
2608 | }
|
2609 | var regexForHrefInLinkHeaderURLContext = /[<>\r\n]/g;
|
2610 | function escapeHrefForLinkHeaderURLContextReplacer(match) {
|
2611 | switch (match) {
|
2612 | case "<":
|
2613 | return "%3C";
|
2614 | case ">":
|
2615 | return "%3E";
|
2616 | case "\n":
|
2617 | return "%0A";
|
2618 | case "\r":
|
2619 | return "%0D";
|
2620 | default:
|
2621 | throw Error(
|
2622 | "escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
|
2623 | );
|
2624 | }
|
2625 | }
|
2626 | var regexForLinkHeaderQuotedParamValueContext = /["';,\r\n]/g;
|
2627 | function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {
|
2628 | switch (match) {
|
2629 | case '"':
|
2630 | return "%22";
|
2631 | case "'":
|
2632 | return "%27";
|
2633 | case ";":
|
2634 | return "%3B";
|
2635 | case ",":
|
2636 | return "%2C";
|
2637 | case "\n":
|
2638 | return "%0A";
|
2639 | case "\r":
|
2640 | return "%0D";
|
2641 | default:
|
2642 | throw Error(
|
2643 | "escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
|
2644 | );
|
2645 | }
|
2646 | }
|
2647 | function hoistStyleQueueDependency(styleQueue) {
|
2648 | this.styles.add(styleQueue);
|
2649 | }
|
2650 | function hoistStylesheetDependency(stylesheet) {
|
2651 | this.stylesheets.add(stylesheet);
|
2652 | }
|
2653 | var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
2654 | function getComponentNameFromType(type) {
|
2655 | if (null == type) return null;
|
2656 | if ("function" === typeof type)
|
2657 | return type.$$typeof === REACT_CLIENT_REFERENCE
|
2658 | ? null
|
2659 | : type.displayName || type.name || null;
|
2660 | if ("string" === typeof type) return type;
|
2661 | switch (type) {
|
2662 | case REACT_FRAGMENT_TYPE:
|
2663 | return "Fragment";
|
2664 | case REACT_PORTAL_TYPE:
|
2665 | return "Portal";
|
2666 | case REACT_PROFILER_TYPE:
|
2667 | return "Profiler";
|
2668 | case REACT_STRICT_MODE_TYPE:
|
2669 | return "StrictMode";
|
2670 | case REACT_SUSPENSE_TYPE:
|
2671 | return "Suspense";
|
2672 | case REACT_SUSPENSE_LIST_TYPE:
|
2673 | return "SuspenseList";
|
2674 | }
|
2675 | if ("object" === typeof type)
|
2676 | switch (type.$$typeof) {
|
2677 | case REACT_CONTEXT_TYPE:
|
2678 | return (type.displayName || "Context") + ".Provider";
|
2679 | case REACT_CONSUMER_TYPE:
|
2680 | return (type._context.displayName || "Context") + ".Consumer";
|
2681 | case REACT_FORWARD_REF_TYPE:
|
2682 | var innerType = type.render;
|
2683 | type = type.displayName;
|
2684 | type ||
|
2685 | ((type = innerType.displayName || innerType.name || ""),
|
2686 | (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
2687 | return type;
|
2688 | case REACT_MEMO_TYPE:
|
2689 | return (
|
2690 | (innerType = type.displayName || null),
|
2691 | null !== innerType
|
2692 | ? innerType
|
2693 | : getComponentNameFromType(type.type) || "Memo"
|
2694 | );
|
2695 | case REACT_LAZY_TYPE:
|
2696 | innerType = type._payload;
|
2697 | type = type._init;
|
2698 | try {
|
2699 | return getComponentNameFromType(type(innerType));
|
2700 | } catch (x) {}
|
2701 | }
|
2702 | return null;
|
2703 | }
|
2704 | var emptyContextObject = {},
|
2705 | currentActiveSnapshot = null;
|
2706 | function popToNearestCommonAncestor(prev, next) {
|
2707 | if (prev !== next) {
|
2708 | prev.context._currentValue = prev.parentValue;
|
2709 | prev = prev.parent;
|
2710 | var parentNext = next.parent;
|
2711 | if (null === prev) {
|
2712 | if (null !== parentNext)
|
2713 | throw Error(
|
2714 | "The stacks must reach the root at the same time. This is a bug in React."
|
2715 | );
|
2716 | } else {
|
2717 | if (null === parentNext)
|
2718 | throw Error(
|
2719 | "The stacks must reach the root at the same time. This is a bug in React."
|
2720 | );
|
2721 | popToNearestCommonAncestor(prev, parentNext);
|
2722 | }
|
2723 | next.context._currentValue = next.value;
|
2724 | }
|
2725 | }
|
2726 | function popAllPrevious(prev) {
|
2727 | prev.context._currentValue = prev.parentValue;
|
2728 | prev = prev.parent;
|
2729 | null !== prev && popAllPrevious(prev);
|
2730 | }
|
2731 | function pushAllNext(next) {
|
2732 | var parentNext = next.parent;
|
2733 | null !== parentNext && pushAllNext(parentNext);
|
2734 | next.context._currentValue = next.value;
|
2735 | }
|
2736 | function popPreviousToCommonLevel(prev, next) {
|
2737 | prev.context._currentValue = prev.parentValue;
|
2738 | prev = prev.parent;
|
2739 | if (null === prev)
|
2740 | throw Error(
|
2741 | "The depth must equal at least at zero before reaching the root. This is a bug in React."
|
2742 | );
|
2743 | prev.depth === next.depth
|
2744 | ? popToNearestCommonAncestor(prev, next)
|
2745 | : popPreviousToCommonLevel(prev, next);
|
2746 | }
|
2747 | function popNextToCommonLevel(prev, next) {
|
2748 | var parentNext = next.parent;
|
2749 | if (null === parentNext)
|
2750 | throw Error(
|
2751 | "The depth must equal at least at zero before reaching the root. This is a bug in React."
|
2752 | );
|
2753 | prev.depth === parentNext.depth
|
2754 | ? popToNearestCommonAncestor(prev, parentNext)
|
2755 | : popNextToCommonLevel(prev, parentNext);
|
2756 | next.context._currentValue = next.value;
|
2757 | }
|
2758 | function switchContext(newSnapshot) {
|
2759 | var prev = currentActiveSnapshot;
|
2760 | prev !== newSnapshot &&
|
2761 | (null === prev
|
2762 | ? pushAllNext(newSnapshot)
|
2763 | : null === newSnapshot
|
2764 | ? popAllPrevious(prev)
|
2765 | : prev.depth === newSnapshot.depth
|
2766 | ? popToNearestCommonAncestor(prev, newSnapshot)
|
2767 | : prev.depth > newSnapshot.depth
|
2768 | ? popPreviousToCommonLevel(prev, newSnapshot)
|
2769 | : popNextToCommonLevel(prev, newSnapshot),
|
2770 | (currentActiveSnapshot = newSnapshot));
|
2771 | }
|
2772 | var classComponentUpdater = {
|
2773 | isMounted: function () {
|
2774 | return !1;
|
2775 | },
|
2776 | enqueueSetState: function (inst, payload) {
|
2777 | inst = inst._reactInternals;
|
2778 | null !== inst.queue && inst.queue.push(payload);
|
2779 | },
|
2780 | enqueueReplaceState: function (inst, payload) {
|
2781 | inst = inst._reactInternals;
|
2782 | inst.replace = !0;
|
2783 | inst.queue = [payload];
|
2784 | },
|
2785 | enqueueForceUpdate: function () {}
|
2786 | },
|
2787 | emptyTreeContext = { id: 1, overflow: "" };
|
2788 | function pushTreeContext(baseContext, totalChildren, index) {
|
2789 | var baseIdWithLeadingBit = baseContext.id;
|
2790 | baseContext = baseContext.overflow;
|
2791 | var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
|
2792 | baseIdWithLeadingBit &= ~(1 << baseLength);
|
2793 | index += 1;
|
2794 | var length = 32 - clz32(totalChildren) + baseLength;
|
2795 | if (30 < length) {
|
2796 | var numberOfOverflowBits = baseLength - (baseLength % 5);
|
2797 | length = (
|
2798 | baseIdWithLeadingBit &
|
2799 | ((1 << numberOfOverflowBits) - 1)
|
2800 | ).toString(32);
|
2801 | baseIdWithLeadingBit >>= numberOfOverflowBits;
|
2802 | baseLength -= numberOfOverflowBits;
|
2803 | return {
|
2804 | id:
|
2805 | (1 << (32 - clz32(totalChildren) + baseLength)) |
|
2806 | (index << baseLength) |
|
2807 | baseIdWithLeadingBit,
|
2808 | overflow: length + baseContext
|
2809 | };
|
2810 | }
|
2811 | return {
|
2812 | id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,
|
2813 | overflow: baseContext
|
2814 | };
|
2815 | }
|
2816 | var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
|
2817 | log = Math.log,
|
2818 | LN2 = Math.LN2;
|
2819 | function clz32Fallback(x) {
|
2820 | x >>>= 0;
|
2821 | return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
|
2822 | }
|
2823 | var SuspenseException = Error(
|
2824 | "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"
|
2825 | );
|
2826 | function noop$2() {}
|
2827 | function trackUsedThenable(thenableState, thenable, index) {
|
2828 | index = thenableState[index];
|
2829 | void 0 === index
|
2830 | ? thenableState.push(thenable)
|
2831 | : index !== thenable && (thenable.then(noop$2, noop$2), (thenable = index));
|
2832 | switch (thenable.status) {
|
2833 | case "fulfilled":
|
2834 | return thenable.value;
|
2835 | case "rejected":
|
2836 | throw thenable.reason;
|
2837 | default:
|
2838 | "string" === typeof thenable.status
|
2839 | ? thenable.then(noop$2, noop$2)
|
2840 | : ((thenableState = thenable),
|
2841 | (thenableState.status = "pending"),
|
2842 | thenableState.then(
|
2843 | function (fulfilledValue) {
|
2844 | if ("pending" === thenable.status) {
|
2845 | var fulfilledThenable = thenable;
|
2846 | fulfilledThenable.status = "fulfilled";
|
2847 | fulfilledThenable.value = fulfilledValue;
|
2848 | }
|
2849 | },
|
2850 | function (error) {
|
2851 | if ("pending" === thenable.status) {
|
2852 | var rejectedThenable = thenable;
|
2853 | rejectedThenable.status = "rejected";
|
2854 | rejectedThenable.reason = error;
|
2855 | }
|
2856 | }
|
2857 | ));
|
2858 | switch (thenable.status) {
|
2859 | case "fulfilled":
|
2860 | return thenable.value;
|
2861 | case "rejected":
|
2862 | throw thenable.reason;
|
2863 | }
|
2864 | suspendedThenable = thenable;
|
2865 | throw SuspenseException;
|
2866 | }
|
2867 | }
|
2868 | var suspendedThenable = null;
|
2869 | function getSuspendedThenable() {
|
2870 | if (null === suspendedThenable)
|
2871 | throw Error(
|
2872 | "Expected a suspended thenable. This is a bug in React. Please file an issue."
|
2873 | );
|
2874 | var thenable = suspendedThenable;
|
2875 | suspendedThenable = null;
|
2876 | return thenable;
|
2877 | }
|
2878 | function is(x, y) {
|
2879 | return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
2880 | }
|
2881 | var objectIs = "function" === typeof Object.is ? Object.is : is,
|
2882 | currentlyRenderingComponent = null,
|
2883 | currentlyRenderingTask = null,
|
2884 | currentlyRenderingRequest = null,
|
2885 | currentlyRenderingKeyPath = null,
|
2886 | firstWorkInProgressHook = null,
|
2887 | workInProgressHook = null,
|
2888 | isReRender = !1,
|
2889 | didScheduleRenderPhaseUpdate = !1,
|
2890 | localIdCounter = 0,
|
2891 | actionStateCounter = 0,
|
2892 | actionStateMatchingIndex = -1,
|
2893 | thenableIndexCounter = 0,
|
2894 | thenableState = null,
|
2895 | renderPhaseUpdates = null,
|
2896 | numberOfReRenders = 0;
|
2897 | function resolveCurrentlyRenderingComponent() {
|
2898 | if (null === currentlyRenderingComponent)
|
2899 | throw Error(
|
2900 | "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
2901 | );
|
2902 | return currentlyRenderingComponent;
|
2903 | }
|
2904 | function createHook() {
|
2905 | if (0 < numberOfReRenders)
|
2906 | throw Error("Rendered more hooks than during the previous render");
|
2907 | return { memoizedState: null, queue: null, next: null };
|
2908 | }
|
2909 | function createWorkInProgressHook() {
|
2910 | null === workInProgressHook
|
2911 | ? null === firstWorkInProgressHook
|
2912 | ? ((isReRender = !1),
|
2913 | (firstWorkInProgressHook = workInProgressHook = createHook()))
|
2914 | : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
|
2915 | : null === workInProgressHook.next
|
2916 | ? ((isReRender = !1),
|
2917 | (workInProgressHook = workInProgressHook.next = createHook()))
|
2918 | : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
|
2919 | return workInProgressHook;
|
2920 | }
|
2921 | function getThenableStateAfterSuspending() {
|
2922 | var state = thenableState;
|
2923 | thenableState = null;
|
2924 | return state;
|
2925 | }
|
2926 | function resetHooksState() {
|
2927 | currentlyRenderingKeyPath =
|
2928 | currentlyRenderingRequest =
|
2929 | currentlyRenderingTask =
|
2930 | currentlyRenderingComponent =
|
2931 | null;
|
2932 | didScheduleRenderPhaseUpdate = !1;
|
2933 | firstWorkInProgressHook = null;
|
2934 | numberOfReRenders = 0;
|
2935 | workInProgressHook = renderPhaseUpdates = null;
|
2936 | }
|
2937 | function basicStateReducer(state, action) {
|
2938 | return "function" === typeof action ? action(state) : action;
|
2939 | }
|
2940 | function useReducer(reducer, initialArg, init) {
|
2941 | currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
2942 | workInProgressHook = createWorkInProgressHook();
|
2943 | if (isReRender) {
|
2944 | var queue = workInProgressHook.queue;
|
2945 | initialArg = queue.dispatch;
|
2946 | if (
|
2947 | null !== renderPhaseUpdates &&
|
2948 | ((init = renderPhaseUpdates.get(queue)), void 0 !== init)
|
2949 | ) {
|
2950 | renderPhaseUpdates.delete(queue);
|
2951 | queue = workInProgressHook.memoizedState;
|
2952 | do (queue = reducer(queue, init.action)), (init = init.next);
|
2953 | while (null !== init);
|
2954 | workInProgressHook.memoizedState = queue;
|
2955 | return [queue, initialArg];
|
2956 | }
|
2957 | return [workInProgressHook.memoizedState, initialArg];
|
2958 | }
|
2959 | reducer =
|
2960 | reducer === basicStateReducer
|
2961 | ? "function" === typeof initialArg
|
2962 | ? initialArg()
|
2963 | : initialArg
|
2964 | : void 0 !== init
|
2965 | ? init(initialArg)
|
2966 | : initialArg;
|
2967 | workInProgressHook.memoizedState = reducer;
|
2968 | reducer = workInProgressHook.queue = { last: null, dispatch: null };
|
2969 | reducer = reducer.dispatch = dispatchAction.bind(
|
2970 | null,
|
2971 | currentlyRenderingComponent,
|
2972 | reducer
|
2973 | );
|
2974 | return [workInProgressHook.memoizedState, reducer];
|
2975 | }
|
2976 | function useMemo(nextCreate, deps) {
|
2977 | currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
2978 | workInProgressHook = createWorkInProgressHook();
|
2979 | deps = void 0 === deps ? null : deps;
|
2980 | if (null !== workInProgressHook) {
|
2981 | var prevState = workInProgressHook.memoizedState;
|
2982 | if (null !== prevState && null !== deps) {
|
2983 | var prevDeps = prevState[1];
|
2984 | a: if (null === prevDeps) prevDeps = !1;
|
2985 | else {
|
2986 | for (var i = 0; i < prevDeps.length && i < deps.length; i++)
|
2987 | if (!objectIs(deps[i], prevDeps[i])) {
|
2988 | prevDeps = !1;
|
2989 | break a;
|
2990 | }
|
2991 | prevDeps = !0;
|
2992 | }
|
2993 | if (prevDeps) return prevState[0];
|
2994 | }
|
2995 | }
|
2996 | nextCreate = nextCreate();
|
2997 | workInProgressHook.memoizedState = [nextCreate, deps];
|
2998 | return nextCreate;
|
2999 | }
|
3000 | function dispatchAction(componentIdentity, queue, action) {
|
3001 | if (25 <= numberOfReRenders)
|
3002 | throw Error(
|
3003 | "Too many re-renders. React limits the number of renders to prevent an infinite loop."
|
3004 | );
|
3005 | if (componentIdentity === currentlyRenderingComponent)
|
3006 | if (
|
3007 | ((didScheduleRenderPhaseUpdate = !0),
|
3008 | (componentIdentity = { action: action, next: null }),
|
3009 | null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),
|
3010 | (action = renderPhaseUpdates.get(queue)),
|
3011 | void 0 === action)
|
3012 | )
|
3013 | renderPhaseUpdates.set(queue, componentIdentity);
|
3014 | else {
|
3015 | for (queue = action; null !== queue.next; ) queue = queue.next;
|
3016 | queue.next = componentIdentity;
|
3017 | }
|
3018 | }
|
3019 | function unsupportedStartTransition() {
|
3020 | throw Error("startTransition cannot be called during server rendering.");
|
3021 | }
|
3022 | function unsupportedSetOptimisticState() {
|
3023 | throw Error("Cannot update optimistic state while rendering.");
|
3024 | }
|
3025 | function useActionState(action, initialState, permalink) {
|
3026 | resolveCurrentlyRenderingComponent();
|
3027 | var actionStateHookIndex = actionStateCounter++,
|
3028 | request = currentlyRenderingRequest;
|
3029 | if ("function" === typeof action.$$FORM_ACTION) {
|
3030 | var nextPostbackStateKey = null,
|
3031 | componentKeyPath = currentlyRenderingKeyPath;
|
3032 | request = request.formState;
|
3033 | var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;
|
3034 | if (null !== request && "function" === typeof isSignatureEqual) {
|
3035 | var postbackKey = request[1];
|
3036 | isSignatureEqual.call(action, request[2], request[3]) &&
|
3037 | ((nextPostbackStateKey =
|
3038 | void 0 !== permalink
|
3039 | ? "p" + permalink
|
3040 | : "k" +
|
3041 | Bun.hash(
|
3042 | JSON.stringify([componentKeyPath, null, actionStateHookIndex])
|
3043 | )),
|
3044 | postbackKey === nextPostbackStateKey &&
|
3045 | ((actionStateMatchingIndex = actionStateHookIndex),
|
3046 | (initialState = request[0])));
|
3047 | }
|
3048 | var boundAction = action.bind(null, initialState);
|
3049 | action = function (payload) {
|
3050 | boundAction(payload);
|
3051 | };
|
3052 | "function" === typeof boundAction.$$FORM_ACTION &&
|
3053 | (action.$$FORM_ACTION = function (prefix) {
|
3054 | prefix = boundAction.$$FORM_ACTION(prefix);
|
3055 | void 0 !== permalink &&
|
3056 | ((permalink += ""), (prefix.action = permalink));
|
3057 | var formData = prefix.data;
|
3058 | formData &&
|
3059 | (null === nextPostbackStateKey &&
|
3060 | (nextPostbackStateKey =
|
3061 | void 0 !== permalink
|
3062 | ? "p" + permalink
|
3063 | : "k" +
|
3064 | Bun.hash(
|
3065 | JSON.stringify([
|
3066 | componentKeyPath,
|
3067 | null,
|
3068 | actionStateHookIndex
|
3069 | ])
|
3070 | )),
|
3071 | formData.append("$ACTION_KEY", nextPostbackStateKey));
|
3072 | return prefix;
|
3073 | });
|
3074 | return [initialState, action, !1];
|
3075 | }
|
3076 | var boundAction$22 = action.bind(null, initialState);
|
3077 | return [
|
3078 | initialState,
|
3079 | function (payload) {
|
3080 | boundAction$22(payload);
|
3081 | },
|
3082 | !1
|
3083 | ];
|
3084 | }
|
3085 | function unwrapThenable(thenable) {
|
3086 | var index = thenableIndexCounter;
|
3087 | thenableIndexCounter += 1;
|
3088 | null === thenableState && (thenableState = []);
|
3089 | return trackUsedThenable(thenableState, thenable, index);
|
3090 | }
|
3091 | function unsupportedRefresh() {
|
3092 | throw Error("Cache cannot be refreshed during server rendering.");
|
3093 | }
|
3094 | function noop$1() {}
|
3095 | var HooksDispatcher = {
|
3096 | readContext: function (context) {
|
3097 | return context._currentValue;
|
3098 | },
|
3099 | use: function (usable) {
|
3100 | if (null !== usable && "object" === typeof usable) {
|
3101 | if ("function" === typeof usable.then) return unwrapThenable(usable);
|
3102 | if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
|
3103 | }
|
3104 | throw Error("An unsupported type was passed to use(): " + String(usable));
|
3105 | },
|
3106 | useContext: function (context) {
|
3107 | resolveCurrentlyRenderingComponent();
|
3108 | return context._currentValue;
|
3109 | },
|
3110 | useMemo: useMemo,
|
3111 | useReducer: useReducer,
|
3112 | useRef: function (initialValue) {
|
3113 | currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
3114 | workInProgressHook = createWorkInProgressHook();
|
3115 | var previousRef = workInProgressHook.memoizedState;
|
3116 | return null === previousRef
|
3117 | ? ((initialValue = { current: initialValue }),
|
3118 | (workInProgressHook.memoizedState = initialValue))
|
3119 | : previousRef;
|
3120 | },
|
3121 | useState: function (initialState) {
|
3122 | return useReducer(basicStateReducer, initialState);
|
3123 | },
|
3124 | useInsertionEffect: noop$1,
|
3125 | useLayoutEffect: noop$1,
|
3126 | useCallback: function (callback, deps) {
|
3127 | return useMemo(function () {
|
3128 | return callback;
|
3129 | }, deps);
|
3130 | },
|
3131 | useImperativeHandle: noop$1,
|
3132 | useEffect: noop$1,
|
3133 | useDebugValue: noop$1,
|
3134 | useDeferredValue: function (value, initialValue) {
|
3135 | resolveCurrentlyRenderingComponent();
|
3136 | return void 0 !== initialValue ? initialValue : value;
|
3137 | },
|
3138 | useTransition: function () {
|
3139 | resolveCurrentlyRenderingComponent();
|
3140 | return [!1, unsupportedStartTransition];
|
3141 | },
|
3142 | useId: function () {
|
3143 | var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
|
3144 | var overflow = JSCompiler_inline_result.overflow;
|
3145 | JSCompiler_inline_result = JSCompiler_inline_result.id;
|
3146 | JSCompiler_inline_result =
|
3147 | (
|
3148 | JSCompiler_inline_result &
|
3149 | ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
|
3150 | ).toString(32) + overflow;
|
3151 | var resumableState = currentResumableState;
|
3152 | if (null === resumableState)
|
3153 | throw Error(
|
3154 | "Invalid hook call. Hooks can only be called inside of the body of a function component."
|
3155 | );
|
3156 | overflow = localIdCounter++;
|
3157 | JSCompiler_inline_result =
|
3158 | ":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
|
3159 | 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
|
3160 | return JSCompiler_inline_result + ":";
|
3161 | },
|
3162 | useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
|
3163 | if (void 0 === getServerSnapshot)
|
3164 | throw Error(
|
3165 | "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
|
3166 | );
|
3167 | return getServerSnapshot();
|
3168 | },
|
3169 | useCacheRefresh: function () {
|
3170 | return unsupportedRefresh;
|
3171 | },
|
3172 | useHostTransitionStatus: function () {
|
3173 | resolveCurrentlyRenderingComponent();
|
3174 | return sharedNotPendingObject;
|
3175 | },
|
3176 | useOptimistic: function (passthrough) {
|
3177 | resolveCurrentlyRenderingComponent();
|
3178 | return [passthrough, unsupportedSetOptimisticState];
|
3179 | }
|
3180 | };
|
3181 | HooksDispatcher.useFormState = useActionState;
|
3182 | HooksDispatcher.useActionState = useActionState;
|
3183 | var currentResumableState = null,
|
3184 | DefaultAsyncDispatcher = {
|
3185 | getCacheForType: function () {
|
3186 | throw Error("Not implemented.");
|
3187 | }
|
3188 | },
|
3189 | prefix;
|
3190 | function describeBuiltInComponentFrame(name) {
|
3191 | if (void 0 === prefix)
|
3192 | try {
|
3193 | throw Error();
|
3194 | } catch (x) {
|
3195 | var match = x.stack.trim().match(/\n( *(at )?)/);
|
3196 | prefix = (match && match[1]) || "";
|
3197 | }
|
3198 | return "\n" + prefix + name;
|
3199 | }
|
3200 | var reentry = !1;
|
3201 | function describeNativeComponentFrame(fn, construct) {
|
3202 | if (!fn || reentry) return "";
|
3203 | reentry = !0;
|
3204 | var previousPrepareStackTrace = Error.prepareStackTrace;
|
3205 | Error.prepareStackTrace = void 0;
|
3206 | var RunInRootFrame = {
|
3207 | DetermineComponentFrameRoot: function () {
|
3208 | try {
|
3209 | if (construct) {
|
3210 | var Fake = function () {
|
3211 | throw Error();
|
3212 | };
|
3213 | Object.defineProperty(Fake.prototype, "props", {
|
3214 | set: function () {
|
3215 | throw Error();
|
3216 | }
|
3217 | });
|
3218 | if ("object" === typeof Reflect && Reflect.construct) {
|
3219 | try {
|
3220 | Reflect.construct(Fake, []);
|
3221 | } catch (x) {
|
3222 | var control = x;
|
3223 | }
|
3224 | Reflect.construct(fn, [], Fake);
|
3225 | } else {
|
3226 | try {
|
3227 | Fake.call();
|
3228 | } catch (x$24) {
|
3229 | control = x$24;
|
3230 | }
|
3231 | fn.call(Fake.prototype);
|
3232 | }
|
3233 | } else {
|
3234 | try {
|
3235 | throw Error();
|
3236 | } catch (x$25) {
|
3237 | control = x$25;
|
3238 | }
|
3239 | (Fake = fn()) &&
|
3240 | "function" === typeof Fake.catch &&
|
3241 | Fake.catch(function () {});
|
3242 | }
|
3243 | } catch (sample) {
|
3244 | if (sample && control && "string" === typeof sample.stack)
|
3245 | return [sample.stack, control.stack];
|
3246 | }
|
3247 | return [null, null];
|
3248 | }
|
3249 | };
|
3250 | RunInRootFrame.DetermineComponentFrameRoot.displayName =
|
3251 | "DetermineComponentFrameRoot";
|
3252 | var namePropDescriptor = Object.getOwnPropertyDescriptor(
|
3253 | RunInRootFrame.DetermineComponentFrameRoot,
|
3254 | "name"
|
3255 | );
|
3256 | namePropDescriptor &&
|
3257 | namePropDescriptor.configurable &&
|
3258 | Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
|
3259 | value: "DetermineComponentFrameRoot"
|
3260 | });
|
3261 | try {
|
3262 | var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
|
3263 | sampleStack = _RunInRootFrame$Deter[0],
|
3264 | controlStack = _RunInRootFrame$Deter[1];
|
3265 | if (sampleStack && controlStack) {
|
3266 | var sampleLines = sampleStack.split("\n"),
|
3267 | controlLines = controlStack.split("\n");
|
3268 | for (
|
3269 | namePropDescriptor = RunInRootFrame = 0;
|
3270 | RunInRootFrame < sampleLines.length &&
|
3271 | !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
|
3272 |
|
3273 | )
|
3274 | RunInRootFrame++;
|
3275 | for (
|
3276 | ;
|
3277 | namePropDescriptor < controlLines.length &&
|
3278 | !controlLines[namePropDescriptor].includes(
|
3279 | "DetermineComponentFrameRoot"
|
3280 | );
|
3281 |
|
3282 | )
|
3283 | namePropDescriptor++;
|
3284 | if (
|
3285 | RunInRootFrame === sampleLines.length ||
|
3286 | namePropDescriptor === controlLines.length
|
3287 | )
|
3288 | for (
|
3289 | RunInRootFrame = sampleLines.length - 1,
|
3290 | namePropDescriptor = controlLines.length - 1;
|
3291 | 1 <= RunInRootFrame &&
|
3292 | 0 <= namePropDescriptor &&
|
3293 | sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
|
3294 |
|
3295 | )
|
3296 | namePropDescriptor--;
|
3297 | for (
|
3298 | ;
|
3299 | 1 <= RunInRootFrame && 0 <= namePropDescriptor;
|
3300 | RunInRootFrame--, namePropDescriptor--
|
3301 | )
|
3302 | if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
|
3303 | if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
|
3304 | do
|
3305 | if (
|
3306 | (RunInRootFrame--,
|
3307 | namePropDescriptor--,
|
3308 | 0 > namePropDescriptor ||
|
3309 | sampleLines[RunInRootFrame] !==
|
3310 | controlLines[namePropDescriptor])
|
3311 | ) {
|
3312 | var frame =
|
3313 | "\n" +
|
3314 | sampleLines[RunInRootFrame].replace(" at new ", " at ");
|
3315 | fn.displayName &&
|
3316 | frame.includes("<anonymous>") &&
|
3317 | (frame = frame.replace("<anonymous>", fn.displayName));
|
3318 | return frame;
|
3319 | }
|
3320 | while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
|
3321 | }
|
3322 | break;
|
3323 | }
|
3324 | }
|
3325 | } finally {
|
3326 | (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
|
3327 | }
|
3328 | return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
|
3329 | ? describeBuiltInComponentFrame(previousPrepareStackTrace)
|
3330 | : "";
|
3331 | }
|
3332 | function defaultErrorHandler(error) {
|
3333 | console.error(error);
|
3334 | return null;
|
3335 | }
|
3336 | function noop() {}
|
3337 | function createRequest(
|
3338 | children,
|
3339 | resumableState,
|
3340 | renderState,
|
3341 | rootFormatContext,
|
3342 | progressiveChunkSize,
|
3343 | onError,
|
3344 | onAllReady,
|
3345 | onShellReady,
|
3346 | onShellError,
|
3347 | onFatalError,
|
3348 | onPostpone,
|
3349 | formState
|
3350 | ) {
|
3351 | var pingedTasks = [],
|
3352 | abortSet = new Set();
|
3353 | resumableState = {
|
3354 | destination: null,
|
3355 | flushScheduled: !1,
|
3356 | resumableState: resumableState,
|
3357 | renderState: renderState,
|
3358 | rootFormatContext: rootFormatContext,
|
3359 | progressiveChunkSize:
|
3360 | void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize,
|
3361 | status: 0,
|
3362 | fatalError: null,
|
3363 | nextSegmentId: 0,
|
3364 | allPendingTasks: 0,
|
3365 | pendingRootTasks: 0,
|
3366 | completedRootSegment: null,
|
3367 | abortableTasks: abortSet,
|
3368 | pingedTasks: pingedTasks,
|
3369 | clientRenderedBoundaries: [],
|
3370 | completedBoundaries: [],
|
3371 | partialBoundaries: [],
|
3372 | trackedPostpones: null,
|
3373 | onError: void 0 === onError ? defaultErrorHandler : onError,
|
3374 | onPostpone: void 0 === onPostpone ? noop : onPostpone,
|
3375 | onAllReady: void 0 === onAllReady ? noop : onAllReady,
|
3376 | onShellReady: void 0 === onShellReady ? noop : onShellReady,
|
3377 | onShellError: void 0 === onShellError ? noop : onShellError,
|
3378 | onFatalError: void 0 === onFatalError ? noop : onFatalError,
|
3379 | formState: void 0 === formState ? null : formState
|
3380 | };
|
3381 | renderState = createPendingSegment(
|
3382 | resumableState,
|
3383 | 0,
|
3384 | null,
|
3385 | rootFormatContext,
|
3386 | !1,
|
3387 | !1
|
3388 | );
|
3389 | renderState.parentFlushed = !0;
|
3390 | children = createRenderTask(
|
3391 | resumableState,
|
3392 | null,
|
3393 | children,
|
3394 | -1,
|
3395 | null,
|
3396 | renderState,
|
3397 | null,
|
3398 | abortSet,
|
3399 | null,
|
3400 | rootFormatContext,
|
3401 | emptyContextObject,
|
3402 | null,
|
3403 | emptyTreeContext,
|
3404 | null,
|
3405 | !1
|
3406 | );
|
3407 | pingedTasks.push(children);
|
3408 | return resumableState;
|
3409 | }
|
3410 | var currentRequest = null;
|
3411 | function pingTask(request, task) {
|
3412 | request.pingedTasks.push(task);
|
3413 | 1 === request.pingedTasks.length &&
|
3414 | ((request.flushScheduled = null !== request.destination),
|
3415 | performWork(request));
|
3416 | }
|
3417 | function createSuspenseBoundary(request, fallbackAbortableTasks) {
|
3418 | return {
|
3419 | status: 0,
|
3420 | rootSegmentID: -1,
|
3421 | parentFlushed: !1,
|
3422 | pendingTasks: 0,
|
3423 | completedSegments: [],
|
3424 | byteSize: 0,
|
3425 | fallbackAbortableTasks: fallbackAbortableTasks,
|
3426 | errorDigest: null,
|
3427 | contentState: createHoistableState(),
|
3428 | fallbackState: createHoistableState(),
|
3429 | trackedContentKeyPath: null,
|
3430 | trackedFallbackNode: null
|
3431 | };
|
3432 | }
|
3433 | function createRenderTask(
|
3434 | request,
|
3435 | thenableState,
|
3436 | node,
|
3437 | childIndex,
|
3438 | blockedBoundary,
|
3439 | blockedSegment,
|
3440 | hoistableState,
|
3441 | abortSet,
|
3442 | keyPath,
|
3443 | formatContext,
|
3444 | legacyContext,
|
3445 | context,
|
3446 | treeContext,
|
3447 | componentStack,
|
3448 | isFallback
|
3449 | ) {
|
3450 | request.allPendingTasks++;
|
3451 | null === blockedBoundary
|
3452 | ? request.pendingRootTasks++
|
3453 | : blockedBoundary.pendingTasks++;
|
3454 | var task = {
|
3455 | replay: null,
|
3456 | node: node,
|
3457 | childIndex: childIndex,
|
3458 | ping: function () {
|
3459 | return pingTask(request, task);
|
3460 | },
|
3461 | blockedBoundary: blockedBoundary,
|
3462 | blockedSegment: blockedSegment,
|
3463 | hoistableState: hoistableState,
|
3464 | abortSet: abortSet,
|
3465 | keyPath: keyPath,
|
3466 | formatContext: formatContext,
|
3467 | legacyContext: legacyContext,
|
3468 | context: context,
|
3469 | treeContext: treeContext,
|
3470 | componentStack: componentStack,
|
3471 | thenableState: thenableState,
|
3472 | isFallback: isFallback
|
3473 | };
|
3474 | abortSet.add(task);
|
3475 | return task;
|
3476 | }
|
3477 | function createReplayTask(
|
3478 | request,
|
3479 | thenableState,
|
3480 | replay,
|
3481 | node,
|
3482 | childIndex,
|
3483 | blockedBoundary,
|
3484 | hoistableState,
|
3485 | abortSet,
|
3486 | keyPath,
|
3487 | formatContext,
|
3488 | legacyContext,
|
3489 | context,
|
3490 | treeContext,
|
3491 | componentStack,
|
3492 | isFallback
|
3493 | ) {
|
3494 | request.allPendingTasks++;
|
3495 | null === blockedBoundary
|
3496 | ? request.pendingRootTasks++
|
3497 | : blockedBoundary.pendingTasks++;
|
3498 | replay.pendingTasks++;
|
3499 | var task = {
|
3500 | replay: replay,
|
3501 | node: node,
|
3502 | childIndex: childIndex,
|
3503 | ping: function () {
|
3504 | return pingTask(request, task);
|
3505 | },
|
3506 | blockedBoundary: blockedBoundary,
|
3507 | blockedSegment: null,
|
3508 | hoistableState: hoistableState,
|
3509 | abortSet: abortSet,
|
3510 | keyPath: keyPath,
|
3511 | formatContext: formatContext,
|
3512 | legacyContext: legacyContext,
|
3513 | context: context,
|
3514 | treeContext: treeContext,
|
3515 | componentStack: componentStack,
|
3516 | thenableState: thenableState,
|
3517 | isFallback: isFallback
|
3518 | };
|
3519 | abortSet.add(task);
|
3520 | return task;
|
3521 | }
|
3522 | function createPendingSegment(
|
3523 | request,
|
3524 | index,
|
3525 | boundary,
|
3526 | parentFormatContext,
|
3527 | lastPushedText,
|
3528 | textEmbedded
|
3529 | ) {
|
3530 | return {
|
3531 | status: 0,
|
3532 | id: -1,
|
3533 | index: index,
|
3534 | parentFlushed: !1,
|
3535 | chunks: [],
|
3536 | children: [],
|
3537 | parentFormatContext: parentFormatContext,
|
3538 | boundary: boundary,
|
3539 | lastPushedText: lastPushedText,
|
3540 | textEmbedded: textEmbedded
|
3541 | };
|
3542 | }
|
3543 | function createBuiltInComponentStack(task, type) {
|
3544 | return { tag: 0, parent: task.componentStack, type: type };
|
3545 | }
|
3546 | function getThrownInfo(request, node) {
|
3547 | if (node && null !== request.trackedPostpones) {
|
3548 | try {
|
3549 | request = "";
|
3550 | do {
|
3551 | switch (node.tag) {
|
3552 | case 0:
|
3553 | request += describeBuiltInComponentFrame(node.type);
|
3554 | break;
|
3555 | case 1:
|
3556 | request += describeNativeComponentFrame(node.type, !1);
|
3557 | break;
|
3558 | case 2:
|
3559 | request += describeNativeComponentFrame(node.type, !0);
|
3560 | }
|
3561 | node = node.parent;
|
3562 | } while (node);
|
3563 | var JSCompiler_temp = request;
|
3564 | } catch (x) {
|
3565 | JSCompiler_temp =
|
3566 | "\nError generating stack: " + x.message + "\n" + x.stack;
|
3567 | }
|
3568 | JSCompiler_temp = { componentStack: JSCompiler_temp };
|
3569 | } else JSCompiler_temp = {};
|
3570 | return JSCompiler_temp;
|
3571 | }
|
3572 | function logRecoverableError(request, error, errorInfo) {
|
3573 | request = request.onError(error, errorInfo);
|
3574 | if (null == request || "string" === typeof request) return request;
|
3575 | }
|
3576 | function fatalError(request, error) {
|
3577 | var onShellError = request.onShellError;
|
3578 | onShellError(error);
|
3579 | onShellError = request.onFatalError;
|
3580 | onShellError(error);
|
3581 | null !== request.destination
|
3582 | ? ((request.status = 2), closeWithError(request.destination, error))
|
3583 | : ((request.status = 1), (request.fatalError = error));
|
3584 | }
|
3585 | function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
|
3586 | var prevThenableState = task.thenableState;
|
3587 | task.thenableState = null;
|
3588 | currentlyRenderingComponent = {};
|
3589 | currentlyRenderingTask = task;
|
3590 | currentlyRenderingRequest = request;
|
3591 | currentlyRenderingKeyPath = keyPath;
|
3592 | actionStateCounter = localIdCounter = 0;
|
3593 | actionStateMatchingIndex = -1;
|
3594 | thenableIndexCounter = 0;
|
3595 | thenableState = prevThenableState;
|
3596 | for (request = Component(props, secondArg); didScheduleRenderPhaseUpdate; )
|
3597 | (didScheduleRenderPhaseUpdate = !1),
|
3598 | (actionStateCounter = localIdCounter = 0),
|
3599 | (actionStateMatchingIndex = -1),
|
3600 | (thenableIndexCounter = 0),
|
3601 | (numberOfReRenders += 1),
|
3602 | (workInProgressHook = null),
|
3603 | (request = Component(props, secondArg));
|
3604 | resetHooksState();
|
3605 | return request;
|
3606 | }
|
3607 | function finishFunctionComponent(
|
3608 | request,
|
3609 | task,
|
3610 | keyPath,
|
3611 | children,
|
3612 | hasId,
|
3613 | actionStateCount,
|
3614 | actionStateMatchingIndex
|
3615 | ) {
|
3616 | var didEmitActionStateMarkers = !1;
|
3617 | if (0 !== actionStateCount && null !== request.formState) {
|
3618 | var segment = task.blockedSegment;
|
3619 | if (null !== segment) {
|
3620 | didEmitActionStateMarkers = !0;
|
3621 | segment = segment.chunks;
|
3622 | for (var i = 0; i < actionStateCount; i++)
|
3623 | i === actionStateMatchingIndex
|
3624 | ? segment.push("\x3c!--F!--\x3e")
|
3625 | : segment.push("\x3c!--F--\x3e");
|
3626 | }
|
3627 | }
|
3628 | actionStateCount = task.keyPath;
|
3629 | task.keyPath = keyPath;
|
3630 | hasId
|
3631 | ? ((keyPath = task.treeContext),
|
3632 | (task.treeContext = pushTreeContext(keyPath, 1, 0)),
|
3633 | renderNode(request, task, children, -1),
|
3634 | (task.treeContext = keyPath))
|
3635 | : didEmitActionStateMarkers
|
3636 | ? renderNode(request, task, children, -1)
|
3637 | : renderNodeDestructive(request, task, children, -1);
|
3638 | task.keyPath = actionStateCount;
|
3639 | }
|
3640 | function renderElement(request, task, keyPath, type, props, ref) {
|
3641 | if ("function" === typeof type)
|
3642 | if (type.prototype && type.prototype.isReactComponent) {
|
3643 | var JSCompiler_inline_result = props;
|
3644 | if ("ref" in props) {
|
3645 | JSCompiler_inline_result = {};
|
3646 | for (var propName in props)
|
3647 | "ref" !== propName &&
|
3648 | (JSCompiler_inline_result[propName] = props[propName]);
|
3649 | }
|
3650 | var defaultProps = type.defaultProps;
|
3651 | if (defaultProps) {
|
3652 | JSCompiler_inline_result === props &&
|
3653 | (JSCompiler_inline_result = assign(
|
3654 | {},
|
3655 | JSCompiler_inline_result,
|
3656 | props
|
3657 | ));
|
3658 | for (var propName$31 in defaultProps)
|
3659 | void 0 === JSCompiler_inline_result[propName$31] &&
|
3660 | (JSCompiler_inline_result[propName$31] = defaultProps[propName$31]);
|
3661 | }
|
3662 | props = task.componentStack;
|
3663 | task.componentStack = { tag: 2, parent: task.componentStack, type: type };
|
3664 | defaultProps = emptyContextObject;
|
3665 | ref = type.contextType;
|
3666 | "object" === typeof ref &&
|
3667 | null !== ref &&
|
3668 | (defaultProps = ref._currentValue);
|
3669 | defaultProps = new type(JSCompiler_inline_result, defaultProps);
|
3670 | propName$31 = void 0 !== defaultProps.state ? defaultProps.state : null;
|
3671 | defaultProps.updater = classComponentUpdater;
|
3672 | defaultProps.props = JSCompiler_inline_result;
|
3673 | defaultProps.state = propName$31;
|
3674 | ref = { queue: [], replace: !1 };
|
3675 | defaultProps._reactInternals = ref;
|
3676 | var contextType = type.contextType;
|
3677 | defaultProps.context =
|
3678 | "object" === typeof contextType && null !== contextType
|
3679 | ? contextType._currentValue
|
3680 | : emptyContextObject;
|
3681 | contextType = type.getDerivedStateFromProps;
|
3682 | "function" === typeof contextType &&
|
3683 | ((contextType = contextType(JSCompiler_inline_result, propName$31)),
|
3684 | (propName$31 =
|
3685 | null === contextType || void 0 === contextType
|
3686 | ? propName$31
|
3687 | : assign({}, propName$31, contextType)),
|
3688 | (defaultProps.state = propName$31));
|
3689 | if (
|
3690 | "function" !== typeof type.getDerivedStateFromProps &&
|
3691 | "function" !== typeof defaultProps.getSnapshotBeforeUpdate &&
|
3692 | ("function" === typeof defaultProps.UNSAFE_componentWillMount ||
|
3693 | "function" === typeof defaultProps.componentWillMount)
|
3694 | )
|
3695 | if (
|
3696 | ((type = defaultProps.state),
|
3697 | "function" === typeof defaultProps.componentWillMount &&
|
3698 | defaultProps.componentWillMount(),
|
3699 | "function" === typeof defaultProps.UNSAFE_componentWillMount &&
|
3700 | defaultProps.UNSAFE_componentWillMount(),
|
3701 | type !== defaultProps.state &&
|
3702 | classComponentUpdater.enqueueReplaceState(
|
3703 | defaultProps,
|
3704 | defaultProps.state,
|
3705 | null
|
3706 | ),
|
3707 | null !== ref.queue && 0 < ref.queue.length)
|
3708 | )
|
3709 | if (
|
3710 | ((type = ref.queue),
|
3711 | (contextType = ref.replace),
|
3712 | (ref.queue = null),
|
3713 | (ref.replace = !1),
|
3714 | contextType && 1 === type.length)
|
3715 | )
|
3716 | defaultProps.state = type[0];
|
3717 | else {
|
3718 | ref = contextType ? type[0] : defaultProps.state;
|
3719 | propName$31 = !0;
|
3720 | for (
|
3721 | contextType = contextType ? 1 : 0;
|
3722 | contextType < type.length;
|
3723 | contextType++
|
3724 | )
|
3725 | (propName = type[contextType]),
|
3726 | (propName =
|
3727 | "function" === typeof propName
|
3728 | ? propName.call(
|
3729 | defaultProps,
|
3730 | ref,
|
3731 | JSCompiler_inline_result,
|
3732 | void 0
|
3733 | )
|
3734 | : propName),
|
3735 | null != propName &&
|
3736 | (propName$31
|
3737 | ? ((propName$31 = !1), (ref = assign({}, ref, propName)))
|
3738 | : assign(ref, propName));
|
3739 | defaultProps.state = ref;
|
3740 | }
|
3741 | else ref.queue = null;
|
3742 | type = defaultProps.render();
|
3743 | JSCompiler_inline_result = task.keyPath;
|
3744 | task.keyPath = keyPath;
|
3745 | renderNodeDestructive(request, task, type, -1);
|
3746 | task.keyPath = JSCompiler_inline_result;
|
3747 | task.componentStack = props;
|
3748 | } else
|
3749 | (JSCompiler_inline_result = task.componentStack),
|
3750 | (task.componentStack = {
|
3751 | tag: 1,
|
3752 | parent: task.componentStack,
|
3753 | type: type
|
3754 | }),
|
3755 | (type = renderWithHooks(request, task, keyPath, type, props, void 0)),
|
3756 | finishFunctionComponent(
|
3757 | request,
|
3758 | task,
|
3759 | keyPath,
|
3760 | type,
|
3761 | 0 !== localIdCounter,
|
3762 | actionStateCounter,
|
3763 | actionStateMatchingIndex
|
3764 | ),
|
3765 | (task.componentStack = JSCompiler_inline_result);
|
3766 | else if ("string" === typeof type) {
|
3767 | JSCompiler_inline_result = task.componentStack;
|
3768 | task.componentStack = createBuiltInComponentStack(task, type);
|
3769 | defaultProps = task.blockedSegment;
|
3770 | if (null === defaultProps)
|
3771 | (defaultProps = props.children),
|
3772 | (ref = task.formatContext),
|
3773 | (propName$31 = task.keyPath),
|
3774 | (task.formatContext = getChildFormatContext(ref, type, props)),
|
3775 | (task.keyPath = keyPath),
|
3776 | renderNode(request, task, defaultProps, -1),
|
3777 | (task.formatContext = ref),
|
3778 | (task.keyPath = propName$31);
|
3779 | else {
|
3780 | propName$31 = pushStartInstance(
|
3781 | defaultProps.chunks,
|
3782 | type,
|
3783 | props,
|
3784 | request.resumableState,
|
3785 | request.renderState,
|
3786 | task.hoistableState,
|
3787 | task.formatContext,
|
3788 | defaultProps.lastPushedText,
|
3789 | task.isFallback
|
3790 | );
|
3791 | defaultProps.lastPushedText = !1;
|
3792 | ref = task.formatContext;
|
3793 | contextType = task.keyPath;
|
3794 | task.formatContext = getChildFormatContext(ref, type, props);
|
3795 | task.keyPath = keyPath;
|
3796 | renderNode(request, task, propName$31, -1);
|
3797 | task.formatContext = ref;
|
3798 | task.keyPath = contextType;
|
3799 | a: {
|
3800 | keyPath = defaultProps.chunks;
|
3801 | request = request.resumableState;
|
3802 | switch (type) {
|
3803 | case "title":
|
3804 | case "style":
|
3805 | case "script":
|
3806 | case "area":
|
3807 | case "base":
|
3808 | case "br":
|
3809 | case "col":
|
3810 | case "embed":
|
3811 | case "hr":
|
3812 | case "img":
|
3813 | case "input":
|
3814 | case "keygen":
|
3815 | case "link":
|
3816 | case "meta":
|
3817 | case "param":
|
3818 | case "source":
|
3819 | case "track":
|
3820 | case "wbr":
|
3821 | break a;
|
3822 | case "body":
|
3823 | if (1 >= ref.insertionMode) {
|
3824 | request.hasBody = !0;
|
3825 | break a;
|
3826 | }
|
3827 | break;
|
3828 | case "html":
|
3829 | if (0 === ref.insertionMode) {
|
3830 | request.hasHtml = !0;
|
3831 | break a;
|
3832 | }
|
3833 | }
|
3834 | keyPath.push(endChunkForTag(type));
|
3835 | }
|
3836 | defaultProps.lastPushedText = !1;
|
3837 | }
|
3838 | task.componentStack = JSCompiler_inline_result;
|
3839 | } else {
|
3840 | switch (type) {
|
3841 | case REACT_LEGACY_HIDDEN_TYPE:
|
3842 | case REACT_DEBUG_TRACING_MODE_TYPE:
|
3843 | case REACT_STRICT_MODE_TYPE:
|
3844 | case REACT_PROFILER_TYPE:
|
3845 | case REACT_FRAGMENT_TYPE:
|
3846 | type = task.keyPath;
|
3847 | task.keyPath = keyPath;
|
3848 | renderNodeDestructive(request, task, props.children, -1);
|
3849 | task.keyPath = type;
|
3850 | return;
|
3851 | case REACT_OFFSCREEN_TYPE:
|
3852 | "hidden" !== props.mode &&
|
3853 | ((type = task.keyPath),
|
3854 | (task.keyPath = keyPath),
|
3855 | renderNodeDestructive(request, task, props.children, -1),
|
3856 | (task.keyPath = type));
|
3857 | return;
|
3858 | case REACT_SUSPENSE_LIST_TYPE:
|
3859 | type = task.componentStack;
|
3860 | task.componentStack = createBuiltInComponentStack(task, "SuspenseList");
|
3861 | JSCompiler_inline_result = task.keyPath;
|
3862 | task.keyPath = keyPath;
|
3863 | renderNodeDestructive(request, task, props.children, -1);
|
3864 | task.keyPath = JSCompiler_inline_result;
|
3865 | task.componentStack = type;
|
3866 | return;
|
3867 | case REACT_SCOPE_TYPE:
|
3868 | throw Error("ReactDOMServer does not yet support scope components.");
|
3869 | case REACT_SUSPENSE_TYPE:
|
3870 | a: if (null !== task.replay) {
|
3871 | type = task.keyPath;
|
3872 | task.keyPath = keyPath;
|
3873 | keyPath = props.children;
|
3874 | try {
|
3875 | renderNode(request, task, keyPath, -1);
|
3876 | } finally {
|
3877 | task.keyPath = type;
|
3878 | }
|
3879 | } else {
|
3880 | var previousComponentStack = task.componentStack;
|
3881 | type = task.componentStack = createBuiltInComponentStack(
|
3882 | task,
|
3883 | "Suspense"
|
3884 | );
|
3885 | var prevKeyPath = task.keyPath;
|
3886 | ref = task.blockedBoundary;
|
3887 | var parentHoistableState = task.hoistableState,
|
3888 | parentSegment = task.blockedSegment;
|
3889 | propName$31 = props.fallback;
|
3890 | var content = props.children;
|
3891 | props = new Set();
|
3892 | contextType = createSuspenseBoundary(request, props);
|
3893 | null !== request.trackedPostpones &&
|
3894 | (contextType.trackedContentKeyPath = keyPath);
|
3895 | propName = createPendingSegment(
|
3896 | request,
|
3897 | parentSegment.chunks.length,
|
3898 | contextType,
|
3899 | task.formatContext,
|
3900 | !1,
|
3901 | !1
|
3902 | );
|
3903 | parentSegment.children.push(propName);
|
3904 | parentSegment.lastPushedText = !1;
|
3905 | var contentRootSegment = createPendingSegment(
|
3906 | request,
|
3907 | 0,
|
3908 | null,
|
3909 | task.formatContext,
|
3910 | !1,
|
3911 | !1
|
3912 | );
|
3913 | contentRootSegment.parentFlushed = !0;
|
3914 | task.blockedBoundary = contextType;
|
3915 | task.hoistableState = contextType.contentState;
|
3916 | task.blockedSegment = contentRootSegment;
|
3917 | task.keyPath = keyPath;
|
3918 | try {
|
3919 | if (
|
3920 | (renderNode(request, task, content, -1),
|
3921 | contentRootSegment.lastPushedText &&
|
3922 | contentRootSegment.textEmbedded &&
|
3923 | contentRootSegment.chunks.push("\x3c!-- --\x3e"),
|
3924 | (contentRootSegment.status = 1),
|
3925 | queueCompletedSegment(contextType, contentRootSegment),
|
3926 | 0 === contextType.pendingTasks && 0 === contextType.status)
|
3927 | ) {
|
3928 | contextType.status = 1;
|
3929 | task.componentStack = previousComponentStack;
|
3930 | break a;
|
3931 | }
|
3932 | } catch (error) {
|
3933 | (contentRootSegment.status = 4),
|
3934 | (contextType.status = 4),
|
3935 | (JSCompiler_inline_result = getThrownInfo(
|
3936 | request,
|
3937 | task.componentStack
|
3938 | )),
|
3939 | (defaultProps = logRecoverableError(
|
3940 | request,
|
3941 | error,
|
3942 | JSCompiler_inline_result
|
3943 | )),
|
3944 | (contextType.errorDigest = defaultProps),
|
3945 | untrackBoundary(request, contextType);
|
3946 | } finally {
|
3947 | (task.blockedBoundary = ref),
|
3948 | (task.hoistableState = parentHoistableState),
|
3949 | (task.blockedSegment = parentSegment),
|
3950 | (task.keyPath = prevKeyPath),
|
3951 | (task.componentStack = previousComponentStack);
|
3952 | }
|
3953 | JSCompiler_inline_result = [
|
3954 | keyPath[0],
|
3955 | "Suspense Fallback",
|
3956 | keyPath[2]
|
3957 | ];
|
3958 | defaultProps = request.trackedPostpones;
|
3959 | null !== defaultProps &&
|
3960 | ((previousComponentStack = [
|
3961 | JSCompiler_inline_result[1],
|
3962 | JSCompiler_inline_result[2],
|
3963 | [],
|
3964 | null
|
3965 | ]),
|
3966 | defaultProps.workingMap.set(
|
3967 | JSCompiler_inline_result,
|
3968 | previousComponentStack
|
3969 | ),
|
3970 | 5 === contextType.status
|
3971 | ? (defaultProps.workingMap.get(keyPath)[4] =
|
3972 | previousComponentStack)
|
3973 | : (contextType.trackedFallbackNode = previousComponentStack));
|
3974 | task = createRenderTask(
|
3975 | request,
|
3976 | null,
|
3977 | propName$31,
|
3978 | -1,
|
3979 | ref,
|
3980 | propName,
|
3981 | contextType.fallbackState,
|
3982 | props,
|
3983 | JSCompiler_inline_result,
|
3984 | task.formatContext,
|
3985 | task.legacyContext,
|
3986 | task.context,
|
3987 | task.treeContext,
|
3988 | type,
|
3989 | !0
|
3990 | );
|
3991 | request.pingedTasks.push(task);
|
3992 | }
|
3993 | return;
|
3994 | }
|
3995 | if ("object" === typeof type && null !== type)
|
3996 | switch (type.$$typeof) {
|
3997 | case REACT_FORWARD_REF_TYPE:
|
3998 | JSCompiler_inline_result = task.componentStack;
|
3999 | task.componentStack = {
|
4000 | tag: 1,
|
4001 | parent: task.componentStack,
|
4002 | type: type.render
|
4003 | };
|
4004 | if ("ref" in props)
|
4005 | for (contextType in ((defaultProps = {}), props))
|
4006 | "ref" !== contextType &&
|
4007 | (defaultProps[contextType] = props[contextType]);
|
4008 | else defaultProps = props;
|
4009 | type = renderWithHooks(
|
4010 | request,
|
4011 | task,
|
4012 | keyPath,
|
4013 | type.render,
|
4014 | defaultProps,
|
4015 | ref
|
4016 | );
|
4017 | finishFunctionComponent(
|
4018 | request,
|
4019 | task,
|
4020 | keyPath,
|
4021 | type,
|
4022 | 0 !== localIdCounter,
|
4023 | actionStateCounter,
|
4024 | actionStateMatchingIndex
|
4025 | );
|
4026 | task.componentStack = JSCompiler_inline_result;
|
4027 | return;
|
4028 | case REACT_MEMO_TYPE:
|
4029 | renderElement(request, task, keyPath, type.type, props, ref);
|
4030 | return;
|
4031 | case REACT_PROVIDER_TYPE:
|
4032 | case REACT_CONTEXT_TYPE:
|
4033 | defaultProps = props.children;
|
4034 | JSCompiler_inline_result = task.keyPath;
|
4035 | props = props.value;
|
4036 | ref = type._currentValue;
|
4037 | type._currentValue = props;
|
4038 | propName$31 = currentActiveSnapshot;
|
4039 | currentActiveSnapshot = type = {
|
4040 | parent: propName$31,
|
4041 | depth: null === propName$31 ? 0 : propName$31.depth + 1,
|
4042 | context: type,
|
4043 | parentValue: ref,
|
4044 | value: props
|
4045 | };
|
4046 | task.context = type;
|
4047 | task.keyPath = keyPath;
|
4048 | renderNodeDestructive(request, task, defaultProps, -1);
|
4049 | request = currentActiveSnapshot;
|
4050 | if (null === request)
|
4051 | throw Error(
|
4052 | "Tried to pop a Context at the root of the app. This is a bug in React."
|
4053 | );
|
4054 | request.context._currentValue = request.parentValue;
|
4055 | request = currentActiveSnapshot = request.parent;
|
4056 | task.context = request;
|
4057 | task.keyPath = JSCompiler_inline_result;
|
4058 | return;
|
4059 | case REACT_CONSUMER_TYPE:
|
4060 | props = props.children;
|
4061 | type = props(type._context._currentValue);
|
4062 | props = task.keyPath;
|
4063 | task.keyPath = keyPath;
|
4064 | renderNodeDestructive(request, task, type, -1);
|
4065 | task.keyPath = props;
|
4066 | return;
|
4067 | case REACT_LAZY_TYPE:
|
4068 | JSCompiler_inline_result = task.componentStack;
|
4069 | task.componentStack = createBuiltInComponentStack(task, "Lazy");
|
4070 | defaultProps = type._init;
|
4071 | type = defaultProps(type._payload);
|
4072 | renderElement(request, task, keyPath, type, props, void 0);
|
4073 | task.componentStack = JSCompiler_inline_result;
|
4074 | return;
|
4075 | }
|
4076 | throw Error(
|
4077 | "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
|
4078 | ((null == type ? type : typeof type) + ".")
|
4079 | );
|
4080 | }
|
4081 | }
|
4082 | function resumeNode(request, task, segmentId, node, childIndex) {
|
4083 | var prevReplay = task.replay,
|
4084 | blockedBoundary = task.blockedBoundary,
|
4085 | resumedSegment = createPendingSegment(
|
4086 | request,
|
4087 | 0,
|
4088 | null,
|
4089 | task.formatContext,
|
4090 | !1,
|
4091 | !1
|
4092 | );
|
4093 | resumedSegment.id = segmentId;
|
4094 | resumedSegment.parentFlushed = !0;
|
4095 | try {
|
4096 | (task.replay = null),
|
4097 | (task.blockedSegment = resumedSegment),
|
4098 | renderNode(request, task, node, childIndex),
|
4099 | (resumedSegment.status = 1),
|
4100 | null === blockedBoundary
|
4101 | ? (request.completedRootSegment = resumedSegment)
|
4102 | : (queueCompletedSegment(blockedBoundary, resumedSegment),
|
4103 | blockedBoundary.parentFlushed &&
|
4104 | request.partialBoundaries.push(blockedBoundary));
|
4105 | } finally {
|
4106 | (task.replay = prevReplay), (task.blockedSegment = null);
|
4107 | }
|
4108 | }
|
4109 | function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
|
4110 | if (null !== task.replay && "number" === typeof task.replay.slots)
|
4111 | resumeNode(request, task, task.replay.slots, node$jscomp$0, childIndex);
|
4112 | else if (
|
4113 | ((task.node = node$jscomp$0),
|
4114 | (task.childIndex = childIndex),
|
4115 | null !== node$jscomp$0)
|
4116 | ) {
|
4117 | if ("object" === typeof node$jscomp$0) {
|
4118 | switch (node$jscomp$0.$$typeof) {
|
4119 | case REACT_ELEMENT_TYPE:
|
4120 | var type = node$jscomp$0.type,
|
4121 | key = node$jscomp$0.key,
|
4122 | props = node$jscomp$0.props;
|
4123 | node$jscomp$0 = props.ref;
|
4124 | var ref = void 0 !== node$jscomp$0 ? node$jscomp$0 : null;
|
4125 | var name = getComponentNameFromType(type),
|
4126 | keyOrIndex =
|
4127 | null == key ? (-1 === childIndex ? 0 : childIndex) : key;
|
4128 | key = [task.keyPath, name, keyOrIndex];
|
4129 | if (null !== task.replay)
|
4130 | a: {
|
4131 | var replay = task.replay;
|
4132 | childIndex = replay.nodes;
|
4133 | for (
|
4134 | node$jscomp$0 = 0;
|
4135 | node$jscomp$0 < childIndex.length;
|
4136 | node$jscomp$0++
|
4137 | ) {
|
4138 | var node = childIndex[node$jscomp$0];
|
4139 | if (keyOrIndex === node[1]) {
|
4140 | if (4 === node.length) {
|
4141 | if (null !== name && name !== node[0])
|
4142 | throw Error(
|
4143 | "Expected the resume to render <" +
|
4144 | node[0] +
|
4145 | "> in this slot but instead it rendered <" +
|
4146 | name +
|
4147 | ">. The tree doesn't match so React will fallback to client rendering."
|
4148 | );
|
4149 | var childNodes = node[2];
|
4150 | name = node[3];
|
4151 | keyOrIndex = task.node;
|
4152 | task.replay = {
|
4153 | nodes: childNodes,
|
4154 | slots: name,
|
4155 | pendingTasks: 1
|
4156 | };
|
4157 | try {
|
4158 | renderElement(request, task, key, type, props, ref);
|
4159 | if (
|
4160 | 1 === task.replay.pendingTasks &&
|
4161 | 0 < task.replay.nodes.length
|
4162 | )
|
4163 | throw Error(
|
4164 | "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
4165 | );
|
4166 | task.replay.pendingTasks--;
|
4167 | } catch (x) {
|
4168 | if (
|
4169 | "object" === typeof x &&
|
4170 | null !== x &&
|
4171 | (x === SuspenseException ||
|
4172 | "function" === typeof x.then)
|
4173 | )
|
4174 | throw (
|
4175 | (task.node === keyOrIndex && (task.replay = replay),
|
4176 | x)
|
4177 | );
|
4178 | task.replay.pendingTasks--;
|
4179 | props = getThrownInfo(request, task.componentStack);
|
4180 | key = request;
|
4181 | request = task.blockedBoundary;
|
4182 | type = x;
|
4183 | props = logRecoverableError(key, type, props);
|
4184 | abortRemainingReplayNodes(
|
4185 | key,
|
4186 | request,
|
4187 | childNodes,
|
4188 | name,
|
4189 | type,
|
4190 | props
|
4191 | );
|
4192 | }
|
4193 | task.replay = replay;
|
4194 | } else {
|
4195 | if (type !== REACT_SUSPENSE_TYPE)
|
4196 | throw Error(
|
4197 | "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
|
4198 | (getComponentNameFromType(type) || "Unknown") +
|
4199 | ">. The tree doesn't match so React will fallback to client rendering."
|
4200 | );
|
4201 | b: {
|
4202 | replay = void 0;
|
4203 | type = node[5];
|
4204 | ref = node[2];
|
4205 | name = node[3];
|
4206 | keyOrIndex = null === node[4] ? [] : node[4][2];
|
4207 | node = null === node[4] ? null : node[4][3];
|
4208 | var previousComponentStack = task.componentStack,
|
4209 | suspenseComponentStack = (task.componentStack =
|
4210 | createBuiltInComponentStack(task, "Suspense")),
|
4211 | prevKeyPath = task.keyPath,
|
4212 | previousReplaySet = task.replay,
|
4213 | parentBoundary = task.blockedBoundary,
|
4214 | parentHoistableState = task.hoistableState,
|
4215 | content = props.children;
|
4216 | props = props.fallback;
|
4217 | var fallbackAbortSet = new Set(),
|
4218 | resumedBoundary = createSuspenseBoundary(
|
4219 | request,
|
4220 | fallbackAbortSet
|
4221 | );
|
4222 | resumedBoundary.parentFlushed = !0;
|
4223 | resumedBoundary.rootSegmentID = type;
|
4224 | task.blockedBoundary = resumedBoundary;
|
4225 | task.hoistableState = resumedBoundary.contentState;
|
4226 | task.replay = {
|
4227 | nodes: ref,
|
4228 | slots: name,
|
4229 | pendingTasks: 1
|
4230 | };
|
4231 | try {
|
4232 | renderNode(request, task, content, -1);
|
4233 | if (
|
4234 | 1 === task.replay.pendingTasks &&
|
4235 | 0 < task.replay.nodes.length
|
4236 | )
|
4237 | throw Error(
|
4238 | "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
4239 | );
|
4240 | task.replay.pendingTasks--;
|
4241 | if (
|
4242 | 0 === resumedBoundary.pendingTasks &&
|
4243 | 0 === resumedBoundary.status
|
4244 | ) {
|
4245 | resumedBoundary.status = 1;
|
4246 | request.completedBoundaries.push(resumedBoundary);
|
4247 | break b;
|
4248 | }
|
4249 | } catch (error) {
|
4250 | (resumedBoundary.status = 4),
|
4251 | (childNodes = getThrownInfo(
|
4252 | request,
|
4253 | task.componentStack
|
4254 | )),
|
4255 | (replay = logRecoverableError(
|
4256 | request,
|
4257 | error,
|
4258 | childNodes
|
4259 | )),
|
4260 | (resumedBoundary.errorDigest = replay),
|
4261 | task.replay.pendingTasks--,
|
4262 | request.clientRenderedBoundaries.push(
|
4263 | resumedBoundary
|
4264 | );
|
4265 | } finally {
|
4266 | (task.blockedBoundary = parentBoundary),
|
4267 | (task.hoistableState = parentHoistableState),
|
4268 | (task.replay = previousReplaySet),
|
4269 | (task.keyPath = prevKeyPath),
|
4270 | (task.componentStack = previousComponentStack);
|
4271 | }
|
4272 | task = createReplayTask(
|
4273 | request,
|
4274 | null,
|
4275 | { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
|
4276 | props,
|
4277 | -1,
|
4278 | parentBoundary,
|
4279 | resumedBoundary.fallbackState,
|
4280 | fallbackAbortSet,
|
4281 | [key[0], "Suspense Fallback", key[2]],
|
4282 | task.formatContext,
|
4283 | task.legacyContext,
|
4284 | task.context,
|
4285 | task.treeContext,
|
4286 | suspenseComponentStack,
|
4287 | !0
|
4288 | );
|
4289 | request.pingedTasks.push(task);
|
4290 | }
|
4291 | }
|
4292 | childIndex.splice(node$jscomp$0, 1);
|
4293 | break a;
|
4294 | }
|
4295 | }
|
4296 | }
|
4297 | else renderElement(request, task, key, type, props, ref);
|
4298 | return;
|
4299 | case REACT_PORTAL_TYPE:
|
4300 | throw Error(
|
4301 | "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
|
4302 | );
|
4303 | case REACT_LAZY_TYPE:
|
4304 | childNodes = task.componentStack;
|
4305 | task.componentStack = createBuiltInComponentStack(task, "Lazy");
|
4306 | props = node$jscomp$0._init;
|
4307 | node$jscomp$0 = props(node$jscomp$0._payload);
|
4308 | task.componentStack = childNodes;
|
4309 | renderNodeDestructive(request, task, node$jscomp$0, childIndex);
|
4310 | return;
|
4311 | }
|
4312 | if (isArrayImpl(node$jscomp$0)) {
|
4313 | renderChildrenArray(request, task, node$jscomp$0, childIndex);
|
4314 | return;
|
4315 | }
|
4316 | null === node$jscomp$0 || "object" !== typeof node$jscomp$0
|
4317 | ? (childNodes = null)
|
4318 | : ((childNodes =
|
4319 | (MAYBE_ITERATOR_SYMBOL && node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
|
4320 | node$jscomp$0["@@iterator"]),
|
4321 | (childNodes = "function" === typeof childNodes ? childNodes : null));
|
4322 | if (childNodes && (childNodes = childNodes.call(node$jscomp$0))) {
|
4323 | node$jscomp$0 = childNodes.next();
|
4324 | if (!node$jscomp$0.done) {
|
4325 | props = [];
|
4326 | do
|
4327 | props.push(node$jscomp$0.value),
|
4328 | (node$jscomp$0 = childNodes.next());
|
4329 | while (!node$jscomp$0.done);
|
4330 | renderChildrenArray(request, task, props, childIndex);
|
4331 | }
|
4332 | return;
|
4333 | }
|
4334 | if ("function" === typeof node$jscomp$0.then)
|
4335 | return (
|
4336 | (task.thenableState = null),
|
4337 | renderNodeDestructive(
|
4338 | request,
|
4339 | task,
|
4340 | unwrapThenable(node$jscomp$0),
|
4341 | childIndex
|
4342 | )
|
4343 | );
|
4344 | if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
|
4345 | return renderNodeDestructive(
|
4346 | request,
|
4347 | task,
|
4348 | node$jscomp$0._currentValue,
|
4349 | childIndex
|
4350 | );
|
4351 | childIndex = Object.prototype.toString.call(node$jscomp$0);
|
4352 | throw Error(
|
4353 | "Objects are not valid as a React child (found: " +
|
4354 | ("[object Object]" === childIndex
|
4355 | ? "object with keys {" + Object.keys(node$jscomp$0).join(", ") + "}"
|
4356 | : childIndex) +
|
4357 | "). If you meant to render a collection of children, use an array instead."
|
4358 | );
|
4359 | }
|
4360 | if ("string" === typeof node$jscomp$0)
|
4361 | (childIndex = task.blockedSegment),
|
4362 | null !== childIndex &&
|
4363 | (childIndex.lastPushedText = pushTextInstance(
|
4364 | childIndex.chunks,
|
4365 | node$jscomp$0,
|
4366 | request.renderState,
|
4367 | childIndex.lastPushedText
|
4368 | ));
|
4369 | else if (
|
4370 | "number" === typeof node$jscomp$0 ||
|
4371 | "bigint" === typeof node$jscomp$0
|
4372 | )
|
4373 | (childIndex = task.blockedSegment),
|
4374 | null !== childIndex &&
|
4375 | (childIndex.lastPushedText = pushTextInstance(
|
4376 | childIndex.chunks,
|
4377 | "" + node$jscomp$0,
|
4378 | request.renderState,
|
4379 | childIndex.lastPushedText
|
4380 | ));
|
4381 | }
|
4382 | }
|
4383 | function renderChildrenArray(request, task, children, childIndex) {
|
4384 | var prevKeyPath = task.keyPath;
|
4385 | if (
|
4386 | -1 !== childIndex &&
|
4387 | ((task.keyPath = [task.keyPath, "Fragment", childIndex]),
|
4388 | null !== task.replay)
|
4389 | ) {
|
4390 | for (
|
4391 | var replay = task.replay, replayNodes = replay.nodes, j = 0;
|
4392 | j < replayNodes.length;
|
4393 | j++
|
4394 | ) {
|
4395 | var node = replayNodes[j];
|
4396 | if (node[1] === childIndex) {
|
4397 | childIndex = node[2];
|
4398 | node = node[3];
|
4399 | task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
|
4400 | try {
|
4401 | renderChildrenArray(request, task, children, -1);
|
4402 | if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
|
4403 | throw Error(
|
4404 | "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
4405 | );
|
4406 | task.replay.pendingTasks--;
|
4407 | } catch (x) {
|
4408 | if (
|
4409 | "object" === typeof x &&
|
4410 | null !== x &&
|
4411 | (x === SuspenseException || "function" === typeof x.then)
|
4412 | )
|
4413 | throw x;
|
4414 | task.replay.pendingTasks--;
|
4415 | children = getThrownInfo(request, task.componentStack);
|
4416 | var boundary = task.blockedBoundary,
|
4417 | error = x;
|
4418 | children = logRecoverableError(request, error, children);
|
4419 | abortRemainingReplayNodes(
|
4420 | request,
|
4421 | boundary,
|
4422 | childIndex,
|
4423 | node,
|
4424 | error,
|
4425 | children
|
4426 | );
|
4427 | }
|
4428 | task.replay = replay;
|
4429 | replayNodes.splice(j, 1);
|
4430 | break;
|
4431 | }
|
4432 | }
|
4433 | task.keyPath = prevKeyPath;
|
4434 | return;
|
4435 | }
|
4436 | replay = task.treeContext;
|
4437 | replayNodes = children.length;
|
4438 | if (
|
4439 | null !== task.replay &&
|
4440 | ((j = task.replay.slots), null !== j && "object" === typeof j)
|
4441 | ) {
|
4442 | for (childIndex = 0; childIndex < replayNodes; childIndex++)
|
4443 | (node = children[childIndex]),
|
4444 | (task.treeContext = pushTreeContext(replay, replayNodes, childIndex)),
|
4445 | (boundary = j[childIndex]),
|
4446 | "number" === typeof boundary
|
4447 | ? (resumeNode(request, task, boundary, node, childIndex),
|
4448 | delete j[childIndex])
|
4449 | : renderNode(request, task, node, childIndex);
|
4450 | task.treeContext = replay;
|
4451 | task.keyPath = prevKeyPath;
|
4452 | return;
|
4453 | }
|
4454 | for (j = 0; j < replayNodes; j++)
|
4455 | (childIndex = children[j]),
|
4456 | (task.treeContext = pushTreeContext(replay, replayNodes, j)),
|
4457 | renderNode(request, task, childIndex, j);
|
4458 | task.treeContext = replay;
|
4459 | task.keyPath = prevKeyPath;
|
4460 | }
|
4461 | function untrackBoundary(request, boundary) {
|
4462 | request = request.trackedPostpones;
|
4463 | null !== request &&
|
4464 | ((boundary = boundary.trackedContentKeyPath),
|
4465 | null !== boundary &&
|
4466 | ((boundary = request.workingMap.get(boundary)),
|
4467 | void 0 !== boundary &&
|
4468 | ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
|
4469 | }
|
4470 | function renderNode(request, task, node, childIndex) {
|
4471 | var previousFormatContext = task.formatContext,
|
4472 | previousLegacyContext = task.legacyContext,
|
4473 | previousContext = task.context,
|
4474 | previousKeyPath = task.keyPath,
|
4475 | previousTreeContext = task.treeContext,
|
4476 | previousComponentStack = task.componentStack,
|
4477 | segment = task.blockedSegment;
|
4478 | if (null === segment)
|
4479 | try {
|
4480 | return renderNodeDestructive(request, task, node, childIndex);
|
4481 | } catch (thrownValue) {
|
4482 | if (
|
4483 | (resetHooksState(),
|
4484 | (node =
|
4485 | thrownValue === SuspenseException
|
4486 | ? getSuspendedThenable()
|
4487 | : thrownValue),
|
4488 | "object" === typeof node &&
|
4489 | null !== node &&
|
4490 | "function" === typeof node.then)
|
4491 | ) {
|
4492 | childIndex = getThenableStateAfterSuspending();
|
4493 | request = createReplayTask(
|
4494 | request,
|
4495 | childIndex,
|
4496 | task.replay,
|
4497 | task.node,
|
4498 | task.childIndex,
|
4499 | task.blockedBoundary,
|
4500 | task.hoistableState,
|
4501 | task.abortSet,
|
4502 | task.keyPath,
|
4503 | task.formatContext,
|
4504 | task.legacyContext,
|
4505 | task.context,
|
4506 | task.treeContext,
|
4507 | null !== task.componentStack ? task.componentStack.parent : null,
|
4508 | task.isFallback
|
4509 | ).ping;
|
4510 | node.then(request, request);
|
4511 | task.formatContext = previousFormatContext;
|
4512 | task.legacyContext = previousLegacyContext;
|
4513 | task.context = previousContext;
|
4514 | task.keyPath = previousKeyPath;
|
4515 | task.treeContext = previousTreeContext;
|
4516 | task.componentStack = previousComponentStack;
|
4517 | switchContext(previousContext);
|
4518 | return;
|
4519 | }
|
4520 | }
|
4521 | else {
|
4522 | var childrenLength = segment.children.length,
|
4523 | chunkLength = segment.chunks.length;
|
4524 | try {
|
4525 | return renderNodeDestructive(request, task, node, childIndex);
|
4526 | } catch (thrownValue$40) {
|
4527 | if (
|
4528 | (resetHooksState(),
|
4529 | (segment.children.length = childrenLength),
|
4530 | (segment.chunks.length = chunkLength),
|
4531 | (node =
|
4532 | thrownValue$40 === SuspenseException
|
4533 | ? getSuspendedThenable()
|
4534 | : thrownValue$40),
|
4535 | "object" === typeof node &&
|
4536 | null !== node &&
|
4537 | "function" === typeof node.then)
|
4538 | ) {
|
4539 | childIndex = getThenableStateAfterSuspending();
|
4540 | segment = task.blockedSegment;
|
4541 | childrenLength = createPendingSegment(
|
4542 | request,
|
4543 | segment.chunks.length,
|
4544 | null,
|
4545 | task.formatContext,
|
4546 | segment.lastPushedText,
|
4547 | !0
|
4548 | );
|
4549 | segment.children.push(childrenLength);
|
4550 | segment.lastPushedText = !1;
|
4551 | request = createRenderTask(
|
4552 | request,
|
4553 | childIndex,
|
4554 | task.node,
|
4555 | task.childIndex,
|
4556 | task.blockedBoundary,
|
4557 | childrenLength,
|
4558 | task.hoistableState,
|
4559 | task.abortSet,
|
4560 | task.keyPath,
|
4561 | task.formatContext,
|
4562 | task.legacyContext,
|
4563 | task.context,
|
4564 | task.treeContext,
|
4565 | null !== task.componentStack ? task.componentStack.parent : null,
|
4566 | task.isFallback
|
4567 | ).ping;
|
4568 | node.then(request, request);
|
4569 | task.formatContext = previousFormatContext;
|
4570 | task.legacyContext = previousLegacyContext;
|
4571 | task.context = previousContext;
|
4572 | task.keyPath = previousKeyPath;
|
4573 | task.treeContext = previousTreeContext;
|
4574 | task.componentStack = previousComponentStack;
|
4575 | switchContext(previousContext);
|
4576 | return;
|
4577 | }
|
4578 | }
|
4579 | }
|
4580 | task.formatContext = previousFormatContext;
|
4581 | task.legacyContext = previousLegacyContext;
|
4582 | task.context = previousContext;
|
4583 | task.keyPath = previousKeyPath;
|
4584 | task.treeContext = previousTreeContext;
|
4585 | switchContext(previousContext);
|
4586 | throw node;
|
4587 | }
|
4588 | function abortTaskSoft(task) {
|
4589 | var boundary = task.blockedBoundary;
|
4590 | task = task.blockedSegment;
|
4591 | null !== task && ((task.status = 3), finishedTask(this, boundary, task));
|
4592 | }
|
4593 | function abortRemainingReplayNodes(
|
4594 | request$jscomp$0,
|
4595 | boundary,
|
4596 | nodes,
|
4597 | slots,
|
4598 | error,
|
4599 | errorDigest$jscomp$0
|
4600 | ) {
|
4601 | for (var i = 0; i < nodes.length; i++) {
|
4602 | var node = nodes[i];
|
4603 | if (4 === node.length)
|
4604 | abortRemainingReplayNodes(
|
4605 | request$jscomp$0,
|
4606 | boundary,
|
4607 | node[2],
|
4608 | node[3],
|
4609 | error,
|
4610 | errorDigest$jscomp$0
|
4611 | );
|
4612 | else {
|
4613 | node = node[5];
|
4614 | var request = request$jscomp$0,
|
4615 | errorDigest = errorDigest$jscomp$0,
|
4616 | resumedBoundary = createSuspenseBoundary(request, new Set());
|
4617 | resumedBoundary.parentFlushed = !0;
|
4618 | resumedBoundary.rootSegmentID = node;
|
4619 | resumedBoundary.status = 4;
|
4620 | resumedBoundary.errorDigest = errorDigest;
|
4621 | resumedBoundary.parentFlushed &&
|
4622 | request.clientRenderedBoundaries.push(resumedBoundary);
|
4623 | }
|
4624 | }
|
4625 | nodes.length = 0;
|
4626 | if (null !== slots) {
|
4627 | if (null === boundary)
|
4628 | throw Error(
|
4629 | "We should not have any resumable nodes in the shell. This is a bug in React."
|
4630 | );
|
4631 | 4 !== boundary.status &&
|
4632 | ((boundary.status = 4),
|
4633 | (boundary.errorDigest = errorDigest$jscomp$0),
|
4634 | boundary.parentFlushed &&
|
4635 | request$jscomp$0.clientRenderedBoundaries.push(boundary));
|
4636 | if ("object" === typeof slots) for (var index in slots) delete slots[index];
|
4637 | }
|
4638 | }
|
4639 | function abortTask(task, request, error) {
|
4640 | var boundary = task.blockedBoundary,
|
4641 | segment = task.blockedSegment;
|
4642 | null !== segment && (segment.status = 3);
|
4643 | if (null === boundary) {
|
4644 | if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
|
4645 | task = task.replay;
|
4646 | if (null === task) {
|
4647 | logRecoverableError(request, error, boundary);
|
4648 | fatalError(request, error);
|
4649 | return;
|
4650 | }
|
4651 | task.pendingTasks--;
|
4652 | 0 === task.pendingTasks &&
|
4653 | 0 < task.nodes.length &&
|
4654 | ((boundary = logRecoverableError(request, error, boundary)),
|
4655 | abortRemainingReplayNodes(
|
4656 | request,
|
4657 | null,
|
4658 | task.nodes,
|
4659 | task.slots,
|
4660 | error,
|
4661 | boundary
|
4662 | ));
|
4663 | request.pendingRootTasks--;
|
4664 | 0 === request.pendingRootTasks && completeShell(request);
|
4665 | }
|
4666 | } else
|
4667 | boundary.pendingTasks--,
|
4668 | 4 !== boundary.status &&
|
4669 | ((boundary.status = 4),
|
4670 | (task = getThrownInfo(request, task.componentStack)),
|
4671 | (task = logRecoverableError(request, error, task)),
|
4672 | (boundary.errorDigest = task),
|
4673 | untrackBoundary(request, boundary),
|
4674 | boundary.parentFlushed &&
|
4675 | request.clientRenderedBoundaries.push(boundary)),
|
4676 | boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
|
4677 | return abortTask(fallbackTask, request, error);
|
4678 | }),
|
4679 | boundary.fallbackAbortableTasks.clear();
|
4680 | request.allPendingTasks--;
|
4681 | 0 === request.allPendingTasks && completeAll(request);
|
4682 | }
|
4683 | function safelyEmitEarlyPreloads(request, shellComplete) {
|
4684 | try {
|
4685 | var renderState = request.renderState,
|
4686 | onHeaders = renderState.onHeaders;
|
4687 | if (onHeaders) {
|
4688 | var headers = renderState.headers;
|
4689 | if (headers) {
|
4690 | renderState.headers = null;
|
4691 | var linkHeader = headers.preconnects;
|
4692 | headers.fontPreloads &&
|
4693 | (linkHeader && (linkHeader += ", "),
|
4694 | (linkHeader += headers.fontPreloads));
|
4695 | headers.highImagePreloads &&
|
4696 | (linkHeader && (linkHeader += ", "),
|
4697 | (linkHeader += headers.highImagePreloads));
|
4698 | if (!shellComplete) {
|
4699 | var queueIter = renderState.styles.values(),
|
4700 | queueStep = queueIter.next();
|
4701 | b: for (
|
4702 | ;
|
4703 | 0 < headers.remainingCapacity && !queueStep.done;
|
4704 | queueStep = queueIter.next()
|
4705 | )
|
4706 | for (
|
4707 | var sheetIter = queueStep.value.sheets.values(),
|
4708 | sheetStep = sheetIter.next();
|
4709 | 0 < headers.remainingCapacity && !sheetStep.done;
|
4710 | sheetStep = sheetIter.next()
|
4711 | ) {
|
4712 | var sheet = sheetStep.value,
|
4713 | props = sheet.props,
|
4714 | key = props.href,
|
4715 | props$jscomp$0 = sheet.props,
|
4716 | header = getPreloadAsHeader(props$jscomp$0.href, "style", {
|
4717 | crossOrigin: props$jscomp$0.crossOrigin,
|
4718 | integrity: props$jscomp$0.integrity,
|
4719 | nonce: props$jscomp$0.nonce,
|
4720 | type: props$jscomp$0.type,
|
4721 | fetchPriority: props$jscomp$0.fetchPriority,
|
4722 | referrerPolicy: props$jscomp$0.referrerPolicy,
|
4723 | media: props$jscomp$0.media
|
4724 | });
|
4725 | if (2 <= (headers.remainingCapacity -= header.length))
|
4726 | (renderState.resets.style[key] = PRELOAD_NO_CREDS),
|
4727 | linkHeader && (linkHeader += ", "),
|
4728 | (linkHeader += header),
|
4729 | (renderState.resets.style[key] =
|
4730 | "string" === typeof props.crossOrigin ||
|
4731 | "string" === typeof props.integrity
|
4732 | ? [props.crossOrigin, props.integrity]
|
4733 | : PRELOAD_NO_CREDS);
|
4734 | else break b;
|
4735 | }
|
4736 | }
|
4737 | linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});
|
4738 | }
|
4739 | }
|
4740 | } catch (error) {
|
4741 | logRecoverableError(request, error, {});
|
4742 | }
|
4743 | }
|
4744 | function completeShell(request) {
|
4745 | null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
|
4746 | request.onShellError = noop;
|
4747 | request = request.onShellReady;
|
4748 | request();
|
4749 | }
|
4750 | function completeAll(request) {
|
4751 | safelyEmitEarlyPreloads(
|
4752 | request,
|
4753 | null === request.trackedPostpones
|
4754 | ? !0
|
4755 | : null === request.completedRootSegment ||
|
4756 | 5 !== request.completedRootSegment.status
|
4757 | );
|
4758 | request = request.onAllReady;
|
4759 | request();
|
4760 | }
|
4761 | function queueCompletedSegment(boundary, segment) {
|
4762 | if (
|
4763 | 0 === segment.chunks.length &&
|
4764 | 1 === segment.children.length &&
|
4765 | null === segment.children[0].boundary &&
|
4766 | -1 === segment.children[0].id
|
4767 | ) {
|
4768 | var childSegment = segment.children[0];
|
4769 | childSegment.id = segment.id;
|
4770 | childSegment.parentFlushed = !0;
|
4771 | 1 === childSegment.status && queueCompletedSegment(boundary, childSegment);
|
4772 | } else boundary.completedSegments.push(segment);
|
4773 | }
|
4774 | function finishedTask(request, boundary, segment) {
|
4775 | if (null === boundary) {
|
4776 | if (null !== segment && segment.parentFlushed) {
|
4777 | if (null !== request.completedRootSegment)
|
4778 | throw Error(
|
4779 | "There can only be one root segment. This is a bug in React."
|
4780 | );
|
4781 | request.completedRootSegment = segment;
|
4782 | }
|
4783 | request.pendingRootTasks--;
|
4784 | 0 === request.pendingRootTasks && completeShell(request);
|
4785 | } else
|
4786 | boundary.pendingTasks--,
|
4787 | 4 !== boundary.status &&
|
4788 | (0 === boundary.pendingTasks
|
4789 | ? (0 === boundary.status && (boundary.status = 1),
|
4790 | null !== segment &&
|
4791 | segment.parentFlushed &&
|
4792 | 1 === segment.status &&
|
4793 | queueCompletedSegment(boundary, segment),
|
4794 | boundary.parentFlushed &&
|
4795 | request.completedBoundaries.push(boundary),
|
4796 | 1 === boundary.status &&
|
4797 | (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
|
4798 | boundary.fallbackAbortableTasks.clear()))
|
4799 | : null !== segment &&
|
4800 | segment.parentFlushed &&
|
4801 | 1 === segment.status &&
|
4802 | (queueCompletedSegment(boundary, segment),
|
4803 | 1 === boundary.completedSegments.length &&
|
4804 | boundary.parentFlushed &&
|
4805 | request.partialBoundaries.push(boundary)));
|
4806 | request.allPendingTasks--;
|
4807 | 0 === request.allPendingTasks && completeAll(request);
|
4808 | }
|
4809 | function performWork(request$jscomp$2) {
|
4810 | if (2 !== request$jscomp$2.status) {
|
4811 | var prevContext = currentActiveSnapshot,
|
4812 | prevDispatcher = ReactSharedInternals.H;
|
4813 | ReactSharedInternals.H = HooksDispatcher;
|
4814 | var prevAsyncDispatcher = ReactSharedInternals.A;
|
4815 | ReactSharedInternals.A = DefaultAsyncDispatcher;
|
4816 | var prevRequest = currentRequest;
|
4817 | currentRequest = request$jscomp$2;
|
4818 | var prevResumableState = currentResumableState;
|
4819 | currentResumableState = request$jscomp$2.resumableState;
|
4820 | try {
|
4821 | var pingedTasks = request$jscomp$2.pingedTasks,
|
4822 | i;
|
4823 | for (i = 0; i < pingedTasks.length; i++) {
|
4824 | var task = pingedTasks[i],
|
4825 | request = request$jscomp$2,
|
4826 | segment = task.blockedSegment;
|
4827 | if (null === segment) {
|
4828 | var request$jscomp$0 = request;
|
4829 | if (0 !== task.replay.pendingTasks) {
|
4830 | switchContext(task.context);
|
4831 | try {
|
4832 | renderNodeDestructive(
|
4833 | request$jscomp$0,
|
4834 | task,
|
4835 | task.node,
|
4836 | task.childIndex
|
4837 | );
|
4838 | if (
|
4839 | 1 === task.replay.pendingTasks &&
|
4840 | 0 < task.replay.nodes.length
|
4841 | )
|
4842 | throw Error(
|
4843 | "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
4844 | );
|
4845 | task.replay.pendingTasks--;
|
4846 | task.abortSet.delete(task);
|
4847 | finishedTask(request$jscomp$0, task.blockedBoundary, null);
|
4848 | } catch (thrownValue) {
|
4849 | resetHooksState();
|
4850 | var x =
|
4851 | thrownValue === SuspenseException
|
4852 | ? getSuspendedThenable()
|
4853 | : thrownValue;
|
4854 | if (
|
4855 | "object" === typeof x &&
|
4856 | null !== x &&
|
4857 | "function" === typeof x.then
|
4858 | ) {
|
4859 | var ping = task.ping;
|
4860 | x.then(ping, ping);
|
4861 | task.thenableState = getThenableStateAfterSuspending();
|
4862 | null !== task.componentStack &&
|
4863 | (task.componentStack = task.componentStack.parent);
|
4864 | } else {
|
4865 | task.replay.pendingTasks--;
|
4866 | task.abortSet.delete(task);
|
4867 | var errorInfo = getThrownInfo(
|
4868 | request$jscomp$0,
|
4869 | task.componentStack
|
4870 | );
|
4871 | request = void 0;
|
4872 | var request$jscomp$1 = request$jscomp$0,
|
4873 | boundary = task.blockedBoundary,
|
4874 | error$jscomp$0 = x,
|
4875 | replayNodes = task.replay.nodes,
|
4876 | resumeSlots = task.replay.slots;
|
4877 | request = logRecoverableError(
|
4878 | request$jscomp$1,
|
4879 | error$jscomp$0,
|
4880 | errorInfo
|
4881 | );
|
4882 | abortRemainingReplayNodes(
|
4883 | request$jscomp$1,
|
4884 | boundary,
|
4885 | replayNodes,
|
4886 | resumeSlots,
|
4887 | error$jscomp$0,
|
4888 | request
|
4889 | );
|
4890 | request$jscomp$0.pendingRootTasks--;
|
4891 | 0 === request$jscomp$0.pendingRootTasks &&
|
4892 | completeShell(request$jscomp$0);
|
4893 | request$jscomp$0.allPendingTasks--;
|
4894 | 0 === request$jscomp$0.allPendingTasks &&
|
4895 | completeAll(request$jscomp$0);
|
4896 | }
|
4897 | } finally {
|
4898 | }
|
4899 | }
|
4900 | } else if (
|
4901 | ((request$jscomp$0 = void 0),
|
4902 | (request$jscomp$1 = segment),
|
4903 | 0 === request$jscomp$1.status)
|
4904 | ) {
|
4905 | switchContext(task.context);
|
4906 | var childrenLength = request$jscomp$1.children.length,
|
4907 | chunkLength = request$jscomp$1.chunks.length;
|
4908 | try {
|
4909 | renderNodeDestructive(request, task, task.node, task.childIndex),
|
4910 | request$jscomp$1.lastPushedText &&
|
4911 | request$jscomp$1.textEmbedded &&
|
4912 | request$jscomp$1.chunks.push("\x3c!-- --\x3e"),
|
4913 | task.abortSet.delete(task),
|
4914 | (request$jscomp$1.status = 1),
|
4915 | finishedTask(request, task.blockedBoundary, request$jscomp$1);
|
4916 | } catch (thrownValue) {
|
4917 | resetHooksState();
|
4918 | request$jscomp$1.children.length = childrenLength;
|
4919 | request$jscomp$1.chunks.length = chunkLength;
|
4920 | var x$jscomp$0 =
|
4921 | thrownValue === SuspenseException
|
4922 | ? getSuspendedThenable()
|
4923 | : thrownValue;
|
4924 | if (
|
4925 | "object" === typeof x$jscomp$0 &&
|
4926 | null !== x$jscomp$0 &&
|
4927 | "function" === typeof x$jscomp$0.then
|
4928 | ) {
|
4929 | var ping$jscomp$0 = task.ping;
|
4930 | x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
|
4931 | task.thenableState = getThenableStateAfterSuspending();
|
4932 | null !== task.componentStack &&
|
4933 | (task.componentStack = task.componentStack.parent);
|
4934 | } else {
|
4935 | var errorInfo$jscomp$0 = getThrownInfo(
|
4936 | request,
|
4937 | task.componentStack
|
4938 | );
|
4939 | task.abortSet.delete(task);
|
4940 | request$jscomp$1.status = 4;
|
4941 | var boundary$jscomp$0 = task.blockedBoundary;
|
4942 | request$jscomp$0 = logRecoverableError(
|
4943 | request,
|
4944 | x$jscomp$0,
|
4945 | errorInfo$jscomp$0
|
4946 | );
|
4947 | null === boundary$jscomp$0
|
4948 | ? fatalError(request, x$jscomp$0)
|
4949 | : (boundary$jscomp$0.pendingTasks--,
|
4950 | 4 !== boundary$jscomp$0.status &&
|
4951 | ((boundary$jscomp$0.status = 4),
|
4952 | (boundary$jscomp$0.errorDigest = request$jscomp$0),
|
4953 | untrackBoundary(request, boundary$jscomp$0),
|
4954 | boundary$jscomp$0.parentFlushed &&
|
4955 | request.clientRenderedBoundaries.push(
|
4956 | boundary$jscomp$0
|
4957 | )));
|
4958 | request.allPendingTasks--;
|
4959 | 0 === request.allPendingTasks && completeAll(request);
|
4960 | }
|
4961 | } finally {
|
4962 | }
|
4963 | }
|
4964 | }
|
4965 | pingedTasks.splice(0, i);
|
4966 | null !== request$jscomp$2.destination &&
|
4967 | flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
|
4968 | } catch (error) {
|
4969 | logRecoverableError(request$jscomp$2, error, {}),
|
4970 | fatalError(request$jscomp$2, error);
|
4971 | } finally {
|
4972 | (currentResumableState = prevResumableState),
|
4973 | (ReactSharedInternals.H = prevDispatcher),
|
4974 | (ReactSharedInternals.A = prevAsyncDispatcher),
|
4975 | prevDispatcher === HooksDispatcher && switchContext(prevContext),
|
4976 | (currentRequest = prevRequest);
|
4977 | }
|
4978 | }
|
4979 | }
|
4980 | function flushSubtree(request, destination, segment, hoistableState) {
|
4981 | segment.parentFlushed = !0;
|
4982 | switch (segment.status) {
|
4983 | case 0:
|
4984 | segment.id = request.nextSegmentId++;
|
4985 | case 5:
|
4986 | return (
|
4987 | (hoistableState = segment.id),
|
4988 | (segment.lastPushedText = !1),
|
4989 | (segment.textEmbedded = !1),
|
4990 | (request = request.renderState),
|
4991 | writeChunk(destination, '<template id="'),
|
4992 | writeChunk(destination, request.placeholderPrefix),
|
4993 | (request = hoistableState.toString(16)),
|
4994 | writeChunk(destination, request),
|
4995 | !!destination.write('"></template>')
|
4996 | );
|
4997 | case 1:
|
4998 | segment.status = 2;
|
4999 | var r = !0,
|
5000 | chunks = segment.chunks,
|
5001 | chunkIdx = 0;
|
5002 | segment = segment.children;
|
5003 | for (var childIdx = 0; childIdx < segment.length; childIdx++) {
|
5004 | for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)
|
5005 | writeChunk(destination, chunks[chunkIdx]);
|
5006 | r = flushSegment(request, destination, r, hoistableState);
|
5007 | }
|
5008 | for (; chunkIdx < chunks.length - 1; chunkIdx++)
|
5009 | writeChunk(destination, chunks[chunkIdx]);
|
5010 | chunkIdx < chunks.length && (r = !!destination.write(chunks[chunkIdx]));
|
5011 | return r;
|
5012 | default:
|
5013 | throw Error(
|
5014 | "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
|
5015 | );
|
5016 | }
|
5017 | }
|
5018 | function flushSegment(request, destination, segment, hoistableState) {
|
5019 | var boundary = segment.boundary;
|
5020 | if (null === boundary)
|
5021 | return flushSubtree(request, destination, segment, hoistableState);
|
5022 | boundary.parentFlushed = !0;
|
5023 | if (4 === boundary.status)
|
5024 | (boundary = boundary.errorDigest),
|
5025 | destination.write("\x3c!--$!--\x3e"),
|
5026 | writeChunk(destination, "<template"),
|
5027 | boundary &&
|
5028 | (writeChunk(destination, ' data-dgst="'),
|
5029 | writeChunk(destination, escapeTextForBrowser(boundary)),
|
5030 | writeChunk(destination, '"')),
|
5031 | destination.write("></template>"),
|
5032 | flushSubtree(request, destination, segment, hoistableState);
|
5033 | else if (1 !== boundary.status)
|
5034 | 0 === boundary.status && (boundary.rootSegmentID = request.nextSegmentId++),
|
5035 | 0 < boundary.completedSegments.length &&
|
5036 | request.partialBoundaries.push(boundary),
|
5037 | writeStartPendingSuspenseBoundary(
|
5038 | destination,
|
5039 | request.renderState,
|
5040 | boundary.rootSegmentID
|
5041 | ),
|
5042 | hoistableState &&
|
5043 | ((boundary = boundary.fallbackState),
|
5044 | boundary.styles.forEach(hoistStyleQueueDependency, hoistableState),
|
5045 | boundary.stylesheets.forEach(
|
5046 | hoistStylesheetDependency,
|
5047 | hoistableState
|
5048 | )),
|
5049 | flushSubtree(request, destination, segment, hoistableState);
|
5050 | else if (boundary.byteSize > request.progressiveChunkSize)
|
5051 | (boundary.rootSegmentID = request.nextSegmentId++),
|
5052 | request.completedBoundaries.push(boundary),
|
5053 | writeStartPendingSuspenseBoundary(
|
5054 | destination,
|
5055 | request.renderState,
|
5056 | boundary.rootSegmentID
|
5057 | ),
|
5058 | flushSubtree(request, destination, segment, hoistableState);
|
5059 | else {
|
5060 | hoistableState &&
|
5061 | ((segment = boundary.contentState),
|
5062 | segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
|
5063 | segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
|
5064 | destination.write("\x3c!--$--\x3e");
|
5065 | segment = boundary.completedSegments;
|
5066 | if (1 !== segment.length)
|
5067 | throw Error(
|
5068 | "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
|
5069 | );
|
5070 | flushSegment(request, destination, segment[0], hoistableState);
|
5071 | }
|
5072 | return !!destination.write("\x3c!--/$--\x3e");
|
5073 | }
|
5074 | function flushSegmentContainer(request, destination, segment, hoistableState) {
|
5075 | writeStartSegment(
|
5076 | destination,
|
5077 | request.renderState,
|
5078 | segment.parentFormatContext,
|
5079 | segment.id
|
5080 | );
|
5081 | flushSegment(request, destination, segment, hoistableState);
|
5082 | return writeEndSegment(destination, segment.parentFormatContext);
|
5083 | }
|
5084 | function flushCompletedBoundary(request, destination, boundary) {
|
5085 | for (
|
5086 | var completedSegments = boundary.completedSegments, i = 0;
|
5087 | i < completedSegments.length;
|
5088 | i++
|
5089 | )
|
5090 | flushPartiallyCompletedSegment(
|
5091 | request,
|
5092 | destination,
|
5093 | boundary,
|
5094 | completedSegments[i]
|
5095 | );
|
5096 | completedSegments.length = 0;
|
5097 | writeHoistablesForBoundary(
|
5098 | destination,
|
5099 | boundary.contentState,
|
5100 | request.renderState
|
5101 | );
|
5102 | completedSegments = request.resumableState;
|
5103 | request = request.renderState;
|
5104 | i = boundary.rootSegmentID;
|
5105 | boundary = boundary.contentState;
|
5106 | var requiresStyleInsertion = request.stylesToHoist;
|
5107 | request.stylesToHoist = !1;
|
5108 | writeChunk(destination, request.startInlineScript);
|
5109 | requiresStyleInsertion
|
5110 | ? 0 === (completedSegments.instructions & 2)
|
5111 | ? ((completedSegments.instructions |= 10),
|
5112 | writeChunk(
|
5113 | destination,
|
5114 | '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
|
5115 | ))
|
5116 | : 0 === (completedSegments.instructions & 8)
|
5117 | ? ((completedSegments.instructions |= 8),
|
5118 | writeChunk(
|
5119 | destination,
|
5120 | '$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
|
5121 | ))
|
5122 | : writeChunk(destination, '$RR("')
|
5123 | : 0 === (completedSegments.instructions & 2)
|
5124 | ? ((completedSegments.instructions |= 2),
|
5125 | writeChunk(
|
5126 | destination,
|
5127 | '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'
|
5128 | ))
|
5129 | : writeChunk(destination, '$RC("');
|
5130 | completedSegments = i.toString(16);
|
5131 | writeChunk(destination, request.boundaryPrefix);
|
5132 | writeChunk(destination, completedSegments);
|
5133 | writeChunk(destination, '","');
|
5134 | writeChunk(destination, request.segmentPrefix);
|
5135 | writeChunk(destination, completedSegments);
|
5136 | requiresStyleInsertion
|
5137 | ? (writeChunk(destination, '",'),
|
5138 | writeStyleResourceDependenciesInJS(destination, boundary))
|
5139 | : writeChunk(destination, '"');
|
5140 | boundary = !!destination.write(")\x3c/script>");
|
5141 | return writeBootstrap(destination, request) && boundary;
|
5142 | }
|
5143 | function flushPartiallyCompletedSegment(
|
5144 | request,
|
5145 | destination,
|
5146 | boundary,
|
5147 | segment
|
5148 | ) {
|
5149 | if (2 === segment.status) return !0;
|
5150 | var hoistableState = boundary.contentState,
|
5151 | segmentID = segment.id;
|
5152 | if (-1 === segmentID) {
|
5153 | if (-1 === (segment.id = boundary.rootSegmentID))
|
5154 | throw Error(
|
5155 | "A root segment ID must have been assigned by now. This is a bug in React."
|
5156 | );
|
5157 | return flushSegmentContainer(request, destination, segment, hoistableState);
|
5158 | }
|
5159 | if (segmentID === boundary.rootSegmentID)
|
5160 | return flushSegmentContainer(request, destination, segment, hoistableState);
|
5161 | flushSegmentContainer(request, destination, segment, hoistableState);
|
5162 | boundary = request.resumableState;
|
5163 | request = request.renderState;
|
5164 | writeChunk(destination, request.startInlineScript);
|
5165 | 0 === (boundary.instructions & 1)
|
5166 | ? ((boundary.instructions |= 1),
|
5167 | writeChunk(
|
5168 | destination,
|
5169 | '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'
|
5170 | ))
|
5171 | : writeChunk(destination, '$RS("');
|
5172 | writeChunk(destination, request.segmentPrefix);
|
5173 | segmentID = segmentID.toString(16);
|
5174 | writeChunk(destination, segmentID);
|
5175 | writeChunk(destination, '","');
|
5176 | writeChunk(destination, request.placeholderPrefix);
|
5177 | writeChunk(destination, segmentID);
|
5178 | destination = !!destination.write('")\x3c/script>');
|
5179 | return destination;
|
5180 | }
|
5181 | function flushCompletedQueues(request, destination) {
|
5182 | try {
|
5183 | if (!(0 < request.pendingRootTasks)) {
|
5184 | var i,
|
5185 | completedRootSegment = request.completedRootSegment;
|
5186 | if (null !== completedRootSegment) {
|
5187 | if (5 === completedRootSegment.status) return;
|
5188 | var renderState = request.renderState,
|
5189 | htmlChunks = renderState.htmlChunks,
|
5190 | headChunks = renderState.headChunks,
|
5191 | i$jscomp$0;
|
5192 | if (htmlChunks) {
|
5193 | for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
|
5194 | writeChunk(destination, htmlChunks[i$jscomp$0]);
|
5195 | if (headChunks)
|
5196 | for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
|
5197 | writeChunk(destination, headChunks[i$jscomp$0]);
|
5198 | else
|
5199 | writeChunk(destination, startChunkForTag("head")),
|
5200 | writeChunk(destination, ">");
|
5201 | } else if (headChunks)
|
5202 | for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
|
5203 | writeChunk(destination, headChunks[i$jscomp$0]);
|
5204 | var charsetChunks = renderState.charsetChunks;
|
5205 | for (i$jscomp$0 = 0; i$jscomp$0 < charsetChunks.length; i$jscomp$0++)
|
5206 | writeChunk(destination, charsetChunks[i$jscomp$0]);
|
5207 | charsetChunks.length = 0;
|
5208 | renderState.preconnects.forEach(flushResource, destination);
|
5209 | renderState.preconnects.clear();
|
5210 | var viewportChunks = renderState.viewportChunks;
|
5211 | for (i$jscomp$0 = 0; i$jscomp$0 < viewportChunks.length; i$jscomp$0++)
|
5212 | writeChunk(destination, viewportChunks[i$jscomp$0]);
|
5213 | viewportChunks.length = 0;
|
5214 | renderState.fontPreloads.forEach(flushResource, destination);
|
5215 | renderState.fontPreloads.clear();
|
5216 | renderState.highImagePreloads.forEach(flushResource, destination);
|
5217 | renderState.highImagePreloads.clear();
|
5218 | renderState.styles.forEach(flushStylesInPreamble, destination);
|
5219 | var importMapChunks = renderState.importMapChunks;
|
5220 | for (i$jscomp$0 = 0; i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
|
5221 | writeChunk(destination, importMapChunks[i$jscomp$0]);
|
5222 | importMapChunks.length = 0;
|
5223 | renderState.bootstrapScripts.forEach(flushResource, destination);
|
5224 | renderState.scripts.forEach(flushResource, destination);
|
5225 | renderState.scripts.clear();
|
5226 | renderState.bulkPreloads.forEach(flushResource, destination);
|
5227 | renderState.bulkPreloads.clear();
|
5228 | var hoistableChunks = renderState.hoistableChunks;
|
5229 | for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
|
5230 | writeChunk(destination, hoistableChunks[i$jscomp$0]);
|
5231 | hoistableChunks.length = 0;
|
5232 | htmlChunks &&
|
5233 | null === headChunks &&
|
5234 | writeChunk(destination, endChunkForTag("head"));
|
5235 | flushSegment(request, destination, completedRootSegment, null);
|
5236 | request.completedRootSegment = null;
|
5237 | writeBootstrap(destination, request.renderState);
|
5238 | }
|
5239 | var renderState$jscomp$0 = request.renderState;
|
5240 | completedRootSegment = 0;
|
5241 | var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
|
5242 | for (
|
5243 | completedRootSegment = 0;
|
5244 | completedRootSegment < viewportChunks$jscomp$0.length;
|
5245 | completedRootSegment++
|
5246 | )
|
5247 | writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
|
5248 | viewportChunks$jscomp$0.length = 0;
|
5249 | renderState$jscomp$0.preconnects.forEach(flushResource, destination);
|
5250 | renderState$jscomp$0.preconnects.clear();
|
5251 | renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
|
5252 | renderState$jscomp$0.fontPreloads.clear();
|
5253 | renderState$jscomp$0.highImagePreloads.forEach(
|
5254 | flushResource,
|
5255 | destination
|
5256 | );
|
5257 | renderState$jscomp$0.highImagePreloads.clear();
|
5258 | renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
|
5259 | renderState$jscomp$0.scripts.forEach(flushResource, destination);
|
5260 | renderState$jscomp$0.scripts.clear();
|
5261 | renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
|
5262 | renderState$jscomp$0.bulkPreloads.clear();
|
5263 | var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
|
5264 | for (
|
5265 | completedRootSegment = 0;
|
5266 | completedRootSegment < hoistableChunks$jscomp$0.length;
|
5267 | completedRootSegment++
|
5268 | )
|
5269 | writeChunk(destination, hoistableChunks$jscomp$0[completedRootSegment]);
|
5270 | hoistableChunks$jscomp$0.length = 0;
|
5271 | var clientRenderedBoundaries = request.clientRenderedBoundaries;
|
5272 | for (i = 0; i < clientRenderedBoundaries.length; i++) {
|
5273 | var boundary = clientRenderedBoundaries[i];
|
5274 | renderState$jscomp$0 = destination;
|
5275 | var resumableState = request.resumableState,
|
5276 | renderState$jscomp$1 = request.renderState,
|
5277 | id = boundary.rootSegmentID,
|
5278 | errorDigest = boundary.errorDigest;
|
5279 | writeChunk(
|
5280 | renderState$jscomp$0,
|
5281 | renderState$jscomp$1.startInlineScript
|
5282 | );
|
5283 | 0 === (resumableState.instructions & 4)
|
5284 | ? ((resumableState.instructions |= 4),
|
5285 | writeChunk(
|
5286 | renderState$jscomp$0,
|
5287 | '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'
|
5288 | ))
|
5289 | : writeChunk(renderState$jscomp$0, '$RX("');
|
5290 | writeChunk(renderState$jscomp$0, renderState$jscomp$1.boundaryPrefix);
|
5291 | writeChunk(renderState$jscomp$0, id.toString(16));
|
5292 | writeChunk(renderState$jscomp$0, '"');
|
5293 | errorDigest &&
|
5294 | (writeChunk(renderState$jscomp$0, ","),
|
5295 | writeChunk(
|
5296 | renderState$jscomp$0,
|
5297 | escapeJSStringsForInstructionScripts(errorDigest || "")
|
5298 | ));
|
5299 | var JSCompiler_inline_result =
|
5300 | !!renderState$jscomp$0.write(")\x3c/script>");
|
5301 | if (!JSCompiler_inline_result) {
|
5302 | request.destination = null;
|
5303 | i++;
|
5304 | clientRenderedBoundaries.splice(0, i);
|
5305 | return;
|
5306 | }
|
5307 | }
|
5308 | clientRenderedBoundaries.splice(0, i);
|
5309 | var completedBoundaries = request.completedBoundaries;
|
5310 | for (i = 0; i < completedBoundaries.length; i++)
|
5311 | if (
|
5312 | !flushCompletedBoundary(request, destination, completedBoundaries[i])
|
5313 | ) {
|
5314 | request.destination = null;
|
5315 | i++;
|
5316 | completedBoundaries.splice(0, i);
|
5317 | return;
|
5318 | }
|
5319 | completedBoundaries.splice(0, i);
|
5320 | var partialBoundaries = request.partialBoundaries;
|
5321 | for (i = 0; i < partialBoundaries.length; i++) {
|
5322 | var boundary$44 = partialBoundaries[i];
|
5323 | a: {
|
5324 | clientRenderedBoundaries = request;
|
5325 | boundary = destination;
|
5326 | var completedSegments = boundary$44.completedSegments;
|
5327 | for (
|
5328 | JSCompiler_inline_result = 0;
|
5329 | JSCompiler_inline_result < completedSegments.length;
|
5330 | JSCompiler_inline_result++
|
5331 | )
|
5332 | if (
|
5333 | !flushPartiallyCompletedSegment(
|
5334 | clientRenderedBoundaries,
|
5335 | boundary,
|
5336 | boundary$44,
|
5337 | completedSegments[JSCompiler_inline_result]
|
5338 | )
|
5339 | ) {
|
5340 | JSCompiler_inline_result++;
|
5341 | completedSegments.splice(0, JSCompiler_inline_result);
|
5342 | var JSCompiler_inline_result$jscomp$0 = !1;
|
5343 | break a;
|
5344 | }
|
5345 | completedSegments.splice(0, JSCompiler_inline_result);
|
5346 | JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
|
5347 | boundary,
|
5348 | boundary$44.contentState,
|
5349 | clientRenderedBoundaries.renderState
|
5350 | );
|
5351 | }
|
5352 | if (!JSCompiler_inline_result$jscomp$0) {
|
5353 | request.destination = null;
|
5354 | i++;
|
5355 | partialBoundaries.splice(0, i);
|
5356 | return;
|
5357 | }
|
5358 | }
|
5359 | partialBoundaries.splice(0, i);
|
5360 | var largeBoundaries = request.completedBoundaries;
|
5361 | for (i = 0; i < largeBoundaries.length; i++)
|
5362 | if (!flushCompletedBoundary(request, destination, largeBoundaries[i])) {
|
5363 | request.destination = null;
|
5364 | i++;
|
5365 | largeBoundaries.splice(0, i);
|
5366 | return;
|
5367 | }
|
5368 | largeBoundaries.splice(0, i);
|
5369 | }
|
5370 | } finally {
|
5371 | 0 === request.allPendingTasks &&
|
5372 | 0 === request.pingedTasks.length &&
|
5373 | 0 === request.clientRenderedBoundaries.length &&
|
5374 | 0 === request.completedBoundaries.length
|
5375 | ? ((request.flushScheduled = !1),
|
5376 | (i = request.resumableState),
|
5377 | i.hasBody && writeChunk(destination, endChunkForTag("body")),
|
5378 | i.hasHtml && writeChunk(destination, endChunkForTag("html")),
|
5379 | flushBuffered(destination),
|
5380 | destination.end(),
|
5381 | (request.destination = null))
|
5382 | : flushBuffered(destination);
|
5383 | }
|
5384 | }
|
5385 | function enqueueFlush(request) {
|
5386 | if (
|
5387 | !1 === request.flushScheduled &&
|
5388 | 0 === request.pingedTasks.length &&
|
5389 | null !== request.destination
|
5390 | ) {
|
5391 | request.flushScheduled = !0;
|
5392 | var destination = request.destination;
|
5393 | destination
|
5394 | ? flushCompletedQueues(request, destination)
|
5395 | : (request.flushScheduled = !1);
|
5396 | }
|
5397 | }
|
5398 | function abort(request, reason) {
|
5399 | try {
|
5400 | var abortableTasks = request.abortableTasks;
|
5401 | if (0 < abortableTasks.size) {
|
5402 | var error =
|
5403 | void 0 === reason
|
5404 | ? Error("The render was aborted by the server without a reason.")
|
5405 | : reason;
|
5406 | abortableTasks.forEach(function (task) {
|
5407 | return abortTask(task, request, error);
|
5408 | });
|
5409 | abortableTasks.clear();
|
5410 | }
|
5411 | null !== request.destination &&
|
5412 | flushCompletedQueues(request, request.destination);
|
5413 | } catch (error$46) {
|
5414 | logRecoverableError(request, error$46, {}), fatalError(request, error$46);
|
5415 | }
|
5416 | }
|
5417 | exports.renderToReadableStream = function (children, options) {
|
5418 | return new Promise(function (resolve, reject) {
|
5419 | var onFatalError,
|
5420 | onAllReady,
|
5421 | allReady = new Promise(function (res, rej) {
|
5422 | onAllReady = res;
|
5423 | onFatalError = rej;
|
5424 | }),
|
5425 | onHeaders = options ? options.onHeaders : void 0,
|
5426 | onHeadersImpl;
|
5427 | onHeaders &&
|
5428 | (onHeadersImpl = function (headersDescriptor) {
|
5429 | onHeaders(new Headers(headersDescriptor));
|
5430 | });
|
5431 | var resumableState = createResumableState(
|
5432 | options ? options.identifierPrefix : void 0,
|
5433 | options ? options.unstable_externalRuntimeSrc : void 0,
|
5434 | options ? options.bootstrapScriptContent : void 0,
|
5435 | options ? options.bootstrapScripts : void 0,
|
5436 | options ? options.bootstrapModules : void 0
|
5437 | ),
|
5438 | request = createRequest(
|
5439 | children,
|
5440 | resumableState,
|
5441 | createRenderState(
|
5442 | resumableState,
|
5443 | options ? options.nonce : void 0,
|
5444 | options ? options.unstable_externalRuntimeSrc : void 0,
|
5445 | options ? options.importMap : void 0,
|
5446 | onHeadersImpl,
|
5447 | options ? options.maxHeadersLength : void 0
|
5448 | ),
|
5449 | createRootFormatContext(options ? options.namespaceURI : void 0),
|
5450 | options ? options.progressiveChunkSize : void 0,
|
5451 | options ? options.onError : void 0,
|
5452 | onAllReady,
|
5453 | function () {
|
5454 | var stream = new ReadableStream(
|
5455 | {
|
5456 | type: "direct",
|
5457 | pull: function (controller) {
|
5458 | if (1 === request.status)
|
5459 | (request.status = 2),
|
5460 | closeWithError(controller, request.fatalError);
|
5461 | else if (2 !== request.status && null === request.destination) {
|
5462 | request.destination = controller;
|
5463 | try {
|
5464 | flushCompletedQueues(request, controller);
|
5465 | } catch (error) {
|
5466 | logRecoverableError(request, error, {}),
|
5467 | fatalError(request, error);
|
5468 | }
|
5469 | }
|
5470 | },
|
5471 | cancel: function (reason) {
|
5472 | request.destination = null;
|
5473 | abort(request, reason);
|
5474 | }
|
5475 | },
|
5476 | { highWaterMark: 2048 }
|
5477 | );
|
5478 | stream.allReady = allReady;
|
5479 | resolve(stream);
|
5480 | },
|
5481 | function (error) {
|
5482 | allReady.catch(function () {});
|
5483 | reject(error);
|
5484 | },
|
5485 | onFatalError,
|
5486 | options ? options.onPostpone : void 0,
|
5487 | options ? options.formState : void 0
|
5488 | );
|
5489 | if (options && options.signal) {
|
5490 | var signal = options.signal;
|
5491 | if (signal.aborted) abort(request, signal.reason);
|
5492 | else {
|
5493 | var listener = function () {
|
5494 | abort(request, signal.reason);
|
5495 | signal.removeEventListener("abort", listener);
|
5496 | };
|
5497 | signal.addEventListener("abort", listener);
|
5498 | }
|
5499 | }
|
5500 | request.flushScheduled = null !== request.destination;
|
5501 | performWork(request);
|
5502 | null === request.trackedPostpones &&
|
5503 | safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
|
5504 | });
|
5505 | };
|
5506 | exports.version = "19.0.0-beta-4508873393-20240430";
|