allyhub 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/commands/auth.js +4 -4
- package/dist/commands/cloud-tools.js +11 -11
- package/dist/commands/dev.js +2 -2
- package/dist/commands/frames/compare.js +2 -2
- package/dist/commands/frames/piece.js +1 -1
- package/dist/commands/frames/report.js +2 -0
- package/dist/commands/frames.js +11 -9
- package/dist/commands/index.js +1 -1
- package/dist/commands/inspect/common.js +4 -2
- package/dist/commands/inspect/facts.js +3 -3
- package/dist/commands/inspect/layout.js +1 -1
- package/dist/commands/orgs.js +2 -2
- package/dist/commands/render.js +2 -2
- package/dist/help.js +4 -4
- package/dist/main.js +8 -7
- package/dist/node_modules/@allyhub/3d-extension/dist/stage-routes.js +1 -1
- package/dist/node_modules/@allyhub/3d-extension/package.json +34 -2
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +29 -0
- package/dist/node_modules/@allyhub/browser/dist/emoji.js +57 -0
- package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +18 -0
- package/dist/node_modules/@allyhub/browser/dist/picture.js +2 -0
- package/dist/node_modules/@allyhub/browser/package.json +9 -1
- package/dist/node_modules/@allyhub/build/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +7 -0
- package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +9 -0
- package/dist/node_modules/@allyhub/build/dist/made-notes.js +2 -0
- package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +17 -0
- package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +7 -0
- package/dist/node_modules/@allyhub/build/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +2 -1
- package/dist/node_modules/@allyhub/canvas-extension/skills/allyhub/references/canvas.md +4 -24
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +10 -0
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +9 -0
- package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +4 -4
- package/dist/node_modules/@allyhub/cloud/dist/credentials.js +2 -2
- package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +12 -0
- package/dist/node_modules/@allyhub/cloud/dist/device.js +2 -0
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/components/r/callout.json +1 -1
- package/dist/node_modules/@allyhub/components/src/callout.ts +98 -13
- package/dist/node_modules/@allyhub/dev-server/dist/exports.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/pages.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/ports.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/respond.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/reveal.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/watcher.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/dist/captions.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/docx.js +4 -4
- package/dist/node_modules/@allyhub/doc/dist/html.js +51 -92
- package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/page.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/write.js +22 -22
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +19 -6
- package/dist/node_modules/@allyhub/doc-print/dist/pages.js +5 -5
- package/dist/node_modules/@allyhub/doc-print/dist/print.js +10 -10
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +87 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +89 -0
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
- package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +50 -0
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/dist/export.js +4 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +16 -6
- package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +7 -39
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/LICENSE +241 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/article-build.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/article-kind.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/build-plugins.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/build.js +5 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/media.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/stage-module.js +82 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/workspace.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +287 -0
- package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +12 -0
- package/dist/node_modules/@allyhub/linkedin-model/LICENSE +241 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/article-check.js +5 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/article.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/check.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/count.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/edit.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/html.js +19 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/limits.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/little.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/post.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/requests.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/package.json +14 -0
- package/dist/node_modules/@allyhub/linkedin-view/LICENSE +241 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/article.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/fold.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/post.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/text.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/package.json +21 -0
- package/dist/node_modules/@allyhub/linkedin-view/src/style.css +600 -0
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +7 -4
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +16 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
- package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +18 -0
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/dist/version.js +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +140 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +157 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +10 -2
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +101 -186
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +1 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +92 -94
- package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +17 -0
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +15 -3
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/dist/encode.js +1 -1
- package/dist/node_modules/@allyhub/render/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/render/dist/look.js +1 -1
- package/dist/node_modules/@allyhub/render/dist/render.js +2 -2
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
- package/dist/node_modules/@allyhub/report-extension/dist/build.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/check.js +3 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/find.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +5 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
- package/dist/node_modules/@allyhub/report-extension/dist/page.js +21 -0
- package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +21 -0
- package/dist/node_modules/@allyhub/report-extension/dist/styles.js +5 -0
- package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/package.json +182 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +132 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +105 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +17 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +38 -0
- package/dist/node_modules/@allyhub/runtime/dist/compose.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/embed.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/player/clips.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
- package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
- package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +7 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.js +2 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.d.ts +4 -3
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.d.ts +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/facts.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.d.ts +8 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +6 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/viewer.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
- package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -6
- package/dist/node_modules/@allyhub/sheet-extension/package.json +24 -9
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +22 -16
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +76 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +316 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +316 -0
- package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/install.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +3 -0
- package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +18 -18
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +17 -4
- package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/dist/held.js +2 -0
- package/dist/node_modules/@allyhub/website-extension/dist/preview.js +5 -5
- package/dist/node_modules/@allyhub/website-extension/dist/project-tools.js +24 -1
- package/dist/node_modules/@allyhub/website-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +49 -2
- package/dist/node_modules/@allyhub/x-extension/dist/build.js +4 -3
- package/dist/node_modules/@allyhub/x-extension/package.json +43 -15
- package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +7 -62
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/dist/article.js +1 -1
- package/dist/node_modules/@allyhub/x-view/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/x-view/dist/post.js +2 -2
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +12 -10
- package/dist/text/facts-text.js +5 -5
- package/dist/text/index.js +1 -1
- package/dist/text/long-text.js +4 -0
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-CN5PiJYY.js → abnfDiagram-WEYOIA3C-BKmMA6gn.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-BnvZtQYk.js → architecture-WOLXFQ4H-BEFBgb4k.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-tkcEcFQ8.js → architectureDiagram-ZHVYKT53-_u5YfCjY.js} +1 -1
- package/editor-web/assets/{arrow-up-DTP2yVSU.js → arrow-up-B5rJbBv0.js} +1 -1
- package/editor-web/assets/article-BUmD3xtR.js +8 -0
- package/editor-web/assets/article-DNioBb3p.js +7 -0
- package/editor-web/assets/{audio-lines-Ti8-m7H2.js → audio-lines-CzuzsGjI.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-DhqEIpie.js → blockDiagram-RJAE7QA3-DybfaO3Z.js} +1 -1
- package/editor-web/assets/bookmark-Dsd3kHJJ.js +1 -0
- package/editor-web/assets/button-eGxLxbv9.js +41 -0
- package/editor-web/assets/{c4Diagram-XDPPPE54-Bg9G95tl.js → c4Diagram-XDPPPE54-BfqLHB5i.js} +1 -1
- package/editor-web/assets/calc-worker-D2pGis6e.js +45 -0
- package/editor-web/assets/channel-TNPgFDrw.js +1 -0
- package/editor-web/assets/chart-C37xvZT2.js +1 -0
- package/editor-web/assets/chart-no-axes-column-BVkeF_Mr.js +1 -0
- package/editor-web/assets/{chunk-2E7WHVMD-C8Ve9lAa.js → chunk-2E7WHVMD-BVp1I_d0.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-BDWwPUnT.js → chunk-4EMNKR2T-CTdgWEMr.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-BQiNPKgx.js → chunk-55XCU76K-7pnsxeaP.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-QoEt-6jf.js → chunk-7S6XSTFO-Dc0Dvkq7.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-BeuwIv0-.js → chunk-AQDTSKZB-VAILIsfx.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-BHW7sLAz.js → chunk-DSNLSHJZ-CUDx1Rv5.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-bbGED0hu.js → chunk-HAGFOTED-DAoEe-dJ.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-FltWp8yo.js → chunk-HNE4Q36P-g0akya12.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-NeQzr6kH.js → chunk-NQOKRVIF-hTGjzXdJ.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-eA4-WUhn.js → chunk-UHW7PFBP-BgLV8BIJ.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-BPPv325z.js → chunk-VQ5W62QI-Bw19OOSD.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-DOCIz7Te.js → chunk-WQQL4CDK-CMST9dyE.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-Dc_ihQJi.js → chunk-YZO67HFG-Bbpu36XF.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-CoqwCPSm.js → chunk-ZAUX2LTX-C48Ri0Gs.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-CZUQPkJx.js → chunk-ZCHMQSOR-DN1g01Oe.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-DUh9c50k.js → classDiagram-v2-4MYWR3UA-U6jbPr2d.js} +1 -1
- package/editor-web/assets/collaborator-B1u2td9m.js +1 -0
- package/editor-web/assets/createLucideIcon-GFZ_fxLc.js +1 -0
- package/editor-web/assets/{cynefin-EF2NZ3EQ-DUTZiog0.js → cynefin-EF2NZ3EQ-gzkai_7-.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-oAjpfbrU.js → cynefinDiagram-WF24UDRP-DtSekSr6.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-BrKvKCvb.js → dagre-NK4GIZVX-CiUwYVT6.js} +1 -1
- package/editor-web/assets/{diagram-CBK3MWTC-GekVRnmm.js → diagram-CBK3MWTC-r9XHCV-k.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-CDd1VFRT.js → diagram-I5XIIV2D-DxVsDZ34.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-535RISTn.js → diagram-ODIL2UCW-B0eNQoHV.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-MXzzKCGG.js → diagram-PFBEJUXE-C7f2MfJT.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-vKVwkQxY.js → diagram-RJA3I4VV-CSXcnvct.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-UwGAiQLx.js → diagram-TYUNFSNR-DXzOD_ii.js} +1 -1
- package/editor-web/assets/dist-BGRwhCQO.js +1 -0
- package/editor-web/assets/{dist-9ymlIMhr.js → dist-BW4X7BrF.js} +1 -1
- package/editor-web/assets/dist-BgDRE85b.js +2 -0
- package/editor-web/assets/dist-Blq5nJnU.js +24 -0
- package/editor-web/assets/dist-BuWaZ3Y4.js +274 -0
- package/editor-web/assets/dist-C1emZ9wX.js +37 -0
- package/editor-web/assets/dist-CC7OeU1e.js +6 -0
- package/editor-web/assets/dist-CX-fiPSn.js +38 -0
- package/editor-web/assets/dist-C_VvG-_9.js +5 -0
- package/editor-web/assets/dist-Ce7HrBxv.js +3 -0
- package/editor-web/assets/dist-D2k6w-_a.js +1 -0
- package/editor-web/assets/dist-DDv_SbKw.js +84 -0
- package/editor-web/assets/dist-DEoEO4zs.js +1 -0
- package/editor-web/assets/dist-DlDxxPIP.js +16 -0
- package/editor-web/assets/dist-Gz6NDS0J.js +4 -0
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-73yGokYa.js → ebnfDiagram-V4P3TTPT-Cs4YRvDD.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-BW6V9y6a.js → elk-QONTBCTQ-Bh3LZ9WI.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-BPqIJ22h.js → erDiagram-KYQIGQAA-C4vYTYXp.js} +1 -1
- package/editor-web/assets/{eventmodeling-K75KTNOO-_VZ8jvuy.js → eventmodeling-K75KTNOO-BN1kkHWS.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-DZ157JN2.js → ganttDiagram-R7GPNTJY-CA1LkkC5.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-fmcNL9bq.js → gitGraph-VSP46ZUC-Dy5tA7dG.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DiZDyksR.js → gitGraphDiagram-PDYL7XHY-hJIB8EkH.js} +1 -1
- package/editor-web/assets/hint-B8JpEypy.js +1 -0
- package/editor-web/assets/index-CgB5osVc.js +28 -0
- package/editor-web/assets/index-Daytem9N.css +2 -0
- package/editor-web/assets/{info-OHQRW6UA-V06620kN.js → info-OHQRW6UA-DvzSf7rQ.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-CbIgheWX.js → infoDiagram-MVDRKAX5-BjIMm4Af.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-D5oJQPkG.js → ishikawaDiagram-HPEHV2GE-Bpz71S40.js} +1 -1
- package/editor-web/assets/{italic-CDhZKo_q.js → italic-D10w8n6C.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-BZEv6JI4.js → journeyDiagram-BOSHW7O7-DAB-pZjD.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-CLG1R8y_.js → kanban-definition-FNSA4HC5-cYeyh3P6.js} +1 -1
- package/editor-web/assets/katex-5Z2zF-9g.js +257 -0
- package/editor-web/assets/link-BC5xK1-1.js +1 -0
- package/editor-web/assets/{mermaid-parser.core-DxDwXM7z.js → mermaid-parser.core-req5LE0X.js} +3 -3
- package/editor-web/assets/{mermaid.core-tU55ZwVG.js → mermaid.core-zFwZug4C.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-CYf4zzAh.js → mindmap-definition-6OY57UG3-TStWb7DG.js} +1 -1
- package/editor-web/assets/minus-DaWs5i8B.js +1 -0
- package/editor-web/assets/{packet-JDAUHWVQ-DsHeKYNL.js → packet-JDAUHWVQ-smFhVKcB.js} +1 -1
- package/editor-web/assets/palette-BIOudGkm.js +1 -0
- package/editor-web/assets/{pegDiagram-ECIUJNBX-CQyh6TTa.js → pegDiagram-ECIUJNBX-DvSNRv0-.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-3vCIvpNB.js → pie-XZMESJXO-qjaGsBZG.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-DF5yGBLn.js → pieDiagram-GNMPY74T-Dd9P-Pdc.js} +1 -1
- package/editor-web/assets/play-CrMmPghG.js +1 -0
- package/editor-web/assets/progress-DE4C5_3x.js +6 -0
- package/editor-web/assets/props-form-CsmDBqzy.js +1 -0
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-B7pxlDYP.js → quadrantDiagram-D57K4MC3-h2IIKUUA.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-cpEA41mL.js → radar-ABXABTNO-DlVrSA1d.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-BLyy5R2c.js → railroad-I3PHUGI6-nFbuLAtc.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-Y-oyol19.js → railroad-abnf-LNEFI6M7-Daj8h2iV.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-o58wHZsr.js → railroad-ebnf-DWYD2UWJ-eYJyl5PH.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-CcD3PXZ8.js → railroad-peg-JR7BVNR7-BTRhKZQq.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-BuCC4eyy.js → railroadDiagram-Y72NRBL7-CeLGUjdp.js} +1 -1
- package/editor-web/assets/react-WA6wlt8S.js +1 -0
- package/editor-web/assets/{repeat-2-C5PCbNsg.js → repeat-2-VQP1EVOZ.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-Dp-JFGn4.js → requirementDiagram-EQYSW5RA-Dmk9XRM5.js} +1 -1
- package/editor-web/assets/row-BRlEWRrK.js +1 -0
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-rYuCqEvw.js → sankeyDiagram-SY24JHO5-Yn4zlrAM.js} +1 -1
- package/editor-web/assets/schemas-VikZYZIK.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DryW8x6d.js → sequenceDiagram-BLEHNHQU-BTRnp_PW.js} +1 -1
- package/editor-web/assets/session-Do9AqS38.js +1 -0
- package/editor-web/assets/slides-diTEQ3C5.js +1 -0
- package/editor-web/assets/snapshots-BUGlKQIB.js +56 -0
- package/editor-web/assets/sound-Bj3o9_Fa.js +1 -0
- package/editor-web/assets/split-CNU1RHcX.js +3 -0
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-Bnp0XfpT.js → stateDiagram-v2-A6IESKWZ-kstrRKv2.js} +1 -1
- package/editor-web/assets/{strikethrough-DJckA35o.js → strikethrough-CfXx6IYH.js} +1 -1
- package/editor-web/assets/{svg-BjM9RazX.js → svg-Cx50MpxK.js} +1 -1
- package/editor-web/assets/swatch-WeJD41aW.js +1 -0
- package/editor-web/assets/{swimlanes-B3ENRKFQ-BiRRhhbd.js → swimlanes-B3ENRKFQ-DaZsZkeP.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +8 -0
- package/editor-web/assets/switch-N0G_sbqt.js +1 -0
- package/editor-web/assets/syntax-BVsgRJ4I.js +66 -0
- package/editor-web/assets/syntax-oWsKBWFw.js +1 -0
- package/editor-web/assets/table-B6hVZAMi.js +1 -0
- package/editor-web/assets/tabs-DIFDqj-l.js +1 -0
- package/editor-web/assets/{textarea-BGtPqZdB.js → textarea-tEWvBY9p.js} +1 -1
- package/editor-web/assets/{timeline-definition-JXYKGLGB-D-Q5ZtDF.js → timeline-definition-JXYKGLGB-CLCvY-Yf.js} +1 -1
- package/editor-web/assets/{trash-2-Bjj6cWzP.js → trash-2-BP6nqpg2.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-B6DDatXq.js → treeView-D4JQ5SDB-BmN0gwdC.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-D7j5ZhiI.js → treemap-SAJKECNS-DN29G_E_.js} +1 -1
- package/editor-web/assets/{undo-2-yOSG766T.js → undo-2-CHR0nvWL.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-tkrdKUJB.js → usecaseDiagram-WPOLBNNX-DTRS54cB.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-Ch4XbSnD.js → vennDiagram-Q3Y3IDCW-DAAc11Hx.js} +1 -1
- package/editor-web/assets/video-BlvmR8BK.js +1 -0
- package/editor-web/assets/{wardley-7MLQ67FV-Bynt7qNQ.js → wardley-7MLQ67FV-B-UYkmdB.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DRuSgm_L.js → wardleyDiagram-IVAIDKWA-BmbwCaky.js} +1 -1
- package/editor-web/assets/words-D_4T9Adq.js +3 -0
- package/editor-web/assets/words-WgdEQdYP.js +2 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-DctpvfkL.js → xychartDiagram-4URNHDU4-ChAfAq1U.js} +1 -1
- package/editor-web/index.html +6 -5
- package/package.json +8 -2
- package/editor-web/assets/alt-BOVao_9S.js +0 -4
- package/editor-web/assets/article-B6YCzhj8.js +0 -73
- package/editor-web/assets/calc-worker-B5-fDWnb.js +0 -45
- package/editor-web/assets/channel-C26aBI4o.js +0 -1
- package/editor-web/assets/chart-BOnxneyw.js +0 -1
- package/editor-web/assets/choice-O5nwc2N0.js +0 -1
- package/editor-web/assets/collaborator-BJU5qwHd.js +0 -1
- package/editor-web/assets/createLucideIcon-B3B95oX5.js +0 -1
- package/editor-web/assets/dist-C6NqUEG4.js +0 -16
- package/editor-web/assets/dist-C9UGmCG9.js +0 -6
- package/editor-web/assets/dist-CAk5bjBm.js +0 -1
- package/editor-web/assets/dist-CKyfo5RM.js +0 -340
- package/editor-web/assets/dist-CRaWqNwq.js +0 -37
- package/editor-web/assets/dist-CwIBc7HQ.js +0 -1
- package/editor-web/assets/dist-DXRmkezB.js +0 -38
- package/editor-web/assets/dist-EKK5i0dG.js +0 -219
- package/editor-web/assets/dist-hHJlpLWo.js +0 -5
- package/editor-web/assets/dist-oYKcwWUj.js +0 -4
- package/editor-web/assets/dist-shKo7XVN.js +0 -2
- package/editor-web/assets/dist-wrKxBrVu.js +0 -24
- package/editor-web/assets/flowDiagram-IUGLLWBU-ouDQYiTr.js +0 -1
- package/editor-web/assets/hint-_AQWCDMj.js +0 -1
- package/editor-web/assets/index-BsstP-cI.js +0 -28
- package/editor-web/assets/index-DQRcmxBO.css +0 -2
- package/editor-web/assets/minus-Cgmm6ncD.js +0 -1
- package/editor-web/assets/progress-0B_TVsPi.js +0 -6
- package/editor-web/assets/react-BP46yLMB.js +0 -1
- package/editor-web/assets/react-pgBZqVxJ.js +0 -96
- package/editor-web/assets/schemas-Ewwjtbf4.js +0 -1
- package/editor-web/assets/session-DiI9KYRI.js +0 -1
- package/editor-web/assets/slides-CCwgBcGH.js +0 -1
- package/editor-web/assets/sound-CqryteNl.js +0 -1
- package/editor-web/assets/swatch-DL3HqIjW.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-BkOls8Tv.js +0 -8
- package/editor-web/assets/switch-DltnKqN-.js +0 -1
- package/editor-web/assets/syntax-CC6QYhCz.js +0 -1
- package/editor-web/assets/tabs-C-re0Kxn.js +0 -1
- package/editor-web/assets/video-DXFiCNGc.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{createHash as Te}from"node:crypto";import{zipSync as Ee}from"fflate";import{AUTOSHAPE_STYLE as Oe,colorOfFile as Ie,CONNECTOR_STYLE as Ce,isConnectorGeometry as ae,joinPath as fe,placeholderFrame as Re,plainLevels as Be,Pt as oe}from"@allyhub/slides-core";import{chartBook as je,chartXml as Ne}from"./charts.js";import{asFace as Ae,fontInfo as Fe,eotOf as ze}from"./fonts.js";import{NO_PARAGRAPHS as He,shapeXml as he,treeXml as ie}from"./shapes.js";import{bodyOfStyle as Ge,bodyProps as V,bodyUnder as re,LINK as Xe,SLIDE_NUMBER as Ue,levelOf as ue,listStyle as A,txBody as X}from"./text.js";import{themeXml as ge}from"./theme.js";import{timingXml as We,transitionXml as Je}from"./timing.js";import{HEAD as M,PML as E,color as Ye,el as n,esc as Ze,fill as xe,gradientFill as qe,unesc as Ke}from"./xml.js";const Q={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",emf:"image/x-emf",wmf:"image/x-wmf"},ye={mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime"},D=e=>(e.split(".").pop()??"").toLowerCase(),Ve=[["regular","p:regular","Regular"],["bold","p:bold","Bold"],["italic","p:italic","Italic"],["boldItalic","p:boldItalic","Bold Italic"]],c={hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",package:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package",font:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",core:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",app:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",slideMaster:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster",slideLayout:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout",slide:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",notesMaster:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster",notesSlide:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",video:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",media:"http://schemas.microsoft.com/office/2007/relationships/media",presProps:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps",viewProps:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps",tableStyles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"},S={chart:"application/vnd.openxmlformats-officedocument.drawingml.chart+xml",workbook:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",presentation:"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",slideMaster:"application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml",slideLayout:"application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml",slide:"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",theme:"application/vnd.openxmlformats-officedocument.theme+xml",notesMaster:"application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml",notesSlide:"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml",presProps:"application/vnd.openxmlformats-officedocument.presentationml.presProps+xml",viewProps:"application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml",tableStyles:"application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml",core:"application/vnd.openxmlformats-package.core-properties+xml",app:"application/vnd.openxmlformats-officedocument.extended-properties+xml"};class O{list=[];linked(t){return t.replaceAll(new RegExp(`r:id="${Xe}([^"]*)"`,"gu"),(i,a)=>`r:id="${this.add(c.hyperlink,Ke(a),!0)}"`)}add(t,i,a=!1){const r=this.list.find(s=>s.type===t&&s.target===i);if(r)return r.id;const p=`rId${String(this.list.length+1)}`;return this.list.push({id:p,type:t,target:i,...a?{external:a}:{}}),p}xml(){return M+n("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},...this.list.map(t=>n("Relationship",{Id:t.id,Type:t.type,Target:t.target,TargetMode:t.external?"External":void 0})))}}class Qe{list=[];add(t,i){return this.list.push({chart:t,frame:i}),`../charts/chart${String(this.list.length)}.xml`}}class et{parts=new Map;byHash=new Map;add(t,i,a,r){const p=Te("sha256").update(t).digest("hex"),s=this.byHash.get(`${a}:${p}`);if(s)return s;const d=r?.split("/").pop()?.replace(/\.[^.]*$/u,"").replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,""),f=d===void 0||d===""?void 0:d;let u=`${f??`${a}${String(this.parts.size+1)}`}.${i}`;for(let P=2;this.parts.has(`ppt/media/${u}`);P++)u=`${f??a}-${String(P)}.${i}`;return this.parts.set(`ppt/media/${u}`,t),this.byHash.set(`${a}:${p}`,`../media/${u}`),`../media/${u}`}}function be(e){return e.kind==="component"||e.kind==="movie"?!1:e.kind==="picture"?Q[D(e.media?.path??"")]!==void 0:!0}function se(e){return e.kind==="component"||e.kind==="movie"?!0:e.kind==="picture"?Q[D(e.media?.path??"")]===void 0:!1}export function picturedShapes(e){return e.slides.flatMap(t=>t.shapes.filter(i=>se(i)).map(i=>({key:`${t.id}/${i.name}`,slide:t.id,shape:i.name,frame:i.frame})))}export function filesOf(e){const t=new Set;for(const i of e.masters)for(const a of[...i.shapes,...i.layouts.flatMap(r=>r.shapes)])a.media&&be(a)&&t.add(fe(a.media.base,a.media.path));for(const i of e.slides){i.background_picture!==void 0&&t.add(i.background_picture);for(const a of i.shapes)a.media&&(a.kind==="picture"||a.kind==="movie")&&t.add(a.media.path)}return[...t].sort()}const tt=n("p:nvGrpSpPr",{},n("p:cNvPr",{id:1,name:""}),n("p:cNvGrpSpPr"),n("p:nvPr")),nt=n("p:grpSpPr",{},n("a:xfrm",{},n("a:off",{x:0,y:0}),n("a:ext",{cx:0,cy:0}),n("a:chOff",{x:0,y:0}),n("a:chExt",{cx:0,cy:0}))),Z=e=>n("p:spTree",{},tt,nt,...e),_e={bg1:"lt1",tx1:"dk1",bg2:"lt2",tx2:"dk2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink"},ee=e=>n("p:bg",{},n("p:bgPr",{},n("a:solidFill",{},Ye(e)),n("a:effectLst")));function at(e,t,i){if(e.background_picture!==void 0){const a=i(e.background_picture);if(a!==void 0)return n("p:bg",{},n("p:bgPr",{},n("a:blipFill",{dpi:0,rotWithShape:1},n("a:blip",{"r:embed":a}),n("a:srcRect"),n("a:stretch",{},n("a:fillRect"))),n("a:effectLst")))}return e.background_gradient?n("p:bg",{},n("p:bgPr",{},qe(e.background_gradient),n("a:effectLst"))):le(e.background,t)?"":ee(e.background)}const le=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Se(e){return{...e.fill_transparency===void 0?{}:{fillTransparency:e.fill_transparency,...e.fill===void 0?{}:{fill:e.fill}},...e.gradient?{gradient:e.gradient}:{},...e.shadow?{shadow:e.shadow}:{}}}function te(e){const t=i=>({...e.fill===void 0||"fill"in i&&le(e.fill,i.fill)?{}:{fill:e.fill},...e.line===void 0||le(e.line,i.line)?{}:{line:e.line},...e.line_width===void 0||e.line_width===i.line_width?{}:{lineWidth:e.line_width}});return e.kind==="autoshape"?ae(e.geometry)?{style:"connector",...t(Ce)}:{style:"shape",...t(Oe)}:{...e.kind==="textbox"?{fill:e.fill??null}:e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{lineWidth:e.line_width}}}const ot=(e,t)=>Array.from({length:Math.max(e.length,t.length)},(i,a)=>{const r=e[a]??{},p=t[a]??{},s={...r.font,...p.font};return{...r,...p,...Object.keys(s).length>0?{font:s}:{}}});function ke(e,t,i,a,r,p,s,d){const f=a!==void 0&&r!==void 0&&JSON.stringify(a.text_styles.other)!==JSON.stringify(r.text_styles.other);return X("p:txBody",V(re(t,d),s,e==="autoshape"?{rtlCol:0}:{}),A(f?ot(a.text_styles.other,t.levels):t.levels),i,p,d)}const it="{2D5ABB26-0587-4C30-8999-92F81FD0307C}",rt=[["left","a:lnL"],["right","a:lnR"],["top","a:lnT"],["bottom","a:lnB"]];function we(e,t){return n("a:tbl",{},n("a:tblPr",{firstRow:e.first_row?1:void 0,firstCol:e.first_col?1:void 0,lastRow:e.last_row?1:void 0,lastCol:e.last_col?1:void 0,bandRow:e.horz_banding?1:void 0,bandCol:e.vert_banding?1:void 0},n("a:tableStyleId",{},it)),n("a:tblGrid",{},...e.columns.map(i=>n("a:gridCol",{w:i}))),...e.rows.map((i,a)=>n("a:tr",{h:i.height},...i.cells.map((r,p)=>{const s=r.text.own??r.text,d=$e(r.fileText,r.text.style),f=i.cells[p-1],u=e.rows[a-1]?.cells[p];return n("a:tc",{gridSpan:r.span_width,rowSpan:r.span_height,hMerge:r.spanned&&f&&(f.spanned||f.span_width)?1:void 0,vMerge:r.spanned&&u&&(u.spanned||u.span_height)?1:void 0},X("a:txBody",n("a:bodyPr"),n("a:lstStyle"),r.text.paragraphs,t,d),n("a:tcPr",{marL:s.margin_left,marR:s.margin_right,marT:s.margin_top,marB:s.margin_bottom,anchor:re(s,d).vertical_anchor},...rt.map(([P,U])=>{const I=r.borders?.[P];return I?n(U,{w:I.width},xe(I.color)):""}),r.fill===void 0?"":xe(r.fill)))}))))}const de=e=>e.group===void 0?{}:{group:e.group},ne=e=>({...e.line_dash===void 0?{}:{lineDash:e.line_dash},...e.line_begin===void 0?{}:{lineBegin:e.line_begin},...e.line_end===void 0?{}:{lineEnd:e.line_end}});function pe(e,t,i){return e.map(a=>{const r=a.kind==="cxn"?t.get(a.id)?.connect:void 0;if(!r)return a;const p=f=>{const u=f&&i(f.shape);return f&&u!==void 0?{id:u,idx:f.site}:void 0},s=p(r.begin),d=p(r.end);return s||d?{...a,connect:{...s?{begin:s}:{},...d?{end:d}:{}}}:a})}const Me=e=>new Map(e.map((t,i)=>[i+2,t])),ve=e=>t=>e.find(i=>i.name===t)?.id;function Pe(e,t,i,a,r,p,s){const d={...Se(e),id:t,name:e.name,...e.frame?{frame:e.frame}:{},...e.rotation===void 0?{}:{rotation:e.rotation},...e.flip?{flip:e.flip}:{}};if(e.kind==="placeholder"&&e.placeholder){const f=s.on==="master"?{...Re(e.placeholder.type),...e.text}:e.text;return{...d,kind:"sp",placeholder:{...e.placeholder},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{lineWidth:e.line_width},...e.fill===void 0&&e.line===void 0?{}:{geometry:e.geometry??"rect"},text:X("p:txBody",f?V(f):n("a:bodyPr"),A(f?.levels??[]),e.placeholder.type==="sldNum"?Ue:He,p)}}if(be(e)){if(e.table)return{...d,kind:"table",table:we(e.table,p)};if(e.kind==="picture"&&e.media){const f=r(fe(e.media.base,e.media.path));return f?{...d,kind:"pic",picture:{image:i.add(c.image,a.add(f,D(e.media.path),"image",e.media.path))},descr:e.media.path.split("/").pop()??""}:void 0}return!e.path&&ae(e.geometry)?{...d,kind:"cxn",geometry:e.geometry??"line",...e.adjustments?{adjustments:e.adjustments}:{},...te(e),...ne(e)}:{...d,kind:"sp",...e.kind==="textbox"?{textbox:!0}:{},...e.path?{path:e.path}:{geometry:e.geometry??"rect"},...e.adjustments?{adjustments:e.adjustments}:{},...te(e),...ne(e),...e.text?{text:ke(e.kind,e.text,e.text.paragraphs,s.master,s.first,p)}:{}}}}function $e(e,t){if(!e)return;const i=e.numbered!==void 0||e.bullet!==void 0&&e.bullet!==!1;return{font:{...e.size===void 0?{}:{size:oe(e.size)},...e.bold===void 0?{}:{bold:e.bold},...e.italic===void 0?{}:{italic:e.italic},...e.underline===void 0?{}:{underline:e.underline},...e.strike===void 0?{}:{strike:e.strike},...e.font===void 0?{}:{name:e.font},...e.color===void 0?{}:{color:Ie(e.color)}},paragraph:{...e.align===void 0?{}:{alignment:e.align},...e.line_spacing===void 0?{}:{line_spacing:{lines:e.line_spacing}},...e.space_before===void 0?{}:{space_before:oe(e.space_before)},...e.space_after===void 0?{}:{space_after:oe(e.space_after)},...e.numbered!==void 0?{numbered:e.numbered}:e.bullet===void 0?{}:{bullet:e.bullet===!1?null:e.bullet}},...i&&t?{levels:t.levels.map(a=>({margin_left:a.margin_left,indent:a.indent}))}:{},...e.anchor===void 0?{}:{anchor:e.anchor}}}function st(e,t,i,a,r,p,s,d,f){const u=`${e.id}/${t.name}`,P=p.deck.fitted[u];if(t.level!=="slide"&&!se(t))return;const U=t.level==="slide"&&t.placeholder?{placeholder:{...t.placeholder}}:{},W=!t.placeholder||t.sources.frame.from==="slide"||t.sources.frame.from==="code"?{frame:t.frame}:{},v={...Se(t),id:i,name:t.name,...U,...W,...t.rotation===void 0?{}:{rotation:t.rotation},...t.flip?{flip:t.flip}:{},...t.alt===void 0?{}:{descr:t.alt},...t.locked?{locked:!0}:{}},q=()=>{const y=p.pictures.get(u);return y?{image:a.add(c.image,r.add(y,"png","image"))}:void 0};if(t.table)return{...v,kind:"table",table:we(t.table,s)};if(t.chart)return{...v,frame:t.frame,kind:"chart",chart:a.add(c.chart,f.add(t.chart,t.frame))};if(t.kind==="movie"&&t.media){const y=q(),R=ye[D(t.media.path)]?p.file(t.media.path):void 0;if(!y)return;if(!R)return{...v,frame:t.frame,kind:"pic",picture:y};const L=r.add(R,D(t.media.path),"media",t.media.path);return d.push(i),{...v,frame:t.frame,kind:"pic",picture:{image:y.image},video:{link:a.add(c.video,L),media:a.add(c.media,L)}}}if(se(t)){const y=q(),R=p.movies?.get(u);if(y&&R){const L=r.add(R.bytes,"mp4","media");return d.push(i),{...v,frame:t.frame,kind:"pic",picture:{image:y.image},video:{link:a.add(c.video,L),media:a.add(c.media,L)}}}return y?{...v,frame:t.frame,kind:"pic",picture:y}:void 0}if(t.kind==="picture"&&t.media){const y=p.file(t.media.path);return y?{...v,kind:"pic",picture:{image:a.add(c.image,r.add(y,D(t.media.path),"image",t.media.path)),...t.media.crop?{crop:t.media.crop}:{}},descr:t.alt??t.media.path.split("/").pop()??""}:void 0}if(!t.path&&ae(t.geometry))return{...v,kind:"cxn",geometry:t.geometry??"line",...t.adjustments?{adjustments:t.adjustments}:{},...te(t),...ne(t)};const $=t.text,K=p.deck.masters.find(y=>y.name===e.master),F=$e(t.fileText,$?.style),J=$?t.placeholder?X("p:txBody",V(re({},F),P),n("a:lstStyle"),$.paragraphs,s,F):$.own?ke(t.kind,$.own,$.paragraphs,K,p.deck.masters[0],s,P,F):X("p:txBody",V(Ge($.style),P),A($.style.levels.map(ue)),$.paragraphs,s):void 0,Y=t.sources.frame.from==="code",C=t.fill!==void 0&&(Y||t.sources.fill?.from==="slide"),z=t.line!==void 0&&(Y||t.sources.line?.from==="slide");return{...v,kind:"sp",...t.kind==="textbox"?{textbox:!0}:{},...t.path?{path:t.path}:!t.placeholder||C||z?{geometry:t.geometry??"rect"}:{},...t.adjustments?{adjustments:t.adjustments}:{},...ne(t),...t.placeholder?{...C?{fill:t.fill}:{},...z?{line:t.line}:{},...t.line_width===void 0?{}:{lineWidth:t.line_width}}:te(t),...J?{text:J}:{}}}const lt={cx:6858e3,cy:9144e3};function Le(e,t){const i=he({id:2,name:"Slide Image Placeholder 1",kind:"sp",placeholder:{type:"sldImg",idx:2},...e===void 0?{frame:{left:1143e3,top:685800,width:4572e3,height:3429e3}}:{}}),a=he({id:3,name:"Notes Placeholder 2",kind:"sp",placeholder:{type:"body",idx:3,sz:"quarter"},...e===void 0?{frame:{left:685800,top:4343400,width:5486400,height:4114800}}:{},text:X("p:txBody",n("a:bodyPr"),n("a:lstStyle"),(e??"").split(`
|
|
3
|
-
`).map(r=>({runs:[{text:r}],level:0})),t)});return[i
|
|
2
|
+
import{createHash as Te}from"node:crypto";import{zipSync as Ee}from"fflate";import{AUTOSHAPE_STYLE as Oe,colorOfFile as Ie,CONNECTOR_STYLE as Ce,isConnectorGeometry as ie,joinPath as fe,placeholderFrame as Re,plainLevels as Be,Pt as ae}from"@allyhub/slides-core";import{chartBook as je,chartXml as Ne}from"./charts.js";import{asFace as Ae,fontInfo as ze,eotOf as Fe}from"./fonts.js";import{NO_PARAGRAPHS as He,shapeXml as he,treeXml as oe}from"./shapes.js";import{bodyOfStyle as Ge,bodyProps as V,bodyUnder as re,LINK as Xe,SLIDE_NUMBER as Ue,levelOf as ue,listStyle as A,txBody as X}from"./text.js";import{themeXml as ge}from"./theme.js";import{timingXml as We,transitionXml as Je}from"./timing.js";import{HEAD as M,PML as E,color as Ye,el as n,esc as Ze,fill as xe,gradientFill as qe,unesc as Ke}from"./xml.js";const Q={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",emf:"image/x-emf",wmf:"image/x-wmf"},ye={mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime"},D=e=>(e.split(".").pop()??"").toLowerCase(),Ve=[["regular","p:regular","Regular"],["bold","p:bold","Bold"],["italic","p:italic","Italic"],["boldItalic","p:boldItalic","Bold Italic"]],c={hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",package:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package",font:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",core:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",app:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",slideMaster:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster",slideLayout:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout",slide:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",notesMaster:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster",notesSlide:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",video:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",media:"http://schemas.microsoft.com/office/2007/relationships/media",presProps:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps",viewProps:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps",tableStyles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"},S={chart:"application/vnd.openxmlformats-officedocument.drawingml.chart+xml",workbook:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",presentation:"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",slideMaster:"application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml",slideLayout:"application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml",slide:"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",theme:"application/vnd.openxmlformats-officedocument.theme+xml",notesMaster:"application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml",notesSlide:"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml",presProps:"application/vnd.openxmlformats-officedocument.presentationml.presProps+xml",viewProps:"application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml",tableStyles:"application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml",core:"application/vnd.openxmlformats-package.core-properties+xml",app:"application/vnd.openxmlformats-officedocument.extended-properties+xml"};class O{list=[];linked(t){return t.replaceAll(new RegExp(`r:id="${Xe}([^"]*)"`,"gu"),(o,i)=>`r:id="${this.add(c.hyperlink,Ke(i),!0)}"`)}add(t,o,i=!1){const r=this.list.find(s=>s.type===t&&s.target===o);if(r)return r.id;const p=`rId${String(this.list.length+1)}`;return this.list.push({id:p,type:t,target:o,...i?{external:i}:{}}),p}xml(){return M+n("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},...this.list.map(t=>n("Relationship",{Id:t.id,Type:t.type,Target:t.target,TargetMode:t.external?"External":void 0})))}}class Qe{list=[];add(t,o){return this.list.push({chart:t,frame:o}),`../charts/chart${String(this.list.length)}.xml`}}class et{parts=new Map;byHash=new Map;add(t,o,i,r){const p=Te("sha256").update(t).digest("hex"),s=this.byHash.get(`${i}:${p}`);if(s)return s;const l=r?.split("/").pop()?.replace(/\.[^.]*$/u,"").replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,""),f=l===void 0||l===""?void 0:l;let u=`${f??`${i}${String(this.parts.size+1)}`}.${o}`;for(let P=2;this.parts.has(`ppt/media/${u}`);P++)u=`${f??i}-${String(P)}.${o}`;return this.parts.set(`ppt/media/${u}`,t),this.byHash.set(`${i}:${p}`,`../media/${u}`),`../media/${u}`}}function be(e){return e.kind==="component"||e.kind==="movie"?!1:e.kind==="picture"?Q[D(e.media?.path??"")]!==void 0:!0}function se(e){return e.kind==="component"||e.kind==="movie"?!0:e.kind==="picture"?Q[D(e.media?.path??"")]===void 0:!1}export function picturedShapes(e){return e.slides.flatMap(t=>t.shapes.filter(o=>se(o)).map(o=>({key:`${t.id}/${o.name}`,slide:t.id,shape:o.name,frame:o.frame})))}export function filesOf(e){const t=new Set;for(const o of e.masters)for(const i of[...o.shapes,...o.layouts.flatMap(r=>r.shapes)])i.media&&be(i)&&t.add(fe(i.media.base,i.media.path));for(const o of e.slides){o.background_picture!==void 0&&t.add(o.background_picture);for(const i of o.shapes)i.media&&(i.kind==="picture"||i.kind==="movie")&&t.add(i.media.path)}return[...t].sort()}const tt=n("p:nvGrpSpPr",{},n("p:cNvPr",{id:1,name:""}),n("p:cNvGrpSpPr"),n("p:nvPr")),nt=n("p:grpSpPr",{},n("a:xfrm",{},n("a:off",{x:0,y:0}),n("a:ext",{cx:0,cy:0}),n("a:chOff",{x:0,y:0}),n("a:chExt",{cx:0,cy:0}))),Z=e=>n("p:spTree",{},tt,nt,...e),_e={bg1:"lt1",tx1:"dk1",bg2:"lt2",tx2:"dk2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink"},ee=e=>n("p:bg",{},n("p:bgPr",{},n("a:solidFill",{},Ye(e)),n("a:effectLst")));function it(e,t,o){if(e.background_picture!==void 0){const i=o(e.background_picture);if(i!==void 0)return n("p:bg",{},n("p:bgPr",{},n("a:blipFill",{dpi:0,rotWithShape:1},n("a:blip",{"r:embed":i}),n("a:srcRect"),n("a:stretch",{},n("a:fillRect"))),n("a:effectLst")))}return e.background_gradient?n("p:bg",{},n("p:bgPr",{},qe(e.background_gradient),n("a:effectLst"))):de(e.background,t)?"":ee(e.background)}const de=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Se(e){return{...e.fill_transparency===void 0?{}:{fillTransparency:e.fill_transparency,...e.fill===void 0?{}:{fill:e.fill}},...e.gradient?{gradient:e.gradient}:{},...e.shadow===void 0?{}:{shadow:e.shadow}}}function te(e){const t=o=>({...e.fill===void 0||"fill"in o&&de(e.fill,o.fill)?{}:{fill:e.fill},...e.line===void 0||de(e.line,o.line)?{}:{line:e.line},...e.line_width===void 0||e.line_width===o.line_width?{}:{lineWidth:e.line_width}});return e.kind==="autoshape"?ie(e.geometry)?{style:"connector",...t(Ce)}:{style:"shape",...t(Oe)}:{...e.kind==="textbox"?{fill:e.fill??null}:e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{lineWidth:e.line_width}}}const at=(e,t)=>Array.from({length:Math.max(e.length,t.length)},(o,i)=>{const r=e[i]??{},p=t[i]??{},s={...r.font,...p.font};return{...r,...p,...Object.keys(s).length>0?{font:s}:{}}});function ke(e,t,o,i,r,p,s,l){const f=i!==void 0&&r!==void 0&&JSON.stringify(i.text_styles.other)!==JSON.stringify(r.text_styles.other);return X("p:txBody",V(re(t,l),s,e==="autoshape"?{rtlCol:0}:{}),A(f?at(i.text_styles.other,t.levels):t.levels),o,p,l)}const ot="{2D5ABB26-0587-4C30-8999-92F81FD0307C}",rt=[["left","a:lnL"],["right","a:lnR"],["top","a:lnT"],["bottom","a:lnB"]];function we(e,t){return n("a:tbl",{},n("a:tblPr",{firstRow:e.first_row?1:void 0,firstCol:e.first_col?1:void 0,lastRow:e.last_row?1:void 0,lastCol:e.last_col?1:void 0,bandRow:e.horz_banding?1:void 0,bandCol:e.vert_banding?1:void 0},n("a:tableStyleId",{},ot)),n("a:tblGrid",{},...e.columns.map(o=>n("a:gridCol",{w:o}))),...e.rows.map((o,i)=>n("a:tr",{h:o.height},...o.cells.map((r,p)=>{const s=r.text.own??r.text,l=$e(r.fileText,r.text.style),f=o.cells[p-1],u=e.rows[i-1]?.cells[p];return n("a:tc",{gridSpan:r.span_width,rowSpan:r.span_height,hMerge:r.spanned&&f&&(f.spanned||f.span_width)?1:void 0,vMerge:r.spanned&&u&&(u.spanned||u.span_height)?1:void 0},X("a:txBody",n("a:bodyPr"),n("a:lstStyle"),r.text.paragraphs,t,l),n("a:tcPr",{marL:s.margin_left,marR:s.margin_right,marT:s.margin_top,marB:s.margin_bottom,anchor:re(s,l).vertical_anchor},...rt.map(([P,U])=>{const I=r.borders?.[P];return I?n(U,{w:I.width},xe(I.color)):""}),r.fill===void 0?"":xe(r.fill)))}))))}const le=e=>e.group===void 0?{}:{group:e.group},ne=e=>({...e.line_dash===void 0?{}:{lineDash:e.line_dash},...e.line_begin===void 0?{}:{lineBegin:e.line_begin},...e.line_end===void 0?{}:{lineEnd:e.line_end},...e.line_begin_size===void 0?{}:{lineBeginSize:e.line_begin_size},...e.line_end_size===void 0?{}:{lineEndSize:e.line_end_size}});function pe(e,t,o){return e.map(i=>{const r=i.kind==="cxn"?t.get(i.id)?.connect:void 0;if(!r)return i;const p=f=>{const u=f&&o(f.shape);return f&&u!==void 0?{id:u,idx:f.site}:void 0},s=p(r.begin),l=p(r.end);return s||l?{...i,connect:{...s?{begin:s}:{},...l?{end:l}:{}}}:i})}const Me=e=>new Map(e.map((t,o)=>[o+2,t])),ve=e=>t=>e.find(o=>o.name===t)?.id;function Pe(e,t,o,i,r,p,s){const l={...Se(e),id:t,name:e.name,...e.frame?{frame:e.frame}:{},...e.rotation===void 0?{}:{rotation:e.rotation},...e.flip?{flip:e.flip}:{}};if(e.kind==="placeholder"&&e.placeholder){const f=s.on==="master"?{...Re(e.placeholder.type),...e.text}:e.text;return{...l,kind:"sp",placeholder:{...e.placeholder},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{lineWidth:e.line_width},...e.fill===void 0&&e.line===void 0?{}:{geometry:e.geometry??"rect"},text:X("p:txBody",f?V(f):n("a:bodyPr"),A(f?.levels??[]),e.placeholder.type==="sldNum"?Ue:He,p)}}if(be(e)){if(e.table)return{...l,kind:"table",table:we(e.table,p)};if(e.kind==="picture"&&e.media){const f=r(fe(e.media.base,e.media.path));return f?{...l,kind:"pic",picture:{image:o.add(c.image,i.add(f,D(e.media.path),"image",e.media.path))},descr:e.media.path.split("/").pop()??""}:void 0}return!e.path&&ie(e.geometry)?{...l,kind:"cxn",geometry:e.geometry??"line",...e.adjustments?{adjustments:e.adjustments}:{},...te(e),...ne(e)}:{...l,kind:"sp",...e.kind==="textbox"?{textbox:!0}:{},...e.path?{path:e.path}:{geometry:e.geometry??"rect"},...e.adjustments?{adjustments:e.adjustments}:{},...te(e),...ne(e),...e.text?{text:ke(e.kind,e.text,e.text.paragraphs,s.master,s.first,p)}:{}}}}function $e(e,t){if(!e)return;const o=e.numbered!==void 0||e.bullet!==void 0&&e.bullet!==!1;return{font:{...e.size===void 0?{}:{size:ae(e.size)},...e.bold===void 0?{}:{bold:e.bold},...e.italic===void 0?{}:{italic:e.italic},...e.underline===void 0?{}:{underline:e.underline},...e.strike===void 0?{}:{strike:e.strike},...e.font===void 0?{}:{name:e.font},...e.color===void 0?{}:{color:Ie(e.color)}},paragraph:{...e.align===void 0?{}:{alignment:e.align},...e.line_spacing===void 0?{}:{line_spacing:{lines:e.line_spacing}},...e.space_before===void 0?{}:{space_before:ae(e.space_before)},...e.space_after===void 0?{}:{space_after:ae(e.space_after)},...e.numbered!==void 0?{numbered:e.numbered}:e.bullet===void 0?{}:{bullet:e.bullet===!1?null:e.bullet}},...o&&t?{levels:t.levels.map(i=>({margin_left:i.margin_left,indent:i.indent}))}:{},...e.anchor===void 0?{}:{anchor:e.anchor}}}function st(e,t,o,i,r,p,s,l,f){const u=`${e.id}/${t.name}`,P=p.deck.fitted[u];if(t.level!=="slide"&&!se(t))return;const U=t.level==="slide"&&t.placeholder?{placeholder:{...t.placeholder}}:{},W=!t.placeholder||t.sources.frame.from==="slide"||t.sources.frame.from==="code"?{frame:t.frame}:{},v={...Se(t),id:o,name:t.name,...U,...W,...t.rotation===void 0?{}:{rotation:t.rotation},...t.flip?{flip:t.flip}:{},...t.alt===void 0?{}:{descr:t.alt},...t.locked?{locked:!0}:{}},q=()=>{const y=p.pictures.get(u);return y?{image:i.add(c.image,r.add(y,"png","image"))}:void 0};if(t.table)return{...v,kind:"table",table:we(t.table,s)};if(t.chart)return{...v,frame:t.frame,kind:"chart",chart:i.add(c.chart,f.add(t.chart,t.frame))};if(t.kind==="movie"&&t.media){const y=q(),R=ye[D(t.media.path)]?p.file(t.media.path):void 0;if(!y)return;if(!R)return{...v,frame:t.frame,kind:"pic",picture:y};const L=r.add(R,D(t.media.path),"media",t.media.path);return l.push(o),{...v,frame:t.frame,kind:"pic",picture:{image:y.image},video:{link:i.add(c.video,L),media:i.add(c.media,L)}}}if(se(t)){const y=q(),R=p.movies?.get(u);if(y&&R){const L=r.add(R.bytes,"mp4","media");return l.push(o),{...v,frame:t.frame,kind:"pic",picture:{image:y.image},video:{link:i.add(c.video,L),media:i.add(c.media,L)}}}return y?{...v,frame:t.frame,kind:"pic",picture:y}:void 0}if(t.kind==="picture"&&t.media){const y=p.file(t.media.path);return y?{...v,kind:"pic",picture:{image:i.add(c.image,r.add(y,D(t.media.path),"image",t.media.path)),...t.media.crop?{crop:t.media.crop}:{}},descr:t.alt??t.media.path.split("/").pop()??""}:void 0}if(!t.path&&ie(t.geometry))return{...v,kind:"cxn",geometry:t.geometry??"line",...t.adjustments?{adjustments:t.adjustments}:{},...te(t),...ne(t)};const $=t.text,K=p.deck.masters.find(y=>y.name===e.master),z=$e(t.fileText,$?.style),J=$?t.placeholder?X("p:txBody",V(re({},z),P),n("a:lstStyle"),$.paragraphs,s,z):$.own?ke(t.kind,$.own,$.paragraphs,K,p.deck.masters[0],s,P,z):X("p:txBody",V(Ge($.style),P),A($.style.levels.map(ue)),$.paragraphs,s):void 0,Y=t.sources.frame.from==="code",C=t.fill!==void 0&&(Y||t.sources.fill?.from==="slide"),F=t.line!==void 0&&(Y||t.sources.line?.from==="slide");return{...v,kind:"sp",...t.kind==="textbox"?{textbox:!0}:{},...t.path?{path:t.path}:!t.placeholder||C||F?{geometry:t.geometry??"rect"}:{},...t.adjustments?{adjustments:t.adjustments}:{},...ne(t),...t.placeholder?{...C?{fill:t.fill}:{},...F?{line:t.line}:{},...t.line_width===void 0?{}:{lineWidth:t.line_width}}:te(t),...J?{text:J}:{}}}const dt={cx:6858e3,cy:9144e3};function Le(e,t){const o=he({id:2,name:"Slide Image Placeholder 1",kind:"sp",placeholder:{type:"sldImg",idx:2},...e===void 0?{frame:{left:1143e3,top:685800,width:4572e3,height:3429e3}}:{}}),i=he({id:3,name:"Notes Placeholder 2",kind:"sp",placeholder:{type:"body",idx:3,sz:"quarter"},...e===void 0?{frame:{left:685800,top:4343400,width:5486400,height:4114800}}:{},text:X("p:txBody",n("a:bodyPr"),n("a:lstStyle"),(e??"").split(`
|
|
3
|
+
`).map(r=>({runs:[{text:r}],level:0})),t)});return[o,i]}export function pptxParts(e){const{deck:t}=e,o=t.lang?.split("-").map((a,m)=>m===0?a.toLowerCase():a.toUpperCase()).join("-"),i=new Map,r=new et,p=new Qe,s=[],l=new O,f=[],u=new Map;let P=2147483648;t.masters.forEach((a,m)=>{const h=m+1,k=P++,x=`ppt/slideMasters/slideMaster${String(h)}.xml`,b=`ppt/theme/theme${String(h)}.xml`;i.set(b,ge(t.theme)),s.push([b,S.theme]);const _=new O,T=[];a.layouts.forEach(w=>{const j=u.size+1,d=`ppt/slideLayouts/slideLayout${String(j)}.xml`;u.set(w,d);const g=new O;g.add(c.slideMaster,`../slideMasters/slideMaster${String(h)}.xml`);const N=w.shapes.flatMap((ce,De)=>{const me=Pe(ce,De+2,g,r,e.file,o,{master:a,first:e.deck.masters[0],on:"layout"});return me?[{...me,...le(ce)}]:[]});i.set(d,M+n("p:sldLayout",{...E,...w.display_master_shapes===!1?{showMasterSp:0}:{},preserve:1},n("p:cSld",{name:w.name},w.background===void 0?"":ee(w.background),Z(oe(pe(N,Me(w.shapes),ve(N))))),n("p:clrMapOvr",{},n("a:masterClrMapping")))),i.set(`ppt/slideLayouts/_rels/slideLayout${String(j)}.xml.rels`,g.xml()),s.push([d,S.slideLayout]),T.push(n("p:sldLayoutId",{id:P++,"r:id":_.add(c.slideLayout,`../slideLayouts/slideLayout${String(j)}.xml`)}))}),_.add(c.theme,`../theme/theme${String(h)}.xml`);const H=a.shapes.flatMap((w,j)=>{const d=Pe(w,j+2,_,r,e.file,o,{master:a,first:e.deck.masters[0],on:"master"});return d?[{...d,...le(w)}]:[]}),G=a.text_styles;i.set(x,M+n("p:sldMaster",E,n("p:cSld",{name:a.name},ee(a.background),Z(oe(pe(H,Me(a.shapes),ve(H))))),n("p:clrMap",_e),n("p:sldLayoutIdLst",{},...T),n("p:txStyles",{},A(G.title,"p:titleStyle"),A(G.body,"p:bodyStyle"),A(G.other,"p:otherStyle")))),i.set(`ppt/slideMasters/_rels/slideMaster${String(h)}.xml.rels`,_.xml()),s.push([x,S.slideMaster]),f.push(n("p:sldMasterId",{id:k,"r:id":l.add(c.slideMaster,`slideMasters/slideMaster${String(h)}.xml`)}))});const U=t.slides.some(a=>a.notes!==void 0),I=`ppt/theme/theme${String(t.masters.length+1)}.xml`;let W="";if(U){i.set(I,ge(t.theme)),s.push([I,S.theme]);const a=new O;a.add(c.theme,`../theme/theme${String(t.masters.length+1)}.xml`),i.set("ppt/notesMasters/notesMaster1.xml",M+n("p:notesMaster",E,n("p:cSld",{},ee("lt1"),Z(Le(void 0,o))),n("p:clrMap",_e))),i.set("ppt/notesMasters/_rels/notesMaster1.xml.rels",a.xml()),s.push(["ppt/notesMasters/notesMaster1.xml",S.notesMaster]),W=l.add(c.notesMaster,"notesMasters/notesMaster1.xml")}const v=[],q=new Map(t.masters.flatMap(a=>a.layouts.map(m=>[m.name,m]))),$=a=>{const m=new Set,h=t.slides[a];for(const[k,x]of[[t.slides[a-1],h],[h,t.slides[a+1]]])if(k&&x&&x.transition?.type==="morph")for(const b of k.shapes)b.level==="slide"&&x.shapes.some(_=>_.name===b.name)&&m.add(b.name);return m};t.slides.forEach((a,m)=>{const h=m+1,k=`ppt/slides/slide${String(h)}.xml`,x=new O,b=q.get(a.layout),_=b?u.get(b):void 0;_&&x.add(c.slideLayout,`../${_.slice(4)}`);const T=[],H=new Map,G=new Map;let w=1;const j=a.shapes.flatMap(d=>{const g=st(a,d,++w,x,r,e,o,T,p);if(!g)return w--,[];H.set(d.name,g.id),G.set(g.id,d);const N=$(m).has(d.name)?{name:`!!${g.name}`}:{};return[{...g,...le(d),...N}]});if(a.notes!==void 0){const d=`ppt/notesSlides/notesSlide${String(h)}.xml`,g=new O;g.add(c.notesMaster,"../notesMasters/notesMaster1.xml"),g.add(c.slide,`../slides/slide${String(h)}.xml`),i.set(d,M+n("p:notes",E,n("p:cSld",{},Z(Le(a.notes,o))),n("p:clrMapOvr",{},n("a:masterClrMapping")))),i.set(`ppt/notesSlides/_rels/notesSlide${String(h)}.xml.rels`,g.xml()),s.push([d,S.notesSlide]),x.add(c.notesSlide,`../notesSlides/notesSlide${String(h)}.xml`)}i.set(k,M+n("p:sld",{...E,show:a.hidden?0:void 0},n("p:cSld",{name:a.id},it(a,b?.background??t.masters.find(d=>d.name===a.master)?.background,d=>{const g=e.file(d);return g&&Q[D(d)]!==void 0?x.add(c.image,r.add(g,D(d),"image",d)):void 0}),x.linked(Z(oe(pe(j,G,d=>H.get(d)))))),n("p:clrMapOvr",{},n("a:masterClrMapping")),Je(a.transition,a.advance),We(a.animations,T,d=>H.get(d),d=>a.shapes.find(g=>g.name===d)?.text!==void 0,t,new Map(a.shapes.flatMap(d=>{const g=e.movies?.get(`${a.id}/${d.name}`),N=d.kind==="movie"&&d.media?e.lengths?.get(d.media.path):g?.seconds;return N===void 0?[]:[[d.name,N]]}))))),i.set(`ppt/slides/_rels/slide${String(h)}.xml.rels`,x.xml()),s.push([k,S.slide]),v.push(n("p:sldId",{id:256+m,"r:id":l.add(c.slide,`slides/slide${String(h)}.xml`)}))}),l.add(c.theme,"theme/theme1.xml"),l.add(c.presProps,"presProps.xml"),l.add(c.viewProps,"viewProps.xml"),l.add(c.tableStyles,"tableStyles.xml");const K=new Map;let z=0;const J=(e.fonts??[]).flatMap(a=>{const m=Ve.flatMap(([h,k,x])=>{const b=a[h]&&Ae(a[h],a.typeface,x),_=b&&ze(b);if(!b||!_)return[];const T=`fonts/font${String(++z)}.fntdata`;return K.set(`ppt/${T}`,Fe(b,_,a.typeface,x)),[n(k,{"r:id":l.add(c.font,T)})]});return m.length===0?[]:[n("p:embeddedFont",{},n("p:font",{typeface:a.typeface}),...m)]}),Y=J.length===0?"":n("p:embeddedFontLst",{},...J);i.set("ppt/presentation.xml",M+n("p:presentation",{...E,...Y===""?{}:{embedTrueTypeFonts:1},saveSubsetFonts:1},n("p:sldMasterIdLst",{},...f),W===""?"":n("p:notesMasterIdLst",{},n("p:notesMasterId",{"r:id":W})),n("p:sldIdLst",{},...v),n("p:sldSz",{cx:t.width,cy:t.height}),n("p:notesSz",dt),Y,e.deck.masters[0]?A(Be(e.deck.masters[0]).map(ue),"p:defaultTextStyle"):"")),i.set("ppt/_rels/presentation.xml.rels",l.xml()),s.push(["ppt/presentation.xml",S.presentation]),i.set("ppt/presProps.xml",M+n("p:presentationPr",E)),i.set("ppt/viewProps.xml",M+n("p:viewPr",E)),i.set("ppt/tableStyles.xml",M+n("a:tblStyleLst",{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main",def:"{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"})),s.push(["ppt/presProps.xml",S.presProps]),s.push(["ppt/viewProps.xml",S.viewProps]),s.push(["ppt/tableStyles.xml",S.tableStyles]),i.set("docProps/core.xml",M+n("cp:coreProperties",{"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/"},e.title===void 0?"":`<dc:title>${Ze(e.title)}</dc:title>`)),i.set("docProps/app.xml",M+n("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"},n("Application",{},"AllyHub"),n("Slides",{},String(t.slides.length)),n("Notes",{},String(t.slides.filter(a=>a.notes!==void 0).length)),n("HiddenSlides",{},String(t.slides.filter(a=>a.hidden).length)))),s.push(["docProps/core.xml",S.core]),s.push(["docProps/app.xml",S.app]);const C=new O;C.add(c.officeDocument,"ppt/presentation.xml"),C.add(c.core,"docProps/core.xml"),C.add(c.app,"docProps/app.xml");const F=new Map;p.list.forEach(({chart:a,frame:m},h)=>{const k=String(h+1),x=`ppt/charts/chart${k}.xml`,b=new O,_=`Microsoft_Excel_Sheet${k}.xlsx`;F.set(`ppt/embeddings/${_}`,je(a)),i.set(x,Ne(a,m,b.add(c.package,`../embeddings/${_}`))),i.set(`ppt/charts/_rels/chart${k}.xml.rels`,b.xml()),s.push([x,S.chart])});const y=new Set([...r.parts.keys(),...F.keys()].map(D)),R=M+n("Types",{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},n("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),n("Default",{Extension:"xml",ContentType:"application/xml"}),z>0?n("Default",{Extension:"fntdata",ContentType:"application/x-fontdata"}):"",...[...y].sort().map(a=>n("Default",{Extension:a,ContentType:a==="xlsx"?S.workbook:Q[a]??ye[a]??"application/octet-stream"})),...s.map(([a,m])=>n("Override",{PartName:`/${a}`,ContentType:m}))),L=new TextEncoder,B=new Map;B.set("[Content_Types].xml",L.encode(R)),B.set("_rels/.rels",L.encode(C.xml()));for(const[a,m]of i)B.set(a,L.encode(m));for(const[a,m]of r.parts)B.set(a,m);for(const[a,m]of F)B.set(a,m);for(const[a,m]of K)B.set(a,m);return B}const lt=new Date(1980,0,1);export function writePptx(e){const t={};for(const[o,i]of pptxParts(e))t[o]=[i,{level:/\.(png|jpe?g|gif|mp4|m4v|mov)$/u.test(o)?0:6,mtime:lt}];return Ee(t)}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
2
|
import{lumOf as s}from"@allyhub/ooxml/brightness";const p={"&":"&","<":"<",">":">",'"':"""},i=t=>{const o=t.charCodeAt(0);return o<32&&o!==9&&o!==10&&o!==13||o===65534||o===65535};export const esc=t=>Array.from(t,o=>i(o)?"":p[o]??o).join(""),unesc=t=>t.replaceAll(""",'"').replaceAll(">",">").replaceAll("<","<").replaceAll("&","&");export function el(t,o={},...e){const n=Object.entries(o).filter(([,a])=>a!==void 0).map(([a,l])=>` ${a}="${esc(typeof l=="boolean"?l?"1":"0":String(l))}"`).join(""),r=e.join("");return r===""?`<${t}${n}/>`:`<${t}${n}>${r}</${t}>`}export const HEAD=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
3
|
-
`,NS={a:"http://schemas.openxmlformats.org/drawingml/2006/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",p:"http://schemas.openxmlformats.org/presentationml/2006/main",p14:"http://schemas.microsoft.com/office/powerpoint/2010/main"},PML={"xmlns:a":NS.a,"xmlns:r":NS.r,"xmlns:p":NS.p};export function color(t,o=0){const e=o>0?el("a:alpha",{val:Math.round((1-o)*1e5)}):"";if(typeof t=="string")return el("a:schemeClr",{val:t},e);if("rgb"in t)return el("a:srgbClr",{val:t.rgb.replace("#","").toUpperCase()},e);const{lumMod:n,lumOff:r}=s(t.brightness);return el("a:schemeClr",{val:t.theme_color},el("a:lumMod",{val:n}),r===void 0?"":el("a:lumOff",{val:r}),e)}export const fill=(t,o=0)=>t===null?el("a:noFill"):el("a:solidFill",{},color(t,o)),gradientFill=t=>el("a:gradFill",{rotWithShape:1},el("a:gsLst",{},...[...t.stops].sort((o,e)=>o.at-e.at).map(o=>el("a:gs",{pos:Math.round(o.at*1e5)},color(o.color,o.transparency)))),el("a:lin",{ang:Math.round(t.angle*6e4),scaled:0})),effects=t=>el("a:effectLst",{},el("a:outerShdw",{blurRad:t.blur,dist:t.distance,dir:Math.round(t.angle*6e4),algn:"ctr",rotWithShape:0},color(t.color,t.transparency))),centipoints=t=>Math.round(t/127);
|
|
3
|
+
`,NS={a:"http://schemas.openxmlformats.org/drawingml/2006/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",p:"http://schemas.openxmlformats.org/presentationml/2006/main",p14:"http://schemas.microsoft.com/office/powerpoint/2010/main"},PML={"xmlns:a":NS.a,"xmlns:r":NS.r,"xmlns:p":NS.p};export function color(t,o=0){const e=o>0?el("a:alpha",{val:Math.round((1-o)*1e5)}):"";if(typeof t=="string")return el("a:schemeClr",{val:t},e);if("rgb"in t)return el("a:srgbClr",{val:t.rgb.replace("#","").toUpperCase()},e);const{lumMod:n,lumOff:r}=s(t.brightness);return el("a:schemeClr",{val:t.theme_color},el("a:lumMod",{val:n}),r===void 0?"":el("a:lumOff",{val:r}),e)}export const fill=(t,o=0)=>t===null?el("a:noFill"):el("a:solidFill",{},color(t,o)),gradientFill=t=>el("a:gradFill",{rotWithShape:1},el("a:gsLst",{},...[...t.stops].sort((o,e)=>o.at-e.at).map(o=>el("a:gs",{pos:Math.round(o.at*1e5)},color(o.color,o.transparency)))),el("a:lin",{ang:Math.round(t.angle*6e4),scaled:0})),effects=t=>t===null?el("a:effectLst",{}):el("a:effectLst",{},el("a:outerShdw",{blurRad:t.blur,dist:t.distance,dir:Math.round(t.angle*6e4),algn:"ctr",rotWithShape:0},color(t.color,t.transparency))),centipoints=t=>Math.round(t/127);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{adjustmentDefaults as
|
|
3
|
-
`),o)){if(!b.ea){g.append(b.text);continue}const m=document.createElement("span");m.style.fontFamily=p,m.textContent=b.text,g.append(m)}d.append(g)}e.append(d)})}export const isCjk=e=>e!==void 0&&/^(zh|ja|ko)(-|$)/iu.test(e);function k(e,t,i,r){const{style:n}=e,o=n.auto_size==="shape",s=document.createElement("div");s.dataset.akText="",s.dataset.akAutofit=n.auto_size,Object.assign(s.style,{position:o?"relative":"absolute",inset:o?"auto":"0px",minHeight:"100%",display:"flex",flexDirection:"column",justifyContent:V[n.vertical_anchor],padding:`${String(n.margins.top*t)}px ${String(n.margins.right*t)}px ${String(n.margins.bottom*t)}px ${String(n.margins.left*t)}px`,whiteSpace:n.word_wrap?"pre-wrap":"pre",overflowWrap:"break-word",boxSizing:"border-box"});const a=document.createElement("div");return a.dataset.akBody="",s.append(a),tt(a,e,t,i,r),i!==void 0&&(s.lang=i),isCjk(i)&&(s.dataset.akCjk=""),s}export function fitText(e){const t=e.querySelector("[data-ak-body]");if(!t||e.dataset.akAutofit!=="text")return 1;const i=e.clientHeight-parseFloat(getComputedStyle(e).paddingTop)-parseFloat(getComputedStyle(e).paddingBottom),r=s=>(e.style.setProperty("--ak-fit",String(s)),t.scrollHeight<=i+.5);if(r(1))return delete e.dataset.akFontScale,1;let n=MIN_FONT_SCALE,o=1;if(!r(n))return e.dataset.akFontScale=n.toFixed(2),n;for(;o-n>.01;){const s=(n+o)/2;r(s)?n=s:o=s}return r(n),e.dataset.akFontScale=n.toFixed(2),n}function et(e,t,i,r){const n=e.split(" "),o=[],s=a=>{const u=Number(n[a]),d=Number(n[a+1]);return[r?.h?t-u:u,r?.v?i-d:d]};for(let a=0;a<n.length;){const u=n[a++];u==="M"||u==="L"?(o.push({op:u,at:[s(a)]}),a+=2):u==="C"?(o.push({op:u,at:[s(a),s(a+2),s(a+4)]}),a+=6):u==="Z"&&o.push({op:u})}return o}const nt=e=>e.map(t=>t.op==="Z"?"Z":`${t.op}${t.at.map(([i,r])=>`${String(i)} ${String(r)}`).join(" ")}`).join(" ");function it(e,t){const i=e.flatMap(o=>o.op==="Z"?[]:o.at),r=t?[...i].reverse():i,n=r[0];if(n)for(const o of r.slice(1)){const s=Math.hypot(n[0]-o[0],n[1]-o[1]);if(s>1e-6)return{at:n,out:[(n[0]-o[0])/s,(n[1]-o[1])/s]}}}function ot(e,t,i,r){const n=e.filter(a=>a.op!=="Z"),o=t?n[n.length-1]:n[0];if(!o)return;const s=t?o.at.slice(o.op==="C"?-2:-1):[...o.at,...n[1]?.op==="C"?n[1].at.slice(0,1):[]];for(const a of s)a[0]+=i,a[1]+=r}function rt(e,t,i,r,n){if(t.line===null)return;const o=t.frame.width*i,s=t.frame.height*i,a=(F(t.geometry??"line",o,s,t.adjustments)?.paths??[]).filter(m=>m.stroke).map(m=>et(m.d,o,s,t.flip)),u=a[0],d=a[a.length-1];if(!u||!d)return;const f="http://www.w3.org/2000/svg",c=document.createElementNS(f,"svg");c.setAttribute("width",String(Math.max(o,1))),c.setAttribute("height",String(Math.max(s,1))),Object.assign(c.style,{position:"absolute",left:"0px",top:"0px",overflow:"visible"});const l=colorCss(t.line??U.line,n),g=Math.max(r,lt*i),p=m=>m===void 0||m==="none"||m==="arrow"?0:g*1.5,b=[];for(const[m,S,h]of[[t.line_begin,u,!1],[t.line_end,d,!0]]){const w=it(S,h);if(!w)continue;const[I,P]=w.at,[j,C]=w.out,O=at(m,I,P,j,C,r,g,l);O&&b.push(O);const $=p(m);$>0&&ot(S,h,-j*$,-C*$)}for(const m of a){const S=document.createElementNS(f,"path");S.setAttribute("d",nt(m)),S.setAttribute("fill","none"),S.setAttribute("stroke",l),S.setAttribute("stroke-width",String(r));const h=L(t.line_dash,r);h&&S.setAttribute("stroke-dasharray",h),c.append(S)}c.append(...b),e.append(c)}const st={sysDash:[3,1],sysDot:[1,1],dash:[4,3],dashDot:[4,3,1,3],lgDash:[8,3],lgDashDot:[8,3,1,3],lgDashDotDot:[8,3,1,3,1,3]},L=(e,t)=>e&&st[e]?.map(i=>String(i*t)).join(" "),lt=25200;function at(e,t,i,r,n,o,s,a){if(e===void 0||e==="none")return;const u="http://www.w3.org/2000/svg",d=s*(e==="arrow"?3.5:3),f=(p,b)=>`${String(t-r*p-n*b)},${String(i-n*p+r*b)}`;if(e==="oval"){const p=document.createElementNS(u,"circle");return p.setAttribute("cx",String(t)),p.setAttribute("cy",String(i)),p.setAttribute("r",String(d/2)),p.setAttribute("fill",a),p}const c=e==="arrow",l=document.createElementNS(u,c?"polyline":"polygon"),g={triangle:[f(0,0),f(d,d/2),f(d,-d/2)],stealth:[f(0,0),f(d,d/2),f(d*.7,0),f(d,-d/2)],diamond:[f(-d/2,0),f(0,d/2),f(d/2,0),f(0,-d/2)],arrow:[f(d,d/2),f(0,0),f(d,-d/2)]}[e];return l.setAttribute("points",g.join(" ")),c?(l.setAttribute("fill","none"),l.setAttribute("stroke",a),l.setAttribute("stroke-width",String(o))):l.setAttribute("fill",a),l}function ct(e,t,i,r,n,o){const s=t.frame.width*r,a=t.frame.height*r,u="http://www.w3.org/2000/svg",d=document.createElementNS(u,"svg");d.setAttribute("width",String(Math.max(s,1))),d.setAttribute("height",String(Math.max(a,1))),Object.assign(d.style,{position:"absolute",left:"0px",top:"0px",overflow:"visible"}),D(d,t);let f=colorCss(t.fill,o);if(t.gradient){const c=`ak-gradient-${String(gt++)}`;d.append(pt(u,c,t.gradient,t.frame,o)),f=`url(#${c})`}for(const c of i){const l=document.createElementNS(u,"path");if(l.setAttribute("d",c.d),l.setAttribute("fill-rule","evenodd"),l.setAttribute("fill",c.fill==="none"||t.fill===null||t.fill===void 0?c.fill==="none"||!t.gradient?"none":f:c.fill==="norm"?f:dt[c.fill](colorCss(t.fill,o))),t.fill_transparency!==void 0&&l.setAttribute("fill-opacity",String(1-t.fill_transparency)),c.stroke&&t.line!==void 0&&t.line!==null){l.setAttribute("stroke",colorCss(t.line,o)),l.setAttribute("stroke-width",String(n)),l.setAttribute("stroke-linejoin","round");const g=L(t.line_dash,n);g&&l.setAttribute("stroke-dasharray",g)}d.append(l)}e.append(d)}const dt={darken:e=>`color-mix(in srgb, ${e} 60%, black)`,darkenLess:e=>`color-mix(in srgb, ${e} 80%, black)`,lighten:e=>`color-mix(in srgb, ${e} 60%, white)`,lightenLess:e=>`color-mix(in srgb, ${e} 80%, white)`};function ut(e,t){const i=e.path;if(!i)return[];const r=i.w===0?0:e.frame.width*t/i.w,n=i.h===0?0:e.frame.height*t/i.h;return[{d:i.steps.map(s=>s.op==="close"?"Z":s.op==="move"?`M${String(s.x*r)} ${String(s.y*n)}`:s.op==="line"?`L${String(s.x*r)} ${String(s.y*n)}`:`C${String(s.x1*r)} ${String(s.y1*n)} ${String(s.x2*r)} ${String(s.y2*n)} ${String(s.x*r)} ${String(s.y*n)}`).join(""),fill:"norm",stroke:!0}]}function D(e,t){!t.flip?.h&&!t.flip?.v||(e.style.transform=`scale(${t.flip.h?"-1":"1"}, ${t.flip.v?"-1":"1"})`)}const ft=new Set(["rect","roundRect","ellipse"]),E=(e,t,i)=>t===void 0||t===0?colorCss(e,i):`color-mix(in srgb, ${colorCss(e,i)} ${String((1-t)*100)}%, transparent)`,T=(e,t)=>`linear-gradient(${String(e.angle+90)}deg, ${e.stops.map(i=>`${E(i.color,i.transparency,t)} ${String(i.at*100)}%`).join(", ")})`,H=(e,t)=>e.gradient?T(e.gradient,t):e.fill===null||e.fill===void 0?"transparent":E(e.fill,e.fill_transparency,t);let gt=0;function pt(e,t,i,r,n){const o=document.createElementNS(e,"linearGradient");o.id=t;const s=i.angle*Math.PI/180,a=Math.cos(s),u=Math.sin(s),d=(Math.abs(r.width*a)+Math.abs(r.height*u))/Math.max(r.width,r.height,1)/2;o.setAttribute("x1",String(.5-a*d)),o.setAttribute("y1",String(.5-u*d)),o.setAttribute("x2",String(.5+a*d)),o.setAttribute("y2",String(.5+u*d));for(const f of i.stops){const c=document.createElementNS(e,"stop");c.setAttribute("offset",String(f.at)),c.setAttribute("stop-color",colorCss(f.color,n)),f.transparency!==void 0&&c.setAttribute("stop-opacity",String(1-f.transparency)),o.append(c)}return o}function mt(e,t,i,r){const n=t.angle*Math.PI/180,o=t.distance*i;e.style.filter=`drop-shadow(${String(o*Math.cos(n))}px ${String(o*Math.sin(n))}px ${String(t.blur*i)}px ${E(t.color,t.transparency,r)})`}function bt(e,t,i){const r=t.geometry??"rect",n=t.frame.width*i,o=t.frame.height*i;r==="roundRect"?e.style.borderRadius=`${String(Math.min(n,o)*Math.min(.5,Math.max(0,t.adjustments?.[0]??z("roundRect")[0]??0)))}px`:r==="ellipse"&&(e.style.borderRadius="50%")}const St={left:"borderLeft",right:"borderRight",top:"borderTop",bottom:"borderBottom"},R="http://www.w3.org/2000/svg";function xt(e,t,i,r,n){const o=i.width/v,s=i.height/v,a=r*v,u=B(t,o,s),d=document.createElementNS(R,"svg");d.setAttribute("viewBox",`0 0 ${String(o)} ${String(s)}`),d.setAttribute("width","100%"),d.setAttribute("height","100%"),Object.assign(d.style,{position:"absolute",inset:"0px",overflow:"visible"});const f=(l,g)=>{const p=document.createElementNS(R,l);for(const[b,m]of Object.entries(g))p.setAttribute(b,String(m));d.append(p)},c=l=>{f("path",{d:l.d,fill:l.fill===void 0?"none":colorCss(l.fill,n),stroke:l.width>0?colorCss(l.color,n):"none","stroke-width":l.width,"stroke-linejoin":"round"})};for(const l of[...u.grid,...u.shapes])c(l);for(const l of[...u.boxes,...u.keys])f("rect",{x:l.x,y:l.y,width:l.width,height:l.height,fill:colorCss(l.color,n)});for(const l of[...u.axes,...u.lines])c(l);for(const l of u.dots)f("circle",{cx:l.x,cy:l.y,r:l.r,fill:colorCss(l.color,n)});e.append(d);for(const l of u.words){const g=document.createElement("div");g.textContent=l.text,Object.assign(g.style,{position:"absolute",left:`${String(l.x*a)}px`,top:`${String(l.y*a)}px`,transform:`translate(${{start:"0",middle:"-50%",end:"-100%"}[l.anchor]}, -50%)`,fontSize:`${String(l.size*a)}px`,lineHeight:"1",whiteSpace:"nowrap",color:colorCss(l.color,n),fontFamily:"var(--ak-theme-minor)"}),e.append(g)}}function ht(e,t,i,r,n){const o=document.createElement("table");Object.assign(o.style,{borderCollapse:"collapse",tableLayout:"fixed",width:`${String(t.columns.reduce((a,u)=>a+u,0)*i)}px`});const s=document.createElement("colgroup");for(const a of t.columns){const u=document.createElement("col");u.style.width=`${String(a*i)}px`,s.append(u)}o.append(s);for(const[a,u]of t.rows.entries()){const d=document.createElement("tr");d.style.height=`${String(u.height*i)}px`;for(const[f,c]of u.cells.entries()){if(c.spanned)continue;const l=document.createElement("td");l.dataset.akCell=`${String(a)},${String(f)}`,c.span_width&&(l.colSpan=c.span_width),c.span_height&&(l.rowSpan=c.span_height),l.style.padding="0px",l.style.verticalAlign={t:"top",ctr:"middle",b:"bottom"}[c.text.style.vertical_anchor],c.fill!==void 0&&(l.style.background=colorCss(c.fill,n));for(const[p,b]of Object.entries(St)){const m=c.borders?.[p];m&&(l.style[b]=`${String(m.width*i)}px solid ${colorCss(m.color,n)}`)}const g=k(c.text,i,r,n);g.style.minHeight="0px",l.append(g),d.append(l)}o.append(d)}e.style.height="auto",e.append(o)}export function drawShape(e,t,i){const{k:r,colors:n}=i;if(t.kind==="placeholder"&&t.text?.empty===!0&&!i.editing)return;const o=document.createElement("div");o.setAttribute(SHAPE_ATTR,`${e}/${t.name}`);const{left:s,top:a,width:u,height:d}=t.frame;Object.assign(o.style,{position:"absolute",left:`${String(s*r)}px`,top:`${String(a*r)}px`,width:`${String(u*r)}px`,height:`${String(d*r)}px`}),t.rotation!==void 0&&(o.style.transform=`rotate(${String(t.rotation)}deg)`);const f=(t.line_width??LINE_WIDTH)*r;if(t.chart)xt(o,t.chart,t.frame,r,n);else if(t.table)return ht(o,t.table,r,i.lang,n),o;if(t.shadow&&mt(o,t.shadow,r,n),t.alt!==void 0&&o.setAttribute("aria-label",t.alt),t.kind==="autoshape"){if(!t.path&&W(t.geometry))return rt(o,t,r,f,n),o;const c=t.path?ut(t,r):ft.has(t.geometry??"rect")?void 0:F(t.geometry??"rect",t.frame.width*r,t.frame.height*r,t.adjustments)?.paths;if(c)return ct(o,t,c,r,f,n),t.text&&o.append(k(t.text,r,i.lang,n)),o;o.style.background=H(t,n),bt(o,t,r)}else(t.fill!==void 0||t.gradient)&&(o.style.background=H(t,n));if(t.line!==void 0&&t.line!==null&&(o.style.outline=`${String(f)}px ${t.line_dash===void 0||t.line_dash==="solid"?"solid":"dashed"} ${colorCss(t.line,n)}`),t.text?.style.auto_size==="shape"&&(o.style.height="auto",o.style.minHeight="0px",t.text.style.word_wrap||(o.style.width="max-content")),t.kind==="picture"&&t.media){o.style.overflow="hidden";const c=document.createElement("img");c.alt=t.alt??"",c.src=i.url(t.media.path),D(c,t);const l=t.media.crop??{left:0,top:0,right:0,bottom:0},g=1-l.left-l.right,p=1-l.top-l.bottom;Object.assign(c.style,{position:"absolute",width:`${String(100/g)}%`,height:`${String(100/p)}%`,left:`${String(-l.left/g*100)}%`,top:`${String(-l.top/p*100)}%`,maxWidth:"none"}),t.flip&&(c.style.transformOrigin=`${String(50/g-l.left/g*100)}% ${String(50/p-l.top/p*100)}%`),o.append(c)}else if(t.kind==="movie"&&t.media&&!i.playing&&i.poster!==!0)o.dataset.akFilm="";else if(t.kind==="movie"&&t.media){const c=document.createElement("video");c.src=i.url(t.media.path),c.muted=!0,c.playsInline=!0,c.preload="auto",t.media.poster!==void 0&&(c.currentTime=t.media.poster),Object.assign(c.style,{width:"100%",height:"100%",objectFit:"fill",...i.playing?{}:{pointerEvents:"none"}}),o.append(c)}return t.text&&o.append(k(t.text,r,i.lang,n)),o}export function drawSlide(e,t){const i=document.createElement("div");i.dataset.akSlide=e.id,Object.assign(i.style,{position:"absolute",inset:"0px",background:colorCss(e.background,t.colors),overflow:"hidden"}),e.background_gradient&&(i.style.background=T(e.background_gradient,t.colors)),e.background_picture!==void 0&&(i.style.background=`${colorCss(e.background,t.colors)} url(${JSON.stringify(t.url(e.background_picture))}) center / 100% 100% no-repeat`);for(const r of e.shapes){const n=drawShape(e.id,r,t);n&&i.append(n)}return i}
|
|
2
|
+
import{adjustmentDefaults as R,chartDrawing as I,colorRgb as P,CONNECTOR_STYLE as B,DECK_FONTS as G,EMU_PER_PT as w,isConnectorGeometry as Z,Pt as U,runLang as W}from"@allyhub/slides-core";import{presetOutline as C}from"@allyhub/ooxml/geometry";export const SHAPE_ATTR="data-ak-shape",LINE_WIDTH=U(.75),SINGLE_SPACING=1.2,MIN_FONT_SCALE=.25;export function themeCss(e){const t={};for(const[i,r]of Object.entries(e.colors))t[`--ak-theme-${i}`]=r;return t["--ak-theme-major"]=y(e.fonts.major,A),t["--ak-theme-minor"]=y(e.fonts.minor,A),t["--ak-theme-major-ea"]=y(e.fonts.major_east_asian,_),t["--ak-theme-minor-ea"]=y(e.fonts.minor_east_asian,_),t}const _='"Noto Sans SC", sans-serif',A=`"${G.minor}", ${_}`,y=(e,t)=>e.includes(",")||e.includes('"')?e:`"${e}", ${t}`;export const colorCss=(e,t)=>e==null?"transparent":P(e,t);const O=e=>e===void 0?void 0:e==="+mj-lt"?"var(--ak-theme-major)":e==="+mn-lt"?"var(--ak-theme-minor)":y(e,A),K={l:"left",ctr:"center",r:"right",just:"justify"},q={t:"flex-start",ctr:"center",b:"flex-end"},J=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\u2E80-\u2FDF\u3000-\u303F\uFF00-\uFFEF]/u,V=/[\u2018\u2019\u201C\u201D\u2026\u2014\u2013\u2025\u00B7]/u;export function eastAsianRuns(e,t){const i=[];for(const r of e){const o=J.test(r)||t&&V.test(r),n=i.at(-1);n?.ea===o?n.text+=r:i.push({text:r,ea:o})}return i}const h=e=>`calc(${String(e)}px * var(--ak-fit, 1))`;function M(e,t,i,r){if(!t)return;const o=O(t.name);o&&(e.style.fontFamily=o),t.size!==void 0&&(e.style.fontSize=h(t.size*i)),t.bold!==void 0&&(e.style.fontWeight=t.bold?"700":"400"),t.italic!==void 0&&(e.style.fontStyle=t.italic?"italic":"normal"),(t.underline!==void 0||t.strike!==void 0||t.link)&&(e.style.textDecorationLine=[t.underline===!0||t.link!==void 0?"underline":"",t.strike===!0?"line-through":""].filter(n=>n!=="").join(" ")||"none"),t.highlight!==void 0&&(e.style.backgroundColor=t.highlight),t.baseline!==void 0&&t.baseline!==0&&(e.style.fontSize=t.size===void 0?"0.66em":h(t.size*i*.66),e.style.verticalAlign=`${String(t.baseline/.66)}em`),t.spacing!==void 0&&(e.style.letterSpacing=h(t.spacing*i)),t.link!==void 0?e.style.color=colorCss("hlink",r):t.color!==void 0&&(e.style.color=colorCss(t.color,r))}function Y(){if(document.getElementById("ak-bullet-style"))return;const e=document.createElement("style");e.id="ak-bullet-style",e.textContent="[data-ak-bullet]::before{content:attr(data-ak-bullet)}",document.head.append(e)}export function paragraphStyle(e,t){const i=t[e.level]??t[0];if(!i)throw new Error("A text style has nine levels.");return{...i,...e.alignment===void 0?{}:{alignment:e.alignment},...e.line_spacing===void 0?{}:{line_spacing:e.line_spacing},...e.space_before===void 0?{}:{space_before:e.space_before},...e.space_after===void 0?{}:{space_after:e.space_after},...e.margin_left===void 0?{}:{margin_left:e.margin_left},...e.indent===void 0?{}:{indent:e.indent},...e.numbered===void 0?{}:{numbered:e.numbered},font:{...i.font,...e.font}}}export function numberText(e,t){const i=o=>(o>26?i(Math.floor((o-1)/26)):"")+String.fromCharCode(97+(o-1)%26),r=o=>{const n=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]];let s="",a=o;for(const[c,d]of n)for(;a>=c;)s+=d,a-=c;return s};return e==="arabicParenR"?`${String(t)})`:e==="alphaLcPeriod"?`${i(t)}.`:e==="alphaUcPeriod"?`${i(t).toUpperCase()}.`:e==="romanLcPeriod"?`${r(t)}.`:e==="romanUcPeriod"?`${r(t).toUpperCase()}.`:`${String(t)}.`}export function paragraphLabels(e,t){const i=[];return e.map(r=>{const o=paragraphStyle(r,t);i.length=r.level+1,o.numbered===void 0?i[r.level]=0:i[r.level]=(i[r.level]??0)+1;const n=r.runs.some(s=>s.text!==""&&s.text!=="\v");return o.numbered===void 0?n?o.bullet?.char:void 0:numberText(o.numbered,i[r.level]??1)})}export function paragraphElement(e,t,i,r,o,n){const s=paragraphStyle(e,i),a=document.createElement("div");a.dataset.akParagraph=String(t),a.dataset.akLevel=String(e.level);const c=e.runs.map(l=>l.font?.size??s.font.size),d=(c.length>0?Math.max(...c):s.font.size)*o,u="lines"in s.line_spacing?String(s.line_spacing.lines*SINGLE_SPACING):h(s.line_spacing.fixed*o),f=s.numbered===void 0&&r!==void 0;if(Object.assign(a.style,{position:"relative",textAlign:K[s.alignment],paddingLeft:`${String(s.margin_left*o)}px`,textIndent:f?"0px":`${String(s.indent*o)}px`,marginTop:t===0?"0px":h(s.space_before*o),marginBottom:h(s.space_after*o),lineHeight:u,fontSize:h(d),minHeight:"lines"in s.line_spacing?h(d*s.line_spacing.lines*SINGLE_SPACING):u}),M(a,s.font,o,n),a.style.fontSize=h(d),r!==void 0){Y();const l=document.createElement("span");l.dataset.akBullet=r;const m=s.numbered===void 0?s.bullet?.font:void 0;Object.assign(l.style,{position:"absolute",left:`${String((s.margin_left+s.indent)*o)}px`,...m===void 0?{}:{fontFamily:O(m)}}),a.append(l)}return a}export const exactSpacing=(e,t)=>!("lines"in paragraphStyle(e,t).line_spacing);export function runElement(e,t,i,r=!1,o){const n=document.createElement("span");M(n,e.font,t,i);const s=e.text===void 0?o:W(e.text,o);return s!==void 0&&s!==o&&(n.lang=s),r&&(n.style.lineHeight="0"),e.font?.link!==void 0&&(n.dataset.akLink=e.font.link),n}export function eastAsianFace(e,t){return`var(--ak-theme-${(e.font?.name??t)==="+mj-lt"?"major":"minor"}-ea)`}function Q(e,t,i,r,o){const n=isCjk(r);e.replaceChildren();const s=t.paragraphs.length>0?t.paragraphs:[{runs:[],level:0}],a=paragraphLabels(s,t.style.levels);s.forEach((c,d)=>{const u=paragraphElement(c,d,t.style.levels,a[d],i,o),f=paragraphStyle(c,t.style.levels).font.name,l=exactSpacing(c,t.style.levels);for(const m of c.runs){const g=runElement(m,i,o,l,r),b=eastAsianFace(m,f);for(const p of eastAsianRuns(m.text.replaceAll("\v",`
|
|
3
|
+
`),n)){if(!p.ea){g.append(p.text);continue}const S=document.createElement("span");S.style.fontFamily=b,S.textContent=p.text,g.append(S)}u.append(g)}e.append(u)})}export const isCjk=e=>e!==void 0&&/^(zh|ja|ko)(-|$)/iu.test(e);function v(e,t,i,r,o){const{style:n}=e,s=n.auto_size==="shape",a=document.createElement("div");a.dataset.akText="",a.dataset.akAutofit=n.auto_size;const c=s?void 0:o;Object.assign(a.style,{position:s?"relative":"absolute",inset:s?"auto":c?`${String(c.top)}px calc(100% - ${String(c.right)}px) calc(100% - ${String(c.bottom)}px) ${String(c.left)}px`:"0px",minHeight:c?`${String(c.bottom-c.top)}px`:"100%",display:"flex",flexDirection:"column",justifyContent:q[n.vertical_anchor],padding:`${String(n.margins.top*t)}px ${String(n.margins.right*t)}px ${String(n.margins.bottom*t)}px ${String(n.margins.left*t)}px`,whiteSpace:n.word_wrap?"pre-wrap":"pre",overflowWrap:"break-word",boxSizing:"border-box"});const d=document.createElement("div");if(d.dataset.akBody="",a.append(d),Q(d,e,t,i,r),!n.word_wrap){Object.assign(d.style,{display:"flex",flexDirection:"column"});for(const u of d.children){if(!(u instanceof HTMLElement))continue;const f=u.style.textAlign;Object.assign(u.style,{width:"max-content",minWidth:"100%",boxSizing:"border-box",alignSelf:f==="center"?"center":f==="right"?"flex-end":"flex-start"})}}return i!==void 0&&(a.lang=i),isCjk(i)&&(a.dataset.akCjk=""),a}export function fitText(e){const t=e.querySelector("[data-ak-body]");if(!t||e.dataset.akAutofit!=="text")return 1;const i=e.clientHeight-parseFloat(getComputedStyle(e).paddingTop)-parseFloat(getComputedStyle(e).paddingBottom),r=s=>(e.style.setProperty("--ak-fit",String(s)),t.scrollHeight<=i+.5);if(r(1))return delete e.dataset.akFontScale,1;let o=MIN_FONT_SCALE,n=1;if(!r(o))return e.dataset.akFontScale=o.toFixed(2),o;for(;n-o>.01;){const s=(o+n)/2;r(s)?o=s:n=s}return r(o),e.dataset.akFontScale=o.toFixed(2),o}function k(e,t,i,r){const o=e.split(" "),n=[],s=a=>{const c=Number(o[a]),d=Number(o[a+1]);return[r?.h?t-c:c,r?.v?i-d:d]};for(let a=0;a<o.length;){const c=o[a++];c==="M"||c==="L"?(n.push({op:c,at:[s(a)]}),a+=2):c==="C"?(n.push({op:c,at:[s(a),s(a+2),s(a+4)]}),a+=6):c==="Z"&&n.push({op:c})}return n}const E=e=>e.map(t=>t.op==="Z"?"Z":`${t.op}${t.at.map(([i,r])=>`${String(i)} ${String(r)}`).join(" ")}`).join(" ");function X(e,t){const i=e.flatMap(n=>n.op==="Z"?[]:n.at),r=t?[...i].reverse():i,o=r[0];if(o)for(const n of r.slice(1)){const s=Math.hypot(o[0]-n[0],o[1]-n[1]);if(s>1e-6)return{at:o,out:[(o[0]-n[0])/s,(o[1]-n[1])/s]}}}function tt(e,t,i,r){const o=e.filter(a=>a.op!=="Z"),n=t?o[o.length-1]:o[0];if(!n)return;const s=t?n.at.slice(n.op==="C"?-2:-1):[...n.at,...o[1]?.op==="C"?o[1].at.slice(0,1):[]];for(const a of s)a[0]+=i,a[1]+=r}function et(e,t,i,r,o){if(t.line===null)return;const n=t.frame.width*i,s=t.frame.height*i,a=(C(t.geometry??"line",n,s,t.adjustments)?.paths??[]).filter(g=>g.stroke).map(g=>k(g.d,n,s,t.flip)),c=a[0],d=a[a.length-1];if(!c||!d)return;const u="http://www.w3.org/2000/svg",f=document.createElementNS(u,"svg");f.setAttribute("width",String(Math.max(n,1))),f.setAttribute("height",String(Math.max(s,1))),Object.assign(f.style,{position:"absolute",left:"0px",top:"0px",overflow:"visible"});const l=colorCss(t.line??B.line,o),m=L(t,c,d,r,i,l);for(const g of a){const b=document.createElementNS(u,"path");b.setAttribute("d",E(g)),b.setAttribute("fill","none"),b.setAttribute("stroke",l),b.setAttribute("stroke-width",String(r));const p=F(t.line_dash,r);p&&b.setAttribute("stroke-dasharray",p),f.append(b)}f.append(...m),e.append(f)}const nt={sysDash:[3,1],sysDot:[1,1],dash:[4,3],dashDot:[4,3,1,3],lgDash:[8,3],lgDashDot:[8,3,1,3],lgDashDotDot:[8,3,1,3,1,3]},F=(e,t)=>e&&nt[e]?.map(i=>String(i*t)).join(" "),it=25200,N={sm:2,med:3,lg:5};function L(e,t,i,r,o,n,s={begin:!0,end:!0}){const a=Math.max(r,it*o),c=[];for(const[d,u,f,l,m]of[[e.line_begin,e.line_begin_size,t,!1,s.begin],[e.line_end,e.line_end_size,i,!0,s.end]]){if(!m||d===void 0||d==="none")continue;const g=X(f,l);if(!g)continue;const b=d==="arrow"?.5:0,p=a*(N[u?.len??"med"]+b),S=a*(N[u?.w??"med"]+b);c.push(ot(d,g.at,g.out,p,S,r,n)),d!=="arrow"&&tt(f,l,-g.out[0]*p/2,-g.out[1]*p/2)}return c}function ot(e,[t,i],[r,o],n,s,a,c){const d="http://www.w3.org/2000/svg",u=(g,b)=>`${String(t-r*g-o*b)},${String(i-o*g+r*b)}`;if(e==="oval"){const g=document.createElementNS(d,"ellipse");return g.setAttribute("cx",String(t)),g.setAttribute("cy",String(i)),g.setAttribute("rx",String(n/2)),g.setAttribute("ry",String(s/2)),g.setAttribute("transform",`rotate(${String(Math.atan2(o,r)*180/Math.PI)} ${String(t)} ${String(i)})`),g.setAttribute("fill",c),g}const f=e==="arrow",l=document.createElementNS(d,f?"polyline":"polygon"),m={triangle:[u(0,0),u(n,s/2),u(n,-s/2)],stealth:[u(0,0),u(n,s/2),u(n*.7,0),u(n,-s/2)],diamond:[u(-n/2,0),u(0,s/2),u(n/2,0),u(0,-s/2)],arrow:[u(n,s/2),u(0,0),u(n,-s/2)]}[e];return l.setAttribute("points",m.join(" ")),f?(l.setAttribute("fill","none"),l.setAttribute("stroke",c),l.setAttribute("stroke-width",String(a))):l.setAttribute("fill",c),l}function rt(e,t,i,r,o,n){const s=t.frame.width*r,a=t.frame.height*r,c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg");d.setAttribute("width",String(Math.max(s,1))),d.setAttribute("height",String(Math.max(a,1))),Object.assign(d.style,{position:"absolute",left:"0px",top:"0px",overflow:"visible"}),z(d,t);let u=colorCss(t.fill,n);if(t.gradient){const p=`ak-gradient-${String(ct++)}`;d.append(dt(c,p,t.gradient,t.frame,n)),u=`url(#${p})`}const f=i.map(p=>p.d),l=[],m=i.flatMap((p,S)=>p.stroke?[S]:[]),g=m[0],b=m[m.length-1];if(t.line!==void 0&&t.line!==null&&g!==void 0&&b!==void 0&&((t.line_begin??"none")!=="none"||(t.line_end??"none")!=="none")){const p=k(f[g]??"",s,a,void 0),S=g===b?p:k(f[b]??"",s,a,void 0),x=$=>$.at(-1)?.op!=="Z";l.push(...L(t,p,S,o,r,colorCss(t.line,n),{begin:x(p),end:x(S)})),f[g]=E(p),f[b]=E(S)}i.forEach((p,S)=>{const x=document.createElementNS(c,"path");if(x.setAttribute("d",f[S]??p.d),x.setAttribute("fill-rule","evenodd"),x.setAttribute("fill",p.fill==="none"||t.fill===null||t.fill===void 0?p.fill==="none"||!t.gradient?"none":u:p.fill==="norm"?u:st[p.fill](colorCss(t.fill,n))),t.fill_transparency!==void 0&&x.setAttribute("fill-opacity",String(1-t.fill_transparency)),p.stroke&&t.line!==void 0&&t.line!==null){x.setAttribute("stroke",colorCss(t.line,n)),x.setAttribute("stroke-width",String(o)),x.setAttribute("stroke-linejoin","round");const $=F(t.line_dash,o);$&&x.setAttribute("stroke-dasharray",$)}d.append(x)}),d.append(...l),e.append(d)}const st={darken:e=>`color-mix(in srgb, ${e} 60%, black)`,darkenLess:e=>`color-mix(in srgb, ${e} 80%, black)`,lighten:e=>`color-mix(in srgb, ${e} 60%, white)`,lightenLess:e=>`color-mix(in srgb, ${e} 80%, white)`};function lt(e,t){const i=e.path;if(!i)return[];const r=i.w===0?0:e.frame.width*t/i.w,o=i.h===0?0:e.frame.height*t/i.h;return[{d:i.steps.map(s=>s.op==="close"?"Z":s.op==="move"?`M ${String(s.x*r)} ${String(s.y*o)}`:s.op==="line"?`L ${String(s.x*r)} ${String(s.y*o)}`:`C ${String(s.x1*r)} ${String(s.y1*o)} ${String(s.x2*r)} ${String(s.y2*o)} ${String(s.x*r)} ${String(s.y*o)}`).join(" "),fill:"norm",stroke:!0}]}function z(e,t){!t.flip?.h&&!t.flip?.v||(e.style.transform=`scale(${t.flip.h?"-1":"1"}, ${t.flip.v?"-1":"1"})`)}const at=new Set(["rect","roundRect","ellipse"]),j=(e,t,i)=>t===void 0||t===0?colorCss(e,i):`color-mix(in srgb, ${colorCss(e,i)} ${String((1-t)*100)}%, transparent)`,D=(e,t)=>`linear-gradient(${String(e.angle+90)}deg, ${e.stops.map(i=>`${j(i.color,i.transparency,t)} ${String(i.at*100)}%`).join(", ")})`,T=(e,t)=>e.gradient?D(e.gradient,t):e.fill===null||e.fill===void 0?"transparent":j(e.fill,e.fill_transparency,t);let ct=0;function dt(e,t,i,r,o){const n=document.createElementNS(e,"linearGradient");n.id=t;const s=i.angle*Math.PI/180,a=Math.cos(s),c=Math.sin(s),d=(Math.abs(r.width*a)+Math.abs(r.height*c))/Math.max(r.width,r.height,1)/2;n.setAttribute("x1",String(.5-a*d)),n.setAttribute("y1",String(.5-c*d)),n.setAttribute("x2",String(.5+a*d)),n.setAttribute("y2",String(.5+c*d));for(const u of i.stops){const f=document.createElementNS(e,"stop");f.setAttribute("offset",String(u.at)),f.setAttribute("stop-color",colorCss(u.color,o)),u.transparency!==void 0&&f.setAttribute("stop-opacity",String(1-u.transparency)),n.append(f)}return n}function ut(e,t,i,r){const o=t.angle*Math.PI/180,n=t.distance*i;e.style.filter=`drop-shadow(${String(n*Math.cos(o))}px ${String(n*Math.sin(o))}px ${String(t.blur*i)}px ${j(t.color,t.transparency,r)})`}function ft(e,t,i){const r=t.geometry??"rect",o=t.frame.width*i,n=t.frame.height*i;r==="roundRect"?e.style.borderRadius=`${String(Math.min(o,n)*Math.min(.5,Math.max(0,t.adjustments?.[0]??R("roundRect")[0]??0)))}px`:r==="ellipse"&&(e.style.borderRadius="50%")}const gt={left:"borderLeft",right:"borderRight",top:"borderTop",bottom:"borderBottom"},H="http://www.w3.org/2000/svg";function mt(e,t,i,r,o){const n=i.width/w,s=i.height/w,a=r*w,c=I(t,n,s),d=document.createElementNS(H,"svg");d.setAttribute("viewBox",`0 0 ${String(n)} ${String(s)}`),d.setAttribute("width","100%"),d.setAttribute("height","100%"),Object.assign(d.style,{position:"absolute",inset:"0px",overflow:"visible"});const u=(l,m)=>{const g=document.createElementNS(H,l);for(const[b,p]of Object.entries(m))g.setAttribute(b,String(p));d.append(g)},f=l=>{u("path",{d:l.d,fill:l.fill===void 0?"none":colorCss(l.fill,o),stroke:l.width>0?colorCss(l.color,o):"none","stroke-width":l.width,"stroke-linejoin":"round"})};for(const l of[...c.grid,...c.shapes])f(l);for(const l of[...c.boxes,...c.keys])u("rect",{x:l.x,y:l.y,width:l.width,height:l.height,fill:colorCss(l.color,o)});for(const l of[...c.axes,...c.lines])f(l);for(const l of c.dots)u("circle",{cx:l.x,cy:l.y,r:l.r,fill:colorCss(l.color,o)});e.append(d);for(const l of c.words){const m=document.createElement("div");m.textContent=l.text,Object.assign(m.style,{position:"absolute",left:`${String(l.x*a)}px`,top:`${String(l.y*a)}px`,transform:`translate(${{start:"0",middle:"-50%",end:"-100%"}[l.anchor]}, -50%)`,fontSize:`${String(l.size*a)}px`,lineHeight:"1",whiteSpace:"nowrap",color:colorCss(l.color,o),fontFamily:"var(--ak-theme-minor)"}),e.append(m)}}function pt(e,t,i,r,o){const n=document.createElement("table");Object.assign(n.style,{borderCollapse:"collapse",tableLayout:"fixed",width:`${String(t.columns.reduce((a,c)=>a+c,0)*i)}px`});const s=document.createElement("colgroup");for(const a of t.columns){const c=document.createElement("col");c.style.width=`${String(a*i)}px`,s.append(c)}n.append(s);for(const[a,c]of t.rows.entries()){const d=document.createElement("tr");d.style.height=`${String(c.height*i)}px`;for(const[u,f]of c.cells.entries()){if(f.spanned)continue;const l=document.createElement("td");l.dataset.akCell=`${String(a)},${String(u)}`,f.span_width&&(l.colSpan=f.span_width),f.span_height&&(l.rowSpan=f.span_height),l.style.padding="0px",l.style.verticalAlign={t:"top",ctr:"middle",b:"bottom"}[f.text.style.vertical_anchor],f.fill!==void 0&&(l.style.background=colorCss(f.fill,o));for(const[g,b]of Object.entries(gt)){const p=f.borders?.[g];p&&(l.style[b]=`${String(p.width*i)}px solid ${colorCss(p.color,o)}`)}const m=v(f.text,i,r,o);m.style.minHeight="0px",l.append(m),d.append(l)}n.append(d)}e.style.height="auto",e.append(n)}export function drawShape(e,t,i){const{k:r,colors:o}=i;if(t.kind==="placeholder"&&t.text?.empty===!0&&!i.editing)return;const n=document.createElement("div");n.setAttribute(SHAPE_ATTR,`${e}/${t.name}`);const{left:s,top:a,width:c,height:d}=t.frame;Object.assign(n.style,{position:"absolute",left:`${String(s*r)}px`,top:`${String(a*r)}px`,width:`${String(c*r)}px`,height:`${String(d*r)}px`}),t.rotation!==void 0&&(n.style.transform=`rotate(${String(t.rotation)}deg)`);const u=(t.line_width??LINE_WIDTH)*r;if(t.chart)mt(n,t.chart,t.frame,r,o);else if(t.table)return pt(n,t.table,r,i.lang,o),n;t.shadow&&ut(n,t.shadow,r,o),t.alt!==void 0&&n.setAttribute("aria-label",t.alt);let f;if(t.kind==="autoshape"){if(!t.path&&Z(t.geometry))return et(n,t,r,u,o),n;const l=t.path?void 0:C(t.geometry??"rect",t.frame.width*r,t.frame.height*r,t.adjustments),m=t.line!==void 0&&t.line!==null&&t.line_dash!==void 0&&t.line_dash!=="solid",g=t.path?lt(t,r):at.has(t.geometry??"rect")&&!m?void 0:l?.paths;if(g)return rt(n,t,g,r,u,o),t.text&&n.append(v(t.text,r,i.lang,o,l?.text)),n;n.style.background=T(t,o),ft(n,t,r),f=l?.text}else(t.fill!==void 0||t.gradient)&&(n.style.background=T(t,o));if(t.line!==void 0&&t.line!==null&&(n.style.outline=`${String(u)}px ${t.line_dash===void 0||t.line_dash==="solid"?"solid":"dashed"} ${colorCss(t.line,o)}`,n.style.outlineOffset=`${String(-u/2)}px`),t.text?.style.auto_size==="shape"&&(n.style.height="auto",n.style.minHeight="0px"),t.kind==="picture"&&t.media){n.style.overflow="hidden";const l=document.createElement("img");l.alt=t.alt??"",l.src=i.url(t.media.path),z(l,t);const m=t.media.crop??{left:0,top:0,right:0,bottom:0},g=1-m.left-m.right,b=1-m.top-m.bottom;Object.assign(l.style,{position:"absolute",width:`${String(100/g)}%`,height:`${String(100/b)}%`,left:`${String(-m.left/g*100)}%`,top:`${String(-m.top/b*100)}%`,maxWidth:"none"}),t.flip&&(l.style.transformOrigin=`${String(50/g-m.left/g*100)}% ${String(50/b-m.top/b*100)}%`),n.append(l)}else if(t.kind==="movie"&&t.media&&!i.playing&&i.poster!==!0)n.dataset.akFilm="";else if(t.kind==="movie"&&t.media){const l=document.createElement("video");l.src=i.url(t.media.path),l.muted=!0,l.playsInline=!0,l.preload="auto",t.media.poster!==void 0&&(l.currentTime=t.media.poster),Object.assign(l.style,{width:"100%",height:"100%",objectFit:"fill",...i.playing?{}:{pointerEvents:"none"}}),n.append(l)}return t.text&&n.append(v(t.text,r,i.lang,o,f)),n}export function slideBackgroundCss(e,t,i){return e.background_picture!==void 0?`${colorCss(e.background,t)} url(${JSON.stringify(i(e.background_picture))}) center / 100% 100% no-repeat`:e.background_gradient?D(e.background_gradient,t):colorCss(e.background,t)}export function drawSlide(e,t){const i=document.createElement("div");i.dataset.akSlide=e.id,Object.assign(i.style,{position:"absolute",inset:"0px",background:slideBackgroundCss(e,t.colors,t.url),overflow:"hidden"});for(const r of e.shapes){const o=drawShape(e.id,r,t);o&&i.append(o)}return i}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{consoleAt as
|
|
3
|
-
${$.stack??""}`)}const h=y.default;if(!St(h))throw new J("no_content",`The default export of ${i.file} is not a presentation({ … }) from @allyhub/sdk/slides.`);let w;try{w=L({phase:"build"},()=>xt(h))}catch(f){throw new J("load_failed",`The deck's code failed: ${f instanceof Error?f.message:String(f)}`)}for(const[f,$]of Object.entries(moduleComponents(y)))Object.hasOwn(w.components,f)||(w.components[f]=$);return w}export function moduleComponents(i){const y=i.components,h={};if(typeof y!="object"||y===null)return h;for(const[w,f]of Object.entries(y)){const $=At(w,f);$&&(h[w]=$)}return h}export async function deckCodeOf(i,y){const{log:h}=Ee(i,y,void 0,"slides"),w=await importDeck(i);return{code:L({phase:"build"},()=>_e(w,$=>h.readData($))),theme:lookTheme(i)}}export const lookTheme=i=>$t(i.looks?.clean??Le);export async function loadDeck(i,y,h){const w=Ee(i,y,void 0,"slides"),{log:f,ledger:$,guards:We}=w,[A,I]=i.format.split("x").map(Number);if(!(A>0&&I>0))throw new J("bad_format",`${i.piece} is drawn at ${i.format}: a deck's stage is WIDTHxHEIGHT pixels.`);const pe=await importDeck(i),U=i.kindData,fe=bt(U?.code)?U.code:L({phase:"build"},()=>_e(pe,e=>f.readData(e))),he=Et(i.piece),me=i.looks?.clean??Le,ze=i.file.split("/").slice(0,-1).join("/"),ue={file:U?.slidesFile??i.file},{deck:Ke}=kt({code:fe,file:U?.slides??{slides:[]},words:Lt(f),prefix:he,base:ze,theme:lookTheme(i),data:e=>f.readData(e)});let k=Ke;if(k.slides.length===0)throw new J("no_parts","The deck has no slides to draw (AK-K003).");const S=A/k.width;Object.assign(h.style,{position:"relative",width:`${String(A)}px`,height:`${String(I)}px`,overflow:"hidden"});const ge=()=>{for(const[e,t]of Object.entries({...Ct(me),...Dt(k.theme)}))h.style.setProperty(e,t)};ge(),h.replaceChildren();const Z=y.purpose==="play";y.purpose==="render"&&(document.documentElement.style.background="transparent",document.body.style.background="transparent");const ye=new Map,ee=e=>ye.get(e)??f.mediaAt(e),Ge=e=>ee(e)?.url??"",te=e=>Math.round(e*q)/q,Y=w.combo.lang,Je=(e,t,n)=>{const o=ut(e,t===0),{rests:s,comesOn:a,goesOff:d}=o,l=n+(s.at(-1)??0),g=e.shapes.flatMap(p=>p.kind!=="movie"||!p.media?[]:[{shape:p.name,from:a(p.name),poster:p.media.poster??0,length:ee(p.media.path)?.duration??0,rest:s.at(-1)??0}]),c=Math.max(l+1/q,...g.map(p=>n+p.from+p.length-p.poster)),m=[],r=[],M=new Map,u=[!1];for(const p of e.shapes){Ie(p)&&(M.set(p.name,u.length-1),u[u.length-1]=!0);const P=p.component&&Ie(p)?pe.components[p.component.name]:void 0;if(P){const v=L({phase:"build",part:e.id},()=>P.layers(p.component?.props??{},{width:p.frame.width*S,height:p.frame.height*S,slide:e.id}));for(const D of v)Ht(D)?m.push({shape:p.name,layer:D}):$.problems.push(Re("AK-M011",`Component ${P.name} on slide ${e.id} drew something that is not a graphic layer (custom(), a component): a footage layer is a movie shape on a slide.`,{part:e.id,where:ue}))}if(p.kind==="movie"&&p.media&&!Z&&ee(p.media.path)){const v=[p.frame.left*S,p.frame.top*S,p.frame.width*S,p.frame.height*S],D=te(a(p.name)),F=d(p.name);r.push({part:e.id,file:p.media.path,start:n+D,end:F===void 0?c:n+te(F),from:(p.media.poster??0)-((s.at(-1)??0)-D),speed:1,gainDb:0,audio:!1,fit:"cover",box:v,picture:v,over:u.length}),u.push(!1)}}for(;u.length>1&&u.at(-1)===!1;)u.pop();const _=u.length,le=te(l),Q=p=>m.filter(P=>P.shape===p).map(P=>P.layer.component);return{slide:e,sign:vt(k,e),clock:o,movies:g,footage:r,planeOf:M,planes:_,made:m,part:{key:e.id,layers:[...new Set(m.map(p=>p.layer.component))],start:n,end:c,planes:Array.from({length:_},(p,P)=>({layers:[{component:SLIDE_LAYER,start:n,end:c},...e.shapes.filter(v=>M.get(v.name)===P).flatMap(v=>Q(v.name)).map(v=>({component:v,start:n,end:c}))]})),still:le,...s.length>1?{steps:s.map(p=>Math.round((n+p)*q)/q)}:{},...Bt(e),...e.hidden?{hidden:!0}:{}}}},we=e=>{let t=0;return e.slides.map((n,o)=>{const s=Je(n,o,t);return t=s.part.end,s})};let b=we(k);const ne=b.at(-1)?.part.end??0,xe={fps:q,width:A,height:I,paper:`${String(k.width/Fe)}in ${String(k.height/Fe)}in`,duration:ne,background:k.theme.colors.lt1,parts:b.map(e=>e.part),cues:[],...b.some(e=>e.footage.length>0)?{footage:b.flatMap(e=>e.footage)}:{},audio:{}},C=new Map,oe=new Map;let H,W;const Ue=async e=>{const{slide:t,part:n}=e,o=jt(t,{k:S,url:Ge,editing:!1,playing:Z,...Y===void 0?{}:{lang:Y},colors:k.theme.colors});o.style.visibility="hidden",h.append(o);const s=Array.from({length:e.planes},()=>[]),a=[],d=[];for(const l of t.shapes){const g=o.querySelector(`[${N}="${CSS.escape(`${t.id}/${l.name}`)}"]`);if(g){s[e.planeOf.get(l.name)??0]?.push(g);for(const[c,{layer:m}]of e.made.filter(r=>r.shape===l.name).entries()){const r=document.createElement("div");Object.assign(r.style,{position:"absolute",inset:"0px"}),g.append(r);const M=stageContext({look:me,width:l.frame.width*S,height:l.frame.height*S,start:n.start,end:n.end,combo:w.combo,format:i.format,asset:u=>f.asset(u),wait:u=>d.push(u),report:u=>$.problems.push(Re(u.code,u.message,{part:t.id,where:ue}))});a.push({layer:m,el:r,ctx:M,props:m.props,from:e.clock.comesOn(l.name)}),L({phase:"mount",part:t.id,layer:m.component,index:c},()=>{m.mount(r,m.props,M)})}}}await rt(o),o.style.visibility="visible";for(const l of o.querySelectorAll("[data-ak-autofit='text']"))_t(l);return o.style.visibility="hidden",await Promise.all(d),{slide:t,slot:e,el:o,part:n,layers:a,targets:mt(e.clock.timed),lead:e.clock.lead,movies:e.movies,planes:s,pictures:pt(o)}},V=e=>{C.delete(e.slide.id);for(const[t,n]of e.layers.entries())L({phase:"mount",part:e.slide.id,layer:n.layer.component,index:t},()=>{n.layer.unmount?.(n.el,n.props,n.ctx)});e.el.remove(),H===e&&(H=void 0),W===e&&(W=void 0)},z=async e=>{const t=e.slide.id,n=C.get(t);if(n?.slot===e)return C.delete(t),C.set(t,n),n;n&&V(n);let o=oe.get(t);o||(o=Ue(e).finally(()=>oe.delete(t)),oe.set(t,o));const s=await o,a=ae(t);return a&&a!==e?(s.el.remove(),z(a)):(C.set(t,s),s)},se=()=>{for(const e of[...C.values()]){if(C.size<=SLIDES_KEPT)return;e!==H&&e!==W&&V(e)}},ae=e=>b.find(t=>t.slide.id===e),Ye=e=>{let t=0,n=b.length-1;for(;t<n;){const o=t+n>>1,s=b[o];s&&e<s.part.end-1e-6?n=o:t=o+1}return b[t]},Ve=e=>b.slice(0,b.indexOf(e)).reverse().find(t=>!t.slide.hidden),Se=new WeakMap,K=[],j=(e,t)=>{const n={...t};for(const o of Object.keys(t))n[o]=e.style[o];K.push(()=>{Object.assign(e.style,n)}),Object.assign(e.style,t)},ie=(e,t)=>e.el.querySelector(`[${N}="${CSS.escape(`${e.slide.id}/${t}`)}"]`);let be;const ke=(e,t)=>ie(e,t)?.querySelector("video")??void 0,re=new Set,Qe=(e,t)=>{const n=be;if(n&&n.m!==e){for(const s of n.m.movies)ke(n.m,s.shape)?.pause();re.clear()}const o=n?.m===e&&t>n.t&&t-n.t<qt;be={m:e,t};for(const s of e.movies){const a=ke(e,s.shape);if(!a)continue;const d=s.poster+Math.max(0,t-s.from);if(o&&t>=s.from&&d<s.length){Math.abs(a.currentTime-d)>Nt&&(a.currentTime=d),a.paused&&Rt(a);continue}a.pause(),o&&d>=s.length&&re.add(s.shape);const l=re.has(s.shape)?s.length:Math.max(0,s.poster-(s.rest-t));Math.abs(a.currentTime-l)>1/q&&(a.currentTime=l)}},Xe=(e,t)=>{const n=e.slide.transition;if(!n||!De(t,e.lead))return;const o=W;if(!o)return;ve(o,o.part.still-o.part.start),o.el.style.visibility="visible";const s=Math.min(1,t/e.lead);if(n.type!=="morph"){const c=wt(n,s),m=(M,u)=>`translate(${String(M*100)}%, ${String(u*100)}%)`,r=c.incoming.clip;j(e.el,{opacity:String(c.incoming.opacity),transform:m(c.incoming.x,c.incoming.y),...r?{clipPath:`inset(${String(r.top*100)}% ${String(r.right*100)}% ${String(r.bottom*100)}% ${String(r.left*100)}%)`}:{}}),j(o.el,{transform:m(c.outgoing.x,c.outgoing.y)});return}const a=new Map(o.slide.shapes.map(c=>[c.name,c]));j(e.el,{background:`color-mix(in srgb, ${getComputedStyle(e.el).backgroundColor} ${String(s*100)}%, transparent)`});const d=(c,m,r)=>{j(c,{left:`${String(r.left*S)}px`,top:`${String(r.top*S)}px`,width:`${String(r.width*S)}px`,height:`${String(r.height*S)}px`});const M=m.width>0?r.width/m.width:1,u=m.height>0?r.height/m.height:1;for(const _ of c.querySelectorAll(":scope > svg:not([viewBox])"))j(_,{transformOrigin:"0 0",transform:`scale(${String(M)}, ${String(u)})`})},l=c=>JSON.stringify({...c,frame:void 0,sources:void 0}),g=new Map;for(const c of e.slide.shapes){const m=ie(e,c.name);if(!m)continue;const r=a.get(c.name);if(!r){j(m,{opacity:String(s)});continue}const M=yt(r.frame,c.frame,s),u=l(r)===l(c);g.set(c.name,{frame:M,same:u}),d(m,c.frame,M),u||j(m,{opacity:String(s)})}for(const c of o.slide.shapes){const m=ie(o,c.name);if(!m)continue;const r=g.get(c.name);r?r.same?j(m,{visibility:"hidden"}):(d(m,c.frame,r.frame),j(m,{opacity:String(1-s)})):j(m,{opacity:String(1-s)})}},ve=(e,t)=>{for(const n of e.targets){const o=e.slide.shapes.find(m=>m.name===n.shape),s=e.el.querySelector(`[${N}="${CSS.escape(`${e.slide.id}/${n.shape}`)}"]`);if(!o||!s)continue;const a=n.paragraph===void 0?s:s.querySelector(`[data-ak-paragraph="${String(n.paragraph)}"]`);if(!a)continue;const d=Se.get(a)??{transform:a.style.transform,clipPath:a.style.clipPath};Se.set(a,d);const l=gt(n.animations,t,o.frame,{width:k.width,height:k.height});a.style.visibility=l.hidden?"hidden":"",a.style.opacity=l.opacity===1?"":String(l.opacity);const g=l.x!==0||l.y!==0?`translate(${String(l.x*S)}px, ${String(l.y*S)}px)`:"",c=l.scale===1?"":`scale(${String(l.scale)})`;a.style.transform=[g,c,d.transform].filter(m=>m!=="").join(" "),a.style.clipPath=l.clip?`inset(${String(l.clip.top*100)}% ${String(l.clip.right*100)}% ${String(l.clip.bottom*100)}% ${String(l.clip.left*100)}%)`:d.clipPath}},Ze=(e,t)=>{if(t>0){const n=e.el.style.background;e.el.style.background="none",K.push(()=>{e.el.style.background=n})}for(const[n,o]of e.planes.entries())for(const s of n===t?[]:o){const a=s.style.visibility;s.style.visibility="hidden",K.push(()=>{s.style.visibility=a})}};let G;const R=async(e,t)=>{G={t:e,plane:t};const n=Math.min(Math.max(0,e),ne-1/q),o=Ye(n);if(!o)return;const s=n-o.part.start,a=await z(o),d=o.slide.transition&&De(s,o.clock.lead)?Ve(o):void 0,l=d?await z(d):void 0;if(G.t===e){for(const g of C.values())g.el.style.visibility=g===a?"visible":"hidden";for(H=a,W=l,We.setMoment(n,`${w.seedBase}:${a.slide.id}`);K.length>0;)K.pop()?.();ve(a,s),Xe(a,s),Qe(a,s);for(const[g,c]of a.layers.entries())L({phase:"render",part:a.slide.id,layer:c.layer.component,index:g,t:s},()=>{c.layer.render(c.el,Math.max(0,s-c.from),c.props,c.ctx)});if(t!==void 0&&Ze(a,t),await Promise.all([a.pictures(de*1e3),...l?[l.pictures(de*1e3)]:[]]),se(),Z){const g=b[b.indexOf(o)+1];g&&!C.has(g.slide.id)&&z(g).then(se,()=>{})}}},ce=()=>H,$e=async e=>{await R(e);const t=ce(),n=h.getBoundingClientRect(),o=n.width>0?A/n.width:1;return{m:t,blocks:t?je(t.el,h,A):[],scale:o}},et=()=>{const e=new Map,t=new Map,n=(d,l)=>{e.has(X(d))||e.set(X(d),l),t.set(X(d),(t.get(X(d))??new Set).add(d))},o=k.theme.fonts;for(const d of[o.major,o.minor,o.major_east_asian,o.minor_east_asian])n(d,"theme");for(const d of k.slides)for(const l of d.shapes){const g=[...l.text?.style.levels.map(c=>c.font.name)??[],...l.text?.paragraphs.flatMap(c=>[c.font?.name,...c.runs.map(m=>m.font?.name)])??[]];for(const c of g)c!==void 0&&!c.startsWith("+")&&n(c,"text")}const s=new Set(lt().map(d=>d.family)),a=d=>{const l=it(d)[0]??d;return s.has(l)||ct(l)};return[...e].map(([d,l])=>({name:d,where:l,drawn:[...t.get(d)??[]].some(a)}))},tt=e=>{const t=e.text?.paragraphs[0],n=t?.alignment??e.text?.style.levels[t?.level??0]?.alignment;return n===void 0?{}:{align:n}},nt=(e,t)=>{const n=h.getBoundingClientRect(),o=n.width>0?A/n.width:1,s=[],a=[],d=[],l=[],g=[],c=[],m=S*qe;return e.slide.shapes.forEach((r,M)=>{const u=e.el.querySelector(`[${N}="${CSS.escape(`${e.slide.id}/${r.name}`)}"]`);if(!u)return;const _=u.getBoundingClientRect(),le=[Math.round((_.left-n.left)*o),Math.round((_.top-n.top)*o),Math.round(_.width*o),Math.round(_.height*o)],Q=getComputedStyle(u).visibility==="hidden",p=je(u,h,A).filter(x=>x.ink!==null&&x.runs.some(O=>getComputedStyle(O.el).visibility!=="hidden")),P=p.map(x=>Ft([...new Set(x.runs.map(O=>O.el))],h,A));p.forEach((x,O)=>{const E=P[O]??[],T=He(E);T&&(s.push({layer:r.name,z:"front",text:x.text,box:T,...x.opacity<1?{opacity:x.opacity}:{}}),a.push(M),d.push(x.containers),l.push(T),g.push(E))});const v={name:r.name,kind:Ne(r.geometry)?"line":r.kind,level:r.level,...r.placeholder?{placeholder:r.placeholder.type}:{},frame:[Math.round(r.frame.left*S),Math.round(r.frame.top*S),Math.round(r.frame.width*S),Math.round(r.frame.height*S)],box:le,...Q?{hidden:Q}:{},opaque:r.kind==="picture"||r.kind==="movie"||!Ne(r.geometry)&&r.fill!==void 0&&r.fill!==null};if(r.chart){const x=r.chart.series.flatMap(O=>O.values.filter(E=>E!==null));v.chart={type:r.chart.type,categories:r.chart.categories.length,series:r.chart.series.length,...x.length>0?{low:Math.min(...x),high:Math.max(...x)}:{},...r.chart.source===void 0?{}:{source:r.chart.source}}}if(r.table){const x=[...u.querySelectorAll("tr")];v.rows=r.table.rows.map((O,E)=>({set:Math.round(O.height*S),drawn:Math.round((x[E]?.getBoundingClientRect().height??0)*o)}))}const D=P.flat();if(D.length>0){const x=new Map;for(const T of p)for(const ot of T.runs){const Oe=getComputedStyle(ot.el),Ae=Math.round(parseFloat(Oe.fontSize)/m*10)/10,Ce=parseInt(Oe.fontWeight,10)||400,Pe=`${String(Ae)}/${String(Ce)}`;x.has(Pe)||x.set(Pe,{size:Ae,weight:Ce,...T.xHeight===void 0?{}:{xHeight:Math.round(T.xHeight/m*10)/10}})}const O=p.map(T=>T.text).join(`
|
|
4
|
-
`),
|
|
5
|
-
`)]:[])})),reads:()=>f.reads(
|
|
6
|
-
`)),owners:[...new Set(n.made.map(s=>s.layer.component))]}},ask:()=>Promise.resolve([]),play:(e,t)=>
|
|
2
|
+
import{consoleAt as W,consoleAtAsync as it}from"@allyhub/piece/page";import{inkOfBlock as rt}from"@allyhub/image-draw/contrast";import{createEnv as Ne}from"@allyhub/image-draw/env";import{LoadFailure as ae}from"@allyhub/image-draw/errors";import{families as ct,loadTextFonts as lt,localFamily as dt,pageFaces as pt}from"@allyhub/image-draw/fonts";import{realTimers as ft}from"@allyhub/image-draw/guards";import{domHash as Re}from"@allyhub/image-draw/hash";import{textBlocks as Le}from"@allyhub/image-draw/inspect";import{pictureWaiter as ht}from"@allyhub/image-draw/pictures";import{answerFilm as mt,playFilm as ut}from"@allyhub/runtime/stage";import{animationTargets as gt,clockOf as yt,DECK_FPS as N,deckCode as Be,drawnAt as wt,morphFrame as xt,inTransition as He,transitionAt as St,EMU_PER_INCH as Ie,EMU_PER_PT as We,evaluateDeck as bt,fontFace as fe,connectorEnds as kt,isConnectorGeometry as Me,isDeck as vt,isDeckCode as Mt,resolveDeck as $t,slideSign as Ot,themeOfLook as At}from"@allyhub/slides-core";import{problem as ze}from"@allyhub/diagnostics";import{CLEAN_LOOK as Ke,LAYER_BRAND as Ct,SEEK_LIMIT as $e,countWords as Et,framedComponent as Pt,lookCss as _t,measureMoment as Tt,messagePrefix as jt}from"@allyhub/piece";import{filmSummary as Dt}from"@allyhub/video-core";import{drawSlide as Ft,fitText as qt,SHAPE_ATTR as R,themeCss as Nt}from"./draw.js";import{inkLines as Ge,union as Oe}from"./ink.js";export const SLIDE_LAYER="slide",SLIDES_KEPT=5;const Rt=.5,Lt=.3,Je={top:0,bottom:0,left:0,right:0};async function Bt(i){i.muted=!1,await i.play().catch(async()=>{i.muted=!0,await i.play().catch(()=>{})})}function Ht(i){const g=d=>{if(i.peek(d)!==void 0)return i.s(d);const y=[...new Set(i.keysUnder(d).map(f=>f.slice(d.length+1).split(".")[0]).filter(f=>f!==void 0&&/^\d+$/u.test(f)))].sort((f,M)=>Number(f)-Number(M));if(y.length!==0)return y.map(f=>g(`${d}.${f}`)).filter(f=>f!==void 0)};return g}const Ue=i=>!(i.kind==="placeholder"&&i.text?.empty===!0),It=i=>typeof i=="object"&&i!==null&&i[Ct]==="graphic";export async function loadStyles(i){for(const g of i.styles??[]){const d=document.createElement("link");d.rel="stylesheet",d.href=g;const y=new Promise(f=>{d.onload=f,d.onerror=f});document.head.append(d),await y}}export async function importDeck(i){await loadStyles(i);let g;try{g=await it({phase:"module"},()=>import(i.module))}catch(f){const M=f instanceof Error?f:new Error(String(f));throw new ae("load_failed",`Failed to load the deck's module: ${M.message}
|
|
3
|
+
${M.stack??""}`)}const d=g.default;if(!vt(d))throw new ae("no_content",`The default export of ${i.file} is not a presentation({ … }) from @allyhub/sdk/slides.`);let y;try{y=W({phase:"build"},()=>bt(d))}catch(f){throw new ae("load_failed",`The deck's code failed: ${f instanceof Error?f.message:String(f)}`)}for(const[f,M]of Object.entries(moduleComponents(g)))Object.hasOwn(y.components,f)||(y.components[f]=M);return y}export function moduleComponents(i){const g=i.components,d={};if(typeof g!="object"||g===null)return d;for(const[y,f]of Object.entries(g)){const M=Pt(y,f);M&&(d[y]=M)}return d}export async function deckCodeOf(i,g){const{log:d}=Ne(i,g,void 0,"slides"),y=await importDeck(i);return{code:W({phase:"build"},()=>Be(y,M=>d.readData(M))),theme:lookTheme(i)}}export const lookTheme=i=>At(i.looks?.clean??Ke);export async function loadDeck(i,g,d){const y=Ne(i,g,void 0,"slides"),{log:f,ledger:M,guards:j}=y,[v,C]=i.format.split("x").map(Number);if(!(v>0&&C>0))throw new ae("bad_format",`${i.piece} is drawn at ${i.format}: a deck's stage is WIDTHxHEIGHT pixels.`);const Y=await importDeck(i),L=i.kindData,B=Mt(L?.code)?L.code:W({phase:"build"},()=>Be(Y,e=>f.readData(e))),H=jt(i.piece),V=i.looks?.clean??Ke,Q=i.file.split("/").slice(0,-1).join("/"),ie={file:L?.slidesFile??i.file},{deck:X}=$t({code:B,file:L?.slides??{slides:[]},words:Ht(f),prefix:H,base:Q,theme:lookTheme(i),data:e=>f.readData(e)});let x=X;if(x.slides.length===0)throw new ae("no_parts","The deck has no slides to draw (AK-K003).");const w=v/x.width;Object.assign(d.style,{position:"relative",width:`${String(v)}px`,height:`${String(C)}px`,overflow:"hidden"});const Z=()=>{for(const[e,t]of Object.entries({..._t(V),...Nt(x.theme)}))d.style.setProperty(e,t)};Z(),d.replaceChildren();const he=g.purpose==="play";g.purpose==="render"&&(document.documentElement.style.background="transparent",document.body.style.background="transparent");const Ae=new Map,me=e=>Ae.get(e)??f.mediaAt(e),Ye=e=>me(e)?.url??"",ue=e=>Math.round(e*N)/N,re=y.combo.lang,Ve=(e,t,n)=>{const o=yt(e,t===0),{rests:s,comesOn:a,goesOff:p}=o,l=n+(s.at(-1)??0),S=e.shapes.flatMap(h=>h.kind!=="movie"||!h.media?[]:[{shape:h.name,from:a(h.name),poster:h.media.poster??0,length:me(h.media.path)?.duration??0,rest:s.at(-1)??0}]),c=Math.max(l+1/N,...S.map(h=>n+h.from+h.length-h.poster)),m=[],r=[],O=new Map,u=[!1];for(const h of e.shapes){Ue(h)&&(O.set(h.name,u.length-1),u[u.length-1]=!0);const _=h.component&&Ue(h)?Y.components[h.component.name]:void 0;if(_){const $=W({phase:"build",part:e.id},()=>_.layers(h.component?.props??{},{width:h.frame.width*w,height:h.frame.height*w,slide:e.id}));for(const q of $)It(q)?m.push({shape:h.name,layer:q}):M.problems.push(ze("AK-M011",`Component ${_.name} on slide ${e.id} drew something that is not a graphic layer (custom(), a component): a footage layer is a movie shape on a slide.`,{part:e.id,where:ie}))}if(h.kind==="movie"&&h.media&&!he&&me(h.media.path)){const $=[h.frame.left*w,h.frame.top*w,h.frame.width*w,h.frame.height*w],q=ue(a(h.name)),G=p(h.name);r.push({part:e.id,file:h.media.path,start:n+q,end:G===void 0?c:n+ue(G),from:(h.media.poster??0)-((s.at(-1)??0)-q),speed:1,gainDb:0,audio:!1,fit:"cover",box:$,picture:$,over:u.length}),u.push(!1)}}for(;u.length>1&&u.at(-1)===!1;)u.pop();const F=u.length,ve=ue(l),le=h=>m.filter(_=>_.shape===h).map(_=>_.layer.component);return{slide:e,sign:Ot(x,e),clock:o,movies:S,footage:r,planeOf:O,planes:F,made:m,part:{key:e.id,layers:[...new Set(m.map(h=>h.layer.component))],start:n,end:c,planes:Array.from({length:F},(h,_)=>({layers:[{component:SLIDE_LAYER,start:n,end:c},...e.shapes.filter($=>O.get($.name)===_).flatMap($=>le($.name)).map($=>({component:$,start:n,end:c}))]})),still:ve,...s.length>1?{steps:s.map(h=>Math.round((n+h)*N)/N)}:{},...Wt(e),...e.hidden?{hidden:!0}:{}}}},Ce=e=>{let t=0;return e.slides.map((n,o)=>{const s=Ve(n,o,t);return t=s.part.end,s})};let k=Ce(x);const ge=k.at(-1)?.part.end??0,Ee={fps:N,width:v,height:C,paper:`${String(x.width/Ie)}in ${String(x.height/Ie)}in`,duration:ge,background:x.theme.colors.lt1,parts:k.map(e=>e.part),cues:[],...k.some(e=>e.footage.length>0)?{footage:k.flatMap(e=>e.footage)}:{},audio:{}},P=new Map,ye=new Map;let z,ee;const Qe=async e=>{const{slide:t,part:n}=e,o=Ft(t,{k:w,url:Ye,editing:!1,playing:he,...re===void 0?{}:{lang:re},colors:x.theme.colors});o.style.visibility="hidden",d.append(o);const s=Array.from({length:e.planes},()=>[]),a=[],p=[];for(const l of t.shapes){const S=o.querySelector(`[${R}="${CSS.escape(`${t.id}/${l.name}`)}"]`);if(S){s[e.planeOf.get(l.name)??0]?.push(S);for(const[c,{layer:m}]of e.made.filter(r=>r.shape===l.name).entries()){const r=document.createElement("div");Object.assign(r.style,{position:"absolute",inset:"0px"}),S.append(r);const O=stageContext({look:V,width:l.frame.width*w,height:l.frame.height*w,start:n.start,end:n.end,combo:y.combo,format:i.format,asset:u=>f.asset(u),wait:u=>p.push(u),report:u=>M.problems.push(ze(u.code,u.message,{part:t.id,where:ie}))});a.push({layer:m,el:r,ctx:O,props:m.props,from:e.clock.comesOn(l.name)}),W({phase:"mount",part:t.id,layer:m.component,index:c},()=>{m.mount(r,m.props,O)})}}}await lt(o),o.style.visibility="visible";for(const l of o.querySelectorAll("[data-ak-autofit='text']"))qt(l);return o.style.visibility="hidden",await Promise.all(p),{slide:t,slot:e,el:o,part:n,layers:a,targets:gt(e.clock.timed),lead:e.clock.lead,movies:e.movies,planes:s,pictures:ht(o)}},ce=e=>{P.delete(e.slide.id);for(const[t,n]of e.layers.entries())W({phase:"mount",part:e.slide.id,layer:n.layer.component,index:t},()=>{n.layer.unmount?.(n.el,n.props,n.ctx)});e.el.remove(),z===e&&(z=void 0),ee===e&&(ee=void 0)},te=async e=>{const t=e.slide.id,n=P.get(t);if(n?.slot===e)return P.delete(t),P.set(t,n),n;n&&ce(n);let o=ye.get(t);o||(o=Qe(e).finally(()=>ye.delete(t)),ye.set(t,o));const s=await o,a=xe(t);return a&&a!==e?(s.el.remove(),te(a)):(P.set(t,s),s)},we=()=>{for(const e of[...P.values()]){if(P.size<=SLIDES_KEPT)return;e!==z&&e!==ee&&ce(e)}},xe=e=>k.find(t=>t.slide.id===e),Xe=e=>{let t=0,n=k.length-1;for(;t<n;){const o=t+n>>1,s=k[o];s&&e<s.part.end-1e-6?n=o:t=o+1}return k[t]},Ze=e=>k.slice(0,k.indexOf(e)).reverse().find(t=>!t.slide.hidden),Pe=new WeakMap,ne=[],D=(e,t)=>{const n={...t};for(const o of Object.keys(t))n[o]=e.style[o];ne.push(()=>{Object.assign(e.style,n)}),Object.assign(e.style,t)},Se=(e,t)=>e.el.querySelector(`[${R}="${CSS.escape(`${e.slide.id}/${t}`)}"]`);let _e;const Te=(e,t)=>Se(e,t)?.querySelector("video")??void 0,be=new Set,et=(e,t)=>{const n=_e;if(n&&n.m!==e){for(const s of n.m.movies)Te(n.m,s.shape)?.pause();be.clear()}const o=n?.m===e&&t>n.t&&t-n.t<Rt;_e={m:e,t};for(const s of e.movies){const a=Te(e,s.shape);if(!a)continue;const p=s.poster+Math.max(0,t-s.from);if(o&&t>=s.from&&p<s.length){Math.abs(a.currentTime-p)>Lt&&(a.currentTime=p),a.paused&&Bt(a);continue}a.pause(),o&&p>=s.length&&be.add(s.shape);const l=be.has(s.shape)?s.length:Math.max(0,s.poster-(s.rest-t));Math.abs(a.currentTime-l)>1/N&&(a.currentTime=l)}},tt=(e,t)=>{const n=e.slide.transition;if(!n||!He(t,e.lead))return;const o=ee;if(!o)return;je(o,o.part.still-o.part.start),o.el.style.visibility="visible";const s=Math.min(1,t/e.lead);if(n.type!=="morph"){const c=St(n,s),m=(O,u)=>`translate(${String(O*100)}%, ${String(u*100)}%)`,r=c.incoming.clip;D(e.el,{opacity:String(c.incoming.opacity),transform:m(c.incoming.x,c.incoming.y),...r?{clipPath:`inset(${String(r.top*100)}% ${String(r.right*100)}% ${String(r.bottom*100)}% ${String(r.left*100)}%)`}:{}}),D(o.el,{transform:m(c.outgoing.x,c.outgoing.y)});return}const a=new Map(o.slide.shapes.map(c=>[c.name,c]));D(e.el,{background:`color-mix(in srgb, ${getComputedStyle(e.el).backgroundColor} ${String(s*100)}%, transparent)`});const p=(c,m,r)=>{D(c,{left:`${String(r.left*w)}px`,top:`${String(r.top*w)}px`,width:`${String(r.width*w)}px`,height:`${String(r.height*w)}px`});const O=m.width>0?r.width/m.width:1,u=m.height>0?r.height/m.height:1;for(const F of c.querySelectorAll(":scope > svg:not([viewBox])"))D(F,{transformOrigin:"0 0",transform:`scale(${String(O)}, ${String(u)})`})},l=c=>JSON.stringify({...c,frame:void 0,sources:void 0}),S=new Map;for(const c of e.slide.shapes){const m=Se(e,c.name);if(!m)continue;const r=a.get(c.name);if(!r){D(m,{opacity:String(s)});continue}const O=xt(r.frame,c.frame,s),u=l(r)===l(c);S.set(c.name,{frame:O,same:u}),p(m,c.frame,O),u||D(m,{opacity:String(s)})}for(const c of o.slide.shapes){const m=Se(o,c.name);if(!m)continue;const r=S.get(c.name);r?r.same?D(m,{visibility:"hidden"}):(p(m,c.frame,r.frame),D(m,{opacity:String(1-s)})):D(m,{opacity:String(1-s)})}},je=(e,t)=>{for(const n of e.targets){const o=e.slide.shapes.find(m=>m.name===n.shape),s=e.el.querySelector(`[${R}="${CSS.escape(`${e.slide.id}/${n.shape}`)}"]`);if(!o||!s)continue;const a=n.paragraph===void 0?s:s.querySelector(`[data-ak-paragraph="${String(n.paragraph)}"]`);if(!a)continue;const p=Pe.get(a)??{transform:a.style.transform,clipPath:a.style.clipPath};Pe.set(a,p);const l=wt(n.animations,t,o.frame,{width:x.width,height:x.height});a.style.visibility=l.hidden?"hidden":"",a.style.opacity=l.opacity===1?"":String(l.opacity);const S=l.x!==0||l.y!==0?`translate(${String(l.x*w)}px, ${String(l.y*w)}px)`:"",c=l.scale===1?"":`scale(${String(l.scale)})`;a.style.transform=[S,c,p.transform].filter(m=>m!=="").join(" "),a.style.clipPath=l.clip?`inset(${String(l.clip.top*100)}% ${String(l.clip.right*100)}% ${String(l.clip.bottom*100)}% ${String(l.clip.left*100)}%)`:p.clipPath}},nt=(e,t)=>{if(t>0){const n=e.el.style.background;e.el.style.background="none",ne.push(()=>{e.el.style.background=n})}for(const[n,o]of e.planes.entries())for(const s of n===t?[]:o){const a=s.style.visibility;s.style.visibility="hidden",ne.push(()=>{s.style.visibility=a})}};let oe;const I=async(e,t)=>{oe={t:e,plane:t};const n=Math.min(Math.max(0,e),ge-1/N),o=Xe(n);if(!o)return;const s=n-o.part.start,a=await te(o),p=o.slide.transition&&He(s,o.clock.lead)?Ze(o):void 0,l=p?await te(p):void 0;if(oe.t===e){for(const S of P.values())S.el.style.visibility=S===a?"visible":"hidden";for(z=a,ee=l,j.setMoment(n,`${y.seedBase}:${a.slide.id}`);ne.length>0;)ne.pop()?.();je(a,s),tt(a,s),et(a,s);for(const[S,c]of a.layers.entries())W({phase:"render",part:a.slide.id,layer:c.layer.component,index:S,t:s},()=>{c.layer.render(c.el,Math.max(0,s-c.from),c.props,c.ctx)});if(t!==void 0&&nt(a,t),await Promise.all([a.pictures($e*1e3),...l?[l.pictures($e*1e3)]:[]]),we(),he){const S=k[k.indexOf(o)+1];S&&!P.has(S.slide.id)&&te(S).then(we,()=>{})}}},ke=()=>z,De=async e=>{await I(e);const t=ke(),n=d.getBoundingClientRect(),o=n.width>0?v/n.width:1;return{m:t,blocks:t?Le(t.el,d,v):[],scale:o}},ot=()=>{const e=new Map,t=new Map,n=(p,l)=>{e.has(fe(p))||e.set(fe(p),l),t.set(fe(p),(t.get(fe(p))??new Set).add(p))},o=x.theme.fonts;for(const p of[o.major,o.minor,o.major_east_asian,o.minor_east_asian])n(p,"theme");for(const p of x.slides)for(const l of p.shapes){const S=[...l.text?.style.levels.map(c=>c.font.name)??[],...l.text?.paragraphs.flatMap(c=>[c.font?.name,...c.runs.map(m=>m.font?.name)])??[]];for(const c of S)c!==void 0&&!c.startsWith("+")&&n(c,"text")}const s=new Set(pt().map(p=>p.family)),a=p=>{const l=ct(p)[0]??p;return s.has(l)||dt(l)};return[...e].map(([p,l])=>({name:p,where:l,drawn:[...t.get(p)??[]].some(a)}))},st=e=>{const t=e.text?.paragraphs[0],n=t?.alignment??e.text?.style.levels[t?.level??0]?.alignment;return n===void 0?{}:{align:n}},at=(e,t)=>{const n=d.getBoundingClientRect(),o=n.width>0?v/n.width:1,s=[],a=[],p=[],l=[],S=[],c=[],m=w*We;return e.slide.shapes.forEach((r,O)=>{const u=e.el.querySelector(`[${R}="${CSS.escape(`${e.slide.id}/${r.name}`)}"]`);if(!u)return;const F=u.getBoundingClientRect(),ve=[Math.round((F.left-n.left)*o),Math.round((F.top-n.top)*o),Math.round(F.width*o),Math.round(F.height*o)],le=getComputedStyle(u).visibility==="hidden",h=Le(u,d,v).filter(b=>b.ink!==null&&b.runs.some(A=>getComputedStyle(A.el).visibility!=="hidden")),_=h.map(b=>Ge([...new Set(b.runs.map(A=>A.el))],d,v));h.forEach((b,A)=>{const T=_[A]??[],E=Oe(T);E&&(s.push({layer:r.name,z:"front",text:b.text,box:E,...b.opacity<1?{opacity:b.opacity}:{}}),a.push(O),p.push(b.containers),l.push(E),S.push(T))});const $={name:r.name,kind:Me(r.geometry)?"line":r.kind,level:r.level,...r.placeholder?{placeholder:r.placeholder.type}:{},frame:[Math.round(r.frame.left*w),Math.round(r.frame.top*w),Math.round(r.frame.width*w),Math.round(r.frame.height*w)],box:ve,...le?{hidden:le}:{},opaque:r.kind==="picture"||r.kind==="movie"||!Me(r.geometry)&&r.fill!==void 0&&r.fill!==null},q=Kt(r,w);if(q&&($.ends=q),r.chart){const b=r.chart.series.flatMap(A=>A.values.filter(T=>T!==null));$.chart={type:r.chart.type,categories:r.chart.categories.length,series:r.chart.series.length,...b.length>0?{low:Math.min(...b),high:Math.max(...b)}:{},...r.chart.source===void 0?{}:{source:r.chart.source}}}if(r.table){const b=[...u.querySelectorAll("tr")];$.rows=r.table.rows.map((A,T)=>({set:Math.round(A.height*w),drawn:Math.round((b[T]?.getBoundingClientRect().height??0)*o)}))}const G=_.flat();if(G.length>0){const b=new Map;for(const E of h)for(const U of E.runs){const se=getComputedStyle(U.el),de=Math.round(parseFloat(se.fontSize)/m*10)/10,pe=parseInt(se.fontWeight,10)||400,qe=`${String(de)}/${String(pe)}`;b.has(qe)||b.set(qe,{size:de,weight:pe,...E.xHeight===void 0?{}:{xHeight:Math.round(E.xHeight/m*10)/10}})}const A=h.map(E=>E.text).join(`
|
|
4
|
+
`),T=u.querySelector("[data-ak-font-scale]")?.dataset.akFontScale;if($.text={text:A,words:Et(A).words,lines:G,glyphs:Oe(G),type:[...b.values()],...T===void 0?{}:{scale:Number(T)},...st(r)},r.rotation!==void 0){const E=u.style.transform;u.style.transform="none";const U=u.getBoundingClientRect(),se=h.flatMap(de=>Ge([...new Set(de.runs.map(pe=>pe.el))],d,v));u.style.transform=E,$.text.own={box:[Math.round((U.left-n.left)*o),Math.round((U.top-n.top)*o),Math.round(U.width*o),Math.round(U.height*o)],glyphs:Oe(se),lines:se}}}const J=u.querySelector("img");if(J&&J.naturalWidth>0){const b=r.media?.crop??{left:0,top:0,right:0,bottom:0},A=(T,E)=>1-Math.max(0,T)-Math.max(0,E);$.picture={source:[J.naturalWidth,J.naturalHeight],shown:[Math.round(J.naturalWidth*A(b.left,b.right)),Math.round(J.naturalHeight*A(b.top,b.bottom))]}}c.push($)}),{moment:Tt({t,part:e.slide.id,texts:s,safe:Je,width:v,height:C,owner:a,containers:p,seen:l,glyphs:S}),slide:{slide:e.slide.id,steps:e.part.steps?.length??1,t,layout:e.slide.layout,hidden:e.slide.hidden,...e.slide.notes===void 0?{}:{notes:e.slide.notes},shapes:c}}},Fe=e=>JSON.stringify(e.map(t=>[t.part.key,t.part.start,t.part.end,t.part.still,t.part.steps,t.part.hidden,t.part.layers,t.footage])),K={kind:"slides",get timeline(){return Ee},async ready(){await I(k[0]?.part.still??0)},summary:()=>Dt(K),seek:(e,t)=>I(e,t?.plane),async update(e,t){for(const[a,p]of Object.entries(t??{}))Ae.set(a,p);const n=x;x=e;const o=Ce(e);if(e.width!==n.width||e.height!==n.height||Fe(o)!==Fe(k))return x=n,{redrawn:[],reload:!0};const s=[];k=o.map((a,p)=>{const l=k[p];return l?.sign===a.sign?l:(s.push(a.slide.id),a)}),Ee.parts=k.map(a=>a.part),Z();for(const a of[...P.values()])xe(a.slide.id)!==a.slot&&ce(a);return oe&&s.length>0&&await I(oe.t,oe.plane),{redrawn:s}},sheet:()=>z?.el,words:()=>[],lines:()=>[],captionOptions:()=>null,setPlaying:()=>{},text:()=>k.map(({slide:e})=>({key:e.id,...e.notes===void 0?{}:{notes:e.notes},onScreen:e.shapes.flatMap(t=>t.text&&!t.text.empty?[t.text.paragraphs.map(n=>n.runs.map(o=>o.text).join("")).join(`
|
|
5
|
+
`)]:[])})),reads:()=>f.reads(H,k.map(e=>e.slide.id)),problems:()=>[...f.problems,...M.problems,...f.translationProblems()],stuck:()=>{},seekLimit:$e,facts:()=>[],says:()=>[],signs:()=>Object.fromEntries(k.map(e=>[e.slide.id,JSON.stringify({slide:JSON.parse(e.sign),width:v})])),mixPlan:()=>({duration:ge,speech:[],footage:[],sfx:[]}),covers:()=>[],drawCover:()=>Promise.resolve(),async measure(e){const t=[],n=[];for(const o of e??k.flatMap(s=>s.part.steps??[s.part.still])){await I(o);const s=ke();if(!s)continue;const a=at(s,o);t.push(a.moment),n.push(a.slide)}return{width:v,height:C,deck:{pxPerPt:w*We,slides:n,fonts:ot()},safe:Je,moments:t,footage:[]}},tracks:()=>Promise.resolve([]),async deck(){const e={};for(const t of k){const n=await te(t);for(const o of n.el.querySelectorAll("[data-ak-font-scale]")){const s=o.closest(`[${R}]`)?.getAttribute(R),a=Number(o.dataset.akFontScale);s&&a<1&&(e[s]=a)}we()}return{width:x.width,height:x.height,theme:x.theme,masters:B.masters,slides:x.slides,fitted:e,...re===void 0?{}:{lang:re}}},async inks(e){const{blocks:t,scale:n}=await De(e);return t.flatMap(o=>o.ink===null?[]:[{text:{layer:"slide",z:"front",text:o.text,box:o.box},...rt(o,n)}])},async objects(e){const{m:t,blocks:n}=await De(e),o=d.getBoundingClientRect(),s=o.width>0?v/o.width:1;return{t:e,elements:t?[...t.el.querySelectorAll(`[${R}]`)].map(a=>{const p=a.getBoundingClientRect();return{id:a.getAttribute(R)??"",box:[(p.left-o.left)*s,(p.top-o.top)*s,p.width*s,p.height*s]}}):[],texts:n.map(a=>({text:a.text,box:[a.box[0],a.box[1],a.box[2],a.box[3]],size:a.size,keys:f.keysShowing(a.text)}))}},signature:()=>{const e=ke();if(!(!e||e.el.querySelector("canvas, video, iframe")))return Re(JSON.stringify(x.theme)+e.el.outerHTML)},async signatureAt(e){return await I(e),K.signature()},async partSignature(e,t){const n=xe(e);if(!n)return{unknown:`no slide ${e}`};const o=[];for(const s of t){await I(s);const a=P.get(e);if(!a)return{unknown:`slide ${e} is not at ${String(s)}`};if(a.el.querySelector("canvas, video, iframe"))return{unknown:"a canvas, a video or a frame on the slide"};o.push(a.el.outerHTML)}return{sign:Re(o.join(`
|
|
6
|
+
`)),owners:[...new Set(n.made.map(s=>s.layer.component))]}},ask:()=>Promise.resolve([]),play:(e,t)=>ut(K,e,t),answer(e){return e.type!=="deck-update"?mt(K,e):K.update(e.deck,e.media).then(t=>({type:"deck-updated",...t}))},dispose(){for(const e of[...P.values()])ce(e);d.replaceChildren()}};return K}const Wt=i=>{const g=zt(i);return g===void 0?{}:{title:g}};function zt(i){const d=i.shapes.find(y=>y.placeholder?.type==="title"||y.placeholder?.type==="ctrTitle")?.text?.paragraphs.map(y=>y.runs.map(f=>f.text).join("")).join(" ").trim();return d===void 0||d===""?void 0:d}export function stageContext(i){const g=d=>()=>{throw new Error(`${d} is a video's: a slide has no speech.`)};return{look:i.look,format:i.format,dims:{width:i.width,height:i.height,orient:i.width>i.height?"landscape":i.width<i.height?"portrait":"square",safe:{top:0,bottom:0,left:0,right:0}},combo:i.combo,dur:i.end-i.start,asset:i.asset,words:()=>[],at:g("ctx.at()"),layer:{start:0,end:i.end-i.start},wait:i.wait,report:i.report,captions:()=>[],face:()=>{},faces:()=>[],texts:()=>[],covered:[],content:[0,0,i.width,i.height],realTimers:ft}}function Kt(i,g){const d=i.frame,y=i.rotation??0;let f;if(Me(i.geometry))f=kt(d,i.flip,y);else{const j=i.path?.steps??[];if(j.length<2||j.some(Q=>Q.op==="close"))return;const v=j[0],C=j[j.length-1];if(!v||!C||v.op==="close"||C.op==="close")return;const Y=i.path?.w??0,L=i.path?.h??0,B=[d.left+d.width/2,d.top+d.height/2],H=y*Math.PI/180,V=(Q,ie)=>{let X=Y>0?Q/Y*d.width:0,x=L>0?ie/L*d.height:0;i.flip?.h&&(X=d.width-X),i.flip?.v&&(x=d.height-x);const w=d.left+X-B[0],Z=d.top+x-B[1];return[B[0]+w*Math.cos(H)-Z*Math.sin(H),B[1]+w*Math.sin(H)+Z*Math.cos(H)]};f=[V(v.x,v.y),V(C.x,C.y)]}const M=(j,v,C)=>({at:[Math.round(j[0]*g),Math.round(j[1]*g)],head:v??"none",...C===void 0?{}:{glued:C}});return[M(f[0],i.line_begin,i.connect?.begin?.shape),M(f[1],i.line_end,i.connect?.end?.shape)]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* caladea-latin-ext-400-italic */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Caladea';
|
|
4
|
+
font-style: italic;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
src: url(./files/caladea-latin-ext-400-italic.woff2) format('woff2');
|
|
8
|
+
unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* caladea-latin-400-italic */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: 'Caladea';
|
|
14
|
+
font-style: italic;
|
|
15
|
+
font-display: swap;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
src: url(./files/caladea-latin-400-italic.woff2) format('woff2');
|
|
18
|
+
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* caladea-latin-ext-400-normal */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Caladea';
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
src: url(./files/caladea-latin-ext-400-normal.woff2) format('woff2');
|
|
8
|
+
unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* caladea-latin-400-normal */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: 'Caladea';
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-display: swap;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
src: url(./files/caladea-latin-400-normal.woff2) format('woff2');
|
|
18
|
+
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* caladea-latin-ext-700-italic */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Caladea';
|
|
4
|
+
font-style: italic;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
src: url(./files/caladea-latin-ext-700-italic.woff2) format('woff2');
|
|
8
|
+
unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* caladea-latin-700-italic */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: 'Caladea';
|
|
14
|
+
font-style: italic;
|
|
15
|
+
font-display: swap;
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
src: url(./files/caladea-latin-700-italic.woff2) format('woff2');
|
|
18
|
+
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* caladea-latin-ext-700-normal */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Caladea';
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
src: url(./files/caladea-latin-ext-700-normal.woff2) format('woff2');
|
|
8
|
+
unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* caladea-latin-700-normal */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: 'Caladea';
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-display: swap;
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
src: url(./files/caladea-latin-700-normal.woff2) format('woff2');
|
|
18
|
+
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
|
|
19
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2012 The Caladea Project Authors (https://github.com/huertatipografica/Caladea) Caladea-Italic.ttf: Copyright 2012 The Caladea Project Authors (https://github.com/huertatipografica/Caladea) Caladea-Bold.ttf: Copyright 2012 The Caladea Project Authors (https://github.com/huertatipografica/Caladea) Caladea-BoldItalic.ttf: Copyright 2012 The Caladea Project Authors (https://github.com/huertatipografica/Caladea)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|