@nodaro/shared 3.68.0 → 3.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-5IZHECUP.js → chunk-2VOXSVIE.js} +3 -3
- package/dist/{chunk-5IZHECUP.js.map → chunk-2VOXSVIE.js.map} +1 -1
- package/dist/{chunk-OXBU5AGH.js → chunk-42ICEVUN.js} +3 -3
- package/dist/{chunk-OXBU5AGH.js.map → chunk-42ICEVUN.js.map} +1 -1
- package/dist/{chunk-EFYWV2V5.cjs → chunk-4U7QAUV3.cjs} +73 -73
- package/dist/{chunk-EFYWV2V5.cjs.map → chunk-4U7QAUV3.cjs.map} +1 -1
- package/dist/{chunk-OFQ6CU6S.js → chunk-52JNQG4K.js} +3 -3
- package/dist/{chunk-OFQ6CU6S.js.map → chunk-52JNQG4K.js.map} +1 -1
- package/dist/{chunk-PERUFUVH.cjs → chunk-5B337MCI.cjs} +15 -15
- package/dist/{chunk-PERUFUVH.cjs.map → chunk-5B337MCI.cjs.map} +1 -1
- package/dist/{chunk-66QSUUB4.cjs → chunk-5DRSENY3.cjs} +24 -24
- package/dist/{chunk-66QSUUB4.cjs.map → chunk-5DRSENY3.cjs.map} +1 -1
- package/dist/{chunk-3YWZ5SOZ.js → chunk-BIQ7COJP.js} +5 -5
- package/dist/{chunk-3YWZ5SOZ.js.map → chunk-BIQ7COJP.js.map} +1 -1
- package/dist/{chunk-4XR66IWF.cjs → chunk-BLGZW3UF.cjs} +64 -23
- package/dist/chunk-BLGZW3UF.cjs.map +1 -0
- package/dist/{chunk-KSHAAPQF.cjs → chunk-BOCHNFDU.cjs} +4 -4
- package/dist/chunk-BOCHNFDU.cjs.map +1 -0
- package/dist/{chunk-Z77M7Q2R.js → chunk-C2UHX7OF.js} +3 -3
- package/dist/{chunk-Z77M7Q2R.js.map → chunk-C2UHX7OF.js.map} +1 -1
- package/dist/{chunk-Q2LEJXLZ.cjs → chunk-C32IL6RD.cjs} +2 -2
- package/dist/{chunk-Q2LEJXLZ.cjs.map → chunk-C32IL6RD.cjs.map} +1 -1
- package/dist/{chunk-5NVGKXJV.cjs → chunk-CV2BEK52.cjs} +111 -3
- package/dist/chunk-CV2BEK52.cjs.map +1 -0
- package/dist/{chunk-G2G7XGFU.cjs → chunk-DOY47F7S.cjs} +7 -7
- package/dist/{chunk-G2G7XGFU.cjs.map → chunk-DOY47F7S.cjs.map} +1 -1
- package/dist/{chunk-5GG4CG4Y.js → chunk-EWNDK4FV.js} +3 -3
- package/dist/{chunk-5GG4CG4Y.js.map → chunk-EWNDK4FV.js.map} +1 -1
- package/dist/{chunk-T4GIHHXY.cjs → chunk-FMQ43SJP.cjs} +6 -6
- package/dist/{chunk-T4GIHHXY.cjs.map → chunk-FMQ43SJP.cjs.map} +1 -1
- package/dist/{chunk-IWUW3YPM.cjs → chunk-FWPGRC4X.cjs} +5 -5
- package/dist/{chunk-IWUW3YPM.cjs.map → chunk-FWPGRC4X.cjs.map} +1 -1
- package/dist/{chunk-37ZSFS6A.cjs → chunk-GC77W57T.cjs} +18 -18
- package/dist/{chunk-37ZSFS6A.cjs.map → chunk-GC77W57T.cjs.map} +1 -1
- package/dist/{chunk-BNR5FKL5.js → chunk-H2E4QXEZ.js} +3 -3
- package/dist/{chunk-BNR5FKL5.js.map → chunk-H2E4QXEZ.js.map} +1 -1
- package/dist/{chunk-GF7ZA26H.js → chunk-HA2PVTER.js} +5 -5
- package/dist/{chunk-GF7ZA26H.js.map → chunk-HA2PVTER.js.map} +1 -1
- package/dist/{chunk-M5QY464F.cjs → chunk-HBRDKHIW.cjs} +21 -21
- package/dist/{chunk-M5QY464F.cjs.map → chunk-HBRDKHIW.cjs.map} +1 -1
- package/dist/{chunk-E62W5I6A.cjs → chunk-HWBLZSM3.cjs} +109 -7
- package/dist/chunk-HWBLZSM3.cjs.map +1 -0
- package/dist/{chunk-5LWYX4GV.js → chunk-IKN54UGB.js} +3 -3
- package/dist/{chunk-5LWYX4GV.js.map → chunk-IKN54UGB.js.map} +1 -1
- package/dist/{chunk-UVUHVY7F.js → chunk-JCYTTTM2.js} +2 -2
- package/dist/{chunk-UVUHVY7F.js.map → chunk-JCYTTTM2.js.map} +1 -1
- package/dist/{chunk-PJAJCFLP.cjs → chunk-JEUZNHLL.cjs} +168 -44
- package/dist/chunk-JEUZNHLL.cjs.map +1 -0
- package/dist/{chunk-TAPBDT47.js → chunk-JVYDKXGY.js} +4 -4
- package/dist/{chunk-TAPBDT47.js.map → chunk-JVYDKXGY.js.map} +1 -1
- package/dist/{chunk-V6OXSXIX.js → chunk-K3YGI5IW.js} +107 -4
- package/dist/chunk-K3YGI5IW.js.map +1 -0
- package/dist/{chunk-SCDE676D.js → chunk-KKFFQUMM.js} +65 -23
- package/dist/chunk-KKFFQUMM.js.map +1 -0
- package/dist/{chunk-BHL7TAQO.js → chunk-LTBM2KMY.js} +43 -10
- package/dist/chunk-LTBM2KMY.js.map +1 -0
- package/dist/{chunk-BMDOPJBP.cjs → chunk-MZ772ZXA.cjs} +17 -17
- package/dist/{chunk-BMDOPJBP.cjs.map → chunk-MZ772ZXA.cjs.map} +1 -1
- package/dist/{chunk-SW5ZD7BO.js → chunk-NS34PZ2S.js} +3 -3
- package/dist/{chunk-SW5ZD7BO.js.map → chunk-NS34PZ2S.js.map} +1 -1
- package/dist/{chunk-6Q4BS6AR.js → chunk-NT3ZFUNJ.js} +31 -3
- package/dist/chunk-NT3ZFUNJ.js.map +1 -0
- package/dist/{chunk-VBP4DH37.js → chunk-O53P2D4V.js} +130 -15
- package/dist/chunk-O53P2D4V.js.map +1 -0
- package/dist/{chunk-AT53ZQUC.js → chunk-OW5AXH2Y.js} +51 -7
- package/dist/chunk-OW5AXH2Y.js.map +1 -0
- package/dist/{chunk-F6XIH3TZ.cjs → chunk-OZHE77T3.cjs} +9 -9
- package/dist/{chunk-F6XIH3TZ.cjs.map → chunk-OZHE77T3.cjs.map} +1 -1
- package/dist/{chunk-5J2LIQYU.js → chunk-PKWRAMVB.js} +6 -6
- package/dist/{chunk-5J2LIQYU.js.map → chunk-PKWRAMVB.js.map} +1 -1
- package/dist/{chunk-BCY3A62O.cjs → chunk-POZBRZUM.cjs} +75 -60
- package/dist/chunk-POZBRZUM.cjs.map +1 -0
- package/dist/{chunk-X2YHKP4D.cjs → chunk-PWIKUOLB.cjs} +8 -8
- package/dist/{chunk-X2YHKP4D.cjs.map → chunk-PWIKUOLB.cjs.map} +1 -1
- package/dist/{chunk-OXTF4Y3P.cjs → chunk-PYYYBINP.cjs} +6 -6
- package/dist/{chunk-OXTF4Y3P.cjs.map → chunk-PYYYBINP.cjs.map} +1 -1
- package/dist/{chunk-WZG6GZIL.cjs → chunk-QCGSL4CJ.cjs} +4 -4
- package/dist/{chunk-WZG6GZIL.cjs.map → chunk-QCGSL4CJ.cjs.map} +1 -1
- package/dist/{chunk-XEPKONJC.js → chunk-QCVQVKCI.js} +3 -3
- package/dist/{chunk-XEPKONJC.js.map → chunk-QCVQVKCI.js.map} +1 -1
- package/dist/{chunk-3L7GMQ4M.cjs → chunk-QCZYYAPZ.cjs} +54 -49
- package/dist/chunk-QCZYYAPZ.cjs.map +1 -0
- package/dist/{chunk-GNLA5NTT.cjs → chunk-QV32JI4L.cjs} +4 -4
- package/dist/{chunk-GNLA5NTT.cjs.map → chunk-QV32JI4L.cjs.map} +1 -1
- package/dist/{chunk-3QJ3UR5Z.js → chunk-QVAUBB2T.js} +11 -11
- package/dist/{chunk-3QJ3UR5Z.js.map → chunk-QVAUBB2T.js.map} +1 -1
- package/dist/{chunk-MVXZP6VB.js → chunk-R22UHRR6.js} +109 -7
- package/dist/chunk-R22UHRR6.js.map +1 -0
- package/dist/{chunk-KL6GAYTT.js → chunk-S6DXSQCV.js} +5 -3
- package/dist/chunk-S6DXSQCV.js.map +1 -0
- package/dist/{chunk-V24EPI5N.cjs → chunk-U4DIGIC3.cjs} +5 -3
- package/dist/chunk-U4DIGIC3.cjs.map +1 -0
- package/dist/{chunk-H5KHWTAE.js → chunk-UY6QZX7H.js} +4 -4
- package/dist/chunk-UY6QZX7H.js.map +1 -0
- package/dist/{chunk-XNJDAW3M.js → chunk-V6TC2NDG.js} +31 -17
- package/dist/chunk-V6TC2NDG.js.map +1 -0
- package/dist/{chunk-DBD4BCGH.cjs → chunk-VDFQKLDG.cjs} +33 -2
- package/dist/chunk-VDFQKLDG.cjs.map +1 -0
- package/dist/{chunk-PGDR7CO3.cjs → chunk-WHV7MDNC.cjs} +70 -11
- package/dist/chunk-WHV7MDNC.cjs.map +1 -0
- package/dist/{chunk-HTDKEYMY.cjs → chunk-XBHDXURR.cjs} +139 -91
- package/dist/chunk-XBHDXURR.cjs.map +1 -0
- package/dist/{chunk-PAUWEWTY.js → chunk-YLDY23N2.js} +12 -7
- package/dist/chunk-YLDY23N2.js.map +1 -0
- package/dist/entries/apps.cjs +43 -43
- package/dist/entries/apps.js +8 -8
- package/dist/entries/credits.cjs +282 -226
- package/dist/entries/credits.d.cts +167 -66
- package/dist/entries/credits.d.ts +167 -66
- package/dist/entries/credits.js +11 -11
- package/dist/entries/llm-models.cjs +88 -68
- package/dist/entries/llm-models.d.cts +73 -6
- package/dist/entries/llm-models.d.ts +73 -6
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/media.cjs +87 -87
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +133 -133
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +458 -406
- package/dist/entries/models.d.cts +64 -29
- package/dist/entries/models.d.ts +64 -29
- package/dist/entries/models.js +7 -7
- package/dist/entries/nodes.cjs +215 -215
- package/dist/entries/nodes.js +11 -11
- package/dist/entries/pipeline.cjs +153 -153
- package/dist/entries/pipeline.d.cts +1 -1
- package/dist/entries/pipeline.d.ts +1 -1
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +237 -177
- package/dist/entries/social.d.cts +183 -6
- package/dist/entries/social.d.ts +183 -6
- package/dist/entries/social.js +2 -2
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +153 -153
- package/dist/entries/video.d.cts +2 -1
- package/dist/entries/video.d.ts +2 -1
- package/dist/entries/video.js +7 -7
- package/dist/entries/workflow.cjs +152 -152
- package/dist/entries/workflow.js +4 -4
- package/dist/index.cjs +2034 -1846
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +26 -26
- package/dist/{model-constants-DZ3tPGFO.d.ts → model-constants-B5DNHIP8.d.ts} +156 -12
- package/dist/{model-constants-BstsUup6.d.cts → model-constants-CQr_d3Kw.d.cts} +156 -12
- package/package.json +1 -1
- package/src/__tests__/cast-swap-limits.test.ts +54 -20
- package/src/__tests__/competitors.test.ts +64 -0
- package/src/__tests__/extend-providers.test.ts +43 -6
- package/src/__tests__/fixtures/measured-input-quote-parity.json +537 -1
- package/src/__tests__/fixtures/planned-length-quote-parity.json +46 -1
- package/src/__tests__/fixtures/probed-node-quote-parity.json +132 -0
- package/src/__tests__/fixtures/video-utility-quote-parity.json +112 -1
- package/src/__tests__/gemini-omni-extend.test.ts +110 -0
- package/src/__tests__/gvp-supported-providers.test.ts +3 -0
- package/src/__tests__/lip-sync-pricing.test.ts +29 -2
- package/src/__tests__/llm-models.test.ts +163 -6
- package/src/__tests__/llm-price-key.test.ts +2 -0
- package/src/__tests__/seedance-2-5-flash-catalog.test.ts +194 -0
- package/src/__tests__/suno-separate.test.ts +32 -0
- package/src/__tests__/video-character-refs.test.ts +48 -0
- package/src/cast-swap-limits.ts +43 -25
- package/src/competitors.ts +80 -8
- package/src/credit-identifiers.ts +51 -32
- package/src/entries/credits.ts +19 -0
- package/src/entries/llm-models.ts +6 -0
- package/src/entries/models.ts +15 -0
- package/src/entries/social.ts +33 -0
- package/src/gemini-omni-extend-quote.ts +76 -0
- package/src/generated/unit-contracts.ts +1 -0
- package/src/lip-sync-pricing.ts +26 -1
- package/src/llm-models.ts +176 -5
- package/src/model-catalog.ts +107 -5
- package/src/model-constants.ts +274 -11
- package/src/node-default-mappings.ts +2 -0
- package/src/node-runtime-keys.ts +2 -2
- package/src/seedance-extend-rate.ts +83 -20
- package/src/seedance-lip-sync.ts +68 -0
- package/src/suno-separate.ts +51 -0
- package/src/topics.ts +162 -0
- package/src/video-character-refs.ts +26 -6
- package/src/video-face-mesh.ts +1 -1
- package/dist/chunk-3L7GMQ4M.cjs.map +0 -1
- package/dist/chunk-4XR66IWF.cjs.map +0 -1
- package/dist/chunk-5NVGKXJV.cjs.map +0 -1
- package/dist/chunk-6Q4BS6AR.js.map +0 -1
- package/dist/chunk-AT53ZQUC.js.map +0 -1
- package/dist/chunk-BCY3A62O.cjs.map +0 -1
- package/dist/chunk-BHL7TAQO.js.map +0 -1
- package/dist/chunk-DBD4BCGH.cjs.map +0 -1
- package/dist/chunk-E62W5I6A.cjs.map +0 -1
- package/dist/chunk-H5KHWTAE.js.map +0 -1
- package/dist/chunk-HTDKEYMY.cjs.map +0 -1
- package/dist/chunk-KL6GAYTT.js.map +0 -1
- package/dist/chunk-KSHAAPQF.cjs.map +0 -1
- package/dist/chunk-MVXZP6VB.js.map +0 -1
- package/dist/chunk-PAUWEWTY.js.map +0 -1
- package/dist/chunk-PGDR7CO3.cjs.map +0 -1
- package/dist/chunk-PJAJCFLP.cjs.map +0 -1
- package/dist/chunk-SCDE676D.js.map +0 -1
- package/dist/chunk-V24EPI5N.cjs.map +0 -1
- package/dist/chunk-V6OXSXIX.js.map +0 -1
- package/dist/chunk-VBP4DH37.js.map +0 -1
- package/dist/chunk-XNJDAW3M.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isGptImage26Tiered, isGptImage26I2i, GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES } from './chunk-RGNHHIMN.js';
|
|
2
|
-
import { isMinimaxH3Image, isSeedream55, isMinimaxH3ImageI2i, isSeedream55I2i, isFlux3Klein, getModel } from './chunk-
|
|
2
|
+
import { isMinimaxH3Image, isSeedream55, isMinimaxH3ImageI2i, isSeedream55I2i, isFlux3Klein, getModel } from './chunk-R22UHRR6.js';
|
|
3
3
|
|
|
4
4
|
// src/input-image-pricing.ts
|
|
5
5
|
function isPricedPerInputImage(model) {
|
|
@@ -41,5 +41,5 @@ function safetyRetryPolicy(modelId) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export { isPricedPerInputImage, isPricedPerInputImageEdit, priceReadsInputImages, pricedEstimatedImages, pricedSentImages, safetyRetryPolicy };
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-2VOXSVIE.js.map
|
|
45
|
+
//# sourceMappingURL=chunk-2VOXSVIE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input-image-pricing.ts","../src/safety-retry-policy.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,sBAAsB,KAAA,EAAyB;AAC7D,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,KAAa,kBAAA,CAAmB,KAAK,KAAK,gBAAA,CAAiB,KAAK,CAAA,IAAK,YAAA,CAAa,KAAK,CAAA,CAAA;AACjH;AAGO,SAAS,0BAA0B,KAAA,EAAyB;AACjE,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,KAAa,eAAA,CAAgB,KAAK,KAAK,mBAAA,CAAoB,KAAK,CAAA,IAAK,eAAA,CAAgB,KAAK,CAAA,CAAA;AACpH;AAWO,SAAS,sBAAsB,KAAA,EAAyB;AAC7D,EAAA,OAAO,qBAAA,CAAsB,KAAK,CAAA,IAAK,YAAA,CAAa,KAAK,CAAA;AAC3D;AASO,SAAS,gBAAA,CACd,QAAA,EACA,UAAA,EACA,YAAA,EACQ;AACR,EAAA,MAAM,UAAA,GACJ,qBAAA,CAAsB,QAAQ,CAAA,IAC9B,OAAO,YAAA,KAAiB,QAAA,IACxB,YAAA,CAAa,MAAA,GAAS,CAAA,IACtB,CAAC,UAA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AE,aAAa,CAAA,EAAE;AAEvD,EAAA,MAAM,WAAW,YAAA,CAAa,QAAA;AAC9B,EAAA,IAAI,QAAA,IAAY,QAAA,CAAS,QAAQ,CAAA,EAAG;AAClC,IAAA,OAAO,EAAE,WAAA,EAAa,CAAA,EAAG,QAAA,EAAS;AAAA,EACpC;AACA,EAAA,OAAO,EAAE,aAAa,CAAA,EAAE;AAC1B","file":"chunk-2VOXSVIE.js","sourcesContent":["/**\n * The image models whose price depends on how many input images a run sends:\n * GPT Image 2.6 Flare and Sunburst, MiniMax H3 Image and Seedream 5.5. Every place that\n * prices a run counts those images through here, so a model that joins\n * `isPricedPerInputImage` is counted on every path at once. FLUX 3 Klein is\n * counted the same way (`priceReadsInputImages`): its price does not move with\n * the images, but whether any go decides the id it runs, and is priced, on.\n */\nimport {\n GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES,\n isGptImage26I2i,\n isGptImage26Tiered,\n} from \"./gpt-image-2-6.js\"\nimport { isMinimaxH3Image, isMinimaxH3ImageI2i } from \"./minimax-h3-image.js\"\nimport { isSeedream55, isSeedream55I2i } from \"./seedream-5-5.js\"\nimport { isFlux3Klein } from \"./flux-3-klein.js\"\n\n/** True for a model whose price counts the input images a run sends. */\nexport function isPricedPerInputImage(model: unknown): boolean {\n return typeof model === \"string\" && (isGptImage26Tiered(model) || isMinimaxH3Image(model) || isSeedream55(model))\n}\n\n/** True for the edit id of such a model: it always sends at least its source. */\nexport function isPricedPerInputImageEdit(model: unknown): boolean {\n return typeof model === \"string\" && (isGptImage26I2i(model) || isMinimaxH3ImageI2i(model) || isSeedream55I2i(model))\n}\n\n/**\n * True for a model whose price id reads the input images a run sends: one\n * priced per input image ({@link isPricedPerInputImage}), or FLUX 3 Klein, which\n * runs on its edit id whenever an image goes (its text-to-image endpoint takes\n * none) and is priced on that id, at the same price. Every place that prices a\n * run counts the images through {@link pricedSentImages} and\n * {@link pricedEstimatedImages} for such a model, so the id priced is the id\n * the provider runs.\n */\nexport function priceReadsInputImages(model: unknown): boolean {\n return isPricedPerInputImage(model) || isFlux3Klein(model)\n}\n\n/**\n * The images a Generate Image run sends its provider: its references and, when\n * it edits a base image, that image too (the worker puts it first, unless it is\n * already one of the references). The base is counted only on a model whose\n * price reads the images ({@link priceReadsInputImages}); any other model is\n * priced, and held to its image limit, on its references alone, as before.\n */\nexport function pricedSentImages(\n provider: string | undefined,\n references: readonly string[],\n baseImageUrl: unknown,\n): number {\n const countsBase =\n priceReadsInputImages(provider) &&\n typeof baseImageUrl === \"string\" &&\n baseImageUrl.length > 0 &&\n !references.includes(baseImageUrl)\n return references.length + (countsBase ? 1 : 0)\n}\n\nfunction namesMoodboard(direction: unknown): boolean {\n if (direction === null || typeof direction !== \"object\") return false\n const style = (direction as Record<string, unknown>).style\n return (Array.isArray(style) ? style : [style]).some(\n (value) => typeof value === \"string\" && value.startsWith(\"moodboard:\"),\n )\n}\n\n/**\n * The input images a workflow estimate counts for one node on a model whose\n * price reads them ({@link priceReadsInputImages}): every list on the node, its source or base image, what is\n * wired in, a moodboard its direction names (at the most a moodboard holds),\n * and an edit model's own source. An estimate may over-quote, never under.\n */\nexport function pricedEstimatedImages(\n model: string,\n data: Record<string, unknown>,\n wiredImages: number,\n): number {\n const listed = (v: unknown) => (Array.isArray(v) ? v.length : 0)\n const single = (v: unknown) => (typeof v === \"string\" && v.length > 0 ? 1 : 0)\n return (\n listed(data.referenceImageUrls) +\n listed(data.characterDefinitionIds) +\n listed(data.extraRefs) +\n single(data.referenceImageUrl) +\n single(data.baseImageUrl) +\n single(data.sourceImageUrl) +\n wiredImages +\n (namesMoodboard(data.direction) ? GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES : 0) +\n (isPricedPerInputImageEdit(model) ? 1 : 0)\n )\n}\n","import { getModel } from \"./model-catalog.js\"\n\n/**\n * Retry/fallback behavior derived from a catalog entry's `safetyFilter`\n * flag (see `ModelCatalogEntry.safetyFilter` in `model-catalog.ts`).\n */\nexport interface SafetyRetryPolicy {\n /** 2 when the model declares `safetyFilter.stochastic`, else 1. */\n maxAttempts: 1 | 2\n /**\n * Catalog model id to offer when the retry also blocks. Only present\n * when the entry declares one AND it resolves to a real catalog entry.\n */\n fallback?: string\n}\n\n/**\n * The provider's safety filter is known to be non-deterministic on some\n * catalog models — a benign prompt can trip it once and pass on an\n * identical retry. For those models the platform retries a blocked\n * request once (`maxAttempts: 2`) before giving up; `fallback` names the\n * catalog model to offer the user when the retry also blocks.\n *\n * Every model not flagged this way — including an unrecognized id —\n * gets a single attempt and no fallback.\n */\nexport function safetyRetryPolicy(modelId: string): SafetyRetryPolicy {\n const entry = getModel(modelId)\n const safetyFilter = entry?.safetyFilter\n if (!safetyFilter?.stochastic) return { maxAttempts: 1 }\n\n const fallback = safetyFilter.fallback\n if (fallback && getModel(fallback)) {\n return { maxAttempts: 2, fallback }\n }\n return { maxAttempts: 2 }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UGC_NEWER_APP_MESSAGE, ugcPlanLengthSec, UGC_SCRIPT_LANGUAGES, ugcPlanScreenshotCount, UGC_OVER_HOLD_MESSAGE, UGC_FINISH_NEEDS_CLIPS_MESSAGE, readUgcWire, UGC_NODE_MESSAGES, UGC_FINISH_NOT_READY_MESSAGE, UGC_NEEDS_FINISH_MESSAGE } from './chunk-
|
|
1
|
+
import { UGC_NEWER_APP_MESSAGE, ugcPlanLengthSec, UGC_SCRIPT_LANGUAGES, ugcPlanScreenshotCount, UGC_OVER_HOLD_MESSAGE, UGC_FINISH_NEEDS_CLIPS_MESSAGE, readUgcWire, UGC_NODE_MESSAGES, UGC_FINISH_NOT_READY_MESSAGE, UGC_NEEDS_FINISH_MESSAGE } from './chunk-52JNQG4K.js';
|
|
2
2
|
|
|
3
3
|
// src/ugc-call-body.ts
|
|
4
4
|
var pick = (a, from, to) => a[from] !== void 0 && a[from] !== null ? { [to]: a[from] } : {};
|
|
@@ -177,5 +177,5 @@ function ugcLaneNeedsFinish(edges, nodes, clipsId) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
export { UGC_FINISH_CLIPS_TYPE, UGC_PRELUDE_ROUTES, UGC_PRELUDE_STEPS, ugcCallToRouteBody, ugcClipsPhase, ugcClipsPhase2Body, ugcFinishOutputs, ugcFinishPlan, ugcFinishWired, ugcLaneNeedsFinish, ugcPrelude, ugcPreludeOutput, ugcRenderHoldBody, ugcRenderHoldVerdict, ugcRunEstimateInput };
|
|
180
|
-
//# sourceMappingURL=chunk-
|
|
181
|
-
//# sourceMappingURL=chunk-
|
|
180
|
+
//# sourceMappingURL=chunk-42ICEVUN.js.map
|
|
181
|
+
//# sourceMappingURL=chunk-42ICEVUN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ugc-call-body.ts","../src/ugc-lane-wires.ts"],"names":["pick"],"mappings":";;;AAkBA,IAAM,IAAA,GAAO,CAAC,CAAA,EAAsC,IAAA,EAAc,OAChE,CAAA,CAAE,IAAI,MAAM,MAAA,IAAa,CAAA,CAAE,IAAI,CAAA,KAAM,IAAA,GAAO,EAAE,CAAC,EAAE,GAAG,CAAA,CAAE,IAAI,CAAA,EAAE,GAAI,EAAC;AAGnE,SAAS,UAAU,CAAA,EAA+D;AAChF,EAAA,OAAO;AAAA,IACL,GAAG,IAAA,CAAK,CAAA,EAAG,UAAA,EAAY,UAAU,CAAA;AAAA,IACjC,GAAG,IAAA,CAAK,CAAA,EAAG,kBAAA,EAAoB,iBAAiB,CAAA;AAAA,IAChD,GAAI,EAAE,aAAA,KAAkB,IAAA,GAAO,EAAE,YAAA,EAAc,IAAA,KAAS,EAAC;AAAA,IACzD,GAAG,IAAA,CAAK,CAAA,EAAG,aAAA,EAAe,aAAa,CAAA;AAAA,IACvC,GAAG,IAAA,CAAK,CAAA,EAAG,YAAA,EAAc,WAAW;AAAA,GACtC;AACF;AAEO,SAAS,kBAAA,CACd,IAAA,EACA,IAAA,GAAoC,EAAC,EACkB;AACvD,EAAA,MAAM,I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CAAA;AAC1K;AAGO,SAAS,kBAAA,CACd,KAAA,EACA,KAAA,EACA,OAAA,EACe;AACf,EAAA,OAAO,cAAA,CAAe,KAAA,EAAO,KAAA,EAAO,OAAO,IAAI,IAAA,GAAO,wBAAA;AACxD","file":"chunk-OXBU5AGH.js","sourcesContent":["/**\n * A UGC builder call `{ tool, args }` (MCP argument names) → the REST body of\n * the public route that tool dispatches to. The builder sets every price lever;\n * this adds none — its one addition is the image of a call that needs the\n * previous step's image (`imageArg`, or the photo of `image_to_text`). A tool\n * it does not know → undefined, so an app older than the builder fails plainly\n * instead of guessing. Kept equal to the MCP verbs by ugc-call-body-parity.test.ts.\n */\nexport interface UgcToolCall {\n readonly tool: string\n readonly args: Readonly<Record<string, unknown>>\n readonly imageArg?: string\n}\nexport type UgcRouteBody = {\n readonly path: \"/v1/generate-image\" | \"/v1/image-to-image\" | \"/v1/image-to-text/describe\"\n readonly body: Record<string, unknown>\n}\n\nconst pick = (a: Readonly<Record<string, unknown>>, from: string, to: string): Record<string, unknown> =>\n a[from] !== undefined && a[from] !== null ? { [to]: a[from] } : {}\n\n/** The LLM levers image_to_text forwards (the verb's llmPayloadFields). */\nfunction llmFields(a: Readonly<Record<string, unknown>>): Record<string, unknown> {\n return {\n ...pick(a, \"llmModel\", \"llmModel\"),\n ...pick(a, \"reasoning_effort\", \"reasoningEffort\"),\n ...(a.advanced_mode === true ? { advancedMode: true } : {}),\n ...pick(a, \"temperature\", \"temperature\"),\n ...pick(a, \"max_tokens\", \"maxTokens\"),\n }\n}\n\nexport function ugcCallToRouteBody(\n call: UgcToolCall,\n opts: { readonly image?: string } = {},\n): UgcRouteBody | { readonly error: string } | undefined {\n const args: Record<string, unknown> = { ...call.args }\n if (call.imageArg) {\n if (!opts.image) return { error: `${call.tool} needs the previous step's image` }\n args[call.imageArg] = opts.image\n }\n switch (call.tool) {\n case \"generate_image\":\n return {\n path: \"/v1/generate-image\",\n body: {\n ...pick(args, \"prompt\", \"prompt\"),\n ...pick(args, \"model\", \"provider\"),\n ...pick(args, \"aspect_ratio\", \"aspectRatio\"),\n ...pick(args, \"resolution\", \"resolution\"),\n ...pick(args, \"quality\", \"quality\"),\n ...pick(args, \"negative_prompt\", \"negativePrompt\"),\n },\n }\n case \"image_to_image\":\n return {\n path: \"/v1/image-to-image\",\n body: {\n ...pick(args, \"image_url\", \"imageUrl\"),\n ...pick(args, \"prompt\", \"prompt\"),\n ...pick(args, \"model\", \"provider\"),\n ...pick(args, \"resolution\", \"resolution\"),\n ...pick(args, \"quality\", \"quality\"),\n ...pick(args, \"strength\", \"strength\"),\n ...pick(args, \"aspect_ratio\", \"aspectRatio\"),\n ...pick(args, \"negative_prompt\", \"negativePrompt\"),\n ...pick(args, \"seed\", \"seed\"),\n },\n }\n case \"image_to_text\": {\n const image = opts.image ?? (typeof args.image_url === \"string\" ? args.image_url : undefined)\n if (!image) return { error: \"image_to_text needs an image\" }\n return {\n path: \"/v1/image-to-text/describe\",\n body: {\n imageUrl: image,\n ...pick(args, \"detail_level\", \"detailLevel\"),\n ...pick(args, \"custom_prompt\", \"customPrompt\"),\n ...llmFields(args),\n },\n }\n }\n default:\n return undefined\n }\n}\n","/**\n * The UGC wires of a language whose clips are cut from one recorded speech (the\n * segmented lane): UGC Clips' prelude (record the speech, time its words, split\n * it at its pauses, then ask for the clips again with the segments) and UGC\n * Finish (lay the speech back over the rendered clips and trim the dead air,\n * as one job over all of them). One pure implementation both engines call, as\n * the rest of the UGC wires (`ugc-node-wires.ts`).\n *\n * Content-free: an answer is read only for `phase`, its three calls' `tool`\n * and `args` (argument names, never their meaning), the `finish` call's\n * `args`, and a finished job's clip list. Which language takes this lane, which\n * voice speaks and what the calls say are the builder's.\n */\nimport {\n UGC_FINISH_NEEDS_CLIPS_MESSAGE,\n UGC_FINISH_NOT_READY_MESSAGE,\n UGC_NEEDS_FINISH_MESSAGE,\n UGC_NEWER_APP_MESSAGE,\n UGC_NODE_MESSAGES,\n UGC_OVER_HOLD_MESSAGE,\n UGC_SCRIPT_LANGUAGES,\n readUgcWire,\n ugcPlanLengthSec,\n ugcPlanScreenshotCount,\n} from \"./ugc-node-wires.js\"\nimport type { FanOutItemMeta } from \"./fan-out-meta.js\"\n\ntype Obj = Record<string, unknown>\nconst isObject = (x: unknown): x is Obj => !!x && typeof x === \"object\" && !Array.isArray(x)\n\n/** UGC Finish's node type. Not the plugin job it runs (`ugc-finish`): a price, a dispatch or a reconcile keyed on a type never confuses the two. */\nexport const UGC_FINISH_CLIPS_TYPE = \"ugc-finish-clips\"\n\n/** The child steps of UGC Clips' prelude, in run order: each is a job of its own, keyed by its step. */\nexport const UGC_PRELUDE_STEPS = [\"speech\", \"alignment\", \"split\"] as const\nexport type UgcPreludeStep = (typeof UGC_PRELUDE_STEPS)[number]\n\n/** The public route each prelude step runs on, and the node type its job is read as. */\nexport const UGC_PRELUDE_ROUTES: Readonly<Record<UgcPreludeStep, { readonly path: string; readonly jobType: string }>> = {\n speech: { path: \"/v1/text-to-speech\", jobType: \"text-to-speech\" },\n alignment: { path: \"/v1/forced-alignment\", jobType: \"forced-alignment\" },\n split: { path: \"/v1/ugc/segments\", jobType: \"ugc-segments\" },\n}\n\n/** The `/v1/ugc/clips` answer's phase: 1 = the prelude must run first, 2 = the clips; null = an answer with no phase (one call, as English). */\nexport function ugcClipsPhase(answer: Readonly<Obj>): 1 | 2 | null {\n return answer.phase === 1 ? 1 : answer.phase === 2 ? 2 : null\n}\n\nconst callOf = (raw: unknown, tool: string): Obj | undefined => {\n if (!isObject(raw) || raw.tool !== tool || !isObject(raw.args)) return undefined\n return raw.args\n}\nconst pick = (a: Readonly<Obj>, from: string, to: string): Obj => (a[from] !== undefined && a[from] !== null ? { [to]: a[from] } : {})\n\n/** What the prelude runs: the speech's route body, and the two that need the step before them. */\nexport interface UgcPrelude {\n readonly speech: Obj\n readonly alignment: (audioUrl: string) => Obj\n readonly split: (audioUrl: string, alignment: unknown) => Obj\n}\n\n/**\n * A phase-1 answer's three calls (`speech`, `align`, `split`, MCP argument names) → the REST bodies of\n * the public routes their MCP tools dispatch to: `generate_speech` → `/v1/text-to-speech` (text, voice,\n * voice type, model as provider, language code, as the verb maps them), `forced_alignment` →\n * `/v1/forced-alignment` (the transcript, with the speech's audio), `ugc_split_speech` →\n * `/v1/ugc/segments` (the plan, with the speech's audio and its word timings). A call that is missing\n * or names another tool → the newer-app sentence: the app never guesses.\n */\nexport function ugcPrelude(answer: Readonly<Obj>): UgcPrelude | { readonly error: string } {\n const speech = callOf(answer.speech, \"generate_speech\")\n const align = callOf(answer.align, \"forced_alignment\")\n const split = callOf(answer.split, \"ugc_split_speech\")\n if (!speech || !align || !split || typeof speech.text !== \"string\" || !isObject(split.plan)) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n speech: {\n text: speech.text,\n ...pick(speech, \"voice_id\", \"voice\"),\n ...pick(speech, \"voice_type\", \"voiceType\"),\n ...pick(speech, \"model\", \"provider\"),\n ...pick(speech, \"language_code\", \"languageCode\"),\n },\n alignment: (audioUrl) => ({ ...pick(align, \"transcript\", \"transcript\"), audioUrl }),\n split: (audioUrl, alignment) => ({ plan: split.plan, audioUrl, alignment }),\n }\n}\n\n/** The finished speech job's audio, its word timings and its segments, as their jobs write them. */\nexport function ugcPreludeOutput(step: UgcPreludeStep, output: Readonly<Obj> | undefined): { value: unknown } | { error: string } {\n const value = step === \"speech\" ? output?.audioUrl : step === \"alignment\" ? output?.alignment : output?.segments\n const ok = step === \"speech\" ? typeof value === \"string\" && value !== \"\" : Array.isArray(value) && value.length > 0\n return ok ? { value } : { error: UGC_NEWER_APP_MESSAGE }\n}\n\n/** The second `/v1/ugc/clips` call: the first call's body with the segments the split returned. */\nexport function ugcClipsPhase2Body(body: Readonly<Obj>, segments: readonly unknown[]): Obj {\n return { ...body, segments: [...segments] }\n}\n\n// ── The hold check once the speech is split ──────────────────────────────────\n\n/** The estimate input of a video cut from one recorded speech, as the hold check names it (`runEstimate`). */\nexport interface UgcRunEstimateInput {\n readonly targetDurationSec: number\n readonly screenshotCount: number\n readonly source: \"sampled\"\n readonly language: string\n}\n\n/**\n * The estimate input of the video a UGC Clips run belongs to, read from the plan the node was sent: its\n * length, its screenshot cards and its language — the reading a kept plan is priced with. Read on a\n * phase-1 answer, before the prelude spends anything, so a plan the check cannot read refuses the run\n * while nothing is paid. The creator's source prices no clip, so it is not read. A plan without a length,\n * or without a language this lane takes → the newer-app sentence: the check never guesses.\n */\nexport function ugcRunEstimateInput(plan: unknown): { runEstimate: UgcRunEstimateInput } | { error: string } {\n const targetDurationSec = ugcPlanLengthSec(plan)\n const language = planOf(plan)?.language\n if (targetDurationSec === undefined || typeof language !== \"string\" || language === \"en\" || !(UGC_SCRIPT_LANGUAGES as readonly unknown[]).includes(language)) {\n return { error: UGC_NEWER_APP_MESSAGE }\n }\n return { runEstimate: { targetDurationSec, screenshotCount: ugcPlanScreenshotCount(plan) ?? 0, source: \"sampled\", language } }\n}\n\n/**\n * The quote that checks a video cut from one recorded speech before any of its clips renders: the clips\n * the second `/v1/ugc/clips` call handed on, priced as the UGC Clips quote prices them (`tickets`,\n * `hasCards`, `finishes`), with `runEstimate` (`ugcRunEstimateInput`). The route then also answers\n * `runHold`, the most the video's estimate holds for the clips and the steps after them, which the run's\n * balance was checked against before it started (`ugcRenderHoldVerdict`). No clips → the newer-app sentence.\n */\nexport function ugcRenderHoldBody(input: { runEstimate: UgcRunEstimateInput; tickets: unknown; hasCards: boolean; finishes: boolean }): { path: \"/v1/ugc/quote\"; body: Obj } | { error: string } {\n if (!Array.isArray(input.tickets) || input.tickets.length === 0) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n path: \"/v1/ugc/quote\",\n body: {\n tickets: [...input.tickets],\n hasCards: input.hasCards,\n ...(input.finishes ? { finishes: true } : {}),\n runEstimate: { ...input.runEstimate },\n },\n }\n}\n\n/** A plan, or its wire (a JSON string), as an object; undefined for anything else. */\nfunction planOf(plan: unknown): Obj | undefined {\n if (typeof plan !== \"string\") return isObject(plan) ? plan : undefined\n try {\n const parsed: unknown = JSON.parse(plan)\n return isObject(parsed) ? parsed : undefined\n } catch {\n return undefined\n }\n}\n\nconst isCredits = (x: unknown): x is number => typeof x === \"number\" && Number.isFinite(x) && x >= 0\n\n/**\n * The hold check's answer → go on, or stop before any clip renders: the clips and the steps after them\n * (`ceiling`, each clip at its hold) over what the run was checked for (`runHold`) → the over-hold\n * sentence. An answer without both figures stops too (the newer-app sentence): a clip never renders\n * on a figure nobody checked.\n */\nexport function ugcRenderHoldVerdict(answer: unknown): { readonly ok: true } | { readonly error: string } {\n if (!isObject(answer) || !isCredits(answer.ceiling) || !isCredits(answer.runHold)) return { error: UGC_NEWER_APP_MESSAGE }\n return answer.ceiling > answer.runHold ? { error: UGC_OVER_HOLD_MESSAGE } : { ok: true }\n}\n\n// ── UGC Finish ───────────────────────────────────────────────────────────────\n\n/** What UGC Finish does with the clips it was handed. */\nexport type UgcFinishPlan =\n /** No finish call on the plan (English): the clips go on as they came, no call, no job. */\n | { readonly kind: \"pass\"; readonly clips: readonly string[] }\n /** The finish job's body: the segments with their room, one roll per clip, in order. */\n | { readonly kind: \"job\"; readonly path: \"/v1/ugc/finish\"; readonly body: Obj }\n\n/**\n * UGC Finish's input → what it does. The `plan` input is UGC Clips' Script (sized) output; a plan\n * carrying `finish` (the segmented lane) asks for the finish job over the clips, in order; any other\n * plan passes the clips through. Clips are the fan-in list (`inputs.inputs`), in clip order.\n */\nexport function ugcFinishPlan(input: { planOutWire: unknown; clipUrls: readonly unknown[] }): UgcFinishPlan | { readonly error: string } {\n const clips = input.clipUrls.filter((u): u is string => typeof u === \"string\" && u !== \"\")\n if (clips.length === 0) return { error: UGC_FINISH_NEEDS_CLIPS_MESSAGE }\n const read = readUgcWire(input.planOutWire, UGC_NODE_MESSAGES.needsPlanOut)\n if (\"error\" in read) return read\n const finish = read.value.finish\n if (finish === undefined) return { kind: \"pass\", clips }\n if (!isObject(finish) || !Array.isArray(finish.segments) || finish.segments.length === 0) return { error: UGC_NEWER_APP_MESSAGE }\n if (finish.segments.length !== clips.length) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n kind: \"job\",\n path: \"/v1/ugc/finish\",\n body: { segments: finish.segments, clips: clips.map((url, i) => ({ clip: i + 1, rolls: [url] })) },\n }\n}\n\n/** A finished clip, as UGC Finish hands it on: its URL and the notes its downstream nodes read. */\nexport interface UgcFinishedClip { readonly url: string; readonly meta: FanOutItemMeta }\n\n/**\n * A finished `ugc-finish` job → the finished clips in clip order, each with its real length. `ready: false`\n * (a clip that does not follow its speech) → the not-ready sentence: the node fails, never hands on a\n * partial list. A dry finish's warning rides every clip's notes.\n */\nexport function ugcFinishOutputs(output: Readonly<Obj> | undefined): { clips: UgcFinishedClip[] } | { error: string } {\n if (!output) return { error: UGC_NEWER_APP_MESSAGE }\n if (output.ready === false) return { error: UGC_FINISH_NOT_READY_MESSAGE }\n if (output.ready !== true || !Array.isArray(output.clips) || output.clips.length === 0) return { error: UGC_NEWER_APP_MESSAGE }\n const warnings = Array.isArray(output.warnings)\n ? output.warnings.flatMap((w) => (isObject(w) && typeof w.code === \"string\" ? [w.code] : typeof w === \"string\" ? [w] : []))\n : []\n const rows = [...output.clips].filter(isObject).sort((a, b) => Number(a.clip) - Number(b.clip))\n if (rows.length !== output.clips.length || rows.some((r, i) => r.clip !== i + 1 || typeof r.url !== \"string\" || r.url === \"\")) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n clips: rows.map((r) => ({\n url: r.url as string,\n meta: { warnings, durationSec: typeof r.sec === \"number\" && Number.isFinite(r.sec) && r.sec > 0 ? r.sec : null },\n })),\n }\n}\n\n/**\n * Whether a UGC Finish reads this UGC Clips node's Script (sized) output: the graph can finish a video\n * whose clips are cut from one recorded speech. Read before the prelude spends anything.\n */\nexport function ugcFinishWired(\n edges: ReadonlyArray<{ readonly source?: string; readonly target?: string; readonly sourceHandle?: string | null; readonly targetHandle?: string | null }>,\n nodes: ReadonlyArray<{ readonly id?: string; readonly type?: string | null }>,\n clipsId: string,\n): boolean {\n const finishIds = new Set(nodes.filter((n) => n.type === UGC_FINISH_CLIPS_TYPE && typeof n.id === \"string\").map((n) => n.id as string))\n return edges.some((e) => e.source === clipsId && e.sourceHandle === \"plan-out\" && e.target !== undefined && finishIds.has(e.target) && (e.targetHandle ?? \"\") === \"plan\")\n}\n\n/** UGC Clips' refusal before its prelude: the sentence when no UGC Finish reads its Script (sized) output, else null. */\nexport function ugcLaneNeedsFinish(\n edges: Parameters<typeof ugcFinishWired>[0],\n nodes: Parameters<typeof ugcFinishWired>[1],\n clipsId: string,\n): string | null {\n return ugcFinishWired(edges, nodes, clipsId) ? null : UGC_NEEDS_FINISH_MESSAGE\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/ugc-call-body.ts","../src/ugc-lane-wires.ts"],"names":["pick"],"mappings":";;;AAkBA,IAAM,IAAA,GAAO,CAAC,CAAA,EAAsC,IAAA,EAAc,OAChE,CAAA,CAAE,IAAI,MAAM,MAAA,IAAa,CAAA,CAAE,IAAI,CAAA,KAAM,IAAA,GAAO,EAAE,CAAC,EAAE,GAAG,CAAA,CAAE,IAAI,CAAA,EAAE,GAAI,EAAC;AAGnE,SAAS,UAAU,CAAA,EAA+D;AAChF,EAAA,OAAO;AAAA,IACL,GAAG,IAAA,CAAK,CAAA,EAAG,UAAA,EAAY,UAAU,CAAA;AAAA,IACjC,GAAG,IAAA,CAAK,CAAA,EAAG,kBAAA,EAAoB,iBAAiB,CAAA;AAAA,IAChD,GAAI,EAAE,aAAA,KAAkB,IAAA,GAAO,EAAE,YAAA,EAAc,IAAA,KAAS,EAAC;AAAA,IACzD,GAAG,IAAA,CAAK,CAAA,EAAG,aAAA,EAAe,aAAa,CAAA;AAAA,IACvC,GAAG,IAAA,CAAK,CAAA,EAAG,YAAA,EAAc,WAAW;AAAA,GACtC;AACF;AAEO,SAAS,kBAAA,CACd,IAAA,EACA,IAAA,GAAoC,EAAC,EACkB;AACvD,EAAA,MAAM,IAAA,GAAgC,EAAE,GAAG,I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kBAAA,CACd,KAAA,EACA,KAAA,EACA,OAAA,EACe;AACf,EAAA,OAAO,cAAA,CAAe,KAAA,EAAO,KAAA,EAAO,OAAO,IAAI,IAAA,GAAO,wBAAA;AACxD","file":"chunk-42ICEVUN.js","sourcesContent":["/**\n * A UGC builder call `{ tool, args }` (MCP argument names) → the REST body of\n * the public route that tool dispatches to. The builder sets every price lever;\n * this adds none — its one addition is the image of a call that needs the\n * previous step's image (`imageArg`, or the photo of `image_to_text`). A tool\n * it does not know → undefined, so an app older than the builder fails plainly\n * instead of guessing. Kept equal to the MCP verbs by ugc-call-body-parity.test.ts.\n */\nexport interface UgcToolCall {\n readonly tool: string\n readonly args: Readonly<Record<string, unknown>>\n readonly imageArg?: string\n}\nexport type UgcRouteBody = {\n readonly path: \"/v1/generate-image\" | \"/v1/image-to-image\" | \"/v1/image-to-text/describe\"\n readonly body: Record<string, unknown>\n}\n\nconst pick = (a: Readonly<Record<string, unknown>>, from: string, to: string): Record<string, unknown> =>\n a[from] !== undefined && a[from] !== null ? { [to]: a[from] } : {}\n\n/** The LLM levers image_to_text forwards (the verb's llmPayloadFields). */\nfunction llmFields(a: Readonly<Record<string, unknown>>): Record<string, unknown> {\n return {\n ...pick(a, \"llmModel\", \"llmModel\"),\n ...pick(a, \"reasoning_effort\", \"reasoningEffort\"),\n ...(a.advanced_mode === true ? { advancedMode: true } : {}),\n ...pick(a, \"temperature\", \"temperature\"),\n ...pick(a, \"max_tokens\", \"maxTokens\"),\n }\n}\n\nexport function ugcCallToRouteBody(\n call: UgcToolCall,\n opts: { readonly image?: string } = {},\n): UgcRouteBody | { readonly error: string } | undefined {\n const args: Record<string, unknown> = { ...call.args }\n if (call.imageArg) {\n if (!opts.image) return { error: `${call.tool} needs the previous step's image` }\n args[call.imageArg] = opts.image\n }\n switch (call.tool) {\n case \"generate_image\":\n return {\n path: \"/v1/generate-image\",\n body: {\n ...pick(args, \"prompt\", \"prompt\"),\n ...pick(args, \"model\", \"provider\"),\n ...pick(args, \"aspect_ratio\", \"aspectRatio\"),\n ...pick(args, \"resolution\", \"resolution\"),\n ...pick(args, \"quality\", \"quality\"),\n ...pick(args, \"negative_prompt\", \"negativePrompt\"),\n },\n }\n case \"image_to_image\":\n return {\n path: \"/v1/image-to-image\",\n body: {\n ...pick(args, \"image_url\", \"imageUrl\"),\n ...pick(args, \"prompt\", \"prompt\"),\n ...pick(args, \"model\", \"provider\"),\n ...pick(args, \"resolution\", \"resolution\"),\n ...pick(args, \"quality\", \"quality\"),\n ...pick(args, \"strength\", \"strength\"),\n ...pick(args, \"aspect_ratio\", \"aspectRatio\"),\n ...pick(args, \"negative_prompt\", \"negativePrompt\"),\n ...pick(args, \"seed\", \"seed\"),\n },\n }\n case \"image_to_text\": {\n const image = opts.image ?? (typeof args.image_url === \"string\" ? args.image_url : undefined)\n if (!image) return { error: \"image_to_text needs an image\" }\n return {\n path: \"/v1/image-to-text/describe\",\n body: {\n imageUrl: image,\n ...pick(args, \"detail_level\", \"detailLevel\"),\n ...pick(args, \"custom_prompt\", \"customPrompt\"),\n ...llmFields(args),\n },\n }\n }\n default:\n return undefined\n }\n}\n","/**\n * The UGC wires of a language whose clips are cut from one recorded speech (the\n * segmented lane): UGC Clips' prelude (record the speech, time its words, split\n * it at its pauses, then ask for the clips again with the segments) and UGC\n * Finish (lay the speech back over the rendered clips and trim the dead air,\n * as one job over all of them). One pure implementation both engines call, as\n * the rest of the UGC wires (`ugc-node-wires.ts`).\n *\n * Content-free: an answer is read only for `phase`, its three calls' `tool`\n * and `args` (argument names, never their meaning), the `finish` call's\n * `args`, and a finished job's clip list. Which language takes this lane, which\n * voice speaks and what the calls say are the builder's.\n */\nimport {\n UGC_FINISH_NEEDS_CLIPS_MESSAGE,\n UGC_FINISH_NOT_READY_MESSAGE,\n UGC_NEEDS_FINISH_MESSAGE,\n UGC_NEWER_APP_MESSAGE,\n UGC_NODE_MESSAGES,\n UGC_OVER_HOLD_MESSAGE,\n UGC_SCRIPT_LANGUAGES,\n readUgcWire,\n ugcPlanLengthSec,\n ugcPlanScreenshotCount,\n} from \"./ugc-node-wires.js\"\nimport type { FanOutItemMeta } from \"./fan-out-meta.js\"\n\ntype Obj = Record<string, unknown>\nconst isObject = (x: unknown): x is Obj => !!x && typeof x === \"object\" && !Array.isArray(x)\n\n/** UGC Finish's node type. Not the plugin job it runs (`ugc-finish`): a price, a dispatch or a reconcile keyed on a type never confuses the two. */\nexport const UGC_FINISH_CLIPS_TYPE = \"ugc-finish-clips\"\n\n/** The child steps of UGC Clips' prelude, in run order: each is a job of its own, keyed by its step. */\nexport const UGC_PRELUDE_STEPS = [\"speech\", \"alignment\", \"split\"] as const\nexport type UgcPreludeStep = (typeof UGC_PRELUDE_STEPS)[number]\n\n/** The public route each prelude step runs on, and the node type its job is read as. */\nexport const UGC_PRELUDE_ROUTES: Readonly<Record<UgcPreludeStep, { readonly path: string; readonly jobType: string }>> = {\n speech: { path: \"/v1/text-to-speech\", jobType: \"text-to-speech\" },\n alignment: { path: \"/v1/forced-alignment\", jobType: \"forced-alignment\" },\n split: { path: \"/v1/ugc/segments\", jobType: \"ugc-segments\" },\n}\n\n/** The `/v1/ugc/clips` answer's phase: 1 = the prelude must run first, 2 = the clips; null = an answer with no phase (one call, as English). */\nexport function ugcClipsPhase(answer: Readonly<Obj>): 1 | 2 | null {\n return answer.phase === 1 ? 1 : answer.phase === 2 ? 2 : null\n}\n\nconst callOf = (raw: unknown, tool: string): Obj | undefined => {\n if (!isObject(raw) || raw.tool !== tool || !isObject(raw.args)) return undefined\n return raw.args\n}\nconst pick = (a: Readonly<Obj>, from: string, to: string): Obj => (a[from] !== undefined && a[from] !== null ? { [to]: a[from] } : {})\n\n/** What the prelude runs: the speech's route body, and the two that need the step before them. */\nexport interface UgcPrelude {\n readonly speech: Obj\n readonly alignment: (audioUrl: string) => Obj\n readonly split: (audioUrl: string, alignment: unknown) => Obj\n}\n\n/**\n * A phase-1 answer's three calls (`speech`, `align`, `split`, MCP argument names) → the REST bodies of\n * the public routes their MCP tools dispatch to: `generate_speech` → `/v1/text-to-speech` (text, voice,\n * voice type, model as provider, language code, as the verb maps them), `forced_alignment` →\n * `/v1/forced-alignment` (the transcript, with the speech's audio), `ugc_split_speech` →\n * `/v1/ugc/segments` (the plan, with the speech's audio and its word timings). A call that is missing\n * or names another tool → the newer-app sentence: the app never guesses.\n */\nexport function ugcPrelude(answer: Readonly<Obj>): UgcPrelude | { readonly error: string } {\n const speech = callOf(answer.speech, \"generate_speech\")\n const align = callOf(answer.align, \"forced_alignment\")\n const split = callOf(answer.split, \"ugc_split_speech\")\n if (!speech || !align || !split || typeof speech.text !== \"string\" || !isObject(split.plan)) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n speech: {\n text: speech.text,\n ...pick(speech, \"voice_id\", \"voice\"),\n ...pick(speech, \"voice_type\", \"voiceType\"),\n ...pick(speech, \"model\", \"provider\"),\n ...pick(speech, \"language_code\", \"languageCode\"),\n },\n alignment: (audioUrl) => ({ ...pick(align, \"transcript\", \"transcript\"), audioUrl }),\n split: (audioUrl, alignment) => ({ plan: split.plan, audioUrl, alignment }),\n }\n}\n\n/** The finished speech job's audio, its word timings and its segments, as their jobs write them. */\nexport function ugcPreludeOutput(step: UgcPreludeStep, output: Readonly<Obj> | undefined): { value: unknown } | { error: string } {\n const value = step === \"speech\" ? output?.audioUrl : step === \"alignment\" ? output?.alignment : output?.segments\n const ok = step === \"speech\" ? typeof value === \"string\" && value !== \"\" : Array.isArray(value) && value.length > 0\n return ok ? { value } : { error: UGC_NEWER_APP_MESSAGE }\n}\n\n/** The second `/v1/ugc/clips` call: the first call's body with the segments the split returned. */\nexport function ugcClipsPhase2Body(body: Readonly<Obj>, segments: readonly unknown[]): Obj {\n return { ...body, segments: [...segments] }\n}\n\n// ── The hold check once the speech is split ──────────────────────────────────\n\n/** The estimate input of a video cut from one recorded speech, as the hold check names it (`runEstimate`). */\nexport interface UgcRunEstimateInput {\n readonly targetDurationSec: number\n readonly screenshotCount: number\n readonly source: \"sampled\"\n readonly language: string\n}\n\n/**\n * The estimate input of the video a UGC Clips run belongs to, read from the plan the node was sent: its\n * length, its screenshot cards and its language — the reading a kept plan is priced with. Read on a\n * phase-1 answer, before the prelude spends anything, so a plan the check cannot read refuses the run\n * while nothing is paid. The creator's source prices no clip, so it is not read. A plan without a length,\n * or without a language this lane takes → the newer-app sentence: the check never guesses.\n */\nexport function ugcRunEstimateInput(plan: unknown): { runEstimate: UgcRunEstimateInput } | { error: string } {\n const targetDurationSec = ugcPlanLengthSec(plan)\n const language = planOf(plan)?.language\n if (targetDurationSec === undefined || typeof language !== \"string\" || language === \"en\" || !(UGC_SCRIPT_LANGUAGES as readonly unknown[]).includes(language)) {\n return { error: UGC_NEWER_APP_MESSAGE }\n }\n return { runEstimate: { targetDurationSec, screenshotCount: ugcPlanScreenshotCount(plan) ?? 0, source: \"sampled\", language } }\n}\n\n/**\n * The quote that checks a video cut from one recorded speech before any of its clips renders: the clips\n * the second `/v1/ugc/clips` call handed on, priced as the UGC Clips quote prices them (`tickets`,\n * `hasCards`, `finishes`), with `runEstimate` (`ugcRunEstimateInput`). The route then also answers\n * `runHold`, the most the video's estimate holds for the clips and the steps after them, which the run's\n * balance was checked against before it started (`ugcRenderHoldVerdict`). No clips → the newer-app sentence.\n */\nexport function ugcRenderHoldBody(input: { runEstimate: UgcRunEstimateInput; tickets: unknown; hasCards: boolean; finishes: boolean }): { path: \"/v1/ugc/quote\"; body: Obj } | { error: string } {\n if (!Array.isArray(input.tickets) || input.tickets.length === 0) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n path: \"/v1/ugc/quote\",\n body: {\n tickets: [...input.tickets],\n hasCards: input.hasCards,\n ...(input.finishes ? { finishes: true } : {}),\n runEstimate: { ...input.runEstimate },\n },\n }\n}\n\n/** A plan, or its wire (a JSON string), as an object; undefined for anything else. */\nfunction planOf(plan: unknown): Obj | undefined {\n if (typeof plan !== \"string\") return isObject(plan) ? plan : undefined\n try {\n const parsed: unknown = JSON.parse(plan)\n return isObject(parsed) ? parsed : undefined\n } catch {\n return undefined\n }\n}\n\nconst isCredits = (x: unknown): x is number => typeof x === \"number\" && Number.isFinite(x) && x >= 0\n\n/**\n * The hold check's answer → go on, or stop before any clip renders: the clips and the steps after them\n * (`ceiling`, each clip at its hold) over what the run was checked for (`runHold`) → the over-hold\n * sentence. An answer without both figures stops too (the newer-app sentence): a clip never renders\n * on a figure nobody checked.\n */\nexport function ugcRenderHoldVerdict(answer: unknown): { readonly ok: true } | { readonly error: string } {\n if (!isObject(answer) || !isCredits(answer.ceiling) || !isCredits(answer.runHold)) return { error: UGC_NEWER_APP_MESSAGE }\n return answer.ceiling > answer.runHold ? { error: UGC_OVER_HOLD_MESSAGE } : { ok: true }\n}\n\n// ── UGC Finish ───────────────────────────────────────────────────────────────\n\n/** What UGC Finish does with the clips it was handed. */\nexport type UgcFinishPlan =\n /** No finish call on the plan (English): the clips go on as they came, no call, no job. */\n | { readonly kind: \"pass\"; readonly clips: readonly string[] }\n /** The finish job's body: the segments with their room, one roll per clip, in order. */\n | { readonly kind: \"job\"; readonly path: \"/v1/ugc/finish\"; readonly body: Obj }\n\n/**\n * UGC Finish's input → what it does. The `plan` input is UGC Clips' Script (sized) output; a plan\n * carrying `finish` (the segmented lane) asks for the finish job over the clips, in order; any other\n * plan passes the clips through. Clips are the fan-in list (`inputs.inputs`), in clip order.\n */\nexport function ugcFinishPlan(input: { planOutWire: unknown; clipUrls: readonly unknown[] }): UgcFinishPlan | { readonly error: string } {\n const clips = input.clipUrls.filter((u): u is string => typeof u === \"string\" && u !== \"\")\n if (clips.length === 0) return { error: UGC_FINISH_NEEDS_CLIPS_MESSAGE }\n const read = readUgcWire(input.planOutWire, UGC_NODE_MESSAGES.needsPlanOut)\n if (\"error\" in read) return read\n const finish = read.value.finish\n if (finish === undefined) return { kind: \"pass\", clips }\n if (!isObject(finish) || !Array.isArray(finish.segments) || finish.segments.length === 0) return { error: UGC_NEWER_APP_MESSAGE }\n if (finish.segments.length !== clips.length) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n kind: \"job\",\n path: \"/v1/ugc/finish\",\n body: { segments: finish.segments, clips: clips.map((url, i) => ({ clip: i + 1, rolls: [url] })) },\n }\n}\n\n/** A finished clip, as UGC Finish hands it on: its URL and the notes its downstream nodes read. */\nexport interface UgcFinishedClip { readonly url: string; readonly meta: FanOutItemMeta }\n\n/**\n * A finished `ugc-finish` job → the finished clips in clip order, each with its real length. `ready: false`\n * (a clip that does not follow its speech) → the not-ready sentence: the node fails, never hands on a\n * partial list. A dry finish's warning rides every clip's notes.\n */\nexport function ugcFinishOutputs(output: Readonly<Obj> | undefined): { clips: UgcFinishedClip[] } | { error: string } {\n if (!output) return { error: UGC_NEWER_APP_MESSAGE }\n if (output.ready === false) return { error: UGC_FINISH_NOT_READY_MESSAGE }\n if (output.ready !== true || !Array.isArray(output.clips) || output.clips.length === 0) return { error: UGC_NEWER_APP_MESSAGE }\n const warnings = Array.isArray(output.warnings)\n ? output.warnings.flatMap((w) => (isObject(w) && typeof w.code === \"string\" ? [w.code] : typeof w === \"string\" ? [w] : []))\n : []\n const rows = [...output.clips].filter(isObject).sort((a, b) => Number(a.clip) - Number(b.clip))\n if (rows.length !== output.clips.length || rows.some((r, i) => r.clip !== i + 1 || typeof r.url !== \"string\" || r.url === \"\")) return { error: UGC_NEWER_APP_MESSAGE }\n return {\n clips: rows.map((r) => ({\n url: r.url as string,\n meta: { warnings, durationSec: typeof r.sec === \"number\" && Number.isFinite(r.sec) && r.sec > 0 ? r.sec : null },\n })),\n }\n}\n\n/**\n * Whether a UGC Finish reads this UGC Clips node's Script (sized) output: the graph can finish a video\n * whose clips are cut from one recorded speech. Read before the prelude spends anything.\n */\nexport function ugcFinishWired(\n edges: ReadonlyArray<{ readonly source?: string; readonly target?: string; readonly sourceHandle?: string | null; readonly targetHandle?: string | null }>,\n nodes: ReadonlyArray<{ readonly id?: string; readonly type?: string | null }>,\n clipsId: string,\n): boolean {\n const finishIds = new Set(nodes.filter((n) => n.type === UGC_FINISH_CLIPS_TYPE && typeof n.id === \"string\").map((n) => n.id as string))\n return edges.some((e) => e.source === clipsId && e.sourceHandle === \"plan-out\" && e.target !== undefined && finishIds.has(e.target) && (e.targetHandle ?? \"\") === \"plan\")\n}\n\n/** UGC Clips' refusal before its prelude: the sentence when no UGC Finish reads its Script (sized) output, else null. */\nexport function ugcLaneNeedsFinish(\n edges: Parameters<typeof ugcFinishWired>[0],\n nodes: Parameters<typeof ugcFinishWired>[1],\n clipsId: string,\n): string | null {\n return ugcFinishWired(edges, nodes, clipsId) ? null : UGC_NEEDS_FINISH_MESSAGE\n}\n"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkBOCHNFDU_cjs = require('./chunk-BOCHNFDU.cjs');
|
|
4
4
|
var chunkYWNYGYI7_cjs = require('./chunk-YWNYGYI7.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkDOY47F7S_cjs = require('./chunk-DOY47F7S.cjs');
|
|
6
|
+
var chunkGC77W57T_cjs = require('./chunk-GC77W57T.cjs');
|
|
7
7
|
var chunkKU6S7IYV_cjs = require('./chunk-KU6S7IYV.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
8
|
+
var chunkXBHDXURR_cjs = require('./chunk-XBHDXURR.cjs');
|
|
9
|
+
var chunk5DRSENY3_cjs = require('./chunk-5DRSENY3.cjs');
|
|
10
|
+
var chunkQV32JI4L_cjs = require('./chunk-QV32JI4L.cjs');
|
|
11
|
+
var chunkU4DIGIC3_cjs = require('./chunk-U4DIGIC3.cjs');
|
|
12
|
+
var chunkJEUZNHLL_cjs = require('./chunk-JEUZNHLL.cjs');
|
|
13
|
+
var chunkHWBLZSM3_cjs = require('./chunk-HWBLZSM3.cjs');
|
|
14
14
|
var chunkR2VF5NQG_cjs = require('./chunk-R2VF5NQG.cjs');
|
|
15
15
|
var chunkWNVQ3SMB_cjs = require('./chunk-WNVQ3SMB.cjs');
|
|
16
16
|
var zod = require('zod');
|
|
@@ -91,8 +91,8 @@ var VIDEO_SETTINGS = ["aspect-ratio", "duration", "provider", "motion"];
|
|
|
91
91
|
var SETTINGS_CONSUMERS = {
|
|
92
92
|
"generate-video": {
|
|
93
93
|
accepts: VIDEO_SETTINGS,
|
|
94
|
-
models:
|
|
95
|
-
defaultModel:
|
|
94
|
+
models: chunkJEUZNHLL_cjs.VIDEO_GEN_PROVIDERS,
|
|
95
|
+
defaultModel: chunkJEUZNHLL_cjs.DEFAULT_VIDEO_PROVIDER,
|
|
96
96
|
duration: "model"
|
|
97
97
|
},
|
|
98
98
|
// Generate Video Pro has Generate Video's handles by construction
|
|
@@ -100,17 +100,17 @@ var SETTINGS_CONSUMERS = {
|
|
|
100
100
|
// settings; its own models and its own duration rule.
|
|
101
101
|
"generate-video-pro": {
|
|
102
102
|
accepts: VIDEO_SETTINGS,
|
|
103
|
-
models:
|
|
104
|
-
defaultModel:
|
|
103
|
+
models: chunkJEUZNHLL_cjs.GVP_SUPPORTED_PROVIDERS,
|
|
104
|
+
defaultModel: chunkJEUZNHLL_cjs.GVP_DEFAULT_PROVIDER,
|
|
105
105
|
duration: "total"
|
|
106
106
|
},
|
|
107
107
|
// A still image has no length, so no Duration.
|
|
108
108
|
"generate-image": {
|
|
109
109
|
accepts: ["aspect-ratio", "provider"],
|
|
110
|
-
models:
|
|
110
|
+
models: chunkJEUZNHLL_cjs.IMAGE_GEN_PROVIDERS,
|
|
111
111
|
// The node's own default (NODE_DEFINITIONS) — only used to fit a wired
|
|
112
112
|
// ratio when the node names no model.
|
|
113
|
-
defaultModel:
|
|
113
|
+
defaultModel: chunkDOY47F7S_cjs.IMAGE_MODEL_ROLE_DEFAULTS.general,
|
|
114
114
|
modelList: "providers"
|
|
115
115
|
}
|
|
116
116
|
};
|
|
@@ -165,8 +165,8 @@ function connectedSettingsSources(consumerId, consumerType, edges, typeOf) {
|
|
|
165
165
|
return out;
|
|
166
166
|
}
|
|
167
167
|
function snapToModelDuration(model, seconds) {
|
|
168
|
-
const durations =
|
|
169
|
-
if (!durations || durations.length === 0 ||
|
|
168
|
+
const durations = chunkHWBLZSM3_cjs.MODEL_CATALOG[model]?.durations;
|
|
169
|
+
if (!durations || durations.length === 0 || chunkHWBLZSM3_cjs.isAutoVideoDuration(seconds)) return seconds;
|
|
170
170
|
let best = durations[0];
|
|
171
171
|
for (const d of durations) {
|
|
172
172
|
const closer = Math.abs(d - seconds) < Math.abs(best - seconds);
|
|
@@ -195,7 +195,7 @@ function applySettingsInput(consumerType, consumerId, data, edges, typeOf) {
|
|
|
195
195
|
if (Number.isFinite(seconds)) next = { ...next, duration: snapToModelDuration(model, seconds) };
|
|
196
196
|
}
|
|
197
197
|
if (connected.some((c) => c.sourceType === "aspect-ratio") && typeof next.aspectRatio === "string") {
|
|
198
|
-
next = { ...next, aspectRatio:
|
|
198
|
+
next = { ...next, aspectRatio: chunkHWBLZSM3_cjs.fitAspectRatioToModel(model, next.aspectRatio) };
|
|
199
199
|
}
|
|
200
200
|
return { data: next };
|
|
201
201
|
}
|
|
@@ -326,7 +326,7 @@ var SCRIPT_TARGET_DURATION_RANGE = { min: 5, max: 600 };
|
|
|
326
326
|
var SCRIPT_SCENE_COUNT_DEFAULT = 5;
|
|
327
327
|
var SCRIPT_TARGET_DURATION_DEFAULT = 60;
|
|
328
328
|
var SCRIPT_TONE_MAX_LENGTH = 200;
|
|
329
|
-
var SCRIPT_STYLE_GUIDE_MAX_LENGTH =
|
|
329
|
+
var SCRIPT_STYLE_GUIDE_MAX_LENGTH = chunkJEUZNHLL_cjs.LLM_TEXT_INPUT_MAX;
|
|
330
330
|
function clampInt(value, range) {
|
|
331
331
|
const n = typeof value === "number" ? value : typeof value === "string" && value.trim().length > 0 ? Number(value) : Number.NaN;
|
|
332
332
|
if (!Number.isFinite(n)) return void 0;
|
|
@@ -338,7 +338,7 @@ function clampText(value, max) {
|
|
|
338
338
|
return text.length > 0 ? text.slice(0, max) : void 0;
|
|
339
339
|
}
|
|
340
340
|
function readScriptSettings(data, refMap) {
|
|
341
|
-
const styleGuide = typeof data.styleGuide === "string" && refMap && refMap.size > 0 ?
|
|
341
|
+
const styleGuide = typeof data.styleGuide === "string" && refMap && refMap.size > 0 ? chunkBOCHNFDU_cjs.resolveNodeRefs(data.styleGuide, refMap) : data.styleGuide;
|
|
342
342
|
return {
|
|
343
343
|
sceneCount: clampInt(data.sceneCount, SCRIPT_SCENE_COUNT_RANGE),
|
|
344
344
|
// The panel's own fields (the ones a mapping writes) come first. `style` is
|
|
@@ -393,12 +393,12 @@ var LEGACY_JSON_OUTPUT_KINDS = Object.freeze({
|
|
|
393
393
|
// clip tickets, the sized plan), and UGC Cards' layer plan and caption plan.
|
|
394
394
|
// Their text pips (category, transcript, report) are not JSON pips. The pip an
|
|
395
395
|
// edge with no `sourceHandle` reads is the UGC wires' own (UGC_PRIMARY_HANDLE).
|
|
396
|
-
"ugc-creator": { primary:
|
|
397
|
-
"ugc-script": { primary:
|
|
398
|
-
"ugc-clips": { primary:
|
|
399
|
-
"ugc-cards": { primary:
|
|
396
|
+
"ugc-creator": { primary: chunkQV32JI4L_cjs.UGC_PRIMARY_HANDLE["ugc-creator"], pips: { creator: "other" } },
|
|
397
|
+
"ugc-script": { primary: chunkQV32JI4L_cjs.UGC_PRIMARY_HANDLE["ugc-script"], pips: { plan: "other" } },
|
|
398
|
+
"ugc-clips": { primary: chunkQV32JI4L_cjs.UGC_PRIMARY_HANDLE["ugc-clips"], pips: { clips: "other", "plan-out": "other" } },
|
|
399
|
+
"ugc-cards": { primary: chunkQV32JI4L_cjs.UGC_PRIMARY_HANDLE["ugc-cards"], pips: { layerPlan: "other", captionPlan: "other" } }
|
|
400
400
|
});
|
|
401
|
-
var JSON_OUTPUT_KINDS = Object.freeze(composeJsonOutputs(LEGACY_JSON_OUTPUT_KINDS,
|
|
401
|
+
var JSON_OUTPUT_KINDS = Object.freeze(composeJsonOutputs(LEGACY_JSON_OUTPUT_KINDS, chunkU4DIGIC3_cjs.unitJsonPips()));
|
|
402
402
|
function composeJsonOutputs(legacy, rows) {
|
|
403
403
|
const out = { ...legacy };
|
|
404
404
|
for (const [type, pips] of rows) {
|
|
@@ -412,12 +412,12 @@ var JSON_INPUT_KINDS = Object.freeze({
|
|
|
412
412
|
edl: "edl"
|
|
413
413
|
});
|
|
414
414
|
var own = (table, key) => Object.hasOwn(table, key) ? table[key] : void 0;
|
|
415
|
-
function declaredJsonOutput(nodeType, sourceHandle, renders =
|
|
415
|
+
function declaredJsonOutput(nodeType, sourceHandle, renders = chunkGC77W57T_cjs.RENDER_NODE_TYPES) {
|
|
416
416
|
if (typeof nodeType !== "string") return void 0;
|
|
417
417
|
const render = own(renders, nodeType);
|
|
418
418
|
if (render) {
|
|
419
|
-
const pip2 = sourceHandle ??
|
|
420
|
-
if (pip2 ===
|
|
419
|
+
const pip2 = sourceHandle ?? chunkGC77W57T_cjs.RENDER_JSON_HANDLE;
|
|
420
|
+
if (pip2 === chunkGC77W57T_cjs.RENDER_JSON_HANDLE) return render.jsonKind;
|
|
421
421
|
return pip2 === render.transcriptOutput.handle ? "transcript" : void 0;
|
|
422
422
|
}
|
|
423
423
|
const outputs = own(JSON_OUTPUT_KINDS, nodeType);
|
|
@@ -430,14 +430,14 @@ function declaredJsonOutputRows() {
|
|
|
430
430
|
([type, o]) => Object.entries(o.pips).map(([pip, kind]) => [type, pip, kind])
|
|
431
431
|
);
|
|
432
432
|
}
|
|
433
|
-
function jsonOutputKind(nodeType, sourceHandle, renders =
|
|
433
|
+
function jsonOutputKind(nodeType, sourceHandle, renders = chunkGC77W57T_cjs.RENDER_NODE_TYPES) {
|
|
434
434
|
const declared = declaredJsonOutput(nodeType, sourceHandle, renders);
|
|
435
435
|
return declared === "other" ? void 0 : declared;
|
|
436
436
|
}
|
|
437
437
|
function jsonInputKind(_nodeType, targetHandle) {
|
|
438
438
|
return typeof targetHandle === "string" ? own(JSON_INPUT_KINDS, targetHandle) : void 0;
|
|
439
439
|
}
|
|
440
|
-
function jsonKindMismatch(sourceType, sourceHandle, targetType, targetHandle, renders =
|
|
440
|
+
function jsonKindMismatch(sourceType, sourceHandle, targetType, targetHandle, renders = chunkGC77W57T_cjs.RENDER_NODE_TYPES) {
|
|
441
441
|
const input = jsonInputKind(targetType, targetHandle);
|
|
442
442
|
if (!input) return null;
|
|
443
443
|
const output = jsonOutputKind(sourceType, sourceHandle, renders);
|
|
@@ -453,8 +453,8 @@ function jsonKindMismatchMessage(mismatch, labels = {}) {
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
// src/preview-gate.ts
|
|
456
|
-
var PREVIEW_RENDER_NODE_TYPES = new Set(
|
|
457
|
-
var REVIEW_HOLDING_USE_CASE_TYPES = new Set(
|
|
456
|
+
var PREVIEW_RENDER_NODE_TYPES = new Set(chunkGC77W57T_cjs.RENDER_NODE_TYPE_IDS);
|
|
457
|
+
var REVIEW_HOLDING_USE_CASE_TYPES = new Set(chunkU4DIGIC3_cjs.unitReviewHolds());
|
|
458
458
|
function isPreviewHoldingType(type) {
|
|
459
459
|
return PREVIEW_RENDER_NODE_TYPES.has(type ?? "") || REVIEW_HOLDING_USE_CASE_TYPES.has(type ?? "");
|
|
460
460
|
}
|
|
@@ -498,7 +498,7 @@ var outputModeOf = (edge) => {
|
|
|
498
498
|
return typeof mode === "string" ? mode : void 0;
|
|
499
499
|
};
|
|
500
500
|
function readsEach(render, consumerEdge, renderHandle) {
|
|
501
|
-
return (outputModeOf(consumerEdge) ??
|
|
501
|
+
return (outputModeOf(consumerEdge) ?? chunk5DRSENY3_cjs.defaultEdgeOutputMode(render.type, renderHandle)) === "each";
|
|
502
502
|
}
|
|
503
503
|
function savedPreviewConsumers(render, children, nodeById, edges, reader) {
|
|
504
504
|
const data = dataOf(render);
|
|
@@ -534,7 +534,7 @@ function previewStops(nodes, edges, run = {}) {
|
|
|
534
534
|
return !!n && dataOf(n).skipped !== true;
|
|
535
535
|
});
|
|
536
536
|
const reader = run.savedRenders ?? SAVED_RENDER_STAMPS;
|
|
537
|
-
const { children } =
|
|
537
|
+
const { children } = chunkBOCHNFDU_cjs.buildFeedMaps(nodes, edges);
|
|
538
538
|
const previewRenderIds = [];
|
|
539
539
|
const savedPreviewRenderIds = [];
|
|
540
540
|
const seeds = [];
|
|
@@ -590,14 +590,14 @@ function withRunOverrides(nodes, overrides) {
|
|
|
590
590
|
const data = withoutRunOnlyFields(saved);
|
|
591
591
|
const fields = overrides?.[n.id];
|
|
592
592
|
if (!fields) return data === saved ? n : { ...n, data };
|
|
593
|
-
const merged =
|
|
593
|
+
const merged = chunkGC77W57T_cjs.mergeNodeInputOverrides(n.type ?? void 0, { ...data }, { ...fields });
|
|
594
594
|
for (const key of RUN_OVERRIDE_CLEARED_FIELDS) delete merged[key];
|
|
595
595
|
return { ...n, data: merged };
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
// src/use-case-types.ts
|
|
600
|
-
var USE_CASE_NODE_TYPES =
|
|
600
|
+
var USE_CASE_NODE_TYPES = chunkU4DIGIC3_cjs.UNIT_USE_CASE_TYPES;
|
|
601
601
|
function isUseCaseNodeType(type) {
|
|
602
602
|
return typeof type === "string" && USE_CASE_NODE_TYPES.includes(type);
|
|
603
603
|
}
|
|
@@ -654,8 +654,8 @@ function loneMediaUrlKind(value) {
|
|
|
654
654
|
var MESSAGE_TRIGGER_TYPES = /* @__PURE__ */ new Set(["telegram-trigger", "telegram-account-trigger"]);
|
|
655
655
|
function isLoneMediaLinkSource(nodeType) {
|
|
656
656
|
if (!nodeType) return false;
|
|
657
|
-
if (
|
|
658
|
-
if (
|
|
657
|
+
if (chunk5DRSENY3_cjs.IMAGE_PRODUCER_TYPES.has(nodeType) || chunk5DRSENY3_cjs.VIDEO_PRODUCER_TYPES.has(nodeType) || chunk5DRSENY3_cjs.AUDIO_PRODUCER_TYPES.has(nodeType)) return false;
|
|
658
|
+
if (chunk5DRSENY3_cjs.DYNAMIC_PRODUCER_TYPES.has(nodeType) || MESSAGE_TRIGGER_TYPES.has(nodeType)) return false;
|
|
659
659
|
if (chunkWNVQ3SMB_cjs.ENTITY_NODE_KINDS.includes(nodeType) || nodeType === "face") return false;
|
|
660
660
|
return true;
|
|
661
661
|
}
|
|
@@ -910,9 +910,9 @@ function transcribeTargetLanguageOf(value) {
|
|
|
910
910
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
911
911
|
}
|
|
912
912
|
function transcribeWordTimestampsRefusal(provider, targetLanguage) {
|
|
913
|
-
const lane = provider ||
|
|
914
|
-
if (!
|
|
915
|
-
return `the "${lane}" engine does not return word timings \u2014 pick ${
|
|
913
|
+
const lane = provider || chunkJEUZNHLL_cjs.DEFAULT_TRANSCRIBE_NODE_PROVIDER;
|
|
914
|
+
if (!chunkJEUZNHLL_cjs.transcribeLaneSupportsWordTimestamps(lane)) {
|
|
915
|
+
return `the "${lane}" engine does not return word timings \u2014 pick ${chunkJEUZNHLL_cjs.transcribeProvidersWithWordTimestamps().join(" or ")}`;
|
|
916
916
|
}
|
|
917
917
|
if (transcribeTargetLanguageOf(targetLanguage) !== void 0) {
|
|
918
918
|
return "a translation carries no word timings \u2014 clear the target language to get a transcript with word timings";
|
|
@@ -922,12 +922,12 @@ function transcribeWordTimestampsRefusal(provider, targetLanguage) {
|
|
|
922
922
|
function transcribeTranslationRefusal(provider, targetLanguage, wordTimestamps) {
|
|
923
923
|
const target = transcribeTargetLanguageOf(targetLanguage);
|
|
924
924
|
if (target === void 0) return null;
|
|
925
|
-
const lane = provider ||
|
|
926
|
-
if (!
|
|
927
|
-
return `the "${lane}" engine does not translate \u2014 pick ${
|
|
925
|
+
const lane = provider || chunkJEUZNHLL_cjs.DEFAULT_TRANSCRIBE_NODE_PROVIDER;
|
|
926
|
+
if (!chunkJEUZNHLL_cjs.transcribeLaneSupportsTranslation(lane)) {
|
|
927
|
+
return `the "${lane}" engine does not translate \u2014 pick ${chunkJEUZNHLL_cjs.transcribeProvidersWithTranslation().join(" or ")} to translate, or clear the target language`;
|
|
928
928
|
}
|
|
929
|
-
if (!
|
|
930
|
-
return `"${target}" is not a language the "${lane}" engine translates into \u2014 pick one of ${
|
|
929
|
+
if (!chunkJEUZNHLL_cjs.TRANSCRIBE_TARGET_LANGUAGES.includes(target)) {
|
|
930
|
+
return `"${target}" is not a language the "${lane}" engine translates into \u2014 pick one of ${chunkJEUZNHLL_cjs.TRANSCRIBE_TARGET_LANGUAGES.join(", ")}`;
|
|
931
931
|
}
|
|
932
932
|
if (wordTimestamps === true) {
|
|
933
933
|
return "word timings and a translation cannot be asked for together \u2014 turn word timings off, or clear the target language";
|
|
@@ -936,9 +936,9 @@ function transcribeTranslationRefusal(provider, targetLanguage, wordTimestamps)
|
|
|
936
936
|
}
|
|
937
937
|
var ALWAYS_WORD_LEVEL_LANES = /* @__PURE__ */ new Set(["elevenlabs-stt"]);
|
|
938
938
|
function transcribeNodeReturnsWords(data, jsonWired) {
|
|
939
|
-
const provider = typeof data?.provider === "string" && data.provider ||
|
|
939
|
+
const provider = typeof data?.provider === "string" && data.provider || chunkJEUZNHLL_cjs.DEFAULT_TRANSCRIBE_NODE_PROVIDER;
|
|
940
940
|
if (transcribeTargetLanguageOf(data?.targetLanguage) !== void 0) return false;
|
|
941
|
-
if (!
|
|
941
|
+
if (!chunkJEUZNHLL_cjs.transcribeLaneSupportsWordTimestamps(provider)) return false;
|
|
942
942
|
return ALWAYS_WORD_LEVEL_LANES.has(provider) || data?.wordTimestamps === true || jsonWired;
|
|
943
943
|
}
|
|
944
944
|
var TRANSCRIBE_JSON_OUT = "json";
|
|
@@ -949,7 +949,7 @@ function findWordlessTranscriptFeeds(nodes, edges) {
|
|
|
949
949
|
const out = [];
|
|
950
950
|
for (const node of nodes) {
|
|
951
951
|
if (node.type !== "transcribe" || isSkipped(node)) continue;
|
|
952
|
-
const provider = typeof node.data?.provider === "string" && node.data.provider ||
|
|
952
|
+
const provider = typeof node.data?.provider === "string" && node.data.provider || chunkJEUZNHLL_cjs.DEFAULT_TRANSCRIBE_NODE_PROVIDER;
|
|
953
953
|
const refusal = transcribeWordTimestampsRefusal(provider, node.data?.targetLanguage);
|
|
954
954
|
if (!refusal) continue;
|
|
955
955
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -968,7 +968,7 @@ function findWordlessTranscriptFeeds(nodes, edges) {
|
|
|
968
968
|
message: `Captions need word timings, but ${refusal}.`
|
|
969
969
|
});
|
|
970
970
|
} else if (!seen.has(target.id)) {
|
|
971
|
-
const remapped =
|
|
971
|
+
const remapped = chunkGC77W57T_cjs.renderTranscriptOutputOf(target.type);
|
|
972
972
|
if (remapped) {
|
|
973
973
|
seen.add(target.id);
|
|
974
974
|
frontier.push({ id: target.id, outHandle: remapped.handle });
|
|
@@ -1019,8 +1019,8 @@ function normalizeNodeModelParams(nodes) {
|
|
|
1019
1019
|
if (multi.length > 1) return node;
|
|
1020
1020
|
const provider = typeof d.provider === "string" ? d.provider : typeof multi[0] === "string" ? multi[0] : void 0;
|
|
1021
1021
|
if (!provider) return node;
|
|
1022
|
-
const deferAuto = AUTO_ASPECT_AT_RUN_NODE_TYPES.has(type) && (type === "generate-image" ?
|
|
1023
|
-
const normalized =
|
|
1022
|
+
const deferAuto = AUTO_ASPECT_AT_RUN_NODE_TYPES.has(type) && (type === "generate-image" ? chunkXBHDXURR_cjs.imageGenAutoAspectNeedsSourceImage({ provider, aspectRatio: d.aspectRatio }) : chunkHWBLZSM3_cjs.autoAspectNeedsSourceImage(provider, d.aspectRatio));
|
|
1023
|
+
const normalized = chunkHWBLZSM3_cjs.normalizeModelInput(provider, {
|
|
1024
1024
|
aspectRatio: !deferAuto && typeof d.aspectRatio === "string" ? d.aspectRatio : void 0,
|
|
1025
1025
|
resolution: typeof d.resolution === "string" ? d.resolution : void 0,
|
|
1026
1026
|
quality: typeof d.quality === "string" ? d.quality : void 0
|
|
@@ -1049,10 +1049,10 @@ function normalizeVideoUpscaleNode(node, adjustments) {
|
|
|
1049
1049
|
const d = data;
|
|
1050
1050
|
if (typeof d.targetResolution !== "string" || d.targetResolution === "") return node;
|
|
1051
1051
|
const provider = typeof d.provider === "string" && d.provider !== "" ? d.provider : "topaz";
|
|
1052
|
-
if (
|
|
1052
|
+
if (chunkDOY47F7S_cjs.videoUpscaleResolutionsFor(provider).length === 0) return node;
|
|
1053
1053
|
const asked = d.targetResolution.trim().toLowerCase();
|
|
1054
|
-
if (!
|
|
1055
|
-
const normalized =
|
|
1054
|
+
if (!chunkDOY47F7S_cjs.VIDEO_UPSCALE_RESOLUTIONS.includes(asked)) return node;
|
|
1055
|
+
const normalized = chunkDOY47F7S_cjs.normalizeVideoUpscaleResolution(provider, d.targetResolution);
|
|
1056
1056
|
if (normalized.targetResolution === d.targetResolution) return node;
|
|
1057
1057
|
const nodeId = typeof node.id === "string" ? node.id : "(unknown node)";
|
|
1058
1058
|
if (normalized.adjustment) adjustments.push({ ...normalized.adjustment, nodeId, provider });
|
|
@@ -1064,7 +1064,7 @@ function normalizeMotionTransferNode(node, adjustments) {
|
|
|
1064
1064
|
const d = data;
|
|
1065
1065
|
if (typeof d.resolution !== "string" || d.resolution === "") return node;
|
|
1066
1066
|
const provider = typeof d.provider === "string" && d.provider !== "" ? d.provider : "kling";
|
|
1067
|
-
const sized =
|
|
1067
|
+
const sized = chunkXBHDXURR_cjs.motionTransferResolution(provider, d.resolution);
|
|
1068
1068
|
if (sized.resolution === d.resolution) return node;
|
|
1069
1069
|
const nodeId = typeof node.id === "string" ? node.id : "(unknown node)";
|
|
1070
1070
|
for (const adj of sized.adjustments) adjustments.push({ ...adj, nodeId, provider });
|
|
@@ -1081,8 +1081,8 @@ function videoRunModels(type, d) {
|
|
|
1081
1081
|
const list = Array.isArray(d.providers) ? d.providers.flatMap((p) => namedModel(p) ?? []) : [];
|
|
1082
1082
|
if (list.length >= 2) return list;
|
|
1083
1083
|
const named = namedModel(d.provider);
|
|
1084
|
-
if (type === "generate-video") return [
|
|
1085
|
-
return [named ?? (type === "video-to-video" ?
|
|
1084
|
+
if (type === "generate-video") return [chunkJEUZNHLL_cjs.applyDefaultVideoSelection({ provider: named }).provider];
|
|
1085
|
+
return [named ?? (type === "video-to-video" ? chunkJEUZNHLL_cjs.DEFAULT_VIDEO_TO_VIDEO_PROVIDER : chunkJEUZNHLL_cjs.LEGACY_VIDEO_NODE_DEFAULT_PROVIDER)];
|
|
1086
1086
|
}
|
|
1087
1087
|
function normalizeReferenceTaskTypeNode(node, type, adjustments) {
|
|
1088
1088
|
const data = node.data;
|
|
@@ -1092,10 +1092,10 @@ function normalizeReferenceTaskTypeNode(node, type, adjustments) {
|
|
|
1092
1092
|
if (value === void 0) return node;
|
|
1093
1093
|
const modes = REFERENCE_TASK_TYPE_NODE_MODES.get(type) ?? [];
|
|
1094
1094
|
const models = videoRunModels(type, d);
|
|
1095
|
-
const sentTo = models.flatMap((m) => [m, ...modes.map((mode) =>
|
|
1096
|
-
if (sentTo.some((m) =>
|
|
1097
|
-
const listedAnywhere = Object.values(
|
|
1098
|
-
const label =
|
|
1095
|
+
const sentTo = models.flatMap((m) => [m, ...modes.map((mode) => chunkJEUZNHLL_cjs.resolveVideoProviderForMode(m, mode))]);
|
|
1096
|
+
if (sentTo.some((m) => chunkJEUZNHLL_cjs.listedSeedanceTaskType(m, value) !== void 0)) return node;
|
|
1097
|
+
const listedAnywhere = Object.values(chunkHWBLZSM3_cjs.MODEL_CATALOG).some((m) => m.referenceTaskTypes?.some((t) => t === value));
|
|
1098
|
+
const label = chunkHWBLZSM3_cjs.MODEL_CATALOG[models[0]]?.label ?? models[0];
|
|
1099
1099
|
const reason = listedAnywhere ? `${label} does not take the reference task type "${String(value)}": removed, so the run declares none (Auto).` : `"${String(value)}" is not a reference task type a model takes (reference, edit or extend): removed \u2014 Auto is the setting left unset.`;
|
|
1100
1100
|
const nodeId = typeof node.id === "string" ? node.id : "(unknown node)";
|
|
1101
1101
|
adjustments.push({ field: "referenceTaskType", from: typeof value === "number" ? value : String(value), to: void 0, reason, nodeId, provider: models[0] });
|
|
@@ -1140,7 +1140,7 @@ function readPromptAffixes(data) {
|
|
|
1140
1140
|
|
|
1141
1141
|
// src/node-preset-extract.ts
|
|
1142
1142
|
var PRESET_APPLY_CLEAR_KEYS = [
|
|
1143
|
-
...
|
|
1143
|
+
...chunkJEUZNHLL_cjs.COMPOSER_PLAN_FIELDS,
|
|
1144
1144
|
"lottieUrl",
|
|
1145
1145
|
// Scene revision history contains old plans and their reference/prompt context.
|
|
1146
1146
|
// Preserve it in workflows, never capture or resurrect it through a preset.
|
|
@@ -1216,7 +1216,7 @@ var PRESET_EXCLUDED_KEYS = /* @__PURE__ */ new Set([
|
|
|
1216
1216
|
function extractPresetData(data, nodeType) {
|
|
1217
1217
|
const out = {};
|
|
1218
1218
|
for (const key of Object.keys(data)) {
|
|
1219
|
-
if (
|
|
1219
|
+
if (chunkBOCHNFDU_cjs.isExecutionDataKey(key, nodeType)) continue;
|
|
1220
1220
|
if (PRESET_EXCLUDED_KEYS.has(key)) continue;
|
|
1221
1221
|
out[key] = data[key];
|
|
1222
1222
|
}
|
|
@@ -1396,7 +1396,7 @@ function renderPlanPath(renderId, nodes, edges) {
|
|
|
1396
1396
|
edge = teleportInput(node.id);
|
|
1397
1397
|
continue;
|
|
1398
1398
|
}
|
|
1399
|
-
const mode = outputModeOf2(consumer.data) ??
|
|
1399
|
+
const mode = outputModeOf2(consumer.data) ?? chunk5DRSENY3_cjs.defaultEdgeOutputMode(node.type, edge.sourceHandle);
|
|
1400
1400
|
hops.unshift({ edge: consumer, each: mode === "each", ...node.type ? { source: node.type } : {} });
|
|
1401
1401
|
if (node.type === "edit-plan") return { planId: node.id, hops };
|
|
1402
1402
|
if (!EDL_PASS_THROUGH_TYPES.has(node.type ?? "")) return void 0;
|
|
@@ -1418,10 +1418,10 @@ function singlePick(clips, hop) {
|
|
|
1418
1418
|
const mode = outputModeOf2(hop.edge.data);
|
|
1419
1419
|
if (mode === "item") {
|
|
1420
1420
|
const expr = typeof data?.itemIndex === "string" ? data.itemIndex : "1";
|
|
1421
|
-
return [clips[
|
|
1421
|
+
return [clips[chunkBOCHNFDU_cjs.resolveIndex(expr, clips.length)] ?? clips[0]];
|
|
1422
1422
|
}
|
|
1423
1423
|
if (mode?.startsWith("item:")) return [clips[parseInt(mode.slice(5), 10)] ?? clips[0]];
|
|
1424
|
-
if (mode === "all") return
|
|
1424
|
+
if (mode === "all") return chunkBOCHNFDU_cjs.selectListItems(clips, data);
|
|
1425
1425
|
if (hop.source === "edit-plan") return keptClips(clips).slice(0, 1);
|
|
1426
1426
|
return clips.length === 1 ? clips : [];
|
|
1427
1427
|
}
|
|
@@ -1431,7 +1431,7 @@ function renderPlanValue(plan, row, hops = []) {
|
|
|
1431
1431
|
for (const [i, hop] of hops.entries()) {
|
|
1432
1432
|
if (clips.length === 0) return void 0;
|
|
1433
1433
|
if (hop.each) {
|
|
1434
|
-
clips =
|
|
1434
|
+
clips = chunkBOCHNFDU_cjs.selectListItems(clips, hop.edge.data);
|
|
1435
1435
|
if (i < hops.length - 1) clips = keptClips(clips);
|
|
1436
1436
|
} else {
|
|
1437
1437
|
clips = singlePick(clips, hop);
|
|
@@ -1462,7 +1462,7 @@ function renderLoneRow(renderId, nodes, edges, batchOf) {
|
|
|
1462
1462
|
const path = renderPlanPath(renderId, nodes, edges);
|
|
1463
1463
|
if (!path || path.hops.length < 2) return void 0;
|
|
1464
1464
|
const last = path.hops[path.hops.length - 1];
|
|
1465
|
-
if (!last.each || !
|
|
1465
|
+
if (!last.each || !chunkBOCHNFDU_cjs.isDefaultSelectorConfig(last.edge.data)) return void 0;
|
|
1466
1466
|
const passId = path.hops[path.hops.length - 2].edge.target;
|
|
1467
1467
|
const passNode = nodes.find((n) => n.id === passId);
|
|
1468
1468
|
const batch = passNode ? batchOf(passNode) : void 0;
|
|
@@ -1674,8 +1674,8 @@ var IDENTITY_TYPES_FOR_CLASSIFIER = /* @__PURE__ */ new Set([
|
|
|
1674
1674
|
"creature",
|
|
1675
1675
|
"location"
|
|
1676
1676
|
]);
|
|
1677
|
-
var VIDEO_SOURCE_TYPES_FOR_CLASSIFIER =
|
|
1678
|
-
var AUDIO_SOURCE_TYPES_FOR_CLASSIFIER = /* @__PURE__ */ new Set([...
|
|
1677
|
+
var VIDEO_SOURCE_TYPES_FOR_CLASSIFIER = chunk5DRSENY3_cjs.VIDEO_PRODUCER_TYPES;
|
|
1678
|
+
var AUDIO_SOURCE_TYPES_FOR_CLASSIFIER = /* @__PURE__ */ new Set([...chunk5DRSENY3_cjs.AUDIO_PRODUCER_TYPES, "youtube-video"]);
|
|
1679
1679
|
var DUAL_MODE_REVOICE_TARGETS = /* @__PURE__ */ new Set(["voice-changer", "voice-changer-pro", "dubbing"]);
|
|
1680
1680
|
function classifyLegacyTargetHandle(targetType, handle, sourceType, sentHandle = handle) {
|
|
1681
1681
|
if (!targetType) return handle;
|
|
@@ -1923,5 +1923,5 @@ exports.videoOverlayPassThrough = videoOverlayPassThrough;
|
|
|
1923
1923
|
exports.withListedReferenceTaskTypes = withListedReferenceTaskTypes;
|
|
1924
1924
|
exports.withRunOverrides = withRunOverrides;
|
|
1925
1925
|
exports.withWiredSettings = withWiredSettings;
|
|
1926
|
-
//# sourceMappingURL=chunk-
|
|
1927
|
-
//# sourceMappingURL=chunk-
|
|
1926
|
+
//# sourceMappingURL=chunk-4U7QAUV3.cjs.map
|
|
1927
|
+
//# sourceMappingURL=chunk-4U7QAUV3.cjs.map
|