@vfrey/vfrey 0.0.1 → 1.0.0-beta.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/LICENSE +33 -0
- package/README.md +78 -3
- package/accounts.example.json +61 -0
- package/accounts.first-run.json +41 -0
- package/bin/vfrey.mjs +36 -0
- package/integration-tools/README.md +43 -0
- package/integration-tools/image/pillow.md +32 -0
- package/integration-tools/image/playwright.md +33 -0
- package/integration-tools/image/resvg.md +36 -0
- package/integration-tools/image/satori.md +36 -0
- package/integration-tools/image/sharp.md +38 -0
- package/integration-tools/video/blender.md +34 -0
- package/integration-tools/video/ffmpeg.md +41 -0
- package/integration-tools/video/manim.md +37 -0
- package/integration-tools/video/motion-canvas.md +37 -0
- package/integration-tools/video/remotion.md +50 -0
- package/integration-tools/video/revideo.md +32 -0
- package/package.json +74 -6
- package/skills/vfrey-orchestrator/SKILL.md +15 -0
- package/skills/vfrey-orchestrator/channel-video/SKILL.md +41 -0
- package/skills/vfrey-product/SKILL.md +63 -0
- package/skills/vfrey-product/examples/concurrency-vs-parallelism/framey/cook-one.svg +14 -0
- package/skills/vfrey-product/examples/concurrency-vs-parallelism/framey/cook-two.svg +22 -0
- package/skills/vfrey-product/examples/concurrency-vs-parallelism/framey/index.html +70 -0
- package/skills/vfrey-product/examples/concurrency-vs-parallelism/remotion/cook-one.svg +14 -0
- package/skills/vfrey-product/examples/concurrency-vs-parallelism/remotion/cook-two.svg +22 -0
- package/skills/vfrey-product/examples/concurrency-vs-parallelism/remotion/index.tsx +49 -0
- package/skills/vfrey-product/examples/concurrency-vs-parallelism/script.json +15 -0
- package/skills/vfrey-product/examples/octopus-facts/index.html +60 -0
- package/skills/vfrey-product/examples/octopus-facts/octopus.svg +8 -0
- package/skills/vfrey-product/examples/octopus-facts/script.json +14 -0
- package/skills/vfrey-product/push/SKILL.md +15 -0
- package/skills/vfrey-product/scenes/NOTICE +5 -0
- package/skills/vfrey-product/scenes/blocks.md +57 -0
- package/skills/vfrey-product/scenes/craft.md +118 -0
- package/skills/vfrey-product/scenes/motion.md +88 -0
- package/src/analytics/dashboard.ts +109 -0
- package/src/analytics/index.ts +260 -0
- package/src/api/client.ts +282 -0
- package/src/api/commands.ts +330 -0
- package/src/api/config.ts +34 -0
- package/src/api/creators.ts +463 -0
- package/src/api/credentials.ts +152 -0
- package/src/api/mail.ts +333 -0
- package/src/api/topics.ts +207 -0
- package/src/api/types.ts +205 -0
- package/src/cli.ts +467 -0
- package/src/cloud/executor.ts +281 -0
- package/src/cloud/job.ts +106 -0
- package/src/cloud/render-job.ts +187 -0
- package/src/config.ts +309 -0
- package/src/dashboard-link.ts +180 -0
- package/src/dashboard-start.ts +103 -0
- package/src/desk/channel.ts +64 -0
- package/src/desk/cli.ts +216 -0
- package/src/desk/creators-route.ts +129 -0
- package/src/desk/fonts/JetBrainsMono-OFL.txt +93 -0
- package/src/desk/fonts/google-sans-flex-latin.woff2 +0 -0
- package/src/desk/fonts/jetbrains-mono-medium.woff2 +0 -0
- package/src/desk/http.ts +460 -0
- package/src/desk/mail-route.ts +103 -0
- package/src/desk/overlay.ts +112 -0
- package/src/desk/preview.ts +422 -0
- package/src/desk/screens.ts +149 -0
- package/src/desk/secrets.ts +143 -0
- package/src/desk/series.ts +127 -0
- package/src/desk/state.ts +77 -0
- package/src/desk/studio-route.ts +119 -0
- package/src/desk/tick-runner.ts +66 -0
- package/src/desk/tick.ts +56 -0
- package/src/desk/topics-route.ts +41 -0
- package/src/desk/ui/app.css +505 -0
- package/src/desk/ui/app.js +185 -0
- package/src/desk/ui/apple-icon.png +0 -0
- package/src/desk/ui/components.js +79 -0
- package/src/desk/ui/core.js +156 -0
- package/src/desk/ui/favicon.ico +0 -0
- package/src/desk/ui/icon.svg +1 -0
- package/src/desk/ui/icons.js +49 -0
- package/src/desk/ui/index.html +41 -0
- package/src/desk/ui/metrics-math.d.ts +22 -0
- package/src/desk/ui/metrics-math.js +135 -0
- package/src/desk/ui/theme.js +5 -0
- package/src/desk/ui/views-creators.js +209 -0
- package/src/desk/ui/views-keys.js +114 -0
- package/src/desk/ui/views-mail.js +188 -0
- package/src/desk/ui/views-misc.js +123 -0
- package/src/desk/ui/views-review.js +119 -0
- package/src/desk/ui/views-runs.js +350 -0
- package/src/desk/ui/views-screens.js +163 -0
- package/src/desk/ui/views-series.js +318 -0
- package/src/desk/ui/views-topics.js +87 -0
- package/src/desk/verbs.ts +361 -0
- package/src/doctor.ts +212 -0
- package/src/drain.ts +14 -0
- package/src/engage/index.ts +217 -0
- package/src/generate/index.ts +110 -0
- package/src/generate/script.ts +152 -0
- package/src/generate/title.ts +78 -0
- package/src/help.ts +233 -0
- package/src/home.ts +45 -0
- package/src/llm/client.ts +177 -0
- package/src/log.ts +7 -0
- package/src/oauth/tokens.ts +189 -0
- package/src/oauth/vault.ts +72 -0
- package/src/pipeline/review.ts +642 -0
- package/src/pipeline/run.ts +443 -0
- package/src/pipeline/series-guard.ts +26 -0
- package/src/pipeline/source-fetch.ts +69 -0
- package/src/pipeline/stages.ts +728 -0
- package/src/pipeline/topics-source.ts +90 -0
- package/src/product/commands.ts +296 -0
- package/src/product/config-file.ts +38 -0
- package/src/product/engine-choice.ts +89 -0
- package/src/product/engines.ts +103 -0
- package/src/product/insights.ts +50 -0
- package/src/product/keys.ts +67 -0
- package/src/product/paths.ts +18 -0
- package/src/product/probes.ts +88 -0
- package/src/product/push-flow.ts +90 -0
- package/src/product/render-video.ts +21 -0
- package/src/product/short.ts +62 -0
- package/src/product/update.ts +32 -0
- package/src/project/canonical.ts +14 -0
- package/src/project/commands.ts +177 -0
- package/src/project/dashboard-status.ts +28 -0
- package/src/project/discover.ts +19 -0
- package/src/project/index-file.ts +73 -0
- package/src/project/marker.ts +87 -0
- package/src/project/migrate.ts +201 -0
- package/src/project/names.ts +27 -0
- package/src/project/notice.ts +16 -0
- package/src/project/open.ts +88 -0
- package/src/project/scaffold.ts +112 -0
- package/src/project/templates.ts +42 -0
- package/src/project/videos.ts +64 -0
- package/src/publish/facebook.ts +91 -0
- package/src/publish/index.ts +12 -0
- package/src/publish/instagram.ts +97 -0
- package/src/publish/rate.ts +62 -0
- package/src/publish/session.ts +242 -0
- package/src/publish/tiktok.ts +202 -0
- package/src/publish/youtube.ts +177 -0
- package/src/queue/desk-ops.ts +1170 -0
- package/src/queue/seal.ts +3 -0
- package/src/queue/store.ts +1006 -0
- package/src/remotion/AiLabel.tsx +26 -0
- package/src/remotion/Root.tsx +73 -0
- package/src/remotion/defaults.ts +26 -0
- package/src/remotion/films/claude/ClaudeFilm.tsx +1014 -0
- package/src/remotion/films/engine/EngineMark.tsx +17 -0
- package/src/remotion/films/rea/ReaShort.tsx +552 -0
- package/src/remotion/films/rea/drawings.tsx +907 -0
- package/src/remotion/films/rea/timing.ts +144 -0
- package/src/remotion/index.ts +4 -0
- package/src/remotion/templates/EditorialSplit.tsx +39 -0
- package/src/remotion/templates/KineticType.tsx +39 -0
- package/src/remotion/templates/SignalBoard.tsx +50 -0
- package/src/remotion/timing.ts +22 -0
- package/src/render/chrome.ts +78 -0
- package/src/render/engine-mark.ts +29 -0
- package/src/render/framey-template.ts +130 -0
- package/src/render/html-engine.ts +149 -0
- package/src/render/node-crypto-stub.ts +11 -0
- package/src/render/probe.ts +29 -0
- package/src/render/props.ts +17 -0
- package/src/render/vertical-short.ts +35 -0
- package/src/render/webpack.ts +33 -0
- package/src/render/worker.ts +65 -0
- package/src/scene/assets/fonts/TitanOne-OFL.txt +94 -0
- package/src/scene/assets/fonts/titan-one.woff2 +0 -0
- package/src/scene/assets/gsap/LICENSE.txt +8 -0
- package/src/scene/assets/gsap/gsap.min.js +11 -0
- package/src/scene/audio.ts +54 -0
- package/src/scene/blocks/LICENSE +190 -0
- package/src/scene/blocks/NOTICE +5 -0
- package/src/scene/blocks/bar-chart-race/bar-chart-race.html +585 -0
- package/src/scene/blocks/beat-freeze-cut/beat-freeze-cut.html +874 -0
- package/src/scene/blocks/camcorder-hud/camcorder-hud.html +164 -0
- package/src/scene/blocks/camera-dolly-zoom/camera-dolly-zoom.html +355 -0
- package/src/scene/blocks/code-diff/code-diff.html +817 -0
- package/src/scene/blocks/code-snippet-apple-terminal-pro/code-snippet-apple-terminal-pro.html +248 -0
- package/src/scene/blocks/code-typing/code-typing.html +764 -0
- package/src/scene/blocks/data-chart/data-chart.html +452 -0
- package/src/scene/blocks/flowchart-vertical/flowchart-vertical.html +454 -0
- package/src/scene/blocks/hw-scribble-transition/hw-scribble-transition.html +153 -0
- package/src/scene/blocks/index.json +824 -0
- package/src/scene/blocks/lt-accent-underline/lt-accent-underline.html +107 -0
- package/src/scene/blocks/lt-bold-block/lt-bold-block.html +109 -0
- package/src/scene/blocks/lt-clean-bar/lt-clean-bar.html +112 -0
- package/src/scene/blocks/lt-dark-card/lt-dark-card.html +111 -0
- package/src/scene/blocks/lt-kicker-name/lt-kicker-name.html +114 -0
- package/src/scene/blocks/lt-mask-reveal/lt-mask-reveal.html +120 -0
- package/src/scene/blocks/lt-neon-border/lt-neon-border.html +391 -0
- package/src/scene/blocks/lt-stack-bars/lt-stack-bars.html +109 -0
- package/src/scene/blocks/macos-notification/macos-notification.html +194 -0
- package/src/scene/blocks/mk-background/mk-background.html +236 -0
- package/src/scene/blocks/mk-callout-highlight/mk-callout-highlight.html +183 -0
- package/src/scene/blocks/mk-clone-wall-transition/mk-clone-wall-transition.html +226 -0
- package/src/scene/blocks/mk-line-graph/mk-line-graph.html +293 -0
- package/src/scene/blocks/mk-progress-stat/mk-progress-stat.html +186 -0
- package/src/scene/blocks/mk-specs-list/mk-specs-list.html +223 -0
- package/src/scene/blocks/news-ticker/news-ticker.html +409 -0
- package/src/scene/blocks/organic-light-leak-overlay/organic-light-leak-overlay.html +126 -0
- package/src/scene/blocks/oscilloscope-trace/oscilloscope-trace.html +519 -0
- package/src/scene/blocks/snow/snow.html +205 -0
- package/src/scene/blocks/split-flap-board/split-flap-board.html +347 -0
- package/src/scene/blocks/spotify-card/spotify-card.html +294 -0
- package/src/scene/blocks/starfield/starfield.html +188 -0
- package/src/scene/blocks/thread-message-stack/thread-message-stack.html +239 -0
- package/src/scene/blocks/week-in-merges/week-in-merges.html +470 -0
- package/src/scene/blocks/x-post/x-post.html +437 -0
- package/src/scene/blocks/yt-comment-card/yt-comment-card.html +319 -0
- package/src/scene/blocks/yt-lcd-background/yt-lcd-background.html +307 -0
- package/src/scene/blocks/yt-prism-title/yt-prism-title.html +205 -0
- package/src/scene/blocks.ts +229 -0
- package/src/scene/command.ts +272 -0
- package/src/scene/figure.ts +181 -0
- package/src/scene/glyphs.ts +107 -0
- package/src/scene/init.ts +86 -0
- package/src/scene/inspect/css-tree.d.ts +6 -0
- package/src/scene/inspect/page-scripts.ts +272 -0
- package/src/scene/inspect/report.ts +405 -0
- package/src/scene/inspect/run.ts +200 -0
- package/src/scene/inspect/source.ts +236 -0
- package/src/scene/label.ts +131 -0
- package/src/scene/net-guard.ts +74 -0
- package/src/scene/render.ts +292 -0
- package/src/scene/runtime/browser.ts +199 -0
- package/src/scene/runtime/core.ts +181 -0
- package/src/scene/runtime/react.tsx +115 -0
- package/src/scene/runtime/transitions.ts +133 -0
- package/src/scene/sanitize.ts +181 -0
- package/src/scene/scene.ts +152 -0
- package/src/scene/studio-command.ts +48 -0
- package/src/scene/studio-skin.ts +59 -0
- package/src/scene/studio.ts +337 -0
- package/src/scene/supply.ts +111 -0
- package/src/scene/timing.ts +288 -0
- package/src/scene/transitions/LICENSE +190 -0
- package/src/scene/transitions/NOTICE +5 -0
- package/src/scene/transitions/SOURCE.json +24 -0
- package/src/scene/transitions/transitions.global.js +38 -0
- package/src/scene/transitions.ts +26 -0
- package/src/service/all-projects.ts +153 -0
- package/src/service/commands.ts +256 -0
- package/src/service/due.ts +82 -0
- package/src/service/lock.ts +101 -0
- package/src/service/log-file.ts +56 -0
- package/src/service/state.ts +41 -0
- package/src/service/units.ts +90 -0
- package/src/service/worker.ts +51 -0
- package/src/skill-agents.ts +74 -0
- package/src/skill-install.ts +334 -0
- package/src/sync-write.ts +21 -0
- package/src/tick-report.ts +205 -0
- package/src/tts.ts +124 -0
- package/vendor/@vfrey/contracts/dist/account.d.ts +97 -0
- package/vendor/@vfrey/contracts/dist/account.js +27 -0
- package/vendor/@vfrey/contracts/dist/checks.d.ts +8 -0
- package/vendor/@vfrey/contracts/dist/checks.js +1 -0
- package/vendor/@vfrey/contracts/dist/credentials/crypto.d.ts +4 -0
- package/vendor/@vfrey/contracts/dist/credentials/crypto.js +38 -0
- package/vendor/@vfrey/contracts/dist/domain/advice-persona.d.ts +10 -0
- package/vendor/@vfrey/contracts/dist/domain/advice-persona.js +24 -0
- package/vendor/@vfrey/contracts/dist/domain/backoff.d.ts +13 -0
- package/vendor/@vfrey/contracts/dist/domain/backoff.js +27 -0
- package/vendor/@vfrey/contracts/dist/domain/cadence.d.ts +29 -0
- package/vendor/@vfrey/contracts/dist/domain/cadence.js +95 -0
- package/vendor/@vfrey/contracts/dist/domain/creators.d.ts +146 -0
- package/vendor/@vfrey/contracts/dist/domain/creators.js +2 -0
- package/vendor/@vfrey/contracts/dist/domain/disclosure.d.ts +127 -0
- package/vendor/@vfrey/contracts/dist/domain/disclosure.js +250 -0
- package/vendor/@vfrey/contracts/dist/domain/errors.d.ts +34 -0
- package/vendor/@vfrey/contracts/dist/domain/errors.js +68 -0
- package/vendor/@vfrey/contracts/dist/domain/redact.d.ts +1 -0
- package/vendor/@vfrey/contracts/dist/domain/redact.js +21 -0
- package/vendor/@vfrey/contracts/dist/domain/revenue.d.ts +13 -0
- package/vendor/@vfrey/contracts/dist/domain/revenue.js +16 -0
- package/vendor/@vfrey/contracts/dist/domain/safety.d.ts +20 -0
- package/vendor/@vfrey/contracts/dist/domain/safety.js +61 -0
- package/vendor/@vfrey/contracts/dist/domain/similarity.d.ts +13 -0
- package/vendor/@vfrey/contracts/dist/domain/similarity.js +100 -0
- package/vendor/@vfrey/contracts/dist/domain/templates.d.ts +18 -0
- package/vendor/@vfrey/contracts/dist/domain/templates.js +67 -0
- package/vendor/@vfrey/contracts/dist/domain/tiktok-chunks.d.ts +19 -0
- package/vendor/@vfrey/contracts/dist/domain/tiktok-chunks.js +52 -0
- package/vendor/@vfrey/contracts/dist/domain/topics.d.ts +78 -0
- package/vendor/@vfrey/contracts/dist/domain/topics.js +4 -0
- package/vendor/@vfrey/contracts/dist/domain/types.d.ts +216 -0
- package/vendor/@vfrey/contracts/dist/domain/types.js +1 -0
- package/vendor/@vfrey/contracts/dist/domain/variation.d.ts +57 -0
- package/vendor/@vfrey/contracts/dist/domain/variation.js +278 -0
- package/vendor/@vfrey/contracts/dist/events.d.ts +20 -0
- package/vendor/@vfrey/contracts/dist/events.js +1 -0
- package/vendor/@vfrey/contracts/dist/http.d.ts +11 -0
- package/vendor/@vfrey/contracts/dist/http.js +37 -0
- package/vendor/@vfrey/contracts/dist/index.d.ts +22 -0
- package/vendor/@vfrey/contracts/dist/index.js +22 -0
- package/vendor/@vfrey/contracts/dist/log.d.ts +2 -0
- package/vendor/@vfrey/contracts/dist/log.js +10 -0
- package/vendor/@vfrey/contracts/dist/mail.d.ts +55 -0
- package/vendor/@vfrey/contracts/dist/mail.js +1 -0
- package/vendor/@vfrey/contracts/package.json +18 -0
- package/vendor/@vfrey/ingest/dist/index.d.ts +41 -0
- package/vendor/@vfrey/ingest/dist/index.js +221 -0
- package/vendor/@vfrey/ingest/dist/parse.d.ts +5 -0
- package/vendor/@vfrey/ingest/dist/parse.js +165 -0
- package/vendor/@vfrey/ingest/package.json +21 -0
- package/vendor/framey/LICENSE +190 -0
- package/vendor/framey/NOTICE +15 -0
- package/vendor/framey/SOURCE.json +24 -0
- package/vendor/framey/STUDIO-SOURCE.json +9 -0
- package/vendor/framey/bin/framey-localize-fonts.mjs +12 -0
- package/vendor/framey/bin/framey.mjs +16 -0
- package/vendor/framey/dist/add-VMJD5KBS.js +75 -0
- package/vendor/framey/dist/animatedGifPrep-QPKGJ6PM.js +43 -0
- package/vendor/framey/dist/api.d.ts +211 -0
- package/vendor/framey/dist/api.js +76 -0
- package/vendor/framey/dist/appHistory-WW56FZTT.js +31 -0
- package/vendor/framey/dist/asset-WQKGOELE.js +26 -0
- package/vendor/framey/dist/audio-RSJWVWRA.js +1936 -0
- package/vendor/framey/dist/batchRender-3HPICDCT.js +366 -0
- package/vendor/framey/dist/beats-HL2BDUZI.js +273 -0
- package/vendor/framey/dist/benchmark-RWCWHI5Z.js +230 -0
- package/vendor/framey/dist/browser-ECYET3Q2.js +206 -0
- package/vendor/framey/dist/bundleWithLocalizedFonts-ALYBQEQT.js +52 -0
- package/vendor/framey/dist/captureCompositionFrame-4DA6SEH2.js +94 -0
- package/vendor/framey/dist/catalog-5JVDEUWK.js +979 -0
- package/vendor/framey/dist/catch-up-NEBCL5NO.js +106 -0
- package/vendor/framey/dist/check-F5N544ML.js +111 -0
- package/vendor/framey/dist/checkBrowser-LZ66CMJG.js +110 -0
- package/vendor/framey/dist/chunk-2K7Z2HVP.js +372 -0
- package/vendor/framey/dist/chunk-2UZQHDM7.js +323 -0
- package/vendor/framey/dist/chunk-2X4PQEYM.js +34 -0
- package/vendor/framey/dist/chunk-3422KMTD.js +168 -0
- package/vendor/framey/dist/chunk-3FYD4YEK.js +72 -0
- package/vendor/framey/dist/chunk-3GXQPCJC.js +682 -0
- package/vendor/framey/dist/chunk-3LM6YPBR.js +179 -0
- package/vendor/framey/dist/chunk-442JNXRM.js +20 -0
- package/vendor/framey/dist/chunk-4BNN5FGX.js +182 -0
- package/vendor/framey/dist/chunk-4P7NX5BM.js +11532 -0
- package/vendor/framey/dist/chunk-4UMPIPCQ.js +88 -0
- package/vendor/framey/dist/chunk-4YYJOFKS.js +28 -0
- package/vendor/framey/dist/chunk-54HJ63Q2.js +29 -0
- package/vendor/framey/dist/chunk-5ETJX6WM.js +89 -0
- package/vendor/framey/dist/chunk-5SG54JRS.js +68 -0
- package/vendor/framey/dist/chunk-634HSJ3J.js +58 -0
- package/vendor/framey/dist/chunk-66LREXGS.js +48 -0
- package/vendor/framey/dist/chunk-6BEFEWFB.js +25 -0
- package/vendor/framey/dist/chunk-6BNTGNGD.js +286 -0
- package/vendor/framey/dist/chunk-6DDPOHMK.js +140 -0
- package/vendor/framey/dist/chunk-6GV5XSOR.js +214 -0
- package/vendor/framey/dist/chunk-6JR2XUEE.js +127 -0
- package/vendor/framey/dist/chunk-73QVATIM.js +362 -0
- package/vendor/framey/dist/chunk-7FMUTGOH.js +279 -0
- package/vendor/framey/dist/chunk-7JQFJ6JJ.js +291 -0
- package/vendor/framey/dist/chunk-AHPGAESX.js +113 -0
- package/vendor/framey/dist/chunk-AHX34EFP.js +15 -0
- package/vendor/framey/dist/chunk-AJ5CSAEZ.js +487 -0
- package/vendor/framey/dist/chunk-B7RJV74O.js +5047 -0
- package/vendor/framey/dist/chunk-BL4U6U52.js +254 -0
- package/vendor/framey/dist/chunk-BSQ7XANM.js +210 -0
- package/vendor/framey/dist/chunk-BZ56MTDX.js +6 -0
- package/vendor/framey/dist/chunk-C5BO7PMT.js +282 -0
- package/vendor/framey/dist/chunk-CFUCHO4T.js +358 -0
- package/vendor/framey/dist/chunk-CZGHFATT.js +31 -0
- package/vendor/framey/dist/chunk-DLA44CMS.js +5649 -0
- package/vendor/framey/dist/chunk-DPVXBVLL.js +31292 -0
- package/vendor/framey/dist/chunk-DQBY7FRR.js +397 -0
- package/vendor/framey/dist/chunk-EAMLBAHA.js +154 -0
- package/vendor/framey/dist/chunk-EOVYQ3IG.js +143 -0
- package/vendor/framey/dist/chunk-EVMY7IPL.js +612 -0
- package/vendor/framey/dist/chunk-FG4BBFZI.js +122 -0
- package/vendor/framey/dist/chunk-FI4I7CME.js +56 -0
- package/vendor/framey/dist/chunk-FLREUEHW.js +2081 -0
- package/vendor/framey/dist/chunk-FUFP7A7S.js +1126 -0
- package/vendor/framey/dist/chunk-FV3PIKGH.js +56 -0
- package/vendor/framey/dist/chunk-FXMKHHPO.js +123 -0
- package/vendor/framey/dist/chunk-GGZAM5VH.js +1187 -0
- package/vendor/framey/dist/chunk-GKZEVJIB.js +39 -0
- package/vendor/framey/dist/chunk-GMECXFAN.js +57 -0
- package/vendor/framey/dist/chunk-GNEFDLFB.js +621 -0
- package/vendor/framey/dist/chunk-GPMLSOEG.js +19274 -0
- package/vendor/framey/dist/chunk-GPYVT5EE.js +59 -0
- package/vendor/framey/dist/chunk-H6IEMZEV.js +40 -0
- package/vendor/framey/dist/chunk-HEFQCIXR.js +170 -0
- package/vendor/framey/dist/chunk-HFQ4CWHA.js +118 -0
- package/vendor/framey/dist/chunk-HPDTCOKE.js +304 -0
- package/vendor/framey/dist/chunk-HTUHQKDB.js +548 -0
- package/vendor/framey/dist/chunk-HU2SPFNG.js +103 -0
- package/vendor/framey/dist/chunk-HVW7ABXD.js +19 -0
- package/vendor/framey/dist/chunk-IG7NDKXO.js +26 -0
- package/vendor/framey/dist/chunk-II3J3WXK.js +246 -0
- package/vendor/framey/dist/chunk-IR35BCLK.js +13 -0
- package/vendor/framey/dist/chunk-ISN5GRYI.js +20 -0
- package/vendor/framey/dist/chunk-IUONB55J.js +669 -0
- package/vendor/framey/dist/chunk-IVSUQR2B.js +161 -0
- package/vendor/framey/dist/chunk-IXU6PQSW.js +259 -0
- package/vendor/framey/dist/chunk-IZCW2NKT.js +29 -0
- package/vendor/framey/dist/chunk-JGXJU5PF.js +68 -0
- package/vendor/framey/dist/chunk-JHOCK3DG.js +27 -0
- package/vendor/framey/dist/chunk-JVBRJMOP.js +121 -0
- package/vendor/framey/dist/chunk-K4MJX7SR.js +17 -0
- package/vendor/framey/dist/chunk-K4WKGXRC.js +18 -0
- package/vendor/framey/dist/chunk-KGPLIH7B.js +127 -0
- package/vendor/framey/dist/chunk-KLIKCX6Q.js +63 -0
- package/vendor/framey/dist/chunk-KXTKKBOC.js +61 -0
- package/vendor/framey/dist/chunk-KZI44OPA.js +185 -0
- package/vendor/framey/dist/chunk-LEKZNRKI.js +45 -0
- package/vendor/framey/dist/chunk-LFGJWOVA.js +61 -0
- package/vendor/framey/dist/chunk-LLMSX6V6.js +17 -0
- package/vendor/framey/dist/chunk-LTGTN2TH.js +195 -0
- package/vendor/framey/dist/chunk-M2WBOQ2Q.js +54 -0
- package/vendor/framey/dist/chunk-MI5FTLYK.js +399 -0
- package/vendor/framey/dist/chunk-MLQP2QUF.js +1809 -0
- package/vendor/framey/dist/chunk-MMQ52NIZ.js +956 -0
- package/vendor/framey/dist/chunk-ND46XKK3.js +742 -0
- package/vendor/framey/dist/chunk-NYEXNSHM.js +504 -0
- package/vendor/framey/dist/chunk-O4YRB27L.js +57 -0
- package/vendor/framey/dist/chunk-O7BGSQ5F.js +92 -0
- package/vendor/framey/dist/chunk-OFQWTKPW.js +117 -0
- package/vendor/framey/dist/chunk-P5ZBLXJ6.js +91 -0
- package/vendor/framey/dist/chunk-P6LJ4Y32.js +4662 -0
- package/vendor/framey/dist/chunk-PKZ7RK5N.js +281 -0
- package/vendor/framey/dist/chunk-PURHAXFL.js +15 -0
- package/vendor/framey/dist/chunk-Q5X2B5WT.js +29 -0
- package/vendor/framey/dist/chunk-QAMKOG67.js +248 -0
- package/vendor/framey/dist/chunk-R6YBK4XX.js +514 -0
- package/vendor/framey/dist/chunk-RGLQURIX.js +2997 -0
- package/vendor/framey/dist/chunk-RNV3DM4S.js +3573 -0
- package/vendor/framey/dist/chunk-ROEW726S.js +4638 -0
- package/vendor/framey/dist/chunk-RQVDTPGD.js +6 -0
- package/vendor/framey/dist/chunk-RVZHGOGR.js +26 -0
- package/vendor/framey/dist/chunk-RXATE6FZ.js +385 -0
- package/vendor/framey/dist/chunk-S3S4TGEH.js +424 -0
- package/vendor/framey/dist/chunk-SDYDNHEE.js +11202 -0
- package/vendor/framey/dist/chunk-SSWBU67I.js +173 -0
- package/vendor/framey/dist/chunk-ST35C4K6.js +28 -0
- package/vendor/framey/dist/chunk-SZNTYTIV.js +990 -0
- package/vendor/framey/dist/chunk-T2EUWCJE.js +29 -0
- package/vendor/framey/dist/chunk-T6AGUTZJ.js +444 -0
- package/vendor/framey/dist/chunk-THJALHFJ.js +11131 -0
- package/vendor/framey/dist/chunk-TIQB63MX.js +18128 -0
- package/vendor/framey/dist/chunk-U242RTCT.js +134 -0
- package/vendor/framey/dist/chunk-UJZREAV6.js +3901 -0
- package/vendor/framey/dist/chunk-UMD3V7CU.js +264 -0
- package/vendor/framey/dist/chunk-UOFAE5RF.js +42 -0
- package/vendor/framey/dist/chunk-UTEIUGAZ.js +29 -0
- package/vendor/framey/dist/chunk-VAS6HQX3.js +138 -0
- package/vendor/framey/dist/chunk-VC76R6W2.js +27 -0
- package/vendor/framey/dist/chunk-VFZ7W5W7.js +226 -0
- package/vendor/framey/dist/chunk-VHNLZAE2.js +348 -0
- package/vendor/framey/dist/chunk-VMC4WSH5.js +278 -0
- package/vendor/framey/dist/chunk-VORQIH64.js +108 -0
- package/vendor/framey/dist/chunk-VTXFRIHO.js +186 -0
- package/vendor/framey/dist/chunk-W2LGJSEN.js +182 -0
- package/vendor/framey/dist/chunk-WKBM7NDG.js +32 -0
- package/vendor/framey/dist/chunk-WMQNIQDJ.js +2057 -0
- package/vendor/framey/dist/chunk-WN4XZC5F.js +504 -0
- package/vendor/framey/dist/chunk-WQ6ZXHFQ.js +133 -0
- package/vendor/framey/dist/chunk-X7HBSTCZ.js +53 -0
- package/vendor/framey/dist/chunk-X7MTZ4T2.js +6 -0
- package/vendor/framey/dist/chunk-XPTOJZJF.js +308 -0
- package/vendor/framey/dist/chunk-XT6MXC7A.js +6 -0
- package/vendor/framey/dist/chunk-XT7X6QCP.js +6 -0
- package/vendor/framey/dist/chunk-XTMDWNEC.js +2820 -0
- package/vendor/framey/dist/chunk-XUHOIDKG.js +6 -0
- package/vendor/framey/dist/chunk-XX7LTW5Y.js +138 -0
- package/vendor/framey/dist/chunk-Y3YGTZEG.js +382 -0
- package/vendor/framey/dist/chunk-Y5SBSGN7.js +346 -0
- package/vendor/framey/dist/chunk-YCMVI4MZ.js +625 -0
- package/vendor/framey/dist/chunk-YOR4CTCE.js +261 -0
- package/vendor/framey/dist/chunk-YPRBGITP.js +2748 -0
- package/vendor/framey/dist/chunk-ZKDMAOFU.js +32 -0
- package/vendor/framey/dist/chunk-ZW6DURPF.js +1318 -0
- package/vendor/framey/dist/clean-ZJOGDKDM.js +336 -0
- package/vendor/framey/dist/cli.js +439 -0
- package/vendor/framey/dist/cloudrun-HGJ3B6ZV.js +767 -0
- package/vendor/framey/dist/commands/contrast-audit.browser.js +643 -0
- package/vendor/framey/dist/commands/layout-audit.browser.js +2914 -0
- package/vendor/framey/dist/commands/motion-sample.browser.js +74 -0
- package/vendor/framey/dist/commands/motion-signature.browser.js +475 -0
- package/vendor/framey/dist/compare-W7UY3BAZ.js +463 -0
- package/vendor/framey/dist/compiler-TM3W6GYF.js +136 -0
- package/vendor/framey/dist/component-QF5VGYMU.js +176 -0
- package/vendor/framey/dist/compositions-XT3PMNDF.js +238 -0
- package/vendor/framey/dist/contactSheet-7W6GYHBQ.js +24 -0
- package/vendor/framey/dist/deploy-6FJPWKF2.js +299 -0
- package/vendor/framey/dist/destroy-HE2RIPKZ.js +57 -0
- package/vendor/framey/dist/deterministicFonts-RADD3BSX.js +50 -0
- package/vendor/framey/dist/dist-4S2FGGVY.js +422 -0
- package/vendor/framey/dist/dist-BE4B2EZE.js +32 -0
- package/vendor/framey/dist/dist-EWXJGN63.js +129 -0
- package/vendor/framey/dist/docs-VKIRFEEX.js +131 -0
- package/vendor/framey/dist/doctor-2UNJ2G7U.js +74 -0
- package/vendor/framey/dist/dom-37K6YOH4.js +14 -0
- package/vendor/framey/dist/dotEnv-7PZQTVIM.js +54 -0
- package/vendor/framey/dist/events-ACY3P2PA.js +76 -0
- package/vendor/framey/dist/events-IHB3B2MK.js +69 -0
- package/vendor/framey/dist/ffmpeg-DR5LGGSK.js +63 -0
- package/vendor/framey/dist/figma-BODVUPHB.js +63 -0
- package/vendor/framey/dist/fontData.generated-NXAOI4GH.js +13 -0
- package/vendor/framey/dist/fontLocalizeCli.js +142 -0
- package/vendor/framey/dist/gpuPolicy-XLEXORZY.js +49 -0
- package/vendor/framey/dist/grade-compare-GAXFQ74C.js +661 -0
- package/vendor/framey/dist/gsapParser-IEUSLYDJ.js +2885 -0
- package/vendor/framey/dist/gsapParserAcorn-LZJKCFQI.js +30 -0
- package/vendor/framey/dist/help-VCB5X2HS.js +184 -0
- package/vendor/framey/dist/history-ENGZEVFT.js +471 -0
- package/vendor/framey/dist/hyperframe.manifest.json +22 -0
- package/vendor/framey/dist/hyperframe.runtime.iife.js +1132 -0
- package/vendor/framey/dist/hyperframes-player.global.js +478 -0
- package/vendor/framey/dist/hyperframes-slideshow.global.js +148 -0
- package/vendor/framey/dist/info-WPCJHBMU.js +182 -0
- package/vendor/framey/dist/init-G4WGLYGD.js +1176 -0
- package/vendor/framey/dist/inspect-5IQ6CNEQ.js +106 -0
- package/vendor/framey/dist/installer-ML4HWUV7.js +40 -0
- package/vendor/framey/dist/keyframes-Q6XJO7VW.js +2755 -0
- package/vendor/framey/dist/lambda-A7JC74JF.js +468 -0
- package/vendor/framey/dist/layout-YET6XNXA.js +95 -0
- package/vendor/framey/dist/lint-I7FZN2VJ.js +162 -0
- package/vendor/framey/dist/lintProject-PDB3UN72.js +30 -0
- package/vendor/framey/dist/manager-CD6LJ7ZN.js +45 -0
- package/vendor/framey/dist/manager-WA4F2GST.js +67 -0
- package/vendor/framey/dist/media-treatment-BXYS4WVA.js +1030 -0
- package/vendor/framey/dist/media-use-LWH3MANK.js +113 -0
- package/vendor/framey/dist/models-K363FYM4.js +195 -0
- package/vendor/framey/dist/motionShot-GPAVWXLH.js +640 -0
- package/vendor/framey/dist/normalize-FASIPBUM.js +24 -0
- package/vendor/framey/dist/normalize-audio-VDWYRHN6.js +268 -0
- package/vendor/framey/dist/open-E3TB6P6J.js +128 -0
- package/vendor/framey/dist/parakeetRunner-UP34UOI2.js +58 -0
- package/vendor/framey/dist/pipeline-VXIUYEBU.js +64 -0
- package/vendor/framey/dist/play-BUTDQ4DV.js +353 -0
- package/vendor/framey/dist/policies-OLDYGFK5.js +309 -0
- package/vendor/framey/dist/preflight-2KZ2GWAZ.js +55 -0
- package/vendor/framey/dist/present-GXYSM7NX.js +353 -0
- package/vendor/framey/dist/preview-EKZ33JOJ.js +1910 -0
- package/vendor/framey/dist/producer-SKU5EV3J.js +13 -0
- package/vendor/framey/dist/progress-ZWB4Z4ET.js +76 -0
- package/vendor/framey/dist/projectConfig-3MZAYVTS.js +60 -0
- package/vendor/framey/dist/publication-DTKWNF74.js +33 -0
- package/vendor/framey/dist/remove-background-OY5L7XN2.js +265 -0
- package/vendor/framey/dist/render-CDV4GDFX.js +187 -0
- package/vendor/framey/dist/render-YE5YAMOD.js +2620 -0
- package/vendor/framey/dist/render-batch-ZAMFPCLL.js +274 -0
- package/vendor/framey/dist/renderSetupWorker.js +120 -0
- package/vendor/framey/dist/resolver-D5BIPSEW.js +42 -0
- package/vendor/framey/dist/runtimeVersion.js +18 -0
- package/vendor/framey/dist/sam-WFZXI4F7.js +23 -0
- package/vendor/framey/dist/shaderTransitionWorker.js +44 -0
- package/vendor/framey/dist/sherpa-RQWLV7I3.js +79 -0
- package/vendor/framey/dist/sherpaWorker.js +84 -0
- package/vendor/framey/dist/sites-AMOVABTK.js +54 -0
- package/vendor/framey/dist/skill-ZHVLH7KX.js +15 -0
- package/vendor/framey/dist/slideshow-SJGK4RQS.js +24 -0
- package/vendor/framey/dist/snapshot-TUXL6LBQ.js +1515 -0
- package/vendor/framey/dist/src-JHQGB2S6.js +215 -0
- package/vendor/framey/dist/src-Z5PGEMXB.js +532 -0
- package/vendor/framey/dist/state-B6H3WHCF.js +28 -0
- package/vendor/framey/dist/staticProjectServer-DFVZOUGI.js +63 -0
- package/vendor/framey/dist/studio/assets/hyperframes-player-DLaKjw0L.js +478 -0
- package/vendor/framey/dist/studio/assets/index-BX3KHhGX.js +71 -0
- package/vendor/framey/dist/studio/assets/index-CYbvOVp-.css +1 -0
- package/vendor/framey/dist/studio/assets/index-Dp3QEUGL.js +402 -0
- package/vendor/framey/dist/studio/assets/index-qrTAXbqc.js +531 -0
- package/vendor/framey/dist/studio/favicon.svg +14 -0
- package/vendor/framey/dist/studio/icons/timeline/audio.svg +7 -0
- package/vendor/framey/dist/studio/icons/timeline/captions.svg +5 -0
- package/vendor/framey/dist/studio/icons/timeline/composition.svg +12 -0
- package/vendor/framey/dist/studio/icons/timeline/image.svg +18 -0
- package/vendor/framey/dist/studio/icons/timeline/music.svg +10 -0
- package/vendor/framey/dist/studio/icons/timeline/text.svg +3 -0
- package/vendor/framey/dist/studio/index.html +23 -0
- package/vendor/framey/dist/studio-api-2NECGRMB.js +179 -0
- package/vendor/framey/dist/studioSelectionClient-IUUPKUHZ.js +25 -0
- package/vendor/framey/dist/studioServer-N2OPUMOQ.js +1569 -0
- package/vendor/framey/dist/synthesize-PKTB5ATG.js +183 -0
- package/vendor/framey/dist/system-7F3UEHQT.js +27 -0
- package/vendor/framey/dist/telemetry-DQGPEKM6.js +145 -0
- package/vendor/framey/dist/telemetry-UN55N6U6.js +77 -0
- package/vendor/framey/dist/timeline-LHUUMK63.js +1295 -0
- package/vendor/framey/dist/tokens-OLECWDFK.js +92 -0
- package/vendor/framey/dist/transcribe-O7HQKMIV.js +331 -0
- package/vendor/framey/dist/transcribe-UJESPBT5.js +76 -0
- package/vendor/framey/dist/tts-YCCQHZD4.js +234 -0
- package/vendor/framey/dist/urlDownloader-H2LXLG4U.js +48 -0
- package/vendor/framey/dist/usage-HG4WMM7A.js +2167 -0
- package/vendor/framey/dist/validate-F2XMN6EV.js +87 -0
- package/vendor/framey/dist/vendor/npm/gsap@3.15.0/GSAP-LICENSE.txt +8 -0
- package/vendor/framey/dist/vendor/npm/gsap@3.15.0/dist/CustomEase.min.js +11 -0
- package/vendor/framey/dist/vendor/npm/gsap@3.15.0/dist/MotionPathPlugin.min.js +11 -0
- package/vendor/framey/dist/vendor/npm/gsap@3.15.0/dist/gsap.min.js +11 -0
- package/vendor/framey/dist/warmCheck.js +220 -0
- package/vendor/framey/dist/warmCheckClient.js +139 -0
- package/vendor/framey/dist/workspaceBuildCheck-XYD2YTFW.js +133 -0
- package/vendor/framey-player/LICENSE +190 -0
- package/vendor/framey-player/NOTICE +16 -0
- package/vendor/framey-player/SOURCE.json +6 -0
- package/vendor/framey-player/hyperframes-player.global.js +478 -0
- package/vendor/framey.pin +1 -0
- package/bin/index.js +0 -3
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
var xe=Object.defineProperty;var Ie=(r,i,e)=>i in r?xe(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var l=(r,i,e)=>Ie(r,typeof i!="symbol"?i+"":i,e);import{S as Oe,r as Ne,a as fe,i as Fe,b as w,c as _e,p as Ve,d as Ue,e as He,f as ze,s as We,g as ge,F as ye}from"./index-Dp3QEUGL.js";function $e(r){return r.hasRuntime||r.runtimeInjected?!1:!!(r.hasNestedCompositions||r.hasTimelines&&r.attempts>=5)}function I(r){return typeof r=="object"&&r!==null}function je(r){return I(r)&&typeof r.getDuration=="function"}function Be(r){return I(r)&&typeof r.duration=="function"&&typeof r.time=="function"&&typeof r.seek=="function"&&typeof r.play=="function"&&typeof r.pause=="function"}function qe(r){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(r))throw new Error(`Invalid Framey runtime version: ${r}`);return`https://cdn.jsdelivr.net/npm/@hyperframes/core@${r}/dist/hyperframe.runtime.iife.js`}const W=typeof __HYPERFRAMES_RUNTIME_CDN_URL__=="string"?__HYPERFRAMES_RUNTIME_CDN_URL__:qe("0.0.0-dev");function j(r){if(r===null)return null;const i=Number.parseInt(r,10);return Number.isFinite(i)&&i>0?i:null}function Ge(r){const i=(r==null?void 0:r.querySelector("[data-composition-id][data-width][data-height]"))??(r==null?void 0:r.querySelector("[data-width][data-height]"));if(!i)return null;const e=j(i.getAttribute("data-width")),t=j(i.getAttribute("data-height"));return e!==null&&t!==null?{width:e,height:t}:null}function Ye(r){return Array.isArray(r)?r.find(i=>typeof i=="string"&&i.trim()!==""&&i!=="[object Event]")??null:null}class Xe{constructor(i,e){l(this,"_interval",null);l(this,"_runtimeInjected",!1);l(this,"_runtimeScript",null);l(this,"_failure",null);this._iframe=i,this._callbacks=e}get failed(){return this._failure!==null&&this._failure.document===this._iframe.contentDocument}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._failure=null,this._runtimeInjected=!1;let i=0;this._interval=setInterval(()=>{i++;let e=null;try{e=this._poll(i)}catch(t){t instanceof DOMException&&t.name==="SecurityError"||(e={kind:"error",message:t instanceof Error?t.message:String(t)})}e??(e=this._deadlineOutcome(i)),e&&(this.stop(),e.kind==="error"?(this._failure={document:this._iframe.contentDocument},this._callbacks.onError(e.message)):this._callbacks.onReady(e.result))},200)}_deadlineOutcome(i){var e,t;return i<40||(t=(e=this._callbacks).hostOwnsDeadline)!=null&&t.call(e)?null:{kind:"error",message:"Composition timeline not found after 8s"}}_poll(i){const e=this._iframe.contentWindow;if(!e)return null;const t=Ye(Reflect.get(e,Oe));if(t!==null)return{kind:"error",message:t};const s=this._iframe.contentDocument,n=Reflect.get(e,"__timelines"),o=this.hasRuntimeBridge(e);if($e({hasRuntime:o,hasTimelines:I(n)&&Object.keys(n).length>0,hasNestedCompositions:!!(s!=null&&s.querySelector("[data-composition-src]")),runtimeInjected:this._runtimeInjected,attempts:i}))return this._injectRuntime(),null;if(this._runtimeInjected&&!o)return null;const a=this._resolveReadyResult(e,s);return a?{kind:"ready",result:a}:null}_resolveReadyResult(i,e){var n;const t=this._resolvePlaybackDurationAdapter(i)??{kind:"document",getDuration:()=>0};let s=t.getDuration();if(!Number.isFinite(s)||s<=0){if(t.kind==="direct-timeline")return null;s=e?((n=Ne(e))==null?void 0:n.durationSeconds)??0:0}return s<=0?null:{duration:s,adapter:{...t,getDuration:()=>s},compositionSize:Ge(e)}}stop(){this._runtimeScript&&(this._runtimeScript.onerror=null,this._runtimeScript=null),this.failed||(this._failure=null),this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{const i=this._iframe.contentWindow;return i?this._resolveDirectTimelineAdapterFromWindow(i):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(i){return this._resolveDirectTimelineAdapterFromWindow(i)}hasRuntimeBridge(i){return I(Reflect.get(i,"__player"))}_injectRuntime(){var i,e,t,s;this._runtimeInjected=!0;try{const n=this._iframe.contentDocument;if(!n)return;const o=n.createElement("script");o.src=((e=(i=this._callbacks).resolveRuntimeUrl)==null?void 0:e.call(i))??W,this._runtimeScript=o,o.onerror=()=>{this._runtimeScript!==o||this._iframe.contentDocument!==n||(this.stop(),this._failure={document:n},this._callbacks.onError("Framey runtime failed to load from "+o.src))},(n.head||n.documentElement).appendChild(o),(s=(t=this._callbacks).onRuntimeInjected)==null||s.call(t)}catch{}}_resolveDirectTimelineAdapterFromWindow(i){var a,c;if(this.hasRuntimeBridge(i))return null;const e=Reflect.get(i,"__timelines");if(!I(e))return null;const t=Object.keys(e);if(t.length===0)return null;const s=(c=(a=this._iframe.contentDocument)==null?void 0:a.querySelector("[data-composition-id]"))==null?void 0:c.getAttribute("data-composition-id"),n=s&&s in e?s:t[t.length-1],o=e[n];return Be(o)?o:null}_resolvePlaybackDurationAdapter(i){const e=Reflect.get(i,"__player");if(je(e))return{kind:"runtime",getDuration:()=>e.getDuration()};const t=this._resolveDirectTimelineAdapterFromWindow(i);return t?{kind:"direct-timeline",timeline:t,getDuration:()=>t.duration()}:null}}const Ze=`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
background: #000;
|
|
7
|
+
contain: layout style;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* The only in-flow child: with no height set, the player takes the composition's shape. */
|
|
11
|
+
.hfp-sizer {
|
|
12
|
+
aspect-ratio: 16 / 9;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.hfp-container {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
.hfp-iframe {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 50%;
|
|
26
|
+
left: 50%;
|
|
27
|
+
border: none;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Opt-in: an interactive composition (e.g. a live slideshow/app with playable
|
|
32
|
+
media or controls): let pointer events reach the iframe content. */
|
|
33
|
+
:host([interactive]) .hfp-container,
|
|
34
|
+
:host([interactive]) .hfp-iframe {
|
|
35
|
+
pointer-events: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.hfp-video {
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset: 0;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
object-fit: contain;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.hfp-poster {
|
|
48
|
+
position: absolute;
|
|
49
|
+
inset: 0;
|
|
50
|
+
object-fit: contain;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.hfp-shader-loader {
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: 0;
|
|
58
|
+
z-index: 20;
|
|
59
|
+
display: grid;
|
|
60
|
+
place-items: center;
|
|
61
|
+
visibility: hidden;
|
|
62
|
+
opacity: 0;
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
background: #030504;
|
|
65
|
+
color: #f4f7fb;
|
|
66
|
+
cursor: default;
|
|
67
|
+
user-select: none;
|
|
68
|
+
-webkit-user-select: none;
|
|
69
|
+
transition: opacity 420ms ease-out, visibility 420ms ease-out;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.hfp-shader-loader.hfp-visible,
|
|
73
|
+
.hfp-shader-loader.hfp-hiding {
|
|
74
|
+
visibility: visible;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.hfp-shader-loader.hfp-visible {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
pointer-events: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.hfp-shader-loader.hfp-hiding {
|
|
83
|
+
opacity: 0;
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.hfp-shader-loader-panel {
|
|
88
|
+
display: grid;
|
|
89
|
+
grid-template-rows: 86px 40px 26px 12px 44px;
|
|
90
|
+
justify-items: center;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 8px;
|
|
93
|
+
width: min(620px, 82%);
|
|
94
|
+
text-align: center;
|
|
95
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hfp-shader-loader-mark {
|
|
99
|
+
width: 86px;
|
|
100
|
+
height: 86px;
|
|
101
|
+
display: grid;
|
|
102
|
+
place-items: center;
|
|
103
|
+
overflow: visible;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.hfp-shader-loader-mark svg {
|
|
107
|
+
display: block;
|
|
108
|
+
overflow: visible;
|
|
109
|
+
filter: drop-shadow(0 0 5px rgba(79, 219, 94, 0.16));
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.hfp-shader-loader-title {
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 40px;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
text-overflow: ellipsis;
|
|
119
|
+
font-size: 26px;
|
|
120
|
+
line-height: 40px;
|
|
121
|
+
font-weight: 700;
|
|
122
|
+
letter-spacing: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.hfp-shader-loader-title-text {
|
|
126
|
+
color: transparent;
|
|
127
|
+
background: linear-gradient(
|
|
128
|
+
90deg,
|
|
129
|
+
rgba(244, 247, 251, 0.84) 0%,
|
|
130
|
+
#ffffff 42%,
|
|
131
|
+
#80efe4 52%,
|
|
132
|
+
#ffffff 62%,
|
|
133
|
+
rgba(244, 247, 251, 0.84) 100%
|
|
134
|
+
);
|
|
135
|
+
background-size: 220% 100%;
|
|
136
|
+
-webkit-background-clip: text;
|
|
137
|
+
background-clip: text;
|
|
138
|
+
animation: hfp-shader-loader-sheen 1.9s linear infinite;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.hfp-shader-loader:not(.hfp-visible):not(.hfp-hiding) .hfp-shader-loader-title-text {
|
|
142
|
+
animation-play-state: paused;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.hfp-shader-loader-detail {
|
|
146
|
+
width: 100%;
|
|
147
|
+
height: 26px;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
text-overflow: ellipsis;
|
|
151
|
+
color: rgba(244, 247, 251, 0.62);
|
|
152
|
+
font-size: 15px;
|
|
153
|
+
line-height: 26px;
|
|
154
|
+
font-weight: 500;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.hfp-shader-loader-track {
|
|
158
|
+
width: min(360px, 100%);
|
|
159
|
+
height: 8px;
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
border-radius: 999px;
|
|
162
|
+
background: rgba(255, 255, 255, 0.1);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.hfp-shader-loader-fill {
|
|
166
|
+
width: 100%;
|
|
167
|
+
height: 100%;
|
|
168
|
+
border-radius: inherit;
|
|
169
|
+
background: linear-gradient(90deg, #06e3fa, #4fdb5e);
|
|
170
|
+
transform: scaleX(0);
|
|
171
|
+
transform-origin: left center;
|
|
172
|
+
transition: transform 160ms ease;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.hfp-shader-loader-progress {
|
|
176
|
+
width: min(420px, 100%);
|
|
177
|
+
height: 44px;
|
|
178
|
+
display: grid;
|
|
179
|
+
grid-template-rows: repeat(2, 22px);
|
|
180
|
+
color: rgba(244, 247, 251, 0.48);
|
|
181
|
+
font: 600 13px/22px "IBM Plex Mono", "SF Mono", "Fira Code", "Courier New", monospace;
|
|
182
|
+
font-variant-numeric: tabular-nums;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.hfp-shader-loader-row {
|
|
186
|
+
display: grid;
|
|
187
|
+
grid-template-columns: minmax(0, 1fr) 74px;
|
|
188
|
+
align-items: center;
|
|
189
|
+
column-gap: 20px;
|
|
190
|
+
width: 100%;
|
|
191
|
+
white-space: nowrap;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.hfp-shader-loader-label {
|
|
195
|
+
min-width: 0;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
text-align: left;
|
|
198
|
+
text-overflow: ellipsis;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.hfp-shader-loader-value {
|
|
202
|
+
text-align: right;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@keyframes hfp-shader-loader-sheen {
|
|
206
|
+
from {
|
|
207
|
+
background-position: 140% 0;
|
|
208
|
+
}
|
|
209
|
+
to {
|
|
210
|
+
background-position: -140% 0;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* ── Theming via CSS custom properties ──
|
|
215
|
+
*
|
|
216
|
+
* Override from outside the shadow DOM:
|
|
217
|
+
* hyperframes-player {
|
|
218
|
+
* --hfp-controls-bg: linear-gradient(transparent, rgba(0,0,0,0.9));
|
|
219
|
+
* --hfp-accent: #ff6b6b;
|
|
220
|
+
* --hfp-font: "Inter", sans-serif;
|
|
221
|
+
* }
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
.hfp-controls {
|
|
225
|
+
position: absolute;
|
|
226
|
+
bottom: 0;
|
|
227
|
+
left: 0;
|
|
228
|
+
right: 0;
|
|
229
|
+
display: flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
gap: var(--hfp-controls-gap, 12px);
|
|
232
|
+
padding: var(--hfp-controls-padding, 8px 16px);
|
|
233
|
+
background: var(--hfp-controls-bg, linear-gradient(transparent, rgba(0, 0, 0, 0.7)));
|
|
234
|
+
color: var(--hfp-color, #fff);
|
|
235
|
+
font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
|
|
236
|
+
font-size: var(--hfp-font-size, 13px);
|
|
237
|
+
z-index: 10;
|
|
238
|
+
pointer-events: auto;
|
|
239
|
+
opacity: 1;
|
|
240
|
+
transition: opacity 0.3s ease;
|
|
241
|
+
user-select: none;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.hfp-controls.hfp-hidden {
|
|
245
|
+
opacity: 0;
|
|
246
|
+
pointer-events: none;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.hfp-play-btn {
|
|
250
|
+
position: relative;
|
|
251
|
+
background: none;
|
|
252
|
+
border: none;
|
|
253
|
+
color: var(--hfp-color, #fff);
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
padding: 8px;
|
|
256
|
+
display: flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
justify-content: center;
|
|
259
|
+
width: 40px;
|
|
260
|
+
height: 40px;
|
|
261
|
+
flex-shrink: 0;
|
|
262
|
+
z-index: 10;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.hfp-play-btn:hover {
|
|
266
|
+
opacity: 0.8;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* Stacked play/pause glyphs that crossfade-morph on toggle (rotate + scale). */
|
|
270
|
+
.hfp-play-btn .hfp-ico {
|
|
271
|
+
position: absolute;
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
justify-content: center;
|
|
275
|
+
transition:
|
|
276
|
+
opacity 200ms ease,
|
|
277
|
+
transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
278
|
+
}
|
|
279
|
+
.hfp-play-btn .hfp-ico-play {
|
|
280
|
+
opacity: 1;
|
|
281
|
+
transform: rotate(0) scale(1);
|
|
282
|
+
}
|
|
283
|
+
.hfp-play-btn .hfp-ico-pause {
|
|
284
|
+
opacity: 0;
|
|
285
|
+
transform: rotate(-90deg) scale(0.4);
|
|
286
|
+
}
|
|
287
|
+
.hfp-play-btn.hfp-playing .hfp-ico-play {
|
|
288
|
+
opacity: 0;
|
|
289
|
+
transform: rotate(90deg) scale(0.4);
|
|
290
|
+
}
|
|
291
|
+
.hfp-play-btn.hfp-playing .hfp-ico-pause {
|
|
292
|
+
opacity: 1;
|
|
293
|
+
transform: rotate(0) scale(1);
|
|
294
|
+
}
|
|
295
|
+
@media (prefers-reduced-motion: reduce) {
|
|
296
|
+
.hfp-play-btn .hfp-ico {
|
|
297
|
+
transition-duration: 0ms;
|
|
298
|
+
transform: none;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.hfp-play-btn svg,
|
|
303
|
+
.hfp-play-btn svg * {
|
|
304
|
+
pointer-events: none;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.hfp-scrubber {
|
|
308
|
+
flex: 1;
|
|
309
|
+
min-width: 0;
|
|
310
|
+
height: var(--hfp-scrubber-height, 4px);
|
|
311
|
+
background: var(--hfp-scrubber-bg, rgba(255, 255, 255, 0.3));
|
|
312
|
+
border-radius: var(--hfp-scrubber-radius, 2px);
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
position: relative;
|
|
315
|
+
overflow: hidden;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.hfp-scrubber:hover {
|
|
319
|
+
height: var(--hfp-scrubber-height-hover, 6px);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.hfp-progress {
|
|
323
|
+
position: absolute;
|
|
324
|
+
top: 0;
|
|
325
|
+
left: 0;
|
|
326
|
+
height: 100%;
|
|
327
|
+
background: var(--hfp-accent, #fff);
|
|
328
|
+
pointer-events: none;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.hfp-time {
|
|
332
|
+
flex-shrink: 0;
|
|
333
|
+
font-variant-numeric: tabular-nums;
|
|
334
|
+
opacity: 0.9;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.hfp-speed-wrap {
|
|
338
|
+
position: relative;
|
|
339
|
+
flex-shrink: 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.hfp-speed-btn {
|
|
343
|
+
background: var(--hfp-speed-btn-bg, rgba(255, 255, 255, 0.15));
|
|
344
|
+
border: none;
|
|
345
|
+
border-radius: var(--hfp-speed-btn-radius, 4px);
|
|
346
|
+
color: var(--hfp-color, #fff);
|
|
347
|
+
cursor: pointer;
|
|
348
|
+
font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
|
|
349
|
+
font-size: 12px;
|
|
350
|
+
font-variant-numeric: tabular-nums;
|
|
351
|
+
font-weight: 600;
|
|
352
|
+
padding: 4px 8px;
|
|
353
|
+
min-width: 40px;
|
|
354
|
+
text-align: center;
|
|
355
|
+
transition: background 0.15s ease;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.hfp-speed-btn:hover {
|
|
359
|
+
background: var(--hfp-speed-btn-bg-hover, rgba(255, 255, 255, 0.3));
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.hfp-speed-menu {
|
|
363
|
+
position: absolute;
|
|
364
|
+
bottom: calc(100% + 8px);
|
|
365
|
+
right: 0;
|
|
366
|
+
background: var(--hfp-menu-bg, rgba(20, 20, 20, 0.95));
|
|
367
|
+
backdrop-filter: blur(12px);
|
|
368
|
+
-webkit-backdrop-filter: blur(12px);
|
|
369
|
+
border: 1px solid var(--hfp-menu-border, rgba(255, 255, 255, 0.1));
|
|
370
|
+
border-radius: var(--hfp-menu-radius, 8px);
|
|
371
|
+
padding: 4px;
|
|
372
|
+
display: flex;
|
|
373
|
+
flex-direction: column;
|
|
374
|
+
gap: 2px;
|
|
375
|
+
min-width: 80px;
|
|
376
|
+
opacity: 0;
|
|
377
|
+
visibility: hidden;
|
|
378
|
+
transform: translateY(4px);
|
|
379
|
+
transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
|
|
380
|
+
box-shadow: var(--hfp-menu-shadow, 0 8px 24px rgba(0, 0, 0, 0.4));
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.hfp-speed-menu.hfp-open {
|
|
384
|
+
opacity: 1;
|
|
385
|
+
visibility: visible;
|
|
386
|
+
transform: translateY(0);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.hfp-speed-option {
|
|
390
|
+
background: none;
|
|
391
|
+
border: none;
|
|
392
|
+
border-radius: 4px;
|
|
393
|
+
color: var(--hfp-menu-color, rgba(255, 255, 255, 0.7));
|
|
394
|
+
cursor: pointer;
|
|
395
|
+
font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
|
|
396
|
+
font-size: 13px;
|
|
397
|
+
font-variant-numeric: tabular-nums;
|
|
398
|
+
padding: 6px 12px;
|
|
399
|
+
text-align: left;
|
|
400
|
+
transition: background 0.1s ease, color 0.1s ease;
|
|
401
|
+
white-space: nowrap;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.hfp-speed-option:hover {
|
|
405
|
+
background: var(--hfp-menu-hover-bg, rgba(255, 255, 255, 0.1));
|
|
406
|
+
color: var(--hfp-color, #fff);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.hfp-speed-option.hfp-active {
|
|
410
|
+
color: var(--hfp-accent, #fff);
|
|
411
|
+
font-weight: 600;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.hfp-volume-wrap {
|
|
415
|
+
position: relative;
|
|
416
|
+
flex-shrink: 0;
|
|
417
|
+
display: flex;
|
|
418
|
+
align-items: center;
|
|
419
|
+
gap: 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.hfp-mute-btn {
|
|
423
|
+
background: none;
|
|
424
|
+
border: none;
|
|
425
|
+
color: var(--hfp-color, #fff);
|
|
426
|
+
cursor: pointer;
|
|
427
|
+
padding: 4px;
|
|
428
|
+
display: flex;
|
|
429
|
+
align-items: center;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
width: 32px;
|
|
432
|
+
height: 32px;
|
|
433
|
+
flex-shrink: 0;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.hfp-mute-btn:hover {
|
|
437
|
+
opacity: 0.8;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.hfp-mute-btn svg,
|
|
441
|
+
.hfp-mute-btn svg * {
|
|
442
|
+
pointer-events: none;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.hfp-volume-slider-wrap {
|
|
446
|
+
width: 0;
|
|
447
|
+
overflow: hidden;
|
|
448
|
+
transition: width 0.2s ease;
|
|
449
|
+
display: flex;
|
|
450
|
+
align-items: center;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.hfp-volume-wrap:hover .hfp-volume-slider-wrap {
|
|
454
|
+
width: 64px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.hfp-volume-slider {
|
|
458
|
+
width: 56px;
|
|
459
|
+
height: var(--hfp-scrubber-height, 4px);
|
|
460
|
+
background: var(--hfp-scrubber-bg, rgba(255, 255, 255, 0.3));
|
|
461
|
+
border-radius: var(--hfp-scrubber-radius, 2px);
|
|
462
|
+
cursor: pointer;
|
|
463
|
+
position: relative;
|
|
464
|
+
overflow: hidden;
|
|
465
|
+
margin-left: 4px;
|
|
466
|
+
margin-right: 4px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.hfp-volume-fill {
|
|
470
|
+
position: absolute;
|
|
471
|
+
top: 0;
|
|
472
|
+
left: 0;
|
|
473
|
+
height: 100%;
|
|
474
|
+
background: var(--hfp-accent, #fff);
|
|
475
|
+
pointer-events: none;
|
|
476
|
+
}
|
|
477
|
+
`,Ke='<svg width="24" height="24" viewBox="46 21 54 56" fill="currentColor"><path d="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z"/></svg>',Qe='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><rect x="3" y="2" width="4" height="14"/><rect x="11" y="2" width="4" height="14"/></svg>',ve='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/><path d="M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></svg>',be='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/></svg>',Je='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z" opacity="0.3"/><line x1="18" y1="7" x2="14" y2="17" stroke="currentColor" stroke-width="2"/></svg>',et=[.25,.5,1,1.5,2,4];function D(r){return Number.isInteger(r)?`${r}x`:`${r}x`}function we(r){if(!Number.isFinite(r)||r<0)return"0:00";const i=Math.floor(r),e=Math.floor(i/60),t=i%60;return`${e}:${t.toString().padStart(2,"0")}`}function tt(r,i,e={}){const t=e.speedPresets??et,s=document.createElement("div");s.className="hfp-controls",s.addEventListener("click",d=>{d.stopPropagation()});const n=document.createElement("button");n.className="hfp-play-btn",n.type="button",n.innerHTML=`<span class="hfp-ico hfp-ico-play">${Ke}</span><span class="hfp-ico hfp-ico-pause">${Qe}</span>`,n.setAttribute("aria-label","Play");const o=document.createElement("div");o.className="hfp-scrubber";const a=document.createElement("div");a.className="hfp-progress",a.style.width="0%",o.appendChild(a);const c=document.createElement("span");c.className="hfp-time",c.textContent="0:00 / 0:00";const p=document.createElement("div");p.className="hfp-speed-wrap";const u=document.createElement("button");u.className="hfp-speed-btn",u.type="button",u.textContent="1x",u.setAttribute("aria-label","Playback speed: 1x");const v=document.createElement("div");v.className="hfp-speed-menu",v.setAttribute("role","menu");for(const d of t){const h=document.createElement("button");h.className="hfp-speed-option",h.type="button",h.setAttribute("role","menuitem"),h.dataset.speed=String(d),h.textContent=D(d),d===1&&h.classList.add("hfp-active"),v.appendChild(h)}p.appendChild(v),p.appendChild(u);const m=document.createElement("div");m.className="hfp-volume-wrap";const f=document.createElement("button");f.className="hfp-mute-btn",f.type="button",f.innerHTML=ve,f.setAttribute("aria-label","Mute");const g=document.createElement("div");g.className="hfp-volume-slider-wrap";const _=document.createElement("div");_.className="hfp-volume-slider",_.setAttribute("role","slider"),_.setAttribute("aria-label","Volume"),_.setAttribute("aria-valuemin","0"),_.setAttribute("aria-valuemax","100"),_.setAttribute("aria-valuenow","100"),_.tabIndex=0;const b=document.createElement("div");b.className="hfp-volume-fill",b.style.width="100%",_.appendChild(b),g.appendChild(_),m.appendChild(g),m.appendChild(f),e.audioLocked&&(m.style.display="none"),s.appendChild(n),s.appendChild(o),s.appendChild(c),s.appendChild(m),s.appendChild(p),r.appendChild(s);let E=!1,A=!1,S=1,P=null;t.indexOf(1);const O=(d,h)=>d?Je:h===0||h<.5?be:ve;n.addEventListener("click",d=>{d.stopPropagation(),E?i.onPause():i.onPlay()}),f.addEventListener("click",d=>{d.stopPropagation(),i.onMuteToggle()});let T=!1;const N=d=>{const h=_.getBoundingClientRect(),y=Math.max(0,Math.min(1,(d-h.left)/h.width));S=y,b.style.width=`${y*100}%`,_.setAttribute("aria-valuenow",String(Math.round(y*100))),A&&y>0&&i.onMuteToggle(),f.innerHTML=O(A,y),i.onVolumeChange(y)};_.addEventListener("mousedown",d=>{d.stopPropagation(),T=!0,N(d.clientX)});const te=d=>{T&&N(d.clientX)},ie=()=>{T=!1};document.addEventListener("mousemove",te),document.addEventListener("mouseup",ie),_.addEventListener("touchstart",d=>{T=!0;const h=d.touches[0];h&&N(h.clientX)},{passive:!0});const se=d=>{if(T){const h=d.touches[0];h&&N(h.clientX)}},re=()=>{T=!1};document.addEventListener("touchmove",se,{passive:!0}),document.addEventListener("touchend",re);const ne=.05;_.addEventListener("keydown",d=>{let h=S;if(d.key==="ArrowRight"||d.key==="ArrowUp")h=Math.min(1,S+ne);else if(d.key==="ArrowLeft"||d.key==="ArrowDown")h=Math.max(0,S-ne);else return;d.preventDefault(),d.stopPropagation(),S=h,b.style.width=`${h*100}%`,_.setAttribute("aria-valuenow",String(Math.round(h*100))),A&&h>0&&i.onMuteToggle(),f.innerHTML=O(A,h),i.onVolumeChange(h)});const oe=d=>{for(const h of v.querySelectorAll(".hfp-speed-option"))h.classList.toggle("hfp-active",h.dataset.speed===String(d))};u.addEventListener("click",d=>{d.stopPropagation();const h=v.classList.toggle("hfp-open");u.setAttribute("aria-expanded",String(h))}),v.addEventListener("click",d=>{d.stopPropagation();const h=d.target.closest(".hfp-speed-option");if(!h)return;const y=parseFloat(h.dataset.speed);t.indexOf(y),u.textContent=D(y),u.setAttribute("aria-label",`Playback speed: ${D(y)}`),oe(y),v.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false"),i.onSpeedChange(y)});const ae=()=>{v.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false")};document.addEventListener("click",ae);const F=d=>{const h=o.getBoundingClientRect(),y=Math.max(0,Math.min(1,(d-h.left)/h.width));i.onSeek(y)};let R=!1;o.addEventListener("mousedown",d=>{var h;d.stopPropagation(),R=!0,(h=i.onScrubStart)==null||h.call(i),F(d.clientX)});const de=d=>{R&&F(d.clientX)},le=()=>{var d;R&&(R=!1,(d=i.onScrubEnd)==null||d.call(i))};document.addEventListener("mousemove",de),document.addEventListener("mouseup",le),o.addEventListener("touchstart",d=>{var y;R=!0,(y=i.onScrubStart)==null||y.call(i);const h=d.touches[0];h&&F(h.clientX)},{passive:!0});const ue=d=>{if(R){const h=d.touches[0];h&&F(h.clientX)}},he=()=>{var d;R&&(R=!1,(d=i.onScrubEnd)==null||d.call(i))};document.addEventListener("touchmove",ue,{passive:!0}),document.addEventListener("touchend",he);const ce=()=>{P&&clearTimeout(P),P=setTimeout(()=>{E&&s.classList.add("hfp-hidden")},3e3)},V=r instanceof ShadowRoot?r.host:r,pe=()=>{s.classList.remove("hfp-hidden"),ce()},me=()=>{E&&s.classList.add("hfp-hidden")};return V.addEventListener("mousemove",pe),V.addEventListener("mouseleave",me),{updateTime(d,h){const y=h>0?Math.min(d,h):d,ke=h>0?y/h*100:0;a.style.width=`${ke}%`,c.textContent=`${we(y)} / ${we(h)}`},updatePlaying(d){E=d,n.classList.toggle("hfp-playing",d),n.setAttribute("aria-label",d?"Pause":"Play"),d?ce():s.classList.remove("hfp-hidden")},updateSpeed(d){t.indexOf(d),u.textContent=D(d),u.setAttribute("aria-label",`Playback speed: ${D(d)}`),oe(d)},updateMuted(d){A=d,f.innerHTML=O(d,S),f.setAttribute("aria-label",d?"Unmute":"Mute")},updateVolume(d){S=d,b.style.width=`${d*100}%`,_.setAttribute("aria-valuenow",String(Math.round(d*100))),f.innerHTML=O(A,d)},setVolumeControlsHidden(d){m.style.display=d?"none":""},show(){s.style.display=""},hide(){s.style.display="none"},destroy(){document.removeEventListener("mousemove",de),document.removeEventListener("mouseup",le),document.removeEventListener("touchmove",ue),document.removeEventListener("touchend",he),document.removeEventListener("mousemove",te),document.removeEventListener("mouseup",ie),document.removeEventListener("touchmove",se),document.removeEventListener("touchend",re),document.removeEventListener("click",ae),V.removeEventListener("mousemove",pe),V.removeEventListener("mouseleave",me),P&&clearTimeout(P),s.remove()}}}function it(r,i,e,t,s,n=!1){const o=t?t.split(",").map(Number).filter(p=>!isNaN(p)&&p>0):void 0,a={...o?{speedPresets:o}:{},audioLocked:n},c=tt(r,s,a);return c.updateMuted(i),c.updateVolume(e),c}function Ae(r,i,e){return i?(e||(e=document.createElement("img"),e.className="hfp-poster",r.appendChild(e)),e.src=i,e):(e==null||e.remove(),null)}function st(r){return r.composedPath().some(i=>i instanceof HTMLElement&&i.classList.contains("hfp-controls"))}let U=null;function rt(r,i){if(typeof CSSStyleSheet<"u")try{U||(U=new CSSStyleSheet,U.replaceSync(i)),r.adoptedStyleSheets=[U];return}catch{}const e=document.createElement("style");e.textContent=i,r.appendChild(e)}function nt(){const r=document.createElement("div");r.className="hfp-container";const i=document.createElement("iframe");return i.className="hfp-iframe",i.sandbox.add("allow-scripts","allow-same-origin"),i.allow="autoplay; fullscreen",i.referrerPolicy="no-referrer",i.title="Framey Composition",r.appendChild(i),{container:r,iframe:i}}function ot(r,i,e,t){const s=r.offsetWidth,n=r.offsetHeight;if(s===0||n===0)return!1;const o=Math.min(s/e,n/t);return i.style.width=`${e}px`,i.style.height=`${t}px`,i.style.transform=`translate(-50%, -50%) scale(${o})`,!0}const at=100,dt=.001;function lt(r,i,e){if(e.end<=0)return!1;const t=e.shown<e.end&&i>0?i+dt:0;return r+t>=e.end}class ut{constructor(i){l(this,"_raf",null);l(this,"_lastUpdateMs",0);l(this,"_tick",null);this._callbacks=i}start(i,e,t,s,n){this.stop();let o=null,a=0,c=0;const p=()=>{if(s()){this._raf=null;return}let u;try{u=i.time()}catch{this._raf=null;return}const v=t(),m=n();m.end>0&&(u=Math.min(u,m.end));const f=o===null?0:u-o;f!==0&&(c=Math.min(f,a),a=f),o=u;const g=lt(u,c,m);g&&(u=m.shown);const _=performance.now();if((_-this._lastUpdateMs>at||g)&&(this._lastUpdateMs=_,this._callbacks.onTimeUpdate(u,v)),g){if(this._callbacks.getLoop()){this._callbacks.restart();return}try{i.pause(),m.shown<m.end&&i.seek(m.shown,!1)}catch{}this._callbacks.onPaused(),this._raf=null;return}this._raf=requestAnimationFrame(p)};this._tick=p,this._raf=requestAnimationFrame(p)}poll(){this._raf===null||!this._tick||(cancelAnimationFrame(this._raf),this._tick())}stop(){this._raf!==null&&(cancelAnimationFrame(this._raf),this._raf=null)}get isRunning(){return this._raf!==null}}function ht(r){const i=Array.from(r.querySelectorAll("[data-composition-id]"));if(i.length===0)return r.body?[r.body]:[];const e=[];for(const t of i)pt(t)||e.push(t);return ct(r),e}function ct(r){const i=r.body;if(!i||typeof console>"u"||typeof console.warn!="function")return;const e=i.querySelectorAll("audio[data-start], video[data-start]");if(e.length===0)return;const t=[];for(const s of e)s.closest("[data-composition-id]")||t.push(s);t.length!==0&&console.warn(`[hyperframes-player] selectMediaObserverTargets: composition hosts are present, but ${t.length} body-level timed media element(s) sit outside every [data-composition-id] subtree and will not be observed. Move them inside a composition host or the parent-frame proxy will never adopt them.`,t)}function pt(r){let i=r.parentElement;for(;i;){if(i.hasAttribute("data-composition-id"))return!0;i=i.parentElement}return!1}const mt=.05,ft=2;class _t{constructor(i){l(this,"_entries",[]);l(this,"_mediaObserver");l(this,"_playbackErrorPosted",!1);l(this,"_audioOwner","runtime");l(this,"_urlAudioEntry",null);l(this,"_urlAudioSrc",null);l(this,"_dispatchEvent");l(this,"_getMuted");l(this,"_getVolume");l(this,"_getPlaybackRate");l(this,"_getCurrentTime");l(this,"_isPaused");this._dispatchEvent=i.dispatchEvent,this._getMuted=i.getMuted,this._getVolume=i.getVolume,this._getPlaybackRate=i.getPlaybackRate,this._getCurrentTime=i.getCurrentTime,this._isPaused=i.isPaused}get audioOwner(){return this._audioOwner}get entries(){return this._entries}resetForIframeLoad(){this._playbackErrorPosted=!1;const i=this._audioOwner==="parent";this._audioOwner="runtime",this.pauseAll();for(const e of this._entries)e!==this._urlAudioEntry&&(e.el.src="");this._entries=this._urlAudioEntry?[this._urlAudioEntry]:[],this._urlAudioSrc&&!this._urlAudioEntry&&(this._urlAudioEntry=this._createEntry(this._urlAudioSrc,"audio",0,1/0)),this.teardownObserver(),i&&this._dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"runtime",reason:"iframe-reload"}}))}destroy(){this.teardownObserver();for(const i of this._entries)i.el.pause(),i.el.src="";this._entries=[],this._urlAudioEntry=null,this._urlAudioSrc=null,this._audioOwner="runtime",this._playbackErrorPosted=!1}updateMuted(i){for(const e of this._entries)e.el.muted=i}updateVolume(i){for(const e of this._entries)e.el.volume=i}updatePlaybackRate(i){for(const e of this._entries)e.el.playbackRate=i}_playEntry(i){i.el.src&&i.el.play().catch(e=>this._reportPlaybackError(e))}_playEntryIfActive(i){this._refreshEntryBounds(i),this._inWindow(i,this._getCurrentTime())&&this._playEntry(i)}_refreshEntryBounds(i){var t;if(!((t=i.source)!=null&&t.isConnected))return;const e=fe(i.source);i.start=e.start??0,i.duration=e.duration!=null&&e.duration>0?e.duration:Number.POSITIVE_INFINITY}_inWindow(i,e){return Fe(e,i.start,i.start+i.duration)}_gateEntryPlayback(i,e){return this._inWindow(i,e)?(this._audioOwner==="parent"&&!this._isPaused()&&i.el.paused&&this._playEntry(i),!0):(i.el.paused||i.el.pause(),i.driftSamples=0,!1)}playAll(){for(const i of this._entries)this._playEntryIfActive(i)}pauseAll(){for(const i of this._entries)i.el.pause()}stopAdoptedMedia(){for(const i of this._entries)i.source&&i.el.pause()}seekAll(i){for(const e of this._entries)this._refreshEntryBounds(e),this._inWindow(e,i)&&(e.el.currentTime=i-e.start)}scrubAll(i){for(const e of this._entries)this._refreshEntryBounds(e),this._inWindow(e,i)?(e.el.currentTime=i-e.start,this._playEntry(e)):e.el.paused||e.el.pause()}mirrorTime(i,e){const t=(e==null?void 0:e.force)===!0;for(const s of this._entries){if(this._refreshEntryBounds(s),!this._gateEntryPlayback(s,i))continue;const n=i-s.start;Math.abs(s.el.currentTime-n)>mt?(s.driftSamples+=1,(t||s.driftSamples>=ft)&&(s.el.currentTime=n,s.driftSamples=0)):s.driftSamples=0}}promoteToParentProxy(i,e){if(this._audioOwner==="parent")return;if(this._audioOwner="parent",i)for(const s of i.querySelectorAll("video, audio"))w(s)&&(s.muted=!0);for(const s of[...this._entries])this._repointToSource(s);const t=this._getCurrentTime();e?e(t,{force:!0}):this.mirrorTime(t,{force:!0}),this._isPaused()||this.playAll(),this._dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"parent",reason:"autoplay-blocked"}}))}setupFromIframe(i){const e=i.querySelectorAll("audio[data-start], video[data-start]");for(const t of e)w(t)&&this._adoptIframeMedia(t);this._observeDynamicMedia(i)}setupFromUrl(i){if(this._urlAudioSrc===i&&this._urlAudioEntry)return;this.teardownUrlAudio();const e=this._createEntry(i,"audio",0,1/0);this._urlAudioEntry=e,this._urlAudioSrc=i,e&&this._audioOwner==="parent"&&!this._isPaused()&&(this.mirrorTime(this._getCurrentTime(),{force:!0}),this.playAll())}teardownUrlAudio(){const i=this._urlAudioEntry;if(this._urlAudioEntry=null,this._urlAudioSrc=null,!i)return;i.el.pause(),i.el.src="";const e=this._entries.indexOf(i);e!==-1&&this._entries.splice(e,1)}teardownObserver(){var i;(i=this._mediaObserver)==null||i.disconnect(),this._mediaObserver=void 0}_reportPlaybackError(i){this._playbackErrorPosted||(this._playbackErrorPosted=!0,this._dispatchEvent(new CustomEvent("playbackerror",{detail:{source:"parent-proxy",error:i}})))}_createEntry(i,e,t,s,n){if(this._urlTaken(i))return null;const o=e==="video"?document.createElement("video"):new Audio;o.preload="auto",o.src=i,o.load(),o.muted=this._getMuted(),o.volume=this._getVolume();const a=this._getPlaybackRate();a!==1&&(o.playbackRate=a);const c={el:o,start:t,duration:s,driftSamples:0,source:n};return this._entries.push(c),c}_resolveIframeMediaSrc(i){var t;const e=i.getAttribute("src")||((t=i.querySelector("source"))==null?void 0:t.getAttribute("src"));return e?new URL(e,i.ownerDocument.baseURI).href:null}_adoptIframeMedia(i){if(i.preload==="metadata"||i.preload==="none")return;const e=this._resolveIframeMediaSrc(i);if(!e)return;const t=fe(i),s=t.start??0,n=t.duration??Number.POSITIVE_INFINITY,o=i.tagName==="VIDEO"?"video":"audio",a=this._createEntry(e,o,s,n,i);a&&this._audioOwner==="parent"&&(this.mirrorTime(this._getCurrentTime(),{force:!0}),this._isPaused()||this._playEntryIfActive(a))}_followIframeMediaSrc(i){const e=this._entries.find(t=>t.source===i);if(!e)return this._adoptIframeMedia(i);this._audioOwner!=="parent"||!this._repointToSource(e)||(this.mirrorTime(this._getCurrentTime(),{force:!0}),this._isPaused()||this._playEntryIfActive(e))}_urlTaken(i,e){return this._entries.some(t=>t===e||t.source&&!t.source.isConnected?!1:(t.source&&this._resolveIframeMediaSrc(t.source)||t.el.src)===i)}_repointToSource(i){const e=i.source?this._resolveIframeMediaSrc(i.source):null;return!e||i.el.src===e?!1:this._urlTaken(e,i)?(this._removeEntry(i),!1):(i.el.src=e,i.el.load(),!0)}_detachIframeMedia(i){const e=this._entries.find(t=>t.source===i);e&&this._removeEntry(e)}_removeEntry(i){i.el.pause(),i.el.src="",this._entries.splice(this._entries.indexOf(i),1)}_observeDynamicMedia(i){if(this.teardownObserver(),typeof MutationObserver>"u"||!i.body)return;const e=new MutationObserver(n=>{for(const o of n){if(o.type==="attributes"&&o.attributeName==="src"){const a=o.target;w(a)&&a.matches("audio[data-start], video[data-start]")&&this._followIframeMediaSrc(a);continue}if(o.type==="attributes"&&o.attributeName==="preload"){const a=o.target;w(a)&&a.matches("audio[data-start], video[data-start]")&&(a.preload==="auto"?this._adoptIframeMedia(a):this._detachIframeMedia(a));continue}for(const a of o.addedNodes){if(!_e(a))continue;const c=[];w(a)&&a.matches("audio[data-start], video[data-start]")&&c.push(a);const p=a.querySelectorAll("audio[data-start], video[data-start]");for(const u of p)w(u)&&c.push(u);for(const u of c)this._adoptIframeMedia(u)}for(const a of o.removedNodes){if(!_e(a))continue;const c=[];w(a)&&a.matches("audio[data-start], video[data-start]")&&c.push(a);const p=a.querySelectorAll("audio[data-start], video[data-start]");for(const u of p)w(u)&&c.push(u);for(const u of c)this._detachIframeMedia(u)}}}),t={childList:!0,subtree:!0,attributes:!0,attributeFilter:["preload","src"]},s=ht(i);for(const n of s)e.observe(n,t);this._mediaObserver=e}}function Re(r,i,e){if(r===null&&i===null)return{range:null,clamped:!1};const t=r??0,s=i!==null&&e>0&&i>e,n=s?e:i,o=n??(e>0?e:1/0);return!(t>=0)||!(o>t)?{range:null,clamped:!0}:{range:{start:t,end:n},clamped:s}}function J(r,i,e){const t=r.end??i;return t<i?Ve(r.start,t,e):t}function Se(r,i,e,t){return r<i.start||r>=J(i,e,t)}const gt=100;function yt(r,i){return typeof r.currentTime=="number"&&Number.isFinite(r.currentTime)?r.currentTime:(r.frame??0)/i}function Le(r,i,e){return e<=0?!1:r.ended===!0?!0:r.ended===!1&&!r.isPlaying?!1:i>=e}function vt(r,i,e,t,s,n){const{duration:o}=e;if(!s){const a=Le(r,i,o);return{start:0,shownAtEnd:o,atEnd:a,stopRuntime:!1,entering:!1}}if(r.ownsRange){const a=t&&r.ended===!0&&!r.isPlaying;return{start:s.start,shownAtEnd:i,atEnd:a,stopRuntime:!1,entering:!1}}return bt(r,i,e,t,s,n)}function bt(r,i,e,t,s,n){const o=s.end??e.duration,a=e.enteringRange===!0&&(i<s.start||i>=o);return{start:s.start,shownAtEnd:J(s,e.duration,n),atEnd:t&&!a&&Le(r,i,o),stopRuntime:r.isPlaying,entering:a}}function wt(r,i,e,t){var A;const s=yt(r,i),n=!e.paused,o=n||r.isPlaying,a=(A=t.getPlayRange)==null?void 0:A.call(t),c=vt(r,s,e,o,a,i),{atEnd:p,start:u}=c,v=e.duration>0?Math.min(s,e.duration):s,m=p?c.shownAtEnd:v,f=!r.isPlaying,g=p&&o;if(g&&t.getLoop())return t.media.audioOwner==="parent"&&t.media.pauseAll(),t.seek(u),t.play(),{...e,currentTime:u,paused:!1,enteringRange:!0};const _={...e,currentTime:m,paused:f,enteringRange:c.entering};t.media.audioOwner==="parent"&&(n&&f?t.media.pauseAll():!n&&!f&&t.media.playAll(),t.media.mirrorTime(m));const b=performance.now(),E=f!==e.paused;return(b-e.lastUpdateMs>gt||E)&&(_.lastUpdateMs=b,t.updateControlsTime(m,e.duration),t.updateControlsPlaying(!f),t.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:m}}))),g&&(c.stopRuntime&&t.seek(m),t.media.audioOwner==="parent"&&t.media.pauseAll(),_.paused=!0,t.updateControlsPlaying(!1),t.dispatchEvent(new Event("ended"))),_}function At(r){return Array.isArray(r)?r.filter(i=>typeof i=="object"&&i!==null&&typeof i.id=="string"&&typeof i.start=="number"&&typeof i.duration=="number"):[]}function Rt(r,i,e){var o,a,c,p,u,v;if(r.source!==i)return;const t=r.data;if(!t||t.source!=="hf-preview")return;const s=Ue(t);if(s.status==="unsupported"){e.dispatchEvent(new CustomEvent("runtimeprotocolerror",{detail:{code:s.code,receivedVersion:s.receivedVersion}}));return}(o=e.setRuntimeFps)==null||o.call(e,s.fps);const n=s.status==="supported"&&s.metadata.capabilities.includes("play-range");if((a=e.setRuntimeOwnsPlayRange)==null||a.call(e,n),t.type==="shader-transition-state"){const m=t.state&&typeof t.state=="object"?t.state:{};e.shaderLoader.update(m,e.getShaderLoadingMode()),e.dispatchEvent(new CustomEvent("shadertransitionstate",{detail:{compositionId:t.compositionId,state:m}}));return}if(t.type==="ready"){e.onRuntimeReady();return}if(t.type==="assets-ready"){(c=e.onRuntimeAssetsReady)==null||c.call(e,t.timedOut===!0);return}if(t.type==="runtime-data-error"){(p=e.onRuntimeDataError)==null||p.call(e,t.channel,t.requestId,t.message);return}if(t.type==="runtime-data-applied"){(u=e.onRuntimeDataApplied)==null||u.call(e,t.channel,t.requestId);return}if(t.type==="state"){e.setPlaybackState(wt({frame:t.frame??0,currentTime:t.currentTime,ended:typeof t.ended=="boolean"?t.ended:void 0,isPlaying:!!t.isPlaying,ownsRange:n},s.fps,e.getPlaybackState(),e));return}if(t.type==="media-autoplay-blocked"){if(((v=e.shouldPromoteMediaAutoplayFallback)==null?void 0:v.call(e))===!1)return;let m=null;try{m=e.getIframeDoc()}catch{}e.media.promoteToParentProxy(m,(f,g)=>e.media.mirrorTime(f,g)),e.sendControl("set-media-output-muted",{muted:!0});return}if(t.type==="timeline"&&t.durationInFrames>0){const m=Number(t.durationSeconds),f=Number(t.durationInFrames),g=Number.isFinite(m)&&m>0?m:f/s.fps;if(Number.isFinite(t.compositionWidth)&&t.compositionWidth>0&&Number.isFinite(t.compositionHeight)&&t.compositionHeight>0&&e.setCompositionSize(t.compositionWidth,t.compositionHeight),Number.isFinite(g)&&g>0){const _=e.getPlaybackState();e.setPlaybackState({..._,duration:g}),e.updateControlsTime(_.currentTime,g),e.onRuntimeTimelineReady(g,typeof t.assetsReady=="boolean"?t.assetsReady:void 0)}e.setScenes(At(t.scenes));return}t.type==="stage-size"&&Number.isFinite(t.width)&&t.width>0&&Number.isFinite(t.height)&&t.height>0&&e.setCompositionSize(t.width,t.height)}function St(r,i){return r.includes(i)?!0:/hyperframe\.runtime\.iife\.js|__hyperframes\s*=/.test(r)}const Et=new Set([">"," "," ",`
|
|
478
|
+
`,"\r","\f"]);function q(r,i){const e=r.toLowerCase(),t=`<${i}`;let s=0;for(;s<e.length;){const n=e.indexOf(t,s);if(n<0)return null;const o=e[n+t.length];if(Et.has(o)){const a=e.indexOf(">",n+t.length);return a<0?null:{index:n,end:a+1}}s=n+t.length}return null}function Tt(r,i){if(!r||St(r,i))return r;const e=`<script src="${i}"><\/script>`,t=q(r,"head");if(t)return r.slice(0,t.end)+e+r.slice(t.end);const s=q(r,"body");if(s)return r.slice(0,s.index)+e+r.slice(s.index);const n=q(r,"html");return n?r.slice(0,n.end)+e+r.slice(n.end):e+r}const C="shader-capture-scale",x="shader-loading",Q="runtime-src",Ee="__hf_shader_capture_scale",Te="__hf_shader_loading",$=["Preparing scene transitions","Sampling outgoing scene motion","Sampling incoming scene motion","Caching transition frames","Finalizing transition preview"];function ee(r){if(r===null)return null;const i=Number(r);return!Number.isFinite(i)||i<=0?null:String(Math.min(1,Math.max(.25,i)))}function Ct(r){if(r===null||r.trim()==="")return"composition";const i=r.trim().toLowerCase();return i==="none"||i==="false"||i==="0"||i==="off"?"none":i==="player"||i==="true"||i==="1"||i==="on"?"player":"composition"}function Ce(r,i){return r.filter(e=>e!==""&&e.split("=")[0]!==i)}function Pt(r,i,e){const t=r.indexOf("#"),s=t>=0?r.slice(0,t):r,n=t>=0?r.slice(t):"",o=s.indexOf("?"),a=o>=0?s.slice(0,o):s,c=o>=0?s.slice(o+1):"";let p=Ce(c.split("&"),Ee);p=Ce(p,Te),i!==null&&p.push(`${Ee}=${encodeURIComponent(i)}`),e!=="composition"&&p.push(`${Te}=${encodeURIComponent(e)}`);const u=p.join("&");return`${a}${u?`?${u}`:""}${n}`}function Dt(r,i,e){if(i===null&&e==="composition")return r;const t=[];i!==null&&t.push(`window.__HF_SHADER_CAPTURE_SCALE=${JSON.stringify(i)};`),e!=="composition"&&t.push(`window.__HF_SHADER_LOADING=${JSON.stringify(e)};`);const s=`<script data-hyperframes-player-shader-options>${t.join("")}<\/script>`;return/<head\b[^>]*>/i.test(r)?r.replace(/<head\b[^>]*>/i,n=>`${n}${s}`):/<html\b[^>]*>/i.test(r)?r.replace(/<html\b[^>]*>/i,n=>`${n}${s}`):`${s}${r}`}function B(r){return Ct(r.getAttribute(x))}function Lt(r){return Number(ee(r.getAttribute(C))??"1")}function Mt(r,i){return Pt(i,ee(r.getAttribute(C)),B(r))}function H(r,i){return Tt(Dt(i,ee(r.getAttribute(C)),B(r)),Me(r))}function Me(r){var e;const i=(e=r.getAttribute(Q))==null?void 0:e.trim();if(!i)return W;try{const t=new URL(i,document.baseURI),s=t.protocol==="http:"||t.protocol==="https:",n=t.hostname==="127.0.0.1"||t.hostname==="localhost"||t.hostname==="[::1]";return s&&(n||t.origin===location.origin)?t.href:W}catch{return W}}function kt(){const r=document.createElement("div");r.className="hfp-shader-loader",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-label","Preparing scene transitions"),r.setAttribute("data-hyperframes-ignore",""),r.draggable=!1;const i=f=>{f.preventDefault(),f.stopPropagation()};for(const f of["selectstart","dragstart","pointerdown","mousedown","click","dblclick","contextmenu","touchstart"])r.addEventListener(f,i,{capture:!0});const e=document.createElement("div");e.className="hfp-shader-loader-panel",e.draggable=!1;const t=document.createElement("div");t.className="hfp-shader-loader-mark",t.draggable=!1,t.innerHTML=['<svg width="78" height="78" viewBox="0 0 100 100" fill="none" aria-hidden="true" draggable="false">','<path d="M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z" fill="url(#hfp-shader-loader-grad-left)"/>','<path d="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z" fill="url(#hfp-shader-loader-grad-right)"/>',"<defs>",'<linearGradient id="hfp-shader-loader-grad-left" x1="48.5676" y1="25" x2="44.7804" y2="71.9384" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>",'<linearGradient id="hfp-shader-loader-grad-right" x1="54.8282" y1="73.8392" x2="72.0989" y2="32.8932" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>","</defs>","</svg>"].join("");const s=document.createElement("div");s.className="hfp-shader-loader-title";const n=document.createElement("span");n.className="hfp-shader-loader-title-text",n.textContent=$[0],s.appendChild(n);const o=document.createElement("div");o.className="hfp-shader-loader-detail",o.textContent="Rendering animated scene samples for shader transitions.";const a=document.createElement("div");a.className="hfp-shader-loader-track",a.setAttribute("aria-hidden","true");const c=document.createElement("div");c.className="hfp-shader-loader-fill",a.appendChild(c);const p=document.createElement("div");p.className="hfp-shader-loader-progress";const u=f=>{const g=document.createElement("div");g.className="hfp-shader-loader-row";const _=document.createElement("span");_.className="hfp-shader-loader-label",_.textContent=f;const b=document.createElement("span");return b.className="hfp-shader-loader-value",g.appendChild(_),g.appendChild(b),p.appendChild(g),{row:g,label:_,value:b}},v=u("transition"),m=u("transition frame");return e.appendChild(t),e.appendChild(s),e.appendChild(o),e.appendChild(a),e.appendChild(p),r.appendChild(e),{root:r,fill:c,title:n,detail:o,transitionValue:v.value,transitionRow:v.row,frameLabel:m.label,frameValue:m.value,frameRow:m.row}}const xt=420;function z(r,i,e){i.textContent=e,r.style.visibility=e?"visible":"hidden"}class It{constructor(i){l(this,"_el");l(this,"_hideTimeout",null);l(this,"_hiddenCallbacks",[]);l(this,"_drawingAssets",!1);this._el=i}show(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null),this._el.root.classList.remove("hfp-hiding"),this._el.root.classList.add("hfp-visible")}hide(){if(this._el.root.classList.contains("hfp-hiding")){this._hideTimeout||this._scheduleCleanup();return}this._el.root.classList.contains("hfp-visible")&&(this._el.root.classList.add("hfp-hiding"),this._el.root.classList.remove("hfp-visible"),this._scheduleCleanup())}whenHidden(i){const e=this._el.root.classList;e.contains("hfp-visible")||e.contains("hfp-hiding")?this._hiddenCallbacks.push(i):i()}_flushHidden(){const i=this._hiddenCallbacks;this._hiddenCallbacks=[];for(const e of i)e()}reset(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null),this._el.root.classList.remove("hfp-visible","hfp-hiding"),this._drawingAssets=!1,this._flushHidden(),this._el.fill.style.transform="scaleX(0)",z(this._el.transitionRow,this._el.transitionValue,""),z(this._el.frameRow,this._el.frameValue,"")}update(i,e){const t=e==="player"&&i.loading&&!i.ready;if(this._drawingAssets&&!t)return;if(e!=="player"){this.reset();return}if(i.ready||!i.loading){this.hide();return}this._el.root.setAttribute("aria-label","Preparing scene transitions"),this._drawingAssets=!1;const s=typeof i.progress=="number"&&Number.isFinite(i.progress)?i.progress:0,n=typeof i.total=="number"&&Number.isFinite(i.total)?i.total:0,o=n>0?Math.min(1,Math.max(0,s/n)):0,a=Math.min($.length-1,Math.floor(o*$.length));this._el.title.textContent=$[a]||"Preparing scene transitions",this._el.detail.textContent=i.phase==="cached"?"Loading cached transition frames before playback.":i.phase==="finalizing"?"Uploading transition textures for smooth playback.":"Rendering animated scene samples for shader transitions.",this._el.fill.style.transform=`scaleX(${o})`;const c=i.currentTransition!==void 0&&i.transitionTotal!==void 0?`${i.currentTransition}/${i.transitionTotal}`:n>0?`${s}/${n}`:"",p=i.transitionFrame!==void 0&&i.transitionFrames!==void 0?`${i.transitionFrame}/${i.transitionFrames}`:"";this._el.frameLabel.textContent=i.phase==="cached"?"cached transition frames":i.phase==="finalizing"?"finalizing transition frames":"rendering transition frames",z(this._el.transitionRow,this._el.transitionValue,c),z(this._el.frameRow,this._el.frameValue,p),this._el.root.setAttribute("aria-valuenow",String(Math.round(o*100))),this.show()}showAssetsLoading(){this.reset(),this._el.title.textContent="Loading assets",this._el.detail.textContent="Waiting for images, video and fonts to finish loading.",this._el.root.setAttribute("aria-label","Loading assets"),this._drawingAssets=!0,this.show()}hideAssetsLoading(){this._drawingAssets&&this.hide()}get hideTimeout(){return this._hideTimeout}destroy(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null),this._hiddenCallbacks=[]}_scheduleCleanup(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(()=>{this._el.root.classList.remove("hfp-hiding"),this._hideTimeout=null,this._flushHidden()},xt)}}function Ot(r){return(r==null?void 0:r.trim().toLowerCase().startsWith("video/"))??!1}function Nt(r){const i=document.createElement("video");i.className="hfp-video",i.playsInline=!0,i.preload="metadata";const e=new AbortController,{signal:t}=e;return i.addEventListener("loadedmetadata",()=>r.onMetadata(i),{signal:t}),i.addEventListener("durationchange",()=>r.onDurationChange(i),{signal:t}),i.addEventListener("resize",()=>r.onResize(i),{signal:t}),i.addEventListener("play",()=>r.onPlay(i),{signal:t}),i.addEventListener("pause",()=>r.onPause(i),{signal:t}),i.addEventListener("timeupdate",()=>r.onTimeUpdate(),{signal:t}),i.addEventListener("error",()=>{var n,o;return r.onError(((n=i.error)==null?void 0:n.message)||"Video failed to load",((o=i.error)==null?void 0:o.code)??null)},{signal:t}),{video:i,adapter:{duration:()=>i.duration,time:()=>i.currentTime,seek:n=>{i.currentTime=n},play:()=>i.play().catch(n=>{t.aborted||r.onPlayRejected(n)}),pause:()=>i.pause(),timeScale:n=>{i.defaultPlaybackRate=n,i.playbackRate=n}},destroy:()=>{e.abort(),i.pause(),i.removeAttribute("src"),i.load(),i.remove()}}}const Ft=.1,Vt=5,G="sandbox-origin",Pe=1e4,Y=8e3,X="assets-loading",L="assets-loading-ui",Z="low-power-idle",De="disable-click-to-play",M="range-start",k="range-end",Ut=150;function K(r){return!Number.isFinite(r)||r<=0?1:Math.max(Ft,Math.min(Vt,r))}class Ht extends HTMLElement{constructor(){super();l(this,"shadow");l(this,"container");l(this,"sizer",document.createElement("div"));l(this,"iframe");l(this,"posterEl",null);l(this,"controlsApi",null);l(this,"resizeObserver");l(this,"shaderLoader");l(this,"probe");l(this,"_ready",!1);l(this,"_readyDocument",null);l(this,"_connected",!1);l(this,"_assetsReady",!1);l(this,"_painted",!1);l(this,"_pendingPlay",!1);l(this,"_assetsGeneration",0);l(this,"_assetsLoadingShowTimer",null);l(this,"_currentTime",0);l(this,"_duration",0);l(this,"_paused",!0);l(this,"_scrubbing",!1);l(this,"_lastUpdateMs",0);l(this,"_volume",1);l(this,"_compositionWidth",1920);l(this,"_compositionHeight",1080);l(this,"_rescaleWarned",!1);l(this,"_directTimelineAdapter",null);l(this,"_directTimelineClock");l(this,"_parentTickRaf",null);l(this,"_media");l(this,"_scenes",[]);l(this,"_runtimeFps",30);l(this,"_runtimeBridgeReady",!1);l(this,"_runtimeAssetsReadyGeneration",-1);l(this,"_runtimeData",new Map);l(this,"_runtimeDataRequestId",0);l(this,"_pendingRuntimeData",new Map);l(this,"_afterUpdate",null);l(this,"_videoSource",null);l(this,"_runtimeOwnsPlayRange",!1);l(this,"_enteringRange",!1);l(this,"_rangeClampReported","");this.shadow=this.attachShadow({mode:"open"}),rt(this.shadow,Ze),{container:this.container,iframe:this.iframe}=nt(),this.sizer.className="hfp-sizer",this.shadow.appendChild(this.sizer),this.shadow.appendChild(this.container);const e=kt();this.shadow.appendChild(e.root),this.shaderLoader=new It(e),this._media=new _t({dispatchEvent:t=>this._emit(t),getMuted:()=>this.muted,getVolume:()=>this._volume,getPlaybackRate:()=>this.playbackRate,getCurrentTime:()=>this._currentTime,isPaused:()=>this._paused}),this._directTimelineClock=new ut({onTimeUpdate:(t,s)=>{var n;this._currentTime=t,(n=this.controlsApi)==null||n.updateTime(t,s),this._emit(new CustomEvent("timeupdate",{detail:{currentTime:t}}))},getLoop:()=>this.loop,restart:()=>{var t;this.seek(((t=this._playRange())==null?void 0:t.start)??0),this.play()},onPaused:()=>{var t;this._media.audioOwner==="parent"&&this._media.pauseAll(),this._paused=!0,(t=this.controlsApi)==null||t.updatePlaying(!1),this._emit(new Event("ended"))},onEnded:()=>this.loop}),this.probe=new Xe(this.iframe,{resolveRuntimeUrl:()=>Me(this),hostOwnsDeadline:()=>this.hasAttribute("no-load-timeout"),onReady:t=>this._onProbeReady(t),onError:t=>this._emit(new CustomEvent("error",{detail:{message:t}}))}),this.addEventListener("click",t=>{this.disableClickToPlay||st(t)||(this._paused?this.play():this.pause())}),this.resizeObserver=new ResizeObserver(()=>this._rescale()),this._onMessage=this._onMessage.bind(this),this._onIframeLoad=this._onIframeLoad.bind(this),this.iframe.addEventListener("load",this._onIframeLoad)}static get observedAttributes(){return["src","srcdoc","width","height","controls","muted","audio-locked","volume","poster","playback-rate","audio-src","type",G,Q,C,x,L,Z,M,k]}connectedCallback(){this._connected=!0,this._applySandboxOriginPolicy(),this.resizeObserver.observe(this),window.addEventListener("message",this._onMessage),this.hasAttribute("controls")&&this._setupControls(),this.hasAttribute("poster")&&(this.posterEl=Ae(this.shadow,this.getAttribute("poster"),this.posterEl)),this.hasAttribute("audio-src")&&this._media.setupFromUrl(this.getAttribute("audio-src")),this.hasAttribute("srcdoc")&&(this.iframe.srcdoc=H(this,this.getAttribute("srcdoc"))),this.hasAttribute("src")&&this._loadSrc(this.getAttribute("src")),!this.hasAttribute("audio-locked")&&this._isLockedHostEnvironment()&&this._applyAudioLock(!0)}disconnectedCallback(){var e;this._connected=!1,this._teardownVideo(),this._sendControl("pause"),this._stopIframeMedia(),this.resizeObserver.disconnect(),window.removeEventListener("message",this._onMessage),this.probe.stop(),this._directTimelineClock.stop(),this._stopParentTickClock(),this._directTimelineAdapter=null,this.shaderLoader.destroy(),this._media.destroy(),(e=this.controlsApi)==null||e.destroy(),this.controlsApi=null,this._paused=!0,this._pendingPlay=!1,this._abandonComposition("Player disconnected before runtime data was applied")}attributeChangedCallback(e,t,s){var n,o,a,c,p;switch(e){case"src":if(!this.isConnected)break;s&&this._navigateSrc(s);break;case"type":{const u=this.getAttribute("src");if(!this.isConnected||u===null||!!this._videoSource===this._wantsVideo())break;this._navigateSrc(u);break}case"srcdoc":if(!this.isConnected)break;if(this._pendingPlay=!1,this._abandonComposition("Composition navigated before runtime data was applied"),s!==null)this._pauseForVideoSwitch(),this._teardownVideo(),this.iframe.srcdoc=H(this,s);else{this.iframe.removeAttribute("srcdoc");const u=this.getAttribute("src");u!==null&&this._wantsVideo()&&this._navigateSrc(u)}break;case G:this._applySandboxOriginPolicy(this.isConnected&&t!==s);break;case"width":this._setCompositionSize(j(s)??1920,this._compositionHeight);break;case"height":this._setCompositionSize(this._compositionWidth,j(s)??1080);break;case"controls":s!==null?this._setupControls():((n=this.controlsApi)==null||n.destroy(),this.controlsApi=null);break;case"poster":this.posterEl=Ae(this.shadow,s,this.posterEl);break;case"playback-rate":{const u=K(parseFloat(s||"1"));this._media.updatePlaybackRate(u),this._sendControl("set-playback-rate",{playbackRate:u}),(a=(o=this._directTimelineAdapter)==null?void 0:o.timeScale)==null||a.call(o,u),(c=this.controlsApi)==null||c.updateSpeed(u),this._emit(new Event("ratechange"));break}case"muted":this._handleMutedChange(s);break;case"audio-locked":this._applyAudioLock(s!==null);break;case"volume":{const u=Math.max(0,Math.min(1,parseFloat(s||"1")));this._volume=u,this._syncVideoAudio(),this._media.updateVolume(u),this._sendControl("set-volume",{volume:u}),(p=this.controlsApi)==null||p.updateVolume(u),this._emit(new Event("volumechange"));break}case"audio-src":s?this._media.setupFromUrl(s):this._media.teardownUrlAudio();break;case L:s==="none"&&this.shaderLoader.hideAssetsLoading();break;case Z:this._sendControl("set-idle-heartbeat",{slow:s!==null});break;case M:case k:this._applyPlayRange(!0);break;case C:case x:case Q:if(!this.isConnected)break;this._reloadShaderOptions();break}}_applySandboxOriginPolicy(e=!1){this.hasAttribute(G)?this.iframe.sandbox.remove("allow-same-origin"):this.iframe.sandbox.add("allow-same-origin"),e&&this._reloadForSandboxOriginPolicy()}_reloadForSandboxOriginPolicy(){if(this._videoSource)return;this._abandonComposition("Sandbox policy changed before runtime data was applied");const e=this.getAttribute("srcdoc");if(e!==null){this.iframe.srcdoc=H(this,e);return}const t=this.getAttribute("src");t===null?this.iframe.src="about:blank":this._loadSrc(t)}get iframeElement(){return this.iframe}get scenes(){return this._scenes}play(){this._play(!0)}_play(e){var o,a;if(this._ready&&!this._assetsReady){this._pendingPlay=!0;return}this._pendingPlay=!1,(o=this.posterEl)==null||o.remove(),this.posterEl=null;const t=this._ready?this._playRange():null;t?Se(this._currentTime,t,this._duration,this._runtimeFps)&&(this.seek(t.start),this._enteringRange=!0):this._duration>0&&this._currentTime>=this._duration&&this.seek(0),this._paused=!1;const s=this._tryDirectTimelinePlay();let n=!1;this._sendDisplayScale(),s||(this._sendControl("play"),this._ready&&!this._directTimelineAdapter?this._startParentTickClock():this._ready||(this._pendingPlay=!0,n=!0)),this._media.audioOwner==="parent"&&this._media.playAll(),(a=this.controlsApi)==null||a.updatePlaying(!0),!n&&e&&this._emit(new Event("play")),s&&this._directTimelineAdapter&&this._directTimelineClock.start(this._directTimelineAdapter,()=>this._currentTime,()=>this._duration,()=>this._paused,()=>this._clockStop())}pause(){var e;this._pendingPlay=!1,this._tryDirectTimelinePause()?this._showPausedVideoTime():this._sendControl("pause"),this._directTimelineClock.stop(),this._stopParentTickClock(),this._media.audioOwner==="parent"&&this._media.pauseAll(),this._paused=!0,(e=this.controlsApi)==null||e.updatePlaying(!1),this._emit(new Event("pause"))}stopMedia(){this._sendControl("stop-media"),this._stopIframeMedia(),this._media.stopAdoptedMedia()}seek(e){var t,s;this._pendingPlay=!1,!this._trySyncSeek(e)&&!this._tryDirectTimelineSeek(e)&&this._sendControl("seek",{timeSeconds:e,frame:Math.round(e*this._runtimeFps)}),this._directTimelineClock.stop(),this._stopParentTickClock(),this._currentTime=e,this._media.audioOwner==="parent"&&(this._scrubbing?this._media.scrubAll(e):(this._media.pauseAll(),this._media.seekAll(e))),this._paused=!0,(t=this.controlsApi)==null||t.updatePlaying(!1),(s=this.controlsApi)==null||s.updateTime(this._currentTime,this._duration)}setColorGrading(e,t){this._sendControl("set-color-grading",{target:e,grading:t})}clearColorGrading(e){this._sendControl("set-color-grading",{target:e,grading:null})}setColorGradingCompare(e,t){this._sendControl("set-color-grading-compare",{target:e,compare:t})}clearColorGradingCompare(e){this._sendControl("set-color-grading-compare",{target:e,compare:{enabled:!1}})}setRuntimeData(e,t){if(!/^[a-z][a-z0-9-]{0,63}$/.test(e))throw new Error(`Invalid Framey runtime-data channel: ${e}`);if(typeof structuredClone!="function")throw new Error("Framey runtime data requires structuredClone support; refusing an unverified payload");const s=structuredClone(t);this._runtimeData.set(e,s),this._deliverRuntimeData(e,s)}clearRuntimeData(e){if(!/^[a-z][a-z0-9-]{0,63}$/.test(e))throw new Error(`Invalid Framey runtime-data channel: ${e}`);this._runtimeData.delete(e),this._deliverRuntimeDataClear(e)}get currentTime(){return this._currentTime}set currentTime(e){this.seek(e)}get duration(){return this._duration}get compositionWidth(){return this._compositionWidth}get compositionHeight(){return this._compositionHeight}get paused(){return this._paused}get ready(){return this._ready}get assetsReady(){return this._assetsReady}get painted(){return this._painted}get playbackRate(){return K(parseFloat(this.getAttribute("playback-rate")||"1"))}set playbackRate(e){this.setAttribute("playback-rate",String(K(e)))}get shaderCaptureScale(){return Lt(this)}set shaderCaptureScale(e){this.setAttribute(C,String(e))}get shaderLoading(){return B(this)}set shaderLoading(e){e==="composition"?this.removeAttribute(x):this.setAttribute(x,e)}get assetsLoadingUi(){return this.getAttribute(L)==="none"?"none":"player"}set assetsLoadingUi(e){e==="none"?this.setAttribute(L,"none"):this.removeAttribute(L)}get muted(){return this.hasAttribute("muted")}set muted(e){e?this.setAttribute("muted",""):this.removeAttribute("muted")}get audioLocked(){return this.hasAttribute("audio-locked")}set audioLocked(e){e?this.setAttribute("audio-locked",""):this.removeAttribute("audio-locked")}_isLockedHostEnvironment(){if(typeof navigator>"u")return!1;const e=navigator.userAgent||"";return/\bClaude\/\d/.test(e)&&/\bElectron\b/.test(e)}_isAudioLocked(){return this.hasAttribute("audio-locked")||this._isLockedHostEnvironment()}_isSlideshowPlayer(){return this.closest("hyperframes-slideshow")!==null}_handleMutedChange(e){var t;if(e===null&&this._isAudioLocked()){this.setAttribute("muted","");return}this._media.updateMuted(e!==null),this._syncVideoAudio(),this._setIframeMediaMuted(e!==null),this._sendControl("set-muted",{muted:e!==null}),(t=this.controlsApi)==null||t.updateMuted(e!==null),this._emit(new Event("volumechange"))}_applyAudioLock(e){var t;e&&(this.muted=!0),(t=this.controlsApi)==null||t.setVolumeControlsHidden(e)}get volume(){return this._volume}set volume(e){this.setAttribute("volume",String(Math.max(0,Math.min(1,e))))}get disableClickToPlay(){return this.hasAttribute(De)}set disableClickToPlay(e){this.toggleAttribute(De,e)}get loop(){return this.hasAttribute("loop")}set loop(e){e?this.setAttribute("loop",""):this.removeAttribute("loop")}get rangeStart(){return this._readSeconds(M)}set rangeStart(e){this._writeSeconds(M,e)}get rangeEnd(){return this._readSeconds(k)}set rangeEnd(e){this._writeSeconds(k,e)}_readSeconds(e){const t=this.getAttribute(e);return t===null?null:Number(t)}_writeSeconds(e,t){t==null?this.removeAttribute(e):this.setAttribute(e,String(t))}_hasPlayRange(){return this.hasAttribute(M)||this.hasAttribute(k)}_playRange(){return Re(this.rangeStart,this.rangeEnd,this._duration).range}_sendPlayRange(e){const t=(e==null?void 0:e.end)??null;this._sendControl("set-play-range",{startSeconds:(e==null?void 0:e.start)??null,endSeconds:t})}_applyPlayRange(e){const{range:t,clamped:s}=Re(this.rangeStart,this.rangeEnd,this._duration);this._sendPlayRange(t),this._ready&&(this._reportRangeClamp(t,s),t&&e&&!this._pendingPlay&&this._moveIntoPlayRange(t))}_reportRangeClamp(e,t){const s=t?`${this.rangeStart},${this.rangeEnd},${this._duration}`:"";if(s===this._rangeClampReported||(this._rangeClampReported=s,!t))return;const n={rangeStart:(e==null?void 0:e.start)??null,rangeEnd:(e==null?void 0:e.end)??null};this._emit(new CustomEvent("rangeclamped",{detail:{...n,duration:this._duration}}))}_moveIntoPlayRange(e){Se(this._currentTime,e,this._duration,this._runtimeFps)&&(this._paused?this.seek(e.start):this._jumpWhilePlaying(e.start))}_jumpWhilePlaying(e){this._directTimelineAdapter?(this._directTimelineAdapter.seek(e,!1),this._currentTime=e):this._runtimeOwnsPlayRange||(this.seek(e),this._enteringRange=!0,this._play(!1))}_clockStop(){const e=this._playRange(),t=(e==null?void 0:e.end)??this._duration;if(!e)return{end:t,shown:t};const s=J(e,this._duration,this._runtimeFps);return{end:t,shown:s<t?(s+t)/2:s}}_sendControl(e,t={}){try{const s=this.iframe.contentWindow;return s?(s.postMessage({...t,source:"hf-parent",type:"control",action:e,...He(this._runtimeFps)},"*"),!0):((e==="set-runtime-data"||e==="clear-runtime-data")&&this._rejectRuntimeDataDelivery(t.channel,t.requestId,"Composition iframe is unavailable"),!1)}catch(s){return(e==="set-runtime-data"||e==="clear-runtime-data")&&this._rejectRuntimeDataDelivery(t.channel,t.requestId,s instanceof Error?s.message:String(s)),!1}}_deliverRuntimeData(e,t){if(!this.isConnected||!this._runtimeBridgeReady)return;const s=this._beginRuntimeDataDelivery(e);this._trySetRuntimeDataDirect(e,t,s)||this._sendControl("set-runtime-data",{channel:e,payload:t,requestId:s})}_deliverRuntimeDataClear(e){if(!this.isConnected||!this._runtimeBridgeReady)return;const t=this._beginRuntimeDataDelivery(e);this._tryClearRuntimeDataDirect(e,t)||this._sendControl("clear-runtime-data",{channel:e,requestId:t})}_trySetRuntimeDataDirect(e,t,s){var n;try{const o=(n=this.iframe.contentWindow)==null?void 0:n.__hyperframes;return typeof(o==null?void 0:o.setRuntimeData)!="function"?!1:(o.setRuntimeData(e,t,s),!0)}catch{return!1}}_tryClearRuntimeDataDirect(e,t){var s;try{const n=(s=this.iframe.contentWindow)==null?void 0:s.__hyperframes;return typeof(n==null?void 0:n.clearRuntimeData)!="function"?!1:(n.clearRuntimeData(e,t),!0)}catch{return!1}}_replayRuntimeData(){for(const[e,t]of this._runtimeData)this._deliverRuntimeData(e,t)}_beginRuntimeDataDelivery(e){const t=this._pendingRuntimeData.get(e);t&&window.clearTimeout(t.timeoutId),this._runtimeDataRequestId+=1;const s=this._runtimeDataRequestId,n=window.setTimeout(()=>{this._rejectRuntimeDataDelivery(e,s,`Runtime data delivery timed out after ${Pe}ms`)},Pe);return this._pendingRuntimeData.set(e,{requestId:s,timeoutId:n}),s}_resolveRuntimeDataDelivery(e,t){const s=this._takeRuntimeDataDelivery(e,t);s&&this._emit(new CustomEvent("runtimedataapplied",{detail:{channel:e,requestId:s.requestId}}))}_rejectRuntimeDataDelivery(e,t,s){const n=this._takeRuntimeDataDelivery(e,t);n&&this._emit(new CustomEvent("runtimedataerror",{detail:{channel:e,requestId:n.requestId,message:typeof s=="string"?s:String(s)}}))}_takeRuntimeDataDelivery(e,t){if(typeof e!="string"||typeof t!="number"||!Number.isSafeInteger(t))return null;const s=this._pendingRuntimeData.get(e);return!s||s.requestId!==t?null:(window.clearTimeout(s.timeoutId),this._pendingRuntimeData.delete(e),s)}_rejectAllRuntimeDataDeliveries(e){for(const[t,s]of[...this._pendingRuntimeData])this._rejectRuntimeDataDelivery(t,s.requestId,e)}_getSameOriginIframeDocument(){try{return this.iframe.contentDocument}catch{return null}}_setIframeMediaMuted(e){const t=this._getSameOriginIframeDocument();if(t)for(const s of t.querySelectorAll("video, audio"))w(s)&&(s.muted=e||s.defaultMuted)}_stopIframeMedia(){const e=this._getSameOriginIframeDocument();if(e)for(const t of e.querySelectorAll("video, audio"))w(t)&&t.pause()}_replayBridgeState(){this._sendControl("set-muted",{muted:this.muted}),this._sendControl("set-volume",{volume:this._volume}),this._sendControl("set-playback-rate",{playbackRate:this.playbackRate}),this._sendControl("set-native-media-sync-disabled",{disabled:this._isSlideshowPlayer()}),this._sendControl("set-web-audio-media-disabled",{disabled:this._isSlideshowPlayer()}),this._sendControl("set-idle-heartbeat",{slow:this.hasAttribute(Z)}),this._sendDisplayScale()}_sendDisplayScale(){const e=ze(this.iframe);e&&this._sendControl("set-display-scale",{scale:e})}_reloadShaderOptions(){if(!this._videoSource){if(this._abandonComposition("Shader options changed before runtime data was applied"),this.hasAttribute("srcdoc")){this.iframe.srcdoc=H(this,this.getAttribute("srcdoc")||"");return}this.hasAttribute("src")&&this._loadSrc(this.getAttribute("src")||"")}}_navigateSrc(e){this._pendingPlay=!1,this._pauseForVideoSwitch(),this._abandonComposition("Composition navigated before runtime data was applied"),this._loadSrc(e)}_wantsVideo(){return Ot(this.getAttribute("type"))&&!this.hasAttribute("srcdoc")}_pauseForVideoSwitch(){var e;!this._videoSource&&!this._wantsVideo()||(this._paused=!0,(e=this.controlsApi)==null||e.updatePlaying(!1))}_loadSrc(e){if(this._wantsVideo()){this._loadVideo(e);return}this._teardownVideo(),this.iframe.src=Mt(this,e)}_loadVideo(e){var n,o;this._videoSource||(this._videoSource=Nt({onMetadata:a=>this._applyThenEmit(()=>this._onVideoReady(a)),onDurationChange:a=>this._applyTimelineDuration(a.duration),onResize:a=>this._applyVideoSize(a),onPlay:a=>{!a.paused&&this._paused&&this.play()},onPause:a=>{a.paused&&!a.ended&&!this._paused&&this.pause()},onTimeUpdate:()=>{document.hidden&&this._playRange()&&this._directTimelineClock.poll()},onError:(a,c)=>{this._paused||this.pause(),this._emit(new CustomEvent("error",{detail:{message:a,code:c}}))},onPlayRejected:a=>this._onVideoPlayRejected(a)}),this.container.appendChild(this._videoSource.video),this.iframe.hidden=!0,this.iframe.src="about:blank"),this.probe.stop();const{video:t,adapter:s}=this._videoSource;this._directTimelineAdapter=s,this._currentTime=0,this._duration=0,(n=this.controlsApi)==null||n.updateTime(0,0),this._syncVideoAudio(),(o=s.timeScale)==null||o.call(s,this.playbackRate),t.src=e}_teardownVideo(){this._videoSource&&(this._videoSource.destroy(),this._videoSource=null,this.iframe.hidden=!1)}_syncVideoAudio(){this._videoSource&&(this._videoSource.video.muted=this.muted,this._videoSource.video.volume=this._volume)}_onVideoReady(e){this._applyTimelineDuration(e.duration),this._applyVideoSize(e),this._ready=!0,this._dispatchReady(),this._waitForAssetsReady(null),this._afterEvents(()=>{this.hasAttribute("autoplay")&&this._paused&&this.play()})}_applyTimelineDuration(e){var t;!Number.isFinite(e)||e<=0||(this._setDuration(e),(t=this.controlsApi)==null||t.updateTime(this._currentTime,e))}_applyVideoSize(e){e.videoWidth>0&&e.videoHeight>0&&this._setCompositionSize(e.videoWidth,e.videoHeight)}_onVideoPlayRejected(e){e instanceof DOMException&&e.name==="NotAllowedError"&&(this._paused||this.pause(),this._emit(new CustomEvent("playbackerror",{detail:{source:"video",error:e}})))}_trySyncSeek(e){if(this._videoSource)return!1;try{const t=this.iframe.contentWindow,s=t==null?void 0:t.__player;return typeof(s==null?void 0:s.seek)!="function"?!1:(s.seek.call(s,e),!0)}catch{return!1}}_withDirectTimeline(e){const t=this._videoSource?null:this.probe.resolveDirectTimelineAdapter(),s=t||this._directTimelineAdapter;if(!s)return!1;try{return e(s),t&&t!==this._directTimelineAdapter&&this._applyTimelineDuration(t.duration()),this._directTimelineAdapter=s,!0}catch{return!1}}_tryDirectTimelineSeek(e){return this._withDirectTimeline(t=>{t.seek(e,!1),t.pause()})}_tryDirectTimelinePlay(){return this._withDirectTimeline(e=>void e.play())}_tryDirectTimelinePause(){return this._withDirectTimeline(e=>void e.pause())}_showPausedVideoTime(){var e;this._videoSource&&(this._currentTime=this._videoSource.video.currentTime,(e=this.controlsApi)==null||e.updateTime(this._currentTime,this._duration),this._emit(new CustomEvent("timeupdate",{detail:{currentTime:this._currentTime}})))}_startParentTickClock(){this._stopParentTickClock();const e=()=>{if(this._paused){this._parentTickRaf=null;return}this._sendControl("tick"),this._parentTickRaf=requestAnimationFrame(e)};this._parentTickRaf=requestAnimationFrame(e)}_stopParentTickClock(){this._parentTickRaf!==null&&(cancelAnimationFrame(this._parentTickRaf),this._parentTickRaf=null)}_onMessage(e){this._videoSource||this.probe.failed||this._applyThenEmit(()=>this._handleRuntimeMessage(e))}_handleRuntimeMessage(e){Rt(e,this.iframe.contentWindow,{getPlaybackState:()=>({currentTime:this._currentTime,duration:this._duration,paused:this._paused,lastUpdateMs:this._lastUpdateMs,enteringRange:this._enteringRange}),setPlaybackState:({currentTime:t,duration:s,paused:n,lastUpdateMs:o,enteringRange:a})=>{this._enteringRange=a===!0,this._currentTime=t,this._setDuration(s),this._paused=n,this._lastUpdateMs=o},getShaderLoadingMode:()=>B(this),shaderLoader:this.shaderLoader,setCompositionSize:(t,s)=>this._setCompositionSize(t,s),sendControl:(t,s)=>this._sendControl(t,s),getIframeDoc:()=>this.iframe.contentDocument,onRuntimeReady:()=>{this._runtimeBridgeReady=!0,this._replayBridgeState(),this._hasPlayRange()&&this._sendPlayRange(this._playRange()),this._replayRuntimeData()},onRuntimeAssetsReady:()=>{this._runtimeAssetsReadyGeneration===this._assetsGeneration&&this._settleAssetsReady(this._assetsGeneration)},onRuntimeDataApplied:(t,s)=>this._resolveRuntimeDataDelivery(t,s),onRuntimeDataError:(t,s,n)=>this._rejectRuntimeDataDelivery(t,s,n),onRuntimeTimelineReady:(t,s)=>this._onRuntimeTimelineReady(t,s),setRuntimeFps:t=>{this._runtimeFps=t},setRuntimeOwnsPlayRange:t=>{this._runtimeOwnsPlayRange=t},shouldPromoteMediaAutoplayFallback:()=>!this._isSlideshowPlayer(),setScenes:t=>{this._scenes=t,this._emit(new CustomEvent("scenes",{detail:{scenes:t}}))},updateControlsTime:(t,s)=>{var n;return(n=this.controlsApi)==null?void 0:n.updateTime(t,s)},updateControlsPlaying:t=>{var s;return(s=this.controlsApi)==null?void 0:s.updatePlaying(t)},dispatchEvent:t=>this._emit(t),seek:t=>this.seek(t),play:()=>this.play(),getLoop:()=>this.loop,getPlayRange:()=>this._playRange(),media:this._media})}_onRuntimeTimelineReady(e,t){var n;if(this._ready)return;this.probe.stop(),this._setDuration(e),this._directTimelineAdapter=null,this._ready=!0,(n=this.controlsApi)==null||n.updateTime(this._currentTime,e),this._dispatchReady();const s=this._getSameOriginIframeDocument();s&&this._media.setupFromIframe(s),this._replayBridgeState(),this._setIframeMediaMuted(this.muted),this._waitForAssetsReady(s,t),this._playWhenWanted()}_onProbeReady(e){this._applyThenEmit(()=>this._applyProbeResult(e))}_applyProbeResult({duration:e,adapter:t,compositionSize:s}){var o;this._setDuration(e),this._directTimelineAdapter=t.kind==="direct-timeline"?t.timeline:null,s&&this._setCompositionSize(s.width,s.height),this._ready=!0,(o=this.controlsApi)==null||o.updateTime(0,e),this._dispatchReady();const n=this._getSameOriginIframeDocument();n&&this._media.setupFromIframe(n),this._setIframeMediaMuted(this.muted),this._waitForAssetsReady(n),this._playWhenWanted()}_waitForAssetsReady(e,t){this._clearAssetsLoadingShowTimer(),this._assetsReady=!1,this._painted=!1;const s=++this._assetsGeneration;if(!e){t===!1?(this._runtimeAssetsReadyGeneration=s,this._startAssetsLoadingOverlayTimer(s),setTimeout(()=>this._settleAssetsReady(s),Y)):this._settleAssetsReady(s);return}We(e,({timedOut:n})=>{s===this._assetsGeneration&&(n&&this._warnStuckAssets(e),this._settleAssetsReady(s))},{timeoutMs:Y}),this._assetsReady||this._startAssetsLoadingOverlayTimer(s)}_startAssetsLoadingOverlayTimer(e){this._assetsLoadingShowTimer=setTimeout(()=>{this._assetsLoadingShowTimer=null,!(e!==this._assetsGeneration||this._assetsReady)&&(this.setAttribute(X,""),this.assetsLoadingUi!=="none"&&this.shaderLoader.showAssetsLoading())},Ut)}_hasPendingFirstFrameAssets(e){const{pendingMedia:t,pendingImages:s,fontsLoading:n}=ge(e,{scope:ye});return t.length>0||s.length>0||n}_warnStuckAssets(e){const{pendingMedia:t,pendingImages:s,fontsLoading:n}=ge(e,{scope:ye}),o=e.defaultView;console.warn(`[hyperframes-player] assets-loading timed out after ${Y}ms, playing anyway`,{stuckMedia:t.map(a=>a.currentSrc||a.getAttribute("src")||`<${a.tagName.toLowerCase()}>`),stuckImages:s.map(a=>a.currentSrc||a.getAttribute("src")||"<img>"),fontsLoading:n,computeReady:(o==null?void 0:o.__renderReady)===!0,documentHidden:e.hidden===!0})}_settleAssetsReady(e){e!==this._assetsGeneration||this._assetsReady||(this._clearAssetsLoadingShowTimer(),this._assetsReady=!0,this.removeAttribute(X),this.shaderLoader.hideAssetsLoading(),this._emit(new Event("assetsready")),this.shaderLoader.whenHidden(()=>{e===this._assetsGeneration&&(this._painted=!0,this._emit(new Event("painted")))}),this._afterEvents(()=>{this._pendingPlay&&this.play()}))}_abandonComposition(e){this.probe.stop(),this._ready=!1,this._readyDocument=null,this._invalidateAssetsWait(),this._releaseDocument(),this._runtimeBridgeReady=!1,this._rejectAllRuntimeDataDeliveries(e)}_releaseDocument(){this._runtimeOwnsPlayRange=!1,this._enteringRange=!1,this._directTimelineAdapter=null,this._directTimelineClock.stop(),this._stopParentTickClock(),this.shaderLoader.reset(),this._media.resetForIframeLoad()}_invalidateAssetsWait(){this._clearAssetsLoadingShowTimer(),this._assetsReady=!1,this._painted=!1,this._assetsGeneration++,this.removeAttribute(X),this.shaderLoader.hide()}_clearAssetsLoadingShowTimer(){this._assetsLoadingShowTimer!==null&&(clearTimeout(this._assetsLoadingShowTimer),this._assetsLoadingShowTimer=null)}_dispatchReady(){this._readyDocument=this._getSameOriginIframeDocument();const e={duration:this._duration,compositionWidth:this._compositionWidth,compositionHeight:this._compositionHeight};this._emit(new CustomEvent("ready",{detail:e})),this._rescale(),this._rangeClampReported="",this._hasPlayRange()&&this._applyPlayRange(!0)}_setDuration(e){e!==this._duration&&(this._duration=e,this._ready&&(this._emit(new CustomEvent("durationchange",{detail:{duration:e}})),this._hasPlayRange()&&this._applyPlayRange(!1)))}_setCompositionSize(e,t){const s=e!==this._compositionWidth||t!==this._compositionHeight;if(this._compositionWidth=e,this._compositionHeight=t,this.sizer.style.aspectRatio=`${e} / ${t}`,this._rescale(),!s)return;const n={compositionWidth:e,compositionHeight:t};this._emit(new CustomEvent("resize",{detail:n}))}_applyThenEmit(e){if(this._afterUpdate){e();return}const t=[];this._afterUpdate=t;const s=[],n=o=>{try{o()}catch(a){s.push(a)}};n(e);for(const o of t)n(o);if(this._afterUpdate=null,s.length>0)throw s[0]}_afterEvents(e){this._afterUpdate?this._afterUpdate.push(e):e()}_playWhenWanted(){this._afterEvents(()=>{(this.hasAttribute("autoplay")||this._pendingPlay)&&this.play()})}_emit(e){this._afterEvents(()=>this.dispatchEvent(e))}_rescale(){const e=ot(this,this.iframe,this._compositionWidth,this._compositionHeight);e&&this._sendDisplayScale(),!e&&this._ready&&!this._rescaleWarned&&(this._rescaleWarned=!0,console.warn("[hyperframes-player] rescale no-op after ready: zero-size player element",{src:this.getAttribute("src"),offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight,compositionWidth:this._compositionWidth,compositionHeight:this._compositionHeight}))}_onIframeLoad(){if(!this._connected||this._videoSource)return;const e=this._getSameOriginIframeDocument();if(this._ready&&e===this._readyDocument){e&&this._hasPendingFirstFrameAssets(e)&&this._waitForAssetsReady(e);return}this._ready=!1,this._invalidateAssetsWait(),this._releaseDocument(),this.probe.start()}_setupControls(){this.controlsApi||(this.controlsApi=it(this.shadow,this.muted,this._volume,this.getAttribute("speed-presets"),{onPlay:()=>this.play(),onPause:()=>this.pause(),onSeek:e=>this.seek(e*this._duration),onScrubStart:()=>{this._scrubbing=!0},onScrubEnd:()=>{this._scrubbing=!1,this.seek(this._currentTime)},onSpeedChange:e=>void(this.playbackRate=e),onMuteToggle:()=>void(this.muted=!this.muted),onVolumeChange:e=>void(this.volume=e)},this._isAudioLocked()))}get _audioOwner(){return this._media.audioOwner}get _parentMedia(){return this._media.entries}_mirrorParentMediaTime(e,t){this._media.mirrorTime(e,t)}_promoteToParentProxy(){let e=null;try{e=this.iframe.contentDocument}catch{}this._media.promoteToParentProxy(e,(t,s)=>this._mirrorParentMediaTime(t,s)),this._sendControl("set-media-output-muted",{muted:!0})}_observeDynamicMedia(e){this._media.setupFromIframe(e)}}customElements.get("hyperframes-player")||customElements.define("hyperframes-player",Ht);export{Ht as HyperframesPlayer,et as SPEED_PRESETS,D as formatSpeed,we as formatTime};
|