@allyhub/sdk 0.1.0-alpha.8 → 0.2.0-next.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/NOTICE +85 -0
- package/client.d.ts +45 -1
- package/dist/anim.js +2 -75
- package/dist/define.d.ts +10 -4
- package/dist/define.js +2 -95
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +2 -457
- package/dist/fit.js +2 -60
- package/dist/free.d.ts +18 -0
- package/dist/free.js +2 -0
- package/dist/index.d.ts +28 -13
- package/dist/index.js +2 -11
- package/dist/input.d.ts +306 -0
- package/dist/input.js +2 -0
- package/dist/media.d.ts +3 -6
- package/dist/media.js +2 -27
- package/dist/messages.d.ts +3 -2
- package/dist/messages.js +2 -2
- package/dist/module.d.ts +24 -0
- package/dist/module.js +2 -0
- package/dist/noise.js +2 -233
- package/dist/parts.d.ts +97 -21
- package/dist/parts.js +2 -414
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +2 -720
- package/dist/phone.d.ts +26 -0
- package/dist/phone.js +2 -0
- package/dist/piece.d.ts +106 -35
- package/dist/piece.js +2 -38
- package/dist/props.d.ts +1 -1
- package/dist/props.js +2 -35
- package/dist/scenery.d.ts +2 -0
- package/dist/scenery.js +2 -0
- package/dist/text.js +2 -38
- package/dist/written.d.ts +12 -0
- package/dist/written.js +2 -0
- package/docs/README.md +18 -0
- package/docs/batches.md +148 -0
- package/docs/contract.md +51 -0
- package/docs/defaults.md +703 -0
- package/docs/docs.md +148 -0
- package/docs/footage.md +249 -0
- package/docs/layers.md +317 -0
- package/docs/modeling.md +143 -0
- package/docs/project.md +265 -0
- package/docs/scenery.md +308 -0
- package/docs/sheets.md +119 -0
- package/docs/slides.md +111 -0
- package/docs/sound.md +170 -0
- package/docs/speech.md +289 -0
- package/docs/video.md +265 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
- package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
- package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
- package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
- package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
- package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
- package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
- package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
- package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/audio/package.json +17 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
- package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
- package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
- package/node_modules/@allyhub-next/formats/package.json +14 -0
- package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
- package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
- package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
- package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
- package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
- package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
- package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
- package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
- package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
- package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
- package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
- package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
- package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
- package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
- package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
- package/node_modules/@allyhub-next/protocol/package.json +13 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
- package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
- package/node_modules/@allyhub-next/runtimes/package.json +14 -0
- package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
- package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
- package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
- package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
- package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
- package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
- package/node_modules/@allyhub-next/scenery/package.json +13 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
- package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
- package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
- package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
- package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
- package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
- package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
- package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
- package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
- package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
- package/node_modules/@allyhub-next/video-core/package.json +14 -0
- package/package.json +52 -41
- package/README.md +0 -17
- package/dist/anim.d.ts.map +0 -1
- package/dist/anim.js.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/define.js.map +0 -1
- package/dist/dom.d.ts.map +0 -1
- package/dist/dom.js.map +0 -1
- package/dist/fit.d.ts.map +0 -1
- package/dist/fit.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/media.d.ts.map +0 -1
- package/dist/media.js.map +0 -1
- package/dist/messages.d.ts.map +0 -1
- package/dist/messages.js.map +0 -1
- package/dist/noise.d.ts.map +0 -1
- package/dist/noise.js.map +0 -1
- package/dist/parts.d.ts.map +0 -1
- package/dist/parts.js.map +0 -1
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/piece.d.ts.map +0 -1
- package/dist/piece.js.map +0 -1
- package/dist/props.d.ts.map +0 -1
- package/dist/props.js.map +0 -1
- package/dist/text.d.ts.map +0 -1
- package/dist/text.js.map +0 -1
- /package/{LICENSE → LICENSE.md} +0 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { MediaGen } from "./gen.js";
|
|
2
|
+
import type { Box } from "./problem.js";
|
|
3
|
+
import type { Envelope, UnheardSound } from "./voice.js";
|
|
4
|
+
export type MediaKind = "image" | "audio" | "video" | "font"
|
|
5
|
+
/** A 3D model and its parts: glTF, GLB, a glTF's buffers, KTX2 textures. */
|
|
6
|
+
| "model"
|
|
7
|
+
/** A 3D scenery's environment: HDR and EXR pictures. */
|
|
8
|
+
| "environment";
|
|
9
|
+
export interface Word {
|
|
10
|
+
text: string;
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
13
|
+
/**
|
|
14
|
+
* How sure the recognizer was of the word, 0 to 1: the lowest
|
|
15
|
+
* probability it gave any of the word's letter tokens (`allyhub
|
|
16
|
+
* transcribe` with Parakeet: greedy decoding's token log probability,
|
|
17
|
+
* exponentiated). Absent when the recognizer gave none, or the file was
|
|
18
|
+
* written another way.
|
|
19
|
+
*/
|
|
20
|
+
confidence?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface MediaInfo {
|
|
23
|
+
/** Path in the project, relative to the project root. */
|
|
24
|
+
path: string;
|
|
25
|
+
sha256: string;
|
|
26
|
+
kind: MediaKind;
|
|
27
|
+
/** Where the stage loads it; valid only at run time. */
|
|
28
|
+
url: string;
|
|
29
|
+
bytes?: number;
|
|
30
|
+
width?: number;
|
|
31
|
+
height?: number;
|
|
32
|
+
/** Seconds (audio, video). */
|
|
33
|
+
duration?: number;
|
|
34
|
+
/** Video: whether it has a sound stream (ffprobe). */
|
|
35
|
+
audio?: boolean;
|
|
36
|
+
/** Audio and video: word times from the sibling `<name>.words.json` (a take). */
|
|
37
|
+
words?: Word[];
|
|
38
|
+
/** Image: element boxes from the sibling `<name>.elements.json` (a page screenshot). */
|
|
39
|
+
elements?: Record<string, Box>;
|
|
40
|
+
/** Audio: integrated loudness (LUFS), measured when mixing. */
|
|
41
|
+
loudness?: number;
|
|
42
|
+
/**
|
|
43
|
+
* How `loudness` was measured: "integrated" (BS.1770, gated), or
|
|
44
|
+
* "level", the K-weighted level over the whole file, for a sound too
|
|
45
|
+
* short for one 0.4 s block or all under the gate (a click). Absent:
|
|
46
|
+
* integrated.
|
|
47
|
+
*/
|
|
48
|
+
loudnessBy?: "integrated" | "level";
|
|
49
|
+
/**
|
|
50
|
+
* Audio without words (music): its tempo, measured by the build from
|
|
51
|
+
* its onsets (`@allyhub/analysis` beats): beats per minute, how steady
|
|
52
|
+
* the beat is (0–1), and the first beat in seconds. Absent when the
|
|
53
|
+
* file has no steady tempo or could not be measured.
|
|
54
|
+
*/
|
|
55
|
+
tempo?: {
|
|
56
|
+
bpm: number;
|
|
57
|
+
confidence: number;
|
|
58
|
+
beat: number;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Video: the rotation its display matrix asks for (90, 180 or 270,
|
|
62
|
+
* clockwise); `width` and `height` are already the displayed ones.
|
|
63
|
+
*/
|
|
64
|
+
rotation?: number;
|
|
65
|
+
/** Video: its faces over time, and the default speaker (the media index's face track). */
|
|
66
|
+
faces?: FaceTrack;
|
|
67
|
+
/** Video: a person matte is in the media index. */
|
|
68
|
+
matte?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* A take (audio or video with words): its level every 10 ms, which cut
|
|
71
|
+
* points snap to (voice.ts), measured by the build and kept in the media
|
|
72
|
+
* index.
|
|
73
|
+
*/
|
|
74
|
+
envelope?: Envelope;
|
|
75
|
+
/** A take: the median level of its words, dBFS. */
|
|
76
|
+
speechDb?: number;
|
|
77
|
+
/** A take: what is heard between its words (voice.ts), reported, never removed on its own. */
|
|
78
|
+
sounds?: UnheardSound[];
|
|
79
|
+
/**
|
|
80
|
+
* The file's provenance, from the `<file>.gen.json` beside it (gen.ts):
|
|
81
|
+
* the tool that generated it, when, from what input. Absent without a
|
|
82
|
+
* readable record.
|
|
83
|
+
*/
|
|
84
|
+
gen?: MediaGen;
|
|
85
|
+
/** A `<file>.gen.json` beside it that could not be read, and why. */
|
|
86
|
+
genUnread?: {
|
|
87
|
+
record: string;
|
|
88
|
+
error: string;
|
|
89
|
+
};
|
|
90
|
+
/** A glTF or GLB (kind "model"): what it holds, measured by the build. */
|
|
91
|
+
model?: ModelInfo;
|
|
92
|
+
/**
|
|
93
|
+
* Video: where the stage loads that matte, when its host serves it (the
|
|
94
|
+
* preview draws the speaker cut out with it); valid only at run time.
|
|
95
|
+
*/
|
|
96
|
+
matteUrl?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Audio and video: where the stage loads the sound denoised and sped
|
|
99
|
+
* like a take's denoise() and speed(), or filtered like a stem's filter, in the render, with
|
|
100
|
+
* `?db=<reduction>`, `&speed=<times>` and `&filter=<chain>` appended (any of them), when
|
|
101
|
+
* its host makes it (the preview); valid only at run time.
|
|
102
|
+
*/
|
|
103
|
+
denoisedUrl?: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A media value turned into a string is its `url`, so `img.src = logo`
|
|
107
|
+
* and `` `url(${logo})` `` draw the file. The method is not enumerable:
|
|
108
|
+
* the value's JSON, its spread copies and the digests stay as they were.
|
|
109
|
+
* Returns the value itself.
|
|
110
|
+
*/
|
|
111
|
+
export declare function asUrlString<T extends {
|
|
112
|
+
url: string;
|
|
113
|
+
}>(value: T): T;
|
|
114
|
+
/** Where the media index keeps what it learnt about a file, from the project root. */
|
|
115
|
+
export declare const INDEX_DIR = ".allyhub/cache/index";
|
|
116
|
+
/** A file of a media file's index entry: `.allyhub/cache/index/<sha256>/<name>`. */
|
|
117
|
+
export declare function indexPath(sha256: string, name: string): string;
|
|
118
|
+
export type { FaceSample, FaceTrack, TrackedFace } from "@allyhub-next/formats";
|
|
119
|
+
import type { FaceTrack } from "@allyhub-next/formats";
|
|
120
|
+
type FaceBox = [number, number, number, number];
|
|
121
|
+
/**
|
|
122
|
+
* The box of face `id` (default: the track's speaker) at t, linear
|
|
123
|
+
* between samples; undefined outside its samples, or when the track has
|
|
124
|
+
* no such face.
|
|
125
|
+
*/
|
|
126
|
+
export declare function faceAt(track: FaceTrack, t: number, id?: number | undefined): FaceBox | undefined;
|
|
127
|
+
/** Every face of a track at t, with its id, in id order. */
|
|
128
|
+
export declare function facesAt(track: FaceTrack, t: number): {
|
|
129
|
+
id: number;
|
|
130
|
+
box: FaceBox;
|
|
131
|
+
}[];
|
|
132
|
+
/** Whether a track has a face with this id. */
|
|
133
|
+
export declare function hasFace(track: FaceTrack, id: number): boolean;
|
|
134
|
+
/** The media kind of a path, by its extension; undefined when not media. */
|
|
135
|
+
export declare function mediaKindOf(path: string): MediaKind | undefined;
|
|
136
|
+
/** Every media extension, without the dot. */
|
|
137
|
+
export declare const MEDIA_EXTENSIONS: readonly string[];
|
|
138
|
+
/**
|
|
139
|
+
* Joins a path relative to a file in the project: ("a/b/film.ts", "./vo/en.mp3")
|
|
140
|
+
* → "a/b/vo/en.mp3". Undefined when it leaves the project.
|
|
141
|
+
*/
|
|
142
|
+
export declare function repoPath(fromFile: string, spec: string): string | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* Joins a path written in a folder of the project ("" its root), as the
|
|
145
|
+
* SDK records where a spec was written: ("a/b", "./vo/en.mp3") →
|
|
146
|
+
* "a/b/vo/en.mp3". Undefined when it leaves the project.
|
|
147
|
+
*/
|
|
148
|
+
export declare function pathIn(folder: string, spec: string): string | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* A glTF or GLB as the build measures it (docs/design/3d-worlds.md §4.6),
|
|
151
|
+
* in two steps: its own description (the JSON: extensions, named nodes,
|
|
152
|
+
* the files it names), which never fails; then its contents through
|
|
153
|
+
* glTF-Transform (bounds, counts, materials, textures, animations), which
|
|
154
|
+
* says why when it cannot read them. glTF and three.js are Y up, in metres.
|
|
155
|
+
*/
|
|
156
|
+
export interface ModelInfo {
|
|
157
|
+
container: "glb" | "gltf";
|
|
158
|
+
/** asset.generator: what wrote it. */
|
|
159
|
+
generator?: string;
|
|
160
|
+
/** asset.copyright. */
|
|
161
|
+
copyright?: string;
|
|
162
|
+
/** It carries rights metadata (KHR_xmp_json_ld). */
|
|
163
|
+
rights?: boolean;
|
|
164
|
+
extensionsUsed: string[];
|
|
165
|
+
extensionsRequired: string[];
|
|
166
|
+
/** Required extensions no lent decoder reads: three.js cannot load it (AK-W003). */
|
|
167
|
+
unsupported: string[];
|
|
168
|
+
/** Files it names that are not there, as project paths. */
|
|
169
|
+
missing: string[];
|
|
170
|
+
/** Its named nodes, with their paths from its root: what `getObjectByName` takes. */
|
|
171
|
+
nodes: {
|
|
172
|
+
name: string;
|
|
173
|
+
path: string;
|
|
174
|
+
}[];
|
|
175
|
+
/** Its default scene's box, metres, and its largest side. */
|
|
176
|
+
bounds?: {
|
|
177
|
+
min: [number, number, number];
|
|
178
|
+
max: [number, number, number];
|
|
179
|
+
size: [number, number, number];
|
|
180
|
+
largest: number;
|
|
181
|
+
};
|
|
182
|
+
counts?: {
|
|
183
|
+
nodes: number;
|
|
184
|
+
meshes: number;
|
|
185
|
+
primitives: number;
|
|
186
|
+
triangles: number;
|
|
187
|
+
instances: number;
|
|
188
|
+
};
|
|
189
|
+
materials?: {
|
|
190
|
+
name: string;
|
|
191
|
+
extensions: string[];
|
|
192
|
+
}[];
|
|
193
|
+
textures?: {
|
|
194
|
+
name: string;
|
|
195
|
+
mimeType: string;
|
|
196
|
+
width?: number;
|
|
197
|
+
height?: number;
|
|
198
|
+
bytes: number;
|
|
199
|
+
gpuBytes?: number;
|
|
200
|
+
}[];
|
|
201
|
+
animations?: {
|
|
202
|
+
name: string;
|
|
203
|
+
duration: number;
|
|
204
|
+
channels: number;
|
|
205
|
+
}[];
|
|
206
|
+
skins: number;
|
|
207
|
+
morphTargets: number;
|
|
208
|
+
cameras: number;
|
|
209
|
+
lights: number;
|
|
210
|
+
/** glTF-Validator's counts by severity, and its first messages. */
|
|
211
|
+
validator?: {
|
|
212
|
+
errors: number;
|
|
213
|
+
warnings: number;
|
|
214
|
+
infos: number;
|
|
215
|
+
hints: number;
|
|
216
|
+
messages: {
|
|
217
|
+
code: string;
|
|
218
|
+
severity: number;
|
|
219
|
+
message: string;
|
|
220
|
+
pointer?: string;
|
|
221
|
+
}[];
|
|
222
|
+
};
|
|
223
|
+
/** Why the contents (bounds, counts, materials, textures, animations) were not measured. */
|
|
224
|
+
contentsMissing?: string;
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=media.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{CACHE_DIR as m}from"@allyhub-next/formats";export function asUrlString(e){return Object.prototype.hasOwnProperty.call(e,"toString")||Object.defineProperty(e,"toString",{value(){return this.url},enumerable:!1,configurable:!0,writable:!0}),e}export const INDEX_DIR=`${m}/index`;export function indexPath(e,n){return`${INDEX_DIR}/${e}/${n}`}function c(e,n,t){const o=e[0],i=e.at(-1);if(!o||!i)return;const s=1/Math.max(1,n);if(t<o.t-s||t>i.t+s)return;if(t<=o.t)return o.box;if(t>=i.t)return i.box;let a=0,u=e.length-1;for(;u-a>1;){const r=a+u>>1;(e[r]?.t??0)<=t?a=r:u=r}const f=e[a]??o,d=e[u]??i,l=d.t===f.t?0:(t-f.t)/(d.t-f.t);return[0,1,2,3].map(r=>(f.box[r]??0)+((d.box[r]??0)-(f.box[r]??0))*l)}export function faceAt(e,n,t=e.speaker){if(t===void 0)return;const o=e.faces.find(i=>i.id===t);return o?c(o.samples,e.fps,n):void 0}export function facesAt(e,n){return e.faces.flatMap(t=>{const o=c(t.samples,e.fps,n);return o?[{id:t.id,box:o}]:[]})}export function hasFace(e,n){return e.faces.some(t=>t.id===n)}const p={png:"image",jpg:"image",jpeg:"image",webp:"image",gif:"image",svg:"image",avif:"image",mp3:"audio",wav:"audio",m4a:"audio",ogg:"audio",aac:"audio",flac:"audio",mp4:"video",webm:"video",mov:"video",m4v:"video",qt:"video",woff2:"font",woff:"font",ttf:"font",otf:"font",glb:"model",gltf:"model",bin:"model",ktx2:"model",hdr:"environment",exr:"environment"};export function mediaKindOf(e){const n=/\.([A-Za-z0-9]+)$/.exec(e)?.[1]?.toLowerCase();return n===void 0?void 0:p[n]}export const MEDIA_EXTENSIONS=Object.keys(p);export function repoPath(e,n){return pathIn(e.split("/").slice(0,-1).join("/"),n)}export function pathIn(e,n){const t=n.startsWith("/")||e===""?[]:e.split("/");for(const o of n.split("/"))if(!(o==="."||o===""))if(o===".."){if(t.length===0)return;t.pop()}else t.push(o);return t.join("/")}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface SpokenText {
|
|
2
|
+
display: string;
|
|
3
|
+
speak: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A message with variants (inlang's complex message, unwrapped from its
|
|
7
|
+
* one-element array): `declarations` name the inputs and the plural
|
|
8
|
+
* locals, `selectors` what to match on, `match` maps "sel=value, …" to
|
|
9
|
+
* the text. `*` matches anything.
|
|
10
|
+
*/
|
|
11
|
+
export interface VariantsMessage {
|
|
12
|
+
declarations: string[];
|
|
13
|
+
selectors: string[];
|
|
14
|
+
match: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
export type MessageValue = string | SpokenText | VariantsMessage;
|
|
17
|
+
/** A messages file, as read: key → value. */
|
|
18
|
+
export type MessagesFile = Record<string, MessageValue>;
|
|
19
|
+
/** Keys: letters, digits, `_` and `-`, separated by dots. */
|
|
20
|
+
export declare const MESSAGE_KEY: RegExp;
|
|
21
|
+
/** The JSON Schema reference inlang files may carry; not a message. */
|
|
22
|
+
export declare const SCHEMA_KEY = "$schema";
|
|
23
|
+
/** Locale names: en, zh-cn, pt-br… (lower case, as the file names). */
|
|
24
|
+
export declare const LOCALE: RegExp;
|
|
25
|
+
export declare function isSpoken(v: unknown): v is SpokenText;
|
|
26
|
+
export declare function isVariants(v: unknown): v is VariantsMessage;
|
|
27
|
+
type Inputs = Readonly<Record<string, string | number>>;
|
|
28
|
+
/**
|
|
29
|
+
* What a value shows on screen: `display` of a spoken pair, the selected
|
|
30
|
+
* variant of a message with variants, else itself.
|
|
31
|
+
*/
|
|
32
|
+
export declare function displayOf(v: MessageValue | undefined, inputs?: Inputs, locale?: string): string | undefined;
|
|
33
|
+
/** What a value reads aloud: `speak` of a spoken pair, else as displayOf. */
|
|
34
|
+
export declare function speakOf(v: MessageValue | undefined, inputs?: Inputs, locale?: string): string | undefined;
|
|
35
|
+
/** Every text a value can show: each variant of a message with variants. */
|
|
36
|
+
export declare function textsOf(v: MessageValue | undefined): string[];
|
|
37
|
+
/** A parsed declaration: an input, or a local that applies plural to an input. */
|
|
38
|
+
export type Declaration = {
|
|
39
|
+
kind: "input";
|
|
40
|
+
name: string;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "plural";
|
|
43
|
+
name: string;
|
|
44
|
+
of: string;
|
|
45
|
+
ordinal: boolean;
|
|
46
|
+
};
|
|
47
|
+
/** One declaration, or a message saying what is wrong with it. */
|
|
48
|
+
export declare function parseDeclaration(text: string): Declaration | string;
|
|
49
|
+
/** A match key ("count=one, platform=*") as selector → value. */
|
|
50
|
+
export declare function parseMatchKey(key: string): Map<string, string> | undefined;
|
|
51
|
+
/** The selectors of a message: as written, else the names in its first match key. */
|
|
52
|
+
export declare function selectorsOf(m: VariantsMessage): string[];
|
|
53
|
+
/** What is wrong with a message with variants, or undefined when nothing is. */
|
|
54
|
+
export declare function variantsProblem(m: VariantsMessage): string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The inputs a message takes, by name: numbers for what a plural counts,
|
|
57
|
+
* text for the rest (declared inputs, selectors, {name} variables).
|
|
58
|
+
*/
|
|
59
|
+
export declare function messageInputs(v: MessageValue | undefined): Map<string, "number" | "text">;
|
|
60
|
+
/**
|
|
61
|
+
* The text of a message with variants for these inputs (Intl.PluralRules
|
|
62
|
+
* in the locale for plurals). Per selector, an exact value beats a plural
|
|
63
|
+
* category, which beats `*`; the best-matching variant wins, the first
|
|
64
|
+
* written on a tie. With no match (no inputs given): the variant whose
|
|
65
|
+
* plurals are all `other`, else the first.
|
|
66
|
+
*/
|
|
67
|
+
export declare function selectVariant(m: VariantsMessage, inputs: Inputs, locale?: string): string;
|
|
68
|
+
/** Fills {name} variables; unknown names stay as written. */
|
|
69
|
+
export declare function fillMessage(text: string, inputs: Readonly<Record<string, string | number>>): string;
|
|
70
|
+
/** A tree built from numbered and named keys under a prefix. */
|
|
71
|
+
export type MessageTree = string | MessageTree[] | {
|
|
72
|
+
[k: string]: MessageTree;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The values under `prefix.`, as a list: `prefix.0`, `prefix.1`… in order.
|
|
76
|
+
* Deeper keys make objects and lists (`plans.0.name`, `plans.0.features.1`).
|
|
77
|
+
* Numbering stops at the first gap. `keys` receives every key used.
|
|
78
|
+
*/
|
|
79
|
+
export declare function messageList(read: (key: string) => string | undefined, allKeys: Iterable<string>, prefix: string, keys?: string[]): MessageTree[];
|
|
80
|
+
/**
|
|
81
|
+
* Orders locales: the configured default first, else "en" first, then the
|
|
82
|
+
* rest alphabetically.
|
|
83
|
+
*/
|
|
84
|
+
export declare function orderLocales(locales: Iterable<string>, preferred?: readonly string[]): string[];
|
|
85
|
+
/** A language's own name ("简体中文"); the code itself when we have none. */
|
|
86
|
+
export declare function languageName(lang: string): string;
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const MESSAGE_KEY=/^[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*$/,SCHEMA_KEY="$schema",LOCALE=/^[a-z]{2,3}(-[a-z0-9]{2,8})?$/;export function isSpoken(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.display=="string"&&typeof e.speak=="string"}export function isVariants(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.match=="object"}export function displayOf(e,n={},s){return isVariants(e)?selectVariant(e,n,s):isSpoken(e)?e.display:e}export function speakOf(e,n={},s){return isVariants(e)?selectVariant(e,n,s):isSpoken(e)?e.speak:e}export function textsOf(e){if(isVariants(e))return[...new Set(Object.values(e.match))];const n=displayOf(e);return n===void 0?[]:[n]}const x=/^input\s+([A-Za-z_][A-Za-z0-9_]*)$/,A=/^local\s+([A-Za-z_][A-Za-z0-9_]*)\s*=\s*([A-Za-z_][A-Za-z0-9_]*)\s*:\s*([A-Za-z]+)((?:\s+[A-Za-z]+\s*=\s*[A-Za-z]+)*)$/;export function parseDeclaration(e){const n=e.trim(),s=x.exec(n);if(s?.[1])return{kind:"input",name:s[1]};const r=A.exec(n);if(r?.[1]&&r[2]&&r[3]){if(r[3]!=="plural")return`"${n}": only plural is supported, not ${r[3]}`;const t=new Map([...(r[4]??"").matchAll(/([A-Za-z]+)\s*=\s*([A-Za-z]+)/g)].map(a=>[a[1]??"",a[2]??""])).get("type")??"cardinal";return t!=="cardinal"&&t!=="ordinal"?`"${n}": type must be cardinal or ordinal`:{kind:"plural",name:r[1],of:r[2],ordinal:t==="ordinal"}}return`cannot read "${n}": write "input name" or "local name = input: plural"`}export function parseMatchKey(e){const n=new Map;for(const s of e.split(",")){const r=/^\s*([A-Za-z_][A-Za-z0-9_]*)\s*=\s*([^,=\s]+)\s*$/.exec(s);if(!r?.[1]||!r[2])return;n.set(r[1],r[2])}return n}export function selectorsOf(e){if(e.selectors.length>0)return e.selectors;const n=Object.keys(e.match)[0];return n===void 0?[]:[...parseMatchKey(n)?.keys()??[]]}function g(e){return e.declarations.map(parseDeclaration).filter(n=>typeof n!="string")}export function variantsProblem(e){for(const t of e.declarations){const a=parseDeclaration(t);if(typeof a=="string")return a}const n=g(e),s=new Set(n.filter(t=>t.kind==="input").map(t=>t.name));for(const t of n)if(t.kind==="plural"&&!s.has(t.of))return`${t.of}, used by plural, must be declared first as "input ${t.of}"`;const r=selectorsOf(e),o=Object.keys(e.match);if(o.length===0)return"match needs at least one entry";if(r.length===0)return"selectors must not be empty";for(const t of o){const a=parseMatchKey(t);if(!a)return`match key "${t}" must be written as selector=value, separated by commas`;const p=[...a.keys()];if(p.length!==r.length||p.some(i=>!r.includes(i)))return`match key "${t}" must name every selector (${r.join(", ")}) exactly once`}}export function messageInputs(e){const n=new Map;if(e===void 0)return n;const s=new Set;if(isVariants(e)){const o=g(e);for(const t of o)t.kind==="input"?n.set(t.name,"text"):s.add(t.name);for(const t of o)t.kind==="plural"&&n.set(t.of,"number");for(const t of selectorsOf(e))!s.has(t)&&!n.has(t)&&n.set(t,"text")}const r=isVariants(e)?Object.values(e.match):isSpoken(e)?[e.display,e.speak]:[e];for(const o of r)for(const t of o.matchAll(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g)){const a=t[1]??"";!s.has(a)&&!n.has(a)&&n.set(a,"text")}return n}const h=new Map;function b(e,n,s){if(!Number.isFinite(e))return;const r=`${n??""}|${String(s)}`;let o=h.get(r);if(!o){const t=s?"ordinal":"cardinal";try{o=new Intl.PluralRules(n,{type:t})}catch{o=new Intl.PluralRules(void 0,{type:t})}h.set(r,o)}return o.select(e)}export function selectVariant(e,n,s){const r=new Map;for(const i of g(e))i.kind==="plural"&&r.set(i.name,{of:i.of,ordinal:i.ordinal});const o=selectorsOf(e),t=o.map(i=>{const d=r.get(i);if(d){const f=n[d.of],y=f===void 0||f===""?NaN:Number(f);return{exact:Number.isFinite(y)?String(y):void 0,category:b(y,s,d.ordinal)}}const c=n[i];return{exact:c===void 0?void 0:String(c),category:void 0}});let a,p=-1;for(const[i,d]of Object.entries(e.match)){const c=parseMatchKey(i);if(!c)continue;let f=0;for(const[y,u]of o.entries()){const l=c.get(u),m=t[y];if(l==="*")f+=1;else if(m?.exact!==void 0&&l===m.exact)f+=3;else if(m?.category!==void 0&&l===m.category)f+=2;else{f=-1;break}}f>p&&(a=d,p=f)}if(a!==void 0)return a;if(r.size>0)for(const[i,d]of Object.entries(e.match)){const c=parseMatchKey(i);if(c&&[...r.keys()].every(f=>c.get(f)==="other"))return d}return Object.values(e.match)[0]??""}export function fillMessage(e,n){return e.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(s,r)=>{const o=n[r];return o===void 0?s:String(o)})}export function messageList(e,n,s,r=[]){const o=`${s}.`,t=[...n].filter(i=>i.startsWith(o)),a=i=>{const d=e(i);if(d!==void 0&&!t.some(u=>u.startsWith(`${i}.`)))return r.push(i),d;const c=new Set;for(const u of t){if(!u.startsWith(`${i}.`))continue;const l=u.slice(i.length+1).split(".")[0];l&&c.add(l)}if(c.size===0)return;if([...c].every(u=>/^\d+$/.test(u))){const u=[];for(let l=0;c.has(String(l));l++){const m=a(`${i}.${String(l)}`);m!==void 0&&u.push(m)}return u}const y={};for(const u of[...c].sort()){const l=a(`${i}.${u}`);l!==void 0&&(y[u]=l)}return y},p=a(s);return Array.isArray(p)?p:[]}export function orderLocales(e,n=[]){const s=[...new Set(e)].sort(),r=n.filter(t=>s.includes(t)),o=s.filter(t=>!r.includes(t));return r.length===0&&o.includes("en")?["en",...o.filter(t=>t!=="en")]:[...r,...o]}const k={en:"English","zh-cn":"简体中文","zh-tw":"繁體中文","zh-hk":"繁體中文(香港)",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",es:"Español",pt:"Português","pt-br":"Português (Brasil)",it:"Italiano",ru:"Русский",vi:"Tiếng Việt",id:"Bahasa Indonesia",th:"ไทย",ar:"العربية"};export function languageName(e){return k[e]??e}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PixelRect } from "./timeline.js";
|
|
2
|
+
/**
|
|
3
|
+
* How a segment between two keyframes runs: linear, or cubic easing in,
|
|
4
|
+
* out, or in and out. The ease of a keyframe applies to the segment that
|
|
5
|
+
* arrives at it.
|
|
6
|
+
*/
|
|
7
|
+
export type Ease = "linear" | "in" | "out" | "in-out";
|
|
8
|
+
export declare const EASES: readonly Ease[];
|
|
9
|
+
/** A number at a moment: seconds `t`, value `v`, and how the segment arriving here runs. */
|
|
10
|
+
export interface ScalarKey {
|
|
11
|
+
t: number;
|
|
12
|
+
v: number;
|
|
13
|
+
ease?: Ease;
|
|
14
|
+
}
|
|
15
|
+
/** Eased progress over [0, 1]. */
|
|
16
|
+
export declare function easeValue(ease: Ease | undefined, x: number): number;
|
|
17
|
+
/**
|
|
18
|
+
* The value of keyframes at t: the first value before the first key, the
|
|
19
|
+
* last after the last, eased in between. Keys must be in time order.
|
|
20
|
+
*/
|
|
21
|
+
export declare function keyAt(keys: readonly ScalarKey[], t: number): number;
|
|
22
|
+
/** easeValue as an ffmpeg expression of `x` (already clipped to [0, 1]). */
|
|
23
|
+
export declare function easeExpr(ease: Ease | undefined, x: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* keyAt as an ffmpeg expression of the variable `tv`, whose value is
|
|
26
|
+
* `t - offset` (a filter's window clock): `keyExpr(keys, "t", start)`.
|
|
27
|
+
* Nested if()s, one per segment; a constant when the value never changes.
|
|
28
|
+
*/
|
|
29
|
+
export declare function keyExpr(keys: readonly ScalarKey[], tv: string, offset?: number): string;
|
|
30
|
+
/** A rectangle at a moment, eased like ScalarKey. */
|
|
31
|
+
export interface RectKey {
|
|
32
|
+
t: number;
|
|
33
|
+
rect: PixelRect;
|
|
34
|
+
ease?: Ease;
|
|
35
|
+
}
|
|
36
|
+
/** One coordinate of rectangle keys as scalar keys (0 x, 1 y, 2 w, 3 h). */
|
|
37
|
+
export declare function rectChannel(keys: readonly RectKey[], i: 0 | 1 | 2 | 3): {
|
|
38
|
+
ease?: Ease;
|
|
39
|
+
t: number;
|
|
40
|
+
v: number;
|
|
41
|
+
}[];
|
|
42
|
+
/** The rectangle of keys at t (fractional pixels). */
|
|
43
|
+
export declare function rectAt(keys: readonly RectKey[], t: number): PixelRect;
|
|
44
|
+
/**
|
|
45
|
+
* Drops keys that a straight line through their neighbours already gives
|
|
46
|
+
* within `tolerance` (Ramer–Douglas–Peucker on linear keys): a smoothed
|
|
47
|
+
* face path of hundreds of samples becomes a handful of keys.
|
|
48
|
+
*/
|
|
49
|
+
export declare function simplifyKeys(keys: readonly {
|
|
50
|
+
t: number;
|
|
51
|
+
v: number[];
|
|
52
|
+
}[], tolerance: number): {
|
|
53
|
+
t: number;
|
|
54
|
+
v: number[];
|
|
55
|
+
}[];
|
|
56
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const EASES=["linear","in","out","in-out"];export function easeValue(t,n){const e=Math.min(Math.max(n,0),1);switch(t??"linear"){case"linear":return e;case"in":return e*e*e;case"out":return 1-(1-e)**3;case"in-out":return e<.5?4*e*e*e:1-(-2*e+2)**3/2}}export function keyAt(t,n){const e=t[0];if(!e)return 0;if(n<=e.t)return e.v;for(let i=1;i<t.length;i++){const a=t[i-1],r=t[i];if(!(!a||!r)&&n<r.t){const o=r.t-a.t;return o<=0?r.v:a.v+(r.v-a.v)*easeValue(r.ease,(n-a.t)/o)}}return t.at(-1)?.v??e.v}const s=t=>{const n=(Math.round(t*1e6)/1e6).toFixed(6).replace(/\.?0+$/,"");return n==="-0"||n===""?"0":n};export function easeExpr(t,n){switch(t??"linear"){case"linear":return n;case"in":return`pow(${n},3)`;case"out":return`(1-pow(1-${n},3))`;case"in-out":return`if(lt(${n},0.5),4*pow(${n},3),1-pow(2-2*${n},3)/2)`}}export function keyExpr(t,n,e=0){const i=t[0];if(!i)return"0";if(t.every(o=>Math.abs(o.v-i.v)<1e-9))return s(i.v);const a=t.at(-1)??i;let r=s(a.v);for(let o=t.length-1;o>=1;o--){const c=t[o-1],u=t[o];if(!c||!u)continue;const l=u.t-c.t;if(l<=0)continue;const f=s(c.t-e),p=`min(max((${n}-${f})/${s(l)},0),1)`,h=Math.abs(u.v-c.v)<1e-9?s(c.v):`(${s(c.v)}+${s(u.v-c.v)}*${easeExpr(u.ease,p)})`;r=`if(lt(${n},${s(u.t-e)}),${h},${r})`}return`if(lt(${n},${s(i.t-e)}),${s(i.v)},${r})`}export function rectChannel(t,n){return t.map(e=>({t:e.t,v:e.rect[n],...e.ease?{ease:e.ease}:{}}))}export function rectAt(t,n){return[keyAt(rectChannel(t,0),n),keyAt(rectChannel(t,1),n),keyAt(rectChannel(t,2),n),keyAt(rectChannel(t,3),n)]}export function simplifyKeys(t,n){if(t.length<=2)return[...t];const e=new Uint8Array(t.length);e[0]=1,e[t.length-1]=1;const i=[[0,t.length-1]];for(;i.length>0;){const[a,r]=i.pop()??[0,0],o=t[a],c=t[r];if(!o||!c)continue;let u=-1,l=-1;for(let f=a+1;f<r;f++){const p=t[f];if(!p)continue;const h=c.t===o.t?0:(p.t-o.t)/(c.t-o.t);let v=0;p.v.forEach((x,$)=>{const w=(o.v[$]??0)+((c.v[$]??0)-(o.v[$]??0))*h;v=Math.max(v,Math.abs(x-w))}),v>u&&(u=v,l=f)}u>n&&l>0&&(e[l]=1,i.push([a,l],[l,r]))}return t.filter((a,r)=>e[r]===1)}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/** The music's defaults: a seam's cross-fade, beats a bar, the whole file's loop seam. */
|
|
2
|
+
export declare const MUSIC_DEFAULTS: {
|
|
3
|
+
/** Seconds a seam between two stretches cross-fades over. */
|
|
4
|
+
readonly seam: 0.03;
|
|
5
|
+
/** Beats a bar. */
|
|
6
|
+
readonly meter: 4;
|
|
7
|
+
/** Seconds the whole file looped (`loop: true`) cross-fades over at each seam. */
|
|
8
|
+
readonly loopSeam: 0.25;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A place in the music's file: seconds, or `{ beat }` beats after its
|
|
12
|
+
* first beat, or `{ bar }` bars after its downbeat (bar 0); a beat or a
|
|
13
|
+
* bar needs a tempo, given or measured.
|
|
14
|
+
*/
|
|
15
|
+
export type MusicTime = number | {
|
|
16
|
+
beat: number;
|
|
17
|
+
} | {
|
|
18
|
+
bar: number;
|
|
19
|
+
};
|
|
20
|
+
/** A stretch of the music's file, from `from` to `to`. */
|
|
21
|
+
export interface MusicStretch<T = MusicTime> {
|
|
22
|
+
from: T;
|
|
23
|
+
to: T;
|
|
24
|
+
}
|
|
25
|
+
/** The music's beat grid, in seconds of its file. */
|
|
26
|
+
export interface MusicGrid {
|
|
27
|
+
/** Seconds a beat. */
|
|
28
|
+
beat: number;
|
|
29
|
+
/** The file's second of beat 0. */
|
|
30
|
+
first: number;
|
|
31
|
+
/** Beats a bar. */
|
|
32
|
+
meter: number;
|
|
33
|
+
/** The file's second of bar 0. */
|
|
34
|
+
downbeat: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The grid from a tempo (a given bpm counts from the file's start, a
|
|
38
|
+
* measured one from its first beat) and where the agent says bar 0 is
|
|
39
|
+
* (default: beat 0).
|
|
40
|
+
*/
|
|
41
|
+
export declare function musicGrid(tempo: {
|
|
42
|
+
bpm: number;
|
|
43
|
+
beat?: number;
|
|
44
|
+
} | undefined, o?: {
|
|
45
|
+
meter?: number | undefined;
|
|
46
|
+
downbeat?: number | undefined;
|
|
47
|
+
}): MusicGrid | undefined;
|
|
48
|
+
/** A place in the file in seconds; undefined for a beat or a bar without a grid. */
|
|
49
|
+
export declare function musicSeconds(t: MusicTime, grid: MusicGrid | undefined): number | undefined;
|
|
50
|
+
/** Whether a place needs the grid (a beat or a bar). */
|
|
51
|
+
export declare const onGrid: (t: MusicTime) => boolean;
|
|
52
|
+
/** What is wrong with a music time, or nothing. */
|
|
53
|
+
export declare function musicTimeProblem(t: unknown): string | undefined;
|
|
54
|
+
/** A stretch of the file placed on the film: from film second `at`, file seconds `from` to `to`. */
|
|
55
|
+
export interface PlacedStretch {
|
|
56
|
+
at: number;
|
|
57
|
+
from: number;
|
|
58
|
+
to: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The stretches on the film, back to back from film second 0: `play` in
|
|
62
|
+
* order, then `repeat` again and again, until `until` film seconds. Each
|
|
63
|
+
* `to` is at most `len` (the file's length) and a stretch that plays
|
|
64
|
+
* nothing is left out.
|
|
65
|
+
*/
|
|
66
|
+
export declare function placeStretches(play: readonly {
|
|
67
|
+
from: number;
|
|
68
|
+
to: number;
|
|
69
|
+
}[], repeat: {
|
|
70
|
+
from: number;
|
|
71
|
+
to: number;
|
|
72
|
+
} | undefined, len: number, until: number): PlacedStretch[];
|
|
73
|
+
/**
|
|
74
|
+
* The whole file looped as it always was: from `from` to its end, then
|
|
75
|
+
* from its start again, each seam crossing its last `seam` seconds into
|
|
76
|
+
* the next start (so a stretch's own time on the film is its file less
|
|
77
|
+
* the seam).
|
|
78
|
+
*/
|
|
79
|
+
export declare function wholeLoop(from: number, len: number, until: number, seam?: number): PlacedStretch[];
|
|
80
|
+
/** A piece of the file the mix plays: film second `at`, file second `from`, `dur` seconds, its equal-power fades. */
|
|
81
|
+
export interface MusicSegment {
|
|
82
|
+
at: number;
|
|
83
|
+
from: number;
|
|
84
|
+
dur: number;
|
|
85
|
+
fadeIn: number;
|
|
86
|
+
fadeOut: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* What the mix plays of the stretches: each one with the seam's
|
|
90
|
+
* cross-fade with its neighbour. `place` "before" crosses over the `seam`
|
|
91
|
+
* before the join: the stretch before fades out over its own last `seam`
|
|
92
|
+
* seconds, the one after fades in over the file's `seam` seconds before
|
|
93
|
+
* its start (what the file has of them: none at its very start); "after"
|
|
94
|
+
* crosses over the `seam` after the join, the stretch before running on
|
|
95
|
+
* past its end while the one after fades in over its own first seconds
|
|
96
|
+
* (the whole file's loop). With `ends`, the last stretch is where the
|
|
97
|
+
* music ends, and fades out over its last `seam` seconds unless it ends
|
|
98
|
+
* where the file does (a stretch that repeats runs on past the film's
|
|
99
|
+
* end). `len` is the file's length.
|
|
100
|
+
*/
|
|
101
|
+
export declare function musicSegments(stretches: readonly PlacedStretch[], seam: number, len: number, place?: "before" | "after", ends?: boolean): MusicSegment[];
|
|
102
|
+
/** The film seconds where beats (or bars) of the grid fall in the stretches, in order. */
|
|
103
|
+
export declare function filmBeats(stretches: readonly PlacedStretch[], grid: MusicGrid, unit?: "beat" | "bar"): number[];
|
|
104
|
+
/**
|
|
105
|
+
* The beat a part ending near `t` ends on: the one nearest `t` that is
|
|
106
|
+
* after `after`, from the beats on the film (`beats`), and past the last
|
|
107
|
+
* of them the grid carried on at `step`. Undefined without beats.
|
|
108
|
+
*/
|
|
109
|
+
export declare function beatNear(beats: readonly number[], step: number, t: number, after: number): number | undefined;
|
|
110
|
+
//# sourceMappingURL=music.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const MUSIC_DEFAULTS={seam:.03,meter:4,loopSeam:.25};export function musicGrid(e,t={}){if(!e||!(e.bpm>0))return;const f=e.beat??0;return{beat:60/e.bpm,first:t.downbeat??f,meter:t.meter??MUSIC_DEFAULTS.meter,downbeat:t.downbeat??f}}export function musicSeconds(e,t){if(typeof e=="number")return e;if(t)return"beat"in e?t.first+e.beat*t.beat:t.downbeat+e.bar*t.meter*t.beat}export const onGrid=e=>typeof e!="number";export function musicTimeProblem(e){if(typeof e=="number")return Number.isFinite(e)&&e>=0?void 0:`a place in the music is seconds from 0, not ${String(e)}`;if(typeof e=="object"&&e!==null){const t=Object.keys(e),f=e[t[0]??""];if(t.length===1&&(t[0]==="beat"||t[0]==="bar")&&typeof f=="number"&&Number.isFinite(f))return}return`a place in the music is seconds of its file, { beat: n } or { bar: n }, not ${JSON.stringify(e)}`}export function placeStretches(e,t,f,u){const a=[];let r=0;const o=n=>{const i=Math.max(0,n.from),c=Math.min(f,n.to);return c-i<.001?!1:(a.push({at:r,from:i,to:c}),r+=c-i,!0)};for(const n of e){if(r>=u)return a;o(n)}if(t)for(;r<u&&o(t););return a}export function wholeLoop(e,t,f,u=MUSIC_DEFAULTS.loopSeam){const a=t>1?u:0,r=t-a;if(r<=0)return[];const o=[];let n=0,i=Math.max(0,e)%r;for(;n<f;)o.push({at:n,from:i,to:r}),n+=r-i,i=0;return o}export function musicSegments(e,t,f,u="before",a=!0){const r=e.map(o=>({at:o.at,from:o.from,dur:o.to-o.from,fadeIn:0,fadeOut:0}));for(let o=0;o<r.length;o++){const n=r[o],i=e[o];if(!n||!i||t<=0)continue;const c=e[o+1],s=r[o+1],d=m=>Math.min(t,m.dur/2);if(!c||!s){a&&f-i.to>.001&&(n.fadeOut=d(n));continue}if(u==="after"){const m=Math.min(t,f-i.to);n.dur+=m,n.fadeOut=m,s.fadeIn=m;continue}n.fadeOut=d(n);const b=Math.min(t,c.from);s.at-=b,s.from-=b,s.dur+=b,s.fadeIn=b}return r}export function filmBeats(e,t,f="beat"){const u=f==="bar"?t.beat*t.meter:t.beat,a=f==="bar"?t.downbeat:t.first,r=[];for(const o of e){let n=Math.ceil((o.from-a)/u-1e-9);for(;;){const i=a+n*u;if(i>=o.to-1e-9)break;i>=o.from-1e-9&&r.push(o.at+(i-o.from)),n++}}return r.sort((o,n)=>o-n)}export function beatNear(e,t,f,u){const a=e.at(-1);if(a===void 0||!(t>0))return;let r;const o=n=>{n<=u+1e-9||(r===void 0||Math.abs(n-f)<Math.abs(r-f))&&(r=n)};for(const n of e)o(n);if(f+t>a){const n=Math.max(1,Math.round((f-a)/t));for(const i of[n-1,n,n+1])i>=1&&o(a+i*t)}if(r===void 0){const n=Math.max(1,Math.ceil((u-a)/t+1e-9));r=a+n*t}return r}
|