@nodaro/shared 3.31.0 → 3.33.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.
Files changed (378) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-23FJQTEA.js +1604 -0
  3. package/dist/chunk-23FJQTEA.js.map +1 -0
  4. package/dist/chunk-2NIQO2J3.cjs +54 -0
  5. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  6. package/dist/chunk-2NQLSLSN.cjs +19 -0
  7. package/dist/chunk-2NQLSLSN.cjs.map +1 -0
  8. package/dist/chunk-2OJIVO7R.cjs +32 -0
  9. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  10. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  11. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  12. package/dist/chunk-3RYKIUAE.js +86 -0
  13. package/dist/chunk-3RYKIUAE.js.map +1 -0
  14. package/dist/chunk-44I73CQS.cjs +194 -0
  15. package/dist/chunk-44I73CQS.cjs.map +1 -0
  16. package/dist/chunk-5PC6JBGJ.cjs +1419 -0
  17. package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
  18. package/dist/chunk-5RU2HCW2.js +30 -0
  19. package/dist/chunk-5RU2HCW2.js.map +1 -0
  20. package/dist/chunk-5RYLK3MQ.js +267 -0
  21. package/dist/chunk-5RYLK3MQ.js.map +1 -0
  22. package/dist/chunk-5THUHJ3E.js +46 -0
  23. package/dist/chunk-5THUHJ3E.js.map +1 -0
  24. package/dist/chunk-6DAWSVX2.cjs +103 -0
  25. package/dist/chunk-6DAWSVX2.cjs.map +1 -0
  26. package/dist/chunk-6WZ2VN7V.js +920 -0
  27. package/dist/chunk-6WZ2VN7V.js.map +1 -0
  28. package/dist/chunk-7G7G42KS.js +86 -0
  29. package/dist/chunk-7G7G42KS.js.map +1 -0
  30. package/dist/chunk-7Z5LUTGU.js +1567 -0
  31. package/dist/chunk-7Z5LUTGU.js.map +1 -0
  32. package/dist/chunk-AINCI23X.js +2171 -0
  33. package/dist/chunk-AINCI23X.js.map +1 -0
  34. package/dist/chunk-BG5D5CZ6.js +1922 -0
  35. package/dist/chunk-BG5D5CZ6.js.map +1 -0
  36. package/dist/chunk-CK3GK34R.js +1381 -0
  37. package/dist/chunk-CK3GK34R.js.map +1 -0
  38. package/dist/chunk-CUH22J4D.js +17 -0
  39. package/dist/chunk-CUH22J4D.js.map +1 -0
  40. package/dist/chunk-D26ENTN2.cjs +1770 -0
  41. package/dist/chunk-D26ENTN2.cjs.map +1 -0
  42. package/dist/chunk-D6GNRSCV.cjs +2017 -0
  43. package/dist/chunk-D6GNRSCV.cjs.map +1 -0
  44. package/dist/chunk-FBV5DF6D.js +95 -0
  45. package/dist/chunk-FBV5DF6D.js.map +1 -0
  46. package/dist/chunk-FG4E7MTG.cjs +4 -0
  47. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  48. package/dist/chunk-FT5CF6IA.js +42 -0
  49. package/dist/chunk-FT5CF6IA.js.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HC7VKIV5.cjs +430 -0
  53. package/dist/chunk-HC7VKIV5.cjs.map +1 -0
  54. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  55. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  56. package/dist/chunk-HKFMXNVQ.cjs +1273 -0
  57. package/dist/chunk-HKFMXNVQ.cjs.map +1 -0
  58. package/dist/chunk-HRXEZ3SX.cjs +526 -0
  59. package/dist/chunk-HRXEZ3SX.cjs.map +1 -0
  60. package/dist/chunk-HSHCCBIV.js +255 -0
  61. package/dist/chunk-HSHCCBIV.js.map +1 -0
  62. package/dist/chunk-HUR6ZJ7S.cjs +159 -0
  63. package/dist/chunk-HUR6ZJ7S.cjs.map +1 -0
  64. package/dist/chunk-J7BMO73N.cjs +114 -0
  65. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  66. package/dist/chunk-JFS3NWZ5.cjs +1714 -0
  67. package/dist/chunk-JFS3NWZ5.cjs.map +1 -0
  68. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  69. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  70. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  71. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  72. package/dist/chunk-JWA5SGCS.js +203 -0
  73. package/dist/chunk-JWA5SGCS.js.map +1 -0
  74. package/dist/chunk-K3LLGRK7.cjs +3545 -0
  75. package/dist/chunk-K3LLGRK7.cjs.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-M36G6SRP.js +447 -0
  79. package/dist/chunk-M36G6SRP.js.map +1 -0
  80. package/dist/chunk-M7GQBRZU.cjs +1963 -0
  81. package/dist/chunk-M7GQBRZU.cjs.map +1 -0
  82. package/dist/chunk-MRXGWL42.cjs +4 -0
  83. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  84. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  85. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  86. package/dist/chunk-OTATNBMD.js +141 -0
  87. package/dist/chunk-OTATNBMD.js.map +1 -0
  88. package/dist/chunk-OZSACQ2V.js +471 -0
  89. package/dist/chunk-OZSACQ2V.js.map +1 -0
  90. package/dist/chunk-PHZ23DP3.js +1782 -0
  91. package/dist/chunk-PHZ23DP3.js.map +1 -0
  92. package/dist/chunk-PQHS255G.js +1369 -0
  93. package/dist/chunk-PQHS255G.js.map +1 -0
  94. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  95. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  96. package/dist/chunk-PVJBAPYJ.js +404 -0
  97. package/dist/chunk-PVJBAPYJ.js.map +1 -0
  98. package/dist/chunk-PXFQVLBX.js +776 -0
  99. package/dist/chunk-PXFQVLBX.js.map +1 -0
  100. package/dist/chunk-QA3MVQ32.js +21 -0
  101. package/dist/chunk-QA3MVQ32.js.map +1 -0
  102. package/dist/chunk-QJRP44ZO.js +769 -0
  103. package/dist/chunk-QJRP44ZO.js.map +1 -0
  104. package/dist/chunk-SAW5OK36.cjs +54 -0
  105. package/dist/chunk-SAW5OK36.cjs.map +1 -0
  106. package/dist/chunk-SES6GDBQ.cjs +624 -0
  107. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  108. package/dist/chunk-SFW3UB2P.js +31 -0
  109. package/dist/chunk-SFW3UB2P.js.map +1 -0
  110. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  111. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  112. package/dist/chunk-TU33KYKW.cjs +25 -0
  113. package/dist/chunk-TU33KYKW.cjs.map +1 -0
  114. package/dist/chunk-TZBIY5C3.js +187 -0
  115. package/dist/chunk-TZBIY5C3.js.map +1 -0
  116. package/dist/chunk-TZE673G6.js +3 -0
  117. package/dist/chunk-TZE673G6.js.map +1 -0
  118. package/dist/chunk-UCFWI6D4.js +29 -0
  119. package/dist/chunk-UCFWI6D4.js.map +1 -0
  120. package/dist/chunk-UTQSSKSG.js +1164 -0
  121. package/dist/chunk-UTQSSKSG.js.map +1 -0
  122. package/dist/chunk-VA42637J.cjs +287 -0
  123. package/dist/chunk-VA42637J.cjs.map +1 -0
  124. package/dist/chunk-VNQRI2RO.cjs +1047 -0
  125. package/dist/chunk-VNQRI2RO.cjs.map +1 -0
  126. package/dist/chunk-VXPLKQWY.cjs +821 -0
  127. package/dist/chunk-VXPLKQWY.cjs.map +1 -0
  128. package/dist/chunk-WD6HJRBG.cjs +197 -0
  129. package/dist/chunk-WD6HJRBG.cjs.map +1 -0
  130. package/dist/chunk-WDIBOWAA.js +1054 -0
  131. package/dist/chunk-WDIBOWAA.js.map +1 -0
  132. package/dist/chunk-WKOIGLQX.cjs +38 -0
  133. package/dist/chunk-WKOIGLQX.cjs.map +1 -0
  134. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  135. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  136. package/dist/chunk-WRSWH7US.cjs +285 -0
  137. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  138. package/dist/chunk-XGFTL5XY.js +181 -0
  139. package/dist/chunk-XGFTL5XY.js.map +1 -0
  140. package/dist/chunk-XNISPHTZ.js +1039 -0
  141. package/dist/chunk-XNISPHTZ.js.map +1 -0
  142. package/dist/chunk-Y2PM3FFL.js +3 -0
  143. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  144. package/dist/chunk-YBPBK5KI.js +1030 -0
  145. package/dist/chunk-YBPBK5KI.js.map +1 -0
  146. package/dist/chunk-YWNYGYI7.cjs +31 -0
  147. package/dist/chunk-YWNYGYI7.cjs.map +1 -0
  148. package/dist/chunk-YYV35XOS.js +122 -0
  149. package/dist/chunk-YYV35XOS.js.map +1 -0
  150. package/dist/chunk-Z2OL5AJD.cjs +133 -0
  151. package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
  152. package/dist/chunk-ZDFHA2EC.js +572 -0
  153. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  154. package/dist/chunk-ZL7UM6PU.cjs +34 -0
  155. package/dist/chunk-ZL7UM6PU.cjs.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZO5PBBFX.js +3497 -0
  159. package/dist/chunk-ZO5PBBFX.js.map +1 -0
  160. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  161. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  162. package/dist/entries/apps.cjs +155 -0
  163. package/dist/entries/apps.cjs.map +1 -0
  164. package/dist/entries/apps.d.cts +292 -0
  165. package/dist/entries/apps.d.ts +292 -0
  166. package/dist/entries/apps.js +10 -0
  167. package/dist/entries/apps.js.map +1 -0
  168. package/dist/entries/captions.cjs +124 -0
  169. package/dist/entries/captions.cjs.map +1 -0
  170. package/dist/entries/captions.d.cts +354 -0
  171. package/dist/entries/captions.d.ts +354 -0
  172. package/dist/entries/captions.js +3 -0
  173. package/dist/entries/captions.js.map +1 -0
  174. package/dist/entries/catalogs.cjs +165 -0
  175. package/dist/entries/catalogs.cjs.map +1 -0
  176. package/dist/entries/catalogs.d.cts +385 -0
  177. package/dist/entries/catalogs.d.ts +385 -0
  178. package/dist/entries/catalogs.js +4 -0
  179. package/dist/entries/catalogs.js.map +1 -0
  180. package/dist/entries/credits.cjs +596 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1460 -0
  183. package/dist/entries/credits.d.ts +1460 -0
  184. package/dist/entries/credits.js +11 -0
  185. package/dist/entries/credits.js.map +1 -0
  186. package/dist/entries/edl.cjs +409 -0
  187. package/dist/entries/edl.cjs.map +1 -0
  188. package/dist/entries/edl.d.cts +1199 -0
  189. package/dist/entries/edl.d.ts +1199 -0
  190. package/dist/entries/edl.js +4 -0
  191. package/dist/entries/edl.js.map +1 -0
  192. package/dist/entries/entities.cjs +530 -0
  193. package/dist/entries/entities.cjs.map +1 -0
  194. package/dist/entries/entities.d.cts +1371 -0
  195. package/dist/entries/entities.d.ts +1371 -0
  196. package/dist/entries/entities.js +5 -0
  197. package/dist/entries/entities.js.map +1 -0
  198. package/dist/entries/i18n.cjs +48 -0
  199. package/dist/entries/i18n.cjs.map +1 -0
  200. package/dist/entries/i18n.d.cts +69 -0
  201. package/dist/entries/i18n.d.ts +69 -0
  202. package/dist/entries/i18n.js +3 -0
  203. package/dist/entries/i18n.js.map +1 -0
  204. package/dist/entries/llm-models.cjs +177 -0
  205. package/dist/entries/llm-models.cjs.map +1 -0
  206. package/dist/entries/llm-models.d.cts +435 -0
  207. package/dist/entries/llm-models.d.ts +435 -0
  208. package/dist/entries/llm-models.js +4 -0
  209. package/dist/entries/llm-models.js.map +1 -0
  210. package/dist/entries/media.cjs +335 -0
  211. package/dist/entries/media.cjs.map +1 -0
  212. package/dist/entries/media.d.cts +518 -0
  213. package/dist/entries/media.d.ts +518 -0
  214. package/dist/entries/media.js +6 -0
  215. package/dist/entries/media.js.map +1 -0
  216. package/dist/entries/model-catalog.cjs +259 -0
  217. package/dist/entries/model-catalog.cjs.map +1 -0
  218. package/dist/entries/model-catalog.d.cts +202 -0
  219. package/dist/entries/model-catalog.d.ts +202 -0
  220. package/dist/entries/model-catalog.js +6 -0
  221. package/dist/entries/model-catalog.js.map +1 -0
  222. package/dist/entries/models.cjs +833 -0
  223. package/dist/entries/models.cjs.map +1 -0
  224. package/dist/entries/models.d.cts +287 -0
  225. package/dist/entries/models.d.ts +287 -0
  226. package/dist/entries/models.js +8 -0
  227. package/dist/entries/models.js.map +1 -0
  228. package/dist/entries/nodes.cjs +789 -0
  229. package/dist/entries/nodes.cjs.map +1 -0
  230. package/dist/entries/nodes.d.cts +1600 -0
  231. package/dist/entries/nodes.d.ts +1600 -0
  232. package/dist/entries/nodes.js +16 -0
  233. package/dist/entries/nodes.js.map +1 -0
  234. package/dist/entries/organizations.cjs +80 -0
  235. package/dist/entries/organizations.cjs.map +1 -0
  236. package/dist/entries/organizations.d.cts +466 -0
  237. package/dist/entries/organizations.d.ts +466 -0
  238. package/dist/entries/organizations.js +3 -0
  239. package/dist/entries/organizations.js.map +1 -0
  240. package/dist/entries/pipeline.cjs +594 -0
  241. package/dist/entries/pipeline.cjs.map +1 -0
  242. package/dist/entries/pipeline.d.cts +2617 -0
  243. package/dist/entries/pipeline.d.ts +2617 -0
  244. package/dist/entries/pipeline.js +5 -0
  245. package/dist/entries/pipeline.js.map +1 -0
  246. package/dist/entries/scene3d.cjs +704 -0
  247. package/dist/entries/scene3d.cjs.map +1 -0
  248. package/dist/entries/scene3d.d.cts +4284 -0
  249. package/dist/entries/scene3d.d.ts +4284 -0
  250. package/dist/entries/scene3d.js +3 -0
  251. package/dist/entries/scene3d.js.map +1 -0
  252. package/dist/entries/social.cjs +714 -0
  253. package/dist/entries/social.cjs.map +1 -0
  254. package/dist/entries/social.d.cts +1366 -0
  255. package/dist/entries/social.d.ts +1366 -0
  256. package/dist/entries/social.js +5 -0
  257. package/dist/entries/social.js.map +1 -0
  258. package/dist/entries/types.cjs +13 -0
  259. package/dist/entries/types.cjs.map +1 -0
  260. package/dist/entries/types.d.cts +162 -0
  261. package/dist/entries/types.d.ts +162 -0
  262. package/dist/entries/types.js +4 -0
  263. package/dist/entries/types.js.map +1 -0
  264. package/dist/entries/ugc.cjs +279 -0
  265. package/dist/entries/ugc.cjs.map +1 -0
  266. package/dist/entries/ugc.d.cts +575 -0
  267. package/dist/entries/ugc.d.ts +575 -0
  268. package/dist/entries/ugc.js +6 -0
  269. package/dist/entries/ugc.js.map +1 -0
  270. package/dist/entries/video.cjs +549 -0
  271. package/dist/entries/video.cjs.map +1 -0
  272. package/dist/entries/video.d.cts +1791 -0
  273. package/dist/entries/video.d.ts +1791 -0
  274. package/dist/entries/video.js +8 -0
  275. package/dist/entries/video.js.map +1 -0
  276. package/dist/entries/workflow.cjs +574 -0
  277. package/dist/entries/workflow.cjs.map +1 -0
  278. package/dist/entries/workflow.d.cts +1743 -0
  279. package/dist/entries/workflow.d.ts +1743 -0
  280. package/dist/entries/workflow.js +5 -0
  281. package/dist/entries/workflow.js.map +1 -0
  282. package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
  283. package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
  284. package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
  285. package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
  286. package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
  287. package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
  288. package/dist/index.cjs +7747 -27084
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -24198
  291. package/dist/index.d.ts +32 -24198
  292. package/dist/index.js +40 -25220
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-V-ZNzRSd.d.cts +651 -0
  295. package/dist/model-catalog-V-ZNzRSd.d.ts +651 -0
  296. package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
  297. package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
  298. package/dist/presentation-utils-D0kxsWf9.d.cts +92 -0
  299. package/dist/presentation-utils-pZwlEAzo.d.ts +92 -0
  300. package/dist/scene-node-types-C3kl_zyK.d.cts +1949 -0
  301. package/dist/scene-node-types-C3kl_zyK.d.ts +1949 -0
  302. package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
  303. package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
  304. package/dist/types-BRlFPEru.d.cts +511 -0
  305. package/dist/types-BRlFPEru.d.ts +511 -0
  306. package/dist/types-DffyGSy5.d.cts +67 -0
  307. package/dist/types-DffyGSy5.d.ts +67 -0
  308. package/package.json +102 -1
  309. package/src/__tests__/add-captions-plan.test.ts +6 -2
  310. package/src/__tests__/caption-edge-dash.test.ts +23 -0
  311. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  312. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  313. package/src/__tests__/model-makers.test.ts +76 -0
  314. package/src/__tests__/no-internal-imports.test.ts +1 -1
  315. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  316. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  317. package/src/__tests__/package-entries.test.ts +50 -0
  318. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  319. package/src/__tests__/presentation-utils.test.ts +15 -0
  320. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  321. package/src/__tests__/private-host.test.ts +53 -0
  322. package/src/__tests__/run-continuation.test.ts +7 -1
  323. package/src/__tests__/site-capture-node.test.ts +58 -0
  324. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  325. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  326. package/src/__tests__/ugc-run-state.test.ts +5 -4
  327. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  328. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  329. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  330. package/src/add-captions-plan.ts +9 -3
  331. package/src/caption-edge-dash.ts +33 -0
  332. package/src/component-types.ts +9 -0
  333. package/src/credit-estimators/index.ts +22 -1
  334. package/src/credit-estimators/pitch-tempo.ts +15 -1
  335. package/src/credit-estimators/speech.ts +72 -4
  336. package/src/credit-estimators/unit-quote.ts +52 -0
  337. package/src/credit-estimators/video-sfx.ts +15 -0
  338. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  339. package/src/credit-identifiers.ts +62 -17
  340. package/src/entity-image-handle.ts +2 -0
  341. package/src/entries/apps.ts +63 -0
  342. package/src/entries/captions.ts +34 -0
  343. package/src/entries/catalogs.ts +65 -0
  344. package/src/entries/credits.ts +105 -0
  345. package/src/entries/edl.ts +42 -0
  346. package/src/entries/entities.ts +144 -0
  347. package/src/entries/i18n.ts +31 -0
  348. package/src/entries/llm-models.ts +63 -0
  349. package/src/entries/media.ts +36 -0
  350. package/src/entries/model-catalog.ts +95 -0
  351. package/src/entries/models.ts +266 -0
  352. package/src/entries/nodes.ts +245 -0
  353. package/src/entries/organizations.ts +9 -0
  354. package/src/entries/pipeline.ts +43 -0
  355. package/src/entries/scene3d.ts +27 -0
  356. package/src/entries/social.ts +297 -0
  357. package/src/entries/types.ts +26 -0
  358. package/src/entries/ugc.ts +14 -0
  359. package/src/entries/video.ts +59 -0
  360. package/src/entries/workflow.ts +172 -0
  361. package/src/fan-out-rows.ts +2 -0
  362. package/src/index.ts +25 -1845
  363. package/src/json-kinds.ts +4 -0
  364. package/src/model-catalog.ts +243 -34
  365. package/src/node-mappable-fields.ts +1 -0
  366. package/src/node-run-routes.ts +2 -0
  367. package/src/node-runtime-keys.ts +8 -0
  368. package/src/normalize-node-params.ts +30 -0
  369. package/src/presentation-utils.ts +12 -0
  370. package/src/preview-gate.ts +92 -14
  371. package/src/private-host.ts +89 -59
  372. package/src/producer-types.ts +16 -2
  373. package/src/run-continuation.ts +21 -0
  374. package/src/site-capture-node.ts +82 -0
  375. package/src/ugc-lane-wires.ts +246 -0
  376. package/src/ugc-node-wires.ts +37 -7
  377. package/src/ugc-run-state.ts +5 -3
  378. package/src/video-analysis-pricing.ts +31 -29
@@ -0,0 +1,821 @@
1
+ 'use strict';
2
+
3
+ var chunkHRXEZ3SX_cjs = require('./chunk-HRXEZ3SX.cjs');
4
+ var chunkNEJ2PV4C_cjs = require('./chunk-NEJ2PV4C.cjs');
5
+ var chunkVA42637J_cjs = require('./chunk-VA42637J.cjs');
6
+
7
+ // src/producer-types.ts
8
+ var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
9
+ "image-to-video",
10
+ "video-to-video",
11
+ "switchx",
12
+ // Beeble SwitchX relight/composite
13
+ "text-to-video",
14
+ // Unified video node — emits videoUrl identically to i2v/t2v (its payload-builder
15
+ // case dispatches dynamically to "image-to-video" or "text-to-video" jobName based
16
+ // on whether a start frame is wired). Without this, getPrimaryOutput would fall
17
+ // through to the imageUrl/videoUrl/audioUrl/text default and downstream consumers
18
+ // could silently misroute the output.
19
+ "generate-video",
20
+ // Generate Video Pro — Seedance-2-family multi-segment stitch variant of
21
+ // generate-video (same "emits videoUrl" contract; a trimmed provider +
22
+ // handle set). Must mirror generate-video here or its output can't connect
23
+ // downstream (the recurring "cannot connect the outputs" bug class).
24
+ "generate-video-pro",
25
+ // Edit Video Pro — Seedance-2-family span-replace sibling of generate-
26
+ // video-pro (same "emits videoUrl" contract; source video + prompt in,
27
+ // ONE video out). Must mirror generate-video-pro here or its output can't
28
+ // connect downstream (the recurring "cannot connect the outputs" bug class).
29
+ "edit-video-pro",
30
+ "upload-video",
31
+ "youtube-video",
32
+ "combine-videos",
33
+ "lip-sync",
34
+ "speech-to-video",
35
+ "motion-transfer",
36
+ "video-upscale",
37
+ "video-depth",
38
+ "extend-video",
39
+ // face-swap output is video (writes generatedVideoUrl, per-result `url`).
40
+ // Frontend execution-graph already includes it in VIDEO_SOURCE_TYPES; this
41
+ // entry brings the shared set in line so canvas typed-handle validation
42
+ // doesn't reject face-swap → video-consumer edges that the orchestrator
43
+ // would happily route at runtime.
44
+ "face-swap",
45
+ // Speaker View (C3.2): an EDL rendered with its speakers framed — one VIDEO
46
+ // out (no audio-only render). Registered in RENDER_NODE_TYPES as well.
47
+ "speaker-view",
48
+ "video-retake",
49
+ // video-sfx: adds an SFX track to a video → emits a video URL. Belongs here so
50
+ // canvas handle validation accepts video-sfx → video-consumer edges and the
51
+ // backend routes its output as video (it was previously relying on a fallback).
52
+ "video-sfx",
53
+ "suno-music-video",
54
+ "merge-video-audio",
55
+ "add-captions",
56
+ "resize-video",
57
+ "social-media-format",
58
+ "trim-video",
59
+ "render-video",
60
+ "speed-ramp",
61
+ "loop-video",
62
+ "fade-video",
63
+ // Video Mask emits its mask as a video; Mask Composite its composite.
64
+ "video-mask",
65
+ "mask-composite",
66
+ "transcode-video",
67
+ "manual-edit",
68
+ // Remove Audio: strips the audio track, emits a silent video.
69
+ "remove-audio",
70
+ // AI Avatar (HeyGen): avatar + voice/audio → video.
71
+ "ai-avatar",
72
+ // Cinematic Avatar (HeyGen cinematic_avatar): prompt + 1–3 avatar looks → video.
73
+ "cinematic-avatar",
74
+ // Assemble Narrated Video: fits N (clip, voice) blocks into one MP4 → video.
75
+ "assemble-narrated-video",
76
+ // Still to Video: one still image + one audio track → MP4 (local FFmpeg,
77
+ // no provider). Emits generatedVideoUrl like every other ffmpeg video node.
78
+ "still-to-video",
79
+ // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,
80
+ // no provider). Same contract; images arrive via the image-collage lane.
81
+ "slideshow",
82
+ // GIF to Video: animated GIF → H.264 MP4 (local FFmpeg, no provider).
83
+ // Emits generatedVideoUrl so it connects to any downstream video consumer
84
+ // (e.g. a Seedance video-reference input) by an ordinary edge.
85
+ "gif-to-video",
86
+ // 3D Render Pro: authors a scene AND exports it in one operation, settling
87
+ // with the standard `videoUrl` field. It is a video producer as much as it
88
+ // is a composition producer — omitting it here is the "cannot connect the
89
+ // outputs" bug, and its `composition` handle is typed separately.
90
+ "pro-3d-render",
91
+ // Video Overlay: timed image layers over a video in one local FFmpeg pass
92
+ // (the base audio copied) — emits a video URL on `video-out`.
93
+ "video-overlay",
94
+ // UGC Clip: renders one clip of a UGC video from its ticket — emits a video
95
+ // URL on `video-out` (one per fan-out iteration).
96
+ "ugc-clip",
97
+ // UGC Finish: the video's clips, finished, as one ordered list — a registered producer, so a
98
+ // Bundle edge into Combine Videos routes each one as a video, in order.
99
+ "ugc-finish-clips"
100
+ ]);
101
+ var DYNAMIC_PRODUCER_TYPES = /* @__PURE__ */ new Set([
102
+ "list",
103
+ "sub-workflow",
104
+ "adjust-volume",
105
+ // Pitch & Tempo: audio in → audio out, video in → video out (picture
106
+ // copied). Dual-mode like adjust-volume; stays in AUDIO_PRODUCER_TYPES as
107
+ // its default.
108
+ "pitch-tempo",
109
+ // Dual-mode: audio in → audio out; video in → video out (+ revoiced audio).
110
+ // Listed here so canvas validators accept its output on BOTH audio and video
111
+ // input handles (it also stays in AUDIO_PRODUCER_TYPES as its default).
112
+ "voice-changer",
113
+ // voice-changer-pro (renamed from voice-recast in #3581) is a behavioral
114
+ // twin of voice-changer — identical dual-mode output. Must mirror it in
115
+ // EVERY producer set or its outputs can't connect (was the "cannot connect
116
+ // the outputs of voice-changer-pro" bug). Guarded by producer-types.test.ts.
117
+ "voice-changer-pro",
118
+ // Dubbing joined the dual-mode family with the full-surface upgrade:
119
+ // audio in → dubbed audio; video in (or a video sourceUrl) → dubbed VIDEO
120
+ // (+ audio sidecar). Same wiring contract as voice-changer; stays in
121
+ // AUDIO_PRODUCER_TYPES as its default. Explicitly asserted in
122
+ // producer-types.test.ts (the suite does not fail on omission).
123
+ "dubbing",
124
+ "reduce",
125
+ // Dual-output time chunker (UI label "Split into Chunks"; type id stays
126
+ // "split-media"): video in → video chunks, audio in → audio chunks — two
127
+ // independent lanes on two output handles. Like voice-changer, the canvas
128
+ // validator only sees the source NODE type, not which handle a wire leaves,
129
+ // so it lives here to be accepted on BOTH audio and video input handles. The
130
+ // backend routes the correct lane by sourceHandle in getPrimaryOutput
131
+ // (output-extractor.ts); the frontend does so in extractNodeOutput.
132
+ "split-media",
133
+ // apply-edl renders an EDL into ONE media output whose type is decided at
134
+ // run time by the node's `output` setting (video OR audio) — so its static
135
+ // medium is genuinely unknown and it belongs here, letting canvas validators
136
+ // accept its default media handle on BOTH audio and video input handles. It
137
+ // ALSO emits a fixed `json` handle (the remapped Transcript); that half lives
138
+ // in JSON_PRODUCER_TYPES (frontend/src/lib/data-handles.ts). The FIRST node
139
+ // with both a dynamic media handle and a fixed json handle. Because
140
+ // getOutputType (presentation-utils.ts) deliberately returns "data" for
141
+ // DYNAMIC members, apply-edl is ALSO added to the literal VIDEO_OUTPUT_TYPES
142
+ // there so a published app renders the cut as video, mirroring the
143
+ // voice-changer/dubbing precedent. Asserted in producer-types.test.ts (the
144
+ // suite does not fail on omission).
145
+ "apply-edl",
146
+ // Tighten Episode (podcast use-case node): the episode is video OR audio by
147
+ // its `output` setting (an audio recording forces audio) — runtime-decided.
148
+ "tighten-episode"
149
+ ]);
150
+ var AUDIO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
151
+ "text-to-speech",
152
+ "text-to-audio",
153
+ "generate-music",
154
+ "upload-audio",
155
+ "suno-generate",
156
+ "suno-cover",
157
+ "suno-extend",
158
+ "suno-separate",
159
+ "audio-separation",
160
+ "suno-mashup",
161
+ "suno-replace-section",
162
+ "suno-add-instrumental",
163
+ "suno-add-vocals",
164
+ "suno-convert-wav",
165
+ "suno-upload-extend",
166
+ "trim-audio",
167
+ "mix-audio",
168
+ "combine-audio",
169
+ "adjust-volume",
170
+ "audio-fx",
171
+ "pitch-tempo",
172
+ "reference-audio",
173
+ "audio-isolation",
174
+ "text-to-dialogue",
175
+ "voice-changer",
176
+ // Twin of voice-changer (see DYNAMIC_PRODUCER_TYPES note). Audio is its
177
+ // default output mode; video mode is handled via DYNAMIC membership.
178
+ "voice-changer-pro",
179
+ "dubbing",
180
+ "voice-remix",
181
+ "voice-design",
182
+ // Extract Audio: demuxes a video's audio track to a standalone MP3.
183
+ "extract-audio"
184
+ ]);
185
+ var IMAGE_PRODUCER_TYPES = /* @__PURE__ */ new Set([
186
+ "upload-image",
187
+ "generate-image",
188
+ "edit-image",
189
+ "image-to-image",
190
+ "modify-image",
191
+ "upscale-image",
192
+ "remove-background",
193
+ // extract-frame produces a single still image extracted from a video source.
194
+ "extract-frame",
195
+ // generate-mask emits the source image AND a mask PNG; its `image` source
196
+ // pip is the passthrough (the same image as the input).
197
+ "generate-mask",
198
+ // paint-mask emits the hand-painted mask PNG (a plain image at runtime).
199
+ // Membership is what makes mask targets accept it — mask is an advisory
200
+ // color, not a gated type.
201
+ "paint-mask",
202
+ // reference-sheet's `sheet` is one composited image and `panels` carries
203
+ // clean reference images; both resolve to image URLs at runtime.
204
+ "reference-sheet",
205
+ // reference-board's `image` pip emits a real generated board image.
206
+ "reference-board",
207
+ // image-collage composites N images → ONE image.
208
+ "image-collage",
209
+ // image-overlay places layers on a base → ONE image.
210
+ "image-overlay",
211
+ // 3D Render Pro's `stills` handle carries one PNG per shot of the exported
212
+ // composition (spread into referenceImageUrls like reference-sheet
213
+ // `panels`). A validator sees only the source NODE type, so this also makes
214
+ // its `video` pip droppable on an image input — the handle-blind trade
215
+ // reference-sheet and split-media already make; the input resolvers route
216
+ // by handle, so only `stills` becomes an image at runtime. Deliberately NOT
217
+ // in IMAGE_SOURCE_TYPES on either engine: that set types the node's PRIMARY
218
+ // asset, and 3D Render Pro's is the MP4.
219
+ "pro-3d-render"
220
+ ]);
221
+ var FAN_OUT_EACH_TYPES = /* @__PURE__ */ new Set([
222
+ "list",
223
+ "split-text",
224
+ "filter-list",
225
+ "deduplicate",
226
+ "merge-lists",
227
+ "sort-list",
228
+ "selector",
229
+ // edit-plan `clips` mode emits a bare `Edl[]` on `data.generatedJson`, so an
230
+ // edge leaving it defaults to "each" — one downstream execution (typically an
231
+ // apply-edl render) per clip. The `tighten`/`chapters` modes emit an OBJECT,
232
+ // for which the list extractors return undefined, so an "each" edge falls back
233
+ // to the scalar `edl` value (no fan-out) — the same graceful degradation
234
+ // web-scrape relies on. See `unwrapEditPlanOutput` in `edit-plan-contract.ts`.
235
+ "edit-plan",
236
+ // Content Ideas emits one creative brief per idea on `listResults`, so an
237
+ // edge leaving it defaults to "each" — the node after it (typically
238
+ // Generate Script) runs once per idea, on the server too.
239
+ "content-ideas"
240
+ ]);
241
+ var FAN_OUT_EACH_HANDLES = {
242
+ // Camera Switch run once per clip (Edit Plan in clips mode): each clip's
243
+ // switched EDL is its own Apply EDL render. Its transcript is the same for
244
+ // every clip (the master clock, renamed), so that handle stays one value
245
+ // (decided 2026-10-04).
246
+ "camera-switch": { each: ["edl"], primary: "edl" },
247
+ // UGC Clips: one ticket per clip on `clips` (each); `plan-out` and
248
+ // `transcript` carry one value. Not a FAN_OUT_EACH_TYPES member — every
249
+ // handle of such a member would fan out. Its one run writes the tickets as
250
+ // its list (`listResults`, the editor's `__listResults`). The pip an edge
251
+ // with no handle reads is the UGC wires' own (UGC_PRIMARY_HANDLE).
252
+ "ugc-clips": { each: ["clips"], primary: chunkHRXEZ3SX_cjs.UGC_PRIMARY_HANDLE["ugc-clips"] }
253
+ };
254
+ var FAN_OUT_ALL_OR_NOTHING_TYPES = /* @__PURE__ */ new Set(["ugc-clip"]);
255
+ var OWN_LIST_NODE_TYPES = /* @__PURE__ */ new Set([
256
+ "extract-field",
257
+ "json-process",
258
+ // Site Capture: its stills, in page order — the last capture's, never every capture's (site-capture-node.ts).
259
+ "site-capture"
260
+ ]);
261
+ function ownsItsList(nodeType) {
262
+ return typeof nodeType === "string" && OWN_LIST_NODE_TYPES.has(nodeType);
263
+ }
264
+ function defaultEdgeOutputMode(sourceType, sourceHandle) {
265
+ if (typeof sourceType !== "string") return "last";
266
+ if (FAN_OUT_EACH_TYPES.has(sourceType)) return "each";
267
+ const entry = FAN_OUT_EACH_HANDLES[sourceType];
268
+ if (!entry) return "last";
269
+ return entry.each.includes(sourceHandle || entry.primary) ? "each" : "last";
270
+ }
271
+ function listResultsServeHandle(sourceType, sourceHandle) {
272
+ const entry = typeof sourceType === "string" ? FAN_OUT_EACH_HANDLES[sourceType] : void 0;
273
+ return !entry || entry.each.includes(sourceHandle || entry.primary);
274
+ }
275
+ var FAN_IN_TARGETS = {
276
+ // Choose Best — every wire is a candidate.
277
+ reduce: "*",
278
+ // Content Ideas — one or more recipes, from several Content Recipe nodes
279
+ // and/or one that ran once per post.
280
+ "content-ideas": ["recipes"],
281
+ // Telegram Reply — one message per run, whatever is wired into its text
282
+ // input: a list (or a writer that ran once per item) arrives as one
283
+ // message, never as a burst of sends to the owner's chat.
284
+ "telegram-account-send": ["in"],
285
+ // The list operators — they READ the whole list wired into them (their
286
+ // executors collect every upstream item themselves) and emit a list. Run
287
+ // once per item by an "each" wire (a Split Text, a List, a node that ran per
288
+ // item), every iteration saw the same whole list and answered with its
289
+ // first match: a Filter List fed 11 stories handed 11 copies of story one
290
+ // downstream, and every paid stage after it ran 11 times on it
291
+ // (2026-10-06). A list operator is never fanned out, on any wire.
292
+ "filter-list": "*",
293
+ deduplicate: "*",
294
+ "merge-lists": "*",
295
+ "sort-list": "*",
296
+ selector: "*",
297
+ // Speaker Frames on a clip pack (P3-24 (a), decided 2026-10-06): ONE run over
298
+ // the union of the clips' spans — the pack's EDLs fold onto its `edl` wire
299
+ // instead of running one detection job (and one minimum charge) per clip.
300
+ "speaker-frames": ["edl"],
301
+ // UGC Finish: ONE run over every clip of the video, in clip order — the finish plans its
302
+ // cut and its sound over all of them at once, so it is never run once per clip.
303
+ "ugc-finish-clips": ["clips"]
304
+ };
305
+ function isFanInNodeType(nodeType) {
306
+ return typeof nodeType === "string" && Object.prototype.hasOwnProperty.call(FAN_IN_TARGETS, nodeType);
307
+ }
308
+ function isFanInEdge(targetType, targetHandle) {
309
+ if (!isFanInNodeType(targetType)) return false;
310
+ const spec = FAN_IN_TARGETS[targetType];
311
+ if (spec === "*") return true;
312
+ return targetHandle == null || targetHandle === "" || spec.includes(targetHandle);
313
+ }
314
+
315
+ // src/exposed-field-keys.ts
316
+ var LEGACY_EXPOSED_FIELD_KEYS = {
317
+ // Published as the Text to Speech slider's key. The node's data field, and every runner, route and config
318
+ // panel, has always been `similarityBoost` — so the slider moved nothing.
319
+ "text-to-speech": { similarity: "similarityBoost" }
320
+ };
321
+ function canonicalExposedFieldKey(nodeType, key) {
322
+ if (typeof nodeType !== "string" || !Object.hasOwn(LEGACY_EXPOSED_FIELD_KEYS, nodeType)) return key;
323
+ const renames = LEGACY_EXPOSED_FIELD_KEYS[nodeType];
324
+ return Object.hasOwn(renames, key) ? renames[key] : key;
325
+ }
326
+ function canonicalizeOverrideKeys(nodeType, overrides) {
327
+ let out;
328
+ for (const key of Object.keys(overrides)) {
329
+ const current = canonicalExposedFieldKey(nodeType, key);
330
+ if (current === key) continue;
331
+ out ??= { ...overrides };
332
+ delete out[key];
333
+ if (!Object.hasOwn(overrides, current)) out[current] = overrides[key];
334
+ }
335
+ return out ?? overrides;
336
+ }
337
+
338
+ // src/render-nodes.ts
339
+ var RENDER_JSON_HANDLE = "json";
340
+ var outputSettingMedium = (data) => data.output === "audio" ? "audio" : "video";
341
+ var descriptor = (d) => Object.freeze({ ...d, creditIds: Object.freeze([...d.creditIds]), transcriptOutput: Object.freeze({ ...d.transcriptOutput }) });
342
+ var RENDER_NODE_TYPES = Object.freeze({
343
+ "apply-edl": descriptor({
344
+ mediumOf: outputSettingMedium,
345
+ creditId: (quality) => chunkVA42637J_cjs.applyEdlCreditId(quality),
346
+ creditIds: ["apply-edl", "apply-edl:proxy"],
347
+ clockMapFrom: "input",
348
+ ownerOnlyListing: true,
349
+ latestBatch: true,
350
+ jsonKind: "transcript",
351
+ transcriptOutput: { handle: RENDER_JSON_HANDLE, dataField: "generatedJson" }
352
+ }),
353
+ // Speaker View (C3.2): video only; its `json` is the EDL as it drew it (the
354
+ // turns split, the layouts written), so a player maps the output clock
355
+ // through THAT, and Add Captions never takes it for a Transcript. The wired
356
+ // transcript, remapped through that same drawn edit, comes out on its own
357
+ // `transcript` pip (decided 2026-10-08) — what a caption step reads.
358
+ "speaker-view": descriptor({
359
+ mediumOf: () => "video",
360
+ creditId: (quality, _output, priceTier) => chunkVA42637J_cjs.speakerViewCreditId(quality, priceTier),
361
+ creditIds: chunkVA42637J_cjs.SPEAKER_VIEW_CREDIT_IDS,
362
+ clockMapFrom: "output-json",
363
+ ownerOnlyListing: true,
364
+ latestBatch: true,
365
+ jsonKind: "edl",
366
+ transcriptOutput: { handle: "transcript", dataField: "generatedTranscript" }
367
+ })
368
+ });
369
+ var RENDER_NODE_TYPE_IDS = Object.freeze(Object.keys(RENDER_NODE_TYPES));
370
+ function renderNodeOf(type) {
371
+ return typeof type === "string" && Object.hasOwn(RENDER_NODE_TYPES, type) ? RENDER_NODE_TYPES[type] : void 0;
372
+ }
373
+ function isRenderNodeType(type) {
374
+ return renderNodeOf(type) !== void 0;
375
+ }
376
+ function rendersLatestBatch(type) {
377
+ return renderNodeOf(type)?.latestBatch === true;
378
+ }
379
+ function rendersTranscriptJson(type) {
380
+ return renderNodeOf(type)?.jsonKind === "transcript";
381
+ }
382
+ function renderTranscriptOutputOf(type) {
383
+ return renderNodeOf(type)?.transcriptOutput;
384
+ }
385
+ function isRenderDataHandle(type, handle) {
386
+ const d = renderNodeOf(type);
387
+ if (!d || typeof handle !== "string") return false;
388
+ return handle === RENDER_JSON_HANDLE || handle === d.transcriptOutput.handle;
389
+ }
390
+ function renderSavedJsonOutputs(type) {
391
+ const d = renderNodeOf(type);
392
+ if (!d) return [];
393
+ const json = { outputKey: RENDER_JSON_HANDLE, dataField: "generatedJson" };
394
+ const t = d.transcriptOutput;
395
+ return t.handle === RENDER_JSON_HANDLE ? [json] : [json, { outputKey: t.handle, dataField: t.dataField }];
396
+ }
397
+ var OWNER_ONLY_LISTING_RENDER_TYPES = Object.freeze(
398
+ RENDER_NODE_TYPE_IDS.filter((t) => RENDER_NODE_TYPES[t].ownerOnlyListing)
399
+ );
400
+
401
+ // src/presentation-utils.ts
402
+ var INPUT_NODE_TYPES = /* @__PURE__ */ new Set([
403
+ "text-prompt",
404
+ "upload-image",
405
+ "upload-video",
406
+ "upload-audio",
407
+ "tone",
408
+ "style-guide",
409
+ "provider",
410
+ "scene-count",
411
+ "duration",
412
+ "aspect-ratio",
413
+ "motion",
414
+ "camera-motion",
415
+ "framing",
416
+ "lens",
417
+ "camera-format",
418
+ "lighting",
419
+ "color-look",
420
+ "atmosphere",
421
+ "action-fx",
422
+ "temporal",
423
+ "reference-audio",
424
+ "youtube-video"
425
+ ]);
426
+ var ALWAYS_EXCLUDED_TYPES = /* @__PURE__ */ new Set([
427
+ "sticky-note",
428
+ "webhook-trigger",
429
+ "schedule-trigger",
430
+ "sub-workflow-input",
431
+ "sub-workflow-output"
432
+ ]);
433
+ var NON_OUTPUT_TYPES = /* @__PURE__ */ new Set([
434
+ "text-prompt",
435
+ "list",
436
+ "upload-image",
437
+ "upload-video",
438
+ "upload-audio",
439
+ "reference-audio",
440
+ "rss-feed",
441
+ "youtube-video",
442
+ "tone",
443
+ "style-guide",
444
+ "provider",
445
+ "scene-count",
446
+ "duration",
447
+ "aspect-ratio",
448
+ "motion",
449
+ "camera-motion",
450
+ "framing",
451
+ "lens",
452
+ "camera-format",
453
+ "lighting",
454
+ "color-look",
455
+ "atmosphere",
456
+ "action-fx",
457
+ "temporal",
458
+ "sticky-note",
459
+ "sub-workflow-input",
460
+ "sub-workflow-output",
461
+ "webhook-trigger",
462
+ "schedule-trigger",
463
+ "combine-text",
464
+ "split-text",
465
+ "save-to-storage",
466
+ "webhook-output",
467
+ "component"
468
+ ]);
469
+ var MEDIA_PRODUCING_TYPES = /* @__PURE__ */ new Set([
470
+ "generate-image",
471
+ "edit-image",
472
+ "image-to-image",
473
+ "image-to-video",
474
+ "text-to-video",
475
+ "video-to-video",
476
+ "text-to-speech",
477
+ "generate-music",
478
+ "text-to-audio",
479
+ "generate-script",
480
+ "ai-writer",
481
+ "llm-chat",
482
+ "render-video",
483
+ "video-composer",
484
+ "after-effects",
485
+ "lottie-overlay",
486
+ "3d-title",
487
+ "motion-graphics",
488
+ "composite",
489
+ "text-to-dialogue",
490
+ "voice-changer",
491
+ "dubbing",
492
+ "voice-remix",
493
+ "voice-design",
494
+ "extend-video",
495
+ "lip-sync",
496
+ "motion-transfer",
497
+ "video-upscale",
498
+ "video-depth"
499
+ ]);
500
+ var IMAGE_OUTPUT_TYPES = /* @__PURE__ */ new Set([
501
+ "generate-image",
502
+ "edit-image",
503
+ "image-to-image",
504
+ "upload-image"
505
+ ]);
506
+ var VIDEO_OUTPUT_TYPES = /* @__PURE__ */ new Set([
507
+ "image-to-video",
508
+ "text-to-video",
509
+ "video-to-video",
510
+ "extend-video",
511
+ "render-video",
512
+ "video-composer",
513
+ "after-effects",
514
+ "lottie-overlay",
515
+ "3d-title",
516
+ "motion-graphics",
517
+ "composite",
518
+ "combine-videos",
519
+ "merge-video-audio",
520
+ "resize-video",
521
+ "trim-video",
522
+ "speed-ramp",
523
+ "loop-video",
524
+ "fade-video",
525
+ "transcode-video",
526
+ "upload-video",
527
+ "lip-sync",
528
+ "motion-transfer",
529
+ "video-upscale",
530
+ "video-depth",
531
+ "add-captions",
532
+ "social-media-format",
533
+ // A render (Apply EDL) renders an EDL into video OR audio. Its medium is
534
+ // decided at run time (DYNAMIC_PRODUCER_TYPES), so getOutputType would answer
535
+ // "data" and a published app would render the cut as a JSON blob. Declaring
536
+ // every render here — as the voice-changer/dubbing precedent does for their
537
+ // default medium — makes the classifier answer "video" (the common case; an
538
+ // audio-only cut still plays in a video element). Asserted in
539
+ // producer-types.test.ts.
540
+ ...RENDER_NODE_TYPE_IDS,
541
+ // Tighten Episode: a published app shows the episode as media, never as data
542
+ // (it is not a render, so RENDER_NODE_TYPE_IDS does not bring it).
543
+ "tighten-episode"
544
+ ]);
545
+ var AUDIO_OUTPUT_TYPES = /* @__PURE__ */ new Set([
546
+ "text-to-speech",
547
+ "generate-music",
548
+ "text-to-audio",
549
+ "text-to-dialogue",
550
+ "voice-changer",
551
+ "dubbing",
552
+ "voice-remix",
553
+ "voice-design",
554
+ "mix-audio",
555
+ "adjust-volume",
556
+ "audio-fx",
557
+ "pitch-tempo",
558
+ "trim-audio",
559
+ "audio-isolation",
560
+ "audio-separation",
561
+ "upload-audio"
562
+ ]);
563
+ var TEXT_OUTPUT_TYPES = /* @__PURE__ */ new Set([
564
+ "generate-script",
565
+ "ai-writer",
566
+ "llm-chat",
567
+ "transcribe",
568
+ "image-to-text",
569
+ "qa-check",
570
+ "text-prompt",
571
+ // UGC Cards' output card is its Notes: a run hands it on as the node's text
572
+ // (`output.text`, `generatedText` on the canvas).
573
+ "ugc-cards"
574
+ ]);
575
+ function getInputNodes(nodes, curatedOnly = true) {
576
+ return nodes.filter((n) => {
577
+ if (!n.type || ALWAYS_EXCLUDED_TYPES.has(n.type)) return false;
578
+ if (n.hidden) return false;
579
+ if (curatedOnly) {
580
+ if (n.data.presentationInput === true) return true;
581
+ if (n.data.presentationVisible === true && INPUT_NODE_TYPES.has(n.type)) return true;
582
+ return false;
583
+ }
584
+ return true;
585
+ });
586
+ }
587
+ function getOutputNodes(nodes, edges, curatedOnly = true) {
588
+ const nodesWithOutgoing = new Set(edges.map((e) => e.source));
589
+ return nodes.filter((n) => {
590
+ if (!n.type || ALWAYS_EXCLUDED_TYPES.has(n.type)) return false;
591
+ if (n.hidden) return false;
592
+ if (curatedOnly) {
593
+ if (n.data.presentationOutput === true) return true;
594
+ if (n.data.presentationVisible === true) {
595
+ if (NON_OUTPUT_TYPES.has(n.type)) return false;
596
+ return !nodesWithOutgoing.has(n.id) || isMediaProducingType(n.type);
597
+ }
598
+ return false;
599
+ }
600
+ return true;
601
+ });
602
+ }
603
+ function getOutputType(nodeType) {
604
+ if (!nodeType) return "data";
605
+ if (IMAGE_OUTPUT_TYPES.has(nodeType)) return "image";
606
+ if (VIDEO_OUTPUT_TYPES.has(nodeType)) return "video";
607
+ if (AUDIO_OUTPUT_TYPES.has(nodeType)) return "audio";
608
+ if (TEXT_OUTPUT_TYPES.has(nodeType)) return "text";
609
+ if (VIDEO_PRODUCER_TYPES.has(nodeType)) return "video";
610
+ if (AUDIO_PRODUCER_TYPES.has(nodeType)) return "audio";
611
+ return "data";
612
+ }
613
+ function isMediaProducingType(nodeType) {
614
+ if (MEDIA_PRODUCING_TYPES.has(nodeType)) return true;
615
+ const output = getOutputType(nodeType);
616
+ return output === "image" || output === "video" || output === "audio";
617
+ }
618
+ function getNodeResult(nodeData) {
619
+ const previewItems = nodeData.previewItems;
620
+ if (previewItems && previewItems.length > 0) {
621
+ const first = previewItems.find((item) => item.visible !== false) ?? previewItems[0];
622
+ if (first) {
623
+ if (first.type === "image" || first.type === "video" || first.type === "audio") {
624
+ return { url: first.value };
625
+ }
626
+ return { text: first.value };
627
+ }
628
+ }
629
+ const results = nodeData.generatedResults;
630
+ if (results && results.length > 0) {
631
+ const idx = nodeData.activeResultIndex ?? 0;
632
+ const active = results[idx] ?? results[0];
633
+ const url2 = active?.url ?? active?.imageUrl ?? active?.videoUrl ?? active?.audioUrl;
634
+ const text2 = active?.text ?? active?.script;
635
+ return { url: url2, text: text2 };
636
+ }
637
+ const url = nodeData.generatedImageUrl ?? nodeData.generatedVideoUrl ?? nodeData.generatedAudioUrl;
638
+ const text = nodeData.generatedScript ?? nodeData.generatedText;
639
+ return { url, text };
640
+ }
641
+ function getNodeLabel(node) {
642
+ return node.data.label || node.type?.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()) || "Node";
643
+ }
644
+ var INPUT_FIELD_MAP = {
645
+ // --- Source / upload nodes (not parameter pickers) ---
646
+ "text-prompt": { key: "text", type: "text" },
647
+ "upload-image": { key: "url", type: "image-url" },
648
+ "upload-video": { key: "url", type: "video-url" },
649
+ "upload-audio": { key: "url", type: "audio-url" },
650
+ "reference-audio": { key: "extractedAudioUrl", type: "audio-url" },
651
+ // A LINK, not an upload (rule: `videoLinkInputProblem`, video-link.ts); still a `video-url` media input.
652
+ "youtube-video": { key: "youtubeUrl", type: "video-url" },
653
+ // --- Classic parameters ---
654
+ "provider": { key: "provider", type: "select" },
655
+ "style-guide": { key: "text", type: "text" },
656
+ // reads data.text (was wrongly "styleGuide")
657
+ "scene-count": { key: "count", type: "number" },
658
+ "duration": { key: "seconds", type: "number" },
659
+ // reads data.seconds (was wrongly "duration")
660
+ "aspect-ratio": { key: "ratio", type: "select" },
661
+ // reads data.ratio (was wrongly "aspectRatio")
662
+ // --- Single-field parameter pickers ---
663
+ "tone": { key: "tone", type: "select" },
664
+ "motion": { key: "motion", type: "select" },
665
+ "camera-motion": { key: "cameraMotion", type: "select" },
666
+ "lens": { key: "lens", type: "select" },
667
+ "camera-format": { key: "cameraFormat", type: "select" },
668
+ "color-look": { key: "colorLook", type: "select" },
669
+ "atmosphere": { key: "atmosphere", type: "select" },
670
+ "style": { key: "style", type: "select" },
671
+ "setting": { key: "setting", type: "select" },
672
+ "mood": { key: "mood", type: "select" },
673
+ "photographer": { key: "photographer", type: "select" },
674
+ "aesthetic": { key: "aesthetic", type: "select" },
675
+ "era": { key: "era", type: "select" },
676
+ "material": { key: "material", type: "select" },
677
+ "animal": { key: "animal", type: "select" },
678
+ "vehicle": { key: "vehicle", type: "select" },
679
+ "weapon": { key: "weapon", type: "select" },
680
+ "furniture": { key: "furniture", type: "select" },
681
+ "photo-genre": { key: "photoGenre", type: "select" },
682
+ "backdrop": { key: "backdrop", type: "select" },
683
+ "held-prop": { key: "heldProp", type: "select" },
684
+ "render-quality": { key: "renderQuality", type: "select" },
685
+ "composition-effects": { key: "compositionEffect", type: "select" },
686
+ "post-process-effects": { key: "postProcess", type: "select" },
687
+ "action-fx": { key: "actionFx", type: "select" },
688
+ "character-fx": { key: "characterFx", type: "select" },
689
+ "character-motion": { key: "characterMotion", type: "select" },
690
+ "transition": { key: "transition", type: "select" },
691
+ "loop-subject": { key: "loopSubject", type: "select" },
692
+ // --- Multi-dimension pickers: representative (first) field. Overriding only
693
+ // sets that dimension; full hint composition runs in the executors. ---
694
+ "framing": { key: "shotSize", type: "select" },
695
+ "lighting": { key: "timeOfDay", type: "select" },
696
+ "temporal": { key: "temporalSpeed", type: "select" },
697
+ "person": { key: "type", type: "select" },
698
+ "pose": { key: "pose", type: "select" },
699
+ "styling": { key: "makeup", type: "select" },
700
+ "exposure-settings": { key: "aperture", type: "select" },
701
+ "music-genre": { key: "subgenre", type: "select" },
702
+ "music-mood": { key: "emotion", type: "select" },
703
+ "instrumentation": { key: "production", type: "select" },
704
+ "voice-character": { key: "timbre", type: "select" },
705
+ "voice-delivery": { key: "archetype", type: "select" },
706
+ // --- UGC (Cloud) ---
707
+ "ugc-creator": { key: "source", type: "select" }
708
+ };
709
+ var INPUT_FIELD_EXTRA_KEYS = {
710
+ "ugc-creator": [{ key: "gender", type: "select" }, { key: "photoUrl", type: "image-url" }],
711
+ // The script's language: changes together with UGC_OVERRIDABLE_FIELDS["ugc-script"] and UgcScriptData.language.
712
+ "ugc-script": [{ key: "language", type: "select" }]
713
+ };
714
+ function getInputFieldExtraKeys(nodeType) {
715
+ return Object.hasOwn(INPUT_FIELD_EXTRA_KEYS, nodeType) ? INPUT_FIELD_EXTRA_KEYS[nodeType] : [];
716
+ }
717
+ function getInputFieldSchema(nodeType) {
718
+ return INPUT_FIELD_MAP[nodeType];
719
+ }
720
+ var MEDIA_INPUT_FIELD_TYPES = /* @__PURE__ */ new Set([
721
+ "image-url",
722
+ "video-url",
723
+ "audio-url"
724
+ ]);
725
+ function mergeNodeInputOverrides(nodeType, data, overrides) {
726
+ const incoming = canonicalizeOverrideKeys(nodeType, overrides);
727
+ const base = nodeType === "youtube-video" ? chunkNEJ2PV4C_cjs.dropStaleVideoLinkFields(data, incoming) : data;
728
+ const merged = { ...base, ...incoming };
729
+ for (const [key, value] of Object.entries(incoming)) {
730
+ if (value === null) delete merged[key];
731
+ }
732
+ const schema = nodeType ? INPUT_FIELD_MAP[nodeType] : void 0;
733
+ if (schema && MEDIA_INPUT_FIELD_TYPES.has(schema.type) && schema.key in overrides && overrides[schema.key] !== data[schema.key] && !("metadata" in overrides)) {
734
+ delete merged.metadata;
735
+ }
736
+ return merged;
737
+ }
738
+ function migrateToItems(order) {
739
+ if (!order) return void 0;
740
+ return order.map((nodeId) => ({ type: "node", nodeId }));
741
+ }
742
+ function validateNoNestedGroups(items) {
743
+ return items.map((item) => {
744
+ if (item.type === "group") {
745
+ return { ...item, items: item.items.filter((child) => child.type !== "group") };
746
+ }
747
+ return item;
748
+ });
749
+ }
750
+ function flattenItems(items) {
751
+ const result = [];
752
+ for (const item of items) {
753
+ if (item.type === "group") {
754
+ result.push(...flattenItems(item.items));
755
+ } else {
756
+ result.push(item);
757
+ }
758
+ }
759
+ return result;
760
+ }
761
+ function getItemSortId(item) {
762
+ return item.type === "node" ? item.nodeId : item.id;
763
+ }
764
+ function cleanOrphanedItems(items, nodeIds) {
765
+ return items.filter((item) => {
766
+ if (item.type === "node" || item.type === "field" || item.type === "output") return nodeIds.has(item.nodeId);
767
+ return true;
768
+ }).map((item) => {
769
+ if (item.type === "group") {
770
+ return { ...item, items: cleanOrphanedItems(item.items, nodeIds) };
771
+ }
772
+ return item;
773
+ });
774
+ }
775
+
776
+ exports.AUDIO_PRODUCER_TYPES = AUDIO_PRODUCER_TYPES;
777
+ exports.DYNAMIC_PRODUCER_TYPES = DYNAMIC_PRODUCER_TYPES;
778
+ exports.FAN_IN_TARGETS = FAN_IN_TARGETS;
779
+ exports.FAN_OUT_ALL_OR_NOTHING_TYPES = FAN_OUT_ALL_OR_NOTHING_TYPES;
780
+ exports.FAN_OUT_EACH_HANDLES = FAN_OUT_EACH_HANDLES;
781
+ exports.FAN_OUT_EACH_TYPES = FAN_OUT_EACH_TYPES;
782
+ exports.IMAGE_PRODUCER_TYPES = IMAGE_PRODUCER_TYPES;
783
+ exports.INPUT_FIELD_EXTRA_KEYS = INPUT_FIELD_EXTRA_KEYS;
784
+ exports.INPUT_FIELD_MAP = INPUT_FIELD_MAP;
785
+ exports.INPUT_NODE_TYPES = INPUT_NODE_TYPES;
786
+ exports.LEGACY_EXPOSED_FIELD_KEYS = LEGACY_EXPOSED_FIELD_KEYS;
787
+ exports.OWNER_ONLY_LISTING_RENDER_TYPES = OWNER_ONLY_LISTING_RENDER_TYPES;
788
+ exports.OWN_LIST_NODE_TYPES = OWN_LIST_NODE_TYPES;
789
+ exports.RENDER_JSON_HANDLE = RENDER_JSON_HANDLE;
790
+ exports.RENDER_NODE_TYPES = RENDER_NODE_TYPES;
791
+ exports.RENDER_NODE_TYPE_IDS = RENDER_NODE_TYPE_IDS;
792
+ exports.VIDEO_PRODUCER_TYPES = VIDEO_PRODUCER_TYPES;
793
+ exports.canonicalExposedFieldKey = canonicalExposedFieldKey;
794
+ exports.canonicalizeOverrideKeys = canonicalizeOverrideKeys;
795
+ exports.cleanOrphanedItems = cleanOrphanedItems;
796
+ exports.defaultEdgeOutputMode = defaultEdgeOutputMode;
797
+ exports.flattenItems = flattenItems;
798
+ exports.getInputFieldExtraKeys = getInputFieldExtraKeys;
799
+ exports.getInputFieldSchema = getInputFieldSchema;
800
+ exports.getInputNodes = getInputNodes;
801
+ exports.getItemSortId = getItemSortId;
802
+ exports.getNodeLabel = getNodeLabel;
803
+ exports.getNodeResult = getNodeResult;
804
+ exports.getOutputNodes = getOutputNodes;
805
+ exports.getOutputType = getOutputType;
806
+ exports.isFanInEdge = isFanInEdge;
807
+ exports.isFanInNodeType = isFanInNodeType;
808
+ exports.isRenderDataHandle = isRenderDataHandle;
809
+ exports.isRenderNodeType = isRenderNodeType;
810
+ exports.listResultsServeHandle = listResultsServeHandle;
811
+ exports.mergeNodeInputOverrides = mergeNodeInputOverrides;
812
+ exports.migrateToItems = migrateToItems;
813
+ exports.ownsItsList = ownsItsList;
814
+ exports.renderNodeOf = renderNodeOf;
815
+ exports.renderSavedJsonOutputs = renderSavedJsonOutputs;
816
+ exports.renderTranscriptOutputOf = renderTranscriptOutputOf;
817
+ exports.rendersLatestBatch = rendersLatestBatch;
818
+ exports.rendersTranscriptJson = rendersTranscriptJson;
819
+ exports.validateNoNestedGroups = validateNoNestedGroups;
820
+ //# sourceMappingURL=chunk-VXPLKQWY.cjs.map
821
+ //# sourceMappingURL=chunk-VXPLKQWY.cjs.map