openplanr 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/cli/commands/init-deterministic.d.ts.map +1 -1
- package/dist/cli/commands/init-deterministic.js +49 -6
- package/dist/cli/commands/init-deterministic.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +4 -2
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +2 -2
- package/dist/dashboard/assets/{index-Bk8DyO_2.css → index-BU5fzjyz.css} +1 -1
- package/dist/dashboard/assets/index-G7ygVDGg.js +572 -0
- package/dist/dashboard/assets/index-G7ygVDGg.js.map +1 -0
- package/dist/dashboard/dashboard-manifest.json +14 -14
- package/dist/dashboard/index.html +2 -2
- package/dist/models/types.d.ts +0 -46
- package/dist/models/types.d.ts.map +1 -1
- package/dist/services/capability-map-service.d.ts +4 -0
- package/dist/services/capability-map-service.d.ts.map +1 -1
- package/dist/services/capability-map-service.js +7 -1
- package/dist/services/capability-map-service.js.map +1 -1
- package/dist/services/claude-plugin-service.d.ts +15 -1
- package/dist/services/claude-plugin-service.d.ts.map +1 -1
- package/dist/services/claude-plugin-service.js +66 -15
- package/dist/services/claude-plugin-service.js.map +1 -1
- package/dist/services/config-service.d.ts +24 -1
- package/dist/services/config-service.d.ts.map +1 -1
- package/dist/services/config-service.js +69 -2
- package/dist/services/config-service.js.map +1 -1
- package/dist/services/git-service.d.ts +5 -0
- package/dist/services/git-service.d.ts.map +1 -1
- package/dist/services/git-service.js +27 -0
- package/dist/services/git-service.js.map +1 -1
- package/dist/services/linear-pull-service.d.ts.map +1 -1
- package/dist/services/linear-pull-service.js +1 -2
- package/dist/services/linear-pull-service.js.map +1 -1
- package/dist/services/pipeline-package-service.d.ts +2 -0
- package/dist/services/pipeline-package-service.d.ts.map +1 -1
- package/dist/services/pipeline-package-service.js +2 -1
- package/dist/services/pipeline-package-service.js.map +1 -1
- package/dist/services/runtime-change-summary.d.ts.map +1 -1
- package/dist/services/runtime-change-summary.js +4 -0
- package/dist/services/runtime-change-summary.js.map +1 -1
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +14 -3
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/dist/services/spec-service.d.ts.map +1 -1
- package/dist/services/spec-service.js +11 -22
- package/dist/services/spec-service.js.map +1 -1
- package/dist/services/upgrade-report.d.ts.map +1 -1
- package/dist/services/upgrade-report.js +5 -2
- package/dist/services/upgrade-report.js.map +1 -1
- package/dist/services/upgrade-service.d.ts +14 -0
- package/dist/services/upgrade-service.d.ts.map +1 -1
- package/dist/services/upgrade-service.js +69 -11
- package/dist/services/upgrade-service.js.map +1 -1
- package/dist/templates/rules/shared/capability-map.md.hbs +2 -2
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +89 -29
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +1 -1
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +70 -38
- package/lib/host-packages/claude/openplanr/CONNECTORS.md +62 -0
- package/lib/host-packages/claude/openplanr/README.md +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs +259 -36
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +54 -54
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +259 -36
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +3 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +43 -24
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +279 -58
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +50 -42
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +282 -146
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +949 -316
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +143 -87
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +930 -183
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +17 -15
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +375 -191
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +140 -105
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +146 -54
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +25 -25
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +8 -4
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +259 -36
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +8 -4
- package/lib/host-packages/claude/openplanr/skills/connect/SKILL.md +60 -0
- package/lib/host-packages/claude/openplanr/skills/connect/references/connectors.md +62 -0
- package/lib/host-packages/claude/openplanr/skills/openplanr/SKILL.md +4 -0
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +4 -1
- package/lib/host-packages/claude/openplanr/skills/plan/scripts/planning-ids.mjs +49 -3
- package/lib/host-packages/claude/openplanr/skills/share/SKILL.md +87 -0
- package/lib/host-packages/claude/openplanr/skills/share/references/connectors.md +62 -0
- package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +6 -3
- package/lib/host-packages/claude/openplanr/skills/ship/scripts/discover-verification.mjs +2 -1
- package/lib/host-packages/claude/openplanr/skills/sprint/SKILL.md +15 -6
- package/lib/host-packages/claude/openplanr/skills/sprint/references/connectors.md +62 -0
- package/lib/host-packages/claude/openplanr/skills/sprint/references/tracker-connections.md +9 -13
- package/lib/host-packages/claude/openplanr/skills/status/SKILL.md +14 -3
- package/lib/host-packages/claude/openplanr/skills/status/references/connectors.md +62 -0
- package/lib/host-packages/claude/openplanr/skills/status/references/tracker-connections.md +9 -13
- package/lib/host-packages/claude/openplanr/skills/sync/SKILL.md +25 -10
- package/lib/host-packages/claude/openplanr/skills/sync/references/connectors.md +62 -0
- package/lib/host-packages/claude/openplanr/skills/sync/references/tracker-connections.md +9 -13
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +69 -37
- package/lib/host-packages/cursor/openplanr/CONNECTORS.md +62 -0
- package/lib/host-packages/cursor/openplanr/manifest.json +4 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-connect/references/connectors.md +62 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-connect.mdc +58 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-openplanr.mdc +4 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/planning-ids.mjs +49 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +4 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-share/references/connectors.md +62 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-share.mdc +85 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/scripts/discover-verification.mjs +2 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +6 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint/references/connectors.md +62 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint/references/tracker-connections.md +9 -13
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint.mdc +15 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-status/references/connectors.md +62 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-status/references/tracker-connections.md +9 -13
- package/lib/host-packages/cursor/openplanr/rules/planr-status.mdc +14 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-sync/references/connectors.md +62 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-sync/references/tracker-connections.md +9 -13
- package/lib/host-packages/cursor/openplanr/rules/planr-sync.mdc +25 -10
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs +259 -36
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +54 -54
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +259 -36
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +3 -3
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +43 -24
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +279 -58
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +50 -42
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +282 -146
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +949 -316
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +143 -87
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +930 -183
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +17 -15
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +375 -191
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +140 -105
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +146 -54
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +25 -25
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +8 -4
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +259 -36
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +8 -4
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +88 -40
- package/lib/host-packages/openai/openplanr/CONNECTORS.md +62 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs +259 -36
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +54 -54
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +259 -36
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +3 -3
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +43 -24
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +279 -58
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +50 -42
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +282 -146
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +949 -316
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +143 -87
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +930 -183
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +17 -15
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +375 -191
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +140 -105
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +146 -54
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +25 -25
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +8 -4
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +259 -36
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +8 -4
- package/lib/host-packages/openai/openplanr/skills/connect/SKILL.md +59 -0
- package/lib/host-packages/openai/openplanr/skills/connect/agents/openai.yaml +6 -0
- package/lib/host-packages/openai/openplanr/skills/connect/openplanr.skill.json +37 -0
- package/lib/host-packages/openai/openplanr/skills/connect/references/connectors.md +62 -0
- package/lib/host-packages/openai/openplanr/skills/openplanr/SKILL.md +4 -0
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +4 -1
- package/lib/host-packages/openai/openplanr/skills/plan/scripts/planning-ids.mjs +49 -3
- package/lib/host-packages/openai/openplanr/skills/share/SKILL.md +86 -0
- package/lib/host-packages/openai/openplanr/skills/share/agents/openai.yaml +6 -0
- package/lib/host-packages/openai/openplanr/skills/share/openplanr.skill.json +37 -0
- package/lib/host-packages/openai/openplanr/skills/share/references/connectors.md +62 -0
- package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +6 -3
- package/lib/host-packages/openai/openplanr/skills/ship/scripts/discover-verification.mjs +2 -1
- package/lib/host-packages/openai/openplanr/skills/sprint/SKILL.md +15 -6
- package/lib/host-packages/openai/openplanr/skills/sprint/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/sprint/references/connectors.md +62 -0
- package/lib/host-packages/openai/openplanr/skills/sprint/references/tracker-connections.md +9 -13
- package/lib/host-packages/openai/openplanr/skills/status/SKILL.md +14 -3
- package/lib/host-packages/openai/openplanr/skills/status/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/status/references/connectors.md +62 -0
- package/lib/host-packages/openai/openplanr/skills/status/references/tracker-connections.md +9 -13
- package/lib/host-packages/openai/openplanr/skills/sync/SKILL.md +25 -10
- package/lib/host-packages/openai/openplanr/skills/sync/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/sync/references/connectors.md +62 -0
- package/lib/host-packages/openai/openplanr/skills/sync/references/tracker-connections.md +9 -13
- package/lib/json-schema.mjs +313 -36
- package/lib/schemas/v1.0.0/spec.schema.json +120 -0
- package/lib/schemas/v1.0.0/story.schema.json +95 -0
- package/lib/schemas/v1.0.0/task.schema.json +171 -0
- package/lib/schemas/v1.7.0/spec.schema.json +117 -0
- package/lib/schemas/v1.7.0/story.schema.json +107 -0
- package/lib/schemas/v1.7.0/task.schema.json +217 -0
- package/package.json +32 -32
- package/dist/dashboard/assets/index-Csby7_ur.js +0 -557
- package/dist/dashboard/assets/index-Csby7_ur.js.map +0 -1
- package/dist/services/audit-log-service.d.ts +0 -47
- package/dist/services/audit-log-service.d.ts.map +0 -1
- package/dist/services/audit-log-service.js +0 -211
- package/dist/services/audit-log-service.js.map +0 -1
- package/dist/services/delta-apply-service.d.ts +0 -16
- package/dist/services/delta-apply-service.d.ts.map +0 -1
- package/dist/services/delta-apply-service.js +0 -74
- package/dist/services/delta-apply-service.js.map +0 -1
- package/dist/services/evidence-verifier.d.ts +0 -71
- package/dist/services/evidence-verifier.d.ts.map +0 -1
- package/dist/services/evidence-verifier.js +0 -174
- package/dist/services/evidence-verifier.js.map +0 -1
- package/dist/services/revise-apply-service.d.ts +0 -55
- package/dist/services/revise-apply-service.d.ts.map +0 -1
- package/dist/services/revise-apply-service.js +0 -265
- package/dist/services/revise-apply-service.js.map +0 -1
- package/dist/services/revise-cache-service.d.ts +0 -46
- package/dist/services/revise-cache-service.d.ts.map +0 -1
- package/dist/services/revise-cache-service.js +0 -89
- package/dist/services/revise-cache-service.js.map +0 -1
- package/dist/services/revise-plan-service.d.ts +0 -38
- package/dist/services/revise-plan-service.d.ts.map +0 -1
- package/dist/services/revise-plan-service.js +0 -153
- package/dist/services/revise-plan-service.js.map +0 -1
- /package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-runtime-support-336900df0d39.mjs → design-runtime-support-e34c388a8e59.mjs} +0 -0
- /package/lib/host-packages/cursor/openplanr/runtime/design/scripts/{design-runtime-support-336900df0d39.mjs → design-runtime-support-e34c388a8e59.mjs} +0 -0
- /package/lib/host-packages/openai/openplanr/runtime/design/scripts/{design-runtime-support-336900df0d39.mjs → design-runtime-support-e34c388a8e59.mjs} +0 -0
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
function coerceFormActionProp(actionProp) {
|
|
3
|
-
return null == actionProp || "symbol" === typeof actionProp || "boolean" === typeof actionProp ? null : "function" === typeof actionProp ? actionProp : sanitizeURL(
|
|
4
|
-
}
|
|
5
|
-
function createFormDataWithSubmitter(form, submitter) {
|
|
6
|
-
var temp = submitter.ownerDocument.createElement("input");
|
|
7
|
-
temp.name = submitter.name;
|
|
8
|
-
temp.value = submitter.value;
|
|
9
|
-
form.id && temp.setAttribute("form", form.id);
|
|
10
|
-
submitter.parentNode.insertBefore(temp, submitter);
|
|
11
|
-
form = new FormData(form);
|
|
12
|
-
temp.parentNode.removeChild(temp);
|
|
13
|
-
return form;
|
|
3
|
+
return null == actionProp || "symbol" === typeof actionProp || "boolean" === typeof actionProp ? null : "function" === typeof actionProp ? actionProp : sanitizeURL(actionProp);
|
|
14
4
|
}
|
|
15
5
|
function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget) {
|
|
16
6
|
if ("submit" === domEventName && maybeTargetInst && maybeTargetInst.stateNode === nativeEventTarget) {
|
|
@@ -33,7 +23,7 @@
|
|
|
33
23
|
listener: function() {
|
|
34
24
|
if (nativeEvent.defaultPrevented) {
|
|
35
25
|
if (0 !== currentEventTransitionLane) {
|
|
36
|
-
var formData =
|
|
26
|
+
var formData = new FormData(nativeEventTarget, submitter);
|
|
37
27
|
startHostTransition(
|
|
38
28
|
maybeTargetInst,
|
|
39
29
|
{
|
|
@@ -47,7 +37,7 @@
|
|
|
47
37
|
);
|
|
48
38
|
}
|
|
49
39
|
} else
|
|
50
|
-
"function" === typeof action && (event.preventDefault(), formData =
|
|
40
|
+
"function" === typeof action && (event.preventDefault(), formData = new FormData(nativeEventTarget, submitter), startHostTransition(
|
|
51
41
|
maybeTargetInst,
|
|
52
42
|
{
|
|
53
43
|
pending: true,
|
|
@@ -65,17 +55,17 @@
|
|
|
65
55
|
});
|
|
66
56
|
}
|
|
67
57
|
}
|
|
68
|
-
for (i$jscomp$
|
|
69
|
-
eventName$jscomp$
|
|
58
|
+
for (i$jscomp$inline_1667 = 0; i$jscomp$inline_1667 < simpleEventPluginEvents.length; i$jscomp$inline_1667++) {
|
|
59
|
+
eventName$jscomp$inline_1668 = simpleEventPluginEvents[i$jscomp$inline_1667], domEventName$jscomp$inline_1669 = eventName$jscomp$inline_1668.toLowerCase(), capitalizedEvent$jscomp$inline_1670 = eventName$jscomp$inline_1668[0].toUpperCase() + eventName$jscomp$inline_1668.slice(1);
|
|
70
60
|
registerSimpleEvent(
|
|
71
|
-
domEventName$jscomp$
|
|
72
|
-
"on" + capitalizedEvent$jscomp$
|
|
61
|
+
domEventName$jscomp$inline_1669,
|
|
62
|
+
"on" + capitalizedEvent$jscomp$inline_1670
|
|
73
63
|
);
|
|
74
64
|
}
|
|
75
|
-
var eventName$jscomp$
|
|
76
|
-
var domEventName$jscomp$
|
|
77
|
-
var capitalizedEvent$jscomp$
|
|
78
|
-
var i$jscomp$
|
|
65
|
+
var eventName$jscomp$inline_1668;
|
|
66
|
+
var domEventName$jscomp$inline_1669;
|
|
67
|
+
var capitalizedEvent$jscomp$inline_1670;
|
|
68
|
+
var i$jscomp$inline_1667;
|
|
79
69
|
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
|
|
80
70
|
registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
|
|
81
71
|
registerSimpleEvent(ANIMATION_START, "onAnimationStart");
|
|
@@ -333,6 +323,9 @@
|
|
|
333
323
|
case "pointerup":
|
|
334
324
|
SyntheticEventCtor = SyntheticPointerEvent;
|
|
335
325
|
break;
|
|
326
|
+
case "submit":
|
|
327
|
+
SyntheticEventCtor = SyntheticSubmitEvent;
|
|
328
|
+
break;
|
|
336
329
|
case "toggle":
|
|
337
330
|
case "beforetoggle":
|
|
338
331
|
SyntheticEventCtor = SyntheticToggleEvent;
|
|
@@ -360,80 +353,59 @@
|
|
|
360
353
|
}
|
|
361
354
|
if (0 === (eventSystemFlags & 7)) {
|
|
362
355
|
a: {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
if (
|
|
356
|
+
SyntheticEventCtor = "mouseover" === domEventName || "pointerover" === domEventName;
|
|
357
|
+
reactName = "mouseout" === domEventName || "pointerout" === domEventName;
|
|
358
|
+
if (SyntheticEventCtor && nativeEvent !== currentReplayingEvent && (reactEventType = nativeEvent.relatedTarget || nativeEvent.fromElement) && (getClosestInstanceFromNode(reactEventType) || reactEventType[internalContainerInstanceKey]))
|
|
366
359
|
break a;
|
|
367
|
-
if (
|
|
368
|
-
|
|
369
|
-
if (
|
|
370
|
-
if (
|
|
371
|
-
|
|
372
|
-
} else
|
|
373
|
-
if (
|
|
360
|
+
if (reactName || SyntheticEventCtor) {
|
|
361
|
+
reactEventType = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget : (SyntheticEventCtor = nativeEventTarget.ownerDocument) ? SyntheticEventCtor.defaultView || SyntheticEventCtor.parentWindow : window;
|
|
362
|
+
if (reactName) {
|
|
363
|
+
if (SyntheticEventCtor = nativeEvent.relatedTarget || nativeEvent.toElement, reactName = targetInst, SyntheticEventCtor = SyntheticEventCtor ? getClosestInstanceFromNode(SyntheticEventCtor) : null, null !== SyntheticEventCtor && (accumulateTargetOnly = getNearestMountedFiber(SyntheticEventCtor), inCapturePhase = SyntheticEventCtor.tag, SyntheticEventCtor !== accumulateTargetOnly || 5 !== inCapturePhase && 27 !== inCapturePhase && 6 !== inCapturePhase))
|
|
364
|
+
SyntheticEventCtor = null;
|
|
365
|
+
} else reactName = null, SyntheticEventCtor = targetInst;
|
|
366
|
+
if (reactName !== SyntheticEventCtor) {
|
|
374
367
|
inCapturePhase = SyntheticMouseEvent;
|
|
375
368
|
_instance = "onMouseLeave";
|
|
376
369
|
reactEventName = "onMouseEnter";
|
|
377
370
|
instance = "mouse";
|
|
378
371
|
if ("pointerout" === domEventName || "pointerover" === domEventName)
|
|
379
372
|
inCapturePhase = SyntheticPointerEvent, _instance = "onPointerLeave", reactEventName = "onPointerEnter", instance = "pointer";
|
|
380
|
-
accumulateTargetOnly = null ==
|
|
381
|
-
lastHostComponent = null ==
|
|
382
|
-
|
|
373
|
+
accumulateTargetOnly = null == reactName ? reactEventType : getNodeFromInstance(reactName);
|
|
374
|
+
lastHostComponent = null == SyntheticEventCtor ? reactEventType : getNodeFromInstance(SyntheticEventCtor);
|
|
375
|
+
reactEventType = new inCapturePhase(
|
|
383
376
|
_instance,
|
|
384
377
|
instance + "leave",
|
|
385
|
-
|
|
378
|
+
reactName,
|
|
386
379
|
nativeEvent,
|
|
387
380
|
nativeEventTarget
|
|
388
381
|
);
|
|
389
|
-
|
|
390
|
-
|
|
382
|
+
reactEventType.target = accumulateTargetOnly;
|
|
383
|
+
reactEventType.relatedTarget = lastHostComponent;
|
|
391
384
|
_instance = null;
|
|
392
385
|
getClosestInstanceFromNode(nativeEventTarget) === targetInst && (inCapturePhase = new inCapturePhase(
|
|
393
386
|
reactEventName,
|
|
394
387
|
instance + "enter",
|
|
395
|
-
|
|
388
|
+
SyntheticEventCtor,
|
|
396
389
|
nativeEvent,
|
|
397
390
|
nativeEventTarget
|
|
398
391
|
), inCapturePhase.target = lastHostComponent, inCapturePhase.relatedTarget = accumulateTargetOnly, _instance = inCapturePhase);
|
|
399
392
|
accumulateTargetOnly = _instance;
|
|
400
|
-
|
|
401
|
-
b: {
|
|
402
|
-
inCapturePhase = getParent;
|
|
403
|
-
reactEventName = SyntheticEventCtor;
|
|
404
|
-
instance = reactEventType;
|
|
405
|
-
lastHostComponent = 0;
|
|
406
|
-
for (_instance = reactEventName; _instance; _instance = inCapturePhase(_instance))
|
|
407
|
-
lastHostComponent++;
|
|
408
|
-
_instance = 0;
|
|
409
|
-
for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
|
|
410
|
-
_instance++;
|
|
411
|
-
for (; 0 < lastHostComponent - _instance; )
|
|
412
|
-
reactEventName = inCapturePhase(reactEventName), lastHostComponent--;
|
|
413
|
-
for (; 0 < _instance - lastHostComponent; )
|
|
414
|
-
instance = inCapturePhase(instance), _instance--;
|
|
415
|
-
for (; lastHostComponent--; ) {
|
|
416
|
-
if (reactEventName === instance || null !== instance && reactEventName === instance.alternate) {
|
|
417
|
-
inCapturePhase = reactEventName;
|
|
418
|
-
break b;
|
|
419
|
-
}
|
|
420
|
-
reactEventName = inCapturePhase(reactEventName);
|
|
421
|
-
instance = inCapturePhase(instance);
|
|
422
|
-
}
|
|
423
|
-
inCapturePhase = null;
|
|
424
|
-
}
|
|
425
|
-
else inCapturePhase = null;
|
|
426
|
-
null !== SyntheticEventCtor && accumulateEnterLeaveListenersForEvent(
|
|
427
|
-
dispatchQueue,
|
|
393
|
+
inCapturePhase = reactName && SyntheticEventCtor ? getLowestCommonAncestor(
|
|
428
394
|
reactName,
|
|
429
395
|
SyntheticEventCtor,
|
|
396
|
+
getParent
|
|
397
|
+
) : null;
|
|
398
|
+
null !== reactName && accumulateEnterLeaveListenersForEvent(
|
|
399
|
+
dispatchQueue,
|
|
400
|
+
reactEventType,
|
|
401
|
+
reactName,
|
|
430
402
|
inCapturePhase,
|
|
431
403
|
false
|
|
432
404
|
);
|
|
433
|
-
null !==
|
|
405
|
+
null !== SyntheticEventCtor && null !== accumulateTargetOnly && accumulateEnterLeaveListenersForEvent(
|
|
434
406
|
dispatchQueue,
|
|
435
407
|
accumulateTargetOnly,
|
|
436
|
-
|
|
408
|
+
SyntheticEventCtor,
|
|
437
409
|
inCapturePhase,
|
|
438
410
|
true
|
|
439
411
|
);
|
|
@@ -464,7 +436,6 @@
|
|
|
464
436
|
break a;
|
|
465
437
|
}
|
|
466
438
|
handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
|
|
467
|
-
"focusout" === domEventName && targetInst && "number" === reactName.type && null != targetInst.memoizedProps.value && setDefaultValue(reactName, "number", reactName.value);
|
|
468
439
|
}
|
|
469
440
|
handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
|
|
470
441
|
switch (domEventName) {
|
|
@@ -591,7 +562,11 @@
|
|
|
591
562
|
function setProp(domElement, tag, key, value, props, prevValue) {
|
|
592
563
|
switch (key) {
|
|
593
564
|
case "children":
|
|
594
|
-
|
|
565
|
+
if ("string" === typeof value)
|
|
566
|
+
"body" === tag || "textarea" === tag && "" === value || setTextContent(domElement, value);
|
|
567
|
+
else if ("number" === typeof value || "bigint" === typeof value)
|
|
568
|
+
"body" !== tag && setTextContent(domElement, "" + value);
|
|
569
|
+
else return;
|
|
595
570
|
break;
|
|
596
571
|
case "className":
|
|
597
572
|
setValueForKnownAttribute(domElement, "class", value);
|
|
@@ -608,7 +583,7 @@
|
|
|
608
583
|
break;
|
|
609
584
|
case "style":
|
|
610
585
|
setValueForStyles(domElement, value, prevValue);
|
|
611
|
-
|
|
586
|
+
return;
|
|
612
587
|
case "data":
|
|
613
588
|
if ("object" !== tag) {
|
|
614
589
|
setValueForKnownAttribute(domElement, "data", value);
|
|
@@ -624,7 +599,7 @@
|
|
|
624
599
|
domElement.removeAttribute(key);
|
|
625
600
|
break;
|
|
626
601
|
}
|
|
627
|
-
value = sanitizeURL(
|
|
602
|
+
value = sanitizeURL(value);
|
|
628
603
|
domElement.setAttribute(key, value);
|
|
629
604
|
break;
|
|
630
605
|
case "action":
|
|
@@ -662,18 +637,18 @@
|
|
|
662
637
|
domElement.removeAttribute(key);
|
|
663
638
|
break;
|
|
664
639
|
}
|
|
665
|
-
value = sanitizeURL(
|
|
640
|
+
value = sanitizeURL(value);
|
|
666
641
|
domElement.setAttribute(key, value);
|
|
667
642
|
break;
|
|
668
643
|
case "onClick":
|
|
669
644
|
null != value && (domElement.onclick = noop$1);
|
|
670
|
-
|
|
645
|
+
return;
|
|
671
646
|
case "onScroll":
|
|
672
647
|
null != value && listenToNonDelegatedEvent("scroll", domElement);
|
|
673
|
-
|
|
648
|
+
return;
|
|
674
649
|
case "onScrollEnd":
|
|
675
650
|
null != value && listenToNonDelegatedEvent("scrollend", domElement);
|
|
676
|
-
|
|
651
|
+
return;
|
|
677
652
|
case "dangerouslySetInnerHTML":
|
|
678
653
|
if (null != value) {
|
|
679
654
|
if ("object" !== typeof value || !("__html" in value))
|
|
@@ -681,7 +656,7 @@
|
|
|
681
656
|
key = value.__html;
|
|
682
657
|
if (null != key) {
|
|
683
658
|
if (null != props.children) throw Error(formatProdErrorMessage(60));
|
|
684
|
-
domElement.innerHTML = key;
|
|
659
|
+
(null != prevValue ? prevValue.__html : void 0) !== key && (domElement.innerHTML = key);
|
|
685
660
|
}
|
|
686
661
|
}
|
|
687
662
|
break;
|
|
@@ -705,7 +680,7 @@
|
|
|
705
680
|
domElement.removeAttribute("xlink:href");
|
|
706
681
|
break;
|
|
707
682
|
}
|
|
708
|
-
key = sanitizeURL(
|
|
683
|
+
key = sanitizeURL(value);
|
|
709
684
|
domElement.setAttributeNS(
|
|
710
685
|
"http://www.w3.org/1999/xlink",
|
|
711
686
|
"xlink:href",
|
|
@@ -720,13 +695,14 @@
|
|
|
720
695
|
case "externalResourcesRequired":
|
|
721
696
|
case "focusable":
|
|
722
697
|
case "preserveAlpha":
|
|
723
|
-
null != value && "function" !== typeof value && "symbol" !== typeof value ? domElement.setAttribute(key,
|
|
698
|
+
null != value && "function" !== typeof value && "symbol" !== typeof value ? domElement.setAttribute(key, value) : domElement.removeAttribute(key);
|
|
724
699
|
break;
|
|
725
700
|
case "inert":
|
|
726
701
|
case "allowFullScreen":
|
|
727
702
|
case "async":
|
|
728
703
|
case "autoPlay":
|
|
729
704
|
case "controls":
|
|
705
|
+
case "credentialless":
|
|
730
706
|
case "default":
|
|
731
707
|
case "defer":
|
|
732
708
|
case "disabled":
|
|
@@ -843,17 +819,19 @@
|
|
|
843
819
|
break;
|
|
844
820
|
case "innerText":
|
|
845
821
|
case "textContent":
|
|
846
|
-
|
|
822
|
+
return;
|
|
847
823
|
default:
|
|
848
824
|
if (!(2 < key.length) || "o" !== key[0] && "O" !== key[0] || "n" !== key[1] && "N" !== key[1])
|
|
849
825
|
key = aliases.get(key) || key, setValueForAttribute(domElement, key, value);
|
|
826
|
+
else return;
|
|
850
827
|
}
|
|
828
|
+
viewTransitionMutationContext = true;
|
|
851
829
|
}
|
|
852
830
|
function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
|
|
853
831
|
switch (key) {
|
|
854
832
|
case "style":
|
|
855
833
|
setValueForStyles(domElement, value, prevValue);
|
|
856
|
-
|
|
834
|
+
return;
|
|
857
835
|
case "dangerouslySetInnerHTML":
|
|
858
836
|
if (null != value) {
|
|
859
837
|
if ("object" !== typeof value || !("__html" in value))
|
|
@@ -861,41 +839,47 @@
|
|
|
861
839
|
key = value.__html;
|
|
862
840
|
if (null != key) {
|
|
863
841
|
if (null != props.children) throw Error(formatProdErrorMessage(60));
|
|
864
|
-
domElement.innerHTML = key;
|
|
842
|
+
(null != prevValue ? prevValue.__html : void 0) !== key && (domElement.innerHTML = key);
|
|
865
843
|
}
|
|
866
844
|
}
|
|
867
845
|
break;
|
|
868
846
|
case "children":
|
|
869
|
-
|
|
847
|
+
if ("string" === typeof value) setTextContent(domElement, value);
|
|
848
|
+
else if ("number" === typeof value || "bigint" === typeof value)
|
|
849
|
+
setTextContent(domElement, "" + value);
|
|
850
|
+
else return;
|
|
870
851
|
break;
|
|
871
852
|
case "onScroll":
|
|
872
853
|
null != value && listenToNonDelegatedEvent("scroll", domElement);
|
|
873
|
-
|
|
854
|
+
return;
|
|
874
855
|
case "onScrollEnd":
|
|
875
856
|
null != value && listenToNonDelegatedEvent("scrollend", domElement);
|
|
876
|
-
|
|
857
|
+
return;
|
|
877
858
|
case "onClick":
|
|
878
859
|
null != value && (domElement.onclick = noop$1);
|
|
879
|
-
|
|
860
|
+
return;
|
|
880
861
|
case "suppressContentEditableWarning":
|
|
881
862
|
case "suppressHydrationWarning":
|
|
882
863
|
case "innerHTML":
|
|
883
864
|
case "ref":
|
|
884
|
-
|
|
865
|
+
return;
|
|
885
866
|
case "innerText":
|
|
886
867
|
case "textContent":
|
|
887
|
-
|
|
868
|
+
return;
|
|
888
869
|
default:
|
|
889
870
|
if (!registrationNameDependencies.hasOwnProperty(key))
|
|
890
871
|
a: {
|
|
891
|
-
if ("o" === key[0] && "n" === key[1] && (props = key.endsWith("Capture"),
|
|
892
|
-
"function" !== typeof
|
|
893
|
-
domElement.addEventListener(
|
|
872
|
+
if ("o" === key[0] && "n" === key[1] && (props = key.endsWith("Capture"), prevValue = key.slice(2, props ? key.length - 7 : void 0), tag = domElement[internalPropsKey] || null, tag = null != tag ? tag[key] : null, "function" === typeof tag && domElement.removeEventListener(prevValue, tag, props), "function" === typeof value)) {
|
|
873
|
+
"function" !== typeof tag && null !== tag && (key in domElement ? domElement[key] = null : domElement.hasAttribute(key) && domElement.removeAttribute(key));
|
|
874
|
+
domElement.addEventListener(prevValue, value, props);
|
|
894
875
|
break a;
|
|
895
876
|
}
|
|
877
|
+
viewTransitionMutationContext = true;
|
|
896
878
|
key in domElement ? domElement[key] = value : true === value ? domElement.setAttribute(key, "") : setValueForAttribute(domElement, key, value);
|
|
897
879
|
}
|
|
880
|
+
return;
|
|
898
881
|
}
|
|
882
|
+
viewTransitionMutationContext = true;
|
|
899
883
|
}
|
|
900
884
|
function setInitialProperties(domElement, tag, props) {
|
|
901
885
|
switch (tag) {
|
|
@@ -938,34 +922,34 @@
|
|
|
938
922
|
var defaultValue = propKey = propValue = hasSrcSet = null, checked = null, defaultChecked = null;
|
|
939
923
|
for (hasSrc in props)
|
|
940
924
|
if (props.hasOwnProperty(hasSrc)) {
|
|
941
|
-
var propValue$
|
|
942
|
-
if (null != propValue$
|
|
925
|
+
var propValue$204 = props[hasSrc];
|
|
926
|
+
if (null != propValue$204)
|
|
943
927
|
switch (hasSrc) {
|
|
944
928
|
case "name":
|
|
945
|
-
hasSrcSet = propValue$
|
|
929
|
+
hasSrcSet = propValue$204;
|
|
946
930
|
break;
|
|
947
931
|
case "type":
|
|
948
|
-
propValue = propValue$
|
|
932
|
+
propValue = propValue$204;
|
|
949
933
|
break;
|
|
950
934
|
case "checked":
|
|
951
|
-
checked = propValue$
|
|
935
|
+
checked = propValue$204;
|
|
952
936
|
break;
|
|
953
937
|
case "defaultChecked":
|
|
954
|
-
defaultChecked = propValue$
|
|
938
|
+
defaultChecked = propValue$204;
|
|
955
939
|
break;
|
|
956
940
|
case "value":
|
|
957
|
-
propKey = propValue$
|
|
941
|
+
propKey = propValue$204;
|
|
958
942
|
break;
|
|
959
943
|
case "defaultValue":
|
|
960
|
-
defaultValue = propValue$
|
|
944
|
+
defaultValue = propValue$204;
|
|
961
945
|
break;
|
|
962
946
|
case "children":
|
|
963
947
|
case "dangerouslySetInnerHTML":
|
|
964
|
-
if (null != propValue$
|
|
948
|
+
if (null != propValue$204)
|
|
965
949
|
throw Error(formatProdErrorMessage(137, tag));
|
|
966
950
|
break;
|
|
967
951
|
default:
|
|
968
|
-
setProp(domElement, tag, hasSrc, propValue$
|
|
952
|
+
setProp(domElement, tag, hasSrc, propValue$204, props, null);
|
|
969
953
|
}
|
|
970
954
|
}
|
|
971
955
|
initInput(
|
|
@@ -1084,11 +1068,11 @@
|
|
|
1084
1068
|
return;
|
|
1085
1069
|
default:
|
|
1086
1070
|
if (isCustomElement(tag)) {
|
|
1087
|
-
for (propValue$
|
|
1088
|
-
props.hasOwnProperty(propValue$
|
|
1071
|
+
for (propValue$204 in props)
|
|
1072
|
+
props.hasOwnProperty(propValue$204) && (hasSrc = props[propValue$204], void 0 !== hasSrc && setPropOnCustomElement(
|
|
1089
1073
|
domElement,
|
|
1090
1074
|
tag,
|
|
1091
|
-
propValue$
|
|
1075
|
+
propValue$204,
|
|
1092
1076
|
hasSrc,
|
|
1093
1077
|
props,
|
|
1094
1078
|
void 0
|
|
@@ -1099,6 +1083,7 @@
|
|
|
1099
1083
|
for (defaultValue in props)
|
|
1100
1084
|
props.hasOwnProperty(defaultValue) && (hasSrc = props[defaultValue], null != hasSrc && setProp(domElement, tag, defaultValue, hasSrc, props, null));
|
|
1101
1085
|
}
|
|
1086
|
+
var emptyProps = {};
|
|
1102
1087
|
function updateProperties(domElement, tag, lastProps, nextProps) {
|
|
1103
1088
|
switch (tag) {
|
|
1104
1089
|
case "div":
|
|
@@ -1126,27 +1111,33 @@
|
|
|
1126
1111
|
nextProps.hasOwnProperty(propKey) || setProp(domElement, tag, propKey, null, nextProps, lastProp);
|
|
1127
1112
|
}
|
|
1128
1113
|
}
|
|
1129
|
-
for (var propKey$
|
|
1130
|
-
var propKey = nextProps[propKey$
|
|
1131
|
-
lastProp = lastProps[propKey$
|
|
1132
|
-
if (nextProps.hasOwnProperty(propKey$
|
|
1133
|
-
switch (propKey$
|
|
1114
|
+
for (var propKey$221 in nextProps) {
|
|
1115
|
+
var propKey = nextProps[propKey$221];
|
|
1116
|
+
lastProp = lastProps[propKey$221];
|
|
1117
|
+
if (nextProps.hasOwnProperty(propKey$221) && (null != propKey || null != lastProp))
|
|
1118
|
+
switch (propKey$221) {
|
|
1134
1119
|
case "type":
|
|
1120
|
+
propKey !== lastProp && (viewTransitionMutationContext = true);
|
|
1135
1121
|
type = propKey;
|
|
1136
1122
|
break;
|
|
1137
1123
|
case "name":
|
|
1124
|
+
propKey !== lastProp && (viewTransitionMutationContext = true);
|
|
1138
1125
|
name = propKey;
|
|
1139
1126
|
break;
|
|
1140
1127
|
case "checked":
|
|
1128
|
+
propKey !== lastProp && (viewTransitionMutationContext = true);
|
|
1141
1129
|
checked = propKey;
|
|
1142
1130
|
break;
|
|
1143
1131
|
case "defaultChecked":
|
|
1132
|
+
propKey !== lastProp && (viewTransitionMutationContext = true);
|
|
1144
1133
|
defaultChecked = propKey;
|
|
1145
1134
|
break;
|
|
1146
1135
|
case "value":
|
|
1136
|
+
propKey !== lastProp && (viewTransitionMutationContext = true);
|
|
1147
1137
|
value = propKey;
|
|
1148
1138
|
break;
|
|
1149
1139
|
case "defaultValue":
|
|
1140
|
+
propKey !== lastProp && (viewTransitionMutationContext = true);
|
|
1150
1141
|
defaultValue = propKey;
|
|
1151
1142
|
break;
|
|
1152
1143
|
case "children":
|
|
@@ -1158,7 +1149,7 @@
|
|
|
1158
1149
|
propKey !== lastProp && setProp(
|
|
1159
1150
|
domElement,
|
|
1160
1151
|
tag,
|
|
1161
|
-
propKey$
|
|
1152
|
+
propKey$221,
|
|
1162
1153
|
propKey,
|
|
1163
1154
|
nextProps,
|
|
1164
1155
|
lastProp
|
|
@@ -1177,7 +1168,7 @@
|
|
|
1177
1168
|
);
|
|
1178
1169
|
return;
|
|
1179
1170
|
case "select":
|
|
1180
|
-
propKey = value = defaultValue = propKey$
|
|
1171
|
+
propKey = value = defaultValue = propKey$221 = null;
|
|
1181
1172
|
for (type in lastProps)
|
|
1182
1173
|
if (lastDefaultValue = lastProps[type], lastProps.hasOwnProperty(type) && null != lastDefaultValue)
|
|
1183
1174
|
switch (type) {
|
|
@@ -1199,13 +1190,15 @@
|
|
|
1199
1190
|
if (type = nextProps[name], lastDefaultValue = lastProps[name], nextProps.hasOwnProperty(name) && (null != type || null != lastDefaultValue))
|
|
1200
1191
|
switch (name) {
|
|
1201
1192
|
case "value":
|
|
1202
|
-
|
|
1193
|
+
type !== lastDefaultValue && (viewTransitionMutationContext = true);
|
|
1194
|
+
propKey$221 = type;
|
|
1203
1195
|
break;
|
|
1204
1196
|
case "defaultValue":
|
|
1197
|
+
type !== lastDefaultValue && (viewTransitionMutationContext = true);
|
|
1205
1198
|
defaultValue = type;
|
|
1206
1199
|
break;
|
|
1207
1200
|
case "multiple":
|
|
1208
|
-
value = type;
|
|
1201
|
+
type !== lastDefaultValue && (viewTransitionMutationContext = true), value = type;
|
|
1209
1202
|
default:
|
|
1210
1203
|
type !== lastDefaultValue && setProp(
|
|
1211
1204
|
domElement,
|
|
@@ -1219,10 +1212,10 @@
|
|
|
1219
1212
|
tag = defaultValue;
|
|
1220
1213
|
lastProps = value;
|
|
1221
1214
|
nextProps = propKey;
|
|
1222
|
-
null != propKey$
|
|
1215
|
+
null != propKey$221 ? updateOptions(domElement, !!lastProps, propKey$221, false) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, true) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", false));
|
|
1223
1216
|
return;
|
|
1224
1217
|
case "textarea":
|
|
1225
|
-
propKey = propKey$
|
|
1218
|
+
propKey = propKey$221 = null;
|
|
1226
1219
|
for (defaultValue in lastProps)
|
|
1227
1220
|
if (name = lastProps[defaultValue], lastProps.hasOwnProperty(defaultValue) && null != name && !nextProps.hasOwnProperty(defaultValue))
|
|
1228
1221
|
switch (defaultValue) {
|
|
@@ -1237,9 +1230,11 @@
|
|
|
1237
1230
|
if (name = nextProps[value], type = lastProps[value], nextProps.hasOwnProperty(value) && (null != name || null != type))
|
|
1238
1231
|
switch (value) {
|
|
1239
1232
|
case "value":
|
|
1240
|
-
|
|
1233
|
+
name !== type && (viewTransitionMutationContext = true);
|
|
1234
|
+
propKey$221 = name;
|
|
1241
1235
|
break;
|
|
1242
1236
|
case "defaultValue":
|
|
1237
|
+
name !== type && (viewTransitionMutationContext = true);
|
|
1243
1238
|
propKey = name;
|
|
1244
1239
|
break;
|
|
1245
1240
|
case "children":
|
|
@@ -1250,12 +1245,12 @@
|
|
|
1250
1245
|
default:
|
|
1251
1246
|
name !== type && setProp(domElement, tag, value, name, nextProps, type);
|
|
1252
1247
|
}
|
|
1253
|
-
updateTextarea(domElement, propKey$
|
|
1248
|
+
updateTextarea(domElement, propKey$221, propKey);
|
|
1254
1249
|
return;
|
|
1255
1250
|
case "option":
|
|
1256
|
-
for (var propKey$
|
|
1257
|
-
if (propKey$
|
|
1258
|
-
switch (propKey$
|
|
1251
|
+
for (var propKey$237 in lastProps)
|
|
1252
|
+
if (propKey$221 = lastProps[propKey$237], lastProps.hasOwnProperty(propKey$237) && null != propKey$221 && !nextProps.hasOwnProperty(propKey$237))
|
|
1253
|
+
switch (propKey$237) {
|
|
1259
1254
|
case "selected":
|
|
1260
1255
|
domElement.selected = false;
|
|
1261
1256
|
break;
|
|
@@ -1263,24 +1258,25 @@
|
|
|
1263
1258
|
setProp(
|
|
1264
1259
|
domElement,
|
|
1265
1260
|
tag,
|
|
1266
|
-
propKey$
|
|
1261
|
+
propKey$237,
|
|
1267
1262
|
null,
|
|
1268
1263
|
nextProps,
|
|
1269
|
-
propKey$
|
|
1264
|
+
propKey$221
|
|
1270
1265
|
);
|
|
1271
1266
|
}
|
|
1272
1267
|
for (lastDefaultValue in nextProps)
|
|
1273
|
-
if (propKey$
|
|
1268
|
+
if (propKey$221 = nextProps[lastDefaultValue], propKey = lastProps[lastDefaultValue], nextProps.hasOwnProperty(lastDefaultValue) && propKey$221 !== propKey && (null != propKey$221 || null != propKey))
|
|
1274
1269
|
switch (lastDefaultValue) {
|
|
1275
1270
|
case "selected":
|
|
1276
|
-
|
|
1271
|
+
propKey$221 !== propKey && (viewTransitionMutationContext = true);
|
|
1272
|
+
domElement.selected = propKey$221 && "function" !== typeof propKey$221 && "symbol" !== typeof propKey$221;
|
|
1277
1273
|
break;
|
|
1278
1274
|
default:
|
|
1279
1275
|
setProp(
|
|
1280
1276
|
domElement,
|
|
1281
1277
|
tag,
|
|
1282
1278
|
lastDefaultValue,
|
|
1283
|
-
propKey$
|
|
1279
|
+
propKey$221,
|
|
1284
1280
|
nextProps,
|
|
1285
1281
|
propKey
|
|
1286
1282
|
);
|
|
@@ -1301,14 +1297,14 @@
|
|
|
1301
1297
|
case "track":
|
|
1302
1298
|
case "wbr":
|
|
1303
1299
|
case "menuitem":
|
|
1304
|
-
for (var propKey$
|
|
1305
|
-
propKey$
|
|
1300
|
+
for (var propKey$242 in lastProps)
|
|
1301
|
+
propKey$221 = lastProps[propKey$242], lastProps.hasOwnProperty(propKey$242) && null != propKey$221 && !nextProps.hasOwnProperty(propKey$242) && setProp(domElement, tag, propKey$242, null, nextProps, propKey$221);
|
|
1306
1302
|
for (checked in nextProps)
|
|
1307
|
-
if (propKey$
|
|
1303
|
+
if (propKey$221 = nextProps[checked], propKey = lastProps[checked], nextProps.hasOwnProperty(checked) && propKey$221 !== propKey && (null != propKey$221 || null != propKey))
|
|
1308
1304
|
switch (checked) {
|
|
1309
1305
|
case "children":
|
|
1310
1306
|
case "dangerouslySetInnerHTML":
|
|
1311
|
-
if (null != propKey$
|
|
1307
|
+
if (null != propKey$221)
|
|
1312
1308
|
throw Error(formatProdErrorMessage(137, tag));
|
|
1313
1309
|
break;
|
|
1314
1310
|
default:
|
|
@@ -1316,7 +1312,7 @@
|
|
|
1316
1312
|
domElement,
|
|
1317
1313
|
tag,
|
|
1318
1314
|
checked,
|
|
1319
|
-
propKey$
|
|
1315
|
+
propKey$221,
|
|
1320
1316
|
nextProps,
|
|
1321
1317
|
propKey
|
|
1322
1318
|
);
|
|
@@ -1324,31 +1320,31 @@
|
|
|
1324
1320
|
return;
|
|
1325
1321
|
default:
|
|
1326
1322
|
if (isCustomElement(tag)) {
|
|
1327
|
-
for (var propKey$
|
|
1328
|
-
propKey$
|
|
1323
|
+
for (var propKey$247 in lastProps)
|
|
1324
|
+
propKey$221 = lastProps[propKey$247], lastProps.hasOwnProperty(propKey$247) && void 0 !== propKey$221 && !nextProps.hasOwnProperty(propKey$247) && setPropOnCustomElement(
|
|
1329
1325
|
domElement,
|
|
1330
1326
|
tag,
|
|
1331
|
-
propKey$
|
|
1327
|
+
propKey$247,
|
|
1332
1328
|
void 0,
|
|
1333
1329
|
nextProps,
|
|
1334
|
-
propKey$
|
|
1330
|
+
propKey$221
|
|
1335
1331
|
);
|
|
1336
1332
|
for (defaultChecked in nextProps)
|
|
1337
|
-
propKey$
|
|
1333
|
+
propKey$221 = nextProps[defaultChecked], propKey = lastProps[defaultChecked], !nextProps.hasOwnProperty(defaultChecked) || propKey$221 === propKey || void 0 === propKey$221 && void 0 === propKey || setPropOnCustomElement(
|
|
1338
1334
|
domElement,
|
|
1339
1335
|
tag,
|
|
1340
1336
|
defaultChecked,
|
|
1341
|
-
propKey$
|
|
1337
|
+
propKey$221,
|
|
1342
1338
|
nextProps,
|
|
1343
1339
|
propKey
|
|
1344
1340
|
);
|
|
1345
1341
|
return;
|
|
1346
1342
|
}
|
|
1347
1343
|
}
|
|
1348
|
-
for (var propKey$
|
|
1349
|
-
propKey$
|
|
1344
|
+
for (var propKey$252 in lastProps)
|
|
1345
|
+
propKey$221 = lastProps[propKey$252], lastProps.hasOwnProperty(propKey$252) && null != propKey$221 && !nextProps.hasOwnProperty(propKey$252) && setProp(domElement, tag, propKey$252, null, nextProps, propKey$221);
|
|
1350
1346
|
for (lastProp in nextProps)
|
|
1351
|
-
propKey$
|
|
1347
|
+
propKey$221 = nextProps[lastProp], propKey = lastProps[lastProp], !nextProps.hasOwnProperty(lastProp) || propKey$221 === propKey || null == propKey$221 && null == propKey || setProp(domElement, tag, lastProp, propKey$221, nextProps, propKey);
|
|
1352
1348
|
}
|
|
1353
1349
|
function isLikelyStaticResource(initiatorType) {
|
|
1354
1350
|
switch (initiatorType) {
|
|
@@ -1414,6 +1410,16 @@
|
|
|
1414
1410
|
}
|
|
1415
1411
|
return 1 === parentNamespace && "foreignObject" === type ? 0 : parentNamespace;
|
|
1416
1412
|
}
|
|
1413
|
+
function createHoistableInstance(type, props, rootContainerInstance, internalInstanceHandle) {
|
|
1414
|
+
rootContainerInstance = getOwnerDocumentFromRootContainer(
|
|
1415
|
+
rootContainerInstance
|
|
1416
|
+
).createElement(type);
|
|
1417
|
+
rootContainerInstance[internalInstanceKey] = internalInstanceHandle;
|
|
1418
|
+
rootContainerInstance[internalPropsKey] = props;
|
|
1419
|
+
setInitialProperties(rootContainerInstance, type, props);
|
|
1420
|
+
markNodeAsHoistable(rootContainerInstance);
|
|
1421
|
+
return rootContainerInstance;
|
|
1422
|
+
}
|
|
1417
1423
|
function shouldSetTextContent(type, props) {
|
|
1418
1424
|
return "textarea" === type || "noscript" === type || "string" === typeof props.children || "number" === typeof props.children || "bigint" === typeof props.children || "object" === typeof props.dangerouslySetInnerHTML && null !== props.dangerouslySetInnerHTML && null != props.dangerouslySetInnerHTML.__html;
|
|
1419
1425
|
}
|
|
@@ -1431,6 +1437,7 @@
|
|
|
1431
1437
|
var scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0;
|
|
1432
1438
|
var cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0;
|
|
1433
1439
|
var localPromise = "function" === typeof Promise ? Promise : void 0;
|
|
1440
|
+
var localRequestAnimationFrame = "function" === typeof requestAnimationFrame ? requestAnimationFrame : scheduleTimeout;
|
|
1434
1441
|
var scheduleMicrotask = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof localPromise ? function(callback) {
|
|
1435
1442
|
return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
|
|
1436
1443
|
} : scheduleTimeout;
|
|
@@ -1458,17 +1465,19 @@
|
|
|
1458
1465
|
} else if ("$" === node || "$?" === node || "$~" === node || "$!" === node || "&" === node)
|
|
1459
1466
|
depth++;
|
|
1460
1467
|
else if ("html" === node)
|
|
1461
|
-
|
|
1468
|
+
clearSingletonPreambleContribution(
|
|
1469
|
+
parentInstance.ownerDocument.documentElement
|
|
1470
|
+
);
|
|
1462
1471
|
else if ("head" === node) {
|
|
1463
1472
|
node = parentInstance.ownerDocument.head;
|
|
1464
|
-
|
|
1473
|
+
clearSingletonPreambleContribution(node);
|
|
1465
1474
|
for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
|
|
1466
1475
|
var nextNode$jscomp$0 = node$jscomp$0.nextSibling, nodeName = node$jscomp$0.nodeName;
|
|
1467
1476
|
node$jscomp$0[internalHoistableMarker] || "SCRIPT" === nodeName || "STYLE" === nodeName || "LINK" === nodeName && "stylesheet" === node$jscomp$0.rel.toLowerCase() || node.removeChild(node$jscomp$0);
|
|
1468
1477
|
node$jscomp$0 = nextNode$jscomp$0;
|
|
1469
1478
|
}
|
|
1470
1479
|
} else
|
|
1471
|
-
"body" === node &&
|
|
1480
|
+
"body" === node && clearSingletonPreambleContribution(parentInstance.ownerDocument.body);
|
|
1472
1481
|
node = nextNode;
|
|
1473
1482
|
} while (node);
|
|
1474
1483
|
retryIfBlockedOn(hydrationInstance);
|
|
@@ -1488,6 +1497,676 @@
|
|
|
1488
1497
|
node = nextNode;
|
|
1489
1498
|
} while (node);
|
|
1490
1499
|
}
|
|
1500
|
+
function applyViewTransitionName(instance, name, className) {
|
|
1501
|
+
name = CSS.escape(name) !== name ? "r-" + btoa(name).replace(/=/g, "") : name;
|
|
1502
|
+
instance.style.viewTransitionName = name;
|
|
1503
|
+
null != className && (instance.style.viewTransitionClass = className);
|
|
1504
|
+
className = getComputedStyle(instance);
|
|
1505
|
+
if ("inline" === className.display) {
|
|
1506
|
+
name = instance.getClientRects();
|
|
1507
|
+
if (1 === name.length) var JSCompiler_inline_result = 1;
|
|
1508
|
+
else
|
|
1509
|
+
for (var i = JSCompiler_inline_result = 0; i < name.length; i++) {
|
|
1510
|
+
var rect = name[i];
|
|
1511
|
+
0 < rect.width && 0 < rect.height && JSCompiler_inline_result++;
|
|
1512
|
+
}
|
|
1513
|
+
1 === JSCompiler_inline_result && (instance = instance.style, instance.display = 1 === name.length ? "inline-block" : "block", instance.marginTop = "-" + className.paddingTop, instance.marginBottom = "-" + className.paddingBottom);
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
function restoreViewTransitionName(instance, props) {
|
|
1517
|
+
instance = instance.style;
|
|
1518
|
+
props = props.style;
|
|
1519
|
+
var viewTransitionName = null != props ? props.hasOwnProperty("viewTransitionName") ? props.viewTransitionName : props.hasOwnProperty("view-transition-name") ? props["view-transition-name"] : null : null;
|
|
1520
|
+
instance.viewTransitionName = null == viewTransitionName || "boolean" === typeof viewTransitionName ? "" : ("" + viewTransitionName).trim();
|
|
1521
|
+
viewTransitionName = null != props ? props.hasOwnProperty("viewTransitionClass") ? props.viewTransitionClass : props.hasOwnProperty("view-transition-class") ? props["view-transition-class"] : null : null;
|
|
1522
|
+
instance.viewTransitionClass = null == viewTransitionName || "boolean" === typeof viewTransitionName ? "" : ("" + viewTransitionName).trim();
|
|
1523
|
+
"inline-block" === instance.display && (null == props ? instance.display = instance.margin = "" : (viewTransitionName = props.display, instance.display = null == viewTransitionName || "boolean" === typeof viewTransitionName ? "" : viewTransitionName, viewTransitionName = props.margin, null != viewTransitionName ? instance.margin = viewTransitionName : (viewTransitionName = props.hasOwnProperty("marginTop") ? props.marginTop : props["margin-top"], instance.marginTop = null == viewTransitionName || "boolean" === typeof viewTransitionName ? "" : viewTransitionName, props = props.hasOwnProperty("marginBottom") ? props.marginBottom : props["margin-bottom"], instance.marginBottom = null == props || "boolean" === typeof props ? "" : props)));
|
|
1524
|
+
}
|
|
1525
|
+
function createMeasurement(rect, computedStyle, element) {
|
|
1526
|
+
element = element.ownerDocument.defaultView;
|
|
1527
|
+
return {
|
|
1528
|
+
rect,
|
|
1529
|
+
abs: "absolute" === computedStyle.position || "fixed" === computedStyle.position,
|
|
1530
|
+
clip: "none" !== computedStyle.clipPath || "visible" !== computedStyle.overflow || "none" !== computedStyle.filter || "none" !== computedStyle.mask || "none" !== computedStyle.mask || "0px" !== computedStyle.borderRadius,
|
|
1531
|
+
view: 0 <= rect.bottom && 0 <= rect.right && rect.top <= element.innerHeight && rect.left <= element.innerWidth
|
|
1532
|
+
};
|
|
1533
|
+
}
|
|
1534
|
+
function measureInstance(instance) {
|
|
1535
|
+
var rect = instance.getBoundingClientRect(), computedStyle = getComputedStyle(instance);
|
|
1536
|
+
return createMeasurement(rect, computedStyle, instance);
|
|
1537
|
+
}
|
|
1538
|
+
function measureClonedInstance(instance) {
|
|
1539
|
+
var measuredRect = instance.getBoundingClientRect();
|
|
1540
|
+
measuredRect = new DOMRect(
|
|
1541
|
+
measuredRect.x + 2e4,
|
|
1542
|
+
measuredRect.y + 2e4,
|
|
1543
|
+
measuredRect.width,
|
|
1544
|
+
measuredRect.height
|
|
1545
|
+
);
|
|
1546
|
+
var computedStyle = getComputedStyle(instance);
|
|
1547
|
+
return createMeasurement(measuredRect, computedStyle, instance);
|
|
1548
|
+
}
|
|
1549
|
+
function forceLayout(ownerDocument) {
|
|
1550
|
+
return ownerDocument.documentElement.clientHeight;
|
|
1551
|
+
}
|
|
1552
|
+
function waitForImageToLoad(resolve) {
|
|
1553
|
+
this.addEventListener("load", resolve);
|
|
1554
|
+
this.addEventListener("error", resolve);
|
|
1555
|
+
}
|
|
1556
|
+
function startViewTransition(suspendedState, rootContainer, transitionTypes, mutationCallback, layoutCallback, afterMutationCallback, spawnedWorkCallback, passiveCallback, errorCallback) {
|
|
1557
|
+
var ownerDocument = 9 === rootContainer.nodeType ? rootContainer : rootContainer.ownerDocument;
|
|
1558
|
+
try {
|
|
1559
|
+
var transition = ownerDocument.startViewTransition({
|
|
1560
|
+
update: function() {
|
|
1561
|
+
var ownerWindow = ownerDocument.defaultView, pendingNavigation = ownerWindow.navigation && ownerWindow.navigation.transition, previousFontLoadingStatus = ownerDocument.fonts.status;
|
|
1562
|
+
mutationCallback();
|
|
1563
|
+
var blockingPromises = [];
|
|
1564
|
+
"loaded" === previousFontLoadingStatus && (forceLayout(ownerDocument), "loading" === ownerDocument.fonts.status && blockingPromises.push(ownerDocument.fonts.ready));
|
|
1565
|
+
previousFontLoadingStatus = blockingPromises.length;
|
|
1566
|
+
if (null !== suspendedState)
|
|
1567
|
+
for (var suspenseyImages = suspendedState.suspenseyImages, imgBytes = 0, i = 0; i < suspenseyImages.length; i++) {
|
|
1568
|
+
var suspenseyImage = suspenseyImages[i];
|
|
1569
|
+
if (!suspenseyImage.complete) {
|
|
1570
|
+
var rect = suspenseyImage.getBoundingClientRect();
|
|
1571
|
+
if (0 < rect.bottom && 0 < rect.right && rect.top < ownerWindow.innerHeight && rect.left < ownerWindow.innerWidth) {
|
|
1572
|
+
imgBytes += estimateImageBytes(suspenseyImage);
|
|
1573
|
+
if (imgBytes > estimatedBytesWithinLimit) {
|
|
1574
|
+
blockingPromises.length = previousFontLoadingStatus;
|
|
1575
|
+
break;
|
|
1576
|
+
}
|
|
1577
|
+
suspenseyImage = new Promise(
|
|
1578
|
+
waitForImageToLoad.bind(suspenseyImage)
|
|
1579
|
+
);
|
|
1580
|
+
blockingPromises.push(suspenseyImage);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
if (0 < blockingPromises.length)
|
|
1585
|
+
return ownerWindow = Promise.race([
|
|
1586
|
+
Promise.all(blockingPromises),
|
|
1587
|
+
new Promise(function(resolve) {
|
|
1588
|
+
return setTimeout(resolve, 500);
|
|
1589
|
+
})
|
|
1590
|
+
]).then(layoutCallback, layoutCallback), (pendingNavigation ? Promise.allSettled([pendingNavigation.finished, ownerWindow]) : ownerWindow).then(afterMutationCallback, afterMutationCallback);
|
|
1591
|
+
layoutCallback();
|
|
1592
|
+
if (pendingNavigation)
|
|
1593
|
+
return pendingNavigation.finished.then(
|
|
1594
|
+
afterMutationCallback,
|
|
1595
|
+
afterMutationCallback
|
|
1596
|
+
);
|
|
1597
|
+
afterMutationCallback();
|
|
1598
|
+
},
|
|
1599
|
+
types: transitionTypes
|
|
1600
|
+
});
|
|
1601
|
+
ownerDocument.__reactViewTransition = transition;
|
|
1602
|
+
var viewTransitionAnimations = [];
|
|
1603
|
+
transition.ready.then(
|
|
1604
|
+
function() {
|
|
1605
|
+
for (var animations = ownerDocument.documentElement.getAnimations({
|
|
1606
|
+
subtree: true
|
|
1607
|
+
}), i = 0; i < animations.length; i++) {
|
|
1608
|
+
var animation = animations[i], effect = animation.effect, pseudoElement = effect.pseudoElement;
|
|
1609
|
+
if (null != pseudoElement && pseudoElement.startsWith("::view-transition")) {
|
|
1610
|
+
viewTransitionAnimations.push(animation);
|
|
1611
|
+
animation = effect.getKeyframes();
|
|
1612
|
+
for (var height = pseudoElement = void 0, unchangedDimensions = true, j = 0; j < animation.length; j++) {
|
|
1613
|
+
var keyframe = animation[j], w = keyframe.width;
|
|
1614
|
+
if (void 0 === pseudoElement) pseudoElement = w;
|
|
1615
|
+
else if (pseudoElement !== w) {
|
|
1616
|
+
unchangedDimensions = false;
|
|
1617
|
+
break;
|
|
1618
|
+
}
|
|
1619
|
+
w = keyframe.height;
|
|
1620
|
+
if (void 0 === height) height = w;
|
|
1621
|
+
else if (height !== w) {
|
|
1622
|
+
unchangedDimensions = false;
|
|
1623
|
+
break;
|
|
1624
|
+
}
|
|
1625
|
+
delete keyframe.width;
|
|
1626
|
+
delete keyframe.height;
|
|
1627
|
+
"none" === keyframe.transform && delete keyframe.transform;
|
|
1628
|
+
}
|
|
1629
|
+
unchangedDimensions && void 0 !== pseudoElement && void 0 !== height && (effect.setKeyframes(animation), unchangedDimensions = getComputedStyle(
|
|
1630
|
+
effect.target,
|
|
1631
|
+
effect.pseudoElement
|
|
1632
|
+
), unchangedDimensions.width !== pseudoElement || unchangedDimensions.height !== height) && (unchangedDimensions = animation[0], unchangedDimensions.width = pseudoElement, unchangedDimensions.height = height, unchangedDimensions = animation[animation.length - 1], unchangedDimensions.width = pseudoElement, unchangedDimensions.height = height, effect.setKeyframes(animation));
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
spawnedWorkCallback();
|
|
1636
|
+
},
|
|
1637
|
+
function(error) {
|
|
1638
|
+
ownerDocument.__reactViewTransition === transition && (ownerDocument.__reactViewTransition = null);
|
|
1639
|
+
try {
|
|
1640
|
+
if ("object" === typeof error && null !== error)
|
|
1641
|
+
switch (error.name) {
|
|
1642
|
+
case "InvalidStateError":
|
|
1643
|
+
if ("View transition was skipped because document visibility state is hidden." === error.message || "Skipping view transition because document visibility state has become hidden." === error.message || "Skipping view transition because viewport size changed." === error.message || "Transition was aborted because of invalid state" === error.message)
|
|
1644
|
+
error = null;
|
|
1645
|
+
}
|
|
1646
|
+
null !== error && errorCallback(error);
|
|
1647
|
+
} finally {
|
|
1648
|
+
mutationCallback(), layoutCallback(), spawnedWorkCallback();
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
);
|
|
1652
|
+
transition.finished.finally(function() {
|
|
1653
|
+
for (var i = 0; i < viewTransitionAnimations.length; i++)
|
|
1654
|
+
viewTransitionAnimations[i].cancel();
|
|
1655
|
+
ownerDocument.__reactViewTransition === transition && (ownerDocument.__reactViewTransition = null);
|
|
1656
|
+
passiveCallback();
|
|
1657
|
+
});
|
|
1658
|
+
return transition;
|
|
1659
|
+
} catch (x) {
|
|
1660
|
+
return mutationCallback(), layoutCallback(), spawnedWorkCallback(), null;
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
function ViewTransitionPseudoElement(pseudo, name) {
|
|
1664
|
+
this._scope = document.documentElement;
|
|
1665
|
+
this._selector = "::view-transition-" + pseudo + "(" + name + ")";
|
|
1666
|
+
}
|
|
1667
|
+
ViewTransitionPseudoElement.prototype.animate = function(keyframes, options3) {
|
|
1668
|
+
options3 = "number" === typeof options3 ? { duration: options3 } : assign({}, options3);
|
|
1669
|
+
options3.pseudoElement = this._selector;
|
|
1670
|
+
return this._scope.animate(keyframes, options3);
|
|
1671
|
+
};
|
|
1672
|
+
ViewTransitionPseudoElement.prototype.getAnimations = function() {
|
|
1673
|
+
for (var scope = this._scope, selector = this._selector, animations = scope.getAnimations({ subtree: true }), result = [], i = 0; i < animations.length; i++) {
|
|
1674
|
+
var effect = animations[i].effect;
|
|
1675
|
+
null !== effect && effect.target === scope && effect.pseudoElement === selector && result.push(animations[i]);
|
|
1676
|
+
}
|
|
1677
|
+
return result;
|
|
1678
|
+
};
|
|
1679
|
+
ViewTransitionPseudoElement.prototype.getComputedStyle = function() {
|
|
1680
|
+
return getComputedStyle(this._scope, this._selector);
|
|
1681
|
+
};
|
|
1682
|
+
function createViewTransitionInstance(name) {
|
|
1683
|
+
return {
|
|
1684
|
+
name,
|
|
1685
|
+
group: new ViewTransitionPseudoElement("group", name),
|
|
1686
|
+
imagePair: new ViewTransitionPseudoElement("image-pair", name),
|
|
1687
|
+
old: new ViewTransitionPseudoElement("old", name),
|
|
1688
|
+
new: new ViewTransitionPseudoElement("new", name)
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
function FragmentInstance(fragmentFiber) {
|
|
1692
|
+
this._fragmentFiber = fragmentFiber;
|
|
1693
|
+
this._observers = this._eventListeners = null;
|
|
1694
|
+
}
|
|
1695
|
+
FragmentInstance.prototype.addEventListener = function(type, listener, optionsOrUseCapture) {
|
|
1696
|
+
var signal = null, cleanup = null;
|
|
1697
|
+
if (null != optionsOrUseCapture && "boolean" !== typeof optionsOrUseCapture && (signal = optionsOrUseCapture.signal || null, null !== signal && signal.aborted))
|
|
1698
|
+
return;
|
|
1699
|
+
null === this._eventListeners && (this._eventListeners = []);
|
|
1700
|
+
var listeners = this._eventListeners;
|
|
1701
|
+
if (-1 === indexOfEventListener(listeners, type, listener, optionsOrUseCapture)) {
|
|
1702
|
+
var fragmentInstance = this, attachedListener = listener;
|
|
1703
|
+
null != optionsOrUseCapture && "boolean" !== typeof optionsOrUseCapture && true === optionsOrUseCapture.once && (attachedListener = function(event) {
|
|
1704
|
+
fragmentInstance.removeEventListener(
|
|
1705
|
+
type,
|
|
1706
|
+
listener,
|
|
1707
|
+
optionsOrUseCapture
|
|
1708
|
+
);
|
|
1709
|
+
"function" === typeof listener ? listener.call(this, event) : listener.handleEvent(event);
|
|
1710
|
+
});
|
|
1711
|
+
null !== signal && (cleanup = fragmentInstance.removeEventListener.bind(
|
|
1712
|
+
fragmentInstance,
|
|
1713
|
+
type,
|
|
1714
|
+
listener,
|
|
1715
|
+
optionsOrUseCapture
|
|
1716
|
+
), signal.addEventListener("abort", cleanup, { once: true }), cleanup = signal.removeEventListener.bind(signal, "abort", cleanup));
|
|
1717
|
+
signal = getAttachOptions(optionsOrUseCapture);
|
|
1718
|
+
listeners.push({
|
|
1719
|
+
type,
|
|
1720
|
+
listener,
|
|
1721
|
+
optionsOrUseCapture,
|
|
1722
|
+
attachedListener,
|
|
1723
|
+
cleanup
|
|
1724
|
+
});
|
|
1725
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1726
|
+
this._fragmentFiber.child,
|
|
1727
|
+
false,
|
|
1728
|
+
addEventListenerToChild,
|
|
1729
|
+
type,
|
|
1730
|
+
attachedListener,
|
|
1731
|
+
signal
|
|
1732
|
+
);
|
|
1733
|
+
}
|
|
1734
|
+
this._eventListeners = listeners;
|
|
1735
|
+
};
|
|
1736
|
+
function addEventListenerToChild(child, type, listener, optionsOrUseCapture) {
|
|
1737
|
+
getInstanceFromHostFiber(child).addEventListener(
|
|
1738
|
+
type,
|
|
1739
|
+
listener,
|
|
1740
|
+
optionsOrUseCapture
|
|
1741
|
+
);
|
|
1742
|
+
return false;
|
|
1743
|
+
}
|
|
1744
|
+
FragmentInstance.prototype.removeEventListener = function(type, listener, optionsOrUseCapture) {
|
|
1745
|
+
var listeners = this._eventListeners;
|
|
1746
|
+
if (null !== listeners && (listener = indexOfEventListener(
|
|
1747
|
+
listeners,
|
|
1748
|
+
type,
|
|
1749
|
+
listener,
|
|
1750
|
+
optionsOrUseCapture
|
|
1751
|
+
), -1 !== listener)) {
|
|
1752
|
+
var _listeners$index = listeners[listener];
|
|
1753
|
+
optionsOrUseCapture = _listeners$index.attachedListener;
|
|
1754
|
+
var cleanup = _listeners$index.cleanup;
|
|
1755
|
+
_listeners$index = getAttachOptions(_listeners$index.optionsOrUseCapture);
|
|
1756
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1757
|
+
this._fragmentFiber.child,
|
|
1758
|
+
false,
|
|
1759
|
+
removeEventListenerFromChild,
|
|
1760
|
+
type,
|
|
1761
|
+
optionsOrUseCapture,
|
|
1762
|
+
_listeners$index
|
|
1763
|
+
);
|
|
1764
|
+
listeners.splice(listener, 1);
|
|
1765
|
+
null !== cleanup && cleanup();
|
|
1766
|
+
}
|
|
1767
|
+
};
|
|
1768
|
+
function removeEventListenerFromChild(child, type, listener, optionsOrUseCapture) {
|
|
1769
|
+
getInstanceFromHostFiber(child).removeEventListener(
|
|
1770
|
+
type,
|
|
1771
|
+
listener,
|
|
1772
|
+
optionsOrUseCapture
|
|
1773
|
+
);
|
|
1774
|
+
return false;
|
|
1775
|
+
}
|
|
1776
|
+
function getAttachOptions(opts) {
|
|
1777
|
+
return null != opts && "boolean" !== typeof opts && (true === opts.once || opts.signal instanceof AbortSignal) ? { capture: opts.capture, passive: opts.passive } : opts;
|
|
1778
|
+
}
|
|
1779
|
+
function normalizeListenerOptions(opts) {
|
|
1780
|
+
return null == opts ? "c=0" : "boolean" === typeof opts ? "c=" + (opts ? "1" : "0") : "c=" + (opts.capture ? "1" : "0");
|
|
1781
|
+
}
|
|
1782
|
+
function indexOfEventListener(eventListeners, type, listener, optionsOrUseCapture) {
|
|
1783
|
+
if (0 === eventListeners.length) return -1;
|
|
1784
|
+
optionsOrUseCapture = normalizeListenerOptions(optionsOrUseCapture);
|
|
1785
|
+
for (var i = 0; i < eventListeners.length; i++) {
|
|
1786
|
+
var item = eventListeners[i];
|
|
1787
|
+
if (item.type === type && item.listener === listener && normalizeListenerOptions(item.optionsOrUseCapture) === optionsOrUseCapture)
|
|
1788
|
+
return i;
|
|
1789
|
+
}
|
|
1790
|
+
return -1;
|
|
1791
|
+
}
|
|
1792
|
+
FragmentInstance.prototype.dispatchEvent = function(event) {
|
|
1793
|
+
var parentHostFiber = getFragmentParentInstanceOrContainerFiber(
|
|
1794
|
+
this._fragmentFiber
|
|
1795
|
+
);
|
|
1796
|
+
if (null === parentHostFiber) return true;
|
|
1797
|
+
parentHostFiber = getInstanceFromHostFiber(parentHostFiber);
|
|
1798
|
+
var eventListeners = this._eventListeners;
|
|
1799
|
+
if (null !== eventListeners && 0 < eventListeners.length || !event.bubbles) {
|
|
1800
|
+
var temp = 9 === parentHostFiber.nodeType ? parentHostFiber.createComment("") : document.createTextNode("");
|
|
1801
|
+
if (eventListeners)
|
|
1802
|
+
for (var i = 0; i < eventListeners.length; i++) {
|
|
1803
|
+
var _eventListeners$i = eventListeners[i];
|
|
1804
|
+
temp.addEventListener(
|
|
1805
|
+
_eventListeners$i.type,
|
|
1806
|
+
_eventListeners$i.attachedListener,
|
|
1807
|
+
getAttachOptions(_eventListeners$i.optionsOrUseCapture)
|
|
1808
|
+
);
|
|
1809
|
+
}
|
|
1810
|
+
parentHostFiber.appendChild(temp);
|
|
1811
|
+
event = temp.dispatchEvent(event);
|
|
1812
|
+
if (eventListeners)
|
|
1813
|
+
for (i = 0; i < eventListeners.length; i++)
|
|
1814
|
+
_eventListeners$i = eventListeners[i], temp.removeEventListener(
|
|
1815
|
+
_eventListeners$i.type,
|
|
1816
|
+
_eventListeners$i.attachedListener,
|
|
1817
|
+
getAttachOptions(_eventListeners$i.optionsOrUseCapture)
|
|
1818
|
+
);
|
|
1819
|
+
parentHostFiber.removeChild(temp);
|
|
1820
|
+
return event;
|
|
1821
|
+
}
|
|
1822
|
+
return parentHostFiber.dispatchEvent(event);
|
|
1823
|
+
};
|
|
1824
|
+
FragmentInstance.prototype.focus = function(focusOptions) {
|
|
1825
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1826
|
+
this._fragmentFiber.child,
|
|
1827
|
+
true,
|
|
1828
|
+
setFocusOnFiberIfFocusable,
|
|
1829
|
+
focusOptions,
|
|
1830
|
+
void 0,
|
|
1831
|
+
void 0
|
|
1832
|
+
);
|
|
1833
|
+
};
|
|
1834
|
+
function setFocusOnFiberIfFocusable(fiber, focusOptions) {
|
|
1835
|
+
if (6 === fiber.tag) return false;
|
|
1836
|
+
fiber = getInstanceFromHostFiber(fiber);
|
|
1837
|
+
return setFocusIfFocusable(fiber, focusOptions);
|
|
1838
|
+
}
|
|
1839
|
+
FragmentInstance.prototype.focusLast = function(focusOptions) {
|
|
1840
|
+
var children = [];
|
|
1841
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1842
|
+
this._fragmentFiber.child,
|
|
1843
|
+
true,
|
|
1844
|
+
collectChildren,
|
|
1845
|
+
children,
|
|
1846
|
+
void 0,
|
|
1847
|
+
void 0
|
|
1848
|
+
);
|
|
1849
|
+
for (var i = children.length - 1; 0 <= i && !setFocusOnFiberIfFocusable(children[i], focusOptions); i--) ;
|
|
1850
|
+
};
|
|
1851
|
+
function collectChildren(child, collection) {
|
|
1852
|
+
collection.push(child);
|
|
1853
|
+
return false;
|
|
1854
|
+
}
|
|
1855
|
+
FragmentInstance.prototype.blur = function() {
|
|
1856
|
+
var parentHostFiber = getFragmentParentInstanceOrContainerFiber(
|
|
1857
|
+
this._fragmentFiber
|
|
1858
|
+
);
|
|
1859
|
+
null !== parentHostFiber && (parentHostFiber = getInstanceFromHostFiber(parentHostFiber), parentHostFiber = getOwnerDocumentFromRootContainer(parentHostFiber).activeElement, null !== parentHostFiber && traverseVisibleInstancesAndTextInstances(
|
|
1860
|
+
this._fragmentFiber.child,
|
|
1861
|
+
false,
|
|
1862
|
+
blurActiveElementWithinFragment,
|
|
1863
|
+
parentHostFiber,
|
|
1864
|
+
void 0,
|
|
1865
|
+
void 0
|
|
1866
|
+
));
|
|
1867
|
+
};
|
|
1868
|
+
function blurActiveElementWithinFragment(child, activeElement2) {
|
|
1869
|
+
if (6 === child.tag) return false;
|
|
1870
|
+
child = getInstanceFromHostFiber(child);
|
|
1871
|
+
return child === activeElement2 || child.contains(activeElement2) ? (activeElement2.blur(), true) : false;
|
|
1872
|
+
}
|
|
1873
|
+
FragmentInstance.prototype.observeUsing = function(observer) {
|
|
1874
|
+
null === this._observers && (this._observers = /* @__PURE__ */ new Set());
|
|
1875
|
+
this._observers.add(observer);
|
|
1876
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1877
|
+
this._fragmentFiber.child,
|
|
1878
|
+
false,
|
|
1879
|
+
observeChild,
|
|
1880
|
+
observer,
|
|
1881
|
+
void 0,
|
|
1882
|
+
void 0
|
|
1883
|
+
);
|
|
1884
|
+
};
|
|
1885
|
+
function observeChild(child, observer) {
|
|
1886
|
+
if (6 === child.tag) return false;
|
|
1887
|
+
child = getInstanceFromHostFiber(child);
|
|
1888
|
+
observer.observe(child);
|
|
1889
|
+
return false;
|
|
1890
|
+
}
|
|
1891
|
+
FragmentInstance.prototype.unobserveUsing = function(observer) {
|
|
1892
|
+
var observers = this._observers;
|
|
1893
|
+
if (null !== observers && observers.has(observer)) {
|
|
1894
|
+
observers.delete(observer);
|
|
1895
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1896
|
+
this._fragmentFiber.child,
|
|
1897
|
+
false,
|
|
1898
|
+
unobserveChild,
|
|
1899
|
+
observer,
|
|
1900
|
+
void 0,
|
|
1901
|
+
void 0
|
|
1902
|
+
);
|
|
1903
|
+
for (var i = observers = 0; i < pendingIntersectionUnobserves.length; i++) {
|
|
1904
|
+
var pending = pendingIntersectionUnobserves[i];
|
|
1905
|
+
pending.fragmentInstance === this && pending.observer === observer ? observer.unobserve(pending.instance) : pendingIntersectionUnobserves[observers++] = pending;
|
|
1906
|
+
}
|
|
1907
|
+
pendingIntersectionUnobserves.length = observers;
|
|
1908
|
+
}
|
|
1909
|
+
};
|
|
1910
|
+
function unobserveChild(child, observer) {
|
|
1911
|
+
if (6 === child.tag) return false;
|
|
1912
|
+
child = getInstanceFromHostFiber(child);
|
|
1913
|
+
observer.unobserve(child);
|
|
1914
|
+
return false;
|
|
1915
|
+
}
|
|
1916
|
+
var pendingIntersectionUnobserves = [];
|
|
1917
|
+
var intersectionUnobserveScheduled = false;
|
|
1918
|
+
function schedulePendingIntersectionUnobserve(fragmentInstance, observer, instance) {
|
|
1919
|
+
pendingIntersectionUnobserves.push({
|
|
1920
|
+
fragmentInstance,
|
|
1921
|
+
observer,
|
|
1922
|
+
instance
|
|
1923
|
+
});
|
|
1924
|
+
intersectionUnobserveScheduled || (intersectionUnobserveScheduled = true, requestPostPaintCallback(function() {
|
|
1925
|
+
intersectionUnobserveScheduled = false;
|
|
1926
|
+
var pending = pendingIntersectionUnobserves;
|
|
1927
|
+
pendingIntersectionUnobserves = [];
|
|
1928
|
+
for (var i = 0; i < pending.length; i++) {
|
|
1929
|
+
var item = pending[i];
|
|
1930
|
+
item.observer.unobserve(item.instance);
|
|
1931
|
+
}
|
|
1932
|
+
}));
|
|
1933
|
+
}
|
|
1934
|
+
FragmentInstance.prototype.getClientRects = function() {
|
|
1935
|
+
var rects = [];
|
|
1936
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1937
|
+
this._fragmentFiber.child,
|
|
1938
|
+
false,
|
|
1939
|
+
collectClientRects,
|
|
1940
|
+
rects,
|
|
1941
|
+
void 0,
|
|
1942
|
+
void 0
|
|
1943
|
+
);
|
|
1944
|
+
return rects;
|
|
1945
|
+
};
|
|
1946
|
+
function collectClientRects(child, rects) {
|
|
1947
|
+
if (6 === child.tag) {
|
|
1948
|
+
child = child.stateNode;
|
|
1949
|
+
var range = child.ownerDocument.createRange();
|
|
1950
|
+
range.selectNodeContents(child);
|
|
1951
|
+
rects.push.apply(rects, range.getClientRects());
|
|
1952
|
+
} else
|
|
1953
|
+
child = getInstanceFromHostFiber(child), rects.push.apply(rects, child.getClientRects());
|
|
1954
|
+
return false;
|
|
1955
|
+
}
|
|
1956
|
+
FragmentInstance.prototype.getRootNode = function(getRootNodeOptions) {
|
|
1957
|
+
var parentHostFiber = getFragmentParentInstanceOrContainerFiber(
|
|
1958
|
+
this._fragmentFiber
|
|
1959
|
+
);
|
|
1960
|
+
return null === parentHostFiber ? this : getInstanceFromHostFiber(parentHostFiber).getRootNode(getRootNodeOptions);
|
|
1961
|
+
};
|
|
1962
|
+
FragmentInstance.prototype.compareDocumentPosition = function(otherNode) {
|
|
1963
|
+
var parentHostFiber = getFragmentParentInstanceOrContainerFiber(
|
|
1964
|
+
this._fragmentFiber
|
|
1965
|
+
);
|
|
1966
|
+
if (null === parentHostFiber) return Node.DOCUMENT_POSITION_DISCONNECTED;
|
|
1967
|
+
var children = [];
|
|
1968
|
+
traverseVisibleInstancesAndTextInstances(
|
|
1969
|
+
this._fragmentFiber.child,
|
|
1970
|
+
false,
|
|
1971
|
+
collectChildren,
|
|
1972
|
+
children,
|
|
1973
|
+
void 0,
|
|
1974
|
+
void 0
|
|
1975
|
+
);
|
|
1976
|
+
var parentHostInstance = getInstanceFromHostFiber(parentHostFiber);
|
|
1977
|
+
if (0 === children.length) {
|
|
1978
|
+
children = parentHostInstance;
|
|
1979
|
+
if (fiberIsPortaledIntoHost(this._fragmentFiber)) {
|
|
1980
|
+
a: {
|
|
1981
|
+
for (parentHostFiber = this._fragmentFiber.return; null !== parentHostFiber; ) {
|
|
1982
|
+
if (4 === parentHostFiber.tag) {
|
|
1983
|
+
parentHostFiber = parentHostFiber.stateNode.containerInfo;
|
|
1984
|
+
break a;
|
|
1985
|
+
}
|
|
1986
|
+
if (3 === parentHostFiber.tag || 5 === parentHostFiber.tag || 27 === parentHostFiber.tag)
|
|
1987
|
+
break;
|
|
1988
|
+
parentHostFiber = parentHostFiber.return;
|
|
1989
|
+
}
|
|
1990
|
+
parentHostFiber = null;
|
|
1991
|
+
}
|
|
1992
|
+
null != parentHostFiber && (children = parentHostFiber);
|
|
1993
|
+
}
|
|
1994
|
+
parentHostFiber = this._fragmentFiber;
|
|
1995
|
+
var result = parentHostInstance = children.compareDocumentPosition(otherNode);
|
|
1996
|
+
children === otherNode ? result = Node.DOCUMENT_POSITION_CONTAINS : parentHostInstance & Node.DOCUMENT_POSITION_CONTAINED_BY && (children = getFragmentInstanceOrTextInstanceSiblings(parentHostFiber)[1], null === children ? result = Node.DOCUMENT_POSITION_PRECEDING : (otherNode = getInstanceFromHostFiber(children).compareDocumentPosition(
|
|
1997
|
+
otherNode
|
|
1998
|
+
), result = 0 === otherNode || otherNode & Node.DOCUMENT_POSITION_FOLLOWING ? Node.DOCUMENT_POSITION_FOLLOWING : Node.DOCUMENT_POSITION_PRECEDING));
|
|
1999
|
+
return result |= Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
|
|
2000
|
+
}
|
|
2001
|
+
parentHostFiber = getInstanceFromHostFiber(children[0]);
|
|
2002
|
+
result = getInstanceFromHostFiber(children[children.length - 1]);
|
|
2003
|
+
var parentHostInstanceFromDOM = fiberIsPortaledIntoHost(this._fragmentFiber) ? parentHostFiber.parentElement : parentHostInstance;
|
|
2004
|
+
if (null == parentHostInstanceFromDOM)
|
|
2005
|
+
return Node.DOCUMENT_POSITION_DISCONNECTED;
|
|
2006
|
+
parentHostInstance = parentHostInstanceFromDOM.compareDocumentPosition(parentHostFiber) & Node.DOCUMENT_POSITION_CONTAINED_BY;
|
|
2007
|
+
parentHostInstanceFromDOM = parentHostInstanceFromDOM.compareDocumentPosition(result) & Node.DOCUMENT_POSITION_CONTAINED_BY;
|
|
2008
|
+
var firstResult = parentHostFiber.compareDocumentPosition(otherNode), lastResult = result.compareDocumentPosition(otherNode), otherNodeIsWithinFirstOrLastChild = firstResult & Node.DOCUMENT_POSITION_CONTAINED_BY || lastResult & Node.DOCUMENT_POSITION_CONTAINED_BY;
|
|
2009
|
+
lastResult = parentHostInstance && parentHostInstanceFromDOM && firstResult & Node.DOCUMENT_POSITION_FOLLOWING && lastResult & Node.DOCUMENT_POSITION_PRECEDING;
|
|
2010
|
+
parentHostFiber = parentHostInstance && parentHostFiber === otherNode || parentHostInstanceFromDOM && result === otherNode || otherNodeIsWithinFirstOrLastChild || lastResult ? Node.DOCUMENT_POSITION_CONTAINED_BY : !parentHostInstance && parentHostFiber === otherNode || !parentHostInstanceFromDOM && result === otherNode ? Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC : firstResult;
|
|
2011
|
+
return parentHostFiber & Node.DOCUMENT_POSITION_DISCONNECTED || parentHostFiber & Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC || validateDocumentPositionWithFiberTree(
|
|
2012
|
+
parentHostFiber,
|
|
2013
|
+
this._fragmentFiber,
|
|
2014
|
+
children[0],
|
|
2015
|
+
children[children.length - 1],
|
|
2016
|
+
otherNode
|
|
2017
|
+
) ? parentHostFiber : Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
|
|
2018
|
+
};
|
|
2019
|
+
function validateDocumentPositionWithFiberTree(documentPosition, fragmentFiber, precedingBoundaryFiber, followingBoundaryFiber, otherNode) {
|
|
2020
|
+
var otherFiber = getClosestInstanceFromNode(otherNode);
|
|
2021
|
+
if (documentPosition & Node.DOCUMENT_POSITION_CONTAINED_BY) {
|
|
2022
|
+
if (precedingBoundaryFiber = !!otherFiber)
|
|
2023
|
+
a: {
|
|
2024
|
+
for (; null !== otherFiber; ) {
|
|
2025
|
+
if (7 === otherFiber.tag && (otherFiber === fragmentFiber || otherFiber.alternate === fragmentFiber)) {
|
|
2026
|
+
precedingBoundaryFiber = true;
|
|
2027
|
+
break a;
|
|
2028
|
+
}
|
|
2029
|
+
otherFiber = otherFiber.return;
|
|
2030
|
+
}
|
|
2031
|
+
precedingBoundaryFiber = false;
|
|
2032
|
+
}
|
|
2033
|
+
return precedingBoundaryFiber;
|
|
2034
|
+
}
|
|
2035
|
+
if (documentPosition & Node.DOCUMENT_POSITION_CONTAINS) {
|
|
2036
|
+
if (null === otherFiber)
|
|
2037
|
+
return otherFiber = otherNode.ownerDocument, otherNode === otherFiber || otherNode === otherFiber.documentElement || otherNode === otherFiber.body;
|
|
2038
|
+
a: {
|
|
2039
|
+
otherFiber = fragmentFiber;
|
|
2040
|
+
for (fragmentFiber = getFragmentParentInstanceOrContainerFiber(fragmentFiber); null !== otherFiber; ) {
|
|
2041
|
+
if (!(5 !== otherFiber.tag && 3 !== otherFiber.tag && 27 !== otherFiber.tag || otherFiber !== fragmentFiber && otherFiber.alternate !== fragmentFiber)) {
|
|
2042
|
+
otherFiber = true;
|
|
2043
|
+
break a;
|
|
2044
|
+
}
|
|
2045
|
+
otherFiber = otherFiber.return;
|
|
2046
|
+
}
|
|
2047
|
+
otherFiber = false;
|
|
2048
|
+
}
|
|
2049
|
+
return otherFiber;
|
|
2050
|
+
}
|
|
2051
|
+
return documentPosition & Node.DOCUMENT_POSITION_PRECEDING ? ((fragmentFiber = !!otherFiber) && !(fragmentFiber = otherFiber === precedingBoundaryFiber) && (fragmentFiber = getLowestCommonAncestor(
|
|
2052
|
+
precedingBoundaryFiber,
|
|
2053
|
+
otherFiber,
|
|
2054
|
+
getParentForFragmentAncestors
|
|
2055
|
+
), null === fragmentFiber ? fragmentFiber = false : (traverseVisibleInstancesAndTextInstances(
|
|
2056
|
+
fragmentFiber,
|
|
2057
|
+
true,
|
|
2058
|
+
isFiberPrecedingCheck,
|
|
2059
|
+
otherFiber,
|
|
2060
|
+
precedingBoundaryFiber
|
|
2061
|
+
), otherFiber = searchTarget, searchTarget = null, fragmentFiber = null !== otherFiber)), fragmentFiber) : documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? ((fragmentFiber = !!otherFiber) && !(fragmentFiber = otherFiber === followingBoundaryFiber) && (fragmentFiber = getLowestCommonAncestor(
|
|
2062
|
+
followingBoundaryFiber,
|
|
2063
|
+
otherFiber,
|
|
2064
|
+
getParentForFragmentAncestors
|
|
2065
|
+
), null === fragmentFiber ? fragmentFiber = false : (traverseVisibleInstancesAndTextInstances(
|
|
2066
|
+
fragmentFiber,
|
|
2067
|
+
true,
|
|
2068
|
+
isFiberFollowingCheck,
|
|
2069
|
+
otherFiber,
|
|
2070
|
+
followingBoundaryFiber
|
|
2071
|
+
), otherFiber = searchTarget, searchBoundary = searchTarget = null, fragmentFiber = null !== otherFiber)), fragmentFiber) : false;
|
|
2072
|
+
}
|
|
2073
|
+
function scrollTextNodeIntoView(textNode, resolvedAlignToTop) {
|
|
2074
|
+
var range = textNode.ownerDocument.createRange();
|
|
2075
|
+
range.selectNodeContents(textNode);
|
|
2076
|
+
textNode = range.getBoundingClientRect();
|
|
2077
|
+
window.scrollTo(
|
|
2078
|
+
window.scrollX + textNode.left,
|
|
2079
|
+
resolvedAlignToTop ? window.scrollY + textNode.top : window.scrollY + textNode.bottom - window.innerHeight
|
|
2080
|
+
);
|
|
2081
|
+
}
|
|
2082
|
+
FragmentInstance.prototype.scrollIntoView = function(alignToTop) {
|
|
2083
|
+
if ("object" === typeof alignToTop) throw Error(formatProdErrorMessage(566));
|
|
2084
|
+
var children = [];
|
|
2085
|
+
traverseVisibleInstancesAndTextInstances(
|
|
2086
|
+
this._fragmentFiber.child,
|
|
2087
|
+
false,
|
|
2088
|
+
collectChildren,
|
|
2089
|
+
children,
|
|
2090
|
+
void 0,
|
|
2091
|
+
void 0
|
|
2092
|
+
);
|
|
2093
|
+
var resolvedAlignToTop = false !== alignToTop;
|
|
2094
|
+
if (0 === children.length) {
|
|
2095
|
+
var hostSiblings = getFragmentInstanceOrTextInstanceSiblings(
|
|
2096
|
+
this._fragmentFiber
|
|
2097
|
+
);
|
|
2098
|
+
hostSiblings = resolvedAlignToTop ? hostSiblings[1] || hostSiblings[0] || getFragmentParentInstanceOrContainerFiber(this._fragmentFiber) : hostSiblings[0] || hostSiblings[1];
|
|
2099
|
+
if (null === hostSiblings) return;
|
|
2100
|
+
if (6 === hostSiblings.tag) {
|
|
2101
|
+
alignToTop = getInstanceFromHostFiber(hostSiblings);
|
|
2102
|
+
scrollTextNodeIntoView(alignToTop, resolvedAlignToTop);
|
|
2103
|
+
return;
|
|
2104
|
+
}
|
|
2105
|
+
hostSiblings = getInstanceFromHostFiber(hostSiblings);
|
|
2106
|
+
if (9 !== hostSiblings.nodeType) {
|
|
2107
|
+
if (11 === hostSiblings.nodeType) {
|
|
2108
|
+
resolvedAlignToTop = "host" in hostSiblings ? hostSiblings.host : null;
|
|
2109
|
+
null !== resolvedAlignToTop && resolvedAlignToTop.scrollIntoView(alignToTop);
|
|
2110
|
+
return;
|
|
2111
|
+
}
|
|
2112
|
+
hostSiblings.scrollIntoView(alignToTop);
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
for (hostSiblings = resolvedAlignToTop ? children.length - 1 : 0; hostSiblings !== (resolvedAlignToTop ? -1 : children.length); ) {
|
|
2116
|
+
var child = children[hostSiblings];
|
|
2117
|
+
6 === child.tag ? (child = getInstanceFromHostFiber(child), scrollTextNodeIntoView(child, resolvedAlignToTop)) : getInstanceFromHostFiber(child).scrollIntoView(alignToTop);
|
|
2118
|
+
hostSiblings += resolvedAlignToTop ? -1 : 1;
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
function addFragmentHandleToFiber(child, fragmentInstance) {
|
|
2122
|
+
child = getInstanceFromHostFiber(child);
|
|
2123
|
+
addFragmentHandleToInstance(child, fragmentInstance);
|
|
2124
|
+
return false;
|
|
2125
|
+
}
|
|
2126
|
+
function addFragmentHandleToInstance(instance, fragmentInstance) {
|
|
2127
|
+
null == instance.reactFragments && (instance.reactFragments = /* @__PURE__ */ new Set());
|
|
2128
|
+
instance.reactFragments.add(fragmentInstance);
|
|
2129
|
+
}
|
|
2130
|
+
function commitNewChildToFragmentInstance(childInstance, fragmentInstance) {
|
|
2131
|
+
var eventListeners = fragmentInstance._eventListeners;
|
|
2132
|
+
if (null !== eventListeners)
|
|
2133
|
+
for (var i$jscomp$0 = 0; i$jscomp$0 < eventListeners.length; i$jscomp$0++) {
|
|
2134
|
+
var _eventListeners$i3 = eventListeners[i$jscomp$0];
|
|
2135
|
+
childInstance.addEventListener(
|
|
2136
|
+
_eventListeners$i3.type,
|
|
2137
|
+
_eventListeners$i3.attachedListener,
|
|
2138
|
+
getAttachOptions(_eventListeners$i3.optionsOrUseCapture)
|
|
2139
|
+
);
|
|
2140
|
+
}
|
|
2141
|
+
3 !== childInstance.nodeType && (eventListeners = fragmentInstance._observers, null !== eventListeners && eventListeners.forEach(function(observer) {
|
|
2142
|
+
for (var writeIdx = 0, i = 0; i < pendingIntersectionUnobserves.length; i++) {
|
|
2143
|
+
var pending = pendingIntersectionUnobserves[i];
|
|
2144
|
+
if (pending.fragmentInstance !== fragmentInstance || pending.observer !== observer || pending.instance !== childInstance)
|
|
2145
|
+
pendingIntersectionUnobserves[writeIdx++] = pending;
|
|
2146
|
+
}
|
|
2147
|
+
pendingIntersectionUnobserves.length = writeIdx;
|
|
2148
|
+
observer.observe(childInstance);
|
|
2149
|
+
}), addFragmentHandleToInstance(childInstance, fragmentInstance));
|
|
2150
|
+
}
|
|
2151
|
+
function deleteChildFromFragmentInstance(childInstance, fragmentInstance) {
|
|
2152
|
+
var eventListeners = fragmentInstance._eventListeners;
|
|
2153
|
+
if (null !== eventListeners)
|
|
2154
|
+
for (var i = 0; i < eventListeners.length; i++) {
|
|
2155
|
+
var _eventListeners$i4 = eventListeners[i];
|
|
2156
|
+
childInstance.removeEventListener(
|
|
2157
|
+
_eventListeners$i4.type,
|
|
2158
|
+
_eventListeners$i4.attachedListener,
|
|
2159
|
+
getAttachOptions(_eventListeners$i4.optionsOrUseCapture)
|
|
2160
|
+
);
|
|
2161
|
+
}
|
|
2162
|
+
3 !== childInstance.nodeType && (eventListeners = fragmentInstance._observers, null !== eventListeners && eventListeners.forEach(function(observer) {
|
|
2163
|
+
"string" === typeof observer.rootMargin ? schedulePendingIntersectionUnobserve(
|
|
2164
|
+
fragmentInstance,
|
|
2165
|
+
observer,
|
|
2166
|
+
childInstance
|
|
2167
|
+
) : observer.unobserve(childInstance);
|
|
2168
|
+
}), null != childInstance.reactFragments && childInstance.reactFragments.delete(fragmentInstance));
|
|
2169
|
+
}
|
|
1491
2170
|
function clearContainerSparingly(container) {
|
|
1492
2171
|
var nextNode = container.firstChild;
|
|
1493
2172
|
nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
|
|
@@ -1633,6 +2312,26 @@
|
|
|
1633
2312
|
}
|
|
1634
2313
|
return null;
|
|
1635
2314
|
}
|
|
2315
|
+
function setFocusIfFocusable(node, focusOptions) {
|
|
2316
|
+
function handleFocus() {
|
|
2317
|
+
didFocus = true;
|
|
2318
|
+
}
|
|
2319
|
+
if (node.ownerDocument.activeElement === node) return true;
|
|
2320
|
+
var didFocus = false;
|
|
2321
|
+
try {
|
|
2322
|
+
node.ownerDocument.addEventListener("focus", handleFocus, true), (node.focus || HTMLElement.prototype.focus).call(node, focusOptions);
|
|
2323
|
+
} finally {
|
|
2324
|
+
node.ownerDocument.removeEventListener("focus", handleFocus, true);
|
|
2325
|
+
}
|
|
2326
|
+
return didFocus;
|
|
2327
|
+
}
|
|
2328
|
+
function requestPostPaintCallback(callback) {
|
|
2329
|
+
localRequestAnimationFrame(function() {
|
|
2330
|
+
localRequestAnimationFrame(function(time) {
|
|
2331
|
+
return callback(time);
|
|
2332
|
+
});
|
|
2333
|
+
});
|
|
2334
|
+
}
|
|
1636
2335
|
function resolveSingletonInstance(type, props, rootContainerInstance) {
|
|
1637
2336
|
props = getOwnerDocumentFromRootContainer(rootContainerInstance);
|
|
1638
2337
|
switch (type) {
|
|
@@ -1652,7 +2351,16 @@
|
|
|
1652
2351
|
throw Error(formatProdErrorMessage(451));
|
|
1653
2352
|
}
|
|
1654
2353
|
}
|
|
1655
|
-
function releaseSingletonInstance(instance) {
|
|
2354
|
+
function releaseSingletonInstance(instance, type, props) {
|
|
2355
|
+
for (var propKey in props) {
|
|
2356
|
+
var propValue = props[propKey];
|
|
2357
|
+
props.hasOwnProperty(propKey) && null != propValue && setProp(instance, type, propKey, null, emptyProps, propValue);
|
|
2358
|
+
}
|
|
2359
|
+
null != props.dangerouslySetInnerHTML && (instance.textContent = "");
|
|
2360
|
+
instance.onclick === noop$1 && (instance.onclick = null);
|
|
2361
|
+
detachDeletedInstance(instance);
|
|
2362
|
+
}
|
|
2363
|
+
function clearSingletonPreambleContribution(instance) {
|
|
1656
2364
|
for (var attributes = instance.attributes; attributes.length; )
|
|
1657
2365
|
instance.removeAttributeNode(attributes[0]);
|
|
1658
2366
|
detachDeletedInstance(instance);
|
|
@@ -1660,7 +2368,11 @@
|
|
|
1660
2368
|
var preloadPropsMap = /* @__PURE__ */ new Map();
|
|
1661
2369
|
var preconnectsSet = /* @__PURE__ */ new Set();
|
|
1662
2370
|
function getHoistableRoot(container) {
|
|
1663
|
-
|
|
2371
|
+
if ("function" === typeof container.getRootNode) {
|
|
2372
|
+
var rootNode = container.getRootNode();
|
|
2373
|
+
if (9 === rootNode.nodeType || 11 === rootNode.nodeType) return rootNode;
|
|
2374
|
+
}
|
|
2375
|
+
return 9 === container.nodeType ? container : container.ownerDocument;
|
|
1664
2376
|
}
|
|
1665
2377
|
var previousDispatcher = ReactDOMSharedInternals.d;
|
|
1666
2378
|
ReactDOMSharedInternals.d = {
|
|
@@ -1718,14 +2430,22 @@
|
|
|
1718
2430
|
case "script":
|
|
1719
2431
|
key = getScriptKey(href);
|
|
1720
2432
|
}
|
|
1721
|
-
preloadPropsMap.has(key) || (href = assign(
|
|
2433
|
+
if (!(preloadPropsMap.has(key) || (href = assign(
|
|
1722
2434
|
{
|
|
1723
2435
|
rel: "preload",
|
|
1724
2436
|
href: "image" === as && options3 && options3.imageSrcSet ? void 0 : href,
|
|
1725
2437
|
as
|
|
1726
2438
|
},
|
|
1727
2439
|
options3
|
|
1728
|
-
), preloadPropsMap.set(key, href), null !== ownerDocument.querySelector(preloadSelector) || "style" === as && ownerDocument.querySelector(getStylesheetSelectorFromKey(key)) || "script" === as && ownerDocument.querySelector(getScriptSelectorFromKey(key))
|
|
2440
|
+
), preloadPropsMap.set(key, href), null !== ownerDocument.querySelector(preloadSelector) || "style" === as && ownerDocument.querySelector(getStylesheetSelectorFromKey(key)) || "script" === as && ownerDocument.querySelector(getScriptSelectorFromKey(key))))) {
|
|
2441
|
+
var instance = ownerDocument.createElement("link");
|
|
2442
|
+
setInitialProperties(instance, "link", href);
|
|
2443
|
+
"style" === as && (instance[internalLoadPendingKey] = true, instance.onload = instance.onerror = function() {
|
|
2444
|
+
clearPendingLoadOnNode(instance);
|
|
2445
|
+
});
|
|
2446
|
+
markNodeAsHoistable(instance);
|
|
2447
|
+
ownerDocument.head.appendChild(instance);
|
|
2448
|
+
}
|
|
1729
2449
|
}
|
|
1730
2450
|
}
|
|
1731
2451
|
function preloadModule(href, options3) {
|
|
@@ -1839,28 +2559,28 @@
|
|
|
1839
2559
|
case "title":
|
|
1840
2560
|
return null;
|
|
1841
2561
|
case "style":
|
|
1842
|
-
return "string" === typeof pendingProps.precedence && "string" === typeof pendingProps.href ? (
|
|
2562
|
+
return "string" === typeof pendingProps.precedence && "string" === typeof pendingProps.href ? (pendingProps = getStyleKey(pendingProps.href), currentProps = getResourcesFromRoot(
|
|
1843
2563
|
JSCompiler_inline_result
|
|
1844
|
-
).hoistableStyles, currentResource =
|
|
2564
|
+
).hoistableStyles, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
|
|
1845
2565
|
type: "style",
|
|
1846
2566
|
instance: null,
|
|
1847
2567
|
count: 0,
|
|
1848
2568
|
state: null
|
|
1849
|
-
},
|
|
2569
|
+
}, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
|
|
1850
2570
|
case "link":
|
|
1851
2571
|
if ("stylesheet" === pendingProps.rel && "string" === typeof pendingProps.href && "string" === typeof pendingProps.precedence) {
|
|
1852
2572
|
type = getStyleKey(pendingProps.href);
|
|
1853
|
-
var styles$
|
|
2573
|
+
var styles$268 = getResourcesFromRoot(
|
|
1854
2574
|
JSCompiler_inline_result
|
|
1855
|
-
).hoistableStyles, resource$
|
|
1856
|
-
resource$
|
|
2575
|
+
).hoistableStyles, resource$269 = styles$268.get(type);
|
|
2576
|
+
resource$269 || (JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result, resource$269 = {
|
|
1857
2577
|
type: "stylesheet",
|
|
1858
2578
|
instance: null,
|
|
1859
2579
|
count: 0,
|
|
1860
2580
|
state: { loading: 0, preload: null }
|
|
1861
|
-
}, styles$
|
|
2581
|
+
}, styles$268.set(type, resource$269), (styles$268 = JSCompiler_inline_result.querySelector(
|
|
1862
2582
|
getStylesheetSelectorFromKey(type)
|
|
1863
|
-
))
|
|
2583
|
+
)) ? styles$268._p || (resource$269.instance = styles$268, resource$269.state.loading = 5) : (styles$268 = preloadPropsMap.get(type), styles$268 || (styles$268 = {
|
|
1864
2584
|
rel: "preload",
|
|
1865
2585
|
as: "style",
|
|
1866
2586
|
href: pendingProps.href,
|
|
@@ -1869,28 +2589,28 @@
|
|
|
1869
2589
|
media: pendingProps.media,
|
|
1870
2590
|
hrefLang: pendingProps.hrefLang,
|
|
1871
2591
|
referrerPolicy: pendingProps.referrerPolicy
|
|
1872
|
-
}, preloadPropsMap.set(type,
|
|
2592
|
+
}, preloadPropsMap.set(type, styles$268)), preloadStylesheet(
|
|
1873
2593
|
JSCompiler_inline_result,
|
|
1874
2594
|
type,
|
|
1875
|
-
|
|
1876
|
-
resource$
|
|
2595
|
+
styles$268,
|
|
2596
|
+
resource$269.state
|
|
1877
2597
|
)));
|
|
1878
2598
|
if (currentProps && null === currentResource)
|
|
1879
2599
|
throw Error(formatProdErrorMessage(528, ""));
|
|
1880
|
-
return resource$
|
|
2600
|
+
return resource$269;
|
|
1881
2601
|
}
|
|
1882
2602
|
if (currentProps && null !== currentResource)
|
|
1883
2603
|
throw Error(formatProdErrorMessage(529, ""));
|
|
1884
2604
|
return null;
|
|
1885
2605
|
case "script":
|
|
1886
|
-
return currentProps = pendingProps.async, pendingProps = pendingProps.src, "string" === typeof pendingProps && currentProps && "function" !== typeof currentProps && "symbol" !== typeof currentProps ? (
|
|
2606
|
+
return currentProps = pendingProps.async, pendingProps = pendingProps.src, "string" === typeof pendingProps && currentProps && "function" !== typeof currentProps && "symbol" !== typeof currentProps ? (pendingProps = getScriptKey(pendingProps), currentProps = getResourcesFromRoot(
|
|
1887
2607
|
JSCompiler_inline_result
|
|
1888
|
-
).hoistableScripts, currentResource =
|
|
2608
|
+
).hoistableScripts, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
|
|
1889
2609
|
type: "script",
|
|
1890
2610
|
instance: null,
|
|
1891
2611
|
count: 0,
|
|
1892
2612
|
state: null
|
|
1893
|
-
},
|
|
2613
|
+
}, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
|
|
1894
2614
|
default:
|
|
1895
2615
|
throw Error(formatProdErrorMessage(444, type));
|
|
1896
2616
|
}
|
|
@@ -1908,11 +2628,22 @@
|
|
|
1908
2628
|
});
|
|
1909
2629
|
}
|
|
1910
2630
|
function preloadStylesheet(ownerDocument, key, preloadProps, state) {
|
|
1911
|
-
|
|
2631
|
+
if (key = ownerDocument.querySelector(
|
|
2632
|
+
'link[rel="preload"][as="style"][' + key + "]"
|
|
2633
|
+
)) {
|
|
2634
|
+
if (true !== key[internalLoadPendingKey]) {
|
|
2635
|
+
state.loading = 1;
|
|
2636
|
+
return;
|
|
2637
|
+
}
|
|
2638
|
+
} else
|
|
2639
|
+
key = ownerDocument.createElement("link"), key[internalLoadPendingKey] = true, key.onload = key.onerror = clearPendingLoadOnNode.bind(null, key), setInitialProperties(key, "link", preloadProps), markNodeAsHoistable(key), ownerDocument.head.appendChild(key);
|
|
2640
|
+
state.preload = key;
|
|
2641
|
+
key.addEventListener("load", function() {
|
|
1912
2642
|
return state.loading |= 1;
|
|
1913
|
-
})
|
|
2643
|
+
});
|
|
2644
|
+
key.addEventListener("error", function() {
|
|
1914
2645
|
return state.loading |= 2;
|
|
1915
|
-
})
|
|
2646
|
+
});
|
|
1916
2647
|
}
|
|
1917
2648
|
function getScriptKey(src) {
|
|
1918
2649
|
return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
|
|
@@ -1945,32 +2676,32 @@
|
|
|
1945
2676
|
return resource.instance = instance;
|
|
1946
2677
|
case "stylesheet":
|
|
1947
2678
|
styleProps = getStyleKey(props.href);
|
|
1948
|
-
var instance$
|
|
2679
|
+
var instance$274 = hoistableRoot.querySelector(
|
|
1949
2680
|
getStylesheetSelectorFromKey(styleProps)
|
|
1950
2681
|
);
|
|
1951
|
-
if (instance$
|
|
1952
|
-
return resource.state.loading |= 4, resource.instance = instance$
|
|
2682
|
+
if (instance$274)
|
|
2683
|
+
return resource.state.loading |= 4, resource.instance = instance$274, markNodeAsHoistable(instance$274), instance$274;
|
|
1953
2684
|
instance = stylesheetPropsFromRawProps(props);
|
|
1954
2685
|
(styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps);
|
|
1955
|
-
instance$
|
|
1956
|
-
markNodeAsHoistable(instance$
|
|
1957
|
-
var linkInstance = instance$
|
|
2686
|
+
instance$274 = (hoistableRoot.ownerDocument || hoistableRoot).createElement("link");
|
|
2687
|
+
markNodeAsHoistable(instance$274);
|
|
2688
|
+
var linkInstance = instance$274;
|
|
1958
2689
|
linkInstance._p = new Promise(function(resolve, reject) {
|
|
1959
2690
|
linkInstance.onload = resolve;
|
|
1960
2691
|
linkInstance.onerror = reject;
|
|
1961
2692
|
});
|
|
1962
|
-
setInitialProperties(instance$
|
|
2693
|
+
setInitialProperties(instance$274, "link", instance);
|
|
1963
2694
|
resource.state.loading |= 4;
|
|
1964
|
-
insertStylesheet(instance$
|
|
1965
|
-
return resource.instance = instance$
|
|
2695
|
+
insertStylesheet(instance$274, props.precedence, hoistableRoot);
|
|
2696
|
+
return resource.instance = instance$274;
|
|
1966
2697
|
case "script":
|
|
1967
|
-
instance$
|
|
2698
|
+
instance$274 = getScriptKey(props.src);
|
|
1968
2699
|
if (styleProps = hoistableRoot.querySelector(
|
|
1969
|
-
getScriptSelectorFromKey(instance$
|
|
2700
|
+
getScriptSelectorFromKey(instance$274)
|
|
1970
2701
|
))
|
|
1971
2702
|
return resource.instance = styleProps, markNodeAsHoistable(styleProps), styleProps;
|
|
1972
2703
|
instance = props;
|
|
1973
|
-
if (styleProps = preloadPropsMap.get(instance$
|
|
2704
|
+
if (styleProps = preloadPropsMap.get(instance$274))
|
|
1974
2705
|
instance = assign({}, props), adoptPreloadPropsForScript(instance, styleProps);
|
|
1975
2706
|
hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
|
|
1976
2707
|
styleProps = hoistableRoot.createElement("script");
|
|
@@ -2061,9 +2792,18 @@
|
|
|
2061
2792
|
}
|
|
2062
2793
|
return false;
|
|
2063
2794
|
}
|
|
2795
|
+
function maySuspendCommit(type, props) {
|
|
2796
|
+
return "img" === type && null != props.src && "" !== props.src && null == props.onLoad && "lazy" !== props.loading;
|
|
2797
|
+
}
|
|
2064
2798
|
function preloadResource(resource) {
|
|
2065
2799
|
return "stylesheet" === resource.type && 0 === (resource.state.loading & 3) ? false : true;
|
|
2066
2800
|
}
|
|
2801
|
+
function estimateImageBytes(instance) {
|
|
2802
|
+
return (instance.width || 100) * (instance.height || 100) * ("number" === typeof devicePixelRatio ? devicePixelRatio : 1) * 0.25;
|
|
2803
|
+
}
|
|
2804
|
+
function suspendInstance(state, instance) {
|
|
2805
|
+
"function" === typeof instance.decode && (state.imgCount++, instance.complete || (state.imgBytes += estimateImageBytes(instance), state.suspenseyImages.push(instance)), state = onUnsuspendImg.bind(state), instance.decode().then(state, state));
|
|
2806
|
+
}
|
|
2067
2807
|
function suspendResource(state, hoistableRoot, resource, props) {
|
|
2068
2808
|
if ("stylesheet" === resource.type && ("string" !== typeof props.media || false !== matchMedia(props.media).matches) && 0 === (resource.state.loading & 4)) {
|
|
2069
2809
|
if (null === resource.instance) {
|
|
@@ -2128,17 +2868,24 @@
|
|
|
2128
2868
|
};
|
|
2129
2869
|
} : null;
|
|
2130
2870
|
}
|
|
2131
|
-
function
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
if (
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
this.unsuspend = null;
|
|
2871
|
+
function checkIfFullyUnsuspended(state) {
|
|
2872
|
+
if (0 === state.count && (0 === state.imgCount || !state.waitingForImages)) {
|
|
2873
|
+
if (state.stylesheets) insertSuspendedStylesheets(state, state.stylesheets);
|
|
2874
|
+
else if (state.unsuspend) {
|
|
2875
|
+
var unsuspend = state.unsuspend;
|
|
2876
|
+
state.unsuspend = null;
|
|
2138
2877
|
unsuspend();
|
|
2139
2878
|
}
|
|
2140
2879
|
}
|
|
2141
2880
|
}
|
|
2881
|
+
function onUnsuspend() {
|
|
2882
|
+
this.count--;
|
|
2883
|
+
checkIfFullyUnsuspended(this);
|
|
2884
|
+
}
|
|
2885
|
+
function onUnsuspendImg() {
|
|
2886
|
+
this.imgCount--;
|
|
2887
|
+
checkIfFullyUnsuspended(this);
|
|
2888
|
+
}
|
|
2142
2889
|
var precedencesByRoot = null;
|
|
2143
2890
|
function insertSuspendedStylesheets(state, resources) {
|
|
2144
2891
|
state.stylesheets = null;
|