@nodaro/shared 3.30.0 → 3.32.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 (388) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-2NIQO2J3.cjs +54 -0
  3. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  4. package/dist/chunk-2OJIVO7R.cjs +32 -0
  5. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  6. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  7. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  8. package/dist/chunk-3CUFITU7.js +1905 -0
  9. package/dist/chunk-3CUFITU7.js.map +1 -0
  10. package/dist/chunk-3RYKIUAE.js +86 -0
  11. package/dist/chunk-3RYKIUAE.js.map +1 -0
  12. package/dist/chunk-44I73CQS.cjs +194 -0
  13. package/dist/chunk-44I73CQS.cjs.map +1 -0
  14. package/dist/chunk-5AUSSJIM.cjs +3372 -0
  15. package/dist/chunk-5AUSSJIM.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-5THUHJ3E.js +46 -0
  21. package/dist/chunk-5THUHJ3E.js.map +1 -0
  22. package/dist/chunk-5U7VLG43.js +141 -0
  23. package/dist/chunk-5U7VLG43.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-6DKDOWBL.js +1567 -0
  27. package/dist/chunk-6DKDOWBL.js.map +1 -0
  28. package/dist/chunk-6IJOPRZP.cjs +197 -0
  29. package/dist/chunk-6IJOPRZP.cjs.map +1 -0
  30. package/dist/chunk-7G7G42KS.js +86 -0
  31. package/dist/chunk-7G7G42KS.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-AROWPFO2.js +773 -0
  35. package/dist/chunk-AROWPFO2.js.map +1 -0
  36. package/dist/chunk-AVQK77G6.cjs +2000 -0
  37. package/dist/chunk-AVQK77G6.cjs.map +1 -0
  38. package/dist/chunk-C57NEO3X.js +3327 -0
  39. package/dist/chunk-C57NEO3X.js.map +1 -0
  40. package/dist/chunk-CK3GK34R.js +1381 -0
  41. package/dist/chunk-CK3GK34R.js.map +1 -0
  42. package/dist/chunk-E2TGXG6X.cjs +1770 -0
  43. package/dist/chunk-E2TGXG6X.cjs.map +1 -0
  44. package/dist/chunk-EK362Q45.cjs +38 -0
  45. package/dist/chunk-EK362Q45.cjs.map +1 -0
  46. package/dist/chunk-FBV5DF6D.js +95 -0
  47. package/dist/chunk-FBV5DF6D.js.map +1 -0
  48. package/dist/chunk-FG4E7MTG.cjs +4 -0
  49. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  53. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  54. package/dist/chunk-HSHCCBIV.js +255 -0
  55. package/dist/chunk-HSHCCBIV.js.map +1 -0
  56. package/dist/chunk-IEBZHTPE.js +254 -0
  57. package/dist/chunk-IEBZHTPE.js.map +1 -0
  58. package/dist/chunk-ISJDAFKS.js +1604 -0
  59. package/dist/chunk-ISJDAFKS.js.map +1 -0
  60. package/dist/chunk-J6KHW2E5.cjs +1963 -0
  61. package/dist/chunk-J6KHW2E5.cjs.map +1 -0
  62. package/dist/chunk-J7BMO73N.cjs +114 -0
  63. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  64. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  65. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  66. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  67. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  68. package/dist/chunk-JSNV5O2F.cjs +34 -0
  69. package/dist/chunk-JSNV5O2F.cjs.map +1 -0
  70. package/dist/chunk-JWA5SGCS.js +203 -0
  71. package/dist/chunk-JWA5SGCS.js.map +1 -0
  72. package/dist/chunk-JX5YZ4DH.cjs +430 -0
  73. package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
  74. package/dist/chunk-KHCBJ7KD.js +42 -0
  75. package/dist/chunk-KHCBJ7KD.js.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-LKAIXWK3.js +181 -0
  79. package/dist/chunk-LKAIXWK3.js.map +1 -0
  80. package/dist/chunk-LPW3XNC2.js +471 -0
  81. package/dist/chunk-LPW3XNC2.js.map +1 -0
  82. package/dist/chunk-M36G6SRP.js +447 -0
  83. package/dist/chunk-M36G6SRP.js.map +1 -0
  84. package/dist/chunk-MRXGWL42.cjs +4 -0
  85. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  86. package/dist/chunk-NB72XWXQ.cjs +54 -0
  87. package/dist/chunk-NB72XWXQ.cjs.map +1 -0
  88. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  89. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  90. package/dist/chunk-NT6IJH4L.cjs +273 -0
  91. package/dist/chunk-NT6IJH4L.cjs.map +1 -0
  92. package/dist/chunk-O5MP52U2.cjs +526 -0
  93. package/dist/chunk-O5MP52U2.cjs.map +1 -0
  94. package/dist/chunk-O7PUQLJ3.cjs +818 -0
  95. package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
  96. package/dist/chunk-PQHS255G.js +1369 -0
  97. package/dist/chunk-PQHS255G.js.map +1 -0
  98. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  99. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  100. package/dist/chunk-Q4CDQ2KO.js +21 -0
  101. package/dist/chunk-Q4CDQ2KO.js.map +1 -0
  102. package/dist/chunk-QELDJGDK.cjs +1714 -0
  103. package/dist/chunk-QELDJGDK.cjs.map +1 -0
  104. package/dist/chunk-QJRP44ZO.js +769 -0
  105. package/dist/chunk-QJRP44ZO.js.map +1 -0
  106. package/dist/chunk-QNGNOU4Z.js +29 -0
  107. package/dist/chunk-QNGNOU4Z.js.map +1 -0
  108. package/dist/chunk-RJL7RCEM.cjs +159 -0
  109. package/dist/chunk-RJL7RCEM.cjs.map +1 -0
  110. package/dist/chunk-RN3RMBJZ.js +1164 -0
  111. package/dist/chunk-RN3RMBJZ.js.map +1 -0
  112. package/dist/chunk-S5DMKUWK.cjs +1273 -0
  113. package/dist/chunk-S5DMKUWK.cjs.map +1 -0
  114. package/dist/chunk-SES6GDBQ.cjs +624 -0
  115. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  116. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  117. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  118. package/dist/chunk-TZBIY5C3.js +187 -0
  119. package/dist/chunk-TZBIY5C3.js.map +1 -0
  120. package/dist/chunk-TZE673G6.js +3 -0
  121. package/dist/chunk-TZE673G6.js.map +1 -0
  122. package/dist/chunk-ULXI7A6Q.cjs +1047 -0
  123. package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
  124. package/dist/chunk-VIWSWVAW.js +1782 -0
  125. package/dist/chunk-VIWSWVAW.js.map +1 -0
  126. package/dist/chunk-VWGNPMJZ.cjs +19 -0
  127. package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
  128. package/dist/chunk-WDIBOWAA.js +1054 -0
  129. package/dist/chunk-WDIBOWAA.js.map +1 -0
  130. package/dist/chunk-WNG7HRVA.cjs +25 -0
  131. package/dist/chunk-WNG7HRVA.cjs.map +1 -0
  132. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  133. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  134. package/dist/chunk-WRSWH7US.cjs +285 -0
  135. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  136. package/dist/chunk-XAMC4S53.js +17 -0
  137. package/dist/chunk-XAMC4S53.js.map +1 -0
  138. package/dist/chunk-XNISPHTZ.js +1039 -0
  139. package/dist/chunk-XNISPHTZ.js.map +1 -0
  140. package/dist/chunk-Y2PM3FFL.js +3 -0
  141. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  142. package/dist/chunk-YBPBK5KI.js +1030 -0
  143. package/dist/chunk-YBPBK5KI.js.map +1 -0
  144. package/dist/chunk-YHRG7UOC.js +31 -0
  145. package/dist/chunk-YHRG7UOC.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-Z4AZW6FY.js +920 -0
  153. package/dist/chunk-Z4AZW6FY.js.map +1 -0
  154. package/dist/chunk-ZDFHA2EC.js +572 -0
  155. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  159. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  160. package/dist/chunk-ZT77RY6R.js +404 -0
  161. package/dist/chunk-ZT77RY6R.js.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 +283 -0
  165. package/dist/entries/apps.d.ts +283 -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 +592 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1429 -0
  183. package/dist/entries/credits.d.ts +1429 -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 +247 -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 +1733 -0
  279. package/dist/entries/workflow.d.ts +1733 -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 +7731 -26444
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -23733
  291. package/dist/index.d.ts +32 -23733
  292. package/dist/index.js +40 -24641
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-flJYaa-g.d.cts +561 -0
  295. package/dist/model-catalog-flJYaa-g.d.ts +561 -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-BIqiCzSA.d.cts +90 -0
  299. package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
  300. package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
  301. package/dist/scene-node-types-DjenYFLO.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__/entity-image-handle.test.ts +61 -1
  312. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  313. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  314. package/src/__tests__/json-kinds.test.ts +10 -0
  315. package/src/__tests__/model-seed-capability.test.ts +34 -0
  316. package/src/__tests__/no-internal-imports.test.ts +1 -1
  317. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  318. package/src/__tests__/node-preset-extract.test.ts +8 -0
  319. package/src/__tests__/node-run-routes.test.ts +63 -0
  320. package/src/__tests__/node-runtime-keys.test.ts +70 -0
  321. package/src/__tests__/package-entries.test.ts +50 -0
  322. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  323. package/src/__tests__/presentation-utils.test.ts +14 -0
  324. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  325. package/src/__tests__/producer-types.test.ts +15 -0
  326. package/src/__tests__/run-continuation.test.ts +7 -1
  327. package/src/__tests__/seedance-draft.test.ts +74 -0
  328. package/src/__tests__/site-capture-node.test.ts +58 -0
  329. package/src/__tests__/ugc-clip-saved-list.test.ts +19 -0
  330. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  331. package/src/__tests__/ugc-node-wires.test.ts +606 -0
  332. package/src/__tests__/ugc-run-state.test.ts +85 -7
  333. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  334. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  335. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  336. package/src/__tests__/workflow-export-strip.test.ts +14 -0
  337. package/src/add-captions-plan.ts +9 -3
  338. package/src/caption-edge-dash.ts +33 -0
  339. package/src/credit-estimators/index.ts +22 -1
  340. package/src/credit-estimators/pitch-tempo.ts +15 -1
  341. package/src/credit-estimators/speech.ts +72 -4
  342. package/src/credit-estimators/unit-quote.ts +52 -0
  343. package/src/credit-estimators/video-sfx.ts +15 -0
  344. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  345. package/src/entity-image-handle.ts +50 -1
  346. package/src/entries/apps.ts +63 -0
  347. package/src/entries/captions.ts +34 -0
  348. package/src/entries/catalogs.ts +65 -0
  349. package/src/entries/credits.ts +104 -0
  350. package/src/entries/edl.ts +42 -0
  351. package/src/entries/entities.ts +144 -0
  352. package/src/entries/i18n.ts +31 -0
  353. package/src/entries/llm-models.ts +63 -0
  354. package/src/entries/media.ts +36 -0
  355. package/src/entries/model-catalog.ts +89 -0
  356. package/src/entries/models.ts +266 -0
  357. package/src/entries/nodes.ts +245 -0
  358. package/src/entries/organizations.ts +9 -0
  359. package/src/entries/pipeline.ts +43 -0
  360. package/src/entries/scene3d.ts +27 -0
  361. package/src/entries/social.ts +297 -0
  362. package/src/entries/types.ts +26 -0
  363. package/src/entries/ugc.ts +14 -0
  364. package/src/entries/video.ts +59 -0
  365. package/src/entries/workflow.ts +172 -0
  366. package/src/fan-out-rows.ts +2 -0
  367. package/src/index.ts +25 -1838
  368. package/src/json-kinds.ts +13 -0
  369. package/src/model-catalog.ts +97 -36
  370. package/src/model-constants.ts +3 -0
  371. package/src/node-mappable-fields.ts +1 -0
  372. package/src/node-preset-export.ts +2 -2
  373. package/src/node-preset-extract.ts +6 -4
  374. package/src/node-run-routes.ts +78 -0
  375. package/src/node-runtime-keys.ts +50 -1
  376. package/src/normalize-node-params.ts +30 -0
  377. package/src/presentation-utils.ts +8 -0
  378. package/src/preview-gate.ts +92 -14
  379. package/src/producer-types.ts +26 -2
  380. package/src/run-continuation.ts +21 -0
  381. package/src/seedance-draft.ts +64 -0
  382. package/src/site-capture-node.ts +82 -0
  383. package/src/social-post.ts +13 -0
  384. package/src/ugc-lane-wires.ts +246 -0
  385. package/src/ugc-node-wires.ts +653 -0
  386. package/src/ugc-run-state.ts +65 -8
  387. package/src/video-analysis-pricing.ts +31 -29
  388. package/src/workflow-export.ts +3 -1
@@ -0,0 +1,1782 @@
1
+ import { MODEL_CATALOG, VIDEO_DURATION_AUTO, isAutoVideoDuration } from './chunk-C57NEO3X.js';
2
+ import { z } from 'zod';
3
+
4
+ var CREDIT_BASE_USD = 2e-3;
5
+ var IMAGE_PROMPT_MAX = 5e3;
6
+ var IMAGE_ASPECT_RATIO_VALUES = [
7
+ "auto",
8
+ "1:1",
9
+ "16:9",
10
+ "9:16",
11
+ "4:3",
12
+ "3:4",
13
+ "3:2",
14
+ "2:3",
15
+ "5:4",
16
+ "4:5",
17
+ "21:9",
18
+ // Ultra-wide / ultra-tall banner ratios: Wan 2.7 + Wan 2.7 Pro (8:1, 1:8)
19
+ // and Nano Banana 2 Lite (4:1, 1:4, 8:1, 1:8).
20
+ "4:1",
21
+ "1:4",
22
+ "8:1",
23
+ "1:8",
24
+ // GPT Image 2.5 (Flare + Sunburst) additions: near-square and ultra-wide/tall
25
+ // cinema ratios (docs.kie.ai/market/gpt/gpt-image-2-5-*).
26
+ "27:16",
27
+ "16:27",
28
+ "9:8",
29
+ "8:9"
30
+ ];
31
+ var MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER = {
32
+ // ── higher than the 5000 default ──
33
+ "nano-banana-2": 2e4,
34
+ // docs.kie.ai/market/google/nano-banana-2
35
+ "nano-banana-2-lite": 2e4,
36
+ // docs.kie.ai/market/google/nano-banana-2-lite
37
+ "nano-banana-2-1": 2e4,
38
+ // docs.kie.ai/market/google/nanobanana-2-1
39
+ "nano-banana-pro": 2e4,
40
+ // docs.kie.ai/market/google/pro-image-to-image
41
+ "gpt-image-2-i2i": 2e4,
42
+ // docs.kie.ai/market/gpt/gpt-image-2-image-to-image
43
+ // GPT Image 2.5 — all four lanes document a 20000-char prompt ceiling.
44
+ "gpt-image-2-5-flare": 2e4,
45
+ // docs.kie.ai/market/gpt/gpt-image-2-5-flare-text-to-image
46
+ "gpt-image-2-5-flare-i2i": 2e4,
47
+ // docs.kie.ai/market/gpt/gpt-image-2-5-flare-image-to-image
48
+ "gpt-image-2-5-sunburst": 2e4,
49
+ // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-text-to-image
50
+ "gpt-image-2-5-sunburst-i2i": 2e4,
51
+ // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-image-to-image
52
+ // ── lower than the 5000 default (over-send risk if left at default) ──
53
+ "seedream": 3e3,
54
+ // docs.kie.ai/market/seedream/4-5-text-to-image
55
+ "seedream-edit": 3e3,
56
+ // docs.kie.ai/market/seedream/4-5-edit
57
+ "seedream-5-lite": 1e3,
58
+ // docs.kie.ai/market/seedream/5-lite-text-to-image
59
+ "seedream-5-lite-i2i": 3e3,
60
+ // docs.kie.ai/market/seedream-5-lite-image-to-image (NB: t2i sibling is 1000)
61
+ "qwen": 3e3,
62
+ // docs.kie.ai/market/qwen/text-to-image
63
+ "qwen-edit": 2e3,
64
+ // docs.kie.ai/market/qwen/image-edit
65
+ // Z-Image is the SHORTEST of the family — "maxLength: 1000" in its schema
66
+ // (docs.kie.ai/market/z-image/z-image, re-fetched 2026-09-15). It was listed
67
+ // below as "verified == 5000", which is how three production runs on
68
+ // 2026-09-07 sent a workflow-assembled prompt straight into KIE's
69
+ // `{"code":500,"msg":"The text length cannot exceed the maximum limit"}`.
70
+ "z-image": 1e3
71
+ // docs.kie.ai/market/z-image/z-image
72
+ // verified == 5000 default (no entry needed): imagen4(-fast/-ultra), nano-banana,
73
+ // nano-banana-edit, flux, flux-flex, gpt-image-2, ideogram-v3/-edit/-remix,
74
+ // grok, qwen-i2i, seedream-5-pro, seedream-5-pro-i2i
75
+ // (docs.kie.ai/market/seedream/5-pro-text-to-image + 5-pro-image-to-image),
76
+ // seedream-5-flash, seedream-5-flash-i2i (both "4–5000 characters";
77
+ // docs.kie.ai/market/seedream/5-flash-text-to-image + 5-flash-image-to-image).
78
+ // grok-i2i: doc states 390000 (78× its t2i sibling) — treated as a KIE schema
79
+ // typo and left at the 5000 default per the sanity-cap decision.
80
+ // UNVERIFIED (no limit stated in schema) → 5000 default: flux-kontext(-max)
81
+ // gpt-image, gpt-image-i2i, flux-i2i, flux-pro-i2i.
82
+ };
83
+ function getMaxImagePromptChars(provider) {
84
+ return provider && MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER[provider] || IMAGE_PROMPT_MAX;
85
+ }
86
+ var VIDEO_PROMPT_MAX = 8e3;
87
+ var SUNO_TEXT_MAX = 5e3;
88
+ var SUNO_HARD_CEILING = 3e4;
89
+ var PROMPT_HARD_CEILING = 3e4;
90
+ var LLM_TEXT_INPUT_MAX = 1e5;
91
+ var MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER = {
92
+ // Kling family — our `kling`→kling-2.6 (1000), `kling-turbo`→v2.5-turbo-pro (2500)
93
+ "kling": 1e3,
94
+ "kling-turbo": 2500,
95
+ "kling-master": 5e3,
96
+ // higher than the 8000 default
97
+ "seedance-2": 2e4,
98
+ "seedance-2-fast": 2e4,
99
+ "seedance-2-mini": 2e4,
100
+ "seedance-2-extend": 2e4,
101
+ // Seedance 2.5 raises the prompt ceiling to 30000
102
+ // (docs.kie.ai/market/bytedance/seedance-2-5).
103
+ "seedance-2-5": 3e4,
104
+ "gemini-omni-video": 2e4,
105
+ // Gemini Omni Flash 1.1 — same 20000-char prompt surface as the pro sibling
106
+ // (docs.kie.ai/market/google/gemini-omni-flash-1-1).
107
+ "gemini-omni-flash": 2e4,
108
+ // Wan 3.0 / 3.0 Prime — 20000 chars, excess truncated by the provider
109
+ // (docs.kie.ai/market/wan/3-0-video and /3-0-video-prime).
110
+ "wan-3": 2e4,
111
+ "wan-3-prime": 2e4,
112
+ "bytedance-lite": 1e4,
113
+ "bytedance-pro": 1e4,
114
+ "bytedance-pro-fast": 1e4,
115
+ // MiniMax Hailuo 3 — 1-7000 chars, uniform across t2v/i2v/r2v
116
+ // (docs.kie.ai/market/minimax-h3).
117
+ "minimax-h3": 7e3,
118
+ // lower than the 8000 default
119
+ "minimax": 1500,
120
+ "hailuo-standard": 1500,
121
+ "hailuo-2.3-pro": 1500,
122
+ // t2v 1500 / i2v 5000 → smaller, safe for both modes
123
+ "hailuo-2.3": 5e3,
124
+ "seedance": 2500,
125
+ // Seedance 1.5 Pro
126
+ "wan": 5e3,
127
+ "wan-i2v": 5e3,
128
+ "wan-turbo": 5e3,
129
+ "wan-flash": 1500,
130
+ "wan-videoedit": 5e3,
131
+ "wan-2.7-i2v": 5e3,
132
+ "wan-2.7-t2v": 5e3,
133
+ "grok-i2v": 5e3,
134
+ "grok-imagine-video-1.5": 4096,
135
+ "happyhorse": 5e3,
136
+ "happyhorse-i2v": 5e3,
137
+ "happyhorse-ref2v": 5e3,
138
+ "happyhorse-edit": 5e3,
139
+ "runway-kie": 1800
140
+ // NB: `wan-2.7` / `wan-2.7-pro` are IMAGE models (see the image registry), not
141
+ // video. The motion-transfer route's prompt is capped at the motion-control
142
+ // limit (2500) inside the route itself — its provider values are the shared
143
+ // `kling` (→1000 here, safely tighter) / `kling-3.0` ids, not a "motion-*" id.
144
+ // UNVERIFIED (schema states no limit) → 8000 default: veo3, veo3.1, veo3_lite
145
+ // kling-3.0, kling-3-omni, runway-aleph.
146
+ };
147
+ function getMaxVideoPromptChars(provider) {
148
+ return provider && MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER[provider] || VIDEO_PROMPT_MAX;
149
+ }
150
+ var NEGATIVE_PROMPT_MAX = 5e3;
151
+ var MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER = {
152
+ // image
153
+ "imagen4": 5e3,
154
+ "imagen4-fast": 5e3,
155
+ "imagen4-ultra": 5e3,
156
+ "ideogram-v3": 500,
157
+ "ideogram-remix": 5e3,
158
+ "qwen": 500,
159
+ "qwen-i2i": 500,
160
+ "qwen-edit": 500,
161
+ // video (native-negative families)
162
+ "kling-master": 500,
163
+ "kling-turbo": 500,
164
+ // i2v 500 / t2v 2500 → smaller, safe for both modes
165
+ "wan-2.7-i2v": 500,
166
+ "wan-2.7-t2v": 500,
167
+ "wan-videoedit": 500
168
+ };
169
+ function getMaxNegativePromptChars(provider) {
170
+ return provider && MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER[provider] || NEGATIVE_PROMPT_MAX;
171
+ }
172
+ var TTS_TEXT_MAX = 5e3;
173
+ var MAX_TTS_CHARS_BY_PROVIDER = Object.fromEntries(
174
+ Object.values(MODEL_CATALOG).filter((m) => m.tts !== void 0).map((m) => [m.id, m.tts.maxChars])
175
+ );
176
+ function getMaxTtsChars(provider) {
177
+ const cap = provider && Object.hasOwn(MAX_TTS_CHARS_BY_PROVIDER, provider) ? MAX_TTS_CHARS_BY_PROVIDER[provider] : void 0;
178
+ return cap || TTS_TEXT_MAX;
179
+ }
180
+ var SUNO_TITLE_MAX = 80;
181
+ function getMaxSunoPromptChars(model, customMode) {
182
+ if (!customMode) return 3e3;
183
+ return model === "V4" || model === "V3_5" ? 3e3 : 5e3;
184
+ }
185
+ function getMaxSunoStyleChars(model) {
186
+ return model === "V4" || model === "V3_5" ? 200 : 1e3;
187
+ }
188
+ var NATIVE_NEGATIVE_PROMPT_MODELS = /* @__PURE__ */ new Set([
189
+ "imagen4",
190
+ "imagen4-fast",
191
+ "imagen4-ultra",
192
+ "ideogram-remix",
193
+ "ideogram-v3",
194
+ "qwen",
195
+ "qwen-edit"
196
+ ]);
197
+ var NATIVE_NEGATIVE_VIDEO_PROVIDERS = /* @__PURE__ */ new Set([
198
+ // Kling family
199
+ "kling",
200
+ "kling-turbo",
201
+ "kling-master",
202
+ "kling-3.0",
203
+ "kling-3-omni",
204
+ // Wan family (regular Wan, NOT wan-animate)
205
+ "wan",
206
+ "wan-flash",
207
+ "wan-videoedit",
208
+ "wan-i2v",
209
+ "wan-turbo",
210
+ "wan-2.7-i2v",
211
+ "wan-2.7-t2v",
212
+ // Wan speech-to-video
213
+ "wan-s2v"
214
+ ]);
215
+ var STYLE_SECTION_HEADER_LINE = "[style]:\n";
216
+ function videoNegativeSuffix(negativePrompt, base) {
217
+ const gapAt = base?.lastIndexOf("\n\n") ?? -1;
218
+ const lastBlock = base === void 0 ? void 0 : gapAt >= 0 ? base.slice(gapAt + 2) : base;
219
+ const separator = lastBlock === void 0 || lastBlock.startsWith(STYLE_SECTION_HEADER_LINE) ? "\n\n" : "\n";
220
+ return `${separator}Avoid: ${negativePrompt}`;
221
+ }
222
+ function applyVideoNegativePrompt(prompt, negativePrompt, provider) {
223
+ const promptMax = getMaxVideoPromptChars(provider);
224
+ const clamp = (p) => p != null && p.length > promptMax ? p.slice(0, promptMax) : p;
225
+ const neg = negativePrompt?.trim();
226
+ if (!neg) return { prompt: clamp(prompt), nativeNegativePrompt: void 0 };
227
+ if (NATIVE_NEGATIVE_VIDEO_PROVIDERS.has(provider)) {
228
+ return { prompt: clamp(prompt), nativeNegativePrompt: neg.slice(0, getMaxNegativePromptChars(provider)) };
229
+ }
230
+ const base = prompt && prompt.trim().length > 0 ? prompt : "";
231
+ if (!base) return { prompt: `Avoid: ${neg}`.slice(0, promptMax), nativeNegativePrompt: void 0 };
232
+ const avoid = videoNegativeSuffix(neg, base);
233
+ const room = Math.max(0, promptMax - avoid.length);
234
+ const injected = `${base.slice(0, room)}${avoid}`.slice(0, promptMax);
235
+ return { prompt: injected, nativeNegativePrompt: void 0 };
236
+ }
237
+ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
238
+ // Multi-reference text-to-image
239
+ "nano-banana",
240
+ "nano-banana-pro",
241
+ "nano-banana-2",
242
+ "nano-banana-2-lite",
243
+ "nano-banana-2-1",
244
+ // T2I providers that auto-route to their i2i sibling when refs are attached
245
+ "gpt-image",
246
+ "gpt-image-2",
247
+ "gpt-image-2-5-flare",
248
+ "gpt-image-2-5-sunburst",
249
+ "grok",
250
+ "grok-2",
251
+ "qwen",
252
+ "seedream",
253
+ "seedream-5-lite",
254
+ "seedream-5-pro",
255
+ "seedream-5-flash",
256
+ "flux",
257
+ "flux-flex",
258
+ // Image editing / image-to-image (reference = source image)
259
+ "nano-banana-edit",
260
+ "gpt-image-i2i",
261
+ "gpt-image-2-i2i",
262
+ "gpt-image-2-5-flare-i2i",
263
+ "gpt-image-2-5-sunburst-i2i",
264
+ "grok-2-i2i",
265
+ "flux-i2i",
266
+ "flux-pro-i2i",
267
+ "flux-kontext",
268
+ "flux-kontext-max",
269
+ "ideogram-edit",
270
+ "ideogram-remix",
271
+ "qwen-i2i",
272
+ "qwen-edit",
273
+ "seedream-edit",
274
+ "seedream-5-lite-i2i",
275
+ "seedream-5-pro-i2i",
276
+ "seedream-5-flash-i2i",
277
+ "grok-i2i",
278
+ // Upscale / background ops (source acts as the reference)
279
+ "recraft-remove-bg",
280
+ "recraft-upscale",
281
+ "topaz-image-upscale",
282
+ // Wan 2.7 — accepts up to 9 optional ref images via input_urls (pure T2I when omitted)
283
+ "wan-2.7",
284
+ // Replicate "Open" (uncensored) image models
285
+ "flux-2-klein",
286
+ "kontext-multi",
287
+ "flux-2-pro",
288
+ "flux-2-max"
289
+ ]);
290
+ var T2I_TO_I2I_VARIANT = {
291
+ "gpt-image": "gpt-image-i2i",
292
+ "gpt-image-2": "gpt-image-2-i2i",
293
+ "gpt-image-2-5-flare": "gpt-image-2-5-flare-i2i",
294
+ "gpt-image-2-5-sunburst": "gpt-image-2-5-sunburst-i2i",
295
+ "grok": "grok-i2i",
296
+ // grok-2's t2i takes NO image input; its "i2i" is the segment-map(image_url)
297
+ // → image-edit(task_id) chain in the KIE provider (single reference).
298
+ "grok-2": "grok-2-i2i",
299
+ "qwen": "qwen-i2i",
300
+ "seedream": "seedream-edit",
301
+ "seedream-5-lite": "seedream-5-lite-i2i",
302
+ "seedream-5-pro": "seedream-5-pro-i2i",
303
+ "seedream-5-flash": "seedream-5-flash-i2i",
304
+ "flux": "flux-pro-i2i",
305
+ "flux-flex": "flux-i2i"
306
+ };
307
+ var REF_IMAGE_MAX_LIMITS = {
308
+ // Multi-reference T2I (Nano Banana family is the only T2I family that
309
+ // actually accepts ref URLs via the KIE wrapper's `image_input` param).
310
+ "nano-banana": 8,
311
+ "nano-banana-pro": 8,
312
+ "nano-banana-2": 4,
313
+ "nano-banana-2-lite": 10,
314
+ "nano-banana-2-1": 10,
315
+ "wan-2.7": 9,
316
+ // grok-2 reference chain consumes exactly one image (segment-map input).
317
+ "grok-2-i2i": 1,
318
+ // Image-to-image (multi-source array)
319
+ "nano-banana-edit": 8,
320
+ "gpt-image-i2i": 16,
321
+ "gpt-image-2-i2i": 16,
322
+ "gpt-image-2-5-flare-i2i": 16,
323
+ "gpt-image-2-5-sunburst-i2i": 16,
324
+ "flux-i2i": 4,
325
+ "flux-pro-i2i": 4,
326
+ "seedream-edit": 16,
327
+ "seedream-5-lite-i2i": 16,
328
+ "seedream-5-pro-i2i": 16,
329
+ // Flash takes at most 10 `image_urls` (docs.kie.ai/market/seedream/5-flash-image-to-image) — not the family's 16.
330
+ "seedream-5-flash-i2i": 10,
331
+ // Single-source i2i (one input image)
332
+ "flux-kontext": 1,
333
+ "flux-kontext-max": 1,
334
+ "ideogram-edit": 1,
335
+ "ideogram-remix": 1,
336
+ "qwen-i2i": 1,
337
+ "qwen-edit": 1,
338
+ "grok-i2i": 1,
339
+ "recraft-remove-bg": 1,
340
+ "recraft-upscale": 1,
341
+ "topaz-image-upscale": 1,
342
+ // Replicate Open models — Klein takes an optional single ref; Kontext Multi
343
+ // (multi-image-kontext-pro) is a two-image combiner (input_image_1/2 only);
344
+ // Flux 2 Pro up to 4; Max up to 8.
345
+ "flux-2-klein": 1,
346
+ "kontext-multi": 2,
347
+ "flux-2-pro": 4,
348
+ "flux-2-max": 8
349
+ };
350
+ var DEFAULT_REF_IMAGE_MAX = 4;
351
+ function imageReferenceLimit(provider) {
352
+ if (!provider || !MODELS_WITH_REFERENCE_IMAGE_SUPPORT.has(provider)) return 0;
353
+ const effective = T2I_TO_I2I_VARIANT[provider] ?? provider;
354
+ return REF_IMAGE_MAX_LIMITS[effective] ?? DEFAULT_REF_IMAGE_MAX;
355
+ }
356
+ var VARIABLE_PRICING_MODELS = {
357
+ "gpt-image": "quality",
358
+ "gpt-image-i2i": "quality",
359
+ "gpt-image-2": "resolution",
360
+ "gpt-image-2-i2i": "resolution",
361
+ "gpt-image-2-5-flare": "resolution",
362
+ "gpt-image-2-5-flare-i2i": "resolution",
363
+ "gpt-image-2-5-sunburst": "resolution",
364
+ "gpt-image-2-5-sunburst-i2i": "resolution",
365
+ "nano-banana-pro": "resolution",
366
+ "nano-banana-2": "resolution",
367
+ "nano-banana-2-1": "resolution",
368
+ "flux": "resolution",
369
+ "flux-flex": "resolution",
370
+ "flux-i2i": "resolution",
371
+ "flux-pro-i2i": "resolution",
372
+ "seedream": "quality",
373
+ "seedream-edit": "quality",
374
+ "seedream-5-lite": "quality",
375
+ "seedream-5-lite-i2i": "quality",
376
+ "seedream-5-pro": "quality",
377
+ "seedream-5-pro-i2i": "quality",
378
+ "topaz-image-upscale": "resolution",
379
+ "ideogram-edit": "rendering-speed",
380
+ "ideogram-remix": "rendering-speed",
381
+ "ideogram-v3": "rendering-speed",
382
+ "wan-2.7": "resolution",
383
+ "wan-2.7-pro": "resolution"
384
+ };
385
+ var HIGH_QUALITY_PROVIDERS = /* @__PURE__ */ new Set(["gpt-image", "gpt-image-i2i", "seedream", "seedream-edit", "seedream-5-lite", "seedream-5-lite-i2i", "seedream-5-pro", "seedream-5-pro-i2i"]);
386
+ var TWO_K_RESOLUTION_PROVIDERS = /* @__PURE__ */ new Set(["flux", "flux-pro-i2i", "flux-flex", "flux-i2i"]);
387
+ var RESOLUTION_2K_4K_TIERED_PROVIDERS = /* @__PURE__ */ new Set([
388
+ "nano-banana-2",
389
+ "nano-banana-2-1",
390
+ "gpt-image-2",
391
+ "gpt-image-2-i2i",
392
+ "gpt-image-2-5-flare",
393
+ "gpt-image-2-5-flare-i2i",
394
+ "gpt-image-2-5-sunburst",
395
+ "gpt-image-2-5-sunburst-i2i",
396
+ "wan-2.7",
397
+ "wan-2.7-pro"
398
+ ]);
399
+ var IDEOGRAM_PROVIDERS = /* @__PURE__ */ new Set(["ideogram-edit", "ideogram-remix", "ideogram-v3"]);
400
+ var IMAGE_GEN_PROVIDERS = [
401
+ "nano-banana",
402
+ "flux",
403
+ "nano-banana-pro",
404
+ "nano-banana-2",
405
+ "nano-banana-2-lite",
406
+ "nano-banana-2-1",
407
+ "grok",
408
+ "grok-2",
409
+ "gpt-image",
410
+ "gpt-image-2",
411
+ "gpt-image-2-5-flare",
412
+ "gpt-image-2-5-sunburst",
413
+ "imagen4",
414
+ "imagen4-fast",
415
+ "imagen4-ultra",
416
+ "ideogram-v3",
417
+ "qwen",
418
+ "seedream",
419
+ "seedream-5-lite",
420
+ "seedream-5-pro",
421
+ "seedream-5-flash",
422
+ "flux-flex",
423
+ "flux-kontext",
424
+ "flux-kontext-max",
425
+ "z-image",
426
+ "wan-2.7",
427
+ "wan-2.7-pro",
428
+ // Replicate Open (uncensored) — runs through Replicate, not KIE
429
+ "flux-2-klein",
430
+ "flux-2-pro",
431
+ "flux-2-max"
432
+ ];
433
+ var IMAGE_I2I_PROVIDERS = [
434
+ "nano-banana",
435
+ "nano-banana-2",
436
+ "nano-banana-2-lite",
437
+ "nano-banana-2-1",
438
+ "nano-banana-pro",
439
+ "grok-i2i",
440
+ "flux-i2i",
441
+ "flux-pro-i2i",
442
+ "gpt-image-i2i",
443
+ "gpt-image-2-i2i",
444
+ "gpt-image-2-5-flare-i2i",
445
+ "gpt-image-2-5-sunburst-i2i",
446
+ "grok-2-i2i",
447
+ "ideogram-edit",
448
+ "ideogram-remix",
449
+ "qwen-i2i",
450
+ "qwen-edit",
451
+ "seedream-edit",
452
+ "seedream-5-lite-i2i",
453
+ "seedream-5-pro-i2i",
454
+ "seedream-5-flash-i2i",
455
+ "flux-kontext",
456
+ "flux-kontext-max",
457
+ // Replicate Open (uncensored) — multi-image Kontext via Replicate
458
+ "kontext-multi",
459
+ // BFL Flux 2 Pro — runs through Replicate with safety_tolerance=5 (max for Pro)
460
+ "flux-2-pro",
461
+ // BFL FLUX Fill Pro — dedicated masked inpainting via Replicate (white = edit area)
462
+ "flux-fill",
463
+ // BFL Flux 2 Max — runs through Replicate with safety_tolerance=5, up to 8 refs
464
+ "flux-2-max",
465
+ // BFL FLUX Fill Pro — dedicated inpainting via Replicate (image + mask + prompt,
466
+ // white = edit area). Second mask-capable i2i provider alongside ideogram-edit.
467
+ "flux-fill"
468
+ ];
469
+ var IMAGE_EDIT_PROVIDERS = [
470
+ "recraft-upscale",
471
+ "recraft-remove-bg",
472
+ "nano-banana-edit",
473
+ "topaz-image-upscale",
474
+ // grok-upscale takes a prior Grok generation's task_id (NOT an image URL) —
475
+ // see edit-image route for the taskId-vs-imageUrl branching.
476
+ "grok-upscale",
477
+ // Grok Imagine 2 task-chained ops — same task_id contract as grok-upscale.
478
+ // grok-2-edit: prompt edit of a prior grok-2 generation, optionally region-
479
+ // targeted via mask indexes from grok-2-segment. grok-2-segment: FREE named
480
+ // segment-mask map of a prior grok-2 generation.
481
+ "grok-2-edit",
482
+ "grok-2-segment"
483
+ ];
484
+ var TASK_CHAINED_EDIT_PROVIDERS = /* @__PURE__ */ new Set([
485
+ "grok-upscale",
486
+ "grok-2-edit",
487
+ "grok-2-segment"
488
+ ]);
489
+ var MODIFY_IMAGE_PROVIDERS = [
490
+ ...IMAGE_I2I_PROVIDERS,
491
+ "nano-banana-edit"
492
+ ];
493
+ var UPSCALE_IMAGE_PROVIDERS = [
494
+ "recraft-upscale",
495
+ "topaz-image-upscale"
496
+ ];
497
+ var IMAGE_TO_VIDEO_PROVIDERS = [
498
+ "minimax",
499
+ "veo3",
500
+ "veo3.1",
501
+ "veo3_lite",
502
+ "kling",
503
+ "kling-turbo",
504
+ "kling-3.0",
505
+ "kling-master",
506
+ "seedance",
507
+ "seedance-2",
508
+ "seedance-2-fast",
509
+ "seedance-2-mini",
510
+ "seedance-2-5",
511
+ "minimax-h3",
512
+ "hailuo-2.3-pro",
513
+ "hailuo-2.3",
514
+ "hailuo-standard",
515
+ "wan-i2v",
516
+ "wan-turbo",
517
+ "bytedance-lite",
518
+ "bytedance-pro",
519
+ "bytedance-pro-fast",
520
+ "grok-i2v",
521
+ "wan-2.7-i2v",
522
+ "happyhorse-i2v",
523
+ "happyhorse-ref2v",
524
+ "runway-kie",
525
+ "kling-3-omni",
526
+ "gemini-omni-video",
527
+ "gemini-omni-flash",
528
+ // Wan 3.0 family — one id per SKU serves BOTH modes (no t2v twin, no alias),
529
+ // so each id is listed in this array AND in TEXT_TO_VIDEO_PROVIDERS.
530
+ "wan-3",
531
+ "wan-3-prime",
532
+ "ltx-2.3-pro",
533
+ "ltx-2.3-fast",
534
+ // xAI Grok Imagine Video 1.5 — KIE i2v (image_urls required). Also listed in
535
+ // TEXT_TO_VIDEO_PROVIDERS so it's offered everywhere in the unified node; the
536
+ // t2v route guards no-image runs via VIDEO_PROVIDERS_REQUIRING_IMAGE.
537
+ "grok-imagine-video-1.5"
538
+ // Replicate disabled
539
+ // "runway",
540
+ // "pika",
541
+ // "sora",
542
+ ];
543
+ var TEXT_TO_VIDEO_PROVIDERS = [
544
+ "minimax",
545
+ "veo3",
546
+ "veo3.1",
547
+ "veo3_lite",
548
+ "kling",
549
+ "kling-turbo",
550
+ "kling-3.0",
551
+ "grok",
552
+ "seedance",
553
+ "seedance-2",
554
+ "seedance-2-fast",
555
+ "seedance-2-mini",
556
+ "seedance-2-5",
557
+ "minimax-h3",
558
+ "wan",
559
+ "hailuo-standard",
560
+ "bytedance-lite",
561
+ "bytedance-pro",
562
+ "wan-turbo",
563
+ "wan-2.7-t2v",
564
+ "happyhorse",
565
+ "runway-kie",
566
+ "gemini-omni-video",
567
+ "gemini-omni-flash",
568
+ // Wan 3.0 family — REAL t2v (prompt-only runs are the documented default
569
+ // mode), so they belong in this main section and must NOT be gated by
570
+ // VIDEO_PROVIDERS_REQUIRING_IMAGE.
571
+ "wan-3",
572
+ "wan-3-prime",
573
+ "ltx-2.3-pro",
574
+ "ltx-2.3-fast",
575
+ // ── i2v-only providers (image required) ──────────────────────────────────
576
+ // These have NO text-to-video mode, but the unified Generate Video node can
577
+ // dispatch ANY of its providers down the t2v path when no image is wired.
578
+ // They must pass this enum so /v1/text-to-video can return the clean
579
+ // "requires an input image" 400 (VIDEO_PROVIDERS_REQUIRING_IMAGE — derived
580
+ // from MODEL_CATALOG modes) instead of an opaque Zod validation error.
581
+ // They never reach a provider. Guarded by the dispatch-totality test in
582
+ // __tests__/video-mode-aliases.test.ts.
583
+ "grok-imagine-video-1.5",
584
+ "kling-3-omni",
585
+ "kling-master",
586
+ "hailuo-2.3",
587
+ "hailuo-2.3-pro",
588
+ "bytedance-pro-fast",
589
+ "happyhorse-ref2v"
590
+ // Replicate disabled
591
+ // "runway",
592
+ // "pika",
593
+ // "sora",
594
+ ];
595
+ var VIDEO_GEN_PROVIDERS = [
596
+ ...IMAGE_TO_VIDEO_PROVIDERS,
597
+ ...TEXT_TO_VIDEO_PROVIDERS.filter(
598
+ (p) => !IMAGE_TO_VIDEO_PROVIDERS.includes(p)
599
+ )
600
+ ];
601
+ var VIDEO_MODE_ALIASES = [
602
+ { base: "grok-i2v", i2v: "grok-i2v", t2v: "grok" },
603
+ { base: "wan-i2v", i2v: "wan-i2v", t2v: "wan" },
604
+ { base: "wan-2.7-i2v", i2v: "wan-2.7-i2v", t2v: "wan-2.7-t2v" },
605
+ // HappyHorse: happyhorse/image-to-video + happyhorse/text-to-video are mode
606
+ // twins of one KIE model family — previously TWO unified-picker rows, and the
607
+ // i2v row crashed the t2v route when run without an image.
608
+ { base: "happyhorse-i2v", i2v: "happyhorse-i2v", t2v: "happyhorse" }
609
+ ];
610
+ function resolveVideoProviderForMode(provider, mode) {
611
+ for (const g of VIDEO_MODE_ALIASES) {
612
+ if (provider === g.base || provider === g.i2v || provider === g.t2v) {
613
+ return mode === "image-to-video" ? g.i2v : g.t2v;
614
+ }
615
+ }
616
+ return provider;
617
+ }
618
+ function resolveVideoModeForInputs(provider, inputs) {
619
+ if (inputs.hasStartFrame) return "image-to-video";
620
+ if (!provider || !inputs.hasImageRefs) return "text-to-video";
621
+ const i2v = resolveVideoProviderForMode(provider, "image-to-video");
622
+ const t2v = resolveVideoProviderForMode(provider, "text-to-video");
623
+ if (i2v === t2v) return "text-to-video";
624
+ const carriesImageRefs = (id) => (VIDEO_REF_LIMITS_BY_PROVIDER[id]?.images ?? 0) > 0;
625
+ return carriesImageRefs(i2v) && !carriesImageRefs(t2v) ? "image-to-video" : "text-to-video";
626
+ }
627
+ var VIDEO_GEN_COLLAPSED_T2V_IDS = new Set(
628
+ VIDEO_MODE_ALIASES.filter((g) => g.t2v !== g.base).map((g) => g.t2v)
629
+ );
630
+ var VIDEO_TO_VIDEO_PROVIDERS = [
631
+ "wan",
632
+ "wan-flash",
633
+ "wan-videoedit",
634
+ "luma-modify",
635
+ "runway-aleph",
636
+ "happyhorse-edit"
637
+ ];
638
+ var SEEDANCE_VIDEO_EDIT_PROVIDERS = ["seedance-2-5"];
639
+ function isSeedanceVideoEditProvider(provider) {
640
+ return !!provider && SEEDANCE_VIDEO_EDIT_PROVIDERS.includes(provider);
641
+ }
642
+ var VIDEO_TO_VIDEO_NODE_PROVIDERS = [...VIDEO_TO_VIDEO_PROVIDERS, ...SEEDANCE_VIDEO_EDIT_PROVIDERS];
643
+ var SEEDANCE_VIDEO_EDIT_SHAPE = { aspectRatio: "adaptive", duration: VIDEO_DURATION_AUTO };
644
+ var FACE_SWAP_PROVIDERS = [
645
+ "roop"
646
+ ];
647
+ var VIDEO_UPSCALE_PROVIDERS = [
648
+ "topaz",
649
+ "veo-1080p",
650
+ "veo-4k",
651
+ // Seedance 2.5 Draft finalize: re-renders a Seedance 2.5 DRAFT (by its task
652
+ // id) as the same take at 1080p. See seedance-draft.ts.
653
+ "seedance-2-5-hd"
654
+ ];
655
+ var EXTEND_VIDEO_PROVIDERS = [
656
+ "veo-extend",
657
+ "runway-extend",
658
+ "ltx-2.3-pro",
659
+ "seedance-2-extend"
660
+ ];
661
+ var LIP_SYNC_PROVIDERS = [
662
+ "kling-avatar",
663
+ "kling-avatar-pro",
664
+ "infinitalk",
665
+ // ByteDance OmniHuman 1.5 — KIE image+audio avatar, prompt-directed
666
+ // performance, per-second billed, 60s audio cap. Routes the default KIE
667
+ // path (not in any replicate/fal/seedance/video-input set).
668
+ "omnihuman-1-5",
669
+ "latentsync",
670
+ "wav2lip",
671
+ "video-retalking",
672
+ "sadtalker",
673
+ // HeyGen Lipsync Precision + Sync Lipsync 2 Pro — Replicate-hosted, video-input
674
+ // dubbing models billed per second of output. Routed through replicateLipSync;
675
+ // priced per-second via buildLipSyncCreditId (see lip-sync-pricing.ts).
676
+ "heygen-lipsync-precision",
677
+ "lipsync-2-pro",
678
+ // Sync Lipsync v3 — fal.ai-hosted, video-input dubbing model billed per
679
+ // second of output (/min). Routed through falLipSync (the worker's fal
680
+ // branch); priced per-second via buildLipSyncCreditId (see lip-sync-pricing.ts).
681
+ "sync-lipsync-v3",
682
+ // Volcengine video-to-video lip sync — KIE-hosted, VIDEO-input AI dubbing
683
+ // (mode lite/basic; multi-speaker scene-detection + speaker ID in basic).
684
+ // Billed per-second via buildLipSyncCreditId; routed through the KIE
685
+ // `lipSyncVideo` path (KieModelConfig.inputKind === "video"), NOT the
686
+ // image+prompt `lipSync` path.
687
+ "volcengine-lipsync",
688
+ // Seedance 2 / 2 Fast — not "lip-sync models" per se, but ByteDance's
689
+ // multimodal video models do native phoneme-level lip sync in 8+
690
+ // languages when fed `reference_audio_urls` alongside a `first_frame_url`.
691
+ // Routed through the i2v provider with the audio passed as a reference,
692
+ // not the dedicated lip-sync flow.
693
+ "seedance-2",
694
+ "seedance-2-fast",
695
+ "seedance-2-mini",
696
+ "seedance-2-5",
697
+ // MiniMax Hailuo 3 — same multimodal audio-driven mechanism (r2v
698
+ // reference_audio_urls paired with an image ref); rides the same
699
+ // reference-audio lip-sync surface as the Seedance 2 family.
700
+ "minimax-h3"
701
+ ];
702
+ var SEEDANCE_LIP_SYNC_PROVIDERS = /* @__PURE__ */ new Set([
703
+ "seedance-2",
704
+ "seedance-2-fast",
705
+ "seedance-2-mini",
706
+ "seedance-2-5",
707
+ "minimax-h3"
708
+ ]);
709
+ var REPLICATE_LIP_SYNC_PROVIDERS = /* @__PURE__ */ new Set([
710
+ "latentsync",
711
+ "wav2lip",
712
+ "video-retalking",
713
+ "sadtalker",
714
+ "heygen-lipsync-precision",
715
+ "lipsync-2-pro"
716
+ ]);
717
+ var FAL_LIP_SYNC_PROVIDERS = /* @__PURE__ */ new Set([
718
+ "sync-lipsync-v3"
719
+ ]);
720
+ var VIDEO_INPUT_LIP_SYNC_PROVIDERS = /* @__PURE__ */ new Set([
721
+ "latentsync",
722
+ "video-retalking",
723
+ "heygen-lipsync-precision",
724
+ "lipsync-2-pro",
725
+ "sync-lipsync-v3",
726
+ "volcengine-lipsync"
727
+ ]);
728
+ var FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS = /* @__PURE__ */ new Set([
729
+ "wav2lip"
730
+ ]);
731
+ var ASPECT_RATIO_DIMENSIONS = {
732
+ "16:9": { width: 1920, height: 1080 },
733
+ "9:16": { width: 1080, height: 1920 },
734
+ "1:1": { width: 1080, height: 1080 },
735
+ "4:5": { width: 1080, height: 1350 },
736
+ // Ultra-wide. 1680x720 rather than a 1920-wide pair because the Scene3D v2
737
+ // admission bounds require even integers on both axes and 1920/(21/9) is
738
+ // odd; 1680x720 is the pair the scene contract names as supported. Additive:
739
+ // every consumer here is a keyed lookup with a fallback, and a node only
740
+ // reaches this entry if its own aspect enum offers 21:9 (today, Pro 3D).
741
+ "21:9": { width: 1680, height: 720 }
742
+ };
743
+ var MOTION_TRANSFER_PROVIDERS = [
744
+ "kling",
745
+ "kling-3.0",
746
+ "wan-animate-move",
747
+ "wan-animate-replace"
748
+ ];
749
+ var TTS_PROVIDERS = [
750
+ "elevenlabs-v3",
751
+ "elevenlabs-v4",
752
+ "elevenlabs-v4-turbo",
753
+ "elevenlabs-turbo",
754
+ "elevenlabs-multilingual",
755
+ "elevenlabs"
756
+ ];
757
+ var DIALOGUE_PROVIDERS = ["elevenlabs-dialogue", "elevenlabs-dialogue-v4"];
758
+ var DEFAULT_DIALOGUE_PROVIDER = "elevenlabs-dialogue";
759
+ var DEFAULT_TTS_PROVIDER = "elevenlabs-v4";
760
+ var TEXT_TO_AUDIO_PROVIDERS = [
761
+ // Replicate disabled
762
+ // "tangoflux",
763
+ "elevenlabs-sfx"
764
+ ];
765
+ var DEFAULT_TEXT_TO_AUDIO_PROVIDER = "elevenlabs-sfx";
766
+ var MUSIC_PROVIDERS = [
767
+ // Replicate disabled
768
+ // "musicgen",
769
+ "minimax"
770
+ // TODO: surface Suno V5 here for discoverability — needs backend wiring
771
+ // through suno-client.ts (Suno uses /api/v1/generate, NOT the standard
772
+ // /api/v1/jobs/createTask path runKieTask uses). Tracked as a separate
773
+ // follow-up PR. Until then, Suno is reachable via the standalone
774
+ // `suno-generate` node.
775
+ // Replicate disabled
776
+ // "lyria",
777
+ // "bark",
778
+ ];
779
+ var DEFAULT_MUSIC_PROVIDER = "minimax";
780
+ var MUSIC_PROVIDER_LABELS = {
781
+ minimax: "MiniMax Music"
782
+ };
783
+ var MUSIC_CREDIT_ID = "generate-music";
784
+ function resolveMusicProvider(value) {
785
+ return MUSIC_PROVIDERS.includes(value) ? value : DEFAULT_MUSIC_PROVIDER;
786
+ }
787
+ var TRANSCRIBE_PROVIDERS = [
788
+ "elevenlabs-stt",
789
+ "whisper",
790
+ "incredibly-fast-whisper"
791
+ ];
792
+ var TRANSCRIBE_LANES = [
793
+ "whisper",
794
+ "incredibly-fast-whisper",
795
+ "elevenlabs-stt"
796
+ ];
797
+ var TRANSCRIBE_PROVIDER_CAPABILITIES = {
798
+ "whisper": { wordTimestamps: false },
799
+ "incredibly-fast-whisper": { wordTimestamps: true },
800
+ "elevenlabs-stt": { wordTimestamps: true }
801
+ };
802
+ function transcribeProvidersWithWordTimestamps() {
803
+ return TRANSCRIBE_LANES.filter((p) => TRANSCRIBE_PROVIDER_CAPABILITIES[p].wordTimestamps);
804
+ }
805
+ function transcribeLaneSupportsWordTimestamps(lane) {
806
+ if (!lane) return false;
807
+ return TRANSCRIBE_PROVIDER_CAPABILITIES[lane]?.wordTimestamps === true;
808
+ }
809
+ var DEFAULT_TRANSCRIBE_PROVIDER = "whisper";
810
+ var DEFAULT_TRANSCRIBE_NODE_PROVIDER = "elevenlabs-stt";
811
+ var SCRIPT_PROVIDERS = [
812
+ "gemini",
813
+ "claude",
814
+ "gpt"
815
+ ];
816
+ var AI_WRITER_PROVIDERS = [
817
+ "claude"
818
+ ];
819
+ var QA_CHECK_PROVIDERS = [
820
+ "claude",
821
+ "gpt"
822
+ ];
823
+ var SUNO_ACTIVE_MODELS = ["V6", "V6_WILD", "V6_MINI"];
824
+ var SUNO_LEGACY_MODELS = [
825
+ "V5_5",
826
+ "V5",
827
+ "V4_5PLUS",
828
+ "V4_5ALL",
829
+ "V4_5",
830
+ "V4"
831
+ ];
832
+ var SUNO_MODELS = [...SUNO_ACTIVE_MODELS, ...SUNO_LEGACY_MODELS];
833
+ var DEFAULT_SUNO_MODEL = "V6";
834
+ function isLegacySunoModel(model) {
835
+ return SUNO_LEGACY_MODELS.includes(model ?? "");
836
+ }
837
+ var SUNO_DURATION_MODELS = new Set(SUNO_ACTIVE_MODELS);
838
+ function sunoModelHonoursDuration(model) {
839
+ return SUNO_DURATION_MODELS.has(model ?? "");
840
+ }
841
+ var SUNO_ADD_TRACK_MODELS = [...SUNO_ACTIVE_MODELS, "V4_5PLUS", "V5", "V5_5"];
842
+ var VOICE_DESIGN_MODELS = [
843
+ "eleven_ttv_v3",
844
+ "eleven_multilingual_ttv_v2"
845
+ ];
846
+ var DEFAULT_VOICE_DESIGN_MODEL = "eleven_ttv_v3";
847
+ var I2I_MASK_SUPPORT = /* @__PURE__ */ new Set(["ideogram-edit", "flux-fill"]);
848
+ var IMAGE_MASK_MODE = {
849
+ "nano-banana": "prompt",
850
+ "nano-banana-pro": "prompt",
851
+ "nano-banana-2": "prompt",
852
+ "nano-banana-2-lite": "prompt",
853
+ "nano-banana-2-1": "prompt",
854
+ "gpt-image": "prompt",
855
+ "gpt-image-2": "prompt",
856
+ "gpt-image-2-5-flare": "prompt",
857
+ "gpt-image-2-5-sunburst": "prompt",
858
+ "seedream": "prompt",
859
+ "seedream-5-lite": "prompt",
860
+ "seedream-5-pro": "prompt",
861
+ "seedream-5-flash": "prompt",
862
+ "qwen": "prompt",
863
+ "flux-kontext": "prompt",
864
+ "flux-kontext-max": "prompt",
865
+ "flux": "composite",
866
+ "flux-flex": "composite",
867
+ "grok": "composite",
868
+ "grok-2": "composite",
869
+ "imagen4": "composite",
870
+ "imagen4-fast": "composite",
871
+ "imagen4-ultra": "composite",
872
+ "ideogram-v3": "composite",
873
+ "z-image": "composite",
874
+ "wan-2.7": "composite",
875
+ "wan-2.7-pro": "composite",
876
+ "flux-2-klein": "composite",
877
+ "flux-2-pro": "composite",
878
+ "flux-2-max": "composite"
879
+ };
880
+ var I2I_STRENGTH_SUPPORT = {
881
+ "ideogram-remix": { min: 0.01, max: 1, step: 0.01, default: 0.8 },
882
+ "qwen-i2i": { min: 0, max: 1, step: 0.01, default: 0.8 }
883
+ };
884
+ var SEED_SUPPORT = /* @__PURE__ */ new Set([
885
+ "ideogram-remix",
886
+ "ideogram-v3",
887
+ "qwen",
888
+ "qwen-i2i",
889
+ "qwen-edit",
890
+ "flux",
891
+ "flux-flex",
892
+ "flux-i2i",
893
+ "flux-pro-i2i",
894
+ "flux-kontext",
895
+ "flux-kontext-max",
896
+ "flux-2-klein",
897
+ "kontext-multi"
898
+ ]);
899
+ var RENDERING_SPEED_SUPPORT = /* @__PURE__ */ new Set([
900
+ "ideogram-remix",
901
+ "ideogram-v3"
902
+ ]);
903
+ var GUIDANCE_SCALE_SUPPORT = {
904
+ "qwen-i2i": { min: 1, max: 20, step: 0.5, default: 7 },
905
+ "qwen-edit": { min: 1, max: 20, step: 0.5, default: 7 }
906
+ };
907
+ var DURATION_PRICED_PROVIDERS = /* @__PURE__ */ new Set([
908
+ "seedance-2-extend",
909
+ "kling-3.0",
910
+ "kling-3-omni",
911
+ "kling",
912
+ "kling-turbo",
913
+ "kling-master",
914
+ "grok-i2v",
915
+ "wan-i2v",
916
+ "hailuo-2.3-pro",
917
+ "hailuo-2.3",
918
+ "hailuo-standard",
919
+ "seedance",
920
+ "seedance-2",
921
+ "seedance-2-fast",
922
+ "seedance-2-mini",
923
+ "seedance-2-5",
924
+ "minimax-h3",
925
+ "grok-imagine-video-1.5",
926
+ "happyhorse",
927
+ "happyhorse-i2v",
928
+ "happyhorse-ref2v",
929
+ // Wan 3.0 family — per-second billing at three resolution rates. NOTE:
930
+ // gemini-omni-flash is deliberately ABSENT (like gemini-omni-video): the
931
+ // Gemini Omni branch in buildVideoCreditModelIdentifier early-returns before
932
+ // this gate is consulted.
933
+ "wan-3",
934
+ "wan-3-prime"
935
+ ]);
936
+ var SEEDANCE_2_PROVIDERS = /* @__PURE__ */ new Set([
937
+ "seedance-2",
938
+ "seedance-2-fast",
939
+ "seedance-2-mini",
940
+ // Seedance 2.5 — a later generation, but it shares the whole 2.0 capability
941
+ // surface this set gates (frames + image/video/audio refs, adaptive aspect,
942
+ // per-second resolution × video-ref pricing), so it belongs here. Where it
943
+ // DIFFERS (30s ceiling, no 1080p/4K, wider ref caps) the difference is
944
+ // carried by the per-provider maps, never by branching on this set.
945
+ "seedance-2-5"
946
+ ]);
947
+ function isSeedance2Provider(provider) {
948
+ return !!provider && SEEDANCE_2_PROVIDERS.has(provider);
949
+ }
950
+ var MINIMAX_H3_PROVIDERS = /* @__PURE__ */ new Set([
951
+ "minimax-h3"
952
+ ]);
953
+ function isMinimaxH3Provider(provider) {
954
+ return !!provider && MINIMAX_H3_PROVIDERS.has(provider);
955
+ }
956
+ var MINIMAX_H3_DEFAULT_RESOLUTION = "2K";
957
+ function normalizeMinimaxH3Resolution(resolution) {
958
+ return resolution?.trim().toLowerCase() === "768p" ? "768P" : MINIMAX_H3_DEFAULT_RESOLUTION;
959
+ }
960
+ var WAN_3_PROVIDERS = /* @__PURE__ */ new Set([
961
+ "wan-3",
962
+ "wan-3-prime"
963
+ ]);
964
+ function isWan3Provider(provider) {
965
+ return !!provider && WAN_3_PROVIDERS.has(provider);
966
+ }
967
+ var WAN_3_DEFAULT_RESOLUTION = "720P";
968
+ function normalizeWan3Resolution(resolution) {
969
+ switch (resolution?.trim().toLowerCase()) {
970
+ case "480p":
971
+ return "480P";
972
+ case "1080p":
973
+ return "1080P";
974
+ case "720p":
975
+ return "720P";
976
+ default:
977
+ return WAN_3_DEFAULT_RESOLUTION;
978
+ }
979
+ }
980
+ var GEMINI_OMNI_PROVIDERS = /* @__PURE__ */ new Set([
981
+ "gemini-omni-video",
982
+ "gemini-omni-flash"
983
+ ]);
984
+ function isGeminiOmniProvider(provider) {
985
+ return !!provider && GEMINI_OMNI_PROVIDERS.has(provider);
986
+ }
987
+ var VIDEO_PROVIDERS_WITHOUT_DISPATCH = /* @__PURE__ */ new Set([
988
+ "kling-3-omni"
989
+ ]);
990
+ var GVP_DEFAULT_PROVIDER = "seedance-2";
991
+ function deriveGvpSupportedProviders() {
992
+ const dispatchable = new Set(VIDEO_GEN_PROVIDERS);
993
+ const eligible = Object.values(MODEL_CATALOG).filter(
994
+ (m) => m.kind === "video" && m.modes.includes("i2v") && m.features?.includes("reference-image") === true && (m.durations?.length ?? 0) > 0 && // Must also be dispatchable by the unified video node — the pro route
995
+ // hands the provider id straight to the app's imageToVideo.
996
+ dispatchable.has(m.id) && // ...and must actually REACH a provider. Capability alone is not
997
+ // enough: kling-3-omni passes every check above and still fails at the
998
+ // router (see VIDEO_PROVIDERS_WITHOUT_DISPATCH).
999
+ !VIDEO_PROVIDERS_WITHOUT_DISPATCH.has(m.id)
1000
+ ).map((m) => m.id);
1001
+ const seriesOf = (id) => MODEL_CATALOG[id]?.series ?? MODEL_CATALOG[id]?.family ?? id;
1002
+ const defaultSeries = seriesOf(GVP_DEFAULT_PROVIDER);
1003
+ const order = [];
1004
+ for (const id of eligible) {
1005
+ const s = seriesOf(id);
1006
+ if (!order.includes(s)) order.push(s);
1007
+ }
1008
+ const rank = (id) => {
1009
+ const s = seriesOf(id);
1010
+ return s === defaultSeries ? -1 : order.indexOf(s);
1011
+ };
1012
+ return [...eligible].sort((a, b) => {
1013
+ const d = rank(a) - rank(b);
1014
+ if (d !== 0) return d;
1015
+ if (a === GVP_DEFAULT_PROVIDER) return -1;
1016
+ if (b === GVP_DEFAULT_PROVIDER) return 1;
1017
+ return eligible.indexOf(a) - eligible.indexOf(b);
1018
+ });
1019
+ }
1020
+ var GVP_SUPPORTED_PROVIDERS = deriveGvpSupportedProviders();
1021
+ function isGvpSupportedProvider(provider) {
1022
+ return !!provider && GVP_SUPPORTED_PROVIDERS.includes(provider);
1023
+ }
1024
+ var GVP_EXTEND_PROVIDERS = GVP_SUPPORTED_PROVIDERS.filter(
1025
+ (id) => MODEL_CATALOG[id]?.features?.includes("video-reference") === true
1026
+ );
1027
+ function supportsExtendRender(provider) {
1028
+ return !!provider && GVP_EXTEND_PROVIDERS.includes(provider);
1029
+ }
1030
+ var GVP_END_FRAME_PROVIDERS = GVP_SUPPORTED_PROVIDERS.filter(
1031
+ (id) => MODEL_CATALOG[id]?.features?.includes("end-frame") === true
1032
+ );
1033
+ function supportsEndAnchor(provider) {
1034
+ return !!provider && GVP_END_FRAME_PROVIDERS.includes(provider);
1035
+ }
1036
+ var GVP_ANCHOR_CHOICES = ["auto", "start-end", "start-only", "reference"];
1037
+ function resolveGvpAnchorWire(choice) {
1038
+ switch (choice) {
1039
+ case "start-end":
1040
+ return "upfront";
1041
+ case "start-only":
1042
+ return "progressive";
1043
+ case "reference":
1044
+ return "none";
1045
+ default:
1046
+ return void 0;
1047
+ }
1048
+ }
1049
+ function segmentDurationsFor(provider) {
1050
+ if (!provider) return [];
1051
+ return [...MODEL_CATALOG[provider]?.durations ?? []].sort((a, b) => a - b);
1052
+ }
1053
+ function minSegmentSecFor(provider) {
1054
+ return segmentDurationsFor(provider)[0] ?? 0;
1055
+ }
1056
+ function maxSegmentSecFor(provider) {
1057
+ const d = segmentDurationsFor(provider);
1058
+ return d[d.length - 1] ?? 0;
1059
+ }
1060
+ function hasContiguousSegmentDurations(provider) {
1061
+ const d = segmentDurationsFor(provider);
1062
+ if (d.length === 0) return false;
1063
+ return d.length === d[d.length - 1] - d[0] + 1;
1064
+ }
1065
+ function maxSegmentsFor(provider, capSec) {
1066
+ const max = maxSegmentSecFor(provider);
1067
+ return max > 0 ? Math.ceil(capSec / max) : 0;
1068
+ }
1069
+ function defaultVideoAspectRatio(provider) {
1070
+ return isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider) ? "adaptive" : "16:9";
1071
+ }
1072
+ var VEO_PROVIDERS = /* @__PURE__ */ new Set([
1073
+ "veo3",
1074
+ "veo3.1",
1075
+ "veo3_lite"
1076
+ ]);
1077
+ function isVeoProvider(provider) {
1078
+ return !!provider && VEO_PROVIDERS.has(provider);
1079
+ }
1080
+ var SEEDANCE_2_REF_LIMITS = {
1081
+ images: 9,
1082
+ videos: 3,
1083
+ audio: 3
1084
+ };
1085
+ var SEEDANCE_2_5_REF_LIMITS = {
1086
+ images: 30,
1087
+ videos: 10,
1088
+ audio: 10
1089
+ };
1090
+ var SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC = 1.8;
1091
+ var SEEDANCE_2_CONTINUATION_REF_SEC = 2;
1092
+ var SEEDANCE_2_EXTEND_STITCH = {
1093
+ /** Frames dropped from the END of the source clip (smart-cut FALLBACK —
1094
+ * used only when the PSNR boundary matcher finds no genuine match). */
1095
+ trimTailFrames: 4,
1096
+ /** Frames dropped from the START of the generated extension (smart-cut
1097
+ * fallback, see above). */
1098
+ trimHeadFrames: 3,
1099
+ /** Boundary audio fade length (seconds), timeline-preserving. */
1100
+ audioFadeSec: 0.15,
1101
+ /** Seconds of the source's TAIL passed as the @video_1 reference — short
1102
+ * keeps the model focused on continuing the boundary motion; the value is
1103
+ * floored by SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC (the original spike's 1s
1104
+ * tail is now provider-rejected). */
1105
+ referenceTailSeconds: SEEDANCE_2_CONTINUATION_REF_SEC
1106
+ };
1107
+ var SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER = {
1108
+ "seedance-2-fast": 15.2,
1109
+ // Seedance 2.5 — documented hard limit: each reference audio 2-30s, ≤15 MB
1110
+ // per file (docs.kie.ai/market/bytedance/seedance-2-5).
1111
+ "seedance-2-5": 30,
1112
+ // MiniMax Hailuo 3 — documented hard limit: each reference audio segment
1113
+ // 2-15s, ≤15s total (docs.kie.ai/market/minimax-h3/reference-to-video).
1114
+ "minimax-h3": 15,
1115
+ // Wan 3.0 family — documented hard limit: each reference audio clip 1-15s,
1116
+ // ≤15s combined (docs.kie.ai/market/wan/3-0-video).
1117
+ "wan-3": 15,
1118
+ "wan-3-prime": 15
1119
+ };
1120
+ function seedance2AudioLimitSec(provider) {
1121
+ if (!provider) return null;
1122
+ return SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER[provider] ?? null;
1123
+ }
1124
+ function findSeedance2AudioOverLimit(provider, durationsSec) {
1125
+ const limit = seedance2AudioLimitSec(provider);
1126
+ if (limit === null) return null;
1127
+ for (const d of durationsSec) {
1128
+ if (Number.isFinite(d) && d > limit) return d;
1129
+ }
1130
+ return null;
1131
+ }
1132
+ var VIDEO_REF_LIMITS_BY_PROVIDER = {
1133
+ // Seedance 2 — full multimodal caps.
1134
+ "seedance-2": { ...SEEDANCE_2_REF_LIMITS },
1135
+ "seedance-2-fast": { ...SEEDANCE_2_REF_LIMITS },
1136
+ "seedance-2-mini": { ...SEEDANCE_2_REF_LIMITS },
1137
+ // Seedance 2.5 — wider caps than the 2.0 family (30 / 10 / 10).
1138
+ "seedance-2-5": { ...SEEDANCE_2_5_REF_LIMITS },
1139
+ // MiniMax Hailuo 3 — identical multimodal caps (9 images / 3 videos / 3
1140
+ // audio per docs.kie.ai/market/minimax-h3/reference-to-video). Note: KIE
1141
+ // bills input images beyond the first 5 (11 KIE cr each) — see the
1142
+ // minimax-h3 credit helper in backend ee/billing.
1143
+ "minimax-h3": { ...SEEDANCE_2_REF_LIMITS },
1144
+ // Wan 3.0 family — all-purpose reference mode: up to 10 images / 5 videos
1145
+ // (each 1-15s, ≤15s combined) / 5 audio clips (each 1-15s, ≤15s combined).
1146
+ // The reference arrays are mutually EXCLUSIVE with first/last frame at the
1147
+ // provider (docs.kie.ai/market/wan/3-0-video).
1148
+ "wan-3": { images: 10, videos: 5, audio: 5 },
1149
+ "wan-3-prime": { images: 10, videos: 5, audio: 5 },
1150
+ // Multi-image reference providers.
1151
+ // `characters` = the dedicated identity input (KIE `character_ids`, max 3).
1152
+ // It is NOT an image-reference lane: it draws from the SAME 7-unit budget as
1153
+ // `images` (images + 2×videos + character units ≤ 7) — see
1154
+ // `video-character-refs.ts`, the one place that budget is computed.
1155
+ // `voices` = distinct audio personas per task (`audio_ids`, max 3). NOT part
1156
+ // of the 7-unit quota: audio ids are a separate input.
1157
+ "gemini-omni-video": { images: 7, videos: 1, characters: 3, voices: 3 },
1158
+ // Gemini Omni Flash 1.1 — identical quota to the pro sibling
1159
+ // (images + 2×videos + character_ids ≤ 7).
1160
+ "gemini-omni-flash": { images: 7, videos: 1, characters: 3, voices: 3 },
1161
+ "kling-3-omni": { images: 7 },
1162
+ // catalog/docs: "end frame + up to 7 reference images"
1163
+ "grok-i2v": { images: 7 },
1164
+ // backend kie/models.ts maxRefImages: 7
1165
+ "happyhorse-ref2v": { images: 9 },
1166
+ // backend kie/models.ts maxRefImages: 9
1167
+ // VEO 3.x — REFERENCE_2_VIDEO path caps refs at 3 (kie/video.ts slices to
1168
+ // this number). `veo3` (VEO 3.1 QUALITY) is deliberately ABSENT: KIE serves
1169
+ // reference-to-video on the Fast and Lite SKUs only and rejects it on
1170
+ // Quality with "Reference to video only supports the Veo Fast model and Veo
1171
+ // Lite model." (production, 2026-09-04). Absent ⇒ 0 ⇒ the handle dims, the
1172
+ // `connectedReferences` assembly strips image tokens, and kie/video.ts never
1173
+ // flips a Quality call to REFERENCE_2_VIDEO.
1174
+ "veo3.1": { images: 3 },
1175
+ "veo3_lite": { images: 3 }
1176
+ // NOTE: wan-i2v / hailuo-2.3[-pro] / bytedance-pro[-fast] / grok-imagine-video-1.5
1177
+ // are deliberately ABSENT. The 2026-06-28 audit (video-reference-features.test.ts)
1178
+ // verified backend reference-forwarding paths and these i2v models have none —
1179
+ // a single image_url start frame only. Advertising a ref cap would silently drop
1180
+ // the user's references (the grok-imagine-video-1.5 bug). Add only with a
1181
+ // verified provider path + the catalog `reference-image` feature.
1182
+ };
1183
+ var VIDEO_REF_VIDEO_DURATION_LIMITS = {
1184
+ "seedance-2-5": { minSec: 2, maxSec: 30, maxTotalSec: 30 },
1185
+ // MiniMax Hailuo 3 — the provider states the per-clip bound in its own reject
1186
+ // text: "content[1].video_url: invalid param: video duration 52838 ms,
1187
+ // expected [2000, 15000] ms" (app-reports P4, 2 rows, the same clip retried).
1188
+ // The KIE reference-to-video doc adds the COMBINED cap — the same shape the
1189
+ // audio side already declares in SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER
1190
+ // above, whose h3 row cites the same page.
1191
+ "minimax-h3": { minSec: 2, maxSec: 15, maxTotalSec: 15 }
1192
+ };
1193
+ function checkRefVideoDurations(provider, durationsSec) {
1194
+ const limit = VIDEO_REF_VIDEO_DURATION_LIMITS[provider];
1195
+ if (!limit) return { ok: true };
1196
+ const usable = durationsSec.filter((d) => Number.isFinite(d) && d > 0);
1197
+ if (usable.length === 0) return { ok: true };
1198
+ const offender = usable.find((d) => d < limit.minSec || d > limit.maxSec);
1199
+ if (offender !== void 0) {
1200
+ return {
1201
+ ok: false,
1202
+ message: `Each reference video must be between ${limit.minSec} and ${limit.maxSec} seconds \u2014 one is ${offender.toFixed(1)}s. Trim it (a Trim Video node upstream works) and run again.`
1203
+ };
1204
+ }
1205
+ if (limit.maxTotalSec !== void 0) {
1206
+ const total = usable.reduce((a, b) => a + b, 0);
1207
+ if (total > limit.maxTotalSec) {
1208
+ return {
1209
+ ok: false,
1210
+ message: `Reference videos must not exceed ${limit.maxTotalSec} seconds in total \u2014 these add up to ${total.toFixed(1)}s. Remove one or trim them and run again.`
1211
+ };
1212
+ }
1213
+ }
1214
+ return { ok: true };
1215
+ }
1216
+ var RESOLUTION_VIDEO_REF_PRICING = SEEDANCE_2_PROVIDERS;
1217
+ var RESOLUTION_DURATION_PRICING = {
1218
+ // KIE supports only 480p/720p here; 480p is the default.
1219
+ "grok-imagine-video-1.5": ["480p", "720p"],
1220
+ // seedance-2-extend always uses a video ref, so pricing has no -ref
1221
+ // dimension — duration tier + ":res" only (rates = seedance-2 -ref + stitch).
1222
+ "seedance-2-extend": ["480p", "720p", "1080p"],
1223
+ // HappyHorse 1.1 — per-second billing at two published resolution rates
1224
+ // (kie.ai/happyhorse-1-1: 22.5 cr/s @720p, 29 cr/s @1080p, uniform across
1225
+ // t2v/i2v/ref2v). 720p first = billing default; the KIE-side default is
1226
+ // pinned to 720p via extraParams in backend kie/models.ts so render matches.
1227
+ "happyhorse": ["720p", "1080p"],
1228
+ "happyhorse-i2v": ["720p", "1080p"],
1229
+ "happyhorse-ref2v": ["720p", "1080p"],
1230
+ // Wan 3.0 / Prime — per-second billing at three published resolution rates.
1231
+ // Ascending, matching the catalog; the BILLED default is declared explicitly
1232
+ // in PRICING_DEFAULT_RESOLUTION ("720p") rather than carried by index 0, and
1233
+ // the provider layer pins the same 720P so render == billed.
1234
+ "wan-3": ["480p", "720p", "1080p"],
1235
+ "wan-3-prime": ["480p", "720p", "1080p"]
1236
+ };
1237
+ var NATIVE_ADAPTIVE_ASPECT = {
1238
+ "seedance-2": "adaptive",
1239
+ "seedance-2-fast": "adaptive",
1240
+ "seedance-2-mini": "adaptive",
1241
+ "seedance-2-5": "adaptive",
1242
+ // Wan 3.0 family: `adaptive` is the enum DEFAULT and KIE documents it as
1243
+ // "automatically selects the ratio based on the input media and intent"
1244
+ // (docs.kie.ai/market/wan/3-0-video) — i.e. match-the-input, not merely
1245
+ // "provider default" (the grok `auto` trap). DOC-verified only; re-confirm
1246
+ // with a live job before relying on it for off-catalog ratios.
1247
+ "wan-3": "adaptive",
1248
+ "wan-3-prime": "adaptive"
1249
+ };
1250
+ var FRAME_MODE_ADAPTIVE_ONLY_ASPECT = /* @__PURE__ */ new Set([
1251
+ "seedance-2-5"
1252
+ ]);
1253
+ var VIDEO_PROVIDERS_REQUIRING_IMAGE = new Set(
1254
+ Object.values(MODEL_CATALOG).filter(
1255
+ (m) => m.kind === "video" && m.modes.includes("i2v") && !m.modes.includes("t2v") && VIDEO_GEN_PROVIDERS.includes(m.id) && resolveVideoProviderForMode(m.id, "text-to-video") === m.id
1256
+ ).map((m) => m.id)
1257
+ );
1258
+ function videoProviderRequiresImage(provider) {
1259
+ return !!provider && VIDEO_PROVIDERS_REQUIRING_IMAGE.has(provider);
1260
+ }
1261
+ function videoProviderFoldsLoneEndFrame(provider) {
1262
+ return isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider);
1263
+ }
1264
+ var AUDIO_ADDON_PROVIDERS = /* @__PURE__ */ new Set([
1265
+ "kling-3.0",
1266
+ "kling"
1267
+ ]);
1268
+ var VIDEO_AUDIO_CAPABILITY = {
1269
+ // VEO 3.x — native spoken dialogue + lip movement; always on (no toggle).
1270
+ veo3: { mode: "native_speech", alwaysOn: true },
1271
+ "veo3.1": { mode: "native_speech", alwaysOn: true },
1272
+ veo3_lite: { mode: "native_speech", alwaysOn: true },
1273
+ // Kling 2.6 / 3.0 — native spoken dialogue + lip sync behind the `sound`
1274
+ // toggle (probe-verified on the KIE path 2026-07-16: scripted quoted lines
1275
+ // are spoken verbatim with articulated lips; the official Kling 2.6 audio
1276
+ // guide documents speech/dialogue/narration/singing with [Character@Voice]
1277
+ // binding, zh+en voices). Cost-affecting: `:audio` credit suffix.
1278
+ // kling-3.0's model default is sound ON (kie models.ts extraParams +
1279
+ // kling3-client `?? true`) → defaultOn keeps billing aligned with what an
1280
+ // intent-less request actually generates; kling 2.6 defaults OFF.
1281
+ kling: { mode: "native_speech", field: "sound", affectsCost: true },
1282
+ "kling-3.0": { mode: "native_speech", field: "sound", affectsCost: true, defaultOn: true },
1283
+ // Kling 3.0 Omni (Replicate kwaivgi/kling-v3-omni-video) — the Omni tier's
1284
+ // headline feature IS native dialogue (per-character voices, unified audio
1285
+ // timeline). Lever is Replicate's `generate_audio` (default true in our
1286
+ // provider config → defaultOn); audio is priced into the flat per-duration
1287
+ // rate, so NOT cost-affecting (no :audio composite).
1288
+ "kling-3-omni": { mode: "native_speech", field: "generateAudio", defaultOn: true },
1289
+ // Seedance 1.x — optional ambient audio (generate_audio); not dialogue.
1290
+ seedance: { mode: "ambient", field: "generateAudio" },
1291
+ // Seedance 2.0 — multimodal; lip-syncs to a supplied reference-audio track.
1292
+ "seedance-2": { mode: "audio_driven", field: "generateAudio" },
1293
+ "seedance-2-fast": { mode: "audio_driven", field: "generateAudio" },
1294
+ "seedance-2-mini": { mode: "audio_driven", field: "generateAudio" },
1295
+ // Seedance 2.5 — same audio-driven surface; `generate_audio` defaults TRUE
1296
+ // on KIE and is cost-affecting only through the -ref/no-ref rate split,
1297
+ // which the resolution+ref composite already carries (no `:audio` suffix).
1298
+ "seedance-2-5": { mode: "audio_driven", field: "generateAudio", defaultOn: true },
1299
+ // MiniMax Hailuo 3 — multimodal; lip-syncs to reference audio (r2v). The
1300
+ // KIE API exposes NO audio on/off parameter (audio is always produced), so
1301
+ // there is no toggle field — alwaysOn, like VEO.
1302
+ "minimax-h3": { mode: "audio_driven", alwaysOn: true },
1303
+ // Wan 3.0 family — a single boolean `audio` lever (KIE default true) produces
1304
+ // an ambient/SFX track with the clip. Classified "ambient", NOT
1305
+ // "native_speech" or "audio_driven": the schema documents no dialogue
1306
+ // guarantee, and reference audio is a generic conditioning array, not a
1307
+ // verified lip-sync transport. Upgrade only on a live probe (the kling-3.0
1308
+ // standard) — `audio_driven` would reroute the Story→Video dialogue pipeline
1309
+ // and skip the lip-sync pass. `defaultOn` mirrors the KIE default so an
1310
+ // intent-less request is described honestly; audio is priced into the uniform
1311
+ // per-second rate, so NOT cost-affecting (no `:audio` composite).
1312
+ "wan-3": { mode: "ambient", field: "audio", defaultOn: true },
1313
+ "wan-3-prime": { mode: "ambient", field: "audio", defaultOn: true },
1314
+ // Gemini Omni (both SKUs — the pro `gemini-omni-video` and the faster
1315
+ // `gemini-omni-flash`; one model at two speeds, so their rows are identical
1316
+ // and a test pins that). Settled 2026-09-03 from Google's own documentation
1317
+ // at https://ai.google.dev/gemini-api/docs/omni, having been unlisted — and
1318
+ // therefore reported as SILENT — while the catalog described both as "native
1319
+ // audio".
1320
+ //
1321
+ // "ambient", and alwaysOn with no toggle field, on three sentences from that
1322
+ // page:
1323
+ // - "By default the model will try to generate an appropriate audio track
1324
+ // for a video." Audio on every render, and the KIE input schema
1325
+ // (prompt / image_urls / first+last_frame_url / audio_ids / video_list /
1326
+ // character_ids / duration / aspect_ratio / seed / resolution — see
1327
+ // docs.kie.ai/market/gemini-omni-video and
1328
+ // docs.kie.ai/market/google/gemini-omni-flash-1-1) carries no on/off
1329
+ // lever, so there is nothing for applyVideoAudioToggle to write.
1330
+ // - NOT native_speech: "Multi-turn voice extension: Generating spoken
1331
+ // dialogue or speech is supported when extending previously generated
1332
+ // videos via multi-turn (`previous_interaction_id`)" — a field KIE's
1333
+ // createTask schema does not expose, so the dialogue path is unreachable
1334
+ // on our transport. Held to the Wan 3.0 bar: no documented dialogue
1335
+ // guarantee on the path we actually drive ⇒ ambient, and upgrade only on
1336
+ // a live probe (the kling-3.0 standard). Classifying it native_speech
1337
+ // would reroute the Story→Video dialogue pipeline past the lip-sync pass.
1338
+ // - NOT audio_driven either: "Uploading audio references is unsupported in
1339
+ // the current version of the API", and "any audio in a video reference is
1340
+ // ignored" — there is no reference-audio transport to be driven by, and
1341
+ // runGeminiOmni sends `audio_ids` ONLY for a
1342
+ // character's pinned voice persona (a preset voice, never a recording), which
1343
+ // is not a reference-audio transport and leaves the mode `ambient`.
1344
+ // Audio is priced into the per-tier rate, so NOT cost-affecting.
1345
+ "gemini-omni-video": { mode: "ambient", alwaysOn: true },
1346
+ "gemini-omni-flash": { mode: "ambient", alwaysOn: true }
1347
+ };
1348
+ var VIDEO_AUDIO_NONE = { mode: "none" };
1349
+ function getVideoAudioCapability(model) {
1350
+ return (model ? VIDEO_AUDIO_CAPABILITY[model] : void 0) ?? VIDEO_AUDIO_NONE;
1351
+ }
1352
+ function videoModelSupportsAudio(model) {
1353
+ return getVideoAudioCapability(model).mode !== "none";
1354
+ }
1355
+ function videoModelCanSpeakDialogue(model) {
1356
+ const mode = getVideoAudioCapability(model).mode;
1357
+ return mode === "native_speech" || mode === "audio_driven";
1358
+ }
1359
+ function applyVideoAudioToggle(input, provider, opts) {
1360
+ const cap = getVideoAudioCapability(provider);
1361
+ if (!cap.field) return;
1362
+ const enabled = cap.affectsCost ? opts?.sound : opts?.sound ?? opts?.generateAudio;
1363
+ if (enabled === void 0) return;
1364
+ if (cap.field === "generateAudio") input.generate_audio = enabled;
1365
+ else if (cap.field === "audio") input.audio = enabled;
1366
+ else input.sound = enabled;
1367
+ }
1368
+ var MODE_ADDON_PROVIDERS = /* @__PURE__ */ new Set([]);
1369
+ var VEO_RESOLUTION_TIERED_PROVIDERS = /* @__PURE__ */ new Set([
1370
+ "veo3.1",
1371
+ "veo3_lite"
1372
+ ]);
1373
+ var VIDEO_VARIABLE_PRICING = {
1374
+ "kling-3.0": "duration+audio",
1375
+ "kling-3-omni": "duration",
1376
+ "kling": "duration+audio",
1377
+ "kling-turbo": "duration",
1378
+ "kling-master": "duration",
1379
+ "grok-i2v": "duration",
1380
+ "wan-i2v": "duration",
1381
+ "hailuo-2.3-pro": "duration",
1382
+ "hailuo-2.3": "duration",
1383
+ "hailuo-standard": "duration",
1384
+ "seedance": "duration",
1385
+ "seedance-2": "duration+resolution+ref",
1386
+ "seedance-2-fast": "duration+resolution+ref",
1387
+ "seedance-2-mini": "duration+resolution+ref",
1388
+ "seedance-2-5": "duration+resolution+ref",
1389
+ // MiniMax Hailuo 3 — per-second rate at two resolution tiers (2K default /
1390
+ // 768P). Duration + resolution form the composite (bare = 2K, ":768p"
1391
+ // appended for the cheaper tier); ref-video input seconds + extra input
1392
+ // images are billed via the dedicated compute hook, not the identifier.
1393
+ "minimax-h3": "duration+resolution",
1394
+ // Grok Imagine Video 1.5 — per-second billing split 480p/720p (no video-ref dimension).
1395
+ "grok-imagine-video-1.5": "duration+resolution",
1396
+ // Wan 3.0 family — per-second billing at three resolution rates (no video-ref
1397
+ // dimension: reference runs bill output seconds only). No gemini-omni-flash
1398
+ // entry, mirroring gemini-omni-video which has none either.
1399
+ "wan-3": "duration+resolution",
1400
+ "wan-3-prime": "duration+resolution"
1401
+ };
1402
+ var PRICING_DEFAULT_DURATION_SEC = Object.freeze(
1403
+ Object.fromEntries(
1404
+ Object.values(MODEL_CATALOG).filter((e) => e.kind === "video" && typeof e.defaultDuration === "number").map((e) => [e.id, e.defaultDuration])
1405
+ )
1406
+ );
1407
+ function snapToNearestDuration(requested, allowed) {
1408
+ if (!allowed || allowed.length === 0) return requested;
1409
+ if (allowed.includes(requested)) return requested;
1410
+ return allowed.reduce((best, d) => Math.abs(d - requested) < Math.abs(best - requested) ? d : best);
1411
+ }
1412
+ function videoDefaultDurationSec(provider) {
1413
+ const entry = MODEL_CATALOG[provider];
1414
+ if (typeof entry?.defaultDuration === "number") return entry.defaultDuration;
1415
+ const shortest = entry?.durations?.length ? Math.min(...entry.durations) : void 0;
1416
+ return shortest ?? 5;
1417
+ }
1418
+ function pricedOutputDurationSec(provider, requested) {
1419
+ const fallback = videoDefaultDurationSec(provider);
1420
+ const parsed = typeof requested === "string" ? parseInt(requested, 10) : requested;
1421
+ if (parsed === void 0 || Number.isNaN(parsed)) return fallback;
1422
+ if (parsed <= 0) {
1423
+ return isAutoVideoDuration(parsed) && supportsAutoVideoDuration(provider) ? maxVideoDurationSec(provider) ?? fallback : fallback;
1424
+ }
1425
+ return snapToNearestDuration(parsed, MODEL_CATALOG[provider]?.durations);
1426
+ }
1427
+ function supportsAutoVideoDuration(provider) {
1428
+ return !!provider && MODEL_CATALOG[provider]?.autoDuration === true;
1429
+ }
1430
+ function maxVideoDurationSec(provider) {
1431
+ const tiers = VIDEO_DURATION_TIERS[provider];
1432
+ return tiers && tiers.length > 0 ? tiers[tiers.length - 1].maxSeconds : void 0;
1433
+ }
1434
+ var PRICING_DEFAULT_RESOLUTION = {
1435
+ // KIE renders 720p when `resolution` is omitted (kie/models.ts extraParams).
1436
+ "seedance-2-5": "720p",
1437
+ // Wan 3.0 family — KIE's OWN default is 1080P, but the provider layer pins
1438
+ // 720P (normalizeWan3Resolution / WAN_3_DEFAULT_RESOLUTION) so the rendered
1439
+ // tier equals the tier the bare identifier bills. This declaration is what
1440
+ // makes the billed default explicit instead of an array ordering: the
1441
+ // RESOLUTION_DURATION_PRICING branch consults it before falling back to the
1442
+ // first tier, so the catalog can stay ascending without repricing anything.
1443
+ "wan-3": "720p",
1444
+ "wan-3-prime": "720p"
1445
+ };
1446
+ var HAPPYHORSE_DURATION_TIERS = Array.from(
1447
+ { length: 13 },
1448
+ (_, i) => ({ maxSeconds: i + 3, suffix: `${i + 3}s` })
1449
+ );
1450
+ var SEEDANCE_2_5_DURATION_TIERS = Array.from(
1451
+ { length: 27 },
1452
+ (_, i) => ({ maxSeconds: i + 4, suffix: `${i + 4}s` })
1453
+ );
1454
+ var WAN_3_DURATION_TIERS = Array.from(
1455
+ { length: 29 },
1456
+ (_, i) => ({ maxSeconds: i + 2, suffix: `${i + 2}s` })
1457
+ );
1458
+ var VIDEO_DURATION_TIERS = {
1459
+ "kling-3.0": [
1460
+ { maxSeconds: 5, suffix: "5s" },
1461
+ { maxSeconds: 10, suffix: "10s" },
1462
+ { maxSeconds: 15, suffix: "15s" }
1463
+ ],
1464
+ "kling-3-omni": [
1465
+ { maxSeconds: 5, suffix: "5s" },
1466
+ { maxSeconds: 10, suffix: "10s" },
1467
+ { maxSeconds: 15, suffix: "15s" }
1468
+ ],
1469
+ "kling": [
1470
+ { maxSeconds: 5, suffix: "5s" },
1471
+ { maxSeconds: 10, suffix: "10s" }
1472
+ ],
1473
+ "kling-turbo": [
1474
+ { maxSeconds: 5, suffix: "5s" },
1475
+ { maxSeconds: 10, suffix: "10s" }
1476
+ ],
1477
+ "kling-master": [
1478
+ { maxSeconds: 5, suffix: "5s" },
1479
+ { maxSeconds: 10, suffix: "10s" }
1480
+ ],
1481
+ "grok-i2v": [
1482
+ { maxSeconds: 6, suffix: "6s" },
1483
+ { maxSeconds: 10, suffix: "10s" },
1484
+ { maxSeconds: 15, suffix: "15s" }
1485
+ ],
1486
+ "wan-i2v": [
1487
+ { maxSeconds: 5, suffix: "5s" },
1488
+ { maxSeconds: 10, suffix: "10s" },
1489
+ { maxSeconds: 15, suffix: "15s" }
1490
+ ],
1491
+ "hailuo-2.3-pro": [
1492
+ { maxSeconds: 6, suffix: "6s" },
1493
+ { maxSeconds: 10, suffix: "10s" }
1494
+ ],
1495
+ "hailuo-2.3": [
1496
+ { maxSeconds: 6, suffix: "6s" },
1497
+ { maxSeconds: 10, suffix: "10s" }
1498
+ ],
1499
+ "hailuo-standard": [
1500
+ { maxSeconds: 6, suffix: "6s" },
1501
+ { maxSeconds: 10, suffix: "10s" }
1502
+ ],
1503
+ "seedance": [
1504
+ { maxSeconds: 4, suffix: "4s" },
1505
+ { maxSeconds: 8, suffix: "8s" },
1506
+ { maxSeconds: 12, suffix: "12s" }
1507
+ ],
1508
+ "seedance-2": [
1509
+ { maxSeconds: 4, suffix: "4s" },
1510
+ { maxSeconds: 8, suffix: "8s" },
1511
+ { maxSeconds: 12, suffix: "12s" },
1512
+ { maxSeconds: 15, suffix: "15s" }
1513
+ ],
1514
+ "seedance-2-mini": [
1515
+ { maxSeconds: 4, suffix: "4s" },
1516
+ { maxSeconds: 8, suffix: "8s" },
1517
+ { maxSeconds: 12, suffix: "12s" },
1518
+ { maxSeconds: 15, suffix: "15s" }
1519
+ ],
1520
+ "seedance-2-extend": [
1521
+ { maxSeconds: 4, suffix: "4s" },
1522
+ { maxSeconds: 8, suffix: "8s" },
1523
+ { maxSeconds: 12, suffix: "12s" },
1524
+ { maxSeconds: 15, suffix: "15s" }
1525
+ ],
1526
+ "seedance-2-fast": [
1527
+ { maxSeconds: 4, suffix: "4s" },
1528
+ { maxSeconds: 8, suffix: "8s" },
1529
+ { maxSeconds: 12, suffix: "12s" },
1530
+ { maxSeconds: 15, suffix: "15s" }
1531
+ ],
1532
+ "seedance-2-5": SEEDANCE_2_5_DURATION_TIERS,
1533
+ "wan-3": WAN_3_DURATION_TIERS,
1534
+ "wan-3-prime": WAN_3_DURATION_TIERS,
1535
+ // MiniMax Hailuo 3 — true per-second billing (KIE 36.5 cr/s @2K, 22.5 cr/s
1536
+ // @768P). One tier per allowed second (4-15s) so the composite identifier
1537
+ // maps 1:1 to the seeded price — no rounding/overcharge for any on-menu
1538
+ // duration; the ":768p" resolution suffix is appended after the tier.
1539
+ "minimax-h3": [
1540
+ { maxSeconds: 4, suffix: "4s" },
1541
+ { maxSeconds: 5, suffix: "5s" },
1542
+ { maxSeconds: 6, suffix: "6s" },
1543
+ { maxSeconds: 7, suffix: "7s" },
1544
+ { maxSeconds: 8, suffix: "8s" },
1545
+ { maxSeconds: 9, suffix: "9s" },
1546
+ { maxSeconds: 10, suffix: "10s" },
1547
+ { maxSeconds: 11, suffix: "11s" },
1548
+ { maxSeconds: 12, suffix: "12s" },
1549
+ { maxSeconds: 13, suffix: "13s" },
1550
+ { maxSeconds: 14, suffix: "14s" },
1551
+ { maxSeconds: 15, suffix: "15s" }
1552
+ ],
1553
+ // Grok Imagine Video 1.5 — true per-second billing (KIE 14.5 cr/s @480p, 25 cr/s
1554
+ // @720p, +2 cr/image). One tier per allowed second (1–15s) so the composite
1555
+ // identifier maps 1:1 to the seeded price — no rounding/overcharge for any on-menu value.
1556
+ "grok-imagine-video-1.5": [
1557
+ { maxSeconds: 1, suffix: "1s" },
1558
+ { maxSeconds: 2, suffix: "2s" },
1559
+ { maxSeconds: 3, suffix: "3s" },
1560
+ { maxSeconds: 4, suffix: "4s" },
1561
+ { maxSeconds: 5, suffix: "5s" },
1562
+ { maxSeconds: 6, suffix: "6s" },
1563
+ { maxSeconds: 7, suffix: "7s" },
1564
+ { maxSeconds: 8, suffix: "8s" },
1565
+ { maxSeconds: 9, suffix: "9s" },
1566
+ { maxSeconds: 10, suffix: "10s" },
1567
+ { maxSeconds: 11, suffix: "11s" },
1568
+ { maxSeconds: 12, suffix: "12s" },
1569
+ { maxSeconds: 13, suffix: "13s" },
1570
+ { maxSeconds: 14, suffix: "14s" },
1571
+ { maxSeconds: 15, suffix: "15s" }
1572
+ ],
1573
+ // HappyHorse 1.1 (t2v / i2v / ref2v) — true per-second billing (KIE 22.5 cr/s
1574
+ // @720p, 29 cr/s @1080p, published on kie.ai/happyhorse-1-1). One tier per
1575
+ // allowed second (3–15s) so the composite identifier maps 1:1 to the seeded
1576
+ // price, combined with RESOLUTION_DURATION_PRICING for the ":720p"/":1080p"
1577
+ // suffix (e.g. "happyhorse-i2v:5s:720p").
1578
+ "happyhorse": HAPPYHORSE_DURATION_TIERS,
1579
+ "happyhorse-i2v": HAPPYHORSE_DURATION_TIERS,
1580
+ "happyhorse-ref2v": HAPPYHORSE_DURATION_TIERS
1581
+ };
1582
+ var COMPOSER_PLAN_MAP = {
1583
+ "video-composer": { planType: "scene-graph", planField: "sceneGraph" },
1584
+ "after-effects": { planType: "after-effects", planField: "effectPlan" },
1585
+ "lottie-overlay": { planType: "lottie-overlay", planField: "overlayPlan" },
1586
+ "3d-title": { planType: "3d-title", planField: "titlePlan" },
1587
+ "motion-graphics": { planType: "motion-graphics", planField: "motionPlan" },
1588
+ "composite": { planType: "composite", planField: "compositePlan" },
1589
+ // Scene3D previz (v1) — both the generator and the editor emit the SAME
1590
+ // validated `Scene3DPlan` revision on their `composition` handle, so
1591
+ // render-video routes either one to the `3d-scene` renderer unchanged.
1592
+ "generate-3d-scene": { planType: "3d-scene", planField: "scenePlan" },
1593
+ "edit-3d-scene": { planType: "3d-scene", planField: "scenePlan" },
1594
+ // 3D Render Pro authors the SAME `scenePlan` revision (v2) alongside its
1595
+ // MP4, so the render-only re-run reads it through this map exactly as it
1596
+ // reads a Basic revision — no second plan lane, no second render path.
1597
+ "pro-3d-render": { planType: "3d-scene", planField: "scenePlan" }
1598
+ };
1599
+ var COMPOSER_PLAN_FIELDS = [
1600
+ ...new Set(Object.values(COMPOSER_PLAN_MAP).map((m) => m.planField))
1601
+ ];
1602
+ var MOTION_DURATION_TIERS = [
1603
+ { maxSeconds: 5, suffix: "5s" },
1604
+ { maxSeconds: 10, suffix: "10s" },
1605
+ { maxSeconds: 15, suffix: "15s" },
1606
+ { maxSeconds: 30, suffix: "30s" }
1607
+ ];
1608
+ var CHARACTER_MOTION_PROVIDERS = [
1609
+ "kling",
1610
+ "kling-turbo",
1611
+ "kling-3.0",
1612
+ "wan-i2v",
1613
+ "wan-2.7-i2v"
1614
+ ];
1615
+ var LOCATION_ATMOSPHERE_PROVIDERS = [
1616
+ "kling",
1617
+ "kling-turbo",
1618
+ "kling-3.0",
1619
+ "wan-i2v",
1620
+ "wan-2.7-i2v",
1621
+ "seedance-2"
1622
+ ];
1623
+ var OBJECT_MOTION_PROVIDERS = [
1624
+ "kling-turbo",
1625
+ // 5s, fast, cheap (10 credits) — default
1626
+ "kling",
1627
+ // 5/10s
1628
+ "kling-3.0",
1629
+ // 3-15s, premium
1630
+ "minimax",
1631
+ // 5s, end-frame support
1632
+ "hailuo-2.3",
1633
+ // 6/10s
1634
+ "wan-i2v",
1635
+ // 5/10/15s
1636
+ "seedance",
1637
+ // 4/8/12s
1638
+ "bytedance-lite"
1639
+ // 5/10s
1640
+ ];
1641
+ var SceneInputModeSchema = z.enum([
1642
+ "text",
1643
+ // text-to-video
1644
+ "first_frame",
1645
+ // i2v with start image only
1646
+ "first_last_frame",
1647
+ // i2v with paired start+end (v4.1 Method 2)
1648
+ "ref_images",
1649
+ // multi-ref consistency models
1650
+ "multi_shot",
1651
+ // native multi-shot models (Kling Omni, Seedance multi)
1652
+ "video_continuation",
1653
+ // v4.1 Method 3 — extend prior clip (VEO extend, Seedance video-ref)
1654
+ "frame_interpolation",
1655
+ // v4.1 Method 8 — N sparse keyframes → interpolated video
1656
+ "camera_path"
1657
+ // v4.1 Method 10 — parametric 3D camera path
1658
+ ]);
1659
+ var VIDEO_MODEL_CAPS = {
1660
+ "kling": {
1661
+ inputModes: ["first_frame", "first_last_frame", "text"],
1662
+ maxDurationSeconds: 10,
1663
+ prompting_style: "natural_language",
1664
+ maxReferenceImages: 1
1665
+ },
1666
+ "kling-3-omni": {
1667
+ inputModes: ["ref_images", "multi_shot"],
1668
+ maxShotsPerCall: 5,
1669
+ maxDurationSeconds: 15,
1670
+ prompting_style: "natural_language",
1671
+ // Kling Omni accepts a strong multi-ref budget (start frame + up to
1672
+ // ~6 character/scene refs). Drives `allocateReferenceSlots` in
1673
+ // continuity.ts to surface all of them.
1674
+ maxReferenceImages: 7
1675
+ },
1676
+ "veo3.1": {
1677
+ inputModes: ["first_frame", "text", "video_continuation"],
1678
+ supportsVideoExtension: true,
1679
+ maxDurationSeconds: 8,
1680
+ prompting_style: "cinematic_tag_heavy",
1681
+ maxReferenceImages: 1
1682
+ },
1683
+ "seedance-2": {
1684
+ inputModes: ["first_frame", "first_last_frame", "ref_images", "video_continuation"],
1685
+ supportsVideoExtension: true,
1686
+ maxDurationSeconds: 10,
1687
+ prompting_style: "natural_language",
1688
+ // SEEDANCE_2_REF_LIMITS.images is the hard upper bound (9). 1C.1
1689
+ // caps to a more conservative 5 to leave headroom for primary
1690
+ // character + location + 3 secondary refs.
1691
+ maxReferenceImages: 5
1692
+ },
1693
+ "seedance-2-5": {
1694
+ inputModes: ["first_frame", "first_last_frame", "ref_images", "video_continuation"],
1695
+ supportsVideoExtension: true,
1696
+ // 30s single-shot on KIE (probe-verified 2026-08-08: 30 accepted, 31 rejected).
1697
+ maxDurationSeconds: 30,
1698
+ prompting_style: "natural_language",
1699
+ // SEEDANCE_2_5_REF_LIMITS.images is the hard upper bound (30); the same
1700
+ // conservative headroom rule as seedance-2 applies to what the director
1701
+ // actually allocates.
1702
+ maxReferenceImages: 5
1703
+ },
1704
+ "hailuo-2.3-pro": {
1705
+ inputModes: ["first_frame", "text"],
1706
+ maxDurationSeconds: 10,
1707
+ prompting_style: "compact",
1708
+ maxReferenceImages: 1
1709
+ },
1710
+ "hailuo-standard": {
1711
+ inputModes: ["first_frame", "first_last_frame"],
1712
+ maxDurationSeconds: 6,
1713
+ prompting_style: "compact",
1714
+ maxReferenceImages: 1
1715
+ },
1716
+ "minimax": {
1717
+ inputModes: ["first_frame", "first_last_frame"],
1718
+ maxDurationSeconds: 6,
1719
+ prompting_style: "compact",
1720
+ maxReferenceImages: 1
1721
+ },
1722
+ "kling-turbo": {
1723
+ inputModes: ["first_frame", "first_last_frame"],
1724
+ maxDurationSeconds: 10,
1725
+ prompting_style: "natural_language",
1726
+ maxReferenceImages: 1
1727
+ },
1728
+ "bytedance-lite": {
1729
+ inputModes: ["first_frame", "first_last_frame"],
1730
+ maxDurationSeconds: 10,
1731
+ prompting_style: "compact",
1732
+ maxReferenceImages: 1
1733
+ },
1734
+ // v4.1 Method 8 — Frame interpolation (sparse keyframes → interpolated video).
1735
+ // RIFE: Replicate-hosted, optical-flow-based interpolation, up to 8 keyframes.
1736
+ "rife": {
1737
+ inputModes: ["frame_interpolation"],
1738
+ maxInterpolationKeyframes: 8,
1739
+ maxDurationSeconds: 60,
1740
+ prompting_style: "compact"
1741
+ },
1742
+ // Topaz Apollo: cloud-hosted (Topaz.ai), higher keyframe budget.
1743
+ // Provider routing currently stubs as `provider_not_available:topaz-apollo`
1744
+ // pending KIE catalog check — entry kept so Shot List Critic surfaces it.
1745
+ "topaz-apollo": {
1746
+ inputModes: ["frame_interpolation"],
1747
+ maxInterpolationKeyframes: 16,
1748
+ maxDurationSeconds: 60,
1749
+ prompting_style: "compact"
1750
+ },
1751
+ // v4.1 Method 10 — Parametric 3D camera path (Stability AI SV3D via Replicate).
1752
+ // SV3D takes a single image + a camera path and renders a 3D-orbit video.
1753
+ "stable-video-3d": {
1754
+ inputModes: ["camera_path", "first_frame"],
1755
+ supportsCameraPath: true,
1756
+ maxDurationSeconds: 5,
1757
+ prompting_style: "natural_language",
1758
+ maxReferenceImages: 1
1759
+ }
1760
+ };
1761
+ var modelsForInputMode = (mode) => Object.entries(VIDEO_MODEL_CAPS).filter(([, caps]) => caps.inputModes.includes(mode)).map(([model]) => model);
1762
+ function preferredInputModeForModel(model) {
1763
+ if (!model) return void 0;
1764
+ const caps = VIDEO_MODEL_CAPS[model];
1765
+ if (!caps) return void 0;
1766
+ if (caps.inputModes.includes("ref_images")) return "ref_images";
1767
+ if (caps.inputModes.includes("first_frame")) return "first_frame";
1768
+ return void 0;
1769
+ }
1770
+ var DEFAULT_VIDEO_PROVIDER = "seedance-2-fast";
1771
+ var DEFAULT_VIDEO_DURATION_SEC = 4;
1772
+ function applyDefaultVideoSelection(input) {
1773
+ const providerOmitted = input.provider == null || input.provider === "";
1774
+ return {
1775
+ provider: providerOmitted ? DEFAULT_VIDEO_PROVIDER : input.provider,
1776
+ duration: input.duration ?? (providerOmitted ? DEFAULT_VIDEO_DURATION_SEC : void 0)
1777
+ };
1778
+ }
1779
+
1780
+ export { AI_WRITER_PROVIDERS, ASPECT_RATIO_DIMENSIONS, AUDIO_ADDON_PROVIDERS, CHARACTER_MOTION_PROVIDERS, COMPOSER_PLAN_FIELDS, COMPOSER_PLAN_MAP, CREDIT_BASE_USD, DEFAULT_DIALOGUE_PROVIDER, DEFAULT_MUSIC_PROVIDER, DEFAULT_REF_IMAGE_MAX, DEFAULT_SUNO_MODEL, DEFAULT_TEXT_TO_AUDIO_PROVIDER, DEFAULT_TRANSCRIBE_NODE_PROVIDER, DEFAULT_TRANSCRIBE_PROVIDER, DEFAULT_TTS_PROVIDER, DEFAULT_VIDEO_DURATION_SEC, DEFAULT_VIDEO_PROVIDER, DEFAULT_VOICE_DESIGN_MODEL, DIALOGUE_PROVIDERS, DURATION_PRICED_PROVIDERS, EXTEND_VIDEO_PROVIDERS, FACE_SWAP_PROVIDERS, FAL_LIP_SYNC_PROVIDERS, FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS, FRAME_MODE_ADAPTIVE_ONLY_ASPECT, GEMINI_OMNI_PROVIDERS, GUIDANCE_SCALE_SUPPORT, GVP_ANCHOR_CHOICES, GVP_DEFAULT_PROVIDER, GVP_END_FRAME_PROVIDERS, GVP_EXTEND_PROVIDERS, GVP_SUPPORTED_PROVIDERS, HIGH_QUALITY_PROVIDERS, I2I_MASK_SUPPORT, I2I_STRENGTH_SUPPORT, IDEOGRAM_PROVIDERS, IMAGE_ASPECT_RATIO_VALUES, IMAGE_EDIT_PROVIDERS, IMAGE_GEN_PROVIDERS, IMAGE_I2I_PROVIDERS, IMAGE_MASK_MODE, IMAGE_PROMPT_MAX, IMAGE_TO_VIDEO_PROVIDERS, LIP_SYNC_PROVIDERS, LLM_TEXT_INPUT_MAX, LOCATION_ATMOSPHERE_PROVIDERS, MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER, MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER, MAX_TTS_CHARS_BY_PROVIDER, MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER, MINIMAX_H3_DEFAULT_RESOLUTION, MINIMAX_H3_PROVIDERS, MODELS_WITH_REFERENCE_IMAGE_SUPPORT, MODE_ADDON_PROVIDERS, MODIFY_IMAGE_PROVIDERS, MOTION_DURATION_TIERS, MOTION_TRANSFER_PROVIDERS, MUSIC_CREDIT_ID, MUSIC_PROVIDERS, MUSIC_PROVIDER_LABELS, NATIVE_ADAPTIVE_ASPECT, NATIVE_NEGATIVE_PROMPT_MODELS, NATIVE_NEGATIVE_VIDEO_PROVIDERS, NEGATIVE_PROMPT_MAX, OBJECT_MOTION_PROVIDERS, PRICING_DEFAULT_DURATION_SEC, PRICING_DEFAULT_RESOLUTION, PROMPT_HARD_CEILING, QA_CHECK_PROVIDERS, REF_IMAGE_MAX_LIMITS, RENDERING_SPEED_SUPPORT, REPLICATE_LIP_SYNC_PROVIDERS, RESOLUTION_2K_4K_TIERED_PROVIDERS, RESOLUTION_DURATION_PRICING, RESOLUTION_VIDEO_REF_PRICING, SCRIPT_PROVIDERS, SEEDANCE_2_5_REF_LIMITS, SEEDANCE_2_CONTINUATION_REF_SEC, SEEDANCE_2_EXTEND_STITCH, SEEDANCE_2_PROVIDERS, SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER, SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC, SEEDANCE_2_REF_LIMITS, SEEDANCE_LIP_SYNC_PROVIDERS, SEEDANCE_VIDEO_EDIT_PROVIDERS, SEEDANCE_VIDEO_EDIT_SHAPE, SEED_SUPPORT, SUNO_ACTIVE_MODELS, SUNO_ADD_TRACK_MODELS, SUNO_DURATION_MODELS, SUNO_HARD_CEILING, SUNO_LEGACY_MODELS, SUNO_MODELS, SUNO_TEXT_MAX, SUNO_TITLE_MAX, SceneInputModeSchema, T2I_TO_I2I_VARIANT, TASK_CHAINED_EDIT_PROVIDERS, TEXT_TO_AUDIO_PROVIDERS, TEXT_TO_VIDEO_PROVIDERS, TRANSCRIBE_LANES, TRANSCRIBE_PROVIDERS, TRANSCRIBE_PROVIDER_CAPABILITIES, TTS_PROVIDERS, TTS_TEXT_MAX, TWO_K_RESOLUTION_PROVIDERS, UPSCALE_IMAGE_PROVIDERS, VARIABLE_PRICING_MODELS, VEO_PROVIDERS, VEO_RESOLUTION_TIERED_PROVIDERS, VIDEO_AUDIO_CAPABILITY, VIDEO_DURATION_TIERS, VIDEO_GEN_COLLAPSED_T2V_IDS, VIDEO_GEN_PROVIDERS, VIDEO_INPUT_LIP_SYNC_PROVIDERS, VIDEO_MODEL_CAPS, VIDEO_MODE_ALIASES, VIDEO_PROMPT_MAX, VIDEO_PROVIDERS_REQUIRING_IMAGE, VIDEO_PROVIDERS_WITHOUT_DISPATCH, VIDEO_REF_LIMITS_BY_PROVIDER, VIDEO_REF_VIDEO_DURATION_LIMITS, VIDEO_TO_VIDEO_NODE_PROVIDERS, VIDEO_TO_VIDEO_PROVIDERS, VIDEO_UPSCALE_PROVIDERS, VIDEO_VARIABLE_PRICING, VOICE_DESIGN_MODELS, WAN_3_DEFAULT_RESOLUTION, WAN_3_PROVIDERS, applyDefaultVideoSelection, applyVideoAudioToggle, applyVideoNegativePrompt, checkRefVideoDurations, defaultVideoAspectRatio, findSeedance2AudioOverLimit, getMaxImagePromptChars, getMaxNegativePromptChars, getMaxSunoPromptChars, getMaxSunoStyleChars, getMaxTtsChars, getMaxVideoPromptChars, getVideoAudioCapability, hasContiguousSegmentDurations, imageReferenceLimit, isGeminiOmniProvider, isGvpSupportedProvider, isLegacySunoModel, isMinimaxH3Provider, isSeedance2Provider, isSeedanceVideoEditProvider, isVeoProvider, isWan3Provider, maxSegmentSecFor, maxSegmentsFor, maxVideoDurationSec, minSegmentSecFor, modelsForInputMode, normalizeMinimaxH3Resolution, normalizeWan3Resolution, preferredInputModeForModel, pricedOutputDurationSec, resolveGvpAnchorWire, resolveMusicProvider, resolveVideoModeForInputs, resolveVideoProviderForMode, seedance2AudioLimitSec, segmentDurationsFor, snapToNearestDuration, sunoModelHonoursDuration, supportsAutoVideoDuration, supportsEndAnchor, supportsExtendRender, transcribeLaneSupportsWordTimestamps, transcribeProvidersWithWordTimestamps, videoDefaultDurationSec, videoModelCanSpeakDialogue, videoModelSupportsAudio, videoNegativeSuffix, videoProviderFoldsLoneEndFrame, videoProviderRequiresImage };
1781
+ //# sourceMappingURL=chunk-VIWSWVAW.js.map
1782
+ //# sourceMappingURL=chunk-VIWSWVAW.js.map