@lalalic/markcut 2.8.0 → 2.9.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/README.md +29 -0
- package/package.json +1 -1
- package/skills/markcut/SKILL.md +12 -45
- package/skills/markcut/docs/components.md +46 -0
- package/skills/markcut/docs/markdown-descriptive.md +12 -0
- package/skills/markcut/docs/sound-effects.md +45 -0
- package/src/config.mjs +2 -2
- package/src/descriptive/compiler.ts +4 -0
- package/src/descriptive/markdown.ts +2 -0
- package/src/player/browser.tsx +95 -5
- package/src/player/bundle/player.js +783 -593
- package/src/player/components/EditControls.tsx +6 -3
- package/src/player/components/EditMessagePanel.tsx +96 -0
- package/src/player/components/HeaderBar.tsx +9 -11
- package/src/player/components/index.ts +1 -0
- package/src/player/pipeline.mjs +6 -2
- package/src/player/server-shared.mjs +4 -1
- package/src/player/server.mjs +202 -42
- package/src/render/cli.mjs +1 -1
- package/src/schema/index.ts +2 -0
- package/src/types/Map.tsx +51 -1
- package/tests/tmp/vision-1784830584961/images/.normalized/test-photo_384.jpg +0 -0
- package/tests/tmp/vision-1784830584961/images/metadata.json +0 -8
- package/tests/tmp/vision-1784830584961/images/test-photo.png +0 -0
- package/tmp/frontmatter-test.ts +0 -21
|
@@ -781,7 +781,7 @@ var require_scheduler = __commonJS({
|
|
|
781
781
|
var require_react_dom_production = __commonJS({
|
|
782
782
|
"node_modules/react-dom/cjs/react-dom.production.js"(exports2) {
|
|
783
783
|
"use strict";
|
|
784
|
-
var
|
|
784
|
+
var React59 = require_react();
|
|
785
785
|
function formatProdErrorMessage(code4) {
|
|
786
786
|
var url2 = "https://react.dev/errors/" + code4;
|
|
787
787
|
if (1 < arguments.length) {
|
|
@@ -821,7 +821,7 @@ var require_react_dom_production = __commonJS({
|
|
|
821
821
|
implementation
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
var ReactSharedInternals =
|
|
824
|
+
var ReactSharedInternals = React59.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
825
825
|
function getCrossOriginStringAs(as, input) {
|
|
826
826
|
if ("font" === as) return "";
|
|
827
827
|
if ("string" === typeof input)
|
|
@@ -957,7 +957,7 @@ var require_react_dom_client_production = __commonJS({
|
|
|
957
957
|
"node_modules/react-dom/cjs/react-dom-client.production.js"(exports2) {
|
|
958
958
|
"use strict";
|
|
959
959
|
var Scheduler = require_scheduler();
|
|
960
|
-
var
|
|
960
|
+
var React59 = require_react();
|
|
961
961
|
var ReactDOM3 = require_react_dom();
|
|
962
962
|
function formatProdErrorMessage(code4) {
|
|
963
963
|
var url2 = "https://react.dev/errors/" + code4;
|
|
@@ -1148,7 +1148,7 @@ var require_react_dom_client_production = __commonJS({
|
|
|
1148
1148
|
return null;
|
|
1149
1149
|
}
|
|
1150
1150
|
var isArrayImpl = Array.isArray;
|
|
1151
|
-
var ReactSharedInternals =
|
|
1151
|
+
var ReactSharedInternals = React59.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
1152
1152
|
var ReactDOMSharedInternals = ReactDOM3.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
1153
1153
|
var sharedNotPendingObject = {
|
|
1154
1154
|
pending: false,
|
|
@@ -12594,7 +12594,7 @@ var require_react_dom_client_production = __commonJS({
|
|
|
12594
12594
|
0 === i5 && attemptExplicitHydrationTarget(target);
|
|
12595
12595
|
}
|
|
12596
12596
|
};
|
|
12597
|
-
var isomorphicReactPackageVersion$jscomp$inline_1840 =
|
|
12597
|
+
var isomorphicReactPackageVersion$jscomp$inline_1840 = React59.version;
|
|
12598
12598
|
if ("19.2.5" !== isomorphicReactPackageVersion$jscomp$inline_1840)
|
|
12599
12599
|
throw Error(
|
|
12600
12600
|
formatProdErrorMessage(
|
|
@@ -195443,7 +195443,7 @@ var require_fast_deep_equal = __commonJS({
|
|
|
195443
195443
|
});
|
|
195444
195444
|
|
|
195445
195445
|
// src/player/browser.tsx
|
|
195446
|
-
var
|
|
195446
|
+
var React58 = __toESM(require_react(), 1);
|
|
195447
195447
|
var import_client = __toESM(require_client(), 1);
|
|
195448
195448
|
var ReactDOM2 = __toESM(require_react_dom(), 1);
|
|
195449
195449
|
|
|
@@ -210595,9 +210595,331 @@ var ReactDOM = __toESM(require_react_dom(), 1);
|
|
|
210595
210595
|
var components_exports = {};
|
|
210596
210596
|
__export(components_exports, {
|
|
210597
210597
|
Markdown: () => Markdown2,
|
|
210598
|
-
Mermaid: () => Mermaid
|
|
210598
|
+
Mermaid: () => Mermaid,
|
|
210599
|
+
StoryboardCaption: () => StoryboardCaption,
|
|
210600
|
+
StoryboardInfo: () => StoryboardInfo,
|
|
210601
|
+
StoryboardSlot: () => StoryboardSlot
|
|
210599
210602
|
});
|
|
210600
210603
|
|
|
210604
|
+
// src/components/StoryboardSlot.tsx
|
|
210605
|
+
var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
|
|
210606
|
+
function StoryboardSlot({ kind, prompt }) {
|
|
210607
|
+
const isVideo = kind === "video";
|
|
210608
|
+
const bgGrad = isVideo ? "linear-gradient(135deg,#7c2d12,#b91c1c)" : "linear-gradient(135deg,#1e3a8a,#6d28d9)";
|
|
210609
|
+
const accentColor = isVideo ? "#fbbf24" : "#93c5fd";
|
|
210610
|
+
const label3 = isVideo ? "Video" : "Image";
|
|
210611
|
+
const emoji3 = isVideo ? "\u{1F3AC}" : "\u{1F5BC}\uFE0F";
|
|
210612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
210613
|
+
"div",
|
|
210614
|
+
{
|
|
210615
|
+
style: {
|
|
210616
|
+
position: "absolute",
|
|
210617
|
+
inset: 0,
|
|
210618
|
+
overflow: "hidden",
|
|
210619
|
+
display: "flex",
|
|
210620
|
+
flexDirection: "column",
|
|
210621
|
+
alignItems: "center",
|
|
210622
|
+
justifyContent: "center",
|
|
210623
|
+
background: bgGrad,
|
|
210624
|
+
color: "#fff",
|
|
210625
|
+
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
210626
|
+
padding: "6%",
|
|
210627
|
+
boxSizing: "border-box"
|
|
210628
|
+
},
|
|
210629
|
+
children: [
|
|
210630
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
210631
|
+
"div",
|
|
210632
|
+
{
|
|
210633
|
+
style: {
|
|
210634
|
+
position: "absolute",
|
|
210635
|
+
inset: "4%",
|
|
210636
|
+
border: "3px dashed rgba(255,255,255,0.35)",
|
|
210637
|
+
borderRadius: 24,
|
|
210638
|
+
pointerEvents: "none"
|
|
210639
|
+
}
|
|
210640
|
+
}
|
|
210641
|
+
),
|
|
210642
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
210643
|
+
"div",
|
|
210644
|
+
{
|
|
210645
|
+
style: {
|
|
210646
|
+
display: "flex",
|
|
210647
|
+
alignItems: "center",
|
|
210648
|
+
gap: "0.5em",
|
|
210649
|
+
background: "rgba(0,0,0,0.35)",
|
|
210650
|
+
border: `2px solid ${accentColor}`,
|
|
210651
|
+
borderRadius: 999,
|
|
210652
|
+
padding: "0.5em 1.1em",
|
|
210653
|
+
fontSize: "2.2vh",
|
|
210654
|
+
fontWeight: 800,
|
|
210655
|
+
letterSpacing: "0.12em",
|
|
210656
|
+
marginBottom: "3vh"
|
|
210657
|
+
},
|
|
210658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { fontSize: "3.4vh", lineHeight: 1 }, children: emoji3 })
|
|
210659
|
+
}
|
|
210660
|
+
),
|
|
210661
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
210662
|
+
"div",
|
|
210663
|
+
{
|
|
210664
|
+
style: {
|
|
210665
|
+
position: "relative",
|
|
210666
|
+
maxWidth: "88%",
|
|
210667
|
+
textAlign: "center",
|
|
210668
|
+
fontSize: "3.4vh",
|
|
210669
|
+
lineHeight: 1.4,
|
|
210670
|
+
fontWeight: 600,
|
|
210671
|
+
textShadow: "0 2px 8px rgba(0,0,0,0.5)",
|
|
210672
|
+
whiteSpace: "pre-wrap",
|
|
210673
|
+
wordBreak: "break-word"
|
|
210674
|
+
},
|
|
210675
|
+
children: prompt ?? (isVideo ? "(no video prompt)" : "(no image prompt)")
|
|
210676
|
+
}
|
|
210677
|
+
)
|
|
210678
|
+
]
|
|
210679
|
+
}
|
|
210680
|
+
);
|
|
210681
|
+
}
|
|
210682
|
+
|
|
210683
|
+
// src/components/StoryboardCaption.tsx
|
|
210684
|
+
var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
|
|
210685
|
+
function StoryboardCaption({ script: script2, speaker }) {
|
|
210686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
210687
|
+
"div",
|
|
210688
|
+
{
|
|
210689
|
+
style: {
|
|
210690
|
+
position: "absolute",
|
|
210691
|
+
bottom: "10%",
|
|
210692
|
+
left: "5%",
|
|
210693
|
+
right: "5%",
|
|
210694
|
+
display: "flex",
|
|
210695
|
+
flexDirection: "column",
|
|
210696
|
+
alignItems: "center",
|
|
210697
|
+
pointerEvents: "none"
|
|
210698
|
+
},
|
|
210699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
210700
|
+
"div",
|
|
210701
|
+
{
|
|
210702
|
+
style: {
|
|
210703
|
+
maxWidth: "90%",
|
|
210704
|
+
background: "rgba(0,0,0,0.7)",
|
|
210705
|
+
backdropFilter: "blur(4px)",
|
|
210706
|
+
borderRadius: 16,
|
|
210707
|
+
padding: "2.5vh 4vh",
|
|
210708
|
+
textAlign: "center",
|
|
210709
|
+
color: "#fff",
|
|
210710
|
+
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
|
|
210711
|
+
},
|
|
210712
|
+
children: [
|
|
210713
|
+
speaker && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
210714
|
+
"div",
|
|
210715
|
+
{
|
|
210716
|
+
style: {
|
|
210717
|
+
fontSize: "2vh",
|
|
210718
|
+
fontWeight: 700,
|
|
210719
|
+
color: "#93c5fd",
|
|
210720
|
+
marginBottom: "0.6vh",
|
|
210721
|
+
letterSpacing: "0.04em"
|
|
210722
|
+
},
|
|
210723
|
+
children: speaker
|
|
210724
|
+
}
|
|
210725
|
+
),
|
|
210726
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
210727
|
+
"div",
|
|
210728
|
+
{
|
|
210729
|
+
style: {
|
|
210730
|
+
fontSize: "2.6vh",
|
|
210731
|
+
lineHeight: 1.5,
|
|
210732
|
+
fontWeight: 500,
|
|
210733
|
+
textShadow: "0 1px 4px rgba(0,0,0,0.4)",
|
|
210734
|
+
whiteSpace: "pre-wrap",
|
|
210735
|
+
wordBreak: "break-word"
|
|
210736
|
+
},
|
|
210737
|
+
children: script2
|
|
210738
|
+
}
|
|
210739
|
+
)
|
|
210740
|
+
]
|
|
210741
|
+
}
|
|
210742
|
+
)
|
|
210743
|
+
}
|
|
210744
|
+
);
|
|
210745
|
+
}
|
|
210746
|
+
|
|
210747
|
+
// src/components/StoryboardInfo.tsx
|
|
210748
|
+
var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
|
|
210749
|
+
function StoryboardInfo({ config: config4, variants, frontmatter }) {
|
|
210750
|
+
const parts = (config4 ?? "").split(" \xB7 ").filter(Boolean);
|
|
210751
|
+
const variantList = (variants ?? "").split(/,\s*/).filter(Boolean);
|
|
210752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
210753
|
+
"div",
|
|
210754
|
+
{
|
|
210755
|
+
style: {
|
|
210756
|
+
position: "absolute",
|
|
210757
|
+
inset: 0,
|
|
210758
|
+
display: "flex",
|
|
210759
|
+
flexDirection: "column",
|
|
210760
|
+
alignItems: "center",
|
|
210761
|
+
justifyContent: "center",
|
|
210762
|
+
background: "linear-gradient(135deg,#0f172a,#1e293b,#334155)",
|
|
210763
|
+
color: "#fff",
|
|
210764
|
+
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
210765
|
+
padding: "8%",
|
|
210766
|
+
boxSizing: "border-box"
|
|
210767
|
+
},
|
|
210768
|
+
children: [
|
|
210769
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210770
|
+
"div",
|
|
210771
|
+
{
|
|
210772
|
+
style: {
|
|
210773
|
+
position: "absolute",
|
|
210774
|
+
inset: "5%",
|
|
210775
|
+
border: "2px solid rgba(255,255,255,0.08)",
|
|
210776
|
+
borderRadius: "50%"
|
|
210777
|
+
}
|
|
210778
|
+
}
|
|
210779
|
+
),
|
|
210780
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210781
|
+
"div",
|
|
210782
|
+
{
|
|
210783
|
+
style: {
|
|
210784
|
+
position: "absolute",
|
|
210785
|
+
inset: "12%",
|
|
210786
|
+
border: "1px solid rgba(255,255,255,0.05)",
|
|
210787
|
+
borderRadius: "50%"
|
|
210788
|
+
}
|
|
210789
|
+
}
|
|
210790
|
+
),
|
|
210791
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { style: { fontSize: "6vh", marginBottom: "2.5vh", opacity: 0.7 }, children: "\u{1F3AC}" }),
|
|
210792
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210793
|
+
"div",
|
|
210794
|
+
{
|
|
210795
|
+
style: {
|
|
210796
|
+
fontSize: "4.2vh",
|
|
210797
|
+
fontWeight: 800,
|
|
210798
|
+
letterSpacing: "0.02em",
|
|
210799
|
+
marginBottom: "3vh",
|
|
210800
|
+
textAlign: "center",
|
|
210801
|
+
textShadow: "0 2px 12px rgba(0,0,0,0.5)"
|
|
210802
|
+
},
|
|
210803
|
+
children: "Storyboard Preview"
|
|
210804
|
+
}
|
|
210805
|
+
),
|
|
210806
|
+
parts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210807
|
+
"div",
|
|
210808
|
+
{
|
|
210809
|
+
style: {
|
|
210810
|
+
display: "flex",
|
|
210811
|
+
flexWrap: "wrap",
|
|
210812
|
+
justifyContent: "center",
|
|
210813
|
+
gap: "1.2vh",
|
|
210814
|
+
maxWidth: "85%",
|
|
210815
|
+
marginBottom: variantList.length > 0 ? "2.5vh" : 0
|
|
210816
|
+
},
|
|
210817
|
+
children: parts.map((entry) => {
|
|
210818
|
+
const colonIdx = entry.indexOf(":");
|
|
210819
|
+
const label3 = colonIdx > 0 ? entry.slice(0, colonIdx).trim() : "";
|
|
210820
|
+
const value2 = colonIdx > 0 ? entry.slice(colonIdx + 1).trim() : entry;
|
|
210821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
210822
|
+
"div",
|
|
210823
|
+
{
|
|
210824
|
+
style: {
|
|
210825
|
+
background: "rgba(255,255,255,0.07)",
|
|
210826
|
+
border: "1px solid rgba(255,255,255,0.12)",
|
|
210827
|
+
borderRadius: 12,
|
|
210828
|
+
padding: "1.2vh 2.2vh",
|
|
210829
|
+
textAlign: "center",
|
|
210830
|
+
minWidth: "16vh"
|
|
210831
|
+
},
|
|
210832
|
+
children: [
|
|
210833
|
+
label3 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210834
|
+
"div",
|
|
210835
|
+
{
|
|
210836
|
+
style: {
|
|
210837
|
+
fontSize: "1.6vh",
|
|
210838
|
+
fontWeight: 600,
|
|
210839
|
+
color: "#93c5fd",
|
|
210840
|
+
letterSpacing: "0.08em",
|
|
210841
|
+
textTransform: "uppercase",
|
|
210842
|
+
marginBottom: "0.4vh"
|
|
210843
|
+
},
|
|
210844
|
+
children: label3
|
|
210845
|
+
}
|
|
210846
|
+
),
|
|
210847
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210848
|
+
"div",
|
|
210849
|
+
{
|
|
210850
|
+
style: {
|
|
210851
|
+
fontSize: "2.2vh",
|
|
210852
|
+
fontWeight: 700,
|
|
210853
|
+
whiteSpace: "pre-wrap",
|
|
210854
|
+
wordBreak: "break-word",
|
|
210855
|
+
opacity: value2.startsWith("http") ? 0.8 : 1
|
|
210856
|
+
},
|
|
210857
|
+
children: value2
|
|
210858
|
+
}
|
|
210859
|
+
)
|
|
210860
|
+
]
|
|
210861
|
+
},
|
|
210862
|
+
label3 || entry
|
|
210863
|
+
);
|
|
210864
|
+
})
|
|
210865
|
+
}
|
|
210866
|
+
),
|
|
210867
|
+
frontmatter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210868
|
+
"div",
|
|
210869
|
+
{
|
|
210870
|
+
style: {
|
|
210871
|
+
maxWidth: "85%",
|
|
210872
|
+
background: "rgba(255,255,255,0.05)",
|
|
210873
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
210874
|
+
borderRadius: 12,
|
|
210875
|
+
padding: "1.5vh 2.5vh",
|
|
210876
|
+
marginBottom: "2.5vh",
|
|
210877
|
+
fontFamily: "monospace",
|
|
210878
|
+
fontSize: "1.8vh",
|
|
210879
|
+
lineHeight: 1.6,
|
|
210880
|
+
color: "rgba(255,255,255,0.8)",
|
|
210881
|
+
whiteSpace: "pre-wrap",
|
|
210882
|
+
wordBreak: "break-word",
|
|
210883
|
+
textAlign: "left",
|
|
210884
|
+
maxHeight: "28vh",
|
|
210885
|
+
overflow: "auto"
|
|
210886
|
+
},
|
|
210887
|
+
children: frontmatter
|
|
210888
|
+
}
|
|
210889
|
+
),
|
|
210890
|
+
variantList.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210891
|
+
"div",
|
|
210892
|
+
{
|
|
210893
|
+
style: {
|
|
210894
|
+
display: "flex",
|
|
210895
|
+
flexWrap: "wrap",
|
|
210896
|
+
justifyContent: "center",
|
|
210897
|
+
gap: "1vh"
|
|
210898
|
+
},
|
|
210899
|
+
children: variantList.map((v5) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210900
|
+
"div",
|
|
210901
|
+
{
|
|
210902
|
+
style: {
|
|
210903
|
+
background: "rgba(251,191,36,0.15)",
|
|
210904
|
+
border: "1px solid rgba(251,191,36,0.35)",
|
|
210905
|
+
borderRadius: 999,
|
|
210906
|
+
padding: "0.8vh 2vh",
|
|
210907
|
+
fontSize: "1.8vh",
|
|
210908
|
+
fontWeight: 600,
|
|
210909
|
+
color: "#fbbf24",
|
|
210910
|
+
letterSpacing: "0.04em"
|
|
210911
|
+
},
|
|
210912
|
+
children: v5
|
|
210913
|
+
},
|
|
210914
|
+
v5
|
|
210915
|
+
))
|
|
210916
|
+
}
|
|
210917
|
+
)
|
|
210918
|
+
]
|
|
210919
|
+
}
|
|
210920
|
+
);
|
|
210921
|
+
}
|
|
210922
|
+
|
|
210601
210923
|
// src/components/Markdown.tsx
|
|
210602
210924
|
var React9 = __toESM(require_react(), 1);
|
|
210603
210925
|
|
|
@@ -212236,11 +212558,11 @@ function addChildren(props, children2) {
|
|
|
212236
212558
|
}
|
|
212237
212559
|
}
|
|
212238
212560
|
}
|
|
212239
|
-
function productionCreate(_3, jsx84,
|
|
212561
|
+
function productionCreate(_3, jsx84, jsxs25) {
|
|
212240
212562
|
return create5;
|
|
212241
212563
|
function create5(_4, type3, props, key) {
|
|
212242
212564
|
const isStaticChildren = Array.isArray(props.children);
|
|
212243
|
-
const fn3 = isStaticChildren ?
|
|
212565
|
+
const fn3 = isStaticChildren ? jsxs25 : jsx84;
|
|
212244
212566
|
return key ? fn3(type3, props, key) : fn3(type3, props);
|
|
212245
212567
|
}
|
|
212246
212568
|
}
|
|
@@ -212485,7 +212807,7 @@ var urlAttributes = {
|
|
|
212485
212807
|
};
|
|
212486
212808
|
|
|
212487
212809
|
// node_modules/react-markdown/lib/index.js
|
|
212488
|
-
var
|
|
212810
|
+
var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
|
|
212489
212811
|
var import_react113 = __toESM(require_react(), 1);
|
|
212490
212812
|
|
|
212491
212813
|
// node_modules/mdast-util-to-string/lib/index.js
|
|
@@ -220157,11 +220479,11 @@ function post(tree, options2) {
|
|
|
220157
220479
|
}
|
|
220158
220480
|
visit(tree, transform9);
|
|
220159
220481
|
return toJsxRuntime(tree, {
|
|
220160
|
-
Fragment:
|
|
220482
|
+
Fragment: import_jsx_runtime59.Fragment,
|
|
220161
220483
|
components: components3,
|
|
220162
220484
|
ignoreInvalidStyle: true,
|
|
220163
|
-
jsx:
|
|
220164
|
-
jsxs:
|
|
220485
|
+
jsx: import_jsx_runtime59.jsx,
|
|
220486
|
+
jsxs: import_jsx_runtime59.jsxs,
|
|
220165
220487
|
passKeys: true,
|
|
220166
220488
|
passNode: true
|
|
220167
220489
|
});
|
|
@@ -225092,7 +225414,7 @@ var mermaid = {
|
|
|
225092
225414
|
var mermaid_default = mermaid;
|
|
225093
225415
|
|
|
225094
225416
|
// src/components/Mermaid.tsx
|
|
225095
|
-
var
|
|
225417
|
+
var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
|
|
225096
225418
|
var initialized = false;
|
|
225097
225419
|
function Mermaid({ children: children2, source = children2, theme = "dark", className: className2 }) {
|
|
225098
225420
|
const ref2 = React8.useRef(null);
|
|
@@ -225121,7 +225443,7 @@ function Mermaid({ children: children2, source = children2, theme = "dark", clas
|
|
|
225121
225443
|
continueRender(handle2);
|
|
225122
225444
|
});
|
|
225123
225445
|
}, [source, theme, handle2]);
|
|
225124
|
-
return /* @__PURE__ */ (0,
|
|
225446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
225125
225447
|
"div",
|
|
225126
225448
|
{
|
|
225127
225449
|
ref: ref2,
|
|
@@ -225131,22 +225453,24 @@ function Mermaid({ children: children2, source = children2, theme = "dark", clas
|
|
|
225131
225453
|
}
|
|
225132
225454
|
|
|
225133
225455
|
// src/components/Markdown.tsx
|
|
225134
|
-
var
|
|
225456
|
+
var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
|
|
225135
225457
|
function Markdown2({ children: children2, source = children2, className: className2, plugins, components: components3 }) {
|
|
225136
|
-
return /* @__PURE__ */ (0,
|
|
225458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: className2, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
225137
225459
|
Markdown,
|
|
225138
225460
|
{
|
|
225139
225461
|
remarkPlugins: React9.useMemo(() => [remarkGfm, ...plugins || []], [plugins]),
|
|
225140
225462
|
components: React9.useMemo(
|
|
225141
225463
|
() => ({
|
|
225464
|
+
...components3,
|
|
225142
225465
|
pre: ({ children: children3 }) => {
|
|
225143
225466
|
const code4 = React9.Children.toArray(children3)[0];
|
|
225144
225467
|
if (code4?.props?.className === "language-mermaid") {
|
|
225145
|
-
return /* @__PURE__ */ (0,
|
|
225468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Mermaid, { source: String(code4.props.children) });
|
|
225469
|
+
} else if (components3.pre) {
|
|
225470
|
+
return components3.pre({ children: children3 });
|
|
225146
225471
|
}
|
|
225147
|
-
return /* @__PURE__ */ (0,
|
|
225148
|
-
}
|
|
225149
|
-
...components3
|
|
225472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("pre", { children: children3 });
|
|
225473
|
+
}
|
|
225150
225474
|
}),
|
|
225151
225475
|
[components3]
|
|
225152
225476
|
),
|
|
@@ -225228,7 +225552,7 @@ var React18 = __toESM(require_react(), 1);
|
|
|
225228
225552
|
|
|
225229
225553
|
// src/context/EventContext.tsx
|
|
225230
225554
|
var React16 = __toESM(require_react(), 1);
|
|
225231
|
-
var
|
|
225555
|
+
var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
|
|
225232
225556
|
var EventContext = React16.createContext(null);
|
|
225233
225557
|
function createComponentProxy(target, setState) {
|
|
225234
225558
|
return new Proxy(target, {
|
|
@@ -225275,7 +225599,7 @@ function EventProvider({ children: children2 }) {
|
|
|
225275
225599
|
() => ({ register, unregister, evaluate: evaluate2 }),
|
|
225276
225600
|
[register, unregister, evaluate2]
|
|
225277
225601
|
);
|
|
225278
|
-
return /* @__PURE__ */ (0,
|
|
225602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventContext.Provider, { value: value2, children: children2 });
|
|
225279
225603
|
}
|
|
225280
225604
|
function useEventContext() {
|
|
225281
225605
|
const ctx = React16.useContext(EventContext);
|
|
@@ -225315,8 +225639,8 @@ function useFrameEvents(on3, durationInFrames) {
|
|
|
225315
225639
|
}
|
|
225316
225640
|
|
|
225317
225641
|
// src/context/index.tsx
|
|
225318
|
-
var
|
|
225319
|
-
var DefaultContainer = ({ children: children2, style: style4 }) => /* @__PURE__ */ (0,
|
|
225642
|
+
var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
|
|
225643
|
+
var DefaultContainer = ({ children: children2, style: style4 }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { style: { position: "absolute", inset: 0, ...style4 }, children: children2 });
|
|
225320
225644
|
var ComposeContext = React18.createContext({
|
|
225321
225645
|
Container: DefaultContainer
|
|
225322
225646
|
});
|
|
@@ -225327,14 +225651,14 @@ var React47 = __toESM(require_react(), 1);
|
|
|
225327
225651
|
|
|
225328
225652
|
// node_modules/@remotion/transitions/dist/esm/index.mjs
|
|
225329
225653
|
var import_react114 = __toESM(require_react(), 1);
|
|
225330
|
-
var
|
|
225654
|
+
var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
|
|
225331
225655
|
var import_react115 = __toESM(require_react(), 1);
|
|
225332
|
-
var
|
|
225656
|
+
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
|
|
225333
225657
|
var import_react116 = __toESM(require_react(), 1);
|
|
225334
225658
|
var import_react117 = __toESM(require_react(), 1);
|
|
225335
|
-
var
|
|
225659
|
+
var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
|
|
225336
225660
|
var import_react118 = __toESM(require_react(), 1);
|
|
225337
|
-
var
|
|
225661
|
+
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
225338
225662
|
var import_react119 = __toESM(require_react(), 1);
|
|
225339
225663
|
var epsilon6 = 0.01;
|
|
225340
225664
|
var SlidePresentation = ({
|
|
@@ -225398,7 +225722,7 @@ var SlidePresentation = ({
|
|
|
225398
225722
|
...presentationDirection === "entering" ? enterStyle : exitStyle
|
|
225399
225723
|
};
|
|
225400
225724
|
}, [directionStyle, enterStyle, exitStyle, presentationDirection]);
|
|
225401
|
-
return /* @__PURE__ */ (0,
|
|
225725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(AbsoluteFill, {
|
|
225402
225726
|
style: style4,
|
|
225403
225727
|
children: children2
|
|
225404
225728
|
});
|
|
@@ -225547,8 +225871,8 @@ var HtmlInCanvasPresentation = ({
|
|
|
225547
225871
|
if (passThrough) {
|
|
225548
225872
|
return children2;
|
|
225549
225873
|
}
|
|
225550
|
-
return /* @__PURE__ */ (0,
|
|
225551
|
-
children: /* @__PURE__ */ (0,
|
|
225874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(AbsoluteFill, {
|
|
225875
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("canvas", {
|
|
225552
225876
|
ref: canvasRef,
|
|
225553
225877
|
style: canvasSubtreeStyle,
|
|
225554
225878
|
children: children2
|
|
@@ -225559,7 +225883,7 @@ var makeHtmlInCanvasPresentation = (shader) => {
|
|
|
225559
225883
|
const CompWithShader = (props) => {
|
|
225560
225884
|
const { passedProps, ...otherProps } = props;
|
|
225561
225885
|
const { effects, ...restPassedProps } = props.passedProps;
|
|
225562
|
-
return /* @__PURE__ */ (0,
|
|
225886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(HtmlInCanvasPresentation, {
|
|
225563
225887
|
shader,
|
|
225564
225888
|
passedProps: restPassedProps,
|
|
225565
225889
|
effects,
|
|
@@ -226386,7 +226710,7 @@ var WrapInEnteringProgressContext = ({ presentationProgress, children: children2
|
|
|
226386
226710
|
enteringProgress: presentationProgress
|
|
226387
226711
|
};
|
|
226388
226712
|
}, [presentationProgress]);
|
|
226389
|
-
return /* @__PURE__ */ (0,
|
|
226713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(EnteringContext.Provider, {
|
|
226390
226714
|
value: value2,
|
|
226391
226715
|
children: children2
|
|
226392
226716
|
});
|
|
@@ -226397,7 +226721,7 @@ var WrapInExitingProgressContext = ({ presentationProgress, children: children2
|
|
|
226397
226721
|
exitingProgress: presentationProgress
|
|
226398
226722
|
};
|
|
226399
226723
|
}, [presentationProgress]);
|
|
226400
|
-
return /* @__PURE__ */ (0,
|
|
226724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ExitingContext.Provider, {
|
|
226401
226725
|
value: value2,
|
|
226402
226726
|
children: children2
|
|
226403
226727
|
});
|
|
@@ -226420,7 +226744,7 @@ var SeriesOverlay = () => {
|
|
|
226420
226744
|
return null;
|
|
226421
226745
|
};
|
|
226422
226746
|
var SeriesSequence2 = ({ children: children2 }) => {
|
|
226423
|
-
return /* @__PURE__ */ (0,
|
|
226747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, {
|
|
226424
226748
|
children: children2
|
|
226425
226749
|
});
|
|
226426
226750
|
};
|
|
@@ -226608,13 +226932,13 @@ var TransitionSeriesChildren = ({
|
|
|
226608
226932
|
const prevPresentation = prev2.props.presentation ?? slide();
|
|
226609
226933
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
226610
226934
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
226611
|
-
return /* @__PURE__ */ (0,
|
|
226935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226612
226936
|
from: actualStartFrame,
|
|
226613
226937
|
durationInFrames: durationInFramesProp,
|
|
226614
226938
|
...passedProps,
|
|
226615
226939
|
name: passedProps.name || "<TS.Sequence>",
|
|
226616
226940
|
_remotionInternalDocumentationLink: passedProps.name ? void 0 : "https://www.remotion.dev/docs/transitions/transitionseries",
|
|
226617
|
-
children: /* @__PURE__ */ (0,
|
|
226941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercaseNextPresentation, {
|
|
226618
226942
|
passedProps: nextPresentation.props ?? {},
|
|
226619
226943
|
presentationDirection: "exiting",
|
|
226620
226944
|
presentationProgress: nextProgress,
|
|
@@ -226626,9 +226950,9 @@ var TransitionSeriesChildren = ({
|
|
|
226626
226950
|
throw new Error("Should not call when exiting");
|
|
226627
226951
|
},
|
|
226628
226952
|
bothEnteringAndExiting: true,
|
|
226629
|
-
children: /* @__PURE__ */ (0,
|
|
226953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInExitingProgressContext, {
|
|
226630
226954
|
presentationProgress: nextProgress,
|
|
226631
|
-
children: /* @__PURE__ */ (0,
|
|
226955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercasePrevPresentation, {
|
|
226632
226956
|
passedProps: prevPresentation.props ?? {},
|
|
226633
226957
|
presentationDirection: "entering",
|
|
226634
226958
|
presentationProgress: prevProgress,
|
|
@@ -226642,7 +226966,7 @@ var TransitionSeriesChildren = ({
|
|
|
226642
226966
|
onNextElementImage(null, null, null, i5 - 1);
|
|
226643
226967
|
},
|
|
226644
226968
|
bothEnteringAndExiting: true,
|
|
226645
|
-
children: /* @__PURE__ */ (0,
|
|
226969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInEnteringProgressContext, {
|
|
226646
226970
|
presentationProgress: prevProgress,
|
|
226647
226971
|
children: child
|
|
226648
226972
|
})
|
|
@@ -226654,13 +226978,13 @@ var TransitionSeriesChildren = ({
|
|
|
226654
226978
|
if (prevProgress !== null && prev2) {
|
|
226655
226979
|
const prevPresentation = prev2.props.presentation ?? slide();
|
|
226656
226980
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
226657
|
-
return /* @__PURE__ */ (0,
|
|
226981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226658
226982
|
from: actualStartFrame,
|
|
226659
226983
|
durationInFrames: durationInFramesProp,
|
|
226660
226984
|
...passedProps,
|
|
226661
226985
|
name: passedProps.name || "<TS.Sequence>",
|
|
226662
226986
|
_remotionInternalDocumentationLink: passedProps.name ? void 0 : "https://www.remotion.dev/docs/transitions/transitionseries",
|
|
226663
|
-
children: /* @__PURE__ */ (0,
|
|
226987
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercasePrevPresentation, {
|
|
226664
226988
|
passedProps: prevPresentation.props ?? {},
|
|
226665
226989
|
presentationDirection: "entering",
|
|
226666
226990
|
presentationProgress: prevProgress,
|
|
@@ -226670,7 +226994,7 @@ var TransitionSeriesChildren = ({
|
|
|
226670
226994
|
onNextElementImage(null, null, null, i5 - 1);
|
|
226671
226995
|
},
|
|
226672
226996
|
bothEnteringAndExiting: false,
|
|
226673
|
-
children: /* @__PURE__ */ (0,
|
|
226997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInEnteringProgressContext, {
|
|
226674
226998
|
presentationProgress: prevProgress,
|
|
226675
226999
|
children: child
|
|
226676
227000
|
})
|
|
@@ -226680,13 +227004,13 @@ var TransitionSeriesChildren = ({
|
|
|
226680
227004
|
if (nextProgress !== null && next3) {
|
|
226681
227005
|
const nextPresentation = next3.props.presentation ?? slide();
|
|
226682
227006
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
226683
|
-
return /* @__PURE__ */ (0,
|
|
227007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226684
227008
|
from: actualStartFrame,
|
|
226685
227009
|
durationInFrames: durationInFramesProp,
|
|
226686
227010
|
...passedProps,
|
|
226687
227011
|
name: passedProps.name || "<TS.Sequence>",
|
|
226688
227012
|
_remotionInternalDocumentationLink: passedProps.name ? void 0 : "https://www.remotion.dev/docs/transitions/transitionseries",
|
|
226689
|
-
children: /* @__PURE__ */ (0,
|
|
227013
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercaseNextPresentation, {
|
|
226690
227014
|
passedProps: nextPresentation.props ?? {},
|
|
226691
227015
|
presentationDirection: "exiting",
|
|
226692
227016
|
presentationProgress: nextProgress,
|
|
@@ -226696,14 +227020,14 @@ var TransitionSeriesChildren = ({
|
|
|
226696
227020
|
onPrevElementImage(null, null, null, i5 + 1);
|
|
226697
227021
|
},
|
|
226698
227022
|
bothEnteringAndExiting: false,
|
|
226699
|
-
children: /* @__PURE__ */ (0,
|
|
227023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInExitingProgressContext, {
|
|
226700
227024
|
presentationProgress: nextProgress,
|
|
226701
227025
|
children: child
|
|
226702
227026
|
})
|
|
226703
227027
|
})
|
|
226704
227028
|
}, i5);
|
|
226705
227029
|
}
|
|
226706
|
-
return /* @__PURE__ */ (0,
|
|
227030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226707
227031
|
from: actualStartFrame,
|
|
226708
227032
|
durationInFrames: durationInFramesProp,
|
|
226709
227033
|
...passedProps,
|
|
@@ -226714,7 +227038,7 @@ var TransitionSeriesChildren = ({
|
|
|
226714
227038
|
});
|
|
226715
227039
|
const overlayElements = overlayRenders.map((overlayInfo) => {
|
|
226716
227040
|
const info3 = overlayInfo;
|
|
226717
|
-
return /* @__PURE__ */ (0,
|
|
227041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226718
227042
|
from: Math.round(info3.overlayFrom),
|
|
226719
227043
|
durationInFrames: info3.durationInFrames,
|
|
226720
227044
|
name: "<TS.Overlay>",
|
|
@@ -226726,7 +227050,7 @@ var TransitionSeriesChildren = ({
|
|
|
226726
227050
|
});
|
|
226727
227051
|
return [...mainChildren || [], ...overlayElements];
|
|
226728
227052
|
}, [flattedChildren, fps, frame2, onPrevElementImage, onNextElementImage]);
|
|
226729
|
-
return /* @__PURE__ */ (0,
|
|
227053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, {
|
|
226730
227054
|
children: childrenValue
|
|
226731
227055
|
});
|
|
226732
227056
|
};
|
|
@@ -226736,12 +227060,12 @@ var TransitionSeries = ({ children: children2, name: name2, layout: passedLayout
|
|
|
226736
227060
|
if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES && layout7 !== "absolute-fill") {
|
|
226737
227061
|
throw new TypeError(`The "layout" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);
|
|
226738
227062
|
}
|
|
226739
|
-
return /* @__PURE__ */ (0,
|
|
227063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226740
227064
|
name: displayName,
|
|
226741
227065
|
layout: layout7,
|
|
226742
227066
|
_remotionInternalDocumentationLink: name2 === void 0 ? "https://www.remotion.dev/docs/transitions/transitionseries" : void 0,
|
|
226743
227067
|
...otherProps,
|
|
226744
|
-
children: /* @__PURE__ */ (0,
|
|
227068
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TransitionSeriesChildren, {
|
|
226745
227069
|
children: children2
|
|
226746
227070
|
})
|
|
226747
227071
|
});
|
|
@@ -226755,7 +227079,7 @@ Internals.addSequenceStackTraces(SeriesOverlay);
|
|
|
226755
227079
|
|
|
226756
227080
|
// node_modules/@remotion/transitions/dist/esm/fade.mjs
|
|
226757
227081
|
var import_react120 = __toESM(require_react(), 1);
|
|
226758
|
-
var
|
|
227082
|
+
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
226759
227083
|
var FadePresentation = ({ children: children2, presentationDirection, presentationProgress, passedProps }) => {
|
|
226760
227084
|
const isEntering = presentationDirection === "entering";
|
|
226761
227085
|
const style4 = (0, import_react120.useMemo)(() => {
|
|
@@ -226771,7 +227095,7 @@ var FadePresentation = ({ children: children2, presentationDirection, presentati
|
|
|
226771
227095
|
presentationDirection,
|
|
226772
227096
|
presentationProgress
|
|
226773
227097
|
]);
|
|
226774
|
-
return /* @__PURE__ */ (0,
|
|
227098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(AbsoluteFill, {
|
|
226775
227099
|
style: style4,
|
|
226776
227100
|
children: children2
|
|
226777
227101
|
});
|
|
@@ -226785,7 +227109,7 @@ var fade4 = (props) => {
|
|
|
226785
227109
|
|
|
226786
227110
|
// node_modules/@remotion/transitions/dist/esm/slide.mjs
|
|
226787
227111
|
var import_react121 = __toESM(require_react(), 1);
|
|
226788
|
-
var
|
|
227112
|
+
var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
226789
227113
|
var epsilon7 = 0.01;
|
|
226790
227114
|
var SlidePresentation2 = ({
|
|
226791
227115
|
children: children2,
|
|
@@ -226848,7 +227172,7 @@ var SlidePresentation2 = ({
|
|
|
226848
227172
|
...presentationDirection === "entering" ? enterStyle : exitStyle
|
|
226849
227173
|
};
|
|
226850
227174
|
}, [directionStyle, enterStyle, exitStyle, presentationDirection]);
|
|
226851
|
-
return /* @__PURE__ */ (0,
|
|
227175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(AbsoluteFill, {
|
|
226852
227176
|
style: style4,
|
|
226853
227177
|
children: children2
|
|
226854
227178
|
});
|
|
@@ -226862,7 +227186,7 @@ var slide2 = (props) => {
|
|
|
226862
227186
|
|
|
226863
227187
|
// node_modules/@remotion/transitions/dist/esm/wipe.mjs
|
|
226864
227188
|
var import_react122 = __toESM(require_react(), 1);
|
|
226865
|
-
var
|
|
227189
|
+
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
226866
227190
|
var makePolygonIn = (progress2, direction2) => {
|
|
226867
227191
|
const p4 = progress2 * 100;
|
|
226868
227192
|
switch (direction2) {
|
|
@@ -226936,9 +227260,9 @@ var WipePresentation = ({
|
|
|
226936
227260
|
const outerStyle = (0, import_react122.useMemo)(() => {
|
|
226937
227261
|
return presentationDirection === "entering" ? outerEnterStyle : outerExitStyle;
|
|
226938
227262
|
}, [outerEnterStyle, outerExitStyle, presentationDirection]);
|
|
226939
|
-
return /* @__PURE__ */ (0,
|
|
227263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(AbsoluteFill, {
|
|
226940
227264
|
style: outerStyle,
|
|
226941
|
-
children: /* @__PURE__ */ (0,
|
|
227265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(AbsoluteFill, {
|
|
226942
227266
|
style: style4,
|
|
226943
227267
|
children: children2
|
|
226944
227268
|
})
|
|
@@ -226953,7 +227277,7 @@ var wipe = (props) => {
|
|
|
226953
227277
|
|
|
226954
227278
|
// node_modules/@remotion/transitions/dist/esm/flip.mjs
|
|
226955
227279
|
var import_react123 = __toESM(require_react(), 1);
|
|
226956
|
-
var
|
|
227280
|
+
var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
|
|
226957
227281
|
var Flip = ({
|
|
226958
227282
|
children: children2,
|
|
226959
227283
|
presentationDirection,
|
|
@@ -226994,9 +227318,9 @@ var Flip = ({
|
|
|
226994
227318
|
...presentationDirection === "entering" ? outerEnterStyle : outerExitStyle
|
|
226995
227319
|
};
|
|
226996
227320
|
}, [outerEnterStyle, outerExitStyle, perspective, presentationDirection]);
|
|
226997
|
-
return /* @__PURE__ */ (0,
|
|
227321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(AbsoluteFill, {
|
|
226998
227322
|
style: outer,
|
|
226999
|
-
children: /* @__PURE__ */ (0,
|
|
227323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(AbsoluteFill, {
|
|
227000
227324
|
style: style4,
|
|
227001
227325
|
children: children2
|
|
227002
227326
|
})
|
|
@@ -227416,9 +227740,6 @@ var translatePath = (path5, x7, y7) => {
|
|
|
227416
227740
|
// node_modules/@remotion/shapes/dist/esm/index.mjs
|
|
227417
227741
|
var import_react124 = __toESM(require_react(), 1);
|
|
227418
227742
|
var import_react_dom2 = __toESM(require_react_dom(), 1);
|
|
227419
|
-
var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
227420
|
-
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
227421
|
-
var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
|
|
227422
227743
|
var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
|
|
227423
227744
|
var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
|
|
227424
227745
|
var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -227426,6 +227747,9 @@ var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
|
|
|
227426
227747
|
var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
|
|
227427
227748
|
var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
|
|
227428
227749
|
var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
|
|
227750
|
+
var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
|
|
227751
|
+
var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
|
|
227752
|
+
var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
|
|
227429
227753
|
var getCoord = ({
|
|
227430
227754
|
counterClockwise,
|
|
227431
227755
|
actualProgress,
|
|
@@ -227534,7 +227858,7 @@ var makePie = ({
|
|
|
227534
227858
|
|
|
227535
227859
|
// node_modules/@remotion/transitions/dist/esm/clock-wipe.mjs
|
|
227536
227860
|
var import_react125 = __toESM(require_react(), 1);
|
|
227537
|
-
var
|
|
227861
|
+
var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
|
|
227538
227862
|
var ClockWipePresentation = ({ children: children2, presentationDirection, presentationProgress, passedProps }) => {
|
|
227539
227863
|
const finishedRadius = Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;
|
|
227540
227864
|
const { path: path5 } = makePie({
|
|
@@ -227562,9 +227886,9 @@ var ClockWipePresentation = ({ children: children2, presentationDirection, prese
|
|
|
227562
227886
|
passedProps.outerExitStyle,
|
|
227563
227887
|
presentationDirection
|
|
227564
227888
|
]);
|
|
227565
|
-
return /* @__PURE__ */ (0,
|
|
227889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(AbsoluteFill, {
|
|
227566
227890
|
style: outerStyle,
|
|
227567
|
-
children: /* @__PURE__ */ (0,
|
|
227891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(AbsoluteFill, {
|
|
227568
227892
|
style: style4,
|
|
227569
227893
|
children: children2
|
|
227570
227894
|
})
|
|
@@ -227687,7 +228011,7 @@ var React26 = __toESM(require_react(), 1);
|
|
|
227687
228011
|
|
|
227688
228012
|
// src/types/FrameSyncStyle.tsx
|
|
227689
228013
|
var React25 = __toESM(require_react(), 1);
|
|
227690
|
-
var
|
|
228014
|
+
var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
|
|
227691
228015
|
function FrameSyncStyle({
|
|
227692
228016
|
style: style4,
|
|
227693
228017
|
children: children2
|
|
@@ -227704,7 +228028,7 @@ function FrameSyncStyle({
|
|
|
227704
228028
|
animationDelay: `-${currentTime}s`
|
|
227705
228029
|
};
|
|
227706
228030
|
}, [style4, hasAnimation, frame2, fps]);
|
|
227707
|
-
return /* @__PURE__ */ (0,
|
|
228031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
227708
228032
|
"div",
|
|
227709
228033
|
{
|
|
227710
228034
|
style: {
|
|
@@ -227719,7 +228043,7 @@ function FrameSyncStyle({
|
|
|
227719
228043
|
}
|
|
227720
228044
|
|
|
227721
228045
|
// src/types/Video.tsx
|
|
227722
|
-
var
|
|
228046
|
+
var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
|
|
227723
228047
|
function resolveVideoSrc(src) {
|
|
227724
228048
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
227725
228049
|
return staticFile(src);
|
|
@@ -227739,14 +228063,14 @@ function VideoLeaf({ stream: stream3 }) {
|
|
|
227739
228063
|
const playbackRate = Math.min(1, toPlaybackRate((endAt - startFrom) / (end2 - start4)));
|
|
227740
228064
|
const streamStyle = cssJS(stream3.style);
|
|
227741
228065
|
const hasAnimation = "animation" in streamStyle;
|
|
227742
|
-
return /* @__PURE__ */ (0,
|
|
228066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
227743
228067
|
Sequence,
|
|
227744
228068
|
{
|
|
227745
228069
|
durationInFrames: Math.max(1, Math.floor(fps * (end2 - start4))),
|
|
227746
228070
|
from: Math.floor(fps * start4),
|
|
227747
228071
|
layout: "none",
|
|
227748
228072
|
showInTimeline: false,
|
|
227749
|
-
children: hasAnimation ? /* @__PURE__ */ (0,
|
|
228073
|
+
children: hasAnimation ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FrameSyncStyle, { style: streamStyle, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
227750
228074
|
OffthreadVideo,
|
|
227751
228075
|
{
|
|
227752
228076
|
src: resolvedSrc,
|
|
@@ -227758,7 +228082,7 @@ function VideoLeaf({ stream: stream3 }) {
|
|
|
227758
228082
|
showInTimeline: false,
|
|
227759
228083
|
style: { width: "100%", height: "100%" }
|
|
227760
228084
|
}
|
|
227761
|
-
) }) : /* @__PURE__ */ (0,
|
|
228085
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
227762
228086
|
OffthreadVideo,
|
|
227763
228087
|
{
|
|
227764
228088
|
src: resolvedSrc,
|
|
@@ -227777,7 +228101,7 @@ function VideoLeaf({ stream: stream3 }) {
|
|
|
227777
228101
|
|
|
227778
228102
|
// src/types/Audio.tsx
|
|
227779
228103
|
var React27 = __toESM(require_react(), 1);
|
|
227780
|
-
var
|
|
228104
|
+
var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
|
|
227781
228105
|
function resolveAudioSrc(src) {
|
|
227782
228106
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
227783
228107
|
return staticFile(src);
|
|
@@ -227797,7 +228121,7 @@ function AudioLeaf({ stream: stream3 }) {
|
|
|
227797
228121
|
const endAt = stream3.endAt ?? totalDur;
|
|
227798
228122
|
const volume = stream3.volume ?? 1;
|
|
227799
228123
|
const playbackRate = toPlaybackRate((endAt - startFrom) / (end2 - start4));
|
|
227800
|
-
return /* @__PURE__ */ (0,
|
|
228124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
227801
228125
|
Sequence,
|
|
227802
228126
|
{
|
|
227803
228127
|
name: stream3.src ?? "audio",
|
|
@@ -227805,7 +228129,7 @@ function AudioLeaf({ stream: stream3 }) {
|
|
|
227805
228129
|
from: Math.floor(fps * start4),
|
|
227806
228130
|
layout: "none",
|
|
227807
228131
|
showInTimeline: false,
|
|
227808
|
-
children: /* @__PURE__ */ (0,
|
|
228132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
227809
228133
|
Audio,
|
|
227810
228134
|
{
|
|
227811
228135
|
src: resolvedSrc,
|
|
@@ -227822,7 +228146,7 @@ function AudioLeaf({ stream: stream3 }) {
|
|
|
227822
228146
|
}
|
|
227823
228147
|
|
|
227824
228148
|
// src/types/Image.tsx
|
|
227825
|
-
var
|
|
228149
|
+
var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
|
|
227826
228150
|
function resolveImageSrc(src) {
|
|
227827
228151
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
227828
228152
|
return staticFile(src);
|
|
@@ -227835,13 +228159,13 @@ function ImageLeaf({ stream: stream3 }) {
|
|
|
227835
228159
|
useFrameEvents(stream3.on, Math.max(1, Math.floor(totalDur * fps)));
|
|
227836
228160
|
if (!stream3.src) return null;
|
|
227837
228161
|
const resolvedSrc = resolveImageSrc(stream3.src);
|
|
227838
|
-
return /* @__PURE__ */ (0,
|
|
228162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
227839
228163
|
Sequence,
|
|
227840
228164
|
{
|
|
227841
228165
|
durationInFrames: Math.max(1, Math.floor(fps * (end2 - start4))),
|
|
227842
228166
|
from: Math.floor(fps * start4),
|
|
227843
228167
|
layout: "none",
|
|
227844
|
-
children: /* @__PURE__ */ (0,
|
|
228168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FrameSyncStyle, { style: cssJS(stream3.style), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
227845
228169
|
Img,
|
|
227846
228170
|
{
|
|
227847
228171
|
src: resolvedSrc,
|
|
@@ -239304,7 +239628,7 @@ function useTweenBindings(action) {
|
|
|
239304
239628
|
}
|
|
239305
239629
|
|
|
239306
239630
|
// src/types/Component.tsx
|
|
239307
|
-
var
|
|
239631
|
+
var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
|
|
239308
239632
|
function TweenedJsxParser({
|
|
239309
239633
|
jsx: jsx84,
|
|
239310
239634
|
components: components3,
|
|
@@ -239312,7 +239636,7 @@ function TweenedJsxParser({
|
|
|
239312
239636
|
action
|
|
239313
239637
|
}) {
|
|
239314
239638
|
const tweenBindings = useTweenBindings(action);
|
|
239315
|
-
return /* @__PURE__ */ (0,
|
|
239639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_jsx_runtime87.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239316
239640
|
source_default,
|
|
239317
239641
|
{
|
|
239318
239642
|
components: components3,
|
|
@@ -239321,7 +239645,7 @@ function TweenedJsxParser({
|
|
|
239321
239645
|
renderInWrapper: false,
|
|
239322
239646
|
blacklistedAttrs: [],
|
|
239323
239647
|
disableKeyGeneration: true,
|
|
239324
|
-
renderError: ({ error: error51 }) => /* @__PURE__ */ (0,
|
|
239648
|
+
renderError: ({ error: error51 }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { style: { color: "red", padding: 20, fontSize: "larger" }, children: error51 })
|
|
239325
239649
|
}
|
|
239326
239650
|
) });
|
|
239327
239651
|
}
|
|
@@ -239347,13 +239671,13 @@ function ComponentLeaf({ stream: stream3 }) {
|
|
|
239347
239671
|
const start4 = stream3.start ?? 0;
|
|
239348
239672
|
const end2 = stream3.end ?? start4 + (stream3.duration ?? 1);
|
|
239349
239673
|
const durFrames = Math.max(1, Math.floor(fps * (end2 - start4)));
|
|
239350
|
-
return /* @__PURE__ */ (0,
|
|
239674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239351
239675
|
Sequence,
|
|
239352
239676
|
{
|
|
239353
239677
|
durationInFrames: durFrames,
|
|
239354
239678
|
from: Math.floor(fps * start4),
|
|
239355
239679
|
layout: "none",
|
|
239356
|
-
children: /* @__PURE__ */ (0,
|
|
239680
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239357
239681
|
EventAwareComponent,
|
|
239358
239682
|
{
|
|
239359
239683
|
jsx: stream3.jsx,
|
|
@@ -239376,7 +239700,7 @@ function EventAwareComponent({
|
|
|
239376
239700
|
on: on3
|
|
239377
239701
|
}) {
|
|
239378
239702
|
useFrameEvents(on3, durFrames);
|
|
239379
|
-
return /* @__PURE__ */ (0,
|
|
239703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239380
239704
|
TweenedJsxParser,
|
|
239381
239705
|
{
|
|
239382
239706
|
jsx: jsx84,
|
|
@@ -239388,7 +239712,7 @@ function EventAwareComponent({
|
|
|
239388
239712
|
}
|
|
239389
239713
|
|
|
239390
239714
|
// src/types/Rhythm.tsx
|
|
239391
|
-
var
|
|
239715
|
+
var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
|
|
239392
239716
|
function resolveAudioSrc2(src) {
|
|
239393
239717
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
239394
239718
|
return staticFile(src);
|
|
@@ -239403,7 +239727,7 @@ function RhythmLeaf({ stream: stream3 }) {
|
|
|
239403
239727
|
if (!stream3.src || environment.isStudio) return null;
|
|
239404
239728
|
const resolvedSrc = resolveAudioSrc2(stream3.src);
|
|
239405
239729
|
const volume = stream3.volume ?? 1;
|
|
239406
|
-
return /* @__PURE__ */ (0,
|
|
239730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
239407
239731
|
Sequence,
|
|
239408
239732
|
{
|
|
239409
239733
|
name: stream3.src ?? "rhythm",
|
|
@@ -239411,7 +239735,7 @@ function RhythmLeaf({ stream: stream3 }) {
|
|
|
239411
239735
|
from: Math.floor(fps * start4),
|
|
239412
239736
|
layout: "none",
|
|
239413
239737
|
showInTimeline: false,
|
|
239414
|
-
children: /* @__PURE__ */ (0,
|
|
239738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
239415
239739
|
Audio,
|
|
239416
239740
|
{
|
|
239417
239741
|
src: resolvedSrc,
|
|
@@ -241748,7 +242072,7 @@ var Rectangle = (0, import_react127.forwardRef)((props, ref2) => {
|
|
|
241748
242072
|
Rectangle.displayName = "Rectangle";
|
|
241749
242073
|
|
|
241750
242074
|
// src/types/Map.tsx
|
|
241751
|
-
var
|
|
242075
|
+
var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
|
|
241752
242076
|
function resolveApiKey(stream3) {
|
|
241753
242077
|
if (stream3.googleMapsApiKey) return stream3.googleMapsApiKey;
|
|
241754
242078
|
if (typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.GOOGLE_MAPS_API_KEY) {
|
|
@@ -241756,6 +242080,14 @@ function resolveApiKey(stream3) {
|
|
|
241756
242080
|
}
|
|
241757
242081
|
return "";
|
|
241758
242082
|
}
|
|
242083
|
+
function resolveMapLocale(language, region) {
|
|
242084
|
+
if (!language) return { language: void 0, region };
|
|
242085
|
+
const lang = language.trim().toLowerCase();
|
|
242086
|
+
if (lang === "zh") return { language: "zh-CN", region: region ?? "CN" };
|
|
242087
|
+
if (lang === "en") return { language: "en", region: region ?? "US" };
|
|
242088
|
+
if (lang.startsWith("zh-")) return { language, region: region ?? "CN" };
|
|
242089
|
+
return { language, region };
|
|
242090
|
+
}
|
|
241759
242091
|
function MapLeaf({ stream: stream3 }) {
|
|
241760
242092
|
const { fps } = useVideoConfig();
|
|
241761
242093
|
const waypoints = stream3.waypoints ?? [];
|
|
@@ -241771,35 +242103,74 @@ function MapLeaf({ stream: stream3 }) {
|
|
|
241771
242103
|
const mapType = stream3.mapType ?? "roadmap";
|
|
241772
242104
|
const travelMode = stream3.travelMode ?? "DRIVING";
|
|
241773
242105
|
const markerEmoji = stream3.routeMarker ?? "\u{1F697}";
|
|
241774
|
-
|
|
242106
|
+
const mapLocale = import_react128.default.useMemo(
|
|
242107
|
+
() => resolveMapLocale(stream3.language, stream3.region),
|
|
242108
|
+
[stream3.language, stream3.region]
|
|
242109
|
+
);
|
|
242110
|
+
const mapLoadHandleRef = import_react128.default.useRef(null);
|
|
242111
|
+
const mapLoadContinuedRef = import_react128.default.useRef(false);
|
|
242112
|
+
import_react128.default.useEffect(() => {
|
|
242113
|
+
mapLoadHandleRef.current = delayRender("Waiting for map tiles to load...");
|
|
242114
|
+
mapLoadContinuedRef.current = false;
|
|
242115
|
+
const fallbackTimer = window.setTimeout(() => {
|
|
242116
|
+
if (!mapLoadContinuedRef.current && mapLoadHandleRef.current !== null) {
|
|
242117
|
+
continueRender(mapLoadHandleRef.current);
|
|
242118
|
+
mapLoadContinuedRef.current = true;
|
|
242119
|
+
}
|
|
242120
|
+
}, 8e3);
|
|
242121
|
+
return () => {
|
|
242122
|
+
window.clearTimeout(fallbackTimer);
|
|
242123
|
+
if (!mapLoadContinuedRef.current && mapLoadHandleRef.current !== null) {
|
|
242124
|
+
continueRender(mapLoadHandleRef.current);
|
|
242125
|
+
mapLoadContinuedRef.current = true;
|
|
242126
|
+
}
|
|
242127
|
+
mapLoadHandleRef.current = null;
|
|
242128
|
+
};
|
|
242129
|
+
}, [stream3.id, start4, end2]);
|
|
242130
|
+
const handleTilesLoaded = import_react128.default.useCallback(() => {
|
|
242131
|
+
if (!mapLoadContinuedRef.current && mapLoadHandleRef.current !== null) {
|
|
242132
|
+
continueRender(mapLoadHandleRef.current);
|
|
242133
|
+
mapLoadContinuedRef.current = true;
|
|
242134
|
+
}
|
|
242135
|
+
}, []);
|
|
242136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
241775
242137
|
Sequence,
|
|
241776
242138
|
{
|
|
241777
242139
|
durationInFrames: durFrames,
|
|
241778
242140
|
from: Math.floor(fps * start4),
|
|
241779
242141
|
layout: "none",
|
|
241780
|
-
children: /* @__PURE__ */ (0,
|
|
241781
|
-
|
|
242142
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
242143
|
+
APIProvider,
|
|
241782
242144
|
{
|
|
241783
|
-
|
|
241784
|
-
|
|
241785
|
-
|
|
241786
|
-
|
|
241787
|
-
|
|
241788
|
-
disableDefaultUI: true,
|
|
241789
|
-
zoomControl: false
|
|
241790
|
-
},
|
|
241791
|
-
style: { width: "100%", height: "100%", position: "absolute" },
|
|
241792
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
241793
|
-
RouteWithMarker,
|
|
242145
|
+
apiKey,
|
|
242146
|
+
language: mapLocale.language,
|
|
242147
|
+
region: mapLocale.region,
|
|
242148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
242149
|
+
Map4,
|
|
241794
242150
|
{
|
|
241795
|
-
|
|
241796
|
-
|
|
241797
|
-
|
|
241798
|
-
|
|
242151
|
+
mapId: String(stream3.id ?? "map"),
|
|
242152
|
+
defaultCenter: center4,
|
|
242153
|
+
defaultZoom: zoom2,
|
|
242154
|
+
defaultOptions: {
|
|
242155
|
+
mapTypeId: mapType,
|
|
242156
|
+
disableDefaultUI: true,
|
|
242157
|
+
zoomControl: false
|
|
242158
|
+
},
|
|
242159
|
+
onTilesLoaded: handleTilesLoaded,
|
|
242160
|
+
style: { width: "100%", height: "100%", position: "absolute" },
|
|
242161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
242162
|
+
RouteWithMarker,
|
|
242163
|
+
{
|
|
242164
|
+
waypoints,
|
|
242165
|
+
travelMode,
|
|
242166
|
+
markerEmoji,
|
|
242167
|
+
actionDuration: end2 - start4
|
|
242168
|
+
}
|
|
242169
|
+
)
|
|
241799
242170
|
}
|
|
241800
242171
|
)
|
|
241801
242172
|
}
|
|
241802
|
-
)
|
|
242173
|
+
)
|
|
241803
242174
|
}
|
|
241804
242175
|
);
|
|
241805
242176
|
}
|
|
@@ -241842,8 +242213,8 @@ function RouteWithMarker({
|
|
|
241842
242213
|
setRouteIndex((prev2) => prev2);
|
|
241843
242214
|
}, [routeIndex]);
|
|
241844
242215
|
const position7 = useAnimatedPosition({ leg, actionDuration, waypoints });
|
|
241845
|
-
return /* @__PURE__ */ (0,
|
|
241846
|
-
waypoints.map((wp, i5) => /* @__PURE__ */ (0,
|
|
242216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
|
|
242217
|
+
waypoints.map((wp, i5) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(AdvancedMarker, { position: wp, children: wp.label ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
241847
242218
|
"div",
|
|
241848
242219
|
{
|
|
241849
242220
|
style: {
|
|
@@ -241860,7 +242231,7 @@ function RouteWithMarker({
|
|
|
241860
242231
|
children: wp.label
|
|
241861
242232
|
}
|
|
241862
242233
|
) : null }, i5)),
|
|
241863
|
-
position7 ? /* @__PURE__ */ (0,
|
|
242234
|
+
position7 ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(AdvancedMarker, { position: position7, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Pin, { glyphText: markerEmoji, scale: 4 }) }) : null
|
|
241864
242235
|
] });
|
|
241865
242236
|
}
|
|
241866
242237
|
function useAnimatedPosition({
|
|
@@ -241925,7 +242296,7 @@ function getCurrentStep(leg, currentInSecond) {
|
|
|
241925
242296
|
|
|
241926
242297
|
// src/types/Include.tsx
|
|
241927
242298
|
var React44 = __toESM(require_react(), 1);
|
|
241928
|
-
var
|
|
242299
|
+
var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
|
|
241929
242300
|
function isSceneBased(data7) {
|
|
241930
242301
|
if (!data7 || typeof data7 !== "object") return false;
|
|
241931
242302
|
const d4 = data7;
|
|
@@ -242040,7 +242411,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242040
242411
|
const renderExternalContent = React44.useCallback(() => {
|
|
242041
242412
|
if (!externalData) return null;
|
|
242042
242413
|
if (loadError) {
|
|
242043
|
-
return /* @__PURE__ */ (0,
|
|
242414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { style: { color: "#ff4444", fontSize: 24, padding: 40 }, children: [
|
|
242044
242415
|
"\u26A0 Include load error: ",
|
|
242045
242416
|
loadError
|
|
242046
242417
|
] });
|
|
@@ -242049,19 +242420,19 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242049
242420
|
const vj = externalData;
|
|
242050
242421
|
const vjFps = vj.meta.fps ?? parentFps;
|
|
242051
242422
|
const dims = { width: parentWidth, height: parentHeight };
|
|
242052
|
-
return /* @__PURE__ */ (0,
|
|
242053
|
-
vj.bgm && /* @__PURE__ */ (0,
|
|
242423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(AbsoluteFill, { style: { backgroundColor: "#0a0a0a", width: dims.width, height: dims.height }, children: [
|
|
242424
|
+
vj.bgm && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Audio, { src: vj.bgm.src, volume: vj.bgm.baseVolume }),
|
|
242054
242425
|
vj.scenes.map((scene2) => {
|
|
242055
242426
|
const startFrame = Math.round((scene2.start ?? 0) * vjFps);
|
|
242056
242427
|
const durFrames2 = Math.round((scene2.duration ?? 1) * vjFps);
|
|
242057
|
-
return /* @__PURE__ */ (0,
|
|
242428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
242058
242429
|
Sequence,
|
|
242059
242430
|
{
|
|
242060
242431
|
from: startFrame,
|
|
242061
242432
|
durationInFrames: durFrames2,
|
|
242062
242433
|
name: `${scene2.id}:${scene2.component}`,
|
|
242063
242434
|
children: [
|
|
242064
|
-
/* @__PURE__ */ (0,
|
|
242435
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
242065
242436
|
AbsoluteFill,
|
|
242066
242437
|
{
|
|
242067
242438
|
style: {
|
|
@@ -242072,7 +242443,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242072
242443
|
padding: 60
|
|
242073
242444
|
},
|
|
242074
242445
|
children: [
|
|
242075
|
-
/* @__PURE__ */ (0,
|
|
242446
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242076
242447
|
"div",
|
|
242077
242448
|
{
|
|
242078
242449
|
style: {
|
|
@@ -242086,7 +242457,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242086
242457
|
children: scene2.props?.headline ?? scene2.id
|
|
242087
242458
|
}
|
|
242088
242459
|
),
|
|
242089
|
-
scene2.props?.subhead && /* @__PURE__ */ (0,
|
|
242460
|
+
scene2.props?.subhead && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242090
242461
|
"div",
|
|
242091
242462
|
{
|
|
242092
242463
|
style: {
|
|
@@ -242101,7 +242472,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242101
242472
|
]
|
|
242102
242473
|
}
|
|
242103
242474
|
),
|
|
242104
|
-
scene2.voiceover?.audio && /* @__PURE__ */ (0,
|
|
242475
|
+
scene2.voiceover?.audio && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Audio, { src: scene2.voiceover.audio, volume: 1 })
|
|
242105
242476
|
]
|
|
242106
242477
|
},
|
|
242107
242478
|
scene2.id
|
|
@@ -242116,7 +242487,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242116
242487
|
height: streamTree.height ?? parentHeight,
|
|
242117
242488
|
fps: streamTree.fps ?? parentFps
|
|
242118
242489
|
};
|
|
242119
|
-
return /* @__PURE__ */ (0,
|
|
242490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242120
242491
|
"div",
|
|
242121
242492
|
{
|
|
242122
242493
|
style: {
|
|
@@ -242125,7 +242496,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242125
242496
|
overflow: "hidden",
|
|
242126
242497
|
position: "relative"
|
|
242127
242498
|
},
|
|
242128
|
-
children: /* @__PURE__ */ (0,
|
|
242499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FolderLeaf, { stream: merged })
|
|
242129
242500
|
}
|
|
242130
242501
|
);
|
|
242131
242502
|
}, [externalData, loadError, parentFps, parentWidth, parentHeight]);
|
|
@@ -242133,7 +242504,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242133
242504
|
const durFrames = Math.max(1, Math.floor(parentFps * dur));
|
|
242134
242505
|
let innerNode;
|
|
242135
242506
|
if (!stream3.src && stream3.children?.length) {
|
|
242136
|
-
innerNode = /* @__PURE__ */ (0,
|
|
242507
|
+
innerNode = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242137
242508
|
Container,
|
|
242138
242509
|
{
|
|
242139
242510
|
id: stream3.id,
|
|
@@ -242146,11 +242517,11 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242146
242517
|
position: "relative"
|
|
242147
242518
|
},
|
|
242148
242519
|
className: `include ${toClassName(stream3.id ?? "")}`,
|
|
242149
|
-
children: /* @__PURE__ */ (0,
|
|
242520
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FolderLeaf, { stream: stream3 })
|
|
242150
242521
|
}
|
|
242151
242522
|
);
|
|
242152
242523
|
} else if (externalData || loadError) {
|
|
242153
|
-
innerNode = /* @__PURE__ */ (0,
|
|
242524
|
+
innerNode = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242154
242525
|
"div",
|
|
242155
242526
|
{
|
|
242156
242527
|
style: {
|
|
@@ -242163,7 +242534,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242163
242534
|
}
|
|
242164
242535
|
);
|
|
242165
242536
|
} else {
|
|
242166
|
-
innerNode = /* @__PURE__ */ (0,
|
|
242537
|
+
innerNode = /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
242167
242538
|
"div",
|
|
242168
242539
|
{
|
|
242169
242540
|
style: {
|
|
@@ -242183,7 +242554,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242183
242554
|
}
|
|
242184
242555
|
);
|
|
242185
242556
|
}
|
|
242186
|
-
const sequence = /* @__PURE__ */ (0,
|
|
242557
|
+
const sequence = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242187
242558
|
Sequence,
|
|
242188
242559
|
{
|
|
242189
242560
|
durationInFrames: durFrames,
|
|
@@ -242194,16 +242565,16 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242194
242565
|
}
|
|
242195
242566
|
);
|
|
242196
242567
|
const needsNestedContext = subRegistry !== null && subRegistry !== parentCompose.components;
|
|
242197
|
-
const inner3 = /* @__PURE__ */ (0,
|
|
242568
|
+
const inner3 = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(AudioContext2.Provider, { value: audioCtx, children: sequence });
|
|
242198
242569
|
if (needsNestedContext && subRegistryLoaded) {
|
|
242199
|
-
return /* @__PURE__ */ (0,
|
|
242570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ComposeContext.Provider, { value: mergedCompose, children: inner3 });
|
|
242200
242571
|
}
|
|
242201
242572
|
return inner3;
|
|
242202
242573
|
}
|
|
242203
242574
|
|
|
242204
242575
|
// src/types/Scene.tsx
|
|
242205
242576
|
var React45 = __toESM(require_react(), 1);
|
|
242206
|
-
var
|
|
242577
|
+
var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
|
|
242207
242578
|
function SceneLeaf({ stream: stream3 }) {
|
|
242208
242579
|
const { Container } = React45.useContext(ComposeContext);
|
|
242209
242580
|
const parentAudio = React45.useContext(AudioContext2);
|
|
@@ -242213,14 +242584,14 @@ function SceneLeaf({ stream: stream3 }) {
|
|
|
242213
242584
|
() => ({ id: stream3.id, parent: parentAudio }),
|
|
242214
242585
|
[stream3.id, parentAudio]
|
|
242215
242586
|
);
|
|
242216
|
-
return /* @__PURE__ */ (0,
|
|
242587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(AudioContext2.Provider, { value: audioCtx, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
242217
242588
|
Container,
|
|
242218
242589
|
{
|
|
242219
242590
|
id: stream3.id,
|
|
242220
242591
|
type: "scene",
|
|
242221
242592
|
style: cssJS(stream3.style),
|
|
242222
242593
|
className: `scene ${toClassName(stream3.name ?? "")}`,
|
|
242223
|
-
children: /* @__PURE__ */ (0,
|
|
242594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Folder, { name: stream3.name ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FolderLeaf, { stream: stream3 }) })
|
|
242224
242595
|
}
|
|
242225
242596
|
) });
|
|
242226
242597
|
}
|
|
@@ -242612,7 +242983,7 @@ var builtinAnimations = {
|
|
|
242612
242983
|
};
|
|
242613
242984
|
|
|
242614
242985
|
// src/types/Effect.tsx
|
|
242615
|
-
var
|
|
242986
|
+
var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
|
|
242616
242987
|
function EffectWrapper({
|
|
242617
242988
|
stream: stream3,
|
|
242618
242989
|
children: children2
|
|
@@ -242655,8 +243026,8 @@ function EffectWrapper({
|
|
|
242655
243026
|
}
|
|
242656
243027
|
return Object.keys(style4).length > 0 ? [style4] : [];
|
|
242657
243028
|
}, [frame2, fps, startSec, endSec, stream3.animation, stream3.animationTimingFunction, stream3.animationIterationCount, stream3.customKeyframes, stream3.style]);
|
|
242658
|
-
if (styles7.length === 0) return /* @__PURE__ */ (0,
|
|
242659
|
-
return /* @__PURE__ */ (0,
|
|
243029
|
+
if (styles7.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children: children2 });
|
|
243030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
242660
243031
|
"div",
|
|
242661
243032
|
{
|
|
242662
243033
|
style: Object.assign({ width: width3, height: height2, position: "absolute", inset: 0 }, ...styles7),
|
|
@@ -242667,7 +243038,7 @@ function EffectWrapper({
|
|
|
242667
243038
|
}
|
|
242668
243039
|
|
|
242669
243040
|
// src/types/Folder.tsx
|
|
242670
|
-
var
|
|
243041
|
+
var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
|
|
242671
243042
|
var Leaves = {
|
|
242672
243043
|
video: VideoLeaf,
|
|
242673
243044
|
audio: AudioLeaf,
|
|
@@ -242685,8 +243056,8 @@ var TransitionPresets = {
|
|
|
242685
243056
|
flip,
|
|
242686
243057
|
clockWipe
|
|
242687
243058
|
};
|
|
242688
|
-
var NotSeries = ({ children: children2 }) => /* @__PURE__ */ (0,
|
|
242689
|
-
NotSeries.Sequence = ({ children: children2 }) => /* @__PURE__ */ (0,
|
|
243059
|
+
var NotSeries = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, { children: children2 });
|
|
243060
|
+
NotSeries.Sequence = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, { children: children2 });
|
|
242690
243061
|
function FolderLeaf({ stream: stream3 }) {
|
|
242691
243062
|
const { fps, width: width3, height: height2 } = useVideoConfig();
|
|
242692
243063
|
const { Container } = React47.useContext(ComposeContext);
|
|
@@ -242711,7 +243082,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242711
243082
|
const presentation = TransitionPresets[transition2]?.(
|
|
242712
243083
|
transition2 === "clockWipe" ? { width: width3, height: height2 } : void 0
|
|
242713
243084
|
);
|
|
242714
|
-
return /* @__PURE__ */ (0,
|
|
243085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
242715
243086
|
TransitionSeries.Transition,
|
|
242716
243087
|
{
|
|
242717
243088
|
presentation,
|
|
@@ -242724,8 +243095,8 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242724
243095
|
const durFrames = Math.max(1, Math.floor(dur * fps));
|
|
242725
243096
|
const SequenceWrap = TypedSeries.Sequence ?? Sequence;
|
|
242726
243097
|
const isLeaf = child.type !== "folder" && child.type !== "root" && child.type !== "effect";
|
|
242727
|
-
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0,
|
|
242728
|
-
return /* @__PURE__ */ (0,
|
|
243098
|
+
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(EffectWrapper, { stream: child, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FolderLeaf, { stream: child }) }) : React47.createElement(FolderLeaf, { stream: child });
|
|
243099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SequenceWrap, { durationInFrames: durFrames, layout: "none", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
242729
243100
|
Container,
|
|
242730
243101
|
{
|
|
242731
243102
|
id: child.id,
|
|
@@ -242736,12 +243107,12 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242736
243107
|
}
|
|
242737
243108
|
) }, child.id);
|
|
242738
243109
|
}).filter(Boolean);
|
|
242739
|
-
const bgContent = bgChildren.length > 0 && /* @__PURE__ */ (0,
|
|
243110
|
+
const bgContent = bgChildren.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: bgChildren.map((child) => {
|
|
242740
243111
|
const dur = child.durationInSeconds ?? 0;
|
|
242741
243112
|
const durFrames = Math.max(1, Math.floor(dur * fps));
|
|
242742
243113
|
const isLeaf = child.type !== "folder" && child.type !== "root" && child.type !== "effect";
|
|
242743
|
-
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0,
|
|
242744
|
-
const wrapped = /* @__PURE__ */ (0,
|
|
243114
|
+
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(EffectWrapper, { stream: child, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FolderLeaf, { stream: child }) }) : React47.createElement(FolderLeaf, { stream: child });
|
|
243115
|
+
const wrapped = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
242745
243116
|
Container,
|
|
242746
243117
|
{
|
|
242747
243118
|
id: child.id,
|
|
@@ -242752,7 +243123,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242752
243123
|
}
|
|
242753
243124
|
);
|
|
242754
243125
|
const times = Math.max(1, Math.ceil(stream3.durationInSeconds * fps / durFrames));
|
|
242755
|
-
return /* @__PURE__ */ (0,
|
|
243126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Loop, { durationInFrames: durFrames, times, showInTimeline: false, children: wrapped }, child.id);
|
|
242756
243127
|
}) });
|
|
242757
243128
|
if (isSeries && transEl) {
|
|
242758
243129
|
for (let i5 = 1; i5 < sequences.length; i5 += 2) {
|
|
@@ -242766,7 +243137,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242766
243137
|
if (visibleChildren.length === 0 || stream3.visible === false) return null;
|
|
242767
243138
|
const containerStyle3 = cssJS(stream3.style);
|
|
242768
243139
|
const orientation = isRoot ? width3 > height2 ? "landscape" : "portrait" : "";
|
|
242769
|
-
return /* @__PURE__ */ (0,
|
|
243140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(AudioContext2.Provider, { value: audioCtx, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
242770
243141
|
Container,
|
|
242771
243142
|
{
|
|
242772
243143
|
id: stream3.id,
|
|
@@ -242775,7 +243146,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242775
243146
|
className: `${orientation} ${stream3.type}`.trim(),
|
|
242776
243147
|
children: [
|
|
242777
243148
|
bgContent,
|
|
242778
|
-
isSeries ? /* @__PURE__ */ (0,
|
|
243149
|
+
isSeries ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TypedSeries, { children: sequences }) : sequences
|
|
242779
243150
|
]
|
|
242780
243151
|
}
|
|
242781
243152
|
) });
|
|
@@ -243034,7 +243405,7 @@ var P3 = function(t4) {
|
|
|
243034
243405
|
};
|
|
243035
243406
|
|
|
243036
243407
|
// src/types/Subtitle.tsx
|
|
243037
|
-
var
|
|
243408
|
+
var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
|
|
243038
243409
|
var { SubtitleSequence: _SubtitleSeq, ...CaptionComponents } = index_esm_exports;
|
|
243039
243410
|
function resolveSubtitleSrc(src) {
|
|
243040
243411
|
if (src.startsWith("http://") || src.startsWith("https://") || src.startsWith("data:") || src.startsWith("/")) {
|
|
@@ -243067,7 +243438,7 @@ function resolveCaption(type3) {
|
|
|
243067
243438
|
return CaptionComponents[key] ?? CaptionComponents.Caption;
|
|
243068
243439
|
}
|
|
243069
243440
|
function supportHtml(text10) {
|
|
243070
|
-
const el = { .../* @__PURE__ */ (0,
|
|
243441
|
+
const el = { .../* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { dangerouslySetInnerHTML: { __html: text10 } }) };
|
|
243071
243442
|
Object.assign(el, {
|
|
243072
243443
|
length: text10.length,
|
|
243073
243444
|
slice(start4, end2) {
|
|
@@ -243091,7 +243462,7 @@ function supportHtml(text10) {
|
|
|
243091
243462
|
counter++;
|
|
243092
243463
|
}
|
|
243093
243464
|
}
|
|
243094
|
-
return /* @__PURE__ */ (0,
|
|
243465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { dangerouslySetInnerHTML: { __html: chars.join("") } });
|
|
243095
243466
|
},
|
|
243096
243467
|
split(separator, limit2) {
|
|
243097
243468
|
const stripped = text10.replace(/<.*?>/g, "");
|
|
@@ -243144,7 +243515,7 @@ function CueFrame({
|
|
|
243144
243515
|
}),
|
|
243145
243516
|
[subtitle.fontSize, subtitle.fontFamily, subtitle.fontStyle]
|
|
243146
243517
|
);
|
|
243147
|
-
return /* @__PURE__ */ (0,
|
|
243518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Sequence, { layout: "none", durationInFrames, from: from2, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243148
243519
|
GroupedCueInner,
|
|
243149
243520
|
{
|
|
243150
243521
|
group: group2,
|
|
@@ -243170,7 +243541,7 @@ function GroupedCueInner({
|
|
|
243170
243541
|
}
|
|
243171
243542
|
}
|
|
243172
243543
|
const captionText = React48.useMemo(() => supportHtml(activeCue.text), [activeCue.text]);
|
|
243173
|
-
return /* @__PURE__ */ (0,
|
|
243544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CaptionComponent, { text: captionText, style: textStyle });
|
|
243174
243545
|
}
|
|
243175
243546
|
function SubtitleOverlay({ subtitle }) {
|
|
243176
243547
|
const { fps } = useVideoConfig();
|
|
@@ -243219,7 +243590,7 @@ function SubtitleOverlay({ subtitle }) {
|
|
|
243219
243590
|
const cueGroups = React48.useMemo(() => cues ? groupConsecutiveCues(cues) : [], [cues]);
|
|
243220
243591
|
if (!cues) return null;
|
|
243221
243592
|
const boxCss = subtitle.style ? cssJS(subtitle.style) : {};
|
|
243222
|
-
return /* @__PURE__ */ (0,
|
|
243593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `${subtitle.type || "default"} subtitle-overlay`, style: { ...DEFAULT_BOX_STYLE, ...boxCss }, children: cueGroups.map((group2, gi) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243223
243594
|
CueFrame,
|
|
243224
243595
|
{
|
|
243225
243596
|
cue: group2[0],
|
|
@@ -243232,325 +243603,6 @@ function SubtitleOverlay({ subtitle }) {
|
|
|
243232
243603
|
)) });
|
|
243233
243604
|
}
|
|
243234
243605
|
|
|
243235
|
-
// src/components/StoryboardSlot.tsx
|
|
243236
|
-
var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
|
|
243237
|
-
function StoryboardSlot({ kind, prompt }) {
|
|
243238
|
-
const isVideo = kind === "video";
|
|
243239
|
-
const bgGrad = isVideo ? "linear-gradient(135deg,#7c2d12,#b91c1c)" : "linear-gradient(135deg,#1e3a8a,#6d28d9)";
|
|
243240
|
-
const accentColor = isVideo ? "#fbbf24" : "#93c5fd";
|
|
243241
|
-
const label3 = isVideo ? "Video" : "Image";
|
|
243242
|
-
const emoji3 = isVideo ? "\u{1F3AC}" : "\u{1F5BC}\uFE0F";
|
|
243243
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
243244
|
-
"div",
|
|
243245
|
-
{
|
|
243246
|
-
style: {
|
|
243247
|
-
position: "absolute",
|
|
243248
|
-
inset: 0,
|
|
243249
|
-
overflow: "hidden",
|
|
243250
|
-
display: "flex",
|
|
243251
|
-
flexDirection: "column",
|
|
243252
|
-
alignItems: "center",
|
|
243253
|
-
justifyContent: "center",
|
|
243254
|
-
background: bgGrad,
|
|
243255
|
-
color: "#fff",
|
|
243256
|
-
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
243257
|
-
padding: "6%",
|
|
243258
|
-
boxSizing: "border-box"
|
|
243259
|
-
},
|
|
243260
|
-
children: [
|
|
243261
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
243262
|
-
"div",
|
|
243263
|
-
{
|
|
243264
|
-
style: {
|
|
243265
|
-
position: "absolute",
|
|
243266
|
-
inset: "4%",
|
|
243267
|
-
border: "3px dashed rgba(255,255,255,0.35)",
|
|
243268
|
-
borderRadius: 24,
|
|
243269
|
-
pointerEvents: "none"
|
|
243270
|
-
}
|
|
243271
|
-
}
|
|
243272
|
-
),
|
|
243273
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
243274
|
-
"div",
|
|
243275
|
-
{
|
|
243276
|
-
style: {
|
|
243277
|
-
display: "flex",
|
|
243278
|
-
alignItems: "center",
|
|
243279
|
-
gap: "0.5em",
|
|
243280
|
-
background: "rgba(0,0,0,0.35)",
|
|
243281
|
-
border: `2px solid ${accentColor}`,
|
|
243282
|
-
borderRadius: 999,
|
|
243283
|
-
padding: "0.5em 1.1em",
|
|
243284
|
-
fontSize: "2.2vh",
|
|
243285
|
-
fontWeight: 800,
|
|
243286
|
-
letterSpacing: "0.12em",
|
|
243287
|
-
marginBottom: "3vh"
|
|
243288
|
-
},
|
|
243289
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { style: { fontSize: "3.4vh", lineHeight: 1 }, children: emoji3 })
|
|
243290
|
-
}
|
|
243291
|
-
),
|
|
243292
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
243293
|
-
"div",
|
|
243294
|
-
{
|
|
243295
|
-
style: {
|
|
243296
|
-
position: "relative",
|
|
243297
|
-
maxWidth: "88%",
|
|
243298
|
-
textAlign: "center",
|
|
243299
|
-
fontSize: "3.4vh",
|
|
243300
|
-
lineHeight: 1.4,
|
|
243301
|
-
fontWeight: 600,
|
|
243302
|
-
textShadow: "0 2px 8px rgba(0,0,0,0.5)",
|
|
243303
|
-
whiteSpace: "pre-wrap",
|
|
243304
|
-
wordBreak: "break-word"
|
|
243305
|
-
},
|
|
243306
|
-
children: prompt ?? (isVideo ? "(no video prompt)" : "(no image prompt)")
|
|
243307
|
-
}
|
|
243308
|
-
)
|
|
243309
|
-
]
|
|
243310
|
-
}
|
|
243311
|
-
);
|
|
243312
|
-
}
|
|
243313
|
-
|
|
243314
|
-
// src/components/StoryboardCaption.tsx
|
|
243315
|
-
var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
|
|
243316
|
-
function StoryboardCaption({ script: script2, speaker }) {
|
|
243317
|
-
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
243318
|
-
"div",
|
|
243319
|
-
{
|
|
243320
|
-
style: {
|
|
243321
|
-
position: "absolute",
|
|
243322
|
-
bottom: "10%",
|
|
243323
|
-
left: "5%",
|
|
243324
|
-
right: "5%",
|
|
243325
|
-
display: "flex",
|
|
243326
|
-
flexDirection: "column",
|
|
243327
|
-
alignItems: "center",
|
|
243328
|
-
pointerEvents: "none"
|
|
243329
|
-
},
|
|
243330
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
243331
|
-
"div",
|
|
243332
|
-
{
|
|
243333
|
-
style: {
|
|
243334
|
-
maxWidth: "90%",
|
|
243335
|
-
background: "rgba(0,0,0,0.7)",
|
|
243336
|
-
backdropFilter: "blur(4px)",
|
|
243337
|
-
borderRadius: 16,
|
|
243338
|
-
padding: "2.5vh 4vh",
|
|
243339
|
-
textAlign: "center",
|
|
243340
|
-
color: "#fff",
|
|
243341
|
-
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
|
|
243342
|
-
},
|
|
243343
|
-
children: [
|
|
243344
|
-
speaker && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
243345
|
-
"div",
|
|
243346
|
-
{
|
|
243347
|
-
style: {
|
|
243348
|
-
fontSize: "2vh",
|
|
243349
|
-
fontWeight: 700,
|
|
243350
|
-
color: "#93c5fd",
|
|
243351
|
-
marginBottom: "0.6vh",
|
|
243352
|
-
letterSpacing: "0.04em"
|
|
243353
|
-
},
|
|
243354
|
-
children: speaker
|
|
243355
|
-
}
|
|
243356
|
-
),
|
|
243357
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
243358
|
-
"div",
|
|
243359
|
-
{
|
|
243360
|
-
style: {
|
|
243361
|
-
fontSize: "2.6vh",
|
|
243362
|
-
lineHeight: 1.5,
|
|
243363
|
-
fontWeight: 500,
|
|
243364
|
-
textShadow: "0 1px 4px rgba(0,0,0,0.4)",
|
|
243365
|
-
whiteSpace: "pre-wrap",
|
|
243366
|
-
wordBreak: "break-word"
|
|
243367
|
-
},
|
|
243368
|
-
children: script2
|
|
243369
|
-
}
|
|
243370
|
-
)
|
|
243371
|
-
]
|
|
243372
|
-
}
|
|
243373
|
-
)
|
|
243374
|
-
}
|
|
243375
|
-
);
|
|
243376
|
-
}
|
|
243377
|
-
|
|
243378
|
-
// src/components/StoryboardInfo.tsx
|
|
243379
|
-
var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
|
|
243380
|
-
function StoryboardInfo({ config: config4, variants, frontmatter }) {
|
|
243381
|
-
const parts = (config4 ?? "").split(" \xB7 ").filter(Boolean);
|
|
243382
|
-
const variantList = (variants ?? "").split(/,\s*/).filter(Boolean);
|
|
243383
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
243384
|
-
"div",
|
|
243385
|
-
{
|
|
243386
|
-
style: {
|
|
243387
|
-
position: "absolute",
|
|
243388
|
-
inset: 0,
|
|
243389
|
-
display: "flex",
|
|
243390
|
-
flexDirection: "column",
|
|
243391
|
-
alignItems: "center",
|
|
243392
|
-
justifyContent: "center",
|
|
243393
|
-
background: "linear-gradient(135deg,#0f172a,#1e293b,#334155)",
|
|
243394
|
-
color: "#fff",
|
|
243395
|
-
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
243396
|
-
padding: "8%",
|
|
243397
|
-
boxSizing: "border-box"
|
|
243398
|
-
},
|
|
243399
|
-
children: [
|
|
243400
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243401
|
-
"div",
|
|
243402
|
-
{
|
|
243403
|
-
style: {
|
|
243404
|
-
position: "absolute",
|
|
243405
|
-
inset: "5%",
|
|
243406
|
-
border: "2px solid rgba(255,255,255,0.08)",
|
|
243407
|
-
borderRadius: "50%"
|
|
243408
|
-
}
|
|
243409
|
-
}
|
|
243410
|
-
),
|
|
243411
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243412
|
-
"div",
|
|
243413
|
-
{
|
|
243414
|
-
style: {
|
|
243415
|
-
position: "absolute",
|
|
243416
|
-
inset: "12%",
|
|
243417
|
-
border: "1px solid rgba(255,255,255,0.05)",
|
|
243418
|
-
borderRadius: "50%"
|
|
243419
|
-
}
|
|
243420
|
-
}
|
|
243421
|
-
),
|
|
243422
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { style: { fontSize: "6vh", marginBottom: "2.5vh", opacity: 0.7 }, children: "\u{1F3AC}" }),
|
|
243423
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243424
|
-
"div",
|
|
243425
|
-
{
|
|
243426
|
-
style: {
|
|
243427
|
-
fontSize: "4.2vh",
|
|
243428
|
-
fontWeight: 800,
|
|
243429
|
-
letterSpacing: "0.02em",
|
|
243430
|
-
marginBottom: "3vh",
|
|
243431
|
-
textAlign: "center",
|
|
243432
|
-
textShadow: "0 2px 12px rgba(0,0,0,0.5)"
|
|
243433
|
-
},
|
|
243434
|
-
children: "Storyboard Preview"
|
|
243435
|
-
}
|
|
243436
|
-
),
|
|
243437
|
-
parts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243438
|
-
"div",
|
|
243439
|
-
{
|
|
243440
|
-
style: {
|
|
243441
|
-
display: "flex",
|
|
243442
|
-
flexWrap: "wrap",
|
|
243443
|
-
justifyContent: "center",
|
|
243444
|
-
gap: "1.2vh",
|
|
243445
|
-
maxWidth: "85%",
|
|
243446
|
-
marginBottom: variantList.length > 0 ? "2.5vh" : 0
|
|
243447
|
-
},
|
|
243448
|
-
children: parts.map((entry) => {
|
|
243449
|
-
const colonIdx = entry.indexOf(":");
|
|
243450
|
-
const label3 = colonIdx > 0 ? entry.slice(0, colonIdx).trim() : "";
|
|
243451
|
-
const value2 = colonIdx > 0 ? entry.slice(colonIdx + 1).trim() : entry;
|
|
243452
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
243453
|
-
"div",
|
|
243454
|
-
{
|
|
243455
|
-
style: {
|
|
243456
|
-
background: "rgba(255,255,255,0.07)",
|
|
243457
|
-
border: "1px solid rgba(255,255,255,0.12)",
|
|
243458
|
-
borderRadius: 12,
|
|
243459
|
-
padding: "1.2vh 2.2vh",
|
|
243460
|
-
textAlign: "center",
|
|
243461
|
-
minWidth: "16vh"
|
|
243462
|
-
},
|
|
243463
|
-
children: [
|
|
243464
|
-
label3 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243465
|
-
"div",
|
|
243466
|
-
{
|
|
243467
|
-
style: {
|
|
243468
|
-
fontSize: "1.6vh",
|
|
243469
|
-
fontWeight: 600,
|
|
243470
|
-
color: "#93c5fd",
|
|
243471
|
-
letterSpacing: "0.08em",
|
|
243472
|
-
textTransform: "uppercase",
|
|
243473
|
-
marginBottom: "0.4vh"
|
|
243474
|
-
},
|
|
243475
|
-
children: label3
|
|
243476
|
-
}
|
|
243477
|
-
),
|
|
243478
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243479
|
-
"div",
|
|
243480
|
-
{
|
|
243481
|
-
style: {
|
|
243482
|
-
fontSize: "2.2vh",
|
|
243483
|
-
fontWeight: 700,
|
|
243484
|
-
whiteSpace: "pre-wrap",
|
|
243485
|
-
wordBreak: "break-word",
|
|
243486
|
-
opacity: value2.startsWith("http") ? 0.8 : 1
|
|
243487
|
-
},
|
|
243488
|
-
children: value2
|
|
243489
|
-
}
|
|
243490
|
-
)
|
|
243491
|
-
]
|
|
243492
|
-
},
|
|
243493
|
-
label3 || entry
|
|
243494
|
-
);
|
|
243495
|
-
})
|
|
243496
|
-
}
|
|
243497
|
-
),
|
|
243498
|
-
frontmatter && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243499
|
-
"div",
|
|
243500
|
-
{
|
|
243501
|
-
style: {
|
|
243502
|
-
maxWidth: "85%",
|
|
243503
|
-
background: "rgba(255,255,255,0.05)",
|
|
243504
|
-
border: "1px solid rgba(255,255,255,0.1)",
|
|
243505
|
-
borderRadius: 12,
|
|
243506
|
-
padding: "1.5vh 2.5vh",
|
|
243507
|
-
marginBottom: "2.5vh",
|
|
243508
|
-
fontFamily: "monospace",
|
|
243509
|
-
fontSize: "1.8vh",
|
|
243510
|
-
lineHeight: 1.6,
|
|
243511
|
-
color: "rgba(255,255,255,0.8)",
|
|
243512
|
-
whiteSpace: "pre-wrap",
|
|
243513
|
-
wordBreak: "break-word",
|
|
243514
|
-
textAlign: "left",
|
|
243515
|
-
maxHeight: "28vh",
|
|
243516
|
-
overflow: "auto"
|
|
243517
|
-
},
|
|
243518
|
-
children: frontmatter
|
|
243519
|
-
}
|
|
243520
|
-
),
|
|
243521
|
-
variantList.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243522
|
-
"div",
|
|
243523
|
-
{
|
|
243524
|
-
style: {
|
|
243525
|
-
display: "flex",
|
|
243526
|
-
flexWrap: "wrap",
|
|
243527
|
-
justifyContent: "center",
|
|
243528
|
-
gap: "1vh"
|
|
243529
|
-
},
|
|
243530
|
-
children: variantList.map((v5) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243531
|
-
"div",
|
|
243532
|
-
{
|
|
243533
|
-
style: {
|
|
243534
|
-
background: "rgba(251,191,36,0.15)",
|
|
243535
|
-
border: "1px solid rgba(251,191,36,0.35)",
|
|
243536
|
-
borderRadius: 999,
|
|
243537
|
-
padding: "0.8vh 2vh",
|
|
243538
|
-
fontSize: "1.8vh",
|
|
243539
|
-
fontWeight: 600,
|
|
243540
|
-
color: "#fbbf24",
|
|
243541
|
-
letterSpacing: "0.04em"
|
|
243542
|
-
},
|
|
243543
|
-
children: v5
|
|
243544
|
-
},
|
|
243545
|
-
v5
|
|
243546
|
-
))
|
|
243547
|
-
}
|
|
243548
|
-
)
|
|
243549
|
-
]
|
|
243550
|
-
}
|
|
243551
|
-
);
|
|
243552
|
-
}
|
|
243553
|
-
|
|
243554
243606
|
// node_modules/zod/v4/classic/external.js
|
|
243555
243607
|
var external_exports = {};
|
|
243556
243608
|
__export(external_exports, {
|
|
@@ -257451,6 +257503,8 @@ var mapStream = base.extend({
|
|
|
257451
257503
|
zoom: external_exports.number().default(10),
|
|
257452
257504
|
center: external_exports.object({ lat: external_exports.number(), lng: external_exports.number() }).optional().describe("map view center (defaults to first waypoint)"),
|
|
257453
257505
|
mapType: external_exports.enum(["roadmap", "satellite", "hybrid", "terrain"]).default("roadmap").describe("Google Maps style"),
|
|
257506
|
+
language: external_exports.string().optional().describe("Google Maps UI/label language, e.g. zh-CN"),
|
|
257507
|
+
region: external_exports.string().optional().describe("Google Maps region code, e.g. CN"),
|
|
257454
257508
|
travelMode: external_exports.enum(["DRIVING", "WALKING", "BICYCLING", "TRANSIT"]).default("DRIVING").describe("Directions API travel mode"),
|
|
257455
257509
|
routeMarker: external_exports.string().default("\u{1F697}").describe("emoji/character for the animated traveling marker"),
|
|
257456
257510
|
googleMapsApiKey: external_exports.string().optional().describe("injected by compiler from GOOGLE_MAPS_API_KEY env var")
|
|
@@ -257472,13 +257526,7 @@ var stream2 = external_exports.discriminatedUnion("type", [
|
|
|
257472
257526
|
// src/entry.tsx
|
|
257473
257527
|
var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
|
|
257474
257528
|
var DefaultContainer2 = ({ children: children2, style: style4, className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: className2, style: { position: "absolute", inset: 0, ...style4 }, children: children2 });
|
|
257475
|
-
var BUILTIN_COMPONENTS =
|
|
257476
|
-
StoryboardSlot,
|
|
257477
|
-
StoryboardCaption,
|
|
257478
|
-
StoryboardInfo,
|
|
257479
|
-
Markdown: Markdown2,
|
|
257480
|
-
Mermaid
|
|
257481
|
-
};
|
|
257529
|
+
var BUILTIN_COMPONENTS = components_exports;
|
|
257482
257530
|
function useComponentRegistry(imports) {
|
|
257483
257531
|
const [registry2, setRegistry] = React49.useState(null);
|
|
257484
257532
|
const handleRef = React49.useRef(null);
|
|
@@ -257561,20 +257609,20 @@ function MarkCut({ root: root8, compose, background = "#000" }) {
|
|
|
257561
257609
|
// src/player/components/HeaderBar.tsx
|
|
257562
257610
|
var React50 = __toESM(require_react(), 1);
|
|
257563
257611
|
var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
|
|
257564
|
-
function HeaderBar({ mode, sceneInfo,
|
|
257612
|
+
function HeaderBar({ mode, sceneInfo, sseConnected, locale: locale3 = "en" }) {
|
|
257613
|
+
const isZh = locale3 === "zh";
|
|
257565
257614
|
const handleClose = React50.useCallback(() => {
|
|
257566
257615
|
navigator.sendBeacon("/api/shutdown", "{}");
|
|
257567
|
-
document.body.innerHTML =
|
|
257568
|
-
}, []);
|
|
257616
|
+
document.body.innerHTML = `<div style='display:flex;align-items:center;justify-content:center;height:100vh;background:#0a0a0a;color:#555;font-family:sans-serif;font-size:16px'>\u2B61 ${isZh ? "\u64AD\u653E\u5668\u5DF2\u5173\u95ED\uFF0C\u8FD4\u56DE\u7EC8\u7AEF" : "player closed \u2014 return to terminal"}</div>`;
|
|
257617
|
+
}, [isZh]);
|
|
257569
257618
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { id: "header", children: [
|
|
257570
257619
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { style: { flex: 1, display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
257571
257620
|
mode === "label" && sceneInfo && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { id: "scene-info", children: sceneInfo }),
|
|
257572
|
-
mode === "edit" && editStatus && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { id: "edit-status", children: editStatus }),
|
|
257573
257621
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
257574
257622
|
"span",
|
|
257575
257623
|
{
|
|
257576
257624
|
id: "sse-indicator",
|
|
257577
|
-
title: sseConnected ? "Connected \u2014 auto-reload ready" : "Disconnected",
|
|
257625
|
+
title: sseConnected ? isZh ? "\u5DF2\u8FDE\u63A5\uFF0C\u53EF\u81EA\u52A8\u5237\u65B0" : "Connected \u2014 auto-reload ready" : isZh ? "\u8FDE\u63A5\u65AD\u5F00" : "Disconnected",
|
|
257578
257626
|
style: {
|
|
257579
257627
|
display: "inline-block",
|
|
257580
257628
|
width: 8,
|
|
@@ -257586,16 +257634,17 @@ function HeaderBar({ mode, sceneInfo, editStatus, sseConnected }) {
|
|
|
257586
257634
|
}
|
|
257587
257635
|
)
|
|
257588
257636
|
] }),
|
|
257589
|
-
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { id: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { id: "close-btn", title: "Close player and return to terminal", onClick: handleClose, children: "\u2715" }) })
|
|
257637
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { id: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { id: "close-btn", title: isZh ? "\u5173\u95ED\u64AD\u653E\u5668\u5E76\u8FD4\u56DE\u7EC8\u7AEF" : "Close player and return to terminal", onClick: handleClose, children: "\u2715" }) })
|
|
257590
257638
|
] });
|
|
257591
257639
|
}
|
|
257592
257640
|
|
|
257593
257641
|
// src/player/components/EditControls.tsx
|
|
257594
257642
|
var React51 = __toESM(require_react(), 1);
|
|
257595
257643
|
var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
|
|
257596
|
-
function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeScene }) {
|
|
257644
|
+
function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeScene, locale: locale3 = "en" }) {
|
|
257597
257645
|
const [busy, setBusy] = React51.useState(false);
|
|
257598
257646
|
const inputRef = React51.useRef(null);
|
|
257647
|
+
const isZh = locale3 === "zh";
|
|
257599
257648
|
const handleApplyEdit = React51.useCallback(
|
|
257600
257649
|
async (text10) => {
|
|
257601
257650
|
if (!text10 || busy) return;
|
|
@@ -257644,7 +257693,7 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
|
|
|
257644
257693
|
{
|
|
257645
257694
|
ref: inputRef,
|
|
257646
257695
|
id: "edit-input",
|
|
257647
|
-
placeholder: "What should change? e.g. make text bigger",
|
|
257696
|
+
placeholder: isZh ? "\u60F3\u6539\u4EC0\u4E48\uFF1F\u4F8B\u5982\uFF1A\u628A\u6587\u5B57\u653E\u5927\u4E00\u4E9B" : "What should change? e.g. make text bigger",
|
|
257648
257697
|
onKeyDown: handleKeyDown
|
|
257649
257698
|
}
|
|
257650
257699
|
),
|
|
@@ -257652,7 +257701,7 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
|
|
|
257652
257701
|
"button",
|
|
257653
257702
|
{
|
|
257654
257703
|
id: "edit-btn",
|
|
257655
|
-
title: "Apply edit",
|
|
257704
|
+
title: isZh ? "\u5E94\u7528\u4FEE\u6539" : "Apply edit",
|
|
257656
257705
|
disabled: busy,
|
|
257657
257706
|
onClick: () => handleApplyEdit(inputRef.current?.value || ""),
|
|
257658
257707
|
children: "\u2728"
|
|
@@ -257661,9 +257710,72 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
|
|
|
257661
257710
|
] });
|
|
257662
257711
|
}
|
|
257663
257712
|
|
|
257664
|
-
// src/player/components/
|
|
257713
|
+
// src/player/components/EditMessagePanel.tsx
|
|
257665
257714
|
var React54 = __toESM(require_react(), 1);
|
|
257666
257715
|
var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
|
|
257716
|
+
function EditMessagePanel({ entries: entries2, minimized, locale: locale3 = "en", onToggleMinimize }) {
|
|
257717
|
+
const listRef = React54.useRef(null);
|
|
257718
|
+
const isZh = locale3 === "zh";
|
|
257719
|
+
React54.useEffect(() => {
|
|
257720
|
+
if (listRef.current) {
|
|
257721
|
+
listRef.current.scrollTop = listRef.current.scrollHeight;
|
|
257722
|
+
}
|
|
257723
|
+
}, [entries2]);
|
|
257724
|
+
if (minimized) {
|
|
257725
|
+
const latest = entries2[entries2.length - 1];
|
|
257726
|
+
const label3 = entries2.length === 0 ? isZh ? "\u2728 \u7F16\u8F91" : "\u2728 Edit" : isZh ? `\u2728 ${entries2.length} \u6761\u7F16\u8F91${latest?.status === "thinking" ? " \u23F3" : ""}` : `\u2728 ${entries2.length} edit${entries2.length > 1 ? "s" : ""}${latest?.status === "thinking" ? " \u23F3" : ""}`;
|
|
257727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("button", { id: "edit-message-bar", onClick: onToggleMinimize, title: isZh ? "\u663E\u793A\u7F16\u8F91\u5386\u53F2" : "Show edit history", children: label3 });
|
|
257728
|
+
}
|
|
257729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { id: "edit-message-panel", children: [
|
|
257730
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { id: "edit-message-header", children: [
|
|
257731
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: isZh ? "\u2728 \u7F16\u8F91\u5386\u53F2" : "\u2728 Edit History" }),
|
|
257732
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
257733
|
+
"button",
|
|
257734
|
+
{
|
|
257735
|
+
id: "edit-message-minimize",
|
|
257736
|
+
onClick: onToggleMinimize,
|
|
257737
|
+
title: isZh ? "\u6700\u5C0F\u5316" : "Minimize",
|
|
257738
|
+
"aria-label": isZh ? "\u6700\u5C0F\u5316\u7F16\u8F91\u9762\u677F" : "Minimize edit panel",
|
|
257739
|
+
children: "\u2500"
|
|
257740
|
+
}
|
|
257741
|
+
)
|
|
257742
|
+
] }),
|
|
257743
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { id: "edit-message-list", ref: listRef, children: [
|
|
257744
|
+
entries2.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "edit-message-empty", children: isZh ? "\u6682\u65E0\u7F16\u8F91\u8BB0\u5F55\u3002\u8BF7\u5728\u4E0B\u65B9\u8F93\u5165\u4FEE\u6539\u8BF7\u6C42\u3002" : "No edits yet. Type a request below." }),
|
|
257745
|
+
entries2.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `edit-message-entry ${entry.status}`, children: [
|
|
257746
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-request", children: [
|
|
257747
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u4F60:" : "You:" }),
|
|
257748
|
+
" ",
|
|
257749
|
+
entry.request
|
|
257750
|
+
] }),
|
|
257751
|
+
entry.status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-thinking", children: [
|
|
257752
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u52A9\u624B:" : "Assistant:" }),
|
|
257753
|
+
" ",
|
|
257754
|
+
isZh ? "\u601D\u8003\u4E2D" : "Thinking",
|
|
257755
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "edit-dots", children: [
|
|
257756
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "." }),
|
|
257757
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "." }),
|
|
257758
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "." })
|
|
257759
|
+
] })
|
|
257760
|
+
] }),
|
|
257761
|
+
entry.status === "done" && entry.progress && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-response", children: [
|
|
257762
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u52A9\u624B:" : "Assistant:" }),
|
|
257763
|
+
" ",
|
|
257764
|
+
entry.progress
|
|
257765
|
+
] }),
|
|
257766
|
+
entry.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-error", children: [
|
|
257767
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u9519\u8BEF:" : "Error:" }),
|
|
257768
|
+
" ",
|
|
257769
|
+
entry.error || entry.progress || (isZh ? "\u7F16\u8F91\u5931\u8D25" : "Edit failed")
|
|
257770
|
+
] })
|
|
257771
|
+
] }, entry.id))
|
|
257772
|
+
] })
|
|
257773
|
+
] });
|
|
257774
|
+
}
|
|
257775
|
+
|
|
257776
|
+
// src/player/components/LabelControls.tsx
|
|
257777
|
+
var React55 = __toESM(require_react(), 1);
|
|
257778
|
+
var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
|
|
257667
257779
|
var VIDEO_EXT = {
|
|
257668
257780
|
".mov": 1,
|
|
257669
257781
|
".mp4": 1,
|
|
@@ -257682,14 +257794,14 @@ function formatTime2(sec) {
|
|
|
257682
257794
|
return mm + ":" + String(ss).padStart(2, "0");
|
|
257683
257795
|
}
|
|
257684
257796
|
function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
257685
|
-
const [videoInfo, setVideoInfo] =
|
|
257686
|
-
const [labelData, setLabelData] =
|
|
257687
|
-
const [currentSceneIdx, setCurrentSceneIdx] =
|
|
257688
|
-
const [selectedOverride, setSelectedOverride] =
|
|
257689
|
-
const [inputText, setInputText] =
|
|
257690
|
-
const [saving, setSaving] =
|
|
257691
|
-
const inputRef =
|
|
257692
|
-
|
|
257797
|
+
const [videoInfo, setVideoInfo] = React55.useState(null);
|
|
257798
|
+
const [labelData, setLabelData] = React55.useState({});
|
|
257799
|
+
const [currentSceneIdx, setCurrentSceneIdx] = React55.useState(0);
|
|
257800
|
+
const [selectedOverride, setSelectedOverride] = React55.useState(-1);
|
|
257801
|
+
const [inputText, setInputText] = React55.useState("");
|
|
257802
|
+
const [saving, setSaving] = React55.useState(false);
|
|
257803
|
+
const inputRef = React55.useRef(null);
|
|
257804
|
+
React55.useEffect(() => {
|
|
257693
257805
|
fetch("/api/video-info").then((r2) => r2.json()).then((info3) => {
|
|
257694
257806
|
setVideoInfo(info3);
|
|
257695
257807
|
if (info3.scenes?.[0]) {
|
|
@@ -257720,7 +257832,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257720
257832
|
const scenes = videoInfo?.scenes || [];
|
|
257721
257833
|
const effectiveIdx = selectedOverride >= 0 ? selectedOverride : currentSceneIdx;
|
|
257722
257834
|
const currentScene = scenes[effectiveIdx];
|
|
257723
|
-
|
|
257835
|
+
React55.useEffect(() => {
|
|
257724
257836
|
if (selectedOverride >= 0) return;
|
|
257725
257837
|
for (let i5 = 0; i5 < scenes.length; i5++) {
|
|
257726
257838
|
if (currentTime >= scenes[i5].start && currentTime < scenes[i5].end) {
|
|
@@ -257729,7 +257841,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257729
257841
|
}
|
|
257730
257842
|
}
|
|
257731
257843
|
}, [currentTime, scenes, selectedOverride]);
|
|
257732
|
-
|
|
257844
|
+
React55.useEffect(() => {
|
|
257733
257845
|
if (selectedOverride >= 0 && currentScene) {
|
|
257734
257846
|
const scene2 = scenes[selectedOverride];
|
|
257735
257847
|
if (scene2 && (currentTime < scene2.start || currentTime >= scene2.end)) {
|
|
@@ -257737,7 +257849,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257737
257849
|
}
|
|
257738
257850
|
}
|
|
257739
257851
|
}, [currentTime, selectedOverride, scenes, currentScene]);
|
|
257740
|
-
|
|
257852
|
+
React55.useEffect(() => {
|
|
257741
257853
|
if (!currentScene) {
|
|
257742
257854
|
onSceneChange?.(currentTime.toFixed(1) + "s");
|
|
257743
257855
|
} else if (selectedOverride >= 0) {
|
|
@@ -257746,7 +257858,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257746
257858
|
onSceneChange?.(currentScene.name + " (" + currentTime.toFixed(1) + "s)");
|
|
257747
257859
|
}
|
|
257748
257860
|
}, [currentScene, currentTime, selectedOverride, onSceneChange]);
|
|
257749
|
-
const seekToScene =
|
|
257861
|
+
const seekToScene = React55.useCallback(
|
|
257750
257862
|
(index2) => {
|
|
257751
257863
|
setSelectedOverride(index2);
|
|
257752
257864
|
setCurrentSceneIdx(index2);
|
|
@@ -257758,11 +257870,11 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257758
257870
|
},
|
|
257759
257871
|
[scenes, playerRef]
|
|
257760
257872
|
);
|
|
257761
|
-
|
|
257873
|
+
React55.useEffect(() => {
|
|
257762
257874
|
const entry = labelData[effectiveIdx];
|
|
257763
257875
|
setInputText(entry && entry.overall || "");
|
|
257764
257876
|
}, [effectiveIdx, labelData]);
|
|
257765
|
-
const saveLabel =
|
|
257877
|
+
const saveLabel = React55.useCallback(() => {
|
|
257766
257878
|
const text10 = inputText.trim();
|
|
257767
257879
|
if (!text10 || saving) return;
|
|
257768
257880
|
setSaving(true);
|
|
@@ -257804,7 +257916,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257804
257916
|
}).catch(() => {
|
|
257805
257917
|
}).finally(() => setSaving(false));
|
|
257806
257918
|
}, [inputText, saving, effectiveIdx, currentTime, scenes]);
|
|
257807
|
-
const deleteTimed =
|
|
257919
|
+
const deleteTimed = React55.useCallback(
|
|
257808
257920
|
(key) => {
|
|
257809
257921
|
const sceneIdx = effectiveIdx;
|
|
257810
257922
|
setLabelData((prev2) => {
|
|
@@ -257830,7 +257942,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257830
257942
|
[effectiveIdx]
|
|
257831
257943
|
);
|
|
257832
257944
|
const renderThumbnails = () => {
|
|
257833
|
-
return /* @__PURE__ */ (0,
|
|
257945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: "thumbnails", children: scenes.map((scene2, i5) => {
|
|
257834
257946
|
const isActive = i5 === effectiveIdx;
|
|
257835
257947
|
const entry = labelData[i5];
|
|
257836
257948
|
const hasLabel = entry && (entry.overall || Object.keys(entry.timed).length > 0);
|
|
@@ -257838,9 +257950,9 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257838
257950
|
const ext = scene2.src.substring(scene2.src.lastIndexOf(".")).toLowerCase();
|
|
257839
257951
|
const isVideo = !!VIDEO_EXT[ext];
|
|
257840
257952
|
if (scene2.src && !isVideo) {
|
|
257841
|
-
thumbContent = /* @__PURE__ */ (0,
|
|
257953
|
+
thumbContent = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("img", { src: scene2.src, alt: "", loading: "lazy" });
|
|
257842
257954
|
} else if (scene2.src && isVideo) {
|
|
257843
|
-
thumbContent = /* @__PURE__ */ (0,
|
|
257955
|
+
thumbContent = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257844
257956
|
"video",
|
|
257845
257957
|
{
|
|
257846
257958
|
src: scene2.src,
|
|
@@ -257850,7 +257962,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257850
257962
|
}
|
|
257851
257963
|
);
|
|
257852
257964
|
} else {
|
|
257853
|
-
thumbContent = /* @__PURE__ */ (0,
|
|
257965
|
+
thumbContent = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257854
257966
|
"div",
|
|
257855
257967
|
{
|
|
257856
257968
|
style: {
|
|
@@ -257868,7 +257980,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257868
257980
|
}
|
|
257869
257981
|
);
|
|
257870
257982
|
}
|
|
257871
|
-
return /* @__PURE__ */ (0,
|
|
257983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
257872
257984
|
"div",
|
|
257873
257985
|
{
|
|
257874
257986
|
className: "thumb-item" + (isActive ? " active" : ""),
|
|
@@ -257876,7 +257988,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257876
257988
|
onClick: () => seekToScene(i5),
|
|
257877
257989
|
children: [
|
|
257878
257990
|
thumbContent,
|
|
257879
|
-
/* @__PURE__ */ (0,
|
|
257991
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "thumb-badge" + (hasLabel ? " has-label" : "") })
|
|
257880
257992
|
]
|
|
257881
257993
|
},
|
|
257882
257994
|
i5
|
|
@@ -257887,12 +257999,12 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257887
257999
|
const entry = labelData[effectiveIdx];
|
|
257888
258000
|
const timed = entry && entry.timed || {};
|
|
257889
258001
|
const keys4 = Object.keys(timed).sort();
|
|
257890
|
-
return /* @__PURE__ */ (0,
|
|
258002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: "timed-labels", children: keys4.map((k4) => {
|
|
257891
258003
|
const sec = parseInt(k4.replace("at_", "")) / 1e3;
|
|
257892
|
-
return /* @__PURE__ */ (0,
|
|
257893
|
-
/* @__PURE__ */ (0,
|
|
257894
|
-
/* @__PURE__ */ (0,
|
|
257895
|
-
/* @__PURE__ */ (0,
|
|
258004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "timed-label", "data-key": k4, children: [
|
|
258005
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "tl-time", children: formatTime2(sec) }),
|
|
258006
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "tl-text", dangerouslySetInnerHTML: { __html: escHtml(timed[k4]) } }),
|
|
258007
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { className: "tl-del", title: "Remove", onClick: () => deleteTimed(k4), children: "\xD7" })
|
|
257896
258008
|
] }, k4);
|
|
257897
258009
|
}) });
|
|
257898
258010
|
};
|
|
@@ -257904,12 +258016,12 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257904
258016
|
sceneInfoText = currentScene.name + " (" + currentTime.toFixed(1) + "s)";
|
|
257905
258017
|
}
|
|
257906
258018
|
}
|
|
257907
|
-
return /* @__PURE__ */ (0,
|
|
258019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
257908
258020
|
renderThumbnails(),
|
|
257909
258021
|
renderTimedLabels(),
|
|
257910
|
-
/* @__PURE__ */ (0,
|
|
257911
|
-
/* @__PURE__ */ (0,
|
|
257912
|
-
/* @__PURE__ */ (0,
|
|
258022
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: "saved-toast", children: "\u2713 Label saved" }),
|
|
258023
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { id: "bottom-bar", children: [
|
|
258024
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257913
258025
|
"input",
|
|
257914
258026
|
{
|
|
257915
258027
|
ref: inputRef,
|
|
@@ -257925,7 +258037,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257925
258037
|
}
|
|
257926
258038
|
}
|
|
257927
258039
|
),
|
|
257928
|
-
/* @__PURE__ */ (0,
|
|
258040
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257929
258041
|
"button",
|
|
257930
258042
|
{
|
|
257931
258043
|
id: "label-btn",
|
|
@@ -257940,11 +258052,11 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257940
258052
|
}
|
|
257941
258053
|
|
|
257942
258054
|
// src/player/components/SceneThumbnails.tsx
|
|
257943
|
-
var
|
|
257944
|
-
var
|
|
258055
|
+
var React56 = __toESM(require_react(), 1);
|
|
258056
|
+
var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
|
|
257945
258057
|
function SceneThumbnails({ currentTime, onSeek }) {
|
|
257946
|
-
const [scenes, setScenes] =
|
|
257947
|
-
|
|
258058
|
+
const [scenes, setScenes] = React56.useState([]);
|
|
258059
|
+
React56.useEffect(() => {
|
|
257948
258060
|
const variant = window.VARIANT || "default";
|
|
257949
258061
|
const url2 = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
257950
258062
|
fetch(url2).then((r2) => r2.json()).then((info3) => {
|
|
@@ -257960,9 +258072,9 @@ function SceneThumbnails({ currentTime, onSeek }) {
|
|
|
257960
258072
|
break;
|
|
257961
258073
|
}
|
|
257962
258074
|
}
|
|
257963
|
-
return /* @__PURE__ */ (0,
|
|
258075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { id: "scene-thumbnails", children: scenes.map((scene2, i5) => {
|
|
257964
258076
|
const isActive = i5 === activeIdx;
|
|
257965
|
-
return /* @__PURE__ */ (0,
|
|
258077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
257966
258078
|
"span",
|
|
257967
258079
|
{
|
|
257968
258080
|
className: "scene-pill" + (isActive ? " active" : ""),
|
|
@@ -257975,12 +258087,12 @@ function SceneThumbnails({ currentTime, onSeek }) {
|
|
|
257975
258087
|
}
|
|
257976
258088
|
|
|
257977
258089
|
// src/player/components/VariantBar.tsx
|
|
257978
|
-
var
|
|
257979
|
-
var
|
|
258090
|
+
var React57 = __toESM(require_react(), 1);
|
|
258091
|
+
var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
|
|
257980
258092
|
function VariantBar() {
|
|
257981
|
-
const [variants, setVariants] =
|
|
258093
|
+
const [variants, setVariants] = React57.useState([]);
|
|
257982
258094
|
const currentVariant = (typeof window !== "undefined" ? window.VARIANT : null) || "default";
|
|
257983
|
-
|
|
258095
|
+
React57.useEffect(() => {
|
|
257984
258096
|
fetch("/api/video-info").then((r2) => r2.json()).then((info3) => {
|
|
257985
258097
|
if (info3.variants && info3.variants.length > 1) {
|
|
257986
258098
|
setVariants(info3.variants);
|
|
@@ -257989,7 +258101,7 @@ function VariantBar() {
|
|
|
257989
258101
|
});
|
|
257990
258102
|
}, []);
|
|
257991
258103
|
if (variants.length <= 1) return null;
|
|
257992
|
-
return /* @__PURE__ */ (0,
|
|
258104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { id: "variant-bar", children: variants.map((v5) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
257993
258105
|
"a",
|
|
257994
258106
|
{
|
|
257995
258107
|
href: `/${v5 === "default" ? "" : v5}`,
|
|
@@ -258001,10 +258113,10 @@ function VariantBar() {
|
|
|
258001
258113
|
}
|
|
258002
258114
|
|
|
258003
258115
|
// src/player/browser.tsx
|
|
258004
|
-
var
|
|
258116
|
+
var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
|
|
258005
258117
|
if (typeof window !== "undefined") {
|
|
258006
258118
|
globalThis.__remotionShared = {
|
|
258007
|
-
"react":
|
|
258119
|
+
"react": React58,
|
|
258008
258120
|
"react-dom": ReactDOM2,
|
|
258009
258121
|
"remotion": esm_exports,
|
|
258010
258122
|
"@remotion/player": { Player },
|
|
@@ -258068,17 +258180,17 @@ if (typeof window !== "undefined") {
|
|
|
258068
258180
|
}
|
|
258069
258181
|
}
|
|
258070
258182
|
function PlayerApp() {
|
|
258071
|
-
const playerRef =
|
|
258072
|
-
const [ready4, setReady] =
|
|
258073
|
-
const [error51, setError] =
|
|
258074
|
-
const [data7, setData] =
|
|
258075
|
-
const [muted, setMuted] =
|
|
258076
|
-
const [volume, setVolume] =
|
|
258077
|
-
const mountedRef =
|
|
258078
|
-
const currentFrameRef =
|
|
258079
|
-
const [currentTime, setCurrentTime] =
|
|
258080
|
-
const [activeScene, setActiveScene] =
|
|
258081
|
-
|
|
258183
|
+
const playerRef = React58.useRef(null);
|
|
258184
|
+
const [ready4, setReady] = React58.useState(false);
|
|
258185
|
+
const [error51, setError] = React58.useState(null);
|
|
258186
|
+
const [data7, setData] = React58.useState(null);
|
|
258187
|
+
const [muted, setMuted] = React58.useState(false);
|
|
258188
|
+
const [volume, setVolume] = React58.useState(1);
|
|
258189
|
+
const mountedRef = React58.useRef(true);
|
|
258190
|
+
const currentFrameRef = React58.useRef(0);
|
|
258191
|
+
const [currentTime, setCurrentTime] = React58.useState(0);
|
|
258192
|
+
const [activeScene, setActiveScene] = React58.useState("");
|
|
258193
|
+
React58.useEffect(() => {
|
|
258082
258194
|
const variant = window.VARIANT || "default";
|
|
258083
258195
|
const url2 = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
258084
258196
|
fetch(url2).then((r2) => r2.json()).then((info3) => {
|
|
@@ -258088,7 +258200,7 @@ function PlayerApp() {
|
|
|
258088
258200
|
}).catch(() => {
|
|
258089
258201
|
});
|
|
258090
258202
|
}, []);
|
|
258091
|
-
|
|
258203
|
+
React58.useEffect(() => {
|
|
258092
258204
|
const scenes = window.__scenes;
|
|
258093
258205
|
if (!scenes) return;
|
|
258094
258206
|
let found = "";
|
|
@@ -258100,15 +258212,22 @@ function PlayerApp() {
|
|
|
258100
258212
|
}
|
|
258101
258213
|
setActiveScene(found);
|
|
258102
258214
|
}, [currentTime]);
|
|
258103
|
-
const pendingSeekRef =
|
|
258215
|
+
const pendingSeekRef = React58.useRef(null);
|
|
258104
258216
|
const urlParams = new URLSearchParams(typeof window !== "undefined" ? window.location.search : "");
|
|
258105
258217
|
const autoPlay = urlParams.get("autoplay") === "true";
|
|
258106
258218
|
const startAt = parseFloat(urlParams.get("start") || urlParams.get("t") || "0") || 0;
|
|
258219
|
+
const locale3 = (() => {
|
|
258220
|
+
const raw = (urlParams.get("lang") || "").toLowerCase();
|
|
258221
|
+
if (raw === "zh" || raw.startsWith("zh-")) return "zh";
|
|
258222
|
+
if (raw === "en" || raw.startsWith("en-")) return "en";
|
|
258223
|
+
if (typeof navigator !== "undefined" && navigator.language.toLowerCase().startsWith("zh")) return "zh";
|
|
258224
|
+
return "en";
|
|
258225
|
+
})();
|
|
258107
258226
|
const fps = data7?.fps ?? 30;
|
|
258108
258227
|
const durationInSeconds = data7 ? getDurationInSeconds(data7, true) || 5 : 5;
|
|
258109
258228
|
const durationInFrames = Math.max(1, Math.ceil(durationInSeconds * fps));
|
|
258110
|
-
const inputProps =
|
|
258111
|
-
const loadData =
|
|
258229
|
+
const inputProps = React58.useMemo(() => ({ root: data7, compose: {} }), [data7]);
|
|
258230
|
+
const loadData = React58.useCallback((initial2 = false) => {
|
|
258112
258231
|
if (initial2) setReady(false);
|
|
258113
258232
|
const variant = window.VARIANT || "default";
|
|
258114
258233
|
const url2 = variant !== "default" ? `/api/video-data?variant=${variant}` : "/api/video-data";
|
|
@@ -258118,13 +258237,13 @@ function PlayerApp() {
|
|
|
258118
258237
|
if (initial2) setReady(true);
|
|
258119
258238
|
}).catch((e3) => setError(e3.message));
|
|
258120
258239
|
}, []);
|
|
258121
|
-
|
|
258240
|
+
React58.useEffect(() => {
|
|
258122
258241
|
loadData(true);
|
|
258123
258242
|
return () => {
|
|
258124
258243
|
mountedRef.current = false;
|
|
258125
258244
|
};
|
|
258126
258245
|
}, [loadData]);
|
|
258127
|
-
|
|
258246
|
+
React58.useEffect(() => {
|
|
258128
258247
|
const handler = () => {
|
|
258129
258248
|
if (playerRef.current) {
|
|
258130
258249
|
pendingSeekRef.current = playerRef.current.getCurrentFrame();
|
|
@@ -258134,7 +258253,7 @@ function PlayerApp() {
|
|
|
258134
258253
|
window.addEventListener("refresh-player", handler);
|
|
258135
258254
|
return () => window.removeEventListener("refresh-player", handler);
|
|
258136
258255
|
}, [loadData]);
|
|
258137
|
-
|
|
258256
|
+
React58.useEffect(() => {
|
|
258138
258257
|
if (!ready4 || !data7 || !playerRef.current) return;
|
|
258139
258258
|
const targetFrame = pendingSeekRef.current ?? Math.round(startAt * fps);
|
|
258140
258259
|
if (targetFrame > 0) {
|
|
@@ -258147,14 +258266,14 @@ function PlayerApp() {
|
|
|
258147
258266
|
}
|
|
258148
258267
|
pendingSeekRef.current = null;
|
|
258149
258268
|
}, [ready4, data7, startAt, fps]);
|
|
258150
|
-
const handleFrameUpdate =
|
|
258269
|
+
const handleFrameUpdate = React58.useCallback((frame2) => {
|
|
258151
258270
|
currentFrameRef.current = frame2;
|
|
258152
258271
|
setCurrentTime((prev2) => {
|
|
258153
258272
|
const newTime = frame2 / fps;
|
|
258154
258273
|
return Math.abs(newTime - prev2) > 0.1 ? newTime : prev2;
|
|
258155
258274
|
});
|
|
258156
258275
|
}, [fps]);
|
|
258157
|
-
|
|
258276
|
+
React58.useEffect(() => {
|
|
258158
258277
|
const p4 = playerRef.current;
|
|
258159
258278
|
if (!p4 || typeof p4.addEventListener !== "function") return;
|
|
258160
258279
|
const listener = (e3) => {
|
|
@@ -258164,7 +258283,7 @@ function PlayerApp() {
|
|
|
258164
258283
|
p4.addEventListener("frameupdate", listener);
|
|
258165
258284
|
return () => p4.removeEventListener("frameupdate", listener);
|
|
258166
258285
|
}, [ready4, data7, handleFrameUpdate]);
|
|
258167
|
-
|
|
258286
|
+
React58.useEffect(() => {
|
|
258168
258287
|
if (!ready4 || !playerRef.current) return;
|
|
258169
258288
|
const FWD_SECONDS = 5;
|
|
258170
258289
|
const BACK_SECONDS = 5;
|
|
@@ -258278,11 +258397,27 @@ function PlayerApp() {
|
|
|
258278
258397
|
return () => window.removeEventListener("keydown", onKey);
|
|
258279
258398
|
}, [ready4, data7, fps, durationInFrames, volume]);
|
|
258280
258399
|
const mode = (typeof window !== "undefined" ? window.MODE : null) || "preview";
|
|
258281
|
-
const [
|
|
258282
|
-
const [
|
|
258283
|
-
const [
|
|
258284
|
-
const
|
|
258285
|
-
|
|
258400
|
+
const [sseConnected, setSseConnected] = React58.useState(false);
|
|
258401
|
+
const [labelSceneInfo, setLabelSceneInfo] = React58.useState("");
|
|
258402
|
+
const [editEntries, setEditEntries] = React58.useState([]);
|
|
258403
|
+
const [showEditOverlay, setShowEditOverlay] = React58.useState(false);
|
|
258404
|
+
const nextEditIdRef = React58.useRef(1);
|
|
258405
|
+
const hideEditOverlayTimerRef = React58.useRef(null);
|
|
258406
|
+
const clearHideOverlayTimer = React58.useCallback(() => {
|
|
258407
|
+
if (hideEditOverlayTimerRef.current !== null) {
|
|
258408
|
+
window.clearTimeout(hideEditOverlayTimerRef.current);
|
|
258409
|
+
hideEditOverlayTimerRef.current = null;
|
|
258410
|
+
}
|
|
258411
|
+
}, []);
|
|
258412
|
+
const scheduleHideEditOverlay = React58.useCallback(() => {
|
|
258413
|
+
clearHideOverlayTimer();
|
|
258414
|
+
hideEditOverlayTimerRef.current = window.setTimeout(() => {
|
|
258415
|
+
setShowEditOverlay(false);
|
|
258416
|
+
hideEditOverlayTimerRef.current = null;
|
|
258417
|
+
}, 5e3);
|
|
258418
|
+
}, [clearHideOverlayTimer]);
|
|
258419
|
+
const suppressReloadRef = React58.useRef(false);
|
|
258420
|
+
React58.useEffect(() => {
|
|
258286
258421
|
let evtSource = null;
|
|
258287
258422
|
try {
|
|
258288
258423
|
evtSource = new EventSource("/api/events");
|
|
@@ -258292,6 +258427,49 @@ function PlayerApp() {
|
|
|
258292
258427
|
const msg = JSON.parse(e3.data);
|
|
258293
258428
|
if (msg.type === "reload" && !suppressReloadRef.current) {
|
|
258294
258429
|
window.dispatchEvent(new Event("refresh-player"));
|
|
258430
|
+
return;
|
|
258431
|
+
}
|
|
258432
|
+
if (msg.type === "edit:start") {
|
|
258433
|
+
clearHideOverlayTimer();
|
|
258434
|
+
setShowEditOverlay(true);
|
|
258435
|
+
const id39 = nextEditIdRef.current++;
|
|
258436
|
+
setEditEntries((prev2) => [
|
|
258437
|
+
...prev2,
|
|
258438
|
+
{ id: id39, request: msg.request || "", progress: "", status: "thinking" }
|
|
258439
|
+
]);
|
|
258440
|
+
return;
|
|
258441
|
+
}
|
|
258442
|
+
if (msg.type === "edit:progress") {
|
|
258443
|
+
setEditEntries((prev2) => {
|
|
258444
|
+
const last4 = prev2[prev2.length - 1];
|
|
258445
|
+
if (!last4 || last4.status !== "thinking") return prev2;
|
|
258446
|
+
return prev2.map(
|
|
258447
|
+
(e4) => e4.id === last4.id ? { ...e4, progress: msg.text || "" } : e4
|
|
258448
|
+
);
|
|
258449
|
+
});
|
|
258450
|
+
return;
|
|
258451
|
+
}
|
|
258452
|
+
if (msg.type === "edit:done") {
|
|
258453
|
+
setEditEntries((prev2) => {
|
|
258454
|
+
const last4 = prev2[prev2.length - 1];
|
|
258455
|
+
if (!last4) return prev2;
|
|
258456
|
+
return prev2.map(
|
|
258457
|
+
(e4) => e4.id === last4.id ? { ...e4, status: "done", progress: e4.progress || msg.summary || "" } : e4
|
|
258458
|
+
);
|
|
258459
|
+
});
|
|
258460
|
+
scheduleHideEditOverlay();
|
|
258461
|
+
return;
|
|
258462
|
+
}
|
|
258463
|
+
if (msg.type === "edit:error") {
|
|
258464
|
+
setEditEntries((prev2) => {
|
|
258465
|
+
const last4 = prev2[prev2.length - 1];
|
|
258466
|
+
if (!last4) return prev2;
|
|
258467
|
+
return prev2.map(
|
|
258468
|
+
(e4) => e4.id === last4.id ? { ...e4, status: "error", error: msg.error } : e4
|
|
258469
|
+
);
|
|
258470
|
+
});
|
|
258471
|
+
scheduleHideEditOverlay();
|
|
258472
|
+
return;
|
|
258295
258473
|
}
|
|
258296
258474
|
} catch {
|
|
258297
258475
|
}
|
|
@@ -258301,22 +258479,23 @@ function PlayerApp() {
|
|
|
258301
258479
|
setSseConnected(false);
|
|
258302
258480
|
}
|
|
258303
258481
|
return () => {
|
|
258482
|
+
clearHideOverlayTimer();
|
|
258304
258483
|
evtSource?.close();
|
|
258305
258484
|
setSseConnected(false);
|
|
258306
258485
|
};
|
|
258307
|
-
}, []);
|
|
258486
|
+
}, [clearHideOverlayTimer, scheduleHideEditOverlay]);
|
|
258308
258487
|
if (error51) {
|
|
258309
|
-
return /* @__PURE__ */ (0,
|
|
258488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { style: { color: "red", padding: 40, fontFamily: "sans-serif" }, children: [
|
|
258310
258489
|
"Error: ",
|
|
258311
258490
|
error51
|
|
258312
258491
|
] });
|
|
258313
258492
|
}
|
|
258314
258493
|
if (!ready4) {
|
|
258315
|
-
return /* @__PURE__ */ (0,
|
|
258494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { style: { color: "#888", padding: 40, fontFamily: "sans-serif" }, children: "Loading..." });
|
|
258316
258495
|
}
|
|
258317
258496
|
const width3 = data7.width || 1080;
|
|
258318
258497
|
const height2 = data7.height || 1920;
|
|
258319
|
-
return /* @__PURE__ */ (0,
|
|
258498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
258320
258499
|
"div",
|
|
258321
258500
|
{
|
|
258322
258501
|
style: {
|
|
@@ -258328,36 +258507,47 @@ function PlayerApp() {
|
|
|
258328
258507
|
alignItems: "center"
|
|
258329
258508
|
},
|
|
258330
258509
|
children: [
|
|
258331
|
-
/* @__PURE__ */ (0,
|
|
258510
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258332
258511
|
HeaderBar,
|
|
258333
258512
|
{
|
|
258334
258513
|
mode,
|
|
258335
|
-
editStatus,
|
|
258336
258514
|
sseConnected,
|
|
258337
|
-
sceneInfo: mode === "label" ? labelSceneInfo : void 0
|
|
258515
|
+
sceneInfo: mode === "label" ? labelSceneInfo : void 0,
|
|
258516
|
+
locale: locale3
|
|
258338
258517
|
}
|
|
258339
258518
|
),
|
|
258340
|
-
/* @__PURE__ */ (0,
|
|
258341
|
-
/* @__PURE__ */ (0,
|
|
258342
|
-
|
|
258343
|
-
|
|
258344
|
-
|
|
258345
|
-
|
|
258346
|
-
|
|
258347
|
-
|
|
258348
|
-
|
|
258349
|
-
|
|
258350
|
-
|
|
258351
|
-
|
|
258352
|
-
|
|
258353
|
-
|
|
258354
|
-
|
|
258355
|
-
|
|
258356
|
-
|
|
258357
|
-
|
|
258358
|
-
|
|
258359
|
-
|
|
258360
|
-
|
|
258519
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(VariantBar, {}),
|
|
258520
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { id: "player-frame", style: { flex: 1, width: "100%", maxWidth: 480, minHeight: 0 }, children: [
|
|
258521
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258522
|
+
Player,
|
|
258523
|
+
{
|
|
258524
|
+
ref: playerRef,
|
|
258525
|
+
component: MarkCut,
|
|
258526
|
+
inputProps,
|
|
258527
|
+
durationInFrames,
|
|
258528
|
+
fps,
|
|
258529
|
+
compositionWidth: width3,
|
|
258530
|
+
compositionHeight: height2,
|
|
258531
|
+
style: { width: "100%", height: "100%" },
|
|
258532
|
+
controls: true,
|
|
258533
|
+
showPlaybackRateControl: true,
|
|
258534
|
+
allowFullscreen: true,
|
|
258535
|
+
clickToPlay: false,
|
|
258536
|
+
doubleClickToFullscreen: true,
|
|
258537
|
+
autoPlay
|
|
258538
|
+
}
|
|
258539
|
+
),
|
|
258540
|
+
mode === "edit" && showEditOverlay && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { id: "edit-message-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258541
|
+
EditMessagePanel,
|
|
258542
|
+
{
|
|
258543
|
+
entries: editEntries,
|
|
258544
|
+
minimized: false,
|
|
258545
|
+
locale: locale3,
|
|
258546
|
+
onToggleMinimize: () => setShowEditOverlay(false)
|
|
258547
|
+
}
|
|
258548
|
+
) })
|
|
258549
|
+
] }),
|
|
258550
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258361
258551
|
SceneThumbnails,
|
|
258362
258552
|
{
|
|
258363
258553
|
currentTime,
|
|
@@ -258370,16 +258560,16 @@ function PlayerApp() {
|
|
|
258370
258560
|
}
|
|
258371
258561
|
}
|
|
258372
258562
|
),
|
|
258373
|
-
mode === "edit" && /* @__PURE__ */ (0,
|
|
258563
|
+
mode === "edit" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258374
258564
|
EditControls,
|
|
258375
258565
|
{
|
|
258376
|
-
onStatusChange: setEditStatus,
|
|
258377
258566
|
suppressReloadRef,
|
|
258378
258567
|
currentTime,
|
|
258379
|
-
activeScene
|
|
258568
|
+
activeScene,
|
|
258569
|
+
locale: locale3
|
|
258380
258570
|
}
|
|
258381
258571
|
),
|
|
258382
|
-
mode === "label" && /* @__PURE__ */ (0,
|
|
258572
|
+
mode === "label" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258383
258573
|
LabelControls,
|
|
258384
258574
|
{
|
|
258385
258575
|
playerRef,
|
|
@@ -258394,7 +258584,7 @@ function PlayerApp() {
|
|
|
258394
258584
|
var container3 = document.getElementById("root");
|
|
258395
258585
|
if (container3) {
|
|
258396
258586
|
const root8 = (0, import_client.createRoot)(container3);
|
|
258397
|
-
root8.render(
|
|
258587
|
+
root8.render(React58.createElement(PlayerApp));
|
|
258398
258588
|
}
|
|
258399
258589
|
/*! Bundled license information:
|
|
258400
258590
|
|