framefields 2.15.0 → 2.16.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/cloud/index.d.mts.map +1 -1
- package/dist/components/index.d.mts +2 -2
- package/dist/{index-BnB_Ou2y.d.mts → index-Cq8jgdNY.d.mts} +89 -2
- package/dist/index-Cq8jgdNY.d.mts.map +1 -0
- package/dist/{index-DkAjKnhW.d.mts → index-Dg5BAtDq.d.mts} +50 -50
- package/dist/{index-DkAjKnhW.d.mts.map → index-Dg5BAtDq.d.mts.map} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/preview/index.d.mts +2 -2
- package/dist/preview/index.mjs +2 -2
- package/dist/{preview-BeGF1Bb1.mjs → preview-Dm912wly.mjs} +37 -2
- package/dist/preview-Dm912wly.mjs.map +1 -0
- package/dist/preview-engine/{chunk-VM2ZBPLM.mjs → chunk-VZUVB3BP.mjs} +1 -1
- package/dist/preview-engine/components.mjs +1 -1
- package/dist/preview-engine/framefields.mjs +1 -1
- package/dist/preview-engine/player.mjs +3 -3
- package/dist/preview-page/main.css +1 -1
- package/dist/preview-page/main.js +121 -122
- package/package.json +61 -61
- package/dist/index-BnB_Ou2y.d.mts.map +0 -1
- package/dist/preview-BeGF1Bb1.mjs.map +0 -1
|
@@ -633,7 +633,7 @@ ${C}`)});`}z.writeHead(200,{"content-type":"text/javascript; charset=utf-8","cac
|
|
|
633
633
|
data: ${JSON.stringify({session:A.session})}
|
|
634
634
|
|
|
635
635
|
`),u.add(z),clearTimeout(c),g||(g=!0,f(l===!1?"page opened":`page opened; the server stops ${Number((l/1e3).toFixed(1))} s after its last tab closes`)),ne?.(),L.on("close",()=>{u.delete(z),u.size===0&&l!==!1&&!U&&(c=setTimeout(()=>{u.size===0&&j("idle")},l))});return}if(L.method==="POST"&&q.pathname==="/takeover"&&L.headers[Tf]==="1"){ot(z,200,{ok:!0}),setImmediate(()=>{j("replaced")});return}if(L.method==="POST"&&q.pathname==="/@framefields/log"&&L.headers["content-type"]==="application/json"){let O=await kf(L,16384),{message:_,level:C}=JSON.parse(O),le=String(_??"").trim();le&&!b.has(le)&&b.size<200&&(b.add(le),f(`${C==="warning"?"warning":"error"} in the page: ${le}`)),z.writeHead(204).end();return}if(y&&q.pathname==="/@framefields/notes"){if(L.method==="GET"){ot(z,200,await y.list());return}if(L.method==="POST"&&L.headers["content-type"]==="application/json"){let O=JSON.parse(await kf(L,16777216)),_=T.then(()=>Jx(y,O,A.fps,f));T=_.catch(()=>{});let C=await _;E("notes",await y.list()),ot(z,C?200:404,C??{error:"no such note"});return}}if(L.method==="POST"&&q.pathname==="/audio/mix"){($.state==="browser"||$.state==="error")&&($={state:"mixing"},P()),ot(z,202,$);return}if(L.method==="GET"&&q.pathname==="/audio"){if($.state!=="ready"||!I){ot(z,404,{error:`audio is ${$.state}`});return}z.writeHead(200,{"content-type":"audio/wav","content-length":I.length,"cache-control":"no-store"}),z.end(I);return}let F=/^\/assets\/fonts\/([^/]+)$/.exec(q.pathname);if(F&&(L.method==="GET"||L.method==="HEAD")){let O=H.join(S.cwd(),"assets","fonts",decodeURIComponent(F[1]));if(await gu(O)){await mo(L,z,O);return}}if(L.method==="GET"||L.method==="HEAD"){let O=H.resolve(decodeURIComponent(q.pathname.replace(/^\/@fs(?=\/)/,"")));if(a.some(_=>hu(_,O))&&await gu(O)){await mo(L,z,O);return}if(M&&await rS(z,M,O,v,f))return}ot(z,404,{error:"not found"})}catch(F){z.headersSent?z.end():ot(z,500,{error:F instanceof Error?F.message:String(F)})}}),ne,pe=t.host??"127.0.0.1",ae=t.port??iS(),be=L=>new Promise((z,q)=>{let F=_=>{Z.off("listening",O),q(_)},O=()=>{Z.off("error",F),z()};Z.once("error",F),Z.once("listening",O),Z.listen(L,pe)});try{await be(ae)}catch(L){if(L.code!=="EADDRINUSE")throw L;if(await oS(pe,ae))await be(ae).catch(()=>be(0));else if(t.port===void 0)await be(0);else throw L}let{port:Ce}=Z.address(),me=`http://${pe.includes(":")?`[${pe}]`:pe}:${Ce}/`;if(R().catch(()=>{}),t.open===!0){let L=await new Promise(z=>{let q=setTimeout(()=>z(!1),2e3);ne=()=>{clearTimeout(q),z(!0)},u.size>0&&ne()});ne=void 0,L||aS(me)}return{url:me,closed:X,close:()=>j()}}async function Kx(e,t){let n=(await import(Wn(e).href))[t];if(n===void 0)throw new Error(`[framefields] ${e} has no export named "${t}" to preview.`);return typeof n=="function"?await n():n}function Qx(e){let t;for(let r=e;;r=H.dirname(r)){if(he.existsSync(H.join(r,".git")))return r;if(!t&&he.existsSync(H.join(r,"package.json"))&&(t=r),H.dirname(r)===r)return t??e}}async function Jx(e,t,r,n){if(t.op==="add"&&t.note&&String(t.note.text).trim()){let o=await e.add(t.note),a=[o.image&&`frame with the spot marked: ${o.image}`,`all notes: ${e.file}`];return n(`${xf(o,r)}
|
|
636
|
-
${a.filter(Boolean).join(" \xB7 ")}`),o}let i=Number(t.id);if(t.op==="update"){let o=await e.update(i,t);return o&&typeof t.done=="boolean"&&n(`note ${i} marked ${o.done?"done":"open"}`),o}if(t.op==="remove"){let o=await e.remove(i);return o&&n(`note ${i} deleted`),o}}function eS(e){return e instanceof Error?e.message:String(e)}function kf(e,t){return new Promise((r,n)=>{let i="";e.setEncoding("utf8"),e.on("data",o=>{i+=o,i.length>t&&(n(new Error("request body too large")),e.destroy())}),e.on("end",()=>r(i)),e.on("error",n)})}function hu(e,t){let r=H.relative(e,t);return!!r&&!r.startsWith("..")&&!H.isAbsolute(r)}async function gu(e){try{return(await he.promises.stat(e)).isFile()}catch{return!1}}var tS={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".webp":"image/webp",".gif":"image/gif",".svg":"image/svg+xml",".mp4":"video/mp4",".mov":"video/quicktime",".webm":"video/webm",".mp3":"audio/mpeg",".wav":"audio/wav",".m4a":"audio/mp4",".ogg":"audio/ogg",".ttf":"font/ttf",".otf":"font/otf",".woff":"font/woff",".woff2":"font/woff2",".json":"application/json",".html":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".map":"application/json",".js":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".wasm":"application/wasm",".onnx":"application/octet-stream",".srt":"text/plain; charset=utf-8",".txt":"text/plain; charset=utf-8"};async function rS(e,t,r,n,i){if(!t.entry(r))return!1;let o=await t.url(r);if(o)return e.writeHead(302,{location:o,"cache-control":"no-store"}),e.end(),!0;let a=H.relative(t.root,r);return n.has(a)||(n.add(a),i(`${a} is pinned on a private remote and there are no keys here: set its FRAMEFIELDS_STORAGE_* keys, give the remote a publicUrl, or \`npx framefields assets pull\``)),!1}async function mo(e,t,r,n=!1){let{size:i}=await he.promises.stat(r),o=tS[H.extname(r).toLowerCase()]??"application/octet-stream",a=/^bytes=(\d*)-(\d*)$/.exec(e.headers.range??""),u=0,l=i-1;if(a&&(a[1]||a[2])&&(a[1]?(u=Number(a[1]),a[2]&&(l=Math.min(l,Number(a[2])))):u=Math.max(0,i-Number(a[2])),u>l||u>=i)){t.writeHead(416,{"content-range":`bytes */${i}`}),t.end();return}if(t.writeHead(a?206:200,{"content-type":o,"content-length":l-u+1,"accept-ranges":"bytes","cache-control":n?"no-store":"no-cache",...a&&{"content-range":`bytes ${u}-${l}/${i}`}}),e.method==="HEAD"){t.end();return}he.createReadStream(r,{start:u,end:l}).pipe(t)}async function nS(e,t,r,n){let i=e.fps??24,o=e.durationMs??await e.computeDuration?.()??5e3;return{session:r,notesDir:n,title:t,fps:i,frameCount:Math.max(1,Math.round(o/1e3*i)),width:e.width??1920,height:e.height??1080}}function iS(){return 41e3+(0,po.createHash)("sha1").update(S.cwd()).digest().readUInt16BE(0)%900}async function oS(e,t){let r=await new Promise(n=>{let i=bu.default.request({host:e,port:t,method:"POST",path:"/takeover",agent:!1,headers:{[Tf]:"1"},timeout:1500},o=>{o.resume(),n(o.statusCode===200)});i.on("timeout",()=>i.destroy()),i.on("error",()=>n(!1)),i.end()});return r&&await new Promise(n=>setTimeout(n,150)),r}function ot(e,t,r){e.writeHead(t,{"content-type":"application/json","cache-control":"no-store"}),e.end(JSON.stringify(r))}function aS(e){let[t,r]=S.platform==="darwin"?["open",[e]]:S.platform==="win32"?["cmd",["/c","start","",e]]:["xdg-open",[e]];try{(0,Pf.spawn)(t,r,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}catch{}}function yu(e,t){return e&&(t&&!e.source&&Object.defineProperty(e,"source",{value:t,enumerable:!0,writable:!0,configurable:!0}),typeof e.section!="function"&&Object.defineProperty(e,"section",{value:(r,n)=>{if(typeof r=="object"&&r!==null&&!("kind"in r)&&!("inputHandleId"in r)&&!("src"in r)){let o=r.source??e.source??t;return B.section(o,e,r)}let i=r??e.source??t;return B.section(i,e,n)},enumerable:!1,writable:!0,configurable:!0}),typeof e.blurEffect!="function"&&Object.defineProperty(e,"blurEffect",{value:r=>new Ft({track:e,...r}),enumerable:!1,writable:!0,configurable:!0}),typeof e.isolate!="function"&&Object.defineProperty(e,"isolate",{value:(r,n)=>B.section(r,e,n),enumerable:!1,writable:!0,configurable:!0}),e)}var uS=Ur.attach;Ur.attach=function(e,t,r){let n=uS.call(this,e,t,r);if(n?.objects){let i=e,o=n.objects.get.bind(n.objects);n.objects.get=u=>yu(o(u),i);let a=n.objects.byCategory.bind(n.objects);n.objects.byCategory=(u,l)=>yu(a(u,l),i),n.objects.primary&&yu(n.objects.primary,i)}return n};var Mf=class e{virtualMedia;constructor(t,r="Video"){this.virtualMedia=Eu(t,r)}static video(t,r){let n=new e(t,"Video");return r&&Object.assign(n.virtualMedia.metadata,r),n}static image(t,r){let n=new e(t,"Image");return r&&Object.assign(n.virtualMedia.metadata,r),n}static lottie(t,r){let n=new e(t,"Lottie");return r&&Object.assign(n.virtualMedia.metadata,r),n}static audio(t,r){let n=new e(t,"Audio");return r&&Object.assign(n.virtualMedia.metadata,r),n}apply(t,r={}){let n;t instanceof pS||typeof t=="object"&&t!==null&&"op"in t?n=t.toOperation():n={op:t,...r};let i=Bu(this.virtualMedia,{...n,dataType:this.virtualMedia.operation.dataType});return new e(i)}toVirtualMedia(){return this.virtualMedia}async renderFrame(t={}){return(t.renderer??new ge.HeadlessMediaRenderer).renderFrame(this.virtualMedia,t)}get fps(){return this.virtualMedia.metadata?.fps??void 0}get durationMs(){return this.virtualMedia.metadata?.durationMs??void 0}get width(){return this.virtualMedia.metadata?.width??void 0}get height(){return this.virtualMedia.metadata?.height??void 0}async renderFrameGrid(t={}){return Tn(this,t)}async renderVideo(t={},r={}){let n=typeof t=="string"?{...r,outputPath:t}:t,o=await(n.renderer??new ge.HeadlessMediaRenderer).renderVideo(this.virtualMedia,n);return Df(o,n.outputPath)}};async function Df(e,t){if(!t)return e;let r=H.resolve(t);return await zr.mkdir(H.dirname(r),{recursive:!0}),await zr.copyFile(e.filePath,r),await e.cleanup(),{...e,filePath:r,cleanup:async()=>{}}}var Af=class e{width;height;fps;durationMs;backgroundColor;antialias3d;fonts;children=[];audioTracks=[];signals={};_frameHooks=[];_prepareHooks=[];_clipVision=new Map;_linking=!1;_mediaSignals;_visionConfig;_visionBundle;_effects=[];apply(t){return t instanceof wt?(this.withVision(t),this):(this._effects.push(t),this)}withVision(t={}){this._visionBundle??=new Vr({width:this.width,height:this.height,fps:this.fps});let r=t instanceof wt?t.config:t;return this._visionConfig={...r,visionBundle:this._visionBundle},this._visionBundle}vision(t,r={}){let n=typeof t=="string"?t:t.src??t.inputHandleId;if(typeof t!="string"){let a=this.toVirtualMedia({resolveMediaSignal:this.mediaSignalResolver(!0)}),u=Co(a.children).find(({vm:c})=>c.operation.id===t.id),l=u&&{operation:{...u.vm.operation,startFrame:u.startFrame}};if(!l)throw new Error("Add the media layer to the composition before calling comp.vision(layer)");r={startFrame:l.operation.startFrame??t.startFrame,trimStartSec:t.trimStartSec,timeRemap:l.operation.timeRemap,durationFrames:t.durationFrames,...r}}let i=`${n}\0${JSON.stringify({...r,timeRemap:Or(r.timeRemap)})}`,o=this._clipVision.get(i);return o||(o=new kn(n,this.fps,r),this._clipVision.set(i,o)),o}async prepareVision(t){this.linkClipLayers(),await Promise.all([...this._clipVision.values()].map(r=>r.ready(0,t)))}linkClipLayers(){let t,r=n=>{if(!n||typeof n!="object")return;let i=n;if(i.kind==="media"&&i.dataType==="Video"&&typeof i.inputHandleId=="string"&&i.vision instanceof wt&&!(No in i.vision)){t??=new Map(Co(this.toVirtualMedia().children).map(({vm:u,startFrame:l})=>{let c=u.operation;return[c.id,{startFrame:l,timeRemap:c.timeRemap}]}));let o=t.get(i.id),a=this.clipForLayer(i.src??i.inputHandleId,i.vision,{trimStartSec:i.trimStartSec,startFrame:o?.startFrame??i.startFrame,timeRemap:o?.timeRemap});a&&(i.vision.mode!=="skeleton"&&i.vision.mode!=="depth"&&a.keepSubjects(),Object.defineProperty(i.vision,No,{value:a,enumerable:!1,configurable:!0}))}if(Array.isArray(i.children))for(let o of i.children)r(o);r(i.matte?.node),r(i.relief?.node)};for(let n of this.children)r(n)}clipForLayer(t,r,n){let i=r.mode??"passthrough";if(i==="depth")return this.depthClip(t,n);let o=i==="skeleton";if(!(i!=="matte"&&i!=="mask"&&i!=="crop"&&!o)&&!(r.classes!==void 0||r.enableMatte===!0||r.visionBundle!==void 0||!o&&(r.matteSource==="selfie"||r.keyBackground===!0||r.enablePose===!0||(r.maskThreshold??.5)!==.5||r.featherRadius!==void 0)))for(let a of this._clipVision.values()){let u=a.options;if(a.source===t&&a.startFrame===(n.startFrame??0)&&a.trimStartSec===(n.trimStartSec??0)&&Or(u.timeRemap)===Or(n.timeRemap)&&(u.variant??"s")===(r.variant??"s")&&(u.confidence??.3)===(r.confidence??.3)){if(o&&!a.tracksPose){if(a.exact)throw new Error("A skeleton layer of a prompted comp.vision clip needs `pose: true` on that clip.");continue}return a}}}depthClip(t,r){for(let n of this._clipVision.values())if(n.tracksDepth&&n.source===t&&n.startFrame===(r.startFrame??0)&&n.trimStartSec===(r.trimStartSec??0)&&Or(n.options.timeRemap)===Or(r.timeRemap))return n;return this.vision(t,{depth:!0,...r.startFrame!==void 0&&{startFrame:r.startFrame},...r.trimStartSec!==void 0&&{trimStartSec:r.trimStartSec},...r.timeRemap!==void 0&&{timeRemap:r.timeRemap}})}async analyzeVisionSequence(t,r={}){let n=r.fps??this.fps,i=this.durationMs??await this.computeDuration(),o=r.totalFrames??Math.max(1,Math.round(i/1e3*n)),a=sr.create({modelsDir:r.modelsDir,baseUrl:r.baseUrl,...r.confidence!==void 0?{confidence:r.confidence}:{},...r.variant!==void 0?{variant:r.variant}:{}}),u=_r.getVideo(t,!0);async function*l(){for(let c=0;c<o;c++){let m=await u.getFrame(c/n);m?.buffer&&m.width>0&&m.height>0&&(yield{data:m.buffer,width:m.width,height:m.height})}}try{return await Oo(l(),{runner:a,source:t,fps:n,...r.tasks!==void 0?{tasks:r.tasks}:{},...r.categories!==void 0?{categories:r.categories}:{},...r.pathStride!==void 0?{pathStride:r.pathStride}:{},...r.includeMasks!==void 0?{includeMasks:r.includeMasks}:{},...r.iouThreshold!==void 0?{iouThreshold:r.iouThreshold}:{}})}finally{a.close(),u.destroy()}}onRequestFrame(t){return this._frameHooks.push(t),this}onPrepareFrame(t){return this._prepareHooks.push(t),this}notifyFrame(t){let r=this._mediaSignals?.framesBefore(t.frame)??[];return r.length===0?this.runFrame(t):(async()=>{for(let n of r)await this.runFrame($s(t,n));await this.runFrame(t)})()}runFrame(t){for(let n of this._frameHooks)n(t);let r=this._mediaSignals;if(r?.advance(t.frame),this.linkClipLayers(),this._clipVision.size===0&&this._prepareHooks.length===0){r?.reach(t.frame);return}return(async()=>{await this.prepareVision(t.frame);for(let n of this._prepareHooks)await n(t);r?.reach(t.frame)})()}async prepareMediaTime(){let t=this.durationMs??await this.computeDuration(),r=Math.round(t/1e3*this.fps)-1;!this._mediaSignals?.pending||r<0||await this.notifyFrame($s({frame:0,fps:this.fps,time:0,duration:t/1e3,durationMs:t,progress:0,deltaTime:1/this.fps},r))}mediaSignalResolver(t=this.hasFrameHooks(),r=this.durationMs,n=this.signals){return this._mediaSignals??=new Xi(this.fps),this._mediaSignals.resolver({live:t,compositionDurationFrames:Math.round((r??0)/1e3*this.fps),signals:n})}hasFrameHooks(){return this._frameHooks.length>0||this._prepareHooks.length>0||this._clipVision.size>0}constructor(t){this.width=t.width,this.height=t.height,this.fps=t.fps??60,this.durationMs=t.durationMs??(t.durationFrames!==void 0?t.durationFrames/this.fps*1e3:void 0),this.backgroundColor=t.backgroundColor??"#000000",this.antialias3d=t.antialias3d,this.fonts=t.fonts??[],this.signals=t.signals??{}}static create(t){return new e(t)}addSignal(t,r){return this.signals[t]=r,this}add(t,...r){if(t instanceof pr)this.children.push(t.toNode());else if(t instanceof Ur)this.children.push(t.toNode());else{if(t&&typeof t=="object"&&"node"in t)return this.add(t.node,...r),this;if(Array.isArray(t))for(let n of t)this.add(n);else{let n=t,i=r[0];if(i&&!(i instanceof pr)&&!Array.isArray(i)&&(i instanceof Q||"tracks"in i))return n.animation=i instanceof Q?i.toSpec():i,this.children.push(n),this;this.children.push(n)}}for(let n of r)n&&!(n instanceof Q)&&!("tracks"in n)&&this.add(n);return this}addAudio(t){return this.audioTracks.push(t),this}addSubjectSandwich(t){let r=typeof t.source=="string"?t.source:t.source.inputHandleId??"",n=t.fit??"cover",i=t.feather??4,o=i>1?i/100:i,a=t.variant??"s",u=B.video(r,{width:this.width,height:this.height,position:"absolute",x:0,y:0,fit:n,muted:t.muted??!1,volume:t.muted?0:t.volume??1});this.add(u);for(let c of t.behind)this.add(c);let l=B.video(r,{width:this.width,height:this.height,position:"absolute",x:0,y:0,fit:n,muted:!0,volume:0}).withVision({mode:"matte",enableSegmentation:!0,variant:a,confidence:t.confidence??.25,featherRadius:o,keyBackground:t.keyBackground??!0,backgroundKeyThreshold:t.backgroundKeyThreshold});return this.add(l),this}addSmartFraming(t){let r=typeof t.source=="string"?t.source:t.source.inputHandleId??"",n=Math.max(0,Math.min(.99,t.damping??.8)),i=t.leadHeadroom??.18,o=this.width,a=this.height,u=t.sourceAspect??16/9,l=o/a,c=l<u?Math.round(a*u):o,m=l<u?a:Math.round(o/u),d=o-c,p=a-m,f=t.target,b=new nr(x=>{if(d>=0)return 0;let A=f.center?.x?f.center.x.get(x):f.bounds?.centerX?f.bounds.centerX.get(x)/o:f.center?.screenX?f.center.screenX.get(x)/o:.5,R=Math.max(0,Math.min(1,A))*c,N=o/2-R;return Math.max(d,Math.min(0,N))},{fps:this.fps,label:"smart_framing_pan_x"}),g=new nr(x=>{if(p>=0)return 0;let A=f.center?.y?f.center.y.get(x):f.bounds?.centerY?f.bounds.centerY.get(x)/a:f.center?.screenY?f.center.screenY.get(x)/a:.5,R=Math.max(0,Math.min(1,A))*m,N=a*i-R;return Math.max(p,Math.min(0,N))},{fps:this.fps,label:"smart_framing_pan_y"}),y=new nr(x=>{let A=x.frame;if(A<=0)return b.get(x);let w=b.get({...x,frame:0,time:0}),R=1-n;for(let N=1;N<=A;N++){let V=b.get({...x,frame:N,time:N/x.fps});w=w+R*(V-w)}return w},{fps:this.fps,label:"smart_framing_smooth_x"}),T=new nr(x=>{let A=x.frame;if(A<=0)return g.get(x);let w=g.get({...x,frame:0,time:0}),R=1-n;for(let N=1;N<=A;N++){let V=g.get({...x,frame:N,time:N/x.fps});w=w+R*(V-w)}return w},{fps:this.fps,label:"smart_framing_smooth_y"}),M=B.box({width:o,height:a,overflow:"hidden",position:"relative"}),v=B.video(r,{width:c,height:m,position:"absolute",x:y,y:T,fit:t.fit??"cover",muted:t.muted??!1,volume:t.muted?0:t.volume??1});return M.children||(M.children=[]),M.children.push(v),this.add(M),this}addSubjectOutline(t,r={}){let n=r.blur??12,i=this.width,o=this.height,a=r.pulseSignal,u=a?new nr(m=>Math.max(0,Math.min(1,Number(a.get(m))||0)),{fps:this.fps,label:"outline_pulse"}):1,l=typeof r.source=="string"?r.source:r.source?.inputHandleId??"",c=B.box({width:i,height:o,position:"absolute",x:0,y:0,opacity:u});if(l){let m=B.video(l,{width:i,height:o,position:"absolute",x:0,y:0,fit:"cover",muted:!0,volume:0}).withVision({mode:"mask",enableSegmentation:!0});c.children||(c.children=[]),c.children.push(m)}return c.apply(new Ft({strength:n,blurType:"Gaussian"})),this.add(c),this}section(t,r,n){let i,o,a={},u=t!==null&&typeof t=="object"&&"bounds"in t,l=typeof t=="string"||t!==null&&typeof t=="object"&&("kind"in t||"src"in t||"inputHandleId"in t);if(l&&r&&typeof r=="object"&&"bounds"in r?(i=t,o=r,a=n??{}):l&&r?(i=t,a=r):u?(o=t,a=r??{},i=a.source??o.source):t&&typeof t=="object"&&(a=t,i=a.source),!i){let c=this.children.find(m=>m.kind==="media"&&(m.dataType==="Video"||m.dataType==="Image"));c&&(i=c)}return B.section(i??"",o??a,{compositionWidth:this.width,compositionHeight:this.height,...a})}addSection(t,r,n){let i=this.section(t,r,n);return this.add(i),i}async computeDuration(){if(this.durationMs!==void 0)return this.durationMs;let t=0,r=[];for(let n of[...this.children,...this.audioTracks]){if(n.kind==="media"){let i=n.inputHandleId;typeof i=="string"&&(n.dataType==="Video"||n.dataType==="Audio")&&r.push(i)}if(typeof n.durationFrames=="number"){let o=((typeof n.startFrame=="number"?n.startFrame:0)+n.durationFrames)/this.fps*1e3;o>t&&(t=o)}}for(let n of r)try{let o=await(await or.acquire(n)).computeDuration();if(Number.isFinite(o)&&o>0){let a=Math.round(o*1e3);a>t&&(t=a)}}catch{}return t>0?t:5e3}async registerFont(t,r){let n=await _e.register(t,r);return n.filePath&&!this.fonts.includes(n.filePath)&&this.fonts.push(n.filePath),this}async registerEmojiFont(t){return await _e.registerEmojiFont(t),this}toSpec(){let t=[...this.children,...this.audioTracks],r=_e.getRegisteredFontPaths(),n=Array.from(new Set([...this.fonts,...r]));return{width:this.width,height:this.height,fps:this.fps,mode:"Video",backgroundColor:this.backgroundColor,...this.antialias3d!==void 0&&{antialias3d:this.antialias3d},layout:t,fonts:n,signals:this.signals,...this._effects.length>0&&{effects:this._effects},...this._visionConfig&&{vision:this._visionConfig},...this.hasFrameHooks()&&{onRequestFrame:i=>this.notifyFrame(i)}}}toVirtualMedia(t={}){if(!this._linking){this._linking=!0;try{this.linkClipLayers()}finally{this._linking=!1}}let r=t.durationMs??this.durationMs,n=t.signals??this.signals;return Yn(this.toSpec(),{isVideoMode:!0,fps:this.fps,durationMs:r,signals:n,resolveMediaSignal:this.mediaSignalResolver(void 0,r,n),...this._effects.length>0&&{effects:this._effects},...this._visionConfig&&{vision:this._visionConfig},...t})}async toVirtualMediaAsync(t={}){let r=t.durationMs??this.durationMs??await this.computeDuration();this.durationMs=r;let n=t.signals??this.signals,i=Yn(this.toSpec(),{isVideoMode:!0,fps:this.fps,durationMs:r,signals:n,resolveMediaSignal:this.mediaSignalResolver(void 0,r,n),...this._effects.length>0&&{effects:this._effects},...this._visionConfig&&{vision:this._visionConfig},...t});return await el(i,this.fps),i}async renderFrame(t={}){let r=typeof t=="number"?{frame:t}:t,{frame:n}=Nt(r,this.fps);if(r.fps!==void 0&&r.fps!==this.fps)throw new Error(`Composition fps is ${this.fps}; cannot render at fps ${r.fps}.`);let i=this.toVirtualMedia();if(this.hasFrameHooks()){let a=n;await this.notifyFrame({frame:a,fps:this.fps,time:this.fps>0?a/this.fps:0,duration:(this.durationMs??0)/1e3,durationMs:this.durationMs??0,progress:this.durationMs&&this.durationMs>0?Math.max(0,Math.min(1,a/this.fps*1e3/this.durationMs)):0,deltaTime:this.fps>0?1/this.fps:0})}return(r.renderer??new ge.HeadlessMediaRenderer).renderFrame(i,{fps:this.fps,frame:n,renderId:r.renderId,format:r.format})}async renderFrameGrid(t={}){return Tn(this,t)}async renderVideo(t={},r={}){let n=typeof t=="string"?{...r,outputPath:t}:t,o=await(n.renderer??new ge.HeadlessMediaRenderer).renderVideo(this.toVirtualMedia(),n);if(o.qa){let a=this.lint(),u=[...o.qa.issues,...a.map(l=>({severity:l.severity,code:l.code,message:l.message,...l.layerId!==void 0&&{layerId:l.layerId}}))];o.qa={...o.qa,issues:u,passed:o.qa.passed&&!a.some(l=>l.severity==="error")}}return Df(o,n.outputPath)}lint(){return Ta(this.toSpec(),{emojiFont:_e.hasEmojiFont(),scatterCoverage:kp})}};function je(e){let t=e,r=t;r.rotationX!==void 0&&(r.rotateX===void 0&&(r.rotateX=r.rotationX),delete r.rotationX),r.rotationY!==void 0&&(r.rotateY===void 0&&(r.rotateY=r.rotationY),delete r.rotationY),r.rotationZ!==void 0&&(r.rotateZ===void 0&&(r.rotateZ=r.rotationZ),delete r.rotationZ),t.animation instanceof Q&&(t.animation=t.animation.toSpec()),Object.defineProperty(t,"animate",{value:(...i)=>{let o=i.flat().flatMap(c=>c instanceof Q?c.tracks:c.tracks??[]),a=t.animation,u=a?.tracks??[],l=i.flat().map(c=>c.frameStep).filter(c=>c!==void 0).at(-1)??a?.frameStep;return t.animation={tracks:Hr([...u,...o]),...l!==void 0&&l>1&&{frameStep:l}},t},enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"pinToLandmark",{value:(i,o)=>(Eo(t,i,o),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"pinToObject",{value:(i,o)=>(Bo(t,i,o),t),enumerable:!1,writable:!0,configurable:!0});let n=(i,o)=>(t.matte={node:i,...o&&{mode:o}},t);for(let i of["withMatte","withMask"])Object.defineProperty(t,i,{value:n,enumerable:!1,writable:!0,configurable:!0});return Object.defineProperty(t,"withRelief",{value:(i,o={})=>(t.relief={node:i,...o},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withPbrGlass",{value:i=>(t.glass=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"deformWithAudio",{value:i=>(t.audioDeform=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withCrop",{value:i=>(t.crop=i instanceof Wr?i:new Wr(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withVision",{value:i=>(t.vision=i instanceof wt?i:new wt(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withRelighting",{value:i=>(t.relighting=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"relight",{value:i=>(t.relighting=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withDeflicker",{value:i=>(t.deflicker=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"apply",{value:i=>(t.effects||(t.effects=[]),t.effects.push(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withEffect",{value:i=>(t.effects||(t.effects=[]),t.effects.push(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withEffects",{value:i=>(t.effects||(t.effects=[]),t.effects.push(...i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"section",{value:(i={},o)=>i!==null&&typeof i=="object"&&"bounds"in i?B.section(t,i,o):B.section(t,i),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"blurRegion",{value:(i,o)=>{let a=new Ft({track:i,strength:o?.strength??25,shape:o?.shape??"ellipse",...o});return t.effects||(t.effects=[]),t.effects.push(a),t},enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withBlurRegion",{value:(i,o)=>t.blurRegion(i,o),enumerable:!1,writable:!0,configurable:!0}),cS(t),t}var lS=[{prop:"roughness",fallback:.5},{prop:"metallic",fallback:0},{prop:"emissiveIntensity",fallback:1},{prop:"clearcoat",fallback:0},{prop:"clearcoatRoughness",fallback:.08},{prop:"anisotropy",fallback:0},{prop:"anisotropyRotation",fallback:0},{prop:"subsurface",fallback:0},{prop:"sheen",fallback:0},{prop:"sheenRoughness",fallback:.5},{prop:"iridescence",fallback:0},{prop:"iridescenceThickness",fallback:400},{prop:"iridescenceIor",fallback:1.3},{prop:"triplanarScale",fallback:1},{prop:"triplanarSharpness",fallback:4}];function cS(e){let t=e,r;for(let{prop:n,fallback:i}of lS){let o=t[n];Ln(o)&&(r??=Q.create(),r.signal(n,o),t[n]=i)}r&&e.animate(r)}var B={video:(e,t={})=>je({id:t.id??Y("video"),kind:"media",inputHandleId:e,dataType:"Video",fit:t.fit??"cover",...t}),image:(e,t={})=>(typeof e=="string"&&(/\.(json|lottie)(\?.*)?$/i.test(e)||e.startsWith("data:application/json")?console.warn(`[Layer.image] '${e}' is a Lottie vector animation, not a static image. Use Layer.lottie('${e}', options) instead.`):/\.(mp4|mov|webm|mkv)(\?.*)?$/i.test(e)?console.warn(`[Layer.image] '${e}' is a video file, not a static image. Use Layer.video('${e}', options) instead.`):/\.(mp3|wav|ogg|m4a|aac)(\?.*)?$/i.test(e)&&console.warn(`[Layer.image] '${e}' is an audio file, not a static image. Use Layer.audio('${e}', options) instead.`)),je({id:t.id??Y("img"),kind:"media",inputHandleId:e,dataType:"Image",fit:t.fit??"cover",...t})),svg:(e,t={})=>je({id:t.id??Y("svg"),kind:"media",inputHandleId:e,dataType:"SVG",fit:t.fit??"contain",...t}),lottie:(e,t={})=>je({id:t.id??Y("lottie"),kind:"media",inputHandleId:e,dataType:"Lottie",fit:t.fit??"contain",...t}),audio:(e,t={})=>je({id:t.id??Y("audio"),kind:"media",inputHandleId:e,dataType:"Audio",volume:t.volume??1,...t}),text:(e,t={})=>{let r=Array.isArray(e),n=!r&&typeof e=="object"&&e!==null,i=n?e:t,o="",a=i.spans;if(r){let u=bi(e);o=u.text,a=u.spans}else n?i.spans&&!i.text?o=bi(i.spans).text:o=i.text??"":o=typeof e=="string"?e:String(e??"");return je({id:i.id??Y("text"),kind:"text",fontFamily:i.fontFamily??_e.getAll()[0]?.family??"Inter",fontSize:i.fontSize??48,fill:i.fill??"#ffffff",...i,text:i.text??o,spans:i.spans??a})},caption:(e,t={})=>je({id:t.id??Y("caption"),kind:"media",inputHandleId:e,dataType:t.dataType??"Caption",fontFamily:t.fontFamily??_e.getAll()[0]?.family??"Inter",fontSize:t.fontSize??48,fill:t.fill??"#ffffff",...t}),shape:(e="rect",t={})=>{let{fill:r,...n}=t;return je({id:n.id??Y("shape"),kind:"shape",shapeType:n.shapeType??e,...n,fillColor:n.fillColor??r??"#3b82f6"})},flex:(e={})=>je({id:e.id??Y("flex"),kind:"flex",dir:e.dir??"column",children:e.children??[],...e}),box:(e={})=>je({id:e.id??Y("box"),kind:"box",background:e.background??"transparent",children:e.children??[],...e}),particles:e=>{let t=new Pn(e),r={metadata:{width:e.width,height:e.height},operation:{...t.toOperation(),effect:t,dataType:"Video"},children:[]};return je({id:e.id??Y("particles"),kind:"media",dataType:"Video",src:r,position:"absolute",x:e.x??0,y:e.y??0,width:e.width,height:e.height,...e.startFrame!==void 0&&{startFrame:e.startFrame},...e.durationFrames!==void 0&&{durationFrames:e.durationFrames},...e.zIndex!==void 0&&{zIndex:e.zIndex}})},vfx:e=>{let{x:t,y:r,id:n,startFrame:i,durationFrames:o,zIndex:a,...u}=e,l=new Xo({outputType:"Video",...u}),c={metadata:{width:e.width,height:e.height},operation:{...l.toOperation(),effect:l,dataType:"Video"},children:[]};return je({id:n??Y("vfx"),kind:"media",dataType:"Video",src:c,position:"absolute",x:t??0,y:r??0,width:e.width,height:e.height,...i!==void 0&&{startFrame:i},...o!==void 0&&{durationFrames:o},...a!==void 0&&{zIndex:a}})},section:(e,t={},r={})=>{let n=e;if(e&&typeof e=="object"&&"toSpec"in e&&"children"in e){let w=(e.children||[]).find(R=>R.kind==="media"&&(R.dataType==="Video"||R.dataType==="Image"));w&&(n=w)}let i=t!==null&&typeof t=="object"&&"bounds"in t,o=i?r:t,a=i?t:void 0,u=o.padding??0,l=typeof n=="string"?n:n?.inputHandleId??n?.src??"",c=typeof n=="object"&&n?.dataType?n.dataType:"Video",m=o.compositionWidth??o.compWidth??(i?o.width:void 0)??1920,d=o.compositionHeight??o.compHeight??(i?o.height:void 0)??1080,p=Array.isArray(o.effects)?[...o.effects]:o.effects?[o.effects]:[],f=a?a.bounds.screenX.multiply(-1).add(u):typeof o.x=="number"?-o.x:o.x&&typeof o.x.multiply=="function"?o.x.multiply(-1):0,b=a?a.bounds.screenY.multiply(-1).add(u):typeof o.y=="number"?-o.y:o.y&&typeof o.y.multiply=="function"?o.y.multiply(-1):0,g=(c==="Image"?B.image(l,{position:"absolute",width:m,height:d,fit:o.fit??"cover",x:f,y:b}):B.video(l,{position:"absolute",width:m,height:d,fit:o.fit??"cover",x:f,y:b})).withEffects(p),y=a?a.bounds.screenWidth.add(u*2):o.width!==void 0?o.width:m,T=a?a.bounds.screenHeight.add(u*2):o.height!==void 0?o.height:d,M=[g,...o.children??[]],v=o.id??(a?Y(`section-track-${a.trackId}`):Y("section")),x=B.box({id:v,position:o.position??"absolute",width:y,height:T,x:a?void 0:o.x,y:a?void 0:o.y,borderRadius:o.borderRadius??0,borderColor:o.borderColor,borderWidth:o.borderWidth,opacity:o.opacity??1,overflow:"hidden",children:M});a&&(x=x.pinToObject(a,{anchor:"topLeft",offsetX:-u,offsetY:-u,hideWhenLost:o.hideWhenLost??!0,smoothFrames:o.smoothFrames}));let A=x;return Object.defineProperty(A,"innerMedia",{value:g,enumerable:!0,writable:!1}),Object.defineProperty(A,"effects",{get:()=>p,enumerable:!0}),Object.defineProperty(A,"addEffect",{value:w=>(p.push(w),g.effects=p,A),enumerable:!0,writable:!1}),Object.defineProperty(A,"withEffect",{value:w=>A.addEffect(w),enumerable:!0,writable:!1}),Object.defineProperty(A,"withEffects",{value:w=>{for(let R of w)A.addEffect(R);return A},enumerable:!0,writable:!1}),A},trackedRegion:(e,t,r={})=>B.section(e,t,r),blurTrackedRegion:(e,t,r={})=>{let{padding:n,borderRadius:i,borderColor:o,borderWidth:a,...u}=r;return B.section(e,t,{padding:n??8,borderRadius:i??12,borderColor:o,borderWidth:a,effects:[new Ft({strength:u.strength??25,blurType:u.blurType??"Gaussian",...u})]})},chart:(e,t={})=>ip(e,t,_e.getAll()[0]?.family??"Inter"),camera:(e={})=>{let{fov:t,focalLength:r,sensorWidth:n,near:i,far:o,zoom:a,lens:u,...l}=e,m=t!==void 0||r!==void 0||n!==void 0||i!==void 0||o!==void 0||a!==void 0||u!==void 0?{...u,...t!==void 0&&{fov:t},...r!==void 0&&{focalLength:r},...n!==void 0&&{sensorWidth:n},...i!==void 0&&{near:i},...o!==void 0&&{far:o},...a!==void 0&&{zoom:a}}:void 0;return je({id:l.id??Y("camera"),kind:"camera",mode:l.mode??"lookAt",pitch:l.pitch??0,yaw:l.yaw??0,roll:l.roll??0,...l,...m!==void 0&&{lens:m}})},light:(e={})=>rr({id:e.id??Y("light"),kind:"light",lightType:e.lightType??"point",color:e.color??"#ffffff",intensity:1},e),ambientLight:(e="#ffffff",t=.5,r={})=>nt.ambient(e,t,r),sequence:(e,t)=>Ap(e,t),environment:(e="studio",t={})=>nt.environment(e,t),directionalLight:(e={})=>nt.directional(e),pointLight:(e={})=>nt.point(e),spotLight:(e={})=>nt.spot(e),rectLight:(e={})=>nt.rect(e),cube:e=>we.cube(e),carousel3d:e=>we.carousel(e),plane3d:e=>we.plane(e),prism3d:(e={})=>we.prism(e),model:(e={})=>je({id:e.id??Y("model3d"),kind:"model3d",is3D:e.is3D??!0,modelFormat:e.modelFormat??"auto",loop:e.loop??!0,scale:e.scale??1,scaleX:e.scaleX??1,scaleY:e.scaleY??1,scaleZ:e.scaleZ??1,opacity:e.opacity??1,...e}),obj:(e,t={})=>B.model({src:e,modelFormat:"obj",...t}),fbx:(e,t={})=>B.model({src:e,modelFormat:"fbx",...t}),gltf:(e,t={})=>B.model({src:e,modelFormat:"gltf",...t}),glb:(e,t={})=>B.model({src:e,modelFormat:"glb",...t}),stl:(e,t={})=>B.model({src:e,modelFormat:"stl",...t}),ply:(e,t={})=>B.model({src:e,modelFormat:"ply",...t}),vox:(e,t={})=>B.model({src:e,modelFormat:"vox",...t}),threeDS:(e,t={})=>B.model({src:e,modelFormat:"3ds",...t}),off:(e,t={})=>B.model({src:e,modelFormat:"off",...t})};function mS(e){return/\.(hdr|exr)$/i.test(e)}var dS=[{prop:"intensity",fallback:1},{prop:"x",fallback:0},{prop:"y",fallback:0},{prop:"z",fallback:0},{prop:"targetX",fallback:0},{prop:"targetY",fallback:0},{prop:"targetZ",fallback:0},{prop:"radius",fallback:1e3},{prop:"angle",fallback:45},{prop:"penumbra",fallback:.2},{prop:"decay",fallback:1},{prop:"width",fallback:240},{prop:"height",fallback:140},{prop:"rotation",fallback:0},{prop:"exposure",fallback:0},{prop:"volumetricFogDensity",fallback:.02},{prop:"volumetricFogAnisotropy",fallback:.55},{prop:"volumetricFogNoiseStrength",fallback:.45}];function Ln(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.get=="function"||typeof t.inputHandleId=="string"||typeof t.gpuBinding=="object"}function rr(e,t){let r={...e,...t},n=[];for(let{prop:a,fallback:u}of dS){let l=r[a];if(Ln(l)){n.push([a,l]);let c=e[a];r[a]=typeof c=="number"?c:u}}let i=r.volumetricFog;if(i&&typeof i=="object"){let a={...i};if(Ln(a.density)&&(n.push(["volumetricFogDensity",a.density]),a.density=.02),Ln(a.anisotropy)&&(n.push(["volumetricFogAnisotropy",a.anisotropy]),a.anisotropy=.55),a.noise&&typeof a.noise=="object"){let u={...a.noise};Ln(u.strength)&&(n.push(["volumetricFogNoiseStrength",u.strength]),u.strength=.45),a.noise=u}r.volumetricFog=a}let o=je(r);if(n.length>0){let a=Q.create();for(let[u,l]of n)a.signal(u,l);o=o.animate(a)}return o}var nt={environment:(e="studio",t={})=>{let n={...typeof e!="string"?e:mS(e)?{hdri:e}:{preset:e},...t};return rr({id:n.id??Y("environment"),kind:"light",lightType:"environment",preset:"studio",intensity:1},n)},ambient:(e="#ffffff",t=.5,r={})=>{let n={color:typeof e=="string"?e:e.color??"#ffffff",intensity:t,...typeof e=="object"&&e,...r};return rr({id:n.id??Y("light-ambient"),kind:"light",lightType:"ambient",color:"#ffffff",intensity:.5},n)},directional:(e={})=>rr({id:e.id??Y("light-directional"),kind:"light",lightType:"directional",color:e.color??"#ffffff",intensity:1,x:0,y:-1e3,z:-1e3,targetX:0,targetY:0,targetZ:0},e),point:(e={})=>rr({id:e.id??Y("light-point"),kind:"light",lightType:"point",color:e.color??"#ffffff",intensity:1,x:0,y:0,z:-500,radius:1e3,decay:1},e),spot:(e={})=>rr({id:e.id??Y("light-spot"),kind:"light",lightType:"spot",color:e.color??"#ffffff",intensity:1,x:0,y:-500,z:-1e3,targetX:0,targetY:0,targetZ:0,angle:45,penumbra:.2,radius:2e3,decay:1},e),rect:(e={})=>rr({id:e.id??Y("light-rect"),kind:"light",lightType:"rect",color:e.color??"#ffffff",intensity:1,x:0,y:-300,z:-800,targetX:0,targetY:0,targetZ:0,width:240,height:140,twoSided:!1,radius:2e3,decay:1.5},e)};function LN(e,t={},r={}){return B.section(e,t,r)}function EN(e,t,r={}){return typeof e=="object"&&"blurRegion"in e?e.blurRegion(t,r):B.blurTrackedRegion(e,t,r)}function BN(e,t,r={}){return B.section(e,t,r)}var pS=Object.assign(ir,Zo,{blur:e=>new Ft(e),vignette:e=>new lr(e),colorBalance:e=>new zo(e),colorKey:e=>new _o(e),levels:e=>new qo(e),filmGrain:e=>new lt(e),curves:e=>new Qo(e),selectiveColor:e=>new Jo(e),gradientMap:e=>new Lt(e),shadowsHighlights:e=>new ea(e),applyLut:e=>new ta(e),unsharpMask:e=>new ra(e),highPass:e=>new na(e),halftoneScreen:e=>new Gr(e),tileOffset:e=>new ia(e),motionBlur:e=>new oa(e),ssao:e=>new aa(e),pbrGlass:e=>new sa(e),depthOfField:e=>new ua(e),crop:e=>new Wr(e),vision:e=>new wt(e),relight3d:e=>new la(e),modulate:e=>new ma(e),deflicker:e=>new ca(e),custom:(e,t={})=>new Ko(e,t)});var fS=/\.(png|jpe?g|webp|gif|avif|tiff?|bmp)(\?.*)?$/i,hS=/\.svg(\?.*)?$/i;function gS(e){let t=r=>r?{...r,enabled:!0}:void 0;return new Wo({...e.dropShadow&&{dropShadow:t(e.dropShadow)},...e.outerGlow&&{outerGlow:t(e.outerGlow)},...e.innerShadow&&{innerShadow:t(e.innerShadow)},...e.stroke&&{stroke:t(e.stroke)}})}function bS(e,t){let r=Math.max(16,Math.round(e)),n=Math.max(16,Math.round(t));return`data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${n}"><rect width="${r}" height="${n}" fill="#808080"/></svg>`)}`}var Rf={box:e=>B.box(e),flex:e=>B.flex(e),text:(e,t)=>B.text(e,t),shape:(e,t)=>B.shape(e,t),measure:(e,t)=>_e.measure(e,t),fonts:()=>_e.getAll().map(e=>e.family),autoId:Y,media:(e,t)=>hS.test(e)?B.svg(e,t):fS.test(e)?B.image(e,t):B.video(e,{muted:!0,...t}),style:(e,t)=>(e.withEffect(gS(t)),e),cutout:(e,{mode:t="person",...r})=>B.video(e,{muted:!0,volume:0,fit:"cover",...r}).withVision({mode:"matte",enableSegmentation:!0,variant:t==="subject"?"m":"s",confidence:.25,featherRadius:.04,keyBackground:!0}),particles:e=>B.particles(e),signal:(e,t)=>Cu([...e],t),grain:({id:e,x:t,y:r,width:n,height:i,strength:o,size:a})=>B.svg(bS(n,i),{id:e,position:"absolute",x:t,y:r,width:n,height:i,fit:"fill",blendMode:"soft-light"}).withEffect(new lt({strength:o,...a!==void 0&&{size:a},shadows:1,midtones:1,highlights:1})),extrudedText:({fontWeight:e,...t})=>we.extrudedText({...t,...e!==void 0&&{fontWeight:String(e)},align:"center",verticalAlign:"middle"}),matte:(e,t,r="alpha")=>(e.withMatte(t,r),e)};h();async function Cf(e,t={}){let r=await Ju(e);if(!r||r.channels.length===0)throw new Error(`analyzeAudio: could not decode audio from ${e}`);return _c(r.channels,r.sampleRate,t)}function sS(e){return Jc(Rf,e)}export{ha as a,bl as b,yl as c,xl as d,Vf as e,Uf as f,Sl as g,ga as h,$f as i,wl as j,Gf as k,vl as l,ba as m,kl as n,Pl as o,Tl as p,Ml as q,Al as r,Cl as s,ya as t,Yr as u,Dl as v,Rl as w,cr as x,Ol as y,Nl as z,Fl as A,Ll as B,ei as C,ti as D,El as E,Bl as F,ri as G,Il as H,jl as I,zl as J,_l as K,Vl as L,Ul as M,$l as N,mr as O,Wf as P,xa as Q,Sa as R,wa as S,va as T,ka as U,G1 as V,W1 as W,X1 as X,Hr as Y,Q as Z,pa as _,Ta as $,Ca as aa,oc as ba,ac as ca,sc as da,lc as ea,wh as fa,cc as ga,mc as ha,dc as ia,pc as ja,fc as ka,hc as la,gc as ma,bc as na,yc as oa,xc as pa,Sc as qa,wc as ra,vc as sa,kc as ta,Pc as ua,Tc as va,Mc as wa,Ac as xa,Cc as ya,Oh as za,Dc as Aa,Oa as Ba,Nh as Ca,Rc as Da,Oc as Ea,Nc as Fa,Fh as Ga,Fc as Ha,Xr as Ia,Na as Ja,tn as Ka,rn as La,nn as Ma,pr as Na,Ge as Oa,an as Pa,Ga as Qa,zg as Ra,_g as Sa,Vg as Ta,Ug as Ua,$g as Va,Gg as Wa,Wg as Xa,Hg as Ya,Yg as Za,Xg as _a,Zg as $a,qg as ab,bi as bb,Kg as cb,np as db,ap as eb,_s as fb,kn as gb,Yi as hb,Pn as ib,Ys as jb,Xs as kb,Tn as lb,ge as mb,we as nb,Mp as ob,Q0 as pb,An as qb,Fr as rb,Cn as sb,Dn as tb,Lr as ub,wx as vb,vx as wb,qx as xb,jh as yb,ai as zb,Zr as Ab,Fa as Bb,zh as Cb,_h as Db,Sw as Eb,Ec as Fb,Bc as Gb,Wh as Hb,_c as Ib,Tw as Jb,Mw as Kb,Aw as Lb,Vc as Mb,Rw as Nb,ui as Ob,Yh as Pb,Ow as Qb,Nw as Rb,qr as Sb,Ew as Tb,Bw as Ub,Uc as Vb,La as Wb,li as Xb,$c as Yb,Iw as Zb,Ba as _b,Zh as $b,Kr as ac,$w as bc,Gw as cc,Ww as dc,Hw as ec,ci as fc,Yw as gc,qh as hc,Kh as ic,Xw as jc,Zw as kc,qw as lc,Qr as mc,ja as nc,Hc as oc,Yc as pc,Zc as qc,Jr as rc,ov as sc,Jh as tc,eg as uc,rg as vc,dv as wc,ig as xc,og as yc,Jc as zc,$a as Ac,em as Bc,tm as Cc,rm as Dc,hv as Ec,dt as Fc,gv as Gc,wv as Hc,en as Ic,vv as Jc,kv as Kc,Pv as Lc,Tv as Mc,Mv as Nc,Av as Oc,di as Pc,Ov as Qc,Nv as Rc,Fv as Sc,Lv as Tc,Ev as Uc,Bv as Vc,Iv as Wc,fg as Xc,_v as Yc,$v as Zc,Yv as _c,hg as $c,Kv as ad,Qv as bd,t1 as cd,im as dd,gg as ed,om as fd,o1 as gd,xg as hd,vg as id,sm as jd,a1 as kd,l1 as ld,Cf as md,sS as nd,Mf as od,Af as pd,B as qd,nt as rd,LN as sd,EN as td,BN as ud,pS as vd};
|
|
636
|
+
${a.filter(Boolean).join(" \xB7 ")}`),o}let i=Number(t.id);if(t.op==="update"){let o=await e.update(i,t);return o&&typeof t.done=="boolean"&&n(`note ${i} marked ${o.done?"done":"open"}`),o}if(t.op==="remove"){let o=await e.remove(i);return o&&n(`note ${i} deleted`),o}}function eS(e){return e instanceof Error?e.message:String(e)}function kf(e,t){return new Promise((r,n)=>{let i="";e.setEncoding("utf8"),e.on("data",o=>{i+=o,i.length>t&&(n(new Error("request body too large")),e.destroy())}),e.on("end",()=>r(i)),e.on("error",n)})}function hu(e,t){let r=H.relative(e,t);return!!r&&!r.startsWith("..")&&!H.isAbsolute(r)}async function gu(e){try{return(await he.promises.stat(e)).isFile()}catch{return!1}}var tS={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".webp":"image/webp",".gif":"image/gif",".svg":"image/svg+xml",".mp4":"video/mp4",".mov":"video/quicktime",".webm":"video/webm",".mp3":"audio/mpeg",".wav":"audio/wav",".m4a":"audio/mp4",".ogg":"audio/ogg",".ttf":"font/ttf",".otf":"font/otf",".woff":"font/woff",".woff2":"font/woff2",".json":"application/json",".html":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".map":"application/json",".js":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".wasm":"application/wasm",".onnx":"application/octet-stream",".srt":"text/plain; charset=utf-8",".txt":"text/plain; charset=utf-8"};async function rS(e,t,r,n,i){if(!t.entry(r))return!1;let o=await t.url(r);if(o)return e.writeHead(302,{location:o,"cache-control":"no-store"}),e.end(),!0;let a=H.relative(t.root,r);return n.has(a)||(n.add(a),i(`${a} is pinned on a private remote and there are no keys here: set its FRAMEFIELDS_STORAGE_* keys, give the remote a publicUrl, or \`npx framefields assets pull\``)),!1}async function mo(e,t,r,n=!1){let{size:i}=await he.promises.stat(r),o=tS[H.extname(r).toLowerCase()]??"application/octet-stream",a=/^bytes=(\d*)-(\d*)$/.exec(e.headers.range??""),u=0,l=i-1;if(a&&(a[1]||a[2])&&(a[1]?(u=Number(a[1]),a[2]&&(l=Math.min(l,Number(a[2])))):u=Math.max(0,i-Number(a[2])),u>l||u>=i)){t.writeHead(416,{"content-range":`bytes */${i}`}),t.end();return}if(t.writeHead(a?206:200,{"content-type":o,"content-length":l-u+1,"accept-ranges":"bytes","cache-control":n?"no-store":"no-cache",...a&&{"content-range":`bytes ${u}-${l}/${i}`}}),e.method==="HEAD"){t.end();return}he.createReadStream(r,{start:u,end:l}).pipe(t)}async function nS(e,t,r,n){let i=e.fps??24,o=e.durationMs??await e.computeDuration?.()??5e3;return{session:r,notesDir:n,title:t,fps:i,frameCount:Math.max(1,Math.round(o/1e3*i)),width:e.width??1920,height:e.height??1080}}function iS(){return 41e3+(0,po.createHash)("sha1").update(S.cwd()).digest().readUInt16BE(0)%900}async function oS(e,t){let r=await new Promise(n=>{let i=bu.default.request({host:e,port:t,method:"POST",path:"/takeover",agent:!1,headers:{[Tf]:"1"},timeout:1500},o=>{o.resume(),n(o.statusCode===200)});i.on("timeout",()=>i.destroy()),i.on("error",()=>n(!1)),i.end()});return r&&await new Promise(n=>setTimeout(n,150)),r}function ot(e,t,r){e.writeHead(t,{"content-type":"application/json","cache-control":"no-store"}),e.end(JSON.stringify(r))}function aS(e){let[t,r]=S.platform==="darwin"?["open",[e]]:S.platform==="win32"?["cmd",["/c","start","",e]]:["xdg-open",[e]];try{(0,Pf.spawn)(t,r,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}catch{}}function yu(e,t){return e&&(t&&!e.source&&Object.defineProperty(e,"source",{value:t,enumerable:!0,writable:!0,configurable:!0}),typeof e.section!="function"&&Object.defineProperty(e,"section",{value:(r,n)=>{if(typeof r=="object"&&r!==null&&!("kind"in r)&&!("inputHandleId"in r)&&!("src"in r)){let o=r.source??e.source??t;return B.section(o,e,r)}let i=r??e.source??t;return B.section(i,e,n)},enumerable:!1,writable:!0,configurable:!0}),typeof e.blurEffect!="function"&&Object.defineProperty(e,"blurEffect",{value:r=>new Ft({track:e,...r}),enumerable:!1,writable:!0,configurable:!0}),typeof e.isolate!="function"&&Object.defineProperty(e,"isolate",{value:(r,n)=>B.section(r,e,n),enumerable:!1,writable:!0,configurable:!0}),e)}var uS=Ur.attach;Ur.attach=function(e,t,r){let n=uS.call(this,e,t,r);if(n?.objects){let i=e,o=n.objects.get.bind(n.objects);n.objects.get=u=>yu(o(u),i);let a=n.objects.byCategory.bind(n.objects);n.objects.byCategory=(u,l)=>yu(a(u,l),i),n.objects.primary&&yu(n.objects.primary,i)}return n};var Mf=class e{virtualMedia;constructor(t,r="Video"){this.virtualMedia=Eu(t,r)}static video(t,r){let n=new e(t,"Video");return r&&Object.assign(n.virtualMedia.metadata,r),n}static image(t,r){let n=new e(t,"Image");return r&&Object.assign(n.virtualMedia.metadata,r),n}static lottie(t,r){let n=new e(t,"Lottie");return r&&Object.assign(n.virtualMedia.metadata,r),n}static audio(t,r){let n=new e(t,"Audio");return r&&Object.assign(n.virtualMedia.metadata,r),n}apply(t,r={}){let n;t instanceof pS||typeof t=="object"&&t!==null&&"op"in t?n=t.toOperation():n={op:t,...r};let i=Bu(this.virtualMedia,{...n,dataType:this.virtualMedia.operation.dataType});return new e(i)}toVirtualMedia(){return this.virtualMedia}async renderFrame(t={}){return(t.renderer??new ge.HeadlessMediaRenderer).renderFrame(this.virtualMedia,t)}get fps(){return this.virtualMedia.metadata?.fps??void 0}get durationMs(){return this.virtualMedia.metadata?.durationMs??void 0}get width(){return this.virtualMedia.metadata?.width??void 0}get height(){return this.virtualMedia.metadata?.height??void 0}async renderFrameGrid(t={}){return Tn(this,t)}async renderVideo(t={},r={}){let n=typeof t=="string"?{...r,outputPath:t}:t,o=await(n.renderer??new ge.HeadlessMediaRenderer).renderVideo(this.virtualMedia,n);return Df(o,n.outputPath)}};async function Df(e,t){if(!t)return e;let r=H.resolve(t);return await zr.mkdir(H.dirname(r),{recursive:!0}),await zr.copyFile(e.filePath,r),await e.cleanup(),{...e,filePath:r,cleanup:async()=>{}}}var Af=class e{width;height;fps;durationMs;backgroundColor;antialias3d;fonts;children=[];audioTracks=[];signals={};_frameHooks=[];_prepareHooks=[];_clipVision=new Map;_linking=!1;_mediaSignals;_visionConfig;_visionBundle;_effects=[];apply(t){return t instanceof wt?(this.withVision(t),this):(this._effects.push(t),this)}withVision(t={}){this._visionBundle??=new Vr({width:this.width,height:this.height,fps:this.fps});let r=t instanceof wt?t.config:t;return this._visionConfig={...r,visionBundle:this._visionBundle},this._visionBundle}vision(t,r={}){let n=typeof t=="string"?t:t.src??t.inputHandleId;if(typeof t!="string"){let a=this.toVirtualMedia({resolveMediaSignal:this.mediaSignalResolver(!0)}),u=Co(a.children).find(({vm:c})=>c.operation.id===t.id),l=u&&{operation:{...u.vm.operation,startFrame:u.startFrame}};if(!l)throw new Error("Add the media layer to the composition before calling comp.vision(layer)");r={startFrame:l.operation.startFrame??t.startFrame,trimStartSec:t.trimStartSec,timeRemap:l.operation.timeRemap,durationFrames:t.durationFrames,...r}}let i=`${n}\0${JSON.stringify({...r,timeRemap:Or(r.timeRemap)})}`,o=this._clipVision.get(i);return o||(o=new kn(n,this.fps,r),this._clipVision.set(i,o)),o}async prepareVision(t){this.linkClipLayers(),await Promise.all([...this._clipVision.values()].map(r=>r.ready(0,t)))}linkClipLayers(){let t,r=n=>{if(!n||typeof n!="object")return;let i=n;if(i.kind==="media"&&i.dataType==="Video"&&typeof i.inputHandleId=="string"&&i.vision instanceof wt&&!(No in i.vision)){t??=new Map(Co(this.toVirtualMedia().children).map(({vm:u,startFrame:l})=>{let c=u.operation;return[c.id,{startFrame:l,timeRemap:c.timeRemap}]}));let o=t.get(i.id),a=this.clipForLayer(i.src??i.inputHandleId,i.vision,{trimStartSec:i.trimStartSec,startFrame:o?.startFrame??i.startFrame,timeRemap:o?.timeRemap});a&&(i.vision.mode!=="skeleton"&&i.vision.mode!=="depth"&&a.keepSubjects(),Object.defineProperty(i.vision,No,{value:a,enumerable:!1,configurable:!0}))}if(Array.isArray(i.children))for(let o of i.children)r(o);r(i.matte?.node),r(i.relief?.node)};for(let n of this.children)r(n)}clipForLayer(t,r,n){let i=r.mode??"passthrough";if(i==="depth")return this.depthClip(t,n);let o=i==="skeleton";if(!(i!=="matte"&&i!=="mask"&&i!=="crop"&&!o)&&!(r.classes!==void 0||r.enableMatte===!0||r.visionBundle!==void 0||!o&&(r.matteSource==="selfie"||r.keyBackground===!0||r.enablePose===!0||(r.maskThreshold??.5)!==.5||r.featherRadius!==void 0)))for(let a of this._clipVision.values()){let u=a.options;if(a.source===t&&a.startFrame===(n.startFrame??0)&&a.trimStartSec===(n.trimStartSec??0)&&Or(u.timeRemap)===Or(n.timeRemap)&&(u.variant??"s")===(r.variant??"s")&&(u.confidence??.3)===(r.confidence??.3)){if(o&&!a.tracksPose){if(a.exact)throw new Error("A skeleton layer of a prompted comp.vision clip needs `pose: true` on that clip.");continue}return a}}}depthClip(t,r){for(let n of this._clipVision.values())if(n.tracksDepth&&n.source===t&&n.startFrame===(r.startFrame??0)&&n.trimStartSec===(r.trimStartSec??0)&&Or(n.options.timeRemap)===Or(r.timeRemap))return n;return this.vision(t,{depth:!0,...r.startFrame!==void 0&&{startFrame:r.startFrame},...r.trimStartSec!==void 0&&{trimStartSec:r.trimStartSec},...r.timeRemap!==void 0&&{timeRemap:r.timeRemap}})}async analyzeVisionSequence(t,r={}){let n=r.fps??this.fps,i=this.durationMs??await this.computeDuration(),o=r.totalFrames??Math.max(1,Math.round(i/1e3*n)),a=sr.create({modelsDir:r.modelsDir,baseUrl:r.baseUrl,...r.confidence!==void 0?{confidence:r.confidence}:{},...r.variant!==void 0?{variant:r.variant}:{}}),u=_r.getVideo(t,!0);async function*l(){for(let c=0;c<o;c++){let m=await u.getFrame(c/n);m?.buffer&&m.width>0&&m.height>0&&(yield{data:m.buffer,width:m.width,height:m.height})}}try{return await Oo(l(),{runner:a,source:t,fps:n,...r.tasks!==void 0?{tasks:r.tasks}:{},...r.categories!==void 0?{categories:r.categories}:{},...r.pathStride!==void 0?{pathStride:r.pathStride}:{},...r.includeMasks!==void 0?{includeMasks:r.includeMasks}:{},...r.iouThreshold!==void 0?{iouThreshold:r.iouThreshold}:{}})}finally{a.close(),u.destroy()}}onRequestFrame(t){return this._frameHooks.push(t),this}onPrepareFrame(t){return this._prepareHooks.push(t),this}notifyFrame(t){let r=this._mediaSignals?.framesBefore(t.frame)??[];return r.length===0?this.runFrame(t):(async()=>{for(let n of r)await this.runFrame($s(t,n));await this.runFrame(t)})()}runFrame(t){for(let n of this._frameHooks)n(t);let r=this._mediaSignals;if(r?.advance(t.frame),this.linkClipLayers(),this._clipVision.size===0&&this._prepareHooks.length===0){r?.reach(t.frame);return}return(async()=>{await this.prepareVision(t.frame);for(let n of this._prepareHooks)await n(t);r?.reach(t.frame)})()}async prepareMediaTime(){let t=this.durationMs??await this.computeDuration(),r=Math.round(t/1e3*this.fps)-1;!this._mediaSignals?.pending||r<0||await this.notifyFrame($s({frame:0,fps:this.fps,time:0,duration:t/1e3,durationMs:t,progress:0,deltaTime:1/this.fps},r))}mediaSignalResolver(t=this.hasFrameHooks(),r=this.durationMs,n=this.signals){return this._mediaSignals??=new Xi(this.fps),this._mediaSignals.resolver({live:t,compositionDurationFrames:Math.round((r??0)/1e3*this.fps),signals:n})}hasFrameHooks(){return this._frameHooks.length>0||this._prepareHooks.length>0||this._clipVision.size>0}constructor(t){this.width=t.width,this.height=t.height,this.fps=t.fps??60,this.durationMs=t.durationMs??(t.durationFrames!==void 0?t.durationFrames/this.fps*1e3:void 0),this.backgroundColor=t.backgroundColor??"#000000",this.antialias3d=t.antialias3d,this.fonts=t.fonts??[],this.signals=t.signals??{}}static create(t){return new e(t)}addSignal(t,r){return this.signals[t]=r,this}add(t,...r){if(t instanceof pr)this.children.push(t.toNode());else if(t instanceof Ur)this.children.push(t.toNode());else{if(t&&typeof t=="object"&&"node"in t)return this.add(t.node,...r),this;if(Array.isArray(t))for(let n of t)this.add(n);else{let n=t,i=r[0];if(i&&!(i instanceof pr)&&!Array.isArray(i)&&(i instanceof Q||"tracks"in i))return n.animation=i instanceof Q?i.toSpec():i,this.children.push(n),this;this.children.push(n)}}for(let n of r)n&&!(n instanceof Q)&&!("tracks"in n)&&this.add(n);return this}addAudio(t){return this.audioTracks.push(t),this}addSubjectSandwich(t){let r=typeof t.source=="string"?t.source:t.source.inputHandleId??"",n=t.fit??"cover",i=t.feather??4,o=i>1?i/100:i,a=t.variant??"s",u=B.video(r,{width:this.width,height:this.height,position:"absolute",x:0,y:0,fit:n,muted:t.muted??!1,volume:t.muted?0:t.volume??1});this.add(u);for(let c of t.behind)this.add(c);let l=B.video(r,{width:this.width,height:this.height,position:"absolute",x:0,y:0,fit:n,muted:!0,volume:0}).withVision({mode:"matte",enableSegmentation:!0,variant:a,confidence:t.confidence??.25,featherRadius:o,keyBackground:t.keyBackground??!0,backgroundKeyThreshold:t.backgroundKeyThreshold});return this.add(l),this}addSmartFraming(t){let r=typeof t.source=="string"?t.source:t.source.inputHandleId??"",n=Math.max(0,Math.min(.99,t.damping??.8)),i=t.leadHeadroom??.18,o=this.width,a=this.height,u=t.sourceAspect??16/9,l=o/a,c=l<u?Math.round(a*u):o,m=l<u?a:Math.round(o/u),d=o-c,p=a-m,f=t.target,b=new nr(x=>{if(d>=0)return 0;let A=f.center?.x?f.center.x.get(x):f.bounds?.centerX?f.bounds.centerX.get(x)/o:f.center?.screenX?f.center.screenX.get(x)/o:.5,R=Math.max(0,Math.min(1,A))*c,N=o/2-R;return Math.max(d,Math.min(0,N))},{fps:this.fps,label:"smart_framing_pan_x"}),g=new nr(x=>{if(p>=0)return 0;let A=f.center?.y?f.center.y.get(x):f.bounds?.centerY?f.bounds.centerY.get(x)/a:f.center?.screenY?f.center.screenY.get(x)/a:.5,R=Math.max(0,Math.min(1,A))*m,N=a*i-R;return Math.max(p,Math.min(0,N))},{fps:this.fps,label:"smart_framing_pan_y"}),y=new nr(x=>{let A=x.frame;if(A<=0)return b.get(x);let w=b.get({...x,frame:0,time:0}),R=1-n;for(let N=1;N<=A;N++){let V=b.get({...x,frame:N,time:N/x.fps});w=w+R*(V-w)}return w},{fps:this.fps,label:"smart_framing_smooth_x"}),T=new nr(x=>{let A=x.frame;if(A<=0)return g.get(x);let w=g.get({...x,frame:0,time:0}),R=1-n;for(let N=1;N<=A;N++){let V=g.get({...x,frame:N,time:N/x.fps});w=w+R*(V-w)}return w},{fps:this.fps,label:"smart_framing_smooth_y"}),M=B.box({width:o,height:a,overflow:"hidden",position:"relative"}),v=B.video(r,{width:c,height:m,position:"absolute",x:y,y:T,fit:t.fit??"cover",muted:t.muted??!1,volume:t.muted?0:t.volume??1});return M.children||(M.children=[]),M.children.push(v),this.add(M),this}addSubjectOutline(t,r={}){let n=r.blur??12,i=this.width,o=this.height,a=r.pulseSignal,u=a?new nr(m=>Math.max(0,Math.min(1,Number(a.get(m))||0)),{fps:this.fps,label:"outline_pulse"}):1,l=typeof r.source=="string"?r.source:r.source?.inputHandleId??"",c=B.box({width:i,height:o,position:"absolute",x:0,y:0,opacity:u});if(l){let m=B.video(l,{width:i,height:o,position:"absolute",x:0,y:0,fit:"cover",muted:!0,volume:0}).withVision({mode:"mask",enableSegmentation:!0});c.children||(c.children=[]),c.children.push(m)}return c.apply(new Ft({strength:n,blurType:"Gaussian"})),this.add(c),this}section(t,r,n){let i,o,a={},u=t!==null&&typeof t=="object"&&"bounds"in t,l=typeof t=="string"||t!==null&&typeof t=="object"&&("kind"in t||"src"in t||"inputHandleId"in t);if(l&&r&&typeof r=="object"&&"bounds"in r?(i=t,o=r,a=n??{}):l&&r?(i=t,a=r):u?(o=t,a=r??{},i=a.source??o.source):t&&typeof t=="object"&&(a=t,i=a.source),!i){let c=this.children.find(m=>m.kind==="media"&&(m.dataType==="Video"||m.dataType==="Image"));c&&(i=c)}return B.section(i??"",o??a,{compositionWidth:this.width,compositionHeight:this.height,...a})}addSection(t,r,n){let i=this.section(t,r,n);return this.add(i),i}async computeDuration(){if(this.durationMs!==void 0)return this.durationMs;let t=0,r=[];for(let n of[...this.children,...this.audioTracks]){if(n.kind==="media"){let i=n.inputHandleId;typeof i=="string"&&(n.dataType==="Video"||n.dataType==="Audio")&&r.push(i)}if(typeof n.durationFrames=="number"){let o=((typeof n.startFrame=="number"?n.startFrame:0)+n.durationFrames)/this.fps*1e3;o>t&&(t=o)}}for(let n of r)try{let o=await(await or.acquire(n)).computeDuration();if(Number.isFinite(o)&&o>0){let a=Math.round(o*1e3);a>t&&(t=a)}}catch{}return t>0?t:5e3}async registerFont(t,r){let n=await _e.register(t,r);return n.filePath&&!this.fonts.includes(n.filePath)&&this.fonts.push(n.filePath),this}async registerEmojiFont(t){return await _e.registerEmojiFont(t),this}toSpec(){let t=[...this.children,...this.audioTracks],r=_e.getRegisteredFontPaths(),n=Array.from(new Set([...this.fonts,...r]));return{width:this.width,height:this.height,fps:this.fps,mode:"Video",backgroundColor:this.backgroundColor,...this.antialias3d!==void 0&&{antialias3d:this.antialias3d},layout:t,fonts:n,signals:this.signals,...this._effects.length>0&&{effects:this._effects},...this._visionConfig&&{vision:this._visionConfig},...this.hasFrameHooks()&&{onRequestFrame:i=>this.notifyFrame(i)}}}toVirtualMedia(t={}){if(!this._linking){this._linking=!0;try{this.linkClipLayers()}finally{this._linking=!1}}let r=t.durationMs??this.durationMs,n=t.signals??this.signals;return Yn(this.toSpec(),{isVideoMode:!0,fps:this.fps,durationMs:r,signals:n,resolveMediaSignal:this.mediaSignalResolver(void 0,r,n),...this._effects.length>0&&{effects:this._effects},...this._visionConfig&&{vision:this._visionConfig},...t})}async toVirtualMediaAsync(t={}){let r=t.durationMs??this.durationMs??await this.computeDuration();this.durationMs=r;let n=t.signals??this.signals,i=Yn(this.toSpec(),{isVideoMode:!0,fps:this.fps,durationMs:r,signals:n,resolveMediaSignal:this.mediaSignalResolver(void 0,r,n),...this._effects.length>0&&{effects:this._effects},...this._visionConfig&&{vision:this._visionConfig},...t});return await el(i,this.fps),i}async renderFrame(t={}){let r=typeof t=="number"?{frame:t}:t,{frame:n}=Nt(r,this.fps);if(r.fps!==void 0&&r.fps!==this.fps)throw new Error(`Composition fps is ${this.fps}; cannot render at fps ${r.fps}.`);let i=this.toVirtualMedia();if(this.hasFrameHooks()){let a=n;await this.notifyFrame({frame:a,fps:this.fps,time:this.fps>0?a/this.fps:0,duration:(this.durationMs??0)/1e3,durationMs:this.durationMs??0,progress:this.durationMs&&this.durationMs>0?Math.max(0,Math.min(1,a/this.fps*1e3/this.durationMs)):0,deltaTime:this.fps>0?1/this.fps:0})}return(r.renderer??new ge.HeadlessMediaRenderer).renderFrame(i,{fps:this.fps,frame:n,renderId:r.renderId,format:r.format})}async renderFrameGrid(t={}){return Tn(this,t)}async renderVideo(t={},r={}){let n=typeof t=="string"?{...r,outputPath:t}:t,o=await(n.renderer??new ge.HeadlessMediaRenderer).renderVideo(this.toVirtualMedia(),n);if(o.qa){let a=this.lint(),u=[...o.qa.issues,...a.map(l=>({severity:l.severity,code:l.code,message:l.message,...l.layerId!==void 0&&{layerId:l.layerId}}))];o.qa={...o.qa,issues:u,passed:o.qa.passed&&!a.some(l=>l.severity==="error")}}return Df(o,n.outputPath)}lint(){return Ta(this.toSpec(),{emojiFont:_e.hasEmojiFont(),scatterCoverage:kp})}};function je(e){let t=e,r=t;r.rotationX!==void 0&&(r.rotateX===void 0&&(r.rotateX=r.rotationX),delete r.rotationX),r.rotationY!==void 0&&(r.rotateY===void 0&&(r.rotateY=r.rotationY),delete r.rotationY),r.rotationZ!==void 0&&(r.rotateZ===void 0&&(r.rotateZ=r.rotationZ),delete r.rotationZ),t.animation instanceof Q&&(t.animation=t.animation.toSpec()),Object.defineProperty(t,"animate",{value:(...i)=>{let o=i.flat().flatMap(c=>c instanceof Q?c.tracks:c.tracks??[]),a=t.animation,u=a?.tracks??[],l=i.flat().map(c=>c.frameStep).filter(c=>c!==void 0).at(-1)??a?.frameStep;return t.animation={tracks:Hr([...u,...o]),...l!==void 0&&l>1&&{frameStep:l}},t},enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"pinToLandmark",{value:(i,o)=>(Eo(t,i,o),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"pinToObject",{value:(i,o)=>(Bo(t,i,o),t),enumerable:!1,writable:!0,configurable:!0});let n=(i,o)=>(t.matte={node:i,...o&&{mode:o}},t);for(let i of["withMatte","withMask"])Object.defineProperty(t,i,{value:n,enumerable:!1,writable:!0,configurable:!0});return Object.defineProperty(t,"withRelief",{value:(i,o={})=>(t.relief={node:i,...o},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withPbrGlass",{value:i=>(t.glass=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"deformWithAudio",{value:i=>(t.audioDeform=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withCrop",{value:i=>(t.crop=i instanceof Wr?i:new Wr(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withVision",{value:i=>(t.vision=i instanceof wt?i:new wt(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withRelighting",{value:i=>(t.relighting=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"relight",{value:i=>(t.relighting=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withDeflicker",{value:i=>(t.deflicker=i??{},t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"apply",{value:i=>(t.effects||(t.effects=[]),t.effects.push(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withEffect",{value:i=>(t.effects||(t.effects=[]),t.effects.push(i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withEffects",{value:i=>(t.effects||(t.effects=[]),t.effects.push(...i),t),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"section",{value:(i={},o)=>i!==null&&typeof i=="object"&&"bounds"in i?B.section(t,i,o):B.section(t,i),enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"blurRegion",{value:(i,o)=>{let a=new Ft({track:i,strength:o?.strength??25,shape:o?.shape??"ellipse",...o});return t.effects||(t.effects=[]),t.effects.push(a),t},enumerable:!1,writable:!0,configurable:!0}),Object.defineProperty(t,"withBlurRegion",{value:(i,o)=>t.blurRegion(i,o),enumerable:!1,writable:!0,configurable:!0}),cS(t),t}var lS=[{prop:"roughness",fallback:.5},{prop:"metallic",fallback:0},{prop:"emissiveIntensity",fallback:1},{prop:"clearcoat",fallback:0},{prop:"clearcoatRoughness",fallback:.08},{prop:"anisotropy",fallback:0},{prop:"anisotropyRotation",fallback:0},{prop:"subsurface",fallback:0},{prop:"sheen",fallback:0},{prop:"sheenRoughness",fallback:.5},{prop:"iridescence",fallback:0},{prop:"iridescenceThickness",fallback:400},{prop:"iridescenceIor",fallback:1.3},{prop:"triplanarScale",fallback:1},{prop:"triplanarSharpness",fallback:4}];function cS(e){let t=e,r;for(let{prop:n,fallback:i}of lS){let o=t[n];Ln(o)&&(r??=Q.create(),r.signal(n,o),t[n]=i)}r&&e.animate(r)}var B={video:(e,t={})=>je({id:t.id??Y("video"),kind:"media",inputHandleId:e,dataType:"Video",fit:t.fit??"cover",...t}),image:(e,t={})=>(typeof e=="string"&&(/\.(json|lottie)(\?.*)?$/i.test(e)||e.startsWith("data:application/json")?console.warn(`[Layer.image] '${e}' is a Lottie vector animation, not a static image. Use Layer.lottie('${e}', options) instead.`):/\.(mp4|mov|webm|mkv)(\?.*)?$/i.test(e)?console.warn(`[Layer.image] '${e}' is a video file, not a static image. Use Layer.video('${e}', options) instead.`):/\.(mp3|wav|ogg|m4a|aac)(\?.*)?$/i.test(e)&&console.warn(`[Layer.image] '${e}' is an audio file, not a static image. Use Layer.audio('${e}', options) instead.`)),je({id:t.id??Y("img"),kind:"media",inputHandleId:e,dataType:"Image",fit:t.fit??"cover",...t})),svg:(e,t={})=>je({id:t.id??Y("svg"),kind:"media",inputHandleId:e,dataType:"SVG",fit:t.fit??"contain",...t}),lottie:(e,t={})=>je({id:t.id??Y("lottie"),kind:"media",inputHandleId:e,dataType:"Lottie",fit:t.fit??"contain",...t}),audio:(e,t={})=>je({id:t.id??Y("audio"),kind:"media",inputHandleId:e,dataType:"Audio",volume:t.volume??1,...t}),text:(e,t={})=>{let r=Array.isArray(e),n=!r&&typeof e=="object"&&e!==null,i=n?e:t,o="",a=i.spans;if(r){let u=bi(e);o=u.text,a=u.spans}else n?i.spans&&!i.text?o=bi(i.spans).text:o=i.text??"":o=typeof e=="string"?e:String(e??"");return je({id:i.id??Y("text"),kind:"text",fontFamily:i.fontFamily??_e.getAll()[0]?.family??"Inter",fontSize:i.fontSize??48,fill:i.fill??"#ffffff",...i,text:i.text??o,spans:i.spans??a})},caption:(e,t={})=>je({id:t.id??Y("caption"),kind:"media",inputHandleId:e,dataType:t.dataType??"Caption",fontFamily:t.fontFamily??_e.getAll()[0]?.family??"Inter",fontSize:t.fontSize??48,fill:t.fill??"#ffffff",...t}),shape:(e="rect",t={})=>{let{fill:r,...n}=t;return je({id:n.id??Y("shape"),kind:"shape",shapeType:n.shapeType??e,...n,fillColor:n.fillColor??r??"#3b82f6"})},flex:(e={})=>je({id:e.id??Y("flex"),kind:"flex",dir:e.dir??"column",children:e.children??[],...e}),box:(e={})=>je({id:e.id??Y("box"),kind:"box",background:e.background??"transparent",children:e.children??[],...e}),particles:e=>{let t=new Pn(e),r={metadata:{width:e.width,height:e.height},operation:{...t.toOperation(),effect:t,dataType:"Video"},children:[]};return je({id:e.id??Y("particles"),kind:"media",dataType:"Video",src:r,position:"absolute",x:e.x??0,y:e.y??0,width:e.width,height:e.height,...e.startFrame!==void 0&&{startFrame:e.startFrame},...e.durationFrames!==void 0&&{durationFrames:e.durationFrames},...e.zIndex!==void 0&&{zIndex:e.zIndex}})},vfx:e=>{let{x:t,y:r,id:n,startFrame:i,durationFrames:o,zIndex:a,...u}=e,l=new Xo({outputType:"Video",...u}),c={metadata:{width:e.width,height:e.height},operation:{...l.toOperation(),effect:l,dataType:"Video"},children:[]};return je({id:n??Y("vfx"),kind:"media",dataType:"Video",src:c,position:"absolute",x:t??0,y:r??0,width:e.width,height:e.height,...i!==void 0&&{startFrame:i},...o!==void 0&&{durationFrames:o},...a!==void 0&&{zIndex:a}})},section:(e,t={},r={})=>{let n=e;if(e&&typeof e=="object"&&"toSpec"in e&&"children"in e){let w=(e.children||[]).find(R=>R.kind==="media"&&(R.dataType==="Video"||R.dataType==="Image"));w&&(n=w)}let i=t!==null&&typeof t=="object"&&"bounds"in t,o=i?r:t,a=i?t:void 0,u=o.padding??0,l=typeof n=="string"?n:n?.inputHandleId??n?.src??"",c=typeof n=="object"&&n?.dataType?n.dataType:"Video",m=o.compositionWidth??o.compWidth??(i?o.width:void 0)??1920,d=o.compositionHeight??o.compHeight??(i?o.height:void 0)??1080,p=Array.isArray(o.effects)?[...o.effects]:o.effects?[o.effects]:[],f=a?a.bounds.screenX.multiply(-1).add(u):typeof o.x=="number"?-o.x:o.x&&typeof o.x.multiply=="function"?o.x.multiply(-1):0,b=a?a.bounds.screenY.multiply(-1).add(u):typeof o.y=="number"?-o.y:o.y&&typeof o.y.multiply=="function"?o.y.multiply(-1):0,g=(c==="Image"?B.image(l,{position:"absolute",width:m,height:d,fit:o.fit??"cover",x:f,y:b}):B.video(l,{position:"absolute",width:m,height:d,fit:o.fit??"cover",x:f,y:b})).withEffects(p),y=a?a.bounds.screenWidth.add(u*2):o.width!==void 0?o.width:m,T=a?a.bounds.screenHeight.add(u*2):o.height!==void 0?o.height:d,M=[g,...o.children??[]],v=o.id??(a?Y(`section-track-${a.trackId}`):Y("section")),x=B.box({id:v,position:o.position??"absolute",width:y,height:T,x:a?void 0:o.x,y:a?void 0:o.y,borderRadius:o.borderRadius??0,borderColor:o.borderColor,borderWidth:o.borderWidth,opacity:o.opacity??1,overflow:"hidden",children:M});a&&(x=x.pinToObject(a,{anchor:"topLeft",offsetX:-u,offsetY:-u,hideWhenLost:o.hideWhenLost??!0,smoothFrames:o.smoothFrames}));let A=x;return Object.defineProperty(A,"innerMedia",{value:g,enumerable:!0,writable:!1}),Object.defineProperty(A,"effects",{get:()=>p,enumerable:!0}),Object.defineProperty(A,"addEffect",{value:w=>(p.push(w),g.effects=p,A),enumerable:!0,writable:!1}),Object.defineProperty(A,"withEffect",{value:w=>A.addEffect(w),enumerable:!0,writable:!1}),Object.defineProperty(A,"withEffects",{value:w=>{for(let R of w)A.addEffect(R);return A},enumerable:!0,writable:!1}),A},trackedRegion:(e,t,r={})=>B.section(e,t,r),blurTrackedRegion:(e,t,r={})=>{let{padding:n,borderRadius:i,borderColor:o,borderWidth:a,...u}=r;return B.section(e,t,{padding:n??8,borderRadius:i??12,borderColor:o,borderWidth:a,effects:[new Ft({strength:u.strength??25,blurType:u.blurType??"Gaussian",...u})]})},chart:(e,t={})=>ip(e,t,_e.getAll()[0]?.family??"Inter"),camera:(e={})=>{let{fov:t,focalLength:r,sensorWidth:n,near:i,far:o,zoom:a,lens:u,...l}=e,m=t!==void 0||r!==void 0||n!==void 0||i!==void 0||o!==void 0||a!==void 0||u!==void 0?{...u,...t!==void 0&&{fov:t},...r!==void 0&&{focalLength:r},...n!==void 0&&{sensorWidth:n},...i!==void 0&&{near:i},...o!==void 0&&{far:o},...a!==void 0&&{zoom:a}}:void 0;return je({id:l.id??Y("camera"),kind:"camera",mode:l.mode??"lookAt",pitch:l.pitch??0,yaw:l.yaw??0,roll:l.roll??0,...l,...m!==void 0&&{lens:m}})},light:(e={})=>rr({id:e.id??Y("light"),kind:"light",lightType:e.lightType??"point",color:e.color??"#ffffff",intensity:1},e),ambientLight:(e="#ffffff",t=.5,r={})=>nt.ambient(e,t,r),sequence:(e,t)=>Ap(e,t),environment:(e="studio",t={})=>nt.environment(e,t),directionalLight:(e={})=>nt.directional(e),pointLight:(e={})=>nt.point(e),spotLight:(e={})=>nt.spot(e),rectLight:(e={})=>nt.rect(e),cube:e=>we.cube(e),carousel3d:e=>we.carousel(e),plane3d:e=>we.plane(e),prism3d:(e={})=>we.prism(e),model:(e={})=>je({id:e.id??Y("model3d"),kind:"model3d",is3D:e.is3D??!0,modelFormat:e.modelFormat??"auto",loop:e.loop??!0,scale:e.scale??1,scaleX:e.scaleX??1,scaleY:e.scaleY??1,scaleZ:e.scaleZ??1,opacity:e.opacity??1,...e}),obj:(e,t={})=>B.model({src:e,modelFormat:"obj",...t}),fbx:(e,t={})=>B.model({src:e,modelFormat:"fbx",...t}),gltf:(e,t={})=>B.model({src:e,modelFormat:"gltf",...t}),glb:(e,t={})=>B.model({src:e,modelFormat:"glb",...t}),stl:(e,t={})=>B.model({src:e,modelFormat:"stl",...t}),ply:(e,t={})=>B.model({src:e,modelFormat:"ply",...t}),vox:(e,t={})=>B.model({src:e,modelFormat:"vox",...t}),threeDS:(e,t={})=>B.model({src:e,modelFormat:"3ds",...t}),off:(e,t={})=>B.model({src:e,modelFormat:"off",...t})};function mS(e){return/\.(hdr|exr)$/i.test(e)}var dS=[{prop:"intensity",fallback:1},{prop:"x",fallback:0},{prop:"y",fallback:0},{prop:"z",fallback:0},{prop:"targetX",fallback:0},{prop:"targetY",fallback:0},{prop:"targetZ",fallback:0},{prop:"radius",fallback:1e3},{prop:"angle",fallback:45},{prop:"penumbra",fallback:.2},{prop:"decay",fallback:1},{prop:"width",fallback:240},{prop:"height",fallback:140},{prop:"rotation",fallback:0},{prop:"exposure",fallback:0},{prop:"volumetricFogDensity",fallback:.02},{prop:"volumetricFogAnisotropy",fallback:.55},{prop:"volumetricFogNoiseStrength",fallback:.45}];function Ln(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.get=="function"||typeof t.inputHandleId=="string"||typeof t.gpuBinding=="object"}function rr(e,t){let r={...e,...t},n=[];for(let{prop:a,fallback:u}of dS){let l=r[a];if(Ln(l)){n.push([a,l]);let c=e[a];r[a]=typeof c=="number"?c:u}}let i=r.volumetricFog;if(i&&typeof i=="object"){let a={...i};if(Ln(a.density)&&(n.push(["volumetricFogDensity",a.density]),a.density=.02),Ln(a.anisotropy)&&(n.push(["volumetricFogAnisotropy",a.anisotropy]),a.anisotropy=.55),a.noise&&typeof a.noise=="object"){let u={...a.noise};Ln(u.strength)&&(n.push(["volumetricFogNoiseStrength",u.strength]),u.strength=.45),a.noise=u}r.volumetricFog=a}let o=je(r);if(n.length>0){let a=Q.create();for(let[u,l]of n)a.signal(u,l);o=o.animate(a)}return o}var nt={environment:(e="studio",t={})=>{let n={...typeof e!="string"?e:mS(e)?{hdri:e}:{preset:e},...t};return rr({id:n.id??Y("environment"),kind:"light",lightType:"environment",preset:"studio",intensity:1},n)},ambient:(e="#ffffff",t=.5,r={})=>{let n={color:typeof e=="string"?e:e.color??"#ffffff",intensity:t,...typeof e=="object"&&e,...r};return rr({id:n.id??Y("light-ambient"),kind:"light",lightType:"ambient",color:"#ffffff",intensity:.5},n)},directional:(e={})=>rr({id:e.id??Y("light-directional"),kind:"light",lightType:"directional",color:e.color??"#ffffff",intensity:1,x:0,y:-1e3,z:-1e3,targetX:0,targetY:0,targetZ:0},e),point:(e={})=>rr({id:e.id??Y("light-point"),kind:"light",lightType:"point",color:e.color??"#ffffff",intensity:1,x:0,y:0,z:-500,radius:1e3,decay:1},e),spot:(e={})=>rr({id:e.id??Y("light-spot"),kind:"light",lightType:"spot",color:e.color??"#ffffff",intensity:1,x:0,y:-500,z:-1e3,targetX:0,targetY:0,targetZ:0,angle:45,penumbra:.2,radius:2e3,decay:1},e),rect:(e={})=>rr({id:e.id??Y("light-rect"),kind:"light",lightType:"rect",color:e.color??"#ffffff",intensity:1,x:0,y:-300,z:-800,targetX:0,targetY:0,targetZ:0,width:240,height:140,twoSided:!1,radius:2e3,decay:1.5},e)};function EN(e,t={},r={}){return B.section(e,t,r)}function BN(e,t,r={}){return typeof e=="object"&&"blurRegion"in e?e.blurRegion(t,r):B.blurTrackedRegion(e,t,r)}function IN(e,t,r={}){return B.section(e,t,r)}var pS=Object.assign(ir,Zo,{blur:e=>new Ft(e),vignette:e=>new lr(e),colorBalance:e=>new zo(e),colorKey:e=>new _o(e),levels:e=>new qo(e),filmGrain:e=>new lt(e),curves:e=>new Qo(e),selectiveColor:e=>new Jo(e),gradientMap:e=>new Lt(e),shadowsHighlights:e=>new ea(e),applyLut:e=>new ta(e),unsharpMask:e=>new ra(e),highPass:e=>new na(e),halftoneScreen:e=>new Gr(e),tileOffset:e=>new ia(e),motionBlur:e=>new oa(e),ssao:e=>new aa(e),pbrGlass:e=>new sa(e),depthOfField:e=>new ua(e),crop:e=>new Wr(e),vision:e=>new wt(e),relight3d:e=>new la(e),modulate:e=>new ma(e),deflicker:e=>new ca(e),custom:(e,t={})=>new Ko(e,t)});var fS=/\.(png|jpe?g|webp|gif|avif|tiff?|bmp)(\?.*)?$/i,hS=/\.svg(\?.*)?$/i;function gS(e){let t=r=>r?{...r,enabled:!0}:void 0;return new Wo({...e.dropShadow&&{dropShadow:t(e.dropShadow)},...e.outerGlow&&{outerGlow:t(e.outerGlow)},...e.innerShadow&&{innerShadow:t(e.innerShadow)},...e.stroke&&{stroke:t(e.stroke)}})}function bS(e,t){let r=Math.max(16,Math.round(e)),n=Math.max(16,Math.round(t));return`data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${n}"><rect width="${r}" height="${n}" fill="#808080"/></svg>`)}`}var Rf={box:e=>B.box(e),flex:e=>B.flex(e),text:(e,t)=>B.text(e,t),shape:(e,t)=>B.shape(e,t),measure:(e,t)=>_e.measure(e,t),fonts:()=>_e.getAll().map(e=>e.family),autoId:Y,media:(e,t)=>hS.test(e)?B.svg(e,t):fS.test(e)?B.image(e,t):B.video(e,{muted:!0,...t}),style:(e,t)=>(e.withEffect(gS(t)),e),cutout:(e,{mode:t="person",...r})=>B.video(e,{muted:!0,volume:0,fit:"cover",...r}).withVision({mode:"matte",enableSegmentation:!0,variant:t==="subject"?"m":"s",confidence:.25,featherRadius:.04,keyBackground:!0}),particles:e=>B.particles(e),signal:(e,t)=>Cu([...e],t),grain:({id:e,x:t,y:r,width:n,height:i,strength:o,size:a})=>B.svg(bS(n,i),{id:e,position:"absolute",x:t,y:r,width:n,height:i,fit:"fill",blendMode:"soft-light"}).withEffect(new lt({strength:o,...a!==void 0&&{size:a},shadows:1,midtones:1,highlights:1})),extrudedText:({fontWeight:e,...t})=>we.extrudedText({...t,...e!==void 0&&{fontWeight:String(e)},align:"center",verticalAlign:"middle"}),matte:(e,t,r="alpha")=>(e.withMatte(t,r),e)};h();async function Cf(e,t={}){let r=await Ju(e);if(!r||r.channels.length===0)throw new Error(`analyzeAudio: could not decode audio from ${e}`);return _c(r.channels,r.sampleRate,t)}function sS(e){return Jc(Rf,e)}export{ha as a,bl as b,yl as c,xl as d,Vf as e,Uf as f,Sl as g,ga as h,$f as i,wl as j,Gf as k,vl as l,ba as m,kl as n,Pl as o,Tl as p,Ml as q,Al as r,Cl as s,ya as t,Yr as u,Dl as v,Rl as w,cr as x,Ol as y,Nl as z,Fl as A,Ll as B,ei as C,ti as D,El as E,Bl as F,ri as G,Il as H,jl as I,zl as J,_l as K,Vl as L,Ul as M,$l as N,mr as O,Wf as P,xa as Q,Sa as R,wa as S,va as T,ka as U,G1 as V,W1 as W,X1 as X,Hr as Y,Q as Z,pa as _,Ta as $,Ca as aa,oc as ba,ac as ca,sc as da,lc as ea,wh as fa,cc as ga,mc as ha,dc as ia,pc as ja,fc as ka,hc as la,gc as ma,bc as na,yc as oa,xc as pa,Sc as qa,wc as ra,vc as sa,kc as ta,Pc as ua,Tc as va,Mc as wa,Ac as xa,Cc as ya,Oh as za,Dc as Aa,Oa as Ba,Nh as Ca,Rc as Da,Oc as Ea,Nc as Fa,Fh as Ga,Fc as Ha,Xr as Ia,Na as Ja,tn as Ka,rn as La,nn as Ma,pr as Na,Ge as Oa,an as Pa,Ga as Qa,zg as Ra,_g as Sa,Vg as Ta,Ug as Ua,$g as Va,Gg as Wa,Wg as Xa,Hg as Ya,Yg as Za,Xg as _a,Zg as $a,qg as ab,bi as bb,Kg as cb,np as db,ap as eb,_s as fb,kn as gb,Yi as hb,Pn as ib,Ys as jb,Xs as kb,Tn as lb,ge as mb,we as nb,Mp as ob,Q0 as pb,An as qb,Fr as rb,Cn as sb,Dn as tb,Lr as ub,wx as vb,vx as wb,qx as xb,jh as yb,ai as zb,Zr as Ab,Fa as Bb,zh as Cb,_h as Db,Sw as Eb,Ec as Fb,Bc as Gb,Wh as Hb,_c as Ib,Tw as Jb,Mw as Kb,Aw as Lb,Vc as Mb,Rw as Nb,ui as Ob,Yh as Pb,Ow as Qb,Nw as Rb,qr as Sb,Ew as Tb,Bw as Ub,Uc as Vb,La as Wb,li as Xb,$c as Yb,Iw as Zb,Ba as _b,Zh as $b,Kr as ac,$w as bc,Gw as cc,Ww as dc,Hw as ec,ci as fc,Yw as gc,qh as hc,Kh as ic,Xw as jc,Zw as kc,qw as lc,Qr as mc,ja as nc,Hc as oc,Yc as pc,Zc as qc,Jr as rc,ov as sc,Jh as tc,eg as uc,rg as vc,dv as wc,ig as xc,og as yc,Jc as zc,$a as Ac,em as Bc,tm as Cc,rm as Dc,hv as Ec,dt as Fc,gv as Gc,wv as Hc,en as Ic,vv as Jc,kv as Kc,Pv as Lc,Tv as Mc,Mv as Nc,Av as Oc,di as Pc,Ov as Qc,Nv as Rc,Fv as Sc,Lv as Tc,Ev as Uc,Bv as Vc,Iv as Wc,fg as Xc,_v as Yc,$v as Zc,Yv as _c,hg as $c,Kv as ad,Qv as bd,t1 as cd,im as dd,gg as ed,om as fd,o1 as gd,xg as hd,vg as id,sm as jd,a1 as kd,l1 as ld,Cf as md,sS as nd,Mf as od,Af as pd,B as qd,nt as rd,EN as sd,BN as td,IN as ud,pS as vd};
|
|
637
637
|
/*! Bundled license information:
|
|
638
638
|
|
|
639
639
|
aws4fetch/dist/aws4fetch.esm.mjs:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$b as E,$c as Ea,Ab as d,Ac as da,Bb as e,Bc as ea,Cb as f,Cc as fa,Db as g,Dc as ga,Eb as h,Ec as ha,Fb as i,Fc as ia,Gb as j,Gc as ja,Hb as k,Hc as ka,Ib as l,Ic as la,Jb as m,Jc as ma,Kb as n,Kc as na,Lb as o,Lc as oa,Mb as p,Mc as pa,Nb as q,Nc as qa,Ob as r,Oc as ra,Pb as s,Pc as sa,Qb as t,Qc as ta,Rb as u,Rc as ua,Sb as v,Sc as va,Tb as w,Tc as wa,Ub as x,Uc as xa,Vb as y,Vc as ya,Wb as z,Wc as za,Xb as A,Xc as Aa,Yb as B,Yc as Ba,Zb as C,Zc as Ca,_b as D,_c as Da,ac as F,ad as Fa,bc as G,bd as Ga,cc as H,cd as Ha,dc as I,dd as Ia,ec as J,ed as Ja,fc as K,fd as Ka,gc as L,gd as La,hc as M,hd as Ma,ic as N,id as Na,jc as O,jd as Oa,kc as P,kd as Pa,lc as Q,ld as Qa,mc as R,md as Ra,nc as S,nd as Sa,oc as T,pc as U,qc as V,rc as W,sc as X,tc as Y,uc as Z,vc as _,wc as $,xc as aa,yb as b,yc as ba,zb as c,zc as ca}from"./chunk-
|
|
1
|
+
import{$b as E,$c as Ea,Ab as d,Ac as da,Bb as e,Bc as ea,Cb as f,Cc as fa,Db as g,Dc as ga,Eb as h,Ec as ha,Fb as i,Fc as ia,Gb as j,Gc as ja,Hb as k,Hc as ka,Ib as l,Ic as la,Jb as m,Jc as ma,Kb as n,Kc as na,Lb as o,Lc as oa,Mb as p,Mc as pa,Nb as q,Nc as qa,Ob as r,Oc as ra,Pb as s,Pc as sa,Qb as t,Qc as ta,Rb as u,Rc as ua,Sb as v,Sc as va,Tb as w,Tc as wa,Ub as x,Uc as xa,Vb as y,Vc as ya,Wb as z,Wc as za,Xb as A,Xc as Aa,Yb as B,Yc as Ba,Zb as C,Zc as Ca,_b as D,_c as Da,ac as F,ad as Fa,bc as G,bd as Ga,cc as H,cd as Ha,dc as I,dd as Ia,ec as J,ed as Ja,fc as K,fd as Ka,gc as L,gd as La,hc as M,hd as Ma,ic as N,id as Na,jc as O,jd as Oa,kc as P,kd as Pa,lc as Q,ld as Qa,mc as R,md as Ra,nc as S,nd as Sa,oc as T,pc as U,qc as V,rc as W,sc as X,tc as Y,uc as Z,vc as _,wc as $,xc as aa,yb as b,yc as ba,zb as c,zc as ca}from"./chunk-VZUVB3BP.mjs";import"./chunk-2YJ2EW2B.mjs";import"./chunk-A2OTOW3B.mjs";import"./chunk-3F6JGYSP.mjs";import"./chunk-JJ7D26WR.mjs";import"./chunk-QAQJSWUT.mjs";import"./chunk-TEA3GVBJ.mjs";import"./chunk-JAAFSVAG.mjs";import"./chunk-XSHNQJ7L.mjs";import"./chunk-H2XKXXAU.mjs";import"./chunk-SWRGQTVC.mjs";import"./chunk-W4XR6F5G.mjs";import"./chunk-ICWD36H6.mjs";import"./chunk-EYE3GNL5.mjs";import"./chunk-ZHNEZZ6A.mjs";import"./chunk-SFHWP65D.mjs";import"./chunk-NVXFEDJS.mjs";import"./chunk-NTSALWFF.mjs";import"./chunk-ZZMI3WOT.mjs";import"./chunk-D7OMXGIZ.mjs";import"./chunk-KDCM7S3S.mjs";import"./chunk-QXLFTCLC.mjs";import"./chunk-E7BKWHOT.mjs";import"./chunk-3QJ5GRBH.mjs";import"./chunk-6B3NOY5W.mjs";import"./chunk-G4ZTSLZU.mjs";import"./chunk-WPYWCWWL.mjs";import"./chunk-GAMAKN5L.mjs";import"./chunk-YOJKIMU5.mjs";import"./chunk-YJ4DSRDY.mjs";import"./chunk-RVCLMO5Q.mjs";import"./chunk-RN7J5TRU.mjs";import"./chunk-3DOIE4DV.mjs";import"./chunk-3MLGWUSK.mjs";import"./chunk-YAPGJZPI.mjs";import"./chunk-EAHJZDOJ.mjs";import"./chunk-QPT2Y2GZ.mjs";import"./chunk-EWDJMJO5.mjs";import"./chunk-CRBOK3JT.mjs";import"./chunk-CJ4CSVU3.mjs";import"./chunk-OGSZZ4JO.mjs";import"./chunk-LGQSJCKE.mjs";import"./chunk-ONHY4KNY.mjs";import"./chunk-3IT7LHWR.mjs";import"./chunk-35XSD4QM.mjs";import"./chunk-2GA735OZ.mjs";import"./chunk-BREZX5L5.mjs";import"./chunk-NJO2BIJX.mjs";import"./chunk-6ISHV73H.mjs";import"./chunk-PIHG6HJO.mjs";import"./chunk-CSLSWUUT.mjs";import"./chunk-IB56SYTG.mjs";import"./chunk-2CECZN67.mjs";import"./chunk-N2VISDTG.mjs";import"./chunk-SV3ZNZQU.mjs";import"./chunk-VMXJZ4KQ.mjs";import"./chunk-CYM75INB.mjs";import"./chunk-R4H52Q7S.mjs";import"./chunk-PD2HKW2S.mjs";import"./chunk-RYSV44B4.mjs";import"./chunk-D6LM7DTJ.mjs";import"./chunk-4YT5YJIF.mjs";import"./chunk-3C2XT64C.mjs";import"./chunk-AKVRG7UU.mjs";import"./chunk-3DXMWDQ3.mjs";import"./chunk-GH77FX2Y.mjs";import"./chunk-3QTHW2CD.mjs";import"./chunk-A6OAPDIA.mjs";import"./chunk-UVEDFIPN.mjs";import"./chunk-OBIJIQCZ.mjs";import"./chunk-HOV6DDBZ.mjs";import"./chunk-RECQ74RP.mjs";import"./chunk-UE7Y65C3.mjs";import{a}from"./chunk-6FULVULN.mjs";import"./chunk-XOF6UTZX.mjs";import"./chunk-LZNHGH56.mjs";import"./chunk-UZTA2EUU.mjs";import"./chunk-GXFYRMJZ.mjs";import"./chunk-77MT33VR.mjs";import"./chunk-ULOFDFHJ.mjs";import"./chunk-NDUODAY2.mjs";import"./chunk-4F3DG6YB.mjs";import"./chunk-VEDMJBJV.mjs";import"./chunk-QEWDIPJ7.mjs";import"./chunk-OGPJTUAL.mjs";import"./chunk-354GX6IB.mjs";import"./chunk-5RRKGN2U.mjs";import"./chunk-BDZ3TSOT.mjs";import"./chunk-Y4NIR77Z.mjs";export{j as KeyBook,R as MOTION_PRESETS,Aa as SAFE_INSETS,i as Track,sa as UNIT_INDEX,ba as after,Ra as analyzeAudio,l as analyzeChannels,Oa as anchorPoint,ha as arcPath,qa as arrowPaths,f as ascending,o as audioLevelsSchema,q as bakeFunction,p as bakeSamples,k as bandEdges,_ as basePropsSchema,I as beats,ca as bind,Sa as bindComponent,ra as boilKeys,Na as boundsOf,na as boxPath,ga as catmullRom,Q as chain,xa as constantExpression,A as contrastRatio,P as cover,$ as defineComponent,Ca as defineMeta,W as defineTheme,ea as dist,ka as drawOnKeys,b as ease,Fa as elevate,Ea as elevationStyle,ma as ellipsePath,T as enterAnimation,c as evaluateEase,za as evaluateGlyphExpression,U as exitAnimation,Ia as findRange,N as frameSpan,ya as glyphAnimator,F as hashRng,E as hashString,da as holdFirstKeys,C as inkOn,B as isLight,e as last,fa as lerp2,oa as linePath,Ja as lineShift,z as luminance,y as mix,Y as offsetCues,v as parseColor,Z as pulseKeys,J as quantize,Ka as rangeRects,wa as rendererChars,m as resampleBands,S as resolveMotion,La as resolveTarget,D as rng,d as round,Ba as safeArea,K as scaleFrames,ta as scheduleExpression,n as smoothRelease,r as springAt,t as springKeys,s as springSettleFrames,u as springTrack,pa as squigglePath,L as staggerOffsets,M as staggerRanks,va as stepExpression,g as supersede,Ga as surfaceFill,Pa as targetPoint,Da as targetSchema,Ma as textLayout,X as themeFrames,V as themes,G as toFrames,ia as toPathData,H as toSeconds,ja as transformPathData,x as transparent,Qa as typingFrames,h as valueAt,ua as windowExpression,w as withAlpha,aa as withDefaults,O as within,la as wobblePoints,Ha as wordRanges,a as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ye,$a as Wf,A as nd,Aa as _e,B as od,Ba as $e,C as pd,Ca as af,D as qd,Da as bf,E as rd,Ea as cf,F as sd,Fa as df,G as td,Ga as ef,H as ud,Ha as ff,I as vd,Ia as gf,J as wd,Ja as hf,K as xd,Ka as nf,L as yd,La as of,M as zd,Ma as pf,N as Ad,Na as sf,O as Bd,Oa as Hf,P as Cd,Pa as If,Q as Dd,Qa as Jf,R as Ed,Ra as Kf,S as Yd,Sa as Nf,T as be,Ta as Of,U as ce,Ua as Pf,V as ee,Va as Qf,W as fe,Wa as Rf,X as ge,Xa as Sf,Y as te,Ya as Tf,Z as ue,Za as Uf,_ as ve,_a as Vf,a as Pc,aa as Ae,ab as Xf,b as Qc,ba as Be,bb as Yf,c as Rc,ca as Ce,cb as Zf,d as Sc,da as De,db as cg,e as Tc,ea as Ee,eb as dg,f as Uc,fa as Fe,fb as eg,g as Vc,ga as Ge,gb as fg,h as Wc,ha as He,hb as gg,i as Xc,ia as Ie,ib as xh,j as Yc,ja as Je,jb as yh,k as Zc,ka as Ke,kb as zh,l as _c,la as Le,lb as Ah,m as $c,ma as Me,mb as Bh,md as Sh,n as ad,na as Ne,nb as Ch,nd as Th,o as bd,oa as Oe,ob as Dh,od as Uh,p as cd,pa as Pe,pb as Eh,pd as Vh,q as dd,qa as Qe,qb as Fh,qc as Nh,qd as Wh,r as ed,ra as Re,rb as Gh,rc as Oh,rd as Xh,s as fd,sa as Se,sb as Hh,sd as Yh,t as gd,ta as Te,tb as Ih,td as Zh,u as hd,ua as Ue,ub as Jh,uc as Ph,ud as _h,v as id,va as Ve,vb as Kh,vd as $h,w as jd,wa as We,wb as Lh,x as kd,xa as Xe,xb as Mh,xc as Qh,y as ld,ya as Ye,yc as Rh,z as md,za as Ze}from"./chunk-VM2ZBPLM.mjs";import"./chunk-2YJ2EW2B.mjs";import{$ as Zd,A as pc,B as qc,Ba as jf,C as rc,Ca as kf,D as sc,Da as lf,E as tc,F as uc,Fa as mf,G as vc,H as wc,Q as xc,R as yc,S as zc,T as Ac,U as Bc,V as Xd,a as Mb,b as Nb,c as Tb,d as Ub,da as _d,e as Vb,ea as $d,f as Wb,fa as ae,g as Xb,h as Yb,i as Zb,j as _b,ja as he,k as $b,ka as ie,l as ac,la as je,m as bc,ma as me,n as cc,na as ne,o as dc,oa as oe,p as ec,pa as pe,q as fc,qa as qe,r as gc,s as hc,sa as re,t as ic,ta as se,u as jc,v as kc,w as lc,wa as we,x as mc,xa as xe,y as nc,ya as ze,z as oc}from"./chunk-A2OTOW3B.mjs";import"./chunk-3F6JGYSP.mjs";import"./chunk-JJ7D26WR.mjs";import{b as ke,c as le}from"./chunk-QAQJSWUT.mjs";import{a as Fd,b as Gd,c as Hd,d as Id,e as Jd,f as Kd,g as Ld,h as Md,i as Nd,j as Od,k as Pd,l as Qd,m as Rd,n as Sd,o as Ud,x as Wd}from"./chunk-TEA3GVBJ.mjs";import{a as Td}from"./chunk-JAAFSVAG.mjs";import{$ as gh,A as Hg,B as Ig,C as Jg,D as Kg,E as Lg,F as Mg,G as Ng,H as Og,I as Pg,J as Qg,K as Rg,L as Sg,M as Tg,N as Ug,O as Vg,P as Wg,Q as Xg,R as Yg,S as Zg,T as _g,U as $g,V as ah,W as bh,X as ch,Y as dh,Z as eh,_ as fh,a as hg,aa as hh,b as ig,ba as ih,c as jg,ca as jh,d as kg,da as kh,e as lg,ea as lh,f as mg,fa as mh,g as ng,ga as nh,h as og,ha as oh,i as pg,ia as ph,j as qg,ja as qh,k as rg,ka as rh,l as sg,la as sh,m as tg,ma as th,n as ug,na as uh,o as vg,oa as vh,p as wg,pa as wh,q as xg,r as yg,s as zg,t as Ag,u as Bg,v as Cg,w as Dg,x as Eg,y as Fg,z as Gg}from"./chunk-XSHNQJ7L.mjs";import"./chunk-H2XKXXAU.mjs";import{$ as xf,A as oa,B as pa,C as qa,D as Ia,E as Ja,F as Ka,G as La,H as Ma,I as Na,J as Oa,K as Pa,L as Qa,M as Ra,N as $a,O as Db,P as Jb,Q as Kb,R as Lb,V as tf,W as uf,X as vf,_ as wf,aa as yf,b as u,ba as zf,c as v,ca as Af,d as w,e as x,f as y,fa as Bf,g as z,h as O,i as P,j as Z,k as _,ka as Cf,l as $,m as aa,ma as Df,n as ba,na as Ef,o as ca,oa as Ff,p as da,pa as Gf,q as ea,r as fa,s as ga,t as ha,u as ia,v as ja,w as ka,x as la,y as ma,z as na}from"./chunk-SWRGQTVC.mjs";import"./chunk-W4XR6F5G.mjs";import"./chunk-ICWD36H6.mjs";import"./chunk-EYE3GNL5.mjs";import"./chunk-ZHNEZZ6A.mjs";import"./chunk-SFHWP65D.mjs";import"./chunk-NVXFEDJS.mjs";import"./chunk-NTSALWFF.mjs";import"./chunk-ZZMI3WOT.mjs";import"./chunk-D7OMXGIZ.mjs";import"./chunk-KDCM7S3S.mjs";import"./chunk-QXLFTCLC.mjs";import"./chunk-E7BKWHOT.mjs";import"./chunk-3QJ5GRBH.mjs";import"./chunk-6B3NOY5W.mjs";import"./chunk-G4ZTSLZU.mjs";import"./chunk-WPYWCWWL.mjs";import"./chunk-GAMAKN5L.mjs";import"./chunk-YOJKIMU5.mjs";import"./chunk-YJ4DSRDY.mjs";import"./chunk-RVCLMO5Q.mjs";import"./chunk-RN7J5TRU.mjs";import"./chunk-3DOIE4DV.mjs";import"./chunk-3MLGWUSK.mjs";import"./chunk-YAPGJZPI.mjs";import{a as Eb,b as Fb,c as Gb,d as Hb,e as Ib}from"./chunk-EAHJZDOJ.mjs";import"./chunk-QPT2Y2GZ.mjs";import"./chunk-EWDJMJO5.mjs";import"./chunk-CRBOK3JT.mjs";import{a as Q,b as R,c as nb}from"./chunk-CJ4CSVU3.mjs";import{a as rf}from"./chunk-OGSZZ4JO.mjs";import{a as qf}from"./chunk-LGQSJCKE.mjs";import"./chunk-ONHY4KNY.mjs";import"./chunk-3IT7LHWR.mjs";import"./chunk-35XSD4QM.mjs";import"./chunk-2GA735OZ.mjs";import"./chunk-BREZX5L5.mjs";import"./chunk-NJO2BIJX.mjs";import"./chunk-6ISHV73H.mjs";import"./chunk-PIHG6HJO.mjs";import{a as xb,b as yb,c as zb,d as Ab,e as Bb,f as Cb}from"./chunk-CSLSWUUT.mjs";import{a as Cc}from"./chunk-IB56SYTG.mjs";import{a as _f,b as $f,c as ag,d as bg}from"./chunk-2CECZN67.mjs";import"./chunk-N2VISDTG.mjs";import"./chunk-SV3ZNZQU.mjs";import"./chunk-VMXJZ4KQ.mjs";import"./chunk-CYM75INB.mjs";import"./chunk-R4H52Q7S.mjs";import"./chunk-PD2HKW2S.mjs";import"./chunk-RYSV44B4.mjs";import"./chunk-D6LM7DTJ.mjs";import"./chunk-4YT5YJIF.mjs";import{a as Lf}from"./chunk-3C2XT64C.mjs";import"./chunk-AKVRG7UU.mjs";import"./chunk-3DXMWDQ3.mjs";import{A as Ua,B as Va,C as Wa,D as Xa,E as Ya,F as Za,G as _a,a as S,b as T,c as U,d as V,e as W,f as X,g as Y,h as ra,i as sa,j as ta,k as ua,l as va,m as wa,n as xa,o as ya,p as za,q as Aa,r as Ba,s as Ca,t as Da,u as Ea,v as Fa,w as Ga,x as Ha,y as Sa,z as Ta}from"./chunk-GH77FX2Y.mjs";import"./chunk-3QTHW2CD.mjs";import{a as Qb,b as Rb}from"./chunk-A6OAPDIA.mjs";import"./chunk-UVEDFIPN.mjs";import{f as de}from"./chunk-OBIJIQCZ.mjs";import{a as A,b as B,c as C,d as D,e as E,f as F,g as G,h as H,i as I,j as J,k as K,l as L,m as M,n as N}from"./chunk-HOV6DDBZ.mjs";import{a as ab,b as bb,c as cb,d as db,e as eb,f as fb,g as gb,h as hb,i as ib,j as jb,k as kb,l as lb,m as mb}from"./chunk-RECQ74RP.mjs";import{f as Sb}from"./chunk-UE7Y65C3.mjs";import"./chunk-6FULVULN.mjs";import"./chunk-XOF6UTZX.mjs";import"./chunk-LZNHGH56.mjs";import{a as Ob}from"./chunk-UZTA2EUU.mjs";import{e as Pb}from"./chunk-GXFYRMJZ.mjs";import"./chunk-77MT33VR.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"./chunk-ULOFDFHJ.mjs";import{a as Mf}from"./chunk-NDUODAY2.mjs";import{B as Vd,j as Dc,k as Ec,l as Fc,m as Gc,n as Hc,o as Ic,p as Jc,q as Kc,r as Lc,s as Mc,t as Nc,u as Oc}from"./chunk-4F3DG6YB.mjs";import"./chunk-VEDMJBJV.mjs";import"./chunk-QEWDIPJ7.mjs";import{a as wb}from"./chunk-OGPJTUAL.mjs";import"./chunk-354GX6IB.mjs";import{a as ob,b as pb,c as qb,d as rb,e as sb,f as tb,g as ub,h as vb}from"./chunk-5RRKGN2U.mjs";import"./chunk-BDZ3TSOT.mjs";import"./chunk-Y4NIR77Z.mjs";var export_HeadlessMediaRenderer=Bh.HeadlessMediaRenderer;var export_HeadlessWebGPURenderer=Bh.HeadlessWebGPURenderer;var export_formatQaReport=Bh.formatQaReport;var export_planChunks=Bh.planChunks;var export_renderSemaphore=Bh.renderSemaphore;var export_resetRenderCaches=Bh.resetRenderCaches;var export_stitchChunks=Bh.stitchChunks;export{Bd as AETextAnimatorSchema,Pc as AdvancedTextAnimatorBuilder,gd as AdvancedTextAnimatorSchema,Qc as AnchorGroupingSchema,Rc as AnchorPresetSchema,yd as AnimatableGlyphPropsSchema,Ia as AnimationTypeSchema,Fa as AnyOutputUnionSchema,Hf as ApiError,jh as ApplyLUT,ig as Ascii,jg as AudioCompressor,kg as AudioDelay,va as AudioExtractorSignalDataSchema,lg as AudioFade,Mb as AudioLatentEngine,Nb as AudioLatentTrackCache,Xd as AudioMeshDeformPipeline,mg as AudioNoiseGate,ng as AudioParametricEq,og as AudioReverb,Lf as AudioSignal,eh as AudioSignalExtractor,cd as AudioSpectrumTypographySchema,Wa as BaseMediaOperationPropsSchema,Pa as BaseVideoLayerPropsSchema,Le as BloomConfigSchema,$g as Blur,Te as BoxNodeSchema,eb as CAPTION_LAYER_DEFAULTS,yf as COCO17_BONES,wf as COCO17_KEYPOINTS,xf as COCO17_KEYPOINT_NAMES,tf as COCO_CLASSES,na as COMPOSITE_OPERATIONS,qa as COMPOSITOR_DEFAULTS,wg as CRT,Wb as CUBE_FLIP,Vb as Camera3D,ve as CameraAnimation,Ge as CameraNodeSchema,pg as CameraParallax3D,of as CannyComputePipeline,cf as CarrierHandoffConfigSchema,qg as ChannelMerger,rg as ChannelSplitter,bd as ChromaticGlitchConfigSchema,fg as ClipVision,vb as Color,sg as ColorBalance,tg as ColorKey,Ze as ColorStopSchema,Vh as Composition,af as CompositorProgramSchema,O as ConfigHandleSchema,pa as ConfigSchemaRegistry,ug as Contour,nf as ControlNetMultiplexer,vg as CornerPin,sh as Crop,id as CubicBezierSegmentSchema,fh as Curves,dh as CustomEffect,la as DATA_TYPE_EXTENSIONS,cg as DEFAULT_CHART_COLORS,bb as DEFAULT_DURATION_MS,ab as DEFAULT_FPS,cb as DEFAULT_MEDIA_DIMENSION,jc as DIRECT_LIGHT_FLOATS,rc as DOPPLER_LUT_MAX,sc as DOPPLER_LUT_SIZE,T as DataType,S as DataTypeVal,U as DataTypes,xg as Datamosh,pf as DepthNormalsComputePipeline,rh as DepthOfField,yg as DisplacementMap,zg as Dither,_c as DynamicStrokePropertiesSchema,ac as ENVIRONMENT_PRESETS,ie as Easing,$h as Effect,Ud as EffectPipeline,Cd as EnhancedTextNodeSchema,Me as EnvironmentFloorSchema,Ke as EnvironmentFogSchema,Qe as EnvironmentGiSchema,Ie as EnvironmentPresetSchema,Pe as EnvironmentSsrSchema,Ne as EnvironmentVolumetricFogNoiseSchema,Oe as EnvironmentVolumetricFogSchema,Ha as ExportResultSchema,Zc as ExpressionSelectorSchema,fd as ExtendedGlyphPropertiesSchema,$a as ExtendedLayerSchema,Ag as ExtractLUT,Jf as FRAMEFIELDS_AI_PROXY_URL,X as FileAssetSchema,ra as FileDataSchema,ch as FilmGrain,Se as FlexNodeSchema,Bg as Flip,Mf as FontManager,Hh as Fracture3D,ua as GeneratorSignalDataSchema,De as GeometryOutlineOptionsSchema,Yd as GlassPipeline,oa as GlobalCompositeOperation,zd as GlyphAnchorGroupingSchema,Ad as GlyphAnchorPointSchema,Cg as Gooey,Cb as Gradient,hh as GradientMap,mh as HalftoneScreen,V as HandleTypeVal,export_HeadlessMediaRenderer as HeadlessMediaRenderer,export_HeadlessWebGPURenderer as HeadlessWebGPURenderer,lh as HighPass,Dg as Iridescence,W as JsonValueSchema,Eg as Kaleidoscope,Fg as KenBurns,$c as KineticMarqueeConfigSchema,hc as LIGHT_UNIFORM_SIZE_BYTES,Wh as Layer,Ch as Layer3D,ue as LayerAnimation,Gg as LayerStyle,$e as LayoutNodeSchema,bh as Levels,Xh as Light,kc as Light3D,Re as LightNodeSchema,He as LightTypeSchema,Eh as Lighting,Uc as LineSpacingDynamicsSchema,Hg as Liquify,dd as LongShadowConfigSchema,xb as MAX_GRADIENT_STOPS,gc as MAX_LIGHTS,ma as MIME_TYPES,Ig as MaskMath,Be as MaterialTypeSchema,Ub as Matrix4Math,Ae as MatteModeSchema,Uh as Media,Ta as MediaMetadataSchema,Xe as MediaNodeSchema,Za as MediaOperationSchema,F as MediaSignalRecorder,Sa as MediaSourceSchema,I as MediaTimeRemapInputSchema,G as MediaTimeRemapSchema,H as MediaTimeSignalRemapSchema,Jg as MeshWarp,_e as Model3DNodeSchema,u as ModerationError,v as ModerationUnrefundableError,wh as Modulate,oh as MotionBlur,Zd as MotionBlurPipeline,Ea as MultiOutputGenericSchema,P as NodeMetadataSchema,Ga as NodeResultSchema,Y as NodeVisualConfigSchema,Kg as NoiseGenerator,Lg as OpArt,qf as OpticalFlowComputePipeline,Ba as OutputItemSchema,qh as PBRGlass,Mg as Paint,Ng as Painterly,ed as ParticleDissolveConfigSchema,xh as Particles,Og as PatchHeal,pc as Path3D,gg as PersonTrack,Kh as Physics,Fh as PhysicsBody2D,Ih as PhysicsBody3D,Gh as PhysicsWorld2D,Jh as PhysicsWorld3D,Pg as Pixelate,zf as PoseSkeletonRenderer,Qg as Posterize,Rg as ProceduralVFX,a as ProgrammaticSignal,Vg as RGBSplit,dg as RIG_PRESETS,Sg as RefineEdge,Tg as RefractionCaustics3D,uh as Relight3D,Wd as Renderer2D,$d as Renderer3D,Ug as ResizerScaler,Wg as Rotate,ph as SSAO,ce as SSAOPipeline,gf as Scene,df as SceneDefinitionSchema,bf as SceneTransitionTypeSchema,Af as SegmentationTexturePool,gh as SelectiveColor,qd as SelectorBasedOnSchema,td as SelectorModeSchema,sd as SelectorShapeSchema,rd as SelectorUnitsSchema,hf as Sequence,be as ShadowPipeline,ih as ShadowsHighlights,Ye as ShapeNodeSchema,t as Signal,ta as SignalChannelMetaSchema,ya as SignalDataSchema,xa as SignalGateDataSchema,wa as SignalMathDataSchema,sa as SignalStatsSchema,Da as SingleOutputGenericSchema,Tc as SkewPropertiesSchema,Dc as SlugFontCache,Vd as SlugPipeline,Xa as SourceOperationSchema,Xc as Spatial3DPropertiesSchema,Cf as SpatialLandmarkTransformer,Yc as SpringPhysicsSchema,Xg as StereoPanning,Lh as Styles,db as TEXT_LAYER_DEFAULTS,vh as TemporalDeflicker,rf as TemporalDeflickerPipeline,uf as TemporalObjectTracker,sf as TensorPipeline,Sc as TextAnchorConfigSchema,Fe as TextAnimator,Ed as TextAnimatorBuilder,Ee as TextAnimatorSchema,md as TextCursorConfigSchema,ld as TextCursorStyleSchema,We as TextNodeSchema,Ya as TextOperationSchema,Dd as TextPathBuilder,kd as TextPathOptionsSchema,jd as TextPathSourceSchema,ud as TextRangeSelectorSchema,od as TextScrambleConfigSchema,xd as TextSelectorSchema,wd as TextSignalSelectorSchema,Ue as TextSpanMarkSchema,Ve as TextSpanSchema,vd as TextWigglySelectorSchema,nh as TileOffset,Ua as TimelineSegmentSchema,Va as TimelineTransformSchema,Je as ToneMappingSchema,Yg as Toon,Ce as ToonShadingSchema,Zg as Trails,Dh as Transition,Ra as TransitionSchema,Qa as TransitionTypeSchema,pd as TypewriterAnimatorSchema,nd as TypingCadenceSchema,kh as UnsharpMask,If as ValidationError,ad as VariableFontAxesSchema,hd as Vec2Schema,Tb as Vector3Math,Ja as VideoAnimationSchema,Oa as VideoLayerTypeSchema,Ka as VideoSpatialPropsSchema,Na as VideoStylePropsSchema,Ma as VideoTextPropsSchema,La as VideoTimingPropsSchema,_g as Vignette,_a as VirtualMediaDataSchema,th as Vision,Df as VisionBundle,Gf as VisionNode,Bf as VisionRunner,_d as VolumetricFogPipeline,Wc as VolumetricFormationConfigSchema,Vc as VolumetricFormationModeSchema,wc as aberrate,Rf as accent,Rh as after,Kf as ai,Sh as analyzeAudio,vf as analyzeSequence,jb as appendOperation,kf as applyStaggerToChildren,x as assertFps,nb as assertNever,he as bezier,Th as bindComponent,Zh as blurRegion,Pf as bold,Jc as buildPathLUT,ff as calculateSequenceTimeline,Zb as cameraBasis,Jb as checkNodeResultCache,Xf as code,mf as collectNodeOps,Sf as color,C as compositionFrameContext,lf as compositorToProgram,Hd as computeAnchorPivotOffset,ef as computeCarrierContinuity,zh as computeGridLayout,se as computeLayout,re as computeLayoutSync,Id as computeLineLeadingDisplacement,Nd as computeRangeSelectorWeight,jf as computeStaggerDelay,ge as computeStrokeRect,mb as computeVideoCropRenderProps,k as computed,s as cosineSignal,mc as createNoise,Ca as createOutputItemSchema,lc as createRandom,hb as createVirtualMedia,Xb as cubeFaceCameras,Yb as cubeTexel,ka as dataTypeColors,$b as defaultCubeFaceSize,Oh as defineTheme,ca as degrees,Qb as describeGpu,Aa as deserializeSignalData,Od as deterministicWigglyNoise,Hc as distanceToCurveParameter,qc as dopplerColorMatrix,uc as dopplerLuminanceGain,tc as dopplerLut,_h as editTrackedRegion,ah as effectFactories,hg as effectMeta,Lc as ellipseToCubicBeziers,wb as emojiPresentation,bg as encodeStereoWav,Rb as ensureDevice,xe as evaluateAnimationAtFrame,Ec as evaluateCubicBezier,Fc as evaluateCubicBezierDerivative,Jd as evaluateExpressionSelector,Ld as evaluateMarqueeOffset,Qd as evaluateSelectorCombination,Gd as evaluateSkewMatrix,Fd as evaluateSpringProgress,we as evaluateTrackAtFrame,Sd as evaluateTypewriterState,Kd as evaluateVolumetricFormation,Lb as extractSvgDimensions,Ib as findSourceAsset,rb as formatHex,export_formatQaReport as formatQaReport,aa as fps,nc as fractal2,Z as frame,l as frameArraySignal,w as frameCount,m as frameSignal,Gc as generateArcLengthLUT,z as generateId,Oc as generatePathSegments,lb as getActiveMediaMetadata,kb as getFileDataMetadata,Eb as getFingerprint,fb as getLeafMediaType,ib as getMediaType,Fb as getRenderFingerprint,Rd as getScramblePool,Pd as getShuffledOrder,Bb as gradientStopsToOklab,fa as handleId,ga as handleLabel,Hb as hasOnlySingleSource,ze as hoistMattes,Sb as inputStore,je as interpolate,yb as isCssGradient,Db as isEqual,ia as isFrameIndex,ja as isNormalized,h as isSignal,j as isValueSignal,Gb as isVirtualMediaData,Qf as italic,_b as lensCenterDensity,Ab as limitGradientStops,bc as linearRgb,ye as lintComposition,yc as loadFBX,ae as loadModel3D,Bc as loadOBJ,vc as lorentzFactor,Cc as lutStore,ee as mapBlendModeToSkia,Uf as mark,ne as measureSpring,pe as measureText,qe as measureTextAsync,L as mediaSourceIsHold,N as mediaSourceRange,M as mediaSourceRate,K as mediaSourceTime,te as mergeAnimationTracks,de as mixAudioTracks,sb as mixColors,$f as mixSfxInto,$ as ms,ha as nodeId,ub as normalizeColorStops,Yf as normalizeTextSpans,ba as normalized,pb as oklabToRgb,ic as parseColorToRgb,qb as parseCssColor,zb as parseCssGradient,xc as parseFBX,Ac as parseMTL,Zf as parseMarkup,zc as parseOBJ,Nc as parseSvgPathToCubicBeziers,Ef as pinNodeToLandmark,Ff as pinNodeToObject,ea as pixels,export_planChunks as planChunks,le as preloadCompositionFonts,ke as preloadFont,b as programmaticSignal,o as progressSignal,Ph as pulseKeys,da as radians,g as registerSignalDependency,Ah as renderFrameGrid,export_renderSemaphore as renderSemaphore,_f as renderSfx,Q as reportRenderDiagnostic,fe as requiresIsolation,export_resetRenderCaches as resetRenderCaches,e as resolveBoolean,fc as resolveEnvironment,y as resolveFrameRequest,dc as resolveGi,gb as resolveMediaMimeType,c as resolveNumber,f as resolveParam,yh as resolveSamplePoints,cc as resolveSsr,d as resolveString,ec as resolveVolumetricFog,eg as retargetPose,ob as rgbToOklab,Nf as rich,Md as sampleAudioSpectrumScale,tb as sampleColorStops,Ic as sampleCurveGeometry,B as sampleFrameMediaSignal,A as sampleMediaSignal,Kc as samplePathChainGeometry,E as sampledMediaSourceRange,D as sampledMediaSourceTime,_ as seconds,Yh as section,za as serializeSignalData,Ob as shaderStore,i as signal,q as signalBuilder,Pb as signalRegistry,r as sineSignal,Tf as size,ag as softLimit,Of as span,oe as spring,me as springCalculation,Kb as stampResult,Mh as startPreview,export_stitchChunks as stitchChunks,Wf as sub,Vf as sup,R as takeRenderDiagnostics,oc as terrace,Td as textureCache,Nh as themes,n as timeSignal,p as updateClockSignals,J as validateMediaTimeRemap,Mc as waveToCubicBeziers,Qh as withDefaults};
|
|
1
|
+
import{$ as ye,$a as Wf,A as nd,Aa as _e,B as od,Ba as $e,C as pd,Ca as af,D as qd,Da as bf,E as rd,Ea as cf,F as sd,Fa as df,G as td,Ga as ef,H as ud,Ha as ff,I as vd,Ia as gf,J as wd,Ja as hf,K as xd,Ka as nf,L as yd,La as of,M as zd,Ma as pf,N as Ad,Na as sf,O as Bd,Oa as Hf,P as Cd,Pa as If,Q as Dd,Qa as Jf,R as Ed,Ra as Kf,S as Yd,Sa as Nf,T as be,Ta as Of,U as ce,Ua as Pf,V as ee,Va as Qf,W as fe,Wa as Rf,X as ge,Xa as Sf,Y as te,Ya as Tf,Z as ue,Za as Uf,_ as ve,_a as Vf,a as Pc,aa as Ae,ab as Xf,b as Qc,ba as Be,bb as Yf,c as Rc,ca as Ce,cb as Zf,d as Sc,da as De,db as cg,e as Tc,ea as Ee,eb as dg,f as Uc,fa as Fe,fb as eg,g as Vc,ga as Ge,gb as fg,h as Wc,ha as He,hb as gg,i as Xc,ia as Ie,ib as xh,j as Yc,ja as Je,jb as yh,k as Zc,ka as Ke,kb as zh,l as _c,la as Le,lb as Ah,m as $c,ma as Me,mb as Bh,md as Sh,n as ad,na as Ne,nb as Ch,nd as Th,o as bd,oa as Oe,ob as Dh,od as Uh,p as cd,pa as Pe,pb as Eh,pd as Vh,q as dd,qa as Qe,qb as Fh,qc as Nh,qd as Wh,r as ed,ra as Re,rb as Gh,rc as Oh,rd as Xh,s as fd,sa as Se,sb as Hh,sd as Yh,t as gd,ta as Te,tb as Ih,td as Zh,u as hd,ua as Ue,ub as Jh,uc as Ph,ud as _h,v as id,va as Ve,vb as Kh,vd as $h,w as jd,wa as We,wb as Lh,x as kd,xa as Xe,xb as Mh,xc as Qh,y as ld,ya as Ye,yc as Rh,z as md,za as Ze}from"./chunk-VZUVB3BP.mjs";import"./chunk-2YJ2EW2B.mjs";import{$ as Zd,A as pc,B as qc,Ba as jf,C as rc,Ca as kf,D as sc,Da as lf,E as tc,F as uc,Fa as mf,G as vc,H as wc,Q as xc,R as yc,S as zc,T as Ac,U as Bc,V as Xd,a as Mb,b as Nb,c as Tb,d as Ub,da as _d,e as Vb,ea as $d,f as Wb,fa as ae,g as Xb,h as Yb,i as Zb,j as _b,ja as he,k as $b,ka as ie,l as ac,la as je,m as bc,ma as me,n as cc,na as ne,o as dc,oa as oe,p as ec,pa as pe,q as fc,qa as qe,r as gc,s as hc,sa as re,t as ic,ta as se,u as jc,v as kc,w as lc,wa as we,x as mc,xa as xe,y as nc,ya as ze,z as oc}from"./chunk-A2OTOW3B.mjs";import"./chunk-3F6JGYSP.mjs";import"./chunk-JJ7D26WR.mjs";import{b as ke,c as le}from"./chunk-QAQJSWUT.mjs";import{a as Fd,b as Gd,c as Hd,d as Id,e as Jd,f as Kd,g as Ld,h as Md,i as Nd,j as Od,k as Pd,l as Qd,m as Rd,n as Sd,o as Ud,x as Wd}from"./chunk-TEA3GVBJ.mjs";import{a as Td}from"./chunk-JAAFSVAG.mjs";import{$ as gh,A as Hg,B as Ig,C as Jg,D as Kg,E as Lg,F as Mg,G as Ng,H as Og,I as Pg,J as Qg,K as Rg,L as Sg,M as Tg,N as Ug,O as Vg,P as Wg,Q as Xg,R as Yg,S as Zg,T as _g,U as $g,V as ah,W as bh,X as ch,Y as dh,Z as eh,_ as fh,a as hg,aa as hh,b as ig,ba as ih,c as jg,ca as jh,d as kg,da as kh,e as lg,ea as lh,f as mg,fa as mh,g as ng,ga as nh,h as og,ha as oh,i as pg,ia as ph,j as qg,ja as qh,k as rg,ka as rh,l as sg,la as sh,m as tg,ma as th,n as ug,na as uh,o as vg,oa as vh,p as wg,pa as wh,q as xg,r as yg,s as zg,t as Ag,u as Bg,v as Cg,w as Dg,x as Eg,y as Fg,z as Gg}from"./chunk-XSHNQJ7L.mjs";import"./chunk-H2XKXXAU.mjs";import{$ as xf,A as oa,B as pa,C as qa,D as Ia,E as Ja,F as Ka,G as La,H as Ma,I as Na,J as Oa,K as Pa,L as Qa,M as Ra,N as $a,O as Db,P as Jb,Q as Kb,R as Lb,V as tf,W as uf,X as vf,_ as wf,aa as yf,b as u,ba as zf,c as v,ca as Af,d as w,e as x,f as y,fa as Bf,g as z,h as O,i as P,j as Z,k as _,ka as Cf,l as $,m as aa,ma as Df,n as ba,na as Ef,o as ca,oa as Ff,p as da,pa as Gf,q as ea,r as fa,s as ga,t as ha,u as ia,v as ja,w as ka,x as la,y as ma,z as na}from"./chunk-SWRGQTVC.mjs";import"./chunk-W4XR6F5G.mjs";import"./chunk-ICWD36H6.mjs";import"./chunk-EYE3GNL5.mjs";import"./chunk-ZHNEZZ6A.mjs";import"./chunk-SFHWP65D.mjs";import"./chunk-NVXFEDJS.mjs";import"./chunk-NTSALWFF.mjs";import"./chunk-ZZMI3WOT.mjs";import"./chunk-D7OMXGIZ.mjs";import"./chunk-KDCM7S3S.mjs";import"./chunk-QXLFTCLC.mjs";import"./chunk-E7BKWHOT.mjs";import"./chunk-3QJ5GRBH.mjs";import"./chunk-6B3NOY5W.mjs";import"./chunk-G4ZTSLZU.mjs";import"./chunk-WPYWCWWL.mjs";import"./chunk-GAMAKN5L.mjs";import"./chunk-YOJKIMU5.mjs";import"./chunk-YJ4DSRDY.mjs";import"./chunk-RVCLMO5Q.mjs";import"./chunk-RN7J5TRU.mjs";import"./chunk-3DOIE4DV.mjs";import"./chunk-3MLGWUSK.mjs";import"./chunk-YAPGJZPI.mjs";import{a as Eb,b as Fb,c as Gb,d as Hb,e as Ib}from"./chunk-EAHJZDOJ.mjs";import"./chunk-QPT2Y2GZ.mjs";import"./chunk-EWDJMJO5.mjs";import"./chunk-CRBOK3JT.mjs";import{a as Q,b as R,c as nb}from"./chunk-CJ4CSVU3.mjs";import{a as rf}from"./chunk-OGSZZ4JO.mjs";import{a as qf}from"./chunk-LGQSJCKE.mjs";import"./chunk-ONHY4KNY.mjs";import"./chunk-3IT7LHWR.mjs";import"./chunk-35XSD4QM.mjs";import"./chunk-2GA735OZ.mjs";import"./chunk-BREZX5L5.mjs";import"./chunk-NJO2BIJX.mjs";import"./chunk-6ISHV73H.mjs";import"./chunk-PIHG6HJO.mjs";import{a as xb,b as yb,c as zb,d as Ab,e as Bb,f as Cb}from"./chunk-CSLSWUUT.mjs";import{a as Cc}from"./chunk-IB56SYTG.mjs";import{a as _f,b as $f,c as ag,d as bg}from"./chunk-2CECZN67.mjs";import"./chunk-N2VISDTG.mjs";import"./chunk-SV3ZNZQU.mjs";import"./chunk-VMXJZ4KQ.mjs";import"./chunk-CYM75INB.mjs";import"./chunk-R4H52Q7S.mjs";import"./chunk-PD2HKW2S.mjs";import"./chunk-RYSV44B4.mjs";import"./chunk-D6LM7DTJ.mjs";import"./chunk-4YT5YJIF.mjs";import{a as Lf}from"./chunk-3C2XT64C.mjs";import"./chunk-AKVRG7UU.mjs";import"./chunk-3DXMWDQ3.mjs";import{A as Ua,B as Va,C as Wa,D as Xa,E as Ya,F as Za,G as _a,a as S,b as T,c as U,d as V,e as W,f as X,g as Y,h as ra,i as sa,j as ta,k as ua,l as va,m as wa,n as xa,o as ya,p as za,q as Aa,r as Ba,s as Ca,t as Da,u as Ea,v as Fa,w as Ga,x as Ha,y as Sa,z as Ta}from"./chunk-GH77FX2Y.mjs";import"./chunk-3QTHW2CD.mjs";import{a as Qb,b as Rb}from"./chunk-A6OAPDIA.mjs";import"./chunk-UVEDFIPN.mjs";import{f as de}from"./chunk-OBIJIQCZ.mjs";import{a as A,b as B,c as C,d as D,e as E,f as F,g as G,h as H,i as I,j as J,k as K,l as L,m as M,n as N}from"./chunk-HOV6DDBZ.mjs";import{a as ab,b as bb,c as cb,d as db,e as eb,f as fb,g as gb,h as hb,i as ib,j as jb,k as kb,l as lb,m as mb}from"./chunk-RECQ74RP.mjs";import{f as Sb}from"./chunk-UE7Y65C3.mjs";import"./chunk-6FULVULN.mjs";import"./chunk-XOF6UTZX.mjs";import"./chunk-LZNHGH56.mjs";import{a as Ob}from"./chunk-UZTA2EUU.mjs";import{e as Pb}from"./chunk-GXFYRMJZ.mjs";import"./chunk-77MT33VR.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"./chunk-ULOFDFHJ.mjs";import{a as Mf}from"./chunk-NDUODAY2.mjs";import{B as Vd,j as Dc,k as Ec,l as Fc,m as Gc,n as Hc,o as Ic,p as Jc,q as Kc,r as Lc,s as Mc,t as Nc,u as Oc}from"./chunk-4F3DG6YB.mjs";import"./chunk-VEDMJBJV.mjs";import"./chunk-QEWDIPJ7.mjs";import{a as wb}from"./chunk-OGPJTUAL.mjs";import"./chunk-354GX6IB.mjs";import{a as ob,b as pb,c as qb,d as rb,e as sb,f as tb,g as ub,h as vb}from"./chunk-5RRKGN2U.mjs";import"./chunk-BDZ3TSOT.mjs";import"./chunk-Y4NIR77Z.mjs";var export_HeadlessMediaRenderer=Bh.HeadlessMediaRenderer;var export_HeadlessWebGPURenderer=Bh.HeadlessWebGPURenderer;var export_formatQaReport=Bh.formatQaReport;var export_planChunks=Bh.planChunks;var export_renderSemaphore=Bh.renderSemaphore;var export_resetRenderCaches=Bh.resetRenderCaches;var export_stitchChunks=Bh.stitchChunks;export{Bd as AETextAnimatorSchema,Pc as AdvancedTextAnimatorBuilder,gd as AdvancedTextAnimatorSchema,Qc as AnchorGroupingSchema,Rc as AnchorPresetSchema,yd as AnimatableGlyphPropsSchema,Ia as AnimationTypeSchema,Fa as AnyOutputUnionSchema,Hf as ApiError,jh as ApplyLUT,ig as Ascii,jg as AudioCompressor,kg as AudioDelay,va as AudioExtractorSignalDataSchema,lg as AudioFade,Mb as AudioLatentEngine,Nb as AudioLatentTrackCache,Xd as AudioMeshDeformPipeline,mg as AudioNoiseGate,ng as AudioParametricEq,og as AudioReverb,Lf as AudioSignal,eh as AudioSignalExtractor,cd as AudioSpectrumTypographySchema,Wa as BaseMediaOperationPropsSchema,Pa as BaseVideoLayerPropsSchema,Le as BloomConfigSchema,$g as Blur,Te as BoxNodeSchema,eb as CAPTION_LAYER_DEFAULTS,yf as COCO17_BONES,wf as COCO17_KEYPOINTS,xf as COCO17_KEYPOINT_NAMES,tf as COCO_CLASSES,na as COMPOSITE_OPERATIONS,qa as COMPOSITOR_DEFAULTS,wg as CRT,Wb as CUBE_FLIP,Vb as Camera3D,ve as CameraAnimation,Ge as CameraNodeSchema,pg as CameraParallax3D,of as CannyComputePipeline,cf as CarrierHandoffConfigSchema,qg as ChannelMerger,rg as ChannelSplitter,bd as ChromaticGlitchConfigSchema,fg as ClipVision,vb as Color,sg as ColorBalance,tg as ColorKey,Ze as ColorStopSchema,Vh as Composition,af as CompositorProgramSchema,O as ConfigHandleSchema,pa as ConfigSchemaRegistry,ug as Contour,nf as ControlNetMultiplexer,vg as CornerPin,sh as Crop,id as CubicBezierSegmentSchema,fh as Curves,dh as CustomEffect,la as DATA_TYPE_EXTENSIONS,cg as DEFAULT_CHART_COLORS,bb as DEFAULT_DURATION_MS,ab as DEFAULT_FPS,cb as DEFAULT_MEDIA_DIMENSION,jc as DIRECT_LIGHT_FLOATS,rc as DOPPLER_LUT_MAX,sc as DOPPLER_LUT_SIZE,T as DataType,S as DataTypeVal,U as DataTypes,xg as Datamosh,pf as DepthNormalsComputePipeline,rh as DepthOfField,yg as DisplacementMap,zg as Dither,_c as DynamicStrokePropertiesSchema,ac as ENVIRONMENT_PRESETS,ie as Easing,$h as Effect,Ud as EffectPipeline,Cd as EnhancedTextNodeSchema,Me as EnvironmentFloorSchema,Ke as EnvironmentFogSchema,Qe as EnvironmentGiSchema,Ie as EnvironmentPresetSchema,Pe as EnvironmentSsrSchema,Ne as EnvironmentVolumetricFogNoiseSchema,Oe as EnvironmentVolumetricFogSchema,Ha as ExportResultSchema,Zc as ExpressionSelectorSchema,fd as ExtendedGlyphPropertiesSchema,$a as ExtendedLayerSchema,Ag as ExtractLUT,Jf as FRAMEFIELDS_AI_PROXY_URL,X as FileAssetSchema,ra as FileDataSchema,ch as FilmGrain,Se as FlexNodeSchema,Bg as Flip,Mf as FontManager,Hh as Fracture3D,ua as GeneratorSignalDataSchema,De as GeometryOutlineOptionsSchema,Yd as GlassPipeline,oa as GlobalCompositeOperation,zd as GlyphAnchorGroupingSchema,Ad as GlyphAnchorPointSchema,Cg as Gooey,Cb as Gradient,hh as GradientMap,mh as HalftoneScreen,V as HandleTypeVal,export_HeadlessMediaRenderer as HeadlessMediaRenderer,export_HeadlessWebGPURenderer as HeadlessWebGPURenderer,lh as HighPass,Dg as Iridescence,W as JsonValueSchema,Eg as Kaleidoscope,Fg as KenBurns,$c as KineticMarqueeConfigSchema,hc as LIGHT_UNIFORM_SIZE_BYTES,Wh as Layer,Ch as Layer3D,ue as LayerAnimation,Gg as LayerStyle,$e as LayoutNodeSchema,bh as Levels,Xh as Light,kc as Light3D,Re as LightNodeSchema,He as LightTypeSchema,Eh as Lighting,Uc as LineSpacingDynamicsSchema,Hg as Liquify,dd as LongShadowConfigSchema,xb as MAX_GRADIENT_STOPS,gc as MAX_LIGHTS,ma as MIME_TYPES,Ig as MaskMath,Be as MaterialTypeSchema,Ub as Matrix4Math,Ae as MatteModeSchema,Uh as Media,Ta as MediaMetadataSchema,Xe as MediaNodeSchema,Za as MediaOperationSchema,F as MediaSignalRecorder,Sa as MediaSourceSchema,I as MediaTimeRemapInputSchema,G as MediaTimeRemapSchema,H as MediaTimeSignalRemapSchema,Jg as MeshWarp,_e as Model3DNodeSchema,u as ModerationError,v as ModerationUnrefundableError,wh as Modulate,oh as MotionBlur,Zd as MotionBlurPipeline,Ea as MultiOutputGenericSchema,P as NodeMetadataSchema,Ga as NodeResultSchema,Y as NodeVisualConfigSchema,Kg as NoiseGenerator,Lg as OpArt,qf as OpticalFlowComputePipeline,Ba as OutputItemSchema,qh as PBRGlass,Mg as Paint,Ng as Painterly,ed as ParticleDissolveConfigSchema,xh as Particles,Og as PatchHeal,pc as Path3D,gg as PersonTrack,Kh as Physics,Fh as PhysicsBody2D,Ih as PhysicsBody3D,Gh as PhysicsWorld2D,Jh as PhysicsWorld3D,Pg as Pixelate,zf as PoseSkeletonRenderer,Qg as Posterize,Rg as ProceduralVFX,a as ProgrammaticSignal,Vg as RGBSplit,dg as RIG_PRESETS,Sg as RefineEdge,Tg as RefractionCaustics3D,uh as Relight3D,Wd as Renderer2D,$d as Renderer3D,Ug as ResizerScaler,Wg as Rotate,ph as SSAO,ce as SSAOPipeline,gf as Scene,df as SceneDefinitionSchema,bf as SceneTransitionTypeSchema,Af as SegmentationTexturePool,gh as SelectiveColor,qd as SelectorBasedOnSchema,td as SelectorModeSchema,sd as SelectorShapeSchema,rd as SelectorUnitsSchema,hf as Sequence,be as ShadowPipeline,ih as ShadowsHighlights,Ye as ShapeNodeSchema,t as Signal,ta as SignalChannelMetaSchema,ya as SignalDataSchema,xa as SignalGateDataSchema,wa as SignalMathDataSchema,sa as SignalStatsSchema,Da as SingleOutputGenericSchema,Tc as SkewPropertiesSchema,Dc as SlugFontCache,Vd as SlugPipeline,Xa as SourceOperationSchema,Xc as Spatial3DPropertiesSchema,Cf as SpatialLandmarkTransformer,Yc as SpringPhysicsSchema,Xg as StereoPanning,Lh as Styles,db as TEXT_LAYER_DEFAULTS,vh as TemporalDeflicker,rf as TemporalDeflickerPipeline,uf as TemporalObjectTracker,sf as TensorPipeline,Sc as TextAnchorConfigSchema,Fe as TextAnimator,Ed as TextAnimatorBuilder,Ee as TextAnimatorSchema,md as TextCursorConfigSchema,ld as TextCursorStyleSchema,We as TextNodeSchema,Ya as TextOperationSchema,Dd as TextPathBuilder,kd as TextPathOptionsSchema,jd as TextPathSourceSchema,ud as TextRangeSelectorSchema,od as TextScrambleConfigSchema,xd as TextSelectorSchema,wd as TextSignalSelectorSchema,Ue as TextSpanMarkSchema,Ve as TextSpanSchema,vd as TextWigglySelectorSchema,nh as TileOffset,Ua as TimelineSegmentSchema,Va as TimelineTransformSchema,Je as ToneMappingSchema,Yg as Toon,Ce as ToonShadingSchema,Zg as Trails,Dh as Transition,Ra as TransitionSchema,Qa as TransitionTypeSchema,pd as TypewriterAnimatorSchema,nd as TypingCadenceSchema,kh as UnsharpMask,If as ValidationError,ad as VariableFontAxesSchema,hd as Vec2Schema,Tb as Vector3Math,Ja as VideoAnimationSchema,Oa as VideoLayerTypeSchema,Ka as VideoSpatialPropsSchema,Na as VideoStylePropsSchema,Ma as VideoTextPropsSchema,La as VideoTimingPropsSchema,_g as Vignette,_a as VirtualMediaDataSchema,th as Vision,Df as VisionBundle,Gf as VisionNode,Bf as VisionRunner,_d as VolumetricFogPipeline,Wc as VolumetricFormationConfigSchema,Vc as VolumetricFormationModeSchema,wc as aberrate,Rf as accent,Rh as after,Kf as ai,Sh as analyzeAudio,vf as analyzeSequence,jb as appendOperation,kf as applyStaggerToChildren,x as assertFps,nb as assertNever,he as bezier,Th as bindComponent,Zh as blurRegion,Pf as bold,Jc as buildPathLUT,ff as calculateSequenceTimeline,Zb as cameraBasis,Jb as checkNodeResultCache,Xf as code,mf as collectNodeOps,Sf as color,C as compositionFrameContext,lf as compositorToProgram,Hd as computeAnchorPivotOffset,ef as computeCarrierContinuity,zh as computeGridLayout,se as computeLayout,re as computeLayoutSync,Id as computeLineLeadingDisplacement,Nd as computeRangeSelectorWeight,jf as computeStaggerDelay,ge as computeStrokeRect,mb as computeVideoCropRenderProps,k as computed,s as cosineSignal,mc as createNoise,Ca as createOutputItemSchema,lc as createRandom,hb as createVirtualMedia,Xb as cubeFaceCameras,Yb as cubeTexel,ka as dataTypeColors,$b as defaultCubeFaceSize,Oh as defineTheme,ca as degrees,Qb as describeGpu,Aa as deserializeSignalData,Od as deterministicWigglyNoise,Hc as distanceToCurveParameter,qc as dopplerColorMatrix,uc as dopplerLuminanceGain,tc as dopplerLut,_h as editTrackedRegion,ah as effectFactories,hg as effectMeta,Lc as ellipseToCubicBeziers,wb as emojiPresentation,bg as encodeStereoWav,Rb as ensureDevice,xe as evaluateAnimationAtFrame,Ec as evaluateCubicBezier,Fc as evaluateCubicBezierDerivative,Jd as evaluateExpressionSelector,Ld as evaluateMarqueeOffset,Qd as evaluateSelectorCombination,Gd as evaluateSkewMatrix,Fd as evaluateSpringProgress,we as evaluateTrackAtFrame,Sd as evaluateTypewriterState,Kd as evaluateVolumetricFormation,Lb as extractSvgDimensions,Ib as findSourceAsset,rb as formatHex,export_formatQaReport as formatQaReport,aa as fps,nc as fractal2,Z as frame,l as frameArraySignal,w as frameCount,m as frameSignal,Gc as generateArcLengthLUT,z as generateId,Oc as generatePathSegments,lb as getActiveMediaMetadata,kb as getFileDataMetadata,Eb as getFingerprint,fb as getLeafMediaType,ib as getMediaType,Fb as getRenderFingerprint,Rd as getScramblePool,Pd as getShuffledOrder,Bb as gradientStopsToOklab,fa as handleId,ga as handleLabel,Hb as hasOnlySingleSource,ze as hoistMattes,Sb as inputStore,je as interpolate,yb as isCssGradient,Db as isEqual,ia as isFrameIndex,ja as isNormalized,h as isSignal,j as isValueSignal,Gb as isVirtualMediaData,Qf as italic,_b as lensCenterDensity,Ab as limitGradientStops,bc as linearRgb,ye as lintComposition,yc as loadFBX,ae as loadModel3D,Bc as loadOBJ,vc as lorentzFactor,Cc as lutStore,ee as mapBlendModeToSkia,Uf as mark,ne as measureSpring,pe as measureText,qe as measureTextAsync,L as mediaSourceIsHold,N as mediaSourceRange,M as mediaSourceRate,K as mediaSourceTime,te as mergeAnimationTracks,de as mixAudioTracks,sb as mixColors,$f as mixSfxInto,$ as ms,ha as nodeId,ub as normalizeColorStops,Yf as normalizeTextSpans,ba as normalized,pb as oklabToRgb,ic as parseColorToRgb,qb as parseCssColor,zb as parseCssGradient,xc as parseFBX,Ac as parseMTL,Zf as parseMarkup,zc as parseOBJ,Nc as parseSvgPathToCubicBeziers,Ef as pinNodeToLandmark,Ff as pinNodeToObject,ea as pixels,export_planChunks as planChunks,le as preloadCompositionFonts,ke as preloadFont,b as programmaticSignal,o as progressSignal,Ph as pulseKeys,da as radians,g as registerSignalDependency,Ah as renderFrameGrid,export_renderSemaphore as renderSemaphore,_f as renderSfx,Q as reportRenderDiagnostic,fe as requiresIsolation,export_resetRenderCaches as resetRenderCaches,e as resolveBoolean,fc as resolveEnvironment,y as resolveFrameRequest,dc as resolveGi,gb as resolveMediaMimeType,c as resolveNumber,f as resolveParam,yh as resolveSamplePoints,cc as resolveSsr,d as resolveString,ec as resolveVolumetricFog,eg as retargetPose,ob as rgbToOklab,Nf as rich,Md as sampleAudioSpectrumScale,tb as sampleColorStops,Ic as sampleCurveGeometry,B as sampleFrameMediaSignal,A as sampleMediaSignal,Kc as samplePathChainGeometry,E as sampledMediaSourceRange,D as sampledMediaSourceTime,_ as seconds,Yh as section,za as serializeSignalData,Ob as shaderStore,i as signal,q as signalBuilder,Pb as signalRegistry,r as sineSignal,Tf as size,ag as softLimit,Of as span,oe as spring,me as springCalculation,Kb as stampResult,Mh as startPreview,export_stitchChunks as stitchChunks,Wf as sub,Vf as sup,R as takeRenderDiagnostics,oc as terrace,Td as textureCache,Nh as themes,n as timeSignal,p as updateClockSignals,J as validateMediaTimeRemap,Mc as waveToCubicBeziers,Qh as withDefaults};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as C0,b as S0}from"./chunk-44V4V5LD.mjs";import{d as K1,g as L0}from"./chunk-BR56TQBP.mjs";import{a as x0,c as E0,d as R0}from"./chunk-QAQJSWUT.mjs";import{w as P0}from"./chunk-TEA3GVBJ.mjs";import{a as F}from"./chunk-JAAFSVAG.mjs";import{i as T0,l as F0}from"./chunk-PIHG6HJO.mjs";import"./chunk-CSLSWUUT.mjs";import{a as j1}from"./chunk-IB56SYTG.mjs";import{b as I1}from"./chunk-A6OAPDIA.mjs";import{b as k1,c as I0,f as k0}from"./chunk-OBIJIQCZ.mjs";import"./chunk-HOV6DDBZ.mjs";import{i as f0,l as $1}from"./chunk-RECQ74RP.mjs";import"./chunk-UE7Y65C3.mjs";import"./chunk-6FULVULN.mjs";import{b as b0}from"./chunk-XOF6UTZX.mjs";import"./chunk-LZNHGH56.mjs";import"./chunk-UZTA2EUU.mjs";import{e as a1}from"./chunk-GXFYRMJZ.mjs";import{h as p0,i as g0,l as w0}from"./chunk-77MT33VR.mjs";import{h as m0,p as P1}from"./chunk-ULOFDFHJ.mjs";import{a as v0,b as q1,f as y0,j as M0}from"./chunk-4F3DG6YB.mjs";import"./chunk-OGPJTUAL.mjs";import{b as v1}from"./chunk-354GX6IB.mjs";import"./chunk-5RRKGN2U.mjs";import{b as p1,d as g4,f as D,g as b}from"./chunk-Y4NIR77Z.mjs";var X1=p1(o1=>{"use strict";b();Object.defineProperty(o1,"__esModule",{value:!0});o1.loop=o1.conditional=o1.parse=void 0;var w4=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r;if(Array.isArray(n))n.forEach(function(d){return e(t,d,r,i)});else if(typeof n=="function")n(t,r,i,e);else{var s=Object.keys(n)[0];Array.isArray(n[s])?(i[s]={},e(t,n[s],r,i[s])):i[s]=n[s](t,r,i,e)}return r};o1.parse=w4;var v4=function(t,n){return function(r,i,s,d){n(r,i,s)&&d(r,t,i,s)}};o1.conditional=v4;var y4=function(t,n){return function(r,i,s,d){for(var o=[],c=r.pos;n(r,i,s);){var m={};if(d(r,t,i,m),r.pos===c)break;c=r.pos,o.push(m)}return o}};o1.loop=y4});var Z1=p1(z=>{"use strict";b();Object.defineProperty(z,"__esModule",{value:!0});z.readBits=z.readArray=z.readUnsigned=z.readString=z.peekBytes=z.readBytes=z.peekByte=z.readByte=z.buildStream=void 0;var b4=function(t){return{data:t,pos:0}};z.buildStream=b4;var O0=function(){return function(t){return t.data[t.pos++]}};z.readByte=O0;var M4=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(n){return n.data[n.pos+t]}};z.peekByte=M4;var R1=function(t){return function(n){return n.data.subarray(n.pos,n.pos+=t)}};z.readBytes=R1;var L4=function(t){return function(n){return n.data.subarray(n.pos,n.pos+t)}};z.peekBytes=L4;var C4=function(t){return function(n){return Array.from(R1(t)(n)).map(function(r){return String.fromCharCode(r)}).join("")}};z.readString=C4;var x4=function(t){return function(n){var r=R1(2)(n);return t?(r[1]<<8)+r[0]:(r[0]<<8)+r[1]}};z.readUnsigned=x4;var S4=function(t,n){return function(r,i,s){for(var d=typeof n=="function"?n(r,i,s):n,o=R1(t),c=new Array(d),m=0;m<d;m++)c[m]=o(r);return c}};z.readArray=S4;var P4=function(t,n,r){for(var i=0,s=0;s<r;s++)i+=t[n+s]&&Math.pow(2,r-s-1);return i},I4=function(t){return function(n){for(var r=O0()(n),i=new Array(8),s=0;s<8;s++)i[7-s]=!!(r&1<<s);return Object.keys(t).reduce(function(d,o){var c=t[o];return c.length?d[o]=P4(i,c.index,c.length):d[o]=i[c.index],d},{})}};z.readBits=I4});var N0=p1(F1=>{"use strict";b();Object.defineProperty(F1,"__esModule",{value:!0});F1.default=void 0;var d1=X1(),M=Z1(),T1={blocks:function(t){for(var n=0,r=[],i=t.data.length,s=0,d=(0,M.readByte)()(t);d!==n&&d;d=(0,M.readByte)()(t)){if(t.pos+d>=i){var o=i-t.pos;r.push((0,M.readBytes)(o)(t)),s+=o;break}r.push((0,M.readBytes)(d)(t)),s+=d}for(var c=new Uint8Array(s),m=0,u=0;u<r.length;u++)c.set(r[u],m),m+=r[u].length;return c}},k4=(0,d1.conditional)({gce:[{codes:(0,M.readBytes)(2)},{byteSize:(0,M.readByte)()},{extras:(0,M.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,M.readUnsigned)(!0)},{transparentColorIndex:(0,M.readByte)()},{terminator:(0,M.readByte)()}]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===249}),E4=(0,d1.conditional)({image:[{code:(0,M.readByte)()},{descriptor:[{left:(0,M.readUnsigned)(!0)},{top:(0,M.readUnsigned)(!0)},{width:(0,M.readUnsigned)(!0)},{height:(0,M.readUnsigned)(!0)},{lct:(0,M.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,d1.conditional)({lct:(0,M.readArray)(3,function(e,t,n){return Math.pow(2,n.descriptor.lct.size+1)})},function(e,t,n){return n.descriptor.lct.exists}),{data:[{minCodeSize:(0,M.readByte)()},T1]}]},function(e){return(0,M.peekByte)()(e)===44}),R4=(0,d1.conditional)({text:[{codes:(0,M.readBytes)(2)},{blockSize:(0,M.readByte)()},{preData:function(t,n,r){return(0,M.readBytes)(r.text.blockSize)(t)}},T1]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===1}),T4=(0,d1.conditional)({application:[{codes:(0,M.readBytes)(2)},{blockSize:(0,M.readByte)()},{id:function(t,n,r){return(0,M.readString)(r.blockSize)(t)}},T1]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===255}),F4=(0,d1.conditional)({comment:[{codes:(0,M.readBytes)(2)},T1]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===254}),A4=[{header:[{signature:(0,M.readString)(3)},{version:(0,M.readString)(3)}]},{lsd:[{width:(0,M.readUnsigned)(!0)},{height:(0,M.readUnsigned)(!0)},{gct:(0,M.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,M.readByte)()},{pixelAspectRatio:(0,M.readByte)()}]},(0,d1.conditional)({gct:(0,M.readArray)(3,function(e,t){return Math.pow(2,t.lsd.gct.size+1)})},function(e,t){return t.lsd.gct.exists}),{frames:(0,d1.loop)([k4,T4,F4,E4,R4],function(e){var t=(0,M.peekByte)()(e);return t===33||t===44})}],D4=A4;F1.default=D4});var B0=p1(A1=>{"use strict";b();Object.defineProperty(A1,"__esModule",{value:!0});A1.deinterlace=void 0;var U4=function(t,n){for(var r=new Array(t.length),i=t.length/n,s=function(I,p){var _=t.slice(p*n,(p+1)*n);r.splice.apply(r,[I*n,n].concat(_))},d=[0,4,2,1],o=[8,8,4,2],c=0,m=0;m<4;m++)for(var u=d[m];u<i;u+=o[m])s(u,c),c++;return r};A1.deinterlace=U4});var G0=p1(D1=>{"use strict";b();Object.defineProperty(D1,"__esModule",{value:!0});D1.lzw=void 0;var O4=function(t,n,r){var i=4096,s=-1,d=r,o,c,m,u,l,I,p,R,_,g,k,E,U,W,i1,Y,y=new Array(r),x=new Array(i),w=new Array(i),A=new Array(i+1);for(E=t,c=1<<E,l=c+1,o=c+2,p=s,u=E+1,m=(1<<u)-1,_=0;_<c;_++)x[_]=0,w[_]=_;var k,R,V,U,W,Y,i1;for(k=R=V=U=W=Y=i1=0,g=0;g<d;){if(W===0){if(R<u){k+=n[i1]<<R,R+=8,i1++;continue}if(_=k&m,k>>=u,R-=u,_>o||_==l)break;if(_==c){u=E+1,m=(1<<u)-1,o=c+2,p=s;continue}if(p==s){A[W++]=w[_],p=_,U=_;continue}for(I=_,_==o&&(A[W++]=U,_=p);_>c;)A[W++]=w[_],_=x[_];U=w[_]&255,A[W++]=U,o<i&&(x[o]=p,w[o]=U,o++,(o&m)===0&&o<i&&(u++,m+=o)),p=I}W--,y[Y++]=A[W],g++}for(g=Y;g<d;g++)y[g]=0;return y};D1.lzw=O4});var V0=p1(l1=>{"use strict";b();Object.defineProperty(l1,"__esModule",{value:!0});l1.decompressFrames=l1.decompressFrame=l1.parseGIF=void 0;var N4=W4(N0()),B4=X1(),G4=Z1(),z4=B0(),V4=G0();function W4(e){return e&&e.__esModule?e:{default:e}}var H4=function(t){var n=new Uint8Array(t);return(0,B4.parse)((0,G4.buildStream)(n),N4.default)};l1.parseGIF=H4;var $4=function(t){for(var n=t.pixels.length,r=new Uint8ClampedArray(n*4),i=0;i<n;i++){var s=i*4,d=t.pixels[i],o=t.colorTable[d]||[0,0,0];r[s]=o[0],r[s+1]=o[1],r[s+2]=o[2],r[s+3]=d!==t.transparentIndex?255:0}return r},z0=function(t,n,r){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,s=i.descriptor.width*i.descriptor.height,d=(0,V4.lzw)(i.data.minCodeSize,i.data.blocks,s);i.descriptor.lct.interlaced&&(d=(0,z4.deinterlace)(d,i.descriptor.width));var o={pixels:d,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?o.colorTable=i.lct:o.colorTable=n,t.gce&&(o.delay=(t.gce.delay||10)*10,o.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(o.transparentIndex=t.gce.transparentColorIndex)),r&&(o.patch=$4(o)),o};l1.decompressFrame=z0;var q4=function(t,n){return t.frames.filter(function(r){return r.image}).map(function(r){return z0(r,t.gct,n)})};l1.decompressFrames=q4});b();b();var E1=[{packageName:"@framefields/node-lut",ops:["ApplyLUT"],load:()=>import("./renderers-TYSLUZ53.mjs")},{packageName:"@framefields/node-ascii",ops:["Ascii"],load:()=>import("./renderers-GITAVRYZ.mjs")},{packageName:"@framefields/node-audio-compressor",ops:["AudioCompressor"],load:()=>import("./renderers-ZHSOWEMQ.mjs")},{packageName:"@framefields/node-audio-delay",ops:["AudioDelay"],load:()=>import("./renderers-EPSF5CSQ.mjs")},{packageName:"@framefields/node-audio-fade",ops:["AudioFade"],load:()=>import("./renderers-VEHYARKY.mjs")},{packageName:"@framefields/node-audio-noise-gate",ops:["AudioNoiseGate"],load:()=>import("./renderers-RHMRWX46.mjs")},{packageName:"@framefields/node-audio-parametric-eq",ops:["AudioParametricEq"],load:()=>import("./renderers-ZMDRNYSS.mjs")},{packageName:"@framefields/node-audio-reverb",ops:["AudioReverb"],load:()=>import("./renderers-OJWWIVNW.mjs")},{packageName:"@framefields/node-audio-signal-extractor",ops:["AudioSignalExtractor"],load:()=>import("./renderers-KGVZUFHD.mjs")},{packageName:"@framefields/node-blur",ops:["Blur"],load:()=>import("./renderers-HI3SRJVD.mjs")},{packageName:"@framefields/node-camera-parallax-3d",ops:["CameraParallax3D"],load:()=>import("./renderers-Q77UPEYE.mjs")},{packageName:"@framefields/node-canvas-generator",ops:["CanvasGenerator"],load:()=>import("./renderers-BDI2BDBA.mjs")},{packageName:"@framefields/node-channel-merger",ops:["ChannelMerger"],load:()=>import("./renderers-MPFU74I3.mjs")},{packageName:"@framefields/node-channel-splitter",ops:["ChannelSplitter"],load:()=>import("./renderers-AIZRIW2R.mjs")},{packageName:"@framefields/node-color-balance",ops:["ColorBalance"],load:()=>import("./renderers-W5YFMLSB.mjs")},{packageName:"@framefields/node-colorkey",ops:["ColorKey"],load:()=>import("./renderers-DMTGKURQ.mjs")},{packageName:"@framefields/node-compositor",ops:["Compositor"],load:()=>import("./renderers-HHVGNMSJ.mjs")},{packageName:"@framefields/node-contour",ops:["Contour"],load:()=>import("./renderers-BUZ67FNZ.mjs")},{packageName:"@framefields/node-corner-pin",ops:["CornerPin"],load:()=>import("./renderers-F6PT2LON.mjs")},{packageName:"@framefields/node-crop",ops:["Crop"],load:()=>import("./renderers-RENLKAA7.mjs")},{packageName:"@framefields/node-crt",ops:["CRT"],load:()=>import("./renderers-PC2GOZDT.mjs")},{packageName:"@framefields/node-curves",ops:["Curves"],load:()=>import("./renderers-XKDWUK56.mjs")},{packageName:"@framefields/node-datamosh",ops:["Datamosh"],load:()=>import("./renderers-6FENMFSC.mjs")},{packageName:"@framefields/node-deflicker",ops:["TemporalDeflicker","Deflicker"],load:()=>import("./renderers-5SJHYUTM.mjs")},{packageName:"@framefields/node-displacement-map",ops:["DisplacementMap"],load:()=>import("./renderers-3KEBYOOF.mjs")},{packageName:"@framefields/node-dither",ops:["Dither"],load:()=>import("./renderers-FQISHQEN.mjs")},{packageName:"@framefields/node-extract-frame",ops:["ExtractFrame"],load:()=>import("./renderers-SFVFAS3C.mjs")},{packageName:"@framefields/node-extract-lut",ops:["ExtractLUT"],load:()=>import("./renderers-KICDB5Y6.mjs")},{packageName:"@framefields/node-film-grain",ops:["FilmGrain"],load:()=>import("./renderers-MBMJWZEW.mjs")},{packageName:"@framefields/node-flip",ops:["Flip"],load:()=>import("./renderers-BDXCO6NR.mjs")},{packageName:"@framefields/node-gooey",ops:["Gooey"],load:()=>import("./renderers-SWQVCJHB.mjs")},{packageName:"@framefields/node-gradient-map",ops:["GradientMap"],load:()=>import("./renderers-HXEDI4BD.mjs")},{packageName:"@framefields/node-halftone-screen",ops:["HalftoneScreen"],load:()=>import("./renderers-4RPQSUUZ.mjs")},{packageName:"@framefields/node-high-pass",ops:["HighPass"],load:()=>import("./renderers-LY57CZZB.mjs")},{packageName:"@framefields/node-iridescence",ops:["Iridescence"],load:()=>import("./renderers-RIPXT4AL.mjs")},{packageName:"@framefields/node-kaleidoscope",ops:["Kaleidoscope"],load:()=>import("./renderers-ECXMT5BD.mjs")},{packageName:"@framefields/node-kenburns",ops:["KenBurns"],load:()=>import("./renderers-RDYJRNAR.mjs")},{packageName:"@framefields/node-layer-style",ops:["LayerStyle"],load:()=>import("./renderers-FIFF267S.mjs")},{packageName:"@framefields/node-levels",ops:["Levels"],load:()=>import("./renderers-F7WPJXKT.mjs")},{packageName:"@framefields/node-liquify",ops:["Liquify"],load:()=>import("./renderers-XLQXVD37.mjs")},{packageName:"@framefields/node-mask-math",ops:["MaskMath"],load:()=>import("./renderers-77OXJ2GY.mjs")},{packageName:"@framefields/node-mesh-warp",ops:["MeshWarp"],load:()=>import("./renderers-SZVDZDY7.mjs")},{packageName:"@framefields/node-modulate",ops:["Modulate"],load:()=>import("./renderers-5EGFXFPF.mjs")},{packageName:"@framefields/node-noise-generator",ops:["NoiseGenerator"],load:()=>import("./renderers-HHWMIDN3.mjs")},{packageName:"@framefields/node-op-art",ops:["OpArt"],load:()=>import("./renderers-MW53LTMB.mjs")},{packageName:"@framefields/node-paint",ops:["Paint"],load:()=>import("./renderers-EILFSWSJ.mjs")},{packageName:"@framefields/node-painterly",ops:["Painterly"],load:()=>import("./renderers-KKULMOV4.mjs")},{packageName:"@framefields/node-particles",ops:["Particles"],load:()=>import("./renderers-JMSAW7VY.mjs")},{packageName:"@framefields/node-patch-heal",ops:["PatchHeal"],load:()=>import("./renderers-GTKRV225.mjs")},{packageName:"@framefields/node-pixelate",ops:["Pixelate"],load:()=>import("./renderers-KMVMPYY7.mjs")},{packageName:"@framefields/node-posterize",ops:["Posterize"],load:()=>import("./renderers-EVEWFJ7U.mjs")},{packageName:"@framefields/node-procedural-vfx",ops:["ProceduralVFX"],load:()=>import("./renderers-FXAVFNUN.mjs")},{packageName:"@framefields/node-refine-edge",ops:["RefineEdge"],load:()=>import("./renderers-LN7WPG6I.mjs")},{packageName:"@framefields/node-refraction-caustics",ops:["RefractionCaustics3D"],load:()=>import("./renderers-LWW4RF6D.mjs")},{packageName:"@framefields/node-relight-3d",ops:["Relight3D"],load:()=>import("./renderers-HG6JZIZO.mjs")},{packageName:"@framefields/node-resizer-scaler",ops:["ResizerScaler"],load:()=>import("./renderers-VUQAZ56P.mjs")},{packageName:"@framefields/node-rgb-split",ops:["RGBSplit"],load:()=>import("./renderers-3FZVDYRQ.mjs")},{packageName:"@framefields/node-rotate",ops:["Rotate"],load:()=>import("./renderers-VRXAG3FR.mjs")},{packageName:"@framefields/node-selective-color",ops:["SelectiveColor"],load:()=>import("./renderers-QHXCFDHI.mjs")},{packageName:"@framefields/node-shadows-highlights",ops:["ShadowsHighlights"],load:()=>import("./renderers-JHFD4LHZ.mjs")},{packageName:"@framefields/node-shape-generator",ops:["ShapeGenerator"],load:()=>import("./renderers-NQC4DPX4.mjs")},{packageName:"@framefields/node-signal-gate",ops:["SignalGate"],load:()=>import("./renderers-HXNSDJBY.mjs")},{packageName:"@framefields/node-stereo-panning",ops:["StereoPanning"],load:()=>import("./renderers-AFTUFMQQ.mjs")},{packageName:"@framefields/node-tile-offset",ops:["TileOffset"],load:()=>import("./renderers-7LI4QKHO.mjs")},{packageName:"@framefields/node-toon",ops:["Toon"],load:()=>import("./renderers-U4IXWMD6.mjs")},{packageName:"@framefields/node-trails",ops:["Trails"],load:()=>import("./renderers-I2ZOUFRU.mjs")},{packageName:"@framefields/node-unsharp-mask",ops:["UnsharpMask"],load:()=>import("./renderers-66MWDUN6.mjs")},{packageName:"@framefields/node-vignette",ops:["Vignette"],load:()=>import("./renderers-XKSBNCLZ.mjs")},{packageName:"@framefields/node-vision",ops:["Vision"],load:()=>import("./renderers-6C7NWWDX.mjs")}];b();b();function A0(){return{clientWidth:1920,clientHeight:1080,getBoundingClientRect:()=>({x:0,y:0,left:0,top:0,right:1920,bottom:1080,width:1920,height:1080}),style:{},appendChild:()=>{},removeChild:()=>{},addEventListener:()=>{},removeEventListener:()=>{},getAttribute:()=>null}}function D0(e,t){typeof e.getBoundingClientRect>"u"&&(e.getBoundingClientRect=function(){let n=this.width||512,r=this.height||512;return{x:0,y:0,left:0,top:0,right:n,bottom:r,width:n,height:r}}),"style"in e||Object.defineProperty(e,"style",{get(){return this._style??={},this._style},configurable:!0}),"clientWidth"in e||Object.defineProperty(e,"clientWidth",{get(){return this.width||512},configurable:!0}),"clientHeight"in e||Object.defineProperty(e,"clientHeight",{get(){return this.height||512},configurable:!0}),"parentElement"in e||Object.defineProperty(e,"parentElement",{get(){return t},configurable:!0}),typeof e.addEventListener>"u"&&(e.addEventListener=()=>{}),typeof e.removeEventListener>"u"&&(e.removeEventListener=()=>{}),typeof e.getAttribute>"u"&&(e.getAttribute=()=>null)}function U0(){typeof globalThis.IntersectionObserver>"u"&&(globalThis.IntersectionObserver=class{observe(){}unobserve(){}disconnect(){}})}b();var J1=class e{static instance=null;loadedFonts=new Set;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}async loadFont(t,n){if(this.loadedFonts.has(t))return;let r=`local-font-${t}`;if(document.getElementById(r))return;let i=document.createElement("style");i.id=r,i.innerHTML=`
|
|
1
|
+
import{a as C0,b as S0}from"./chunk-44V4V5LD.mjs";import{d as K1,g as L0}from"./chunk-BR56TQBP.mjs";import{a as x0,c as E0,d as R0}from"./chunk-QAQJSWUT.mjs";import{w as P0}from"./chunk-TEA3GVBJ.mjs";import{a as F}from"./chunk-JAAFSVAG.mjs";import{i as T0,l as F0}from"./chunk-PIHG6HJO.mjs";import"./chunk-CSLSWUUT.mjs";import{a as j1}from"./chunk-IB56SYTG.mjs";import{b as I1}from"./chunk-A6OAPDIA.mjs";import{b as k1,c as I0,f as k0}from"./chunk-OBIJIQCZ.mjs";import"./chunk-HOV6DDBZ.mjs";import{i as f0,l as $1}from"./chunk-RECQ74RP.mjs";import"./chunk-UE7Y65C3.mjs";import"./chunk-6FULVULN.mjs";import{b as b0}from"./chunk-XOF6UTZX.mjs";import"./chunk-LZNHGH56.mjs";import"./chunk-UZTA2EUU.mjs";import{e as a1}from"./chunk-GXFYRMJZ.mjs";import{h as p0,i as g0,l as w0}from"./chunk-77MT33VR.mjs";import{h as m0,p as P1}from"./chunk-ULOFDFHJ.mjs";import{a as v0,b as q1,f as y0,j as M0}from"./chunk-4F3DG6YB.mjs";import"./chunk-OGPJTUAL.mjs";import{b as v1}from"./chunk-354GX6IB.mjs";import"./chunk-5RRKGN2U.mjs";import{b as p1,d as g4,f as D,g as b}from"./chunk-Y4NIR77Z.mjs";var X1=p1(o1=>{"use strict";b();Object.defineProperty(o1,"__esModule",{value:!0});o1.loop=o1.conditional=o1.parse=void 0;var w4=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r;if(Array.isArray(n))n.forEach(function(d){return e(t,d,r,i)});else if(typeof n=="function")n(t,r,i,e);else{var s=Object.keys(n)[0];Array.isArray(n[s])?(i[s]={},e(t,n[s],r,i[s])):i[s]=n[s](t,r,i,e)}return r};o1.parse=w4;var v4=function(t,n){return function(r,i,s,d){n(r,i,s)&&d(r,t,i,s)}};o1.conditional=v4;var y4=function(t,n){return function(r,i,s,d){for(var o=[],c=r.pos;n(r,i,s);){var m={};if(d(r,t,i,m),r.pos===c)break;c=r.pos,o.push(m)}return o}};o1.loop=y4});var Z1=p1(z=>{"use strict";b();Object.defineProperty(z,"__esModule",{value:!0});z.readBits=z.readArray=z.readUnsigned=z.readString=z.peekBytes=z.readBytes=z.peekByte=z.readByte=z.buildStream=void 0;var b4=function(t){return{data:t,pos:0}};z.buildStream=b4;var O0=function(){return function(t){return t.data[t.pos++]}};z.readByte=O0;var M4=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(n){return n.data[n.pos+t]}};z.peekByte=M4;var R1=function(t){return function(n){return n.data.subarray(n.pos,n.pos+=t)}};z.readBytes=R1;var L4=function(t){return function(n){return n.data.subarray(n.pos,n.pos+t)}};z.peekBytes=L4;var C4=function(t){return function(n){return Array.from(R1(t)(n)).map(function(r){return String.fromCharCode(r)}).join("")}};z.readString=C4;var x4=function(t){return function(n){var r=R1(2)(n);return t?(r[1]<<8)+r[0]:(r[0]<<8)+r[1]}};z.readUnsigned=x4;var S4=function(t,n){return function(r,i,s){for(var d=typeof n=="function"?n(r,i,s):n,o=R1(t),c=new Array(d),m=0;m<d;m++)c[m]=o(r);return c}};z.readArray=S4;var P4=function(t,n,r){for(var i=0,s=0;s<r;s++)i+=t[n+s]&&Math.pow(2,r-s-1);return i},I4=function(t){return function(n){for(var r=O0()(n),i=new Array(8),s=0;s<8;s++)i[7-s]=!!(r&1<<s);return Object.keys(t).reduce(function(d,o){var c=t[o];return c.length?d[o]=P4(i,c.index,c.length):d[o]=i[c.index],d},{})}};z.readBits=I4});var N0=p1(F1=>{"use strict";b();Object.defineProperty(F1,"__esModule",{value:!0});F1.default=void 0;var d1=X1(),M=Z1(),T1={blocks:function(t){for(var n=0,r=[],i=t.data.length,s=0,d=(0,M.readByte)()(t);d!==n&&d;d=(0,M.readByte)()(t)){if(t.pos+d>=i){var o=i-t.pos;r.push((0,M.readBytes)(o)(t)),s+=o;break}r.push((0,M.readBytes)(d)(t)),s+=d}for(var c=new Uint8Array(s),m=0,u=0;u<r.length;u++)c.set(r[u],m),m+=r[u].length;return c}},k4=(0,d1.conditional)({gce:[{codes:(0,M.readBytes)(2)},{byteSize:(0,M.readByte)()},{extras:(0,M.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,M.readUnsigned)(!0)},{transparentColorIndex:(0,M.readByte)()},{terminator:(0,M.readByte)()}]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===249}),E4=(0,d1.conditional)({image:[{code:(0,M.readByte)()},{descriptor:[{left:(0,M.readUnsigned)(!0)},{top:(0,M.readUnsigned)(!0)},{width:(0,M.readUnsigned)(!0)},{height:(0,M.readUnsigned)(!0)},{lct:(0,M.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,d1.conditional)({lct:(0,M.readArray)(3,function(e,t,n){return Math.pow(2,n.descriptor.lct.size+1)})},function(e,t,n){return n.descriptor.lct.exists}),{data:[{minCodeSize:(0,M.readByte)()},T1]}]},function(e){return(0,M.peekByte)()(e)===44}),R4=(0,d1.conditional)({text:[{codes:(0,M.readBytes)(2)},{blockSize:(0,M.readByte)()},{preData:function(t,n,r){return(0,M.readBytes)(r.text.blockSize)(t)}},T1]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===1}),T4=(0,d1.conditional)({application:[{codes:(0,M.readBytes)(2)},{blockSize:(0,M.readByte)()},{id:function(t,n,r){return(0,M.readString)(r.blockSize)(t)}},T1]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===255}),F4=(0,d1.conditional)({comment:[{codes:(0,M.readBytes)(2)},T1]},function(e){var t=(0,M.peekBytes)(2)(e);return t[0]===33&&t[1]===254}),A4=[{header:[{signature:(0,M.readString)(3)},{version:(0,M.readString)(3)}]},{lsd:[{width:(0,M.readUnsigned)(!0)},{height:(0,M.readUnsigned)(!0)},{gct:(0,M.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,M.readByte)()},{pixelAspectRatio:(0,M.readByte)()}]},(0,d1.conditional)({gct:(0,M.readArray)(3,function(e,t){return Math.pow(2,t.lsd.gct.size+1)})},function(e,t){return t.lsd.gct.exists}),{frames:(0,d1.loop)([k4,T4,F4,E4,R4],function(e){var t=(0,M.peekByte)()(e);return t===33||t===44})}],D4=A4;F1.default=D4});var B0=p1(A1=>{"use strict";b();Object.defineProperty(A1,"__esModule",{value:!0});A1.deinterlace=void 0;var U4=function(t,n){for(var r=new Array(t.length),i=t.length/n,s=function(I,p){var _=t.slice(p*n,(p+1)*n);r.splice.apply(r,[I*n,n].concat(_))},d=[0,4,2,1],o=[8,8,4,2],c=0,m=0;m<4;m++)for(var u=d[m];u<i;u+=o[m])s(u,c),c++;return r};A1.deinterlace=U4});var G0=p1(D1=>{"use strict";b();Object.defineProperty(D1,"__esModule",{value:!0});D1.lzw=void 0;var O4=function(t,n,r){var i=4096,s=-1,d=r,o,c,m,u,l,I,p,R,_,g,k,E,U,H,i1,Y,y=new Array(r),x=new Array(i),w=new Array(i),A=new Array(i+1);for(E=t,c=1<<E,l=c+1,o=c+2,p=s,u=E+1,m=(1<<u)-1,_=0;_<c;_++)x[_]=0,w[_]=_;var k,R,W,U,H,Y,i1;for(k=R=W=U=H=Y=i1=0,g=0;g<d;){if(H===0){if(R<u){k+=n[i1]<<R,R+=8,i1++;continue}if(_=k&m,k>>=u,R-=u,_>o||_==l)break;if(_==c){u=E+1,m=(1<<u)-1,o=c+2,p=s;continue}if(p==s){A[H++]=w[_],p=_,U=_;continue}for(I=_,_==o&&(A[H++]=U,_=p);_>c;)A[H++]=w[_],_=x[_];U=w[_]&255,A[H++]=U,o<i&&(x[o]=p,w[o]=U,o++,(o&m)===0&&o<i&&(u++,m+=o)),p=I}H--,y[Y++]=A[H],g++}for(g=Y;g<d;g++)y[g]=0;return y};D1.lzw=O4});var V0=p1(l1=>{"use strict";b();Object.defineProperty(l1,"__esModule",{value:!0});l1.decompressFrames=l1.decompressFrame=l1.parseGIF=void 0;var N4=W4(N0()),B4=X1(),G4=Z1(),z4=B0(),V4=G0();function W4(e){return e&&e.__esModule?e:{default:e}}var H4=function(t){var n=new Uint8Array(t);return(0,B4.parse)((0,G4.buildStream)(n),N4.default)};l1.parseGIF=H4;var $4=function(t){for(var n=t.pixels.length,r=new Uint8ClampedArray(n*4),i=0;i<n;i++){var s=i*4,d=t.pixels[i],o=t.colorTable[d]||[0,0,0];r[s]=o[0],r[s+1]=o[1],r[s+2]=o[2],r[s+3]=d!==t.transparentIndex?255:0}return r},z0=function(t,n,r){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,s=i.descriptor.width*i.descriptor.height,d=(0,V4.lzw)(i.data.minCodeSize,i.data.blocks,s);i.descriptor.lct.interlaced&&(d=(0,z4.deinterlace)(d,i.descriptor.width));var o={pixels:d,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?o.colorTable=i.lct:o.colorTable=n,t.gce&&(o.delay=(t.gce.delay||10)*10,o.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(o.transparentIndex=t.gce.transparentColorIndex)),r&&(o.patch=$4(o)),o};l1.decompressFrame=z0;var q4=function(t,n){return t.frames.filter(function(r){return r.image}).map(function(r){return z0(r,t.gct,n)})};l1.decompressFrames=q4});b();b();var E1=[{packageName:"@framefields/node-lut",ops:["ApplyLUT"],load:()=>import("./renderers-TYSLUZ53.mjs")},{packageName:"@framefields/node-ascii",ops:["Ascii"],load:()=>import("./renderers-GITAVRYZ.mjs")},{packageName:"@framefields/node-audio-compressor",ops:["AudioCompressor"],load:()=>import("./renderers-ZHSOWEMQ.mjs")},{packageName:"@framefields/node-audio-delay",ops:["AudioDelay"],load:()=>import("./renderers-EPSF5CSQ.mjs")},{packageName:"@framefields/node-audio-fade",ops:["AudioFade"],load:()=>import("./renderers-VEHYARKY.mjs")},{packageName:"@framefields/node-audio-noise-gate",ops:["AudioNoiseGate"],load:()=>import("./renderers-RHMRWX46.mjs")},{packageName:"@framefields/node-audio-parametric-eq",ops:["AudioParametricEq"],load:()=>import("./renderers-ZMDRNYSS.mjs")},{packageName:"@framefields/node-audio-reverb",ops:["AudioReverb"],load:()=>import("./renderers-OJWWIVNW.mjs")},{packageName:"@framefields/node-audio-signal-extractor",ops:["AudioSignalExtractor"],load:()=>import("./renderers-KGVZUFHD.mjs")},{packageName:"@framefields/node-blur",ops:["Blur"],load:()=>import("./renderers-HI3SRJVD.mjs")},{packageName:"@framefields/node-camera-parallax-3d",ops:["CameraParallax3D"],load:()=>import("./renderers-Q77UPEYE.mjs")},{packageName:"@framefields/node-canvas-generator",ops:["CanvasGenerator"],load:()=>import("./renderers-BDI2BDBA.mjs")},{packageName:"@framefields/node-channel-merger",ops:["ChannelMerger"],load:()=>import("./renderers-MPFU74I3.mjs")},{packageName:"@framefields/node-channel-splitter",ops:["ChannelSplitter"],load:()=>import("./renderers-AIZRIW2R.mjs")},{packageName:"@framefields/node-color-balance",ops:["ColorBalance"],load:()=>import("./renderers-W5YFMLSB.mjs")},{packageName:"@framefields/node-colorkey",ops:["ColorKey"],load:()=>import("./renderers-DMTGKURQ.mjs")},{packageName:"@framefields/node-compositor",ops:["Compositor"],load:()=>import("./renderers-HHVGNMSJ.mjs")},{packageName:"@framefields/node-contour",ops:["Contour"],load:()=>import("./renderers-BUZ67FNZ.mjs")},{packageName:"@framefields/node-corner-pin",ops:["CornerPin"],load:()=>import("./renderers-F6PT2LON.mjs")},{packageName:"@framefields/node-crop",ops:["Crop"],load:()=>import("./renderers-RENLKAA7.mjs")},{packageName:"@framefields/node-crt",ops:["CRT"],load:()=>import("./renderers-PC2GOZDT.mjs")},{packageName:"@framefields/node-curves",ops:["Curves"],load:()=>import("./renderers-XKDWUK56.mjs")},{packageName:"@framefields/node-datamosh",ops:["Datamosh"],load:()=>import("./renderers-6FENMFSC.mjs")},{packageName:"@framefields/node-deflicker",ops:["TemporalDeflicker","Deflicker"],load:()=>import("./renderers-5SJHYUTM.mjs")},{packageName:"@framefields/node-displacement-map",ops:["DisplacementMap"],load:()=>import("./renderers-3KEBYOOF.mjs")},{packageName:"@framefields/node-dither",ops:["Dither"],load:()=>import("./renderers-FQISHQEN.mjs")},{packageName:"@framefields/node-extract-frame",ops:["ExtractFrame"],load:()=>import("./renderers-SFVFAS3C.mjs")},{packageName:"@framefields/node-extract-lut",ops:["ExtractLUT"],load:()=>import("./renderers-KICDB5Y6.mjs")},{packageName:"@framefields/node-film-grain",ops:["FilmGrain"],load:()=>import("./renderers-MBMJWZEW.mjs")},{packageName:"@framefields/node-flip",ops:["Flip"],load:()=>import("./renderers-BDXCO6NR.mjs")},{packageName:"@framefields/node-gooey",ops:["Gooey"],load:()=>import("./renderers-SWQVCJHB.mjs")},{packageName:"@framefields/node-gradient-map",ops:["GradientMap"],load:()=>import("./renderers-HXEDI4BD.mjs")},{packageName:"@framefields/node-halftone-screen",ops:["HalftoneScreen"],load:()=>import("./renderers-4RPQSUUZ.mjs")},{packageName:"@framefields/node-high-pass",ops:["HighPass"],load:()=>import("./renderers-LY57CZZB.mjs")},{packageName:"@framefields/node-iridescence",ops:["Iridescence"],load:()=>import("./renderers-RIPXT4AL.mjs")},{packageName:"@framefields/node-kaleidoscope",ops:["Kaleidoscope"],load:()=>import("./renderers-ECXMT5BD.mjs")},{packageName:"@framefields/node-kenburns",ops:["KenBurns"],load:()=>import("./renderers-RDYJRNAR.mjs")},{packageName:"@framefields/node-layer-style",ops:["LayerStyle"],load:()=>import("./renderers-FIFF267S.mjs")},{packageName:"@framefields/node-levels",ops:["Levels"],load:()=>import("./renderers-F7WPJXKT.mjs")},{packageName:"@framefields/node-liquify",ops:["Liquify"],load:()=>import("./renderers-XLQXVD37.mjs")},{packageName:"@framefields/node-mask-math",ops:["MaskMath"],load:()=>import("./renderers-77OXJ2GY.mjs")},{packageName:"@framefields/node-mesh-warp",ops:["MeshWarp"],load:()=>import("./renderers-SZVDZDY7.mjs")},{packageName:"@framefields/node-modulate",ops:["Modulate"],load:()=>import("./renderers-5EGFXFPF.mjs")},{packageName:"@framefields/node-noise-generator",ops:["NoiseGenerator"],load:()=>import("./renderers-HHWMIDN3.mjs")},{packageName:"@framefields/node-op-art",ops:["OpArt"],load:()=>import("./renderers-MW53LTMB.mjs")},{packageName:"@framefields/node-paint",ops:["Paint"],load:()=>import("./renderers-EILFSWSJ.mjs")},{packageName:"@framefields/node-painterly",ops:["Painterly"],load:()=>import("./renderers-KKULMOV4.mjs")},{packageName:"@framefields/node-particles",ops:["Particles"],load:()=>import("./renderers-JMSAW7VY.mjs")},{packageName:"@framefields/node-patch-heal",ops:["PatchHeal"],load:()=>import("./renderers-GTKRV225.mjs")},{packageName:"@framefields/node-pixelate",ops:["Pixelate"],load:()=>import("./renderers-KMVMPYY7.mjs")},{packageName:"@framefields/node-posterize",ops:["Posterize"],load:()=>import("./renderers-EVEWFJ7U.mjs")},{packageName:"@framefields/node-procedural-vfx",ops:["ProceduralVFX"],load:()=>import("./renderers-FXAVFNUN.mjs")},{packageName:"@framefields/node-refine-edge",ops:["RefineEdge"],load:()=>import("./renderers-LN7WPG6I.mjs")},{packageName:"@framefields/node-refraction-caustics",ops:["RefractionCaustics3D"],load:()=>import("./renderers-LWW4RF6D.mjs")},{packageName:"@framefields/node-relight-3d",ops:["Relight3D"],load:()=>import("./renderers-HG6JZIZO.mjs")},{packageName:"@framefields/node-resizer-scaler",ops:["ResizerScaler"],load:()=>import("./renderers-VUQAZ56P.mjs")},{packageName:"@framefields/node-rgb-split",ops:["RGBSplit"],load:()=>import("./renderers-3FZVDYRQ.mjs")},{packageName:"@framefields/node-rotate",ops:["Rotate"],load:()=>import("./renderers-VRXAG3FR.mjs")},{packageName:"@framefields/node-selective-color",ops:["SelectiveColor"],load:()=>import("./renderers-QHXCFDHI.mjs")},{packageName:"@framefields/node-shadows-highlights",ops:["ShadowsHighlights"],load:()=>import("./renderers-JHFD4LHZ.mjs")},{packageName:"@framefields/node-shape-generator",ops:["ShapeGenerator"],load:()=>import("./renderers-NQC4DPX4.mjs")},{packageName:"@framefields/node-signal-gate",ops:["SignalGate"],load:()=>import("./renderers-HXNSDJBY.mjs")},{packageName:"@framefields/node-stereo-panning",ops:["StereoPanning"],load:()=>import("./renderers-AFTUFMQQ.mjs")},{packageName:"@framefields/node-tile-offset",ops:["TileOffset"],load:()=>import("./renderers-7LI4QKHO.mjs")},{packageName:"@framefields/node-toon",ops:["Toon"],load:()=>import("./renderers-U4IXWMD6.mjs")},{packageName:"@framefields/node-trails",ops:["Trails"],load:()=>import("./renderers-I2ZOUFRU.mjs")},{packageName:"@framefields/node-unsharp-mask",ops:["UnsharpMask"],load:()=>import("./renderers-66MWDUN6.mjs")},{packageName:"@framefields/node-vignette",ops:["Vignette"],load:()=>import("./renderers-XKSBNCLZ.mjs")},{packageName:"@framefields/node-vision",ops:["Vision"],load:()=>import("./renderers-6C7NWWDX.mjs")}];b();b();function A0(){return{clientWidth:1920,clientHeight:1080,getBoundingClientRect:()=>({x:0,y:0,left:0,top:0,right:1920,bottom:1080,width:1920,height:1080}),style:{},appendChild:()=>{},removeChild:()=>{},addEventListener:()=>{},removeEventListener:()=>{},getAttribute:()=>null}}function D0(e,t){typeof e.getBoundingClientRect>"u"&&(e.getBoundingClientRect=function(){let n=this.width||512,r=this.height||512;return{x:0,y:0,left:0,top:0,right:n,bottom:r,width:n,height:r}}),"style"in e||Object.defineProperty(e,"style",{get(){return this._style??={},this._style},configurable:!0}),"clientWidth"in e||Object.defineProperty(e,"clientWidth",{get(){return this.width||512},configurable:!0}),"clientHeight"in e||Object.defineProperty(e,"clientHeight",{get(){return this.height||512},configurable:!0}),"parentElement"in e||Object.defineProperty(e,"parentElement",{get(){return t},configurable:!0}),typeof e.addEventListener>"u"&&(e.addEventListener=()=>{}),typeof e.removeEventListener>"u"&&(e.removeEventListener=()=>{}),typeof e.getAttribute>"u"&&(e.getAttribute=()=>null)}function U0(){typeof globalThis.IntersectionObserver>"u"&&(globalThis.IntersectionObserver=class{observe(){}unobserve(){}disconnect(){}})}b();var J1=class e{static instance=null;loadedFonts=new Set;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}async loadFont(t,n){if(this.loadedFonts.has(t))return;let r=`local-font-${t}`;if(document.getElementById(r))return;let i=document.createElement("style");i.id=r,i.innerHTML=`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: "${t}";
|
|
4
4
|
src: url("${n}");
|
|
@@ -132,7 +132,7 @@ struct VSOut {
|
|
|
132
132
|
|
|
133
133
|
return vec4<f32>(clamp(col, vec3<f32>(0.0), vec3<f32>(1.0)), 1.0);
|
|
134
134
|
}
|
|
135
|
-
`,o4=new WeakMap,Z=new Float32Array(12);function S6(e){let t=o4.get(e);return t||(t=new Map,o4.set(e,t)),t}async function d4(e,t,n,r){let i=r.signalConfig;if(!i)return;let s=i,d=typeof r.nodeId=="string"&&r.nodeId||typeof s.nodeId=="string"&&s.nodeId||"preview",o=r.frame??0,c=r.fps??24,m=r.width??512,u=r.height??512,l=r.elapsedMs!==void 0?r.elapsedMs:o/c*1e3,I=r.durationMs!==void 0?r.durationMs:0,p=typeof i?.durationMs=="number"?i.durationMs:0;!I&&p&&(I=p);let _=I/1e3,g=i.type==="signal_math"||!!s.operation||s.op==="SignalMath",E=i.type==="gate"||s.op==="SignalGate";if(_<=0){let N=s.signalA,s1=s.sourceSignal,P=a1.getDuration?.(e.device,d,r.renderId)||(g&&N?.nodeId?a1.getDuration?.(e.device,N.nodeId,r.renderId):void 0)||(E&&s1?.nodeId?a1.getDuration?.(e.device,s1.nodeId,r.renderId):void 0);P&&P>0&&(_=P)}let y=l/1e3;await a1.ensureAudioSourcesExtracted(e.device,i,c,r.renderId);let x=a1.getOrCreate2DTextureView(e.device,t,d,y,_,i,m,u,r.renderId,o,c),w=S6(e.device),A=`preview_${e.renderer.format}`,k=w.get(A);if(!k){let N=e.device.createShaderModule({label:"signal_preview_static.wgsl",code:x6});k=e.device.createRenderPipeline({label:"SignalPreviewPipeline_static",layout:"auto",vertex:{module:N,entryPoint:"vs"},fragment:{module:N,entryPoint:"fs",targets:[{format:e.renderer.format}]},primitive:{topology:"triangle-strip"}}),w.set(A,k)}let R=0;if(!g&&!E){let N=i;typeof N.channelIndex=="number"?R=N.channelIndex:N.channel==="beat"||N.extractionMode==="transient_beat"||d.endsWith("_beat")?R=1:N.channel==="bass"||N.extractionMode==="bass"||N.extractionMode==="sub_bass"||d.endsWith("_bass")?R=2:(N.channel==="energy"||N.extractionMode==="rms_envelope"||d.endsWith("_energy"))&&(R=3)}let V=a1.getStats?.(d)??(typeof s.nodeId=="string"?a1.getStats?.(s.nodeId):void 0),U=typeof V?.min=="number"?V.min:typeof s.amplitudeMin=="number"?s.amplitudeMin:(r.offset??0)-(r.amplitude??1),W=typeof V?.max=="number"?V.max:typeof s.amplitudeMax=="number"?s.amplitudeMax:(r.offset??0)+(r.amplitude??1);Z[0]=r.amplitude??1,Z[1]=r.offset??0,Z[2]=R,Z[3]=y,Z[4]=m,Z[5]=u,Z[6]=U,Z[7]=W,Z[8]=_,Z[9]=0,Z[10]=0,Z[11]=0;let Y=e.renderer.getTemporaryBuffer(Z),i1=e.device.createBindGroup({layout:k.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:Y}}]}),t1=e.device.createBindGroup({layout:k.getBindGroupLayout(1),entries:[{binding:0,resource:x}]});n.setPipeline(k),n.setBindGroup(0,i1),n.setBindGroup(1,t1),n.draw(4)}b();var m1=new Map,l4=new Map,B1=new Map;function P6(e,t,n,r){if(r){if(!n.buffer)return null;let i=F.create(t,e.device,n.width,n.height);return e.device.queue.writeTexture({texture:i},n.buffer,{bytesPerRow:n.width*4},[n.width,n.height]),i}else{if(!n.canvas)return null;let i=F.create(t,e.device,n.width,n.height);return e.device.queue.copyExternalImageToTexture({source:n.canvas,flipY:!1},{texture:i,premultipliedAlpha:!0},[n.width,n.height]),i}}function c4(e,t,n){let r=m1.get(e);r&&r!==t&&(F.evict(r,n),F.activeKeys.delete(r)),m1.set(e,t),F.activeKeys.add(t)}var u4=async(e,t,n)=>{let r=n.isHeadless??(typeof window>"u"||!!globalThis.__IS_HEADLESS_RENDERER__);try{let i=n.nodeId??"default",s=n.sourceUrl;if(l4.get(i)!==s){l4.set(i,s);let _=m1.get(i);_&&(F.evict(_,e.device),m1.delete(i))}let d=x0.getVideo(n.sourceUrl,r,i),o=n.frameKey,c=F.acquire(o),m=n.isPlaying??!0,u=r||n.forceWait||!m,l=!m1.has(i);if(c)c4(i,o,e.device);else if(B1.has(o))(l||u)&&(await B1.get(o),c=F.acquire(o));else{let _=`${i}-${Math.random()}`,g=globalThis.__GATEWAI_DELAYS__||new Set;globalThis.__GATEWAI_DELAYS__=g,g.add(_);let E=Math.max(0,Number.isFinite(n.timestampSec)?n.timestampSec:0),x=(async()=>{let w=await d.getFrame(E);if(!w)return;if(F.acquire(o)){F.release(o);return}P6(e,o,w,r)&&c4(i,o,e.device)})().finally(()=>{B1.delete(o),g.delete(_)});x.catch(w=>{!u&&!l&&console.error("[VideoNode] decode error:",w)}),B1.set(o,x),(l||u)&&(await x,c=F.acquire(o))}let I=null,p=null;if(c)p=c,I=o;else if(m1.has(i)){let _=m1.get(i),g=F.acquire(_);g&&(p=g,I=_)}p&&e.renderer.drawTexture(t,p,n.dstRect,{opacity:n.opacity,transform:n.matrix}),I&&F.release(I)}catch(i){if(r)throw i;console.error("[VideoNode] drawVideoNode error:",i)}};b();var G1=class{colorFormat;context;device;canvas;renderTarget;stagingBuffer=null;stagingBufferSize=0;constructor(t,n){this.device=t,this.canvas=n,this.colorFormat=typeof navigator<"u"&&"gpu"in navigator&&navigator.gpu&&typeof navigator.gpu.getPreferredCanvasFormat=="function"?navigator.gpu.getPreferredCanvasFormat():"rgba8unorm",this.context=n.getContext("webgpu"),this.context.configure({device:t,format:this.colorFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC|GPUTextureUsage.COPY_DST,alphaMode:"premultiplied"}),this.checkRenderTarget()}checkRenderTarget(){if(!this.renderTarget||this.renderTarget.width!==this.canvas.width||this.renderTarget.height!==this.canvas.height){if(this.renderTarget){let t=this.renderTarget;this.device.queue.onSubmittedWorkDone().then(()=>{try{t.destroy()}catch{}}).catch(()=>{})}if(this.renderTarget=this.device.createTexture({size:[this.canvas.width,this.canvas.height],format:this.colorFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC|GPUTextureUsage.COPY_DST}),this.stagingBuffer){try{this.stagingBuffer.destroy()}catch{}this.stagingBuffer=null,this.stagingBufferSize=0}}}get width(){return this.canvas.width}get height(){return this.canvas.height}getCurrentTextureView(){return this.checkRenderTarget(),this.renderTarget.createView()}getCurrentTexture(){return this.checkRenderTarget(),this.renderTarget}present(){this.checkRenderTarget();try{let t=this.context.getCurrentTexture(),n=this.device.createCommandEncoder();n.copyTextureToTexture({texture:this.renderTarget},{texture:t},[this.width,this.height]),this.device.queue.submit([n.finish()])}catch(t){console.warn("Failed to copy render target to canvas context on present:",t)}}async readPixels(){this.checkRenderTarget();let n=this.width*4,r=256,i=Math.ceil(n/r)*r,s=i*this.height;if(!this.stagingBuffer||this.stagingBufferSize!==s){if(this.stagingBuffer)try{this.stagingBuffer.destroy()}catch{}this.stagingBuffer=this.device.createBuffer({size:s,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST}),this.stagingBufferSize=s}let d=this.device.createCommandEncoder();d.copyTextureToBuffer({texture:this.renderTarget},{buffer:this.stagingBuffer,bytesPerRow:i},[this.width,this.height]),this.device.queue.submit([d.finish()]),await this.stagingBuffer.mapAsync(GPUMapMode.READ);let o=this.stagingBuffer.getMappedRange(),c=new Uint8ClampedArray(n*this.height),m=new Uint8Array(o);if(i===n)c.set(m);else for(let u=0;u<this.height;u++){let l=u*i,I=u*n;c.set(m.subarray(l,l+n),I)}if(this.stagingBuffer.unmap(),this.colorFormat==="bgra8unorm")for(let u=0;u<c.length;u+=4){let l=c[u];c[u]=c[u+2],c[u+2]=l}return c}destroy(){if(this.renderTarget)try{this.renderTarget.destroy()}catch{}this.stagingBuffer=null,this.stagingBufferSize=0}};var _4=new WeakMap;function I6(e,t){let n=_4.get(e);if(n&&n.fps===t)return n.ranges;let r=0,i=e.map(s=>{let d=(s.endSec??0)-s.startSec,o=Math.max(1,Math.round(d*t)),c=r;return r+=o,{seg:s,start:c,duration:o}});return _4.set(e,{fps:t,ranges:i}),i}var k6=[];function E6(){return k6.pop()??{}}function R6(e,t){let n=e.operation,r={...n};for(let[i,s]of Object.entries(n.signals))m0(s)&&!s.gpuBinding&&(r[i]=s.get(t));return{...e,operation:r}}function h4(e,t,n){return{text:e.text||"",dstRect:{x:Number(e.x??0),y:Number(e.y??0),width:Number(e.width??n.containerWidth),height:Number(e.height??n.containerHeight)},fontFamily:e.fontFamily,fontSize:Number(e.fontSize??48),color:e.fill??e.color??"white",width:e.width?Number(e.width):void 0,height:e.height?Number(e.height):void 0,lineHeight:Number(e.lineHeight??1.2),align:e.align,direction:e.direction,verticalAlign:e.verticalAlign,fontWeight:e.fontWeight,fontStyle:e.fontStyle,variableAxes:e.fontVariations,letterSpacing:e.letterSpacing,shadows:e.shadows,textBackgroundColor:e.textBackgroundColor,padding:e.padding!=null?Number(e.padding):void 0,stroke:e.stroke,strokeWidth:e.strokeWidth??e.strokeThickness?Number(e.strokeWidth??e.strokeThickness):void 0,strokeAlign:e.strokeAlign,opacity:Number(e.opacity??1)*Number(t.opacity??1),isHeadless:t.isHeadless,animation:e.animation??e.textAnimation,animators:e.animators,pathOptions:e.pathOptions,typewriter:e.typewriter,marquee:e.marquee,signals:t.signals??e.signals,firstMargin:e.firstMargin!=null?Number(e.firstMargin):void 0,lastMargin:e.lastMargin!=null?Number(e.lastMargin):void 0,baselineShift:e.baselineShift!=null?Number(e.baselineShift):void 0,frame:n.frame,fps:n.fps,durationMs:n.durationMs,elapsedMs:n.elapsedMs,isVideoMode:t.isVideoMode}}async function f1(e,t,n,r,i,s,d,o,c=0,m=0){let u=o.fps??24,l=d.operation;if(!l)return;let I=l.op==="Compositor",p=o.frame??0,_=o.compositionFrame??p,g=l.timeline?.segments||[],E=l.startFrame??l.timeline?.startFrame??0,y=p-E,x=l.timeline!==void 0||l.startFrame!==void 0||l.op==="compose",w=x?$1(d)?.durationMs??o.durationMs??void 0:o.durationMs??$1(d)?.durationMs??void 0;l.op==="source"||l.op==="text"||l.op==="caption"||P1(_,u,w);let k=E6();k.frame=_,k.fps=u,k.time=u>0?_/u:0,k.duration=(w??0)/1e3,k.durationMs=w??0,k.progress=w&&w>0?Math.max(0,Math.min(1,_/u*1e3/w)):0,k.deltaTime=u>0?1/u:0;let R=x?(y!==void 0&&u!==void 0?y/u*1e3:void 0)??o.elapsedMs:o.elapsedMs??(y!==void 0&&u!==void 0?y/u*1e3:void 0),V=y+Math.round(c*u),U=null,W=0;if(g.length>0){let L=I6(g,u).find(({start:O,duration:H})=>V>=O&&V<O+H);if(L)U=L.seg,W=L.start;else return}let Y=y-W,i1=U?U.startSec-W/u:0,t1=c+i1,N=m+W/u;if(typeof l.onRequestFrame=="function"){let P=l.onRequestFrame(k);P&&typeof P.then=="function"&&await P}else l.effect&&typeof l.effect.notifyFrame=="function"&&l.effect.notifyFrame(k);if(l.op==="TextureSource"){let P=l.sourceTexture;if(P){let L=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load");e.renderer.drawTexture(L,P,{x:0,y:0,width:i,height:s},{opacity:Number(l.opacity??1)}),L.end()}return}let s1=p0.get(l.op);if(s1){l.signals&&(d=R6(d,k));let P=l?.inputs;if(P){for(let h of Object.values(P))if(h?.connectionValid&&h?.outputItem?.type==="LUT"){let T=h.outputItem.data;if(T&&typeof T=="object"&&T.operation){let B=T.metadata?.width??i,G=T.metadata?.height??s,q=e.renderer.getTemporaryTexture(B,G),J=q.createView();await f1(e,t,J,q,B,G,T,{...o,compositionFrame:_,virtualMedia:T},t1,N)}}else if(h?.connectionValid&&h?.outputItem?.type==="Signal"){let T=h.outputItem.data;T&&typeof T=="object"&&await a1.ensureAudioSourcesExtracted(e.device,T.signalConfig??T,u,o.renderId)}}let L=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load"),O=!1,H=L.end.bind(L);L.end=()=>{O||(H(),O=!0)};let C={ctx:e,encoder:t,pass:L,targetView:n,targetTexture:r,targetWidth:i,targetHeight:s,props:{...o,compositionFrame:_,virtualMedia:d,inheritedSeekOffset:t1,inheritedClockOffset:N,durationMs:w,elapsedMs:R},drawChild:async(h,T,B,G,q,J)=>{await f1(e,t,B??n,G??r,q??i,J??s,h,{...o,compositionFrame:_,durationMs:w,elapsedMs:R,virtualMedia:h,...T,excludeTextures:[...o.excludeTextures||[],...T?.excludeTextures||[],G??r]},I?0:t1,N)}};await s1(C),C.pass.end();return}if(l.op!=="LUT"){if(l.op==="Signal"||l.op==="SignalMath"||l.dataType==="Signal"){let P=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load");await d4(e,t,P,{nodeId:l.nodeId||l.signalConfig?.nodeId||o.renderId,func:l.func,amplitude:Number(l.amplitude??1),frequency:Number(l.frequency??1),phase:Number(l.phase??0),offset:Number(l.offset??0),signalConfig:{...l.signalConfig,...l},frame:p,fps:u,elapsedMs:R,durationMs:w??0,width:i,height:s,drawChild:async(L,O,H,C,h,T)=>{await f1(e,t,H,C,h,T,L,{...o,compositionFrame:_,durationMs:w,elapsedMs:R,...O,excludeTextures:[...o.excludeTextures||[],...O?.excludeTextures||[],C]})}}),P.end();return}if(l.op==="source"||l.op==="text"||l.op==="caption"){let P=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load");if(l.op==="source"){let L=f0(d),O=I0(d);if(O.sourceUrl){let H=o.containerWidth??e.surface.width,C=o.containerHeight??e.surface.height;if(L==="Image")await H0(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:H,height:C},opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless});else if(L==="SVG")await S0(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:H,height:C},opacity:Number(l.opacity??1),isHeadless:o.isHeadless});else if(L==="Lottie")await s4(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:H,height:C},frame:Y+Math.round(t1*u),fps:u,opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless,dpr:typeof o.dpr=="number"?o.dpr:typeof l.dpr=="number"?l.dpr:void 0});else if(L==="GIF")await W0(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:H,height:C},frame:Y+Math.round(t1*u),fps:u,opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless});else if(L==="Text"){let h={...l};K1(e,P,{...h4(h,o,{containerWidth:H,containerHeight:C,frame:y,fps:u,durationMs:w,elapsedMs:R}),borderRadius:h.borderRadius!=null?Number(h.borderRadius):void 0,textProgress:h.textProgress!=null?Number(h.textProgress):void 0})}else if(L==="Video"){let h=Math.max(.01,(Number(o.playbackRateOverride)||1)*(Number(O.speed)||1)),T=Math.max(0,(Number(o.trimStartOverride)||0)+(Number(O.trimStartSec)||0)+t1),B=o.sourceTimeSec??Y/u*h+T,G=Math.max(0,Number.isFinite(B)?B:0);await u4(e,P,{nodeId:o.renderId,frameKey:`${o.renderId??"video"}-${O.sourceUrl}-${G}`,sourceUrl:O.sourceUrl,timestampSec:G,dstRect:{x:0,y:0,width:H,height:C},opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless,isPlaying:o.isPlaying,forceWait:o.forceWait})}else if(L==="Caption"){let h={...l,...o};await L0(e,P,{renderId:o.renderId,src:O.sourceUrl,dstRect:{x:0,y:0,width:H,height:C},frame:y,fps:u,fontFamily:h.fontFamily,fontSize:Number(h.fontSize??48),color:h.fill??h.color??"white",lineHeight:Number(h.lineHeight??1.2),align:h.align??"center",direction:h.direction,textAlignVertical:h.verticalAlign??h.textAlignVertical,fontWeight:h.fontWeight,fontStyle:h.fontStyle,letterSpacing:h.letterSpacing,shadows:h.shadows,textBackgroundColor:h.background??h.textBackgroundColor,borderRadius:(h.borderRadius??h.strokeRadius)!=null?Number(h.borderRadius??h.strokeRadius):void 0,strokeRadius:(h.strokeRadius??h.borderRadius)!=null?Number(h.strokeRadius??h.borderRadius):void 0,stroke:h.stroke,strokeWidth:(h.strokeWidth??h.strokeThickness)!=null?Number(h.strokeWidth??h.strokeThickness):void 0,maxWidth:h.maxWidth,padding:h.padding!=null?Number(h.padding):void 0,opacity:Number(h.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless,isVideoMode:o.isVideoMode})}}}else if(l.op==="text"){let L={...l},O=o.containerWidth??e.surface.width,H=o.containerHeight??e.surface.height;K1(e,P,{...h4(L,o,{containerWidth:O,containerHeight:H,frame:y,fps:u,durationMs:w,elapsedMs:R}),renderId:o.renderId,spans:L.spans,borderRadius:(L.borderRadius??L.strokeRadius)!=null?Number(L.borderRadius??L.strokeRadius):void 0,strokeRadius:(L.strokeRadius??L.borderRadius)!=null?Number(L.strokeRadius??L.borderRadius):void 0})}P.end()}if(d.children&&d.children.length>0)for(let P=0;P<d.children.length;P++){let L=d.children[P];L&&await f1(e,t,n,r,i,s,L,{...o,compositionFrame:_,durationMs:w,elapsedMs:R,virtualMedia:L,renderId:`${o.renderId}-c${P}`},I?0:t1,N)}}}b();var T6={frame:0,fps:30,isPlaying:!1},l0=class{states=new Map;listeners=new Map;setState(t,n,r,i){let s=this.states.get(t),d=i!==void 0?i:s?.isPlaying??!1;s?.frame===n&&s?.fps===r&&s?.isPlaying===d||(this.states.set(t,{frame:n,fps:r,isPlaying:d}),this.notify(t))}getState(t){if(this.states.has(t))return this.states.get(t);for(let[n,r]of this.states.entries())if(t.startsWith(n))return r;return T6}subscribe(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>{let r=this.listeners.get(t);r?.delete(n),r?.size===0&&(this.listeners.delete(t),this.states.delete(t))}}clearKey(t){this.states.delete(t)}notify(t){for(let[n,r]of this.listeners.entries())(n===t||n.startsWith(t))&&r.forEach(i=>i())}},m4=new l0;b();b();async function z1(e){await Promise.all(e.map(async({ops:t,load:n})=>{try{let r=(await n()).default;for(let i of t)r?.WebGPURenderer&&g0(i,r.WebGPURenderer),r?.audioProcessor&&w0.register(i,r.audioProcessor)}catch(r){console.warn("[framefields] renderer for",t[0],"failed to load",r)}}))}var F6=2;function c0(e,t,n,r){let i=new Map,s,d=async()=>{let o=e.toVirtualMediaAsync?await e.toVirtualMediaAsync():e.toVirtualMedia?.();if(!o)throw new Error("The export is not a composition.");return await e.prepareMediaTime?.(),await R0(o,t),o};return async(o,c="main")=>{s??=d();let m=await s,u=i.get(c);i.delete(c);let l=u!==void 0&&Math.abs(o.startSec-u.endSec)<1e-6,I=l?o.startSec:Math.max(0,o.startSec-F6),p=l?u.exact:I===0,{channels:_,sampleRate:g}=await k0(m,t,48e3,n,`${r}-${c}`,{window:{startSec:I,endSec:o.endSec},master:!1,continue:l});i.set(c,{endSec:o.endSec,exact:p});let E=Math.round((o.startSec-I)*g),y=(_[0]??new Float32Array(0)).slice(E),x=(_[1]??_[0]??y).slice(E),w=0;for(let A=0;A<y.length;A++)w=Math.max(w,Math.abs(y[A]),Math.abs(x[A]));return{left:y,right:x,sampleRate:g,peak:w,exact:p}}}function A6(e,t){let n=self,r=(async()=>{await z1(E1);let s=e[t],d=typeof s=="function"?await s():s,o=d.toVirtualMediaAsync?await d.toVirtualMediaAsync():d.toVirtualMedia?.(),c=d.fps??o?.operation?.fps??30;return c0(d,c,await I1(),"worker-audio")})();r.then(()=>n.postMessage({ready:!0}),s=>n.postMessage({ready:!1,error:f4(s)}));let i=Promise.resolve();n.onmessage=s=>{let{id:d,range:o,chain:c}=s.data;i=i.then(async()=>{try{let m=await(await r)(o,c);n.postMessage({id:d,mix:m},[m.left.buffer,m.right.buffer])}catch(m){n.postMessage({id:d,error:f4(m)})}})}}function f4(e){return e instanceof Error?e.message:String(e)}b();var D6=`
|
|
135
|
+
`,o4=new WeakMap,Z=new Float32Array(12);function S6(e){let t=o4.get(e);return t||(t=new Map,o4.set(e,t)),t}async function d4(e,t,n,r){let i=r.signalConfig;if(!i)return;let s=i,d=typeof r.nodeId=="string"&&r.nodeId||typeof s.nodeId=="string"&&s.nodeId||"preview",o=r.frame??0,c=r.fps??24,m=r.width??512,u=r.height??512,l=r.elapsedMs!==void 0?r.elapsedMs:o/c*1e3,I=r.durationMs!==void 0?r.durationMs:0,p=typeof i?.durationMs=="number"?i.durationMs:0;!I&&p&&(I=p);let _=I/1e3,g=i.type==="signal_math"||!!s.operation||s.op==="SignalMath",E=i.type==="gate"||s.op==="SignalGate";if(_<=0){let N=s.signalA,s1=s.sourceSignal,P=a1.getDuration?.(e.device,d,r.renderId)||(g&&N?.nodeId?a1.getDuration?.(e.device,N.nodeId,r.renderId):void 0)||(E&&s1?.nodeId?a1.getDuration?.(e.device,s1.nodeId,r.renderId):void 0);P&&P>0&&(_=P)}let y=l/1e3;await a1.ensureAudioSourcesExtracted(e.device,i,c,r.renderId);let x=a1.getOrCreate2DTextureView(e.device,t,d,y,_,i,m,u,r.renderId,o,c),w=S6(e.device),A=`preview_${e.renderer.format}`,k=w.get(A);if(!k){let N=e.device.createShaderModule({label:"signal_preview_static.wgsl",code:x6});k=e.device.createRenderPipeline({label:"SignalPreviewPipeline_static",layout:"auto",vertex:{module:N,entryPoint:"vs"},fragment:{module:N,entryPoint:"fs",targets:[{format:e.renderer.format}]},primitive:{topology:"triangle-strip"}}),w.set(A,k)}let R=0;if(!g&&!E){let N=i;typeof N.channelIndex=="number"?R=N.channelIndex:N.channel==="beat"||N.extractionMode==="transient_beat"||d.endsWith("_beat")?R=1:N.channel==="bass"||N.extractionMode==="bass"||N.extractionMode==="sub_bass"||d.endsWith("_bass")?R=2:(N.channel==="energy"||N.extractionMode==="rms_envelope"||d.endsWith("_energy"))&&(R=3)}let W=a1.getStats?.(d)??(typeof s.nodeId=="string"?a1.getStats?.(s.nodeId):void 0),U=typeof W?.min=="number"?W.min:typeof s.amplitudeMin=="number"?s.amplitudeMin:(r.offset??0)-(r.amplitude??1),H=typeof W?.max=="number"?W.max:typeof s.amplitudeMax=="number"?s.amplitudeMax:(r.offset??0)+(r.amplitude??1);Z[0]=r.amplitude??1,Z[1]=r.offset??0,Z[2]=R,Z[3]=y,Z[4]=m,Z[5]=u,Z[6]=U,Z[7]=H,Z[8]=_,Z[9]=0,Z[10]=0,Z[11]=0;let Y=e.renderer.getTemporaryBuffer(Z),i1=e.device.createBindGroup({layout:k.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:Y}}]}),t1=e.device.createBindGroup({layout:k.getBindGroupLayout(1),entries:[{binding:0,resource:x}]});n.setPipeline(k),n.setBindGroup(0,i1),n.setBindGroup(1,t1),n.draw(4)}b();var m1=new Map,l4=new Map,B1=new Map;function P6(e,t,n,r){if(r){if(!n.buffer)return null;let i=F.create(t,e.device,n.width,n.height);return e.device.queue.writeTexture({texture:i},n.buffer,{bytesPerRow:n.width*4},[n.width,n.height]),i}else{if(!n.canvas)return null;let i=F.create(t,e.device,n.width,n.height);return e.device.queue.copyExternalImageToTexture({source:n.canvas,flipY:!1},{texture:i,premultipliedAlpha:!0},[n.width,n.height]),i}}function c4(e,t,n){let r=m1.get(e);r&&r!==t&&(F.evict(r,n),F.activeKeys.delete(r)),m1.set(e,t),F.activeKeys.add(t)}var u4=async(e,t,n)=>{let r=n.isHeadless??(typeof window>"u"||!!globalThis.__IS_HEADLESS_RENDERER__);try{let i=n.nodeId??"default",s=n.sourceUrl;if(l4.get(i)!==s){l4.set(i,s);let _=m1.get(i);_&&(F.evict(_,e.device),m1.delete(i))}let d=x0.getVideo(n.sourceUrl,r,i),o=n.frameKey,c=F.acquire(o),m=n.isPlaying??!0,u=r||n.forceWait||!m,l=!m1.has(i);if(c)c4(i,o,e.device);else if(B1.has(o))(l||u)&&(await B1.get(o),c=F.acquire(o));else{let _=`${i}-${Math.random()}`,g=globalThis.__GATEWAI_DELAYS__||new Set;globalThis.__GATEWAI_DELAYS__=g,g.add(_);let E=Math.max(0,Number.isFinite(n.timestampSec)?n.timestampSec:0),x=(async()=>{let w=await d.getFrame(E);if(!w)return;if(F.acquire(o)){F.release(o);return}P6(e,o,w,r)&&c4(i,o,e.device)})().finally(()=>{B1.delete(o),g.delete(_)});x.catch(w=>{!u&&!l&&console.error("[VideoNode] decode error:",w)}),B1.set(o,x),(l||u)&&(await x,c=F.acquire(o))}let I=null,p=null;if(c)p=c,I=o;else if(m1.has(i)){let _=m1.get(i),g=F.acquire(_);g&&(p=g,I=_)}p&&e.renderer.drawTexture(t,p,n.dstRect,{opacity:n.opacity,transform:n.matrix}),I&&F.release(I)}catch(i){if(r)throw i;console.error("[VideoNode] drawVideoNode error:",i)}};b();var G1=class{colorFormat;context;device;canvas;renderTarget;stagingBuffer=null;stagingBufferSize=0;constructor(t,n){this.device=t,this.canvas=n,this.colorFormat=typeof navigator<"u"&&"gpu"in navigator&&navigator.gpu&&typeof navigator.gpu.getPreferredCanvasFormat=="function"?navigator.gpu.getPreferredCanvasFormat():"rgba8unorm",this.context=n.getContext("webgpu"),this.context.configure({device:t,format:this.colorFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC|GPUTextureUsage.COPY_DST,alphaMode:"premultiplied"}),this.checkRenderTarget()}checkRenderTarget(){if(!this.renderTarget||this.renderTarget.width!==this.canvas.width||this.renderTarget.height!==this.canvas.height){if(this.renderTarget){let t=this.renderTarget;this.device.queue.onSubmittedWorkDone().then(()=>{try{t.destroy()}catch{}}).catch(()=>{})}if(this.renderTarget=this.device.createTexture({size:[this.canvas.width,this.canvas.height],format:this.colorFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC|GPUTextureUsage.COPY_DST}),this.stagingBuffer){try{this.stagingBuffer.destroy()}catch{}this.stagingBuffer=null,this.stagingBufferSize=0}}}get width(){return this.canvas.width}get height(){return this.canvas.height}getCurrentTextureView(){return this.checkRenderTarget(),this.renderTarget.createView()}getCurrentTexture(){return this.checkRenderTarget(),this.renderTarget}present(){this.checkRenderTarget();try{let t=this.context.getCurrentTexture(),n=this.device.createCommandEncoder();n.copyTextureToTexture({texture:this.renderTarget},{texture:t},[this.width,this.height]),this.device.queue.submit([n.finish()])}catch(t){console.warn("Failed to copy render target to canvas context on present:",t)}}async readPixels(){this.checkRenderTarget();let n=this.width*4,r=256,i=Math.ceil(n/r)*r,s=i*this.height;if(!this.stagingBuffer||this.stagingBufferSize!==s){if(this.stagingBuffer)try{this.stagingBuffer.destroy()}catch{}this.stagingBuffer=this.device.createBuffer({size:s,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST}),this.stagingBufferSize=s}let d=this.device.createCommandEncoder();d.copyTextureToBuffer({texture:this.renderTarget},{buffer:this.stagingBuffer,bytesPerRow:i},[this.width,this.height]),this.device.queue.submit([d.finish()]),await this.stagingBuffer.mapAsync(GPUMapMode.READ);let o=this.stagingBuffer.getMappedRange(),c=new Uint8ClampedArray(n*this.height),m=new Uint8Array(o);if(i===n)c.set(m);else for(let u=0;u<this.height;u++){let l=u*i,I=u*n;c.set(m.subarray(l,l+n),I)}if(this.stagingBuffer.unmap(),this.colorFormat==="bgra8unorm")for(let u=0;u<c.length;u+=4){let l=c[u];c[u]=c[u+2],c[u+2]=l}return c}destroy(){if(this.renderTarget)try{this.renderTarget.destroy()}catch{}this.stagingBuffer=null,this.stagingBufferSize=0}};var _4=new WeakMap;function I6(e,t){let n=_4.get(e);if(n&&n.fps===t)return n.ranges;let r=0,i=e.map(s=>{let d=(s.endSec??0)-s.startSec,o=Math.max(1,Math.round(d*t)),c=r;return r+=o,{seg:s,start:c,duration:o}});return _4.set(e,{fps:t,ranges:i}),i}var k6=[];function E6(){return k6.pop()??{}}function R6(e,t){let n=e.operation,r={...n};for(let[i,s]of Object.entries(n.signals))m0(s)&&!s.gpuBinding&&(r[i]=s.get(t));return{...e,operation:r}}function h4(e,t,n){return{text:e.text||"",dstRect:{x:Number(e.x??0),y:Number(e.y??0),width:Number(e.width??n.containerWidth),height:Number(e.height??n.containerHeight)},fontFamily:e.fontFamily,fontSize:Number(e.fontSize??48),color:e.fill??e.color??"white",width:e.width?Number(e.width):void 0,height:e.height?Number(e.height):void 0,lineHeight:Number(e.lineHeight??1.2),align:e.align,direction:e.direction,verticalAlign:e.verticalAlign,fontWeight:e.fontWeight,fontStyle:e.fontStyle,variableAxes:e.fontVariations,letterSpacing:e.letterSpacing,shadows:e.shadows,textBackgroundColor:e.textBackgroundColor,padding:e.padding!=null?Number(e.padding):void 0,stroke:e.stroke,strokeWidth:e.strokeWidth??e.strokeThickness?Number(e.strokeWidth??e.strokeThickness):void 0,strokeAlign:e.strokeAlign,opacity:Number(e.opacity??1)*Number(t.opacity??1),isHeadless:t.isHeadless,animation:e.animation??e.textAnimation,animators:e.animators,pathOptions:e.pathOptions,typewriter:e.typewriter,marquee:e.marquee,signals:t.signals??e.signals,firstMargin:e.firstMargin!=null?Number(e.firstMargin):void 0,lastMargin:e.lastMargin!=null?Number(e.lastMargin):void 0,baselineShift:e.baselineShift!=null?Number(e.baselineShift):void 0,frame:n.frame,fps:n.fps,durationMs:n.durationMs,elapsedMs:n.elapsedMs,isVideoMode:t.isVideoMode}}async function f1(e,t,n,r,i,s,d,o,c=0,m=0){let u=o.fps??24,l=d.operation;if(!l)return;let I=l.op==="Compositor",p=o.frame??0,_=o.compositionFrame??p,g=l.timeline?.segments||[],E=l.startFrame??l.timeline?.startFrame??0,y=p-E,x=l.timeline!==void 0||l.startFrame!==void 0||l.op==="compose",w=x?$1(d)?.durationMs??o.durationMs??void 0:o.durationMs??$1(d)?.durationMs??void 0;l.op==="source"||l.op==="text"||l.op==="caption"||P1(_,u,w);let k=E6();k.frame=_,k.fps=u,k.time=u>0?_/u:0,k.duration=(w??0)/1e3,k.durationMs=w??0,k.progress=w&&w>0?Math.max(0,Math.min(1,_/u*1e3/w)):0,k.deltaTime=u>0?1/u:0;let R=x?(y!==void 0&&u!==void 0?y/u*1e3:void 0)??o.elapsedMs:o.elapsedMs??(y!==void 0&&u!==void 0?y/u*1e3:void 0),W=y+Math.round(c*u),U=null,H=0;if(g.length>0){let L=I6(g,u).find(({start:O,duration:V})=>W>=O&&W<O+V);if(L)U=L.seg,H=L.start;else return}let Y=y-H,i1=U?U.startSec-H/u:0,t1=c+i1,N=m+H/u;if(typeof l.onRequestFrame=="function"){let P=l.onRequestFrame(k);P&&typeof P.then=="function"&&await P}else l.effect&&typeof l.effect.notifyFrame=="function"&&l.effect.notifyFrame(k);if(l.op==="TextureSource"){let P=l.sourceTexture;if(P){let L=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load");e.renderer.drawTexture(L,P,{x:0,y:0,width:i,height:s},{opacity:Number(l.opacity??1)}),L.end()}return}let s1=p0.get(l.op);if(s1){l.signals&&(d=R6(d,k));let P=l?.inputs;if(P){for(let h of Object.values(P))if(h?.connectionValid&&h?.outputItem?.type==="LUT"){let T=h.outputItem.data;if(T&&typeof T=="object"&&T.operation){let G=T.metadata?.width??i,B=T.metadata?.height??s,q=e.renderer.getTemporaryTexture(G,B),J=q.createView();await f1(e,t,J,q,G,B,T,{...o,compositionFrame:_,virtualMedia:T},t1,N)}}else if(h?.connectionValid&&h?.outputItem?.type==="Signal"){let T=h.outputItem.data;T&&typeof T=="object"&&await a1.ensureAudioSourcesExtracted(e.device,T.signalConfig??T,u,o.renderId)}}let L=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load"),O=!1,V=L.end.bind(L);L.end=()=>{O||(V(),O=!0)};let C={ctx:e,encoder:t,pass:L,targetView:n,targetTexture:r,targetWidth:i,targetHeight:s,props:{...o,compositionFrame:_,virtualMedia:d,inheritedSeekOffset:t1,inheritedClockOffset:N,durationMs:w,elapsedMs:R},drawChild:async(h,T,G,B,q,J)=>{await f1(e,t,G??n,B??r,q??i,J??s,h,{...o,compositionFrame:_,durationMs:w,elapsedMs:R,virtualMedia:h,...T,excludeTextures:[...o.excludeTextures||[],...T?.excludeTextures||[],B??r]},I?0:t1,N)}};await s1(C),C.pass.end();return}if(l.op!=="LUT"){if(l.op==="Signal"||l.op==="SignalMath"||l.dataType==="Signal"){let P=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load");await d4(e,t,P,{nodeId:l.nodeId||l.signalConfig?.nodeId||o.renderId,func:l.func,amplitude:Number(l.amplitude??1),frequency:Number(l.frequency??1),phase:Number(l.phase??0),offset:Number(l.offset??0),signalConfig:{...l.signalConfig,...l},frame:p,fps:u,elapsedMs:R,durationMs:w??0,width:i,height:s,drawChild:async(L,O,V,C,h,T)=>{await f1(e,t,V,C,h,T,L,{...o,compositionFrame:_,durationMs:w,elapsedMs:R,...O,excludeTextures:[...o.excludeTextures||[],...O?.excludeTextures||[],C]})}}),P.end();return}if(l.op==="source"||l.op==="text"||l.op==="caption"){let P=e.renderer.beginFrame(t,n,{r:0,g:0,b:0,a:0},i,s,"load");if(l.op==="source"){let L=f0(d),O=I0(d);if(O.sourceUrl){let V=o.containerWidth??e.surface.width,C=o.containerHeight??e.surface.height;if(L==="Image")await H0(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:V,height:C},opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless});else if(L==="SVG")await S0(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:V,height:C},opacity:Number(l.opacity??1),isHeadless:o.isHeadless});else if(L==="Lottie")await s4(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:V,height:C},frame:Y+Math.round(t1*u),fps:u,opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless,dpr:typeof o.dpr=="number"?o.dpr:typeof l.dpr=="number"?l.dpr:void 0});else if(L==="GIF")await W0(e,P,{src:O.sourceUrl,dstRect:{x:0,y:0,width:V,height:C},frame:Y+Math.round(t1*u),fps:u,opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless});else if(L==="Text"){let h={...l};K1(e,P,{...h4(h,o,{containerWidth:V,containerHeight:C,frame:y,fps:u,durationMs:w,elapsedMs:R}),borderRadius:h.borderRadius!=null?Number(h.borderRadius):void 0,textProgress:h.textProgress!=null?Number(h.textProgress):void 0})}else if(L==="Video"){let h=Math.max(.01,(Number(o.playbackRateOverride)||1)*(Number(O.speed)||1)),T=Math.max(0,(Number(o.trimStartOverride)||0)+(Number(O.trimStartSec)||0)+t1),G=o.sourceTimeSec??Y/u*h+T,B=Math.max(0,Number.isFinite(G)?G:0);await u4(e,P,{nodeId:o.renderId,frameKey:`${o.renderId??"video"}-${O.sourceUrl}-${B}`,sourceUrl:O.sourceUrl,timestampSec:B,dstRect:{x:0,y:0,width:V,height:C},opacity:Number(l.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless,isPlaying:o.isPlaying,forceWait:o.forceWait})}else if(L==="Caption"){let h={...l,...o};await L0(e,P,{renderId:o.renderId,src:O.sourceUrl,dstRect:{x:0,y:0,width:V,height:C},frame:y,fps:u,fontFamily:h.fontFamily,fontSize:Number(h.fontSize??48),color:h.fill??h.color??"white",lineHeight:Number(h.lineHeight??1.2),align:h.align??"center",direction:h.direction,textAlignVertical:h.verticalAlign??h.textAlignVertical,fontWeight:h.fontWeight,fontStyle:h.fontStyle,letterSpacing:h.letterSpacing,shadows:h.shadows,textBackgroundColor:h.background??h.textBackgroundColor,borderRadius:(h.borderRadius??h.strokeRadius)!=null?Number(h.borderRadius??h.strokeRadius):void 0,strokeRadius:(h.strokeRadius??h.borderRadius)!=null?Number(h.strokeRadius??h.borderRadius):void 0,stroke:h.stroke,strokeWidth:(h.strokeWidth??h.strokeThickness)!=null?Number(h.strokeWidth??h.strokeThickness):void 0,maxWidth:h.maxWidth,padding:h.padding!=null?Number(h.padding):void 0,opacity:Number(h.opacity??1)*Number(o.opacity??1),isHeadless:o.isHeadless,isVideoMode:o.isVideoMode})}}}else if(l.op==="text"){let L={...l},O=o.containerWidth??e.surface.width,V=o.containerHeight??e.surface.height;K1(e,P,{...h4(L,o,{containerWidth:O,containerHeight:V,frame:y,fps:u,durationMs:w,elapsedMs:R}),renderId:o.renderId,spans:L.spans,borderRadius:(L.borderRadius??L.strokeRadius)!=null?Number(L.borderRadius??L.strokeRadius):void 0,strokeRadius:(L.strokeRadius??L.borderRadius)!=null?Number(L.strokeRadius??L.borderRadius):void 0})}P.end()}if(d.children&&d.children.length>0)for(let P=0;P<d.children.length;P++){let L=d.children[P];L&&await f1(e,t,n,r,i,s,L,{...o,compositionFrame:_,durationMs:w,elapsedMs:R,virtualMedia:L,renderId:`${o.renderId}-c${P}`},I?0:t1,N)}}}b();var T6={frame:0,fps:30,isPlaying:!1},l0=class{states=new Map;listeners=new Map;setState(t,n,r,i){let s=this.states.get(t),d=i!==void 0?i:s?.isPlaying??!1;s?.frame===n&&s?.fps===r&&s?.isPlaying===d||(this.states.set(t,{frame:n,fps:r,isPlaying:d}),this.notify(t))}getState(t){if(this.states.has(t))return this.states.get(t);for(let[n,r]of this.states.entries())if(t.startsWith(n))return r;return T6}subscribe(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>{let r=this.listeners.get(t);r?.delete(n),r?.size===0&&(this.listeners.delete(t),this.states.delete(t))}}clearKey(t){this.states.delete(t)}notify(t){for(let[n,r]of this.listeners.entries())(n===t||n.startsWith(t))&&r.forEach(i=>i())}},m4=new l0;b();b();async function z1(e){await Promise.all(e.map(async({ops:t,load:n})=>{try{let r=(await n()).default;for(let i of t)r?.WebGPURenderer&&g0(i,r.WebGPURenderer),r?.audioProcessor&&w0.register(i,r.audioProcessor)}catch(r){console.warn("[framefields] renderer for",t[0],"failed to load",r)}}))}var F6=2;function c0(e,t,n,r){let i=new Map,s,d=async()=>{let o=e.toVirtualMediaAsync?await e.toVirtualMediaAsync():e.toVirtualMedia?.();if(!o)throw new Error("The export is not a composition.");return await e.prepareMediaTime?.(),await R0(o,t),o};return async(o,c="main")=>{s??=d();let m=await s,u=i.get(c);i.delete(c);let l=u!==void 0&&Math.abs(o.startSec-u.endSec)<1e-6,I=l?o.startSec:Math.max(0,o.startSec-F6),p=l?u.exact:I===0,{channels:_,sampleRate:g}=await k0(m,t,48e3,n,`${r}-${c}`,{window:{startSec:I,endSec:o.endSec},master:!1,continue:l});i.set(c,{endSec:o.endSec,exact:p});let E=Math.round((o.startSec-I)*g),y=(_[0]??new Float32Array(0)).slice(E),x=(_[1]??_[0]??y).slice(E),w=0;for(let A=0;A<y.length;A++)w=Math.max(w,Math.abs(y[A]),Math.abs(x[A]));return{left:y,right:x,sampleRate:g,peak:w,exact:p}}}function A6(e,t){let n=self,r=(async()=>{await z1(E1);let s=e[t],d=typeof s=="function"?await s():s,o=d.toVirtualMediaAsync?await d.toVirtualMediaAsync():d.toVirtualMedia?.(),c=d.fps??o?.operation?.fps??30;return c0(d,c,await I1(),"worker-audio")})();r.then(()=>n.postMessage({ready:!0}),s=>n.postMessage({ready:!1,error:f4(s)}));let i=Promise.resolve();n.onmessage=s=>{let{id:d,range:o,chain:c}=s.data;i=i.then(async()=>{try{let m=await(await r)(o,c);n.postMessage({id:d,mix:m},[m.left.buffer,m.right.buffer])}catch(m){n.postMessage({id:d,error:f4(m)})}})}}function f4(e){return e instanceof Error?e.message:String(e)}b();var D6=`
|
|
136
136
|
@group(0) @binding(0) var src: texture_2d<f32>;
|
|
137
137
|
@group(0) @binding(1) var samp: sampler;
|
|
138
138
|
|
|
@@ -152,4 +152,4 @@ struct VSOut {
|
|
|
152
152
|
@fragment fn fs(in: VSOut) -> @location(0) vec4<f32> {
|
|
153
153
|
return textureSampleLevel(src, samp, in.uv, 0.0);
|
|
154
154
|
}
|
|
155
|
-
`,V1=class{constructor(t,n){this.device=t;let r=t.createShaderModule({label:"preview_blit",code:D6});this.pipeline=t.createRenderPipeline({label:"preview_blit",layout:"auto",vertex:{module:r,entryPoint:"vs"},fragment:{module:r,entryPoint:"fs",targets:[{format:n}]},primitive:{topology:"triangle-list"}}),this.sampler=t.createSampler({magFilter:"linear",minFilter:"linear"})}device;pipeline;sampler;bindGroups=new WeakMap;blit(t,n){let r=this.bindGroups.get(t);r||(r=this.device.createBindGroup({layout:this.pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:t.createView()},{binding:1,resource:this.sampler}]}),this.bindGroups.set(t,r));let i=this.device.createCommandEncoder({label:"preview_blit"}),s=i.beginRenderPass({colorAttachments:[{view:n.createView(),loadOp:"clear",storeOp:"store",clearValue:{r:0,g:0,b:0,a:0}}]});s.setPipeline(this.pipeline),s.setBindGroup(0,r),s.draw(3),s.end(),this.device.queue.submit([i.finish()])}};function m9(e,t,n){D.env.FRAMEFIELDS_MODELS_DIR=n.modelsDir,F0(()=>new T0({loader:async()=>{let i=await import(`${n.ortBase}ort.webgpu.bundle.min.mjs`);return i.env.wasm.wasmPaths=n.ortBase,i.env.logLevel="error",n.ortBase.startsWith("/")||(i.env.wasm.numThreads=1),i}}));let r=window.framefieldsPlayer;window.framefieldsPlayer=(async()=>(await r?.then(i=>i.dispose(),()=>{}),U6(e,t,E1)))(),window.dispatchEvent(new Event("framefields:player"))}async function U6(e,t,n){if(!("gpu"in navigator))throw new Error("This browser has no WebGPU. Use a current Chrome, Edge or Safari.");await z1(n);let r=e[t];if(r===void 0)throw new Error(`The preview entry has no export named "${t}".`);let i=typeof r=="function"?await r():r,s=i.toVirtualMediaAsync?await i.toVirtualMediaAsync():i.toVirtualMedia?.();if(!s)throw new Error(`"${t}" is not a composition.`);let d=Math.round(s.metadata?.width??1920),o=Math.round(s.metadata?.height??1080),c=i.fps??s.operation?.fps??30,m=s.metadata?.durationMs??0,u={width:d,height:o,fps:c,durationMs:m,frameCount:Math.max(1,Math.round(m/1e3*c))},l=p4(s,"Vision"),I=s.operation?.dataType==="Video",p=await I1(),_=document.getElementById("canvas")??document.createElement("canvas");_.width=d%2?d+1:d,_.height=o%2?o+1:o;let g=new G1(p,_);await E0(s,p);let E=`preview-${Math.random().toString(36).slice(2)}`,y=!0,x=null,w=null,A=!0,k=[],R=!1,
|
|
155
|
+
`,V1=class{constructor(t,n){this.device=t;let r=t.createShaderModule({label:"preview_blit",code:D6});this.pipeline=t.createRenderPipeline({label:"preview_blit",layout:"auto",vertex:{module:r,entryPoint:"vs"},fragment:{module:r,entryPoint:"fs",targets:[{format:n}]},primitive:{topology:"triangle-list"}}),this.sampler=t.createSampler({magFilter:"linear",minFilter:"linear"})}device;pipeline;sampler;bindGroups=new WeakMap;blit(t,n){let r=this.bindGroups.get(t);r||(r=this.device.createBindGroup({layout:this.pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:t.createView()},{binding:1,resource:this.sampler}]}),this.bindGroups.set(t,r));let i=this.device.createCommandEncoder({label:"preview_blit"}),s=i.beginRenderPass({colorAttachments:[{view:n.createView(),loadOp:"clear",storeOp:"store",clearValue:{r:0,g:0,b:0,a:0}}]});s.setPipeline(this.pipeline),s.setBindGroup(0,r),s.draw(3),s.end(),this.device.queue.submit([i.finish()])}};function m9(e,t,n){D.env.FRAMEFIELDS_MODELS_DIR=n.modelsDir,F0(()=>new T0({loader:async()=>{let i=await import(`${n.ortBase}ort.webgpu.bundle.min.mjs`);return i.env.wasm.wasmPaths=n.ortBase,i.env.logLevel="error",n.ortBase.startsWith("/")||(i.env.wasm.numThreads=1),i}}));let r=window.framefieldsPlayer;window.framefieldsPlayer=(async()=>(await r?.then(i=>i.dispose(),()=>{}),U6(e,t,E1)))(),window.dispatchEvent(new Event("framefields:player"))}async function U6(e,t,n){if(!("gpu"in navigator))throw new Error("This browser has no WebGPU. Use a current Chrome, Edge or Safari.");await z1(n);let r=e[t];if(r===void 0)throw new Error(`The preview entry has no export named "${t}".`);let i=typeof r=="function"?await r():r,s=i.toVirtualMediaAsync?await i.toVirtualMediaAsync():i.toVirtualMedia?.();if(!s)throw new Error(`"${t}" is not a composition.`);let d=Math.round(s.metadata?.width??1920),o=Math.round(s.metadata?.height??1080),c=i.fps??s.operation?.fps??30,m=s.metadata?.durationMs??0,u={width:d,height:o,fps:c,durationMs:m,frameCount:Math.max(1,Math.round(m/1e3*c))},l=p4(s,"Vision"),I=s.operation?.dataType==="Video",p=await I1(),_=document.getElementById("canvas")??document.createElement("canvas");_.width=d%2?d+1:d,_.height=o%2?o+1:o;let g=new G1(p,_);await E0(s,p);let E=`preview-${Math.random().toString(36).slice(2)}`,y=!0,x=null,w=null,A=!0,k=[],R=!1,W,U=new Map,H=Math.max(1,Math.min(240,Math.floor(128*1024*1024/Math.max(1,_.width*_.height*4)))),Y=0;function i1(){return p.createTexture({size:[_.width,_.height],format:g.colorFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST,label:"preview_frame_cache"})}function t1(C){if(l)return;let h=U.get(C);if(h)return h.used=++Y,h.tex}function N(C,h){if(l){h.destroy();return}let T=U.get(C);for(T&&(T.tex!==h&&T.tex.destroy(),U.delete(C)),U.set(C,{tex:h,used:++Y});U.size>H;){let G,B=Number.POSITIVE_INFINITY;for(let[J,w1]of U)w1.used<B&&(B=w1.used,G=J);if(G===void 0)break;let q=U.get(G);U.delete(G),q?.tex.destroy()}}async function s1(C,h=!0,T=h){let G=P0(p,g.colorFormat),B={device:p,renderer:G,surface:g},q=g.width,J=g.height,w1={frame:C,compositionFrame:C,fps:c,isHeadless:!1,renderId:E,virtualMedia:s,containerWidth:q,containerHeight:J,isVideoMode:I,forceWait:!0};if(P1(C,c,m||void 0),y||j1.hasPending(p)||M0.hasPending()){y=!1;let H1=p.createCommandEncoder(),_0=G.getTemporaryTexture(q,J),h0=_0.createView();G.beginFrame(H1,h0,{r:0,g:0,b:0,a:0},q,J,"clear").end(),await f1(B,H1,h0,_0,q,J,s,w1),p.queue.submit([H1.finish()]),await j1.awaitAllPending(p)}m4.setState(E,C,c,!0);let x1=p.createCommandEncoder();!h&&!W&&(W=p.createTexture({size:[q,J],format:g.colorFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC,label:"preview_warm_target"}));let W1=h||!W?g.getCurrentTexture():W,u0=W1.createView();G.beginFrame(x1,u0,{r:0,g:0,b:0,a:0},q,J,"clear").end(),await f1(B,x1,u0,W1,q,J,s,w1);let S1;T&&(S1=i1(),x1.copyTextureToTexture({texture:W1},{texture:S1},[q,J])),p.queue.submit([x1.finish()]),h&&g.present(),await p.queue.onSubmittedWorkDone(),S1&&N(C,S1)}function P(){if(R||x||w===null)return;let C;x=new Promise(h=>{C=h}),(async()=>{for(;w!==null;){let h=w,T=A;w=null;let G=performance.now();try{let B=t1(h);B?(O.blit(B,g.getCurrentTexture()),g.present()):await s1(h,!0,T)}catch(B){console.error("[framefields] frame",h,B),V.onFrameError?.(h,B)}if(V.lastRenderMs=performance.now()-G,w===null){let B=k;k=[];for(let q of B)q(h)}}x=null,C()})()}let L=c0(i,c,p,`${E}-audio`),O=new V1(p,g.colorFormat),V={meta:u,canvas:_,lastRenderMs:0,hasVision:l,render(C,h){if(R)return Promise.resolve(C);w=C,A=h?.cache??!0;let T=new Promise(G=>k.push(G));return P(),T},async warm(C){return R||x||w!==null?!1:(x=s1(C,!1).catch(h=>console.warn("[framefields] warm-up of frame",C,h)),await x,x=null,P(),!0)},mixAudio:L,async snapshot(C){if(R)throw new Error("the player was disposed");for(;x;)await x;let h=(async()=>{if(await s1(C,!1),!W)throw new Error("no frame to capture");return O6(p,W)})();x=h.then(()=>{},()=>{});try{return await h}finally{x=null,P()}},async dispose(){if(!R){for(R=!0,w=null;x;)await x;for(let{tex:C}of U.values())C.destroy();U.clear(),W?.destroy(),W=void 0,g.destroy()}}};return V}async function O6(e,t){let{width:n,height:r}=t,i=Math.ceil(n*4/256)*256,s=e.createBuffer({size:i*r,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ}),d=e.createCommandEncoder();d.copyTextureToBuffer({texture:t},{buffer:s,bytesPerRow:i},{width:n,height:r}),e.queue.submit([d.finish()]),await s.mapAsync(GPUMapMode.READ);let o=new Uint8Array(s.getMappedRange()),c=new Uint8ClampedArray(n*r*4),m=t.format.startsWith("bgra");for(let u=0;u<r;u++){let l=o.subarray(u*i,u*i+n*4);c.set(l,u*n*4)}s.unmap(),s.destroy();for(let u=0;u<c.length;u+=4){if(m){let l=c[u];c[u]=c[u+2],c[u+2]=l}c[u+3]=255}return createImageBitmap(new ImageData(c,n,r))}function p4(e,t){return e.operation?.op===t?!0:(e.children??[]).some(n=>p4(n,t))}export{A6 as startAudioMixer,m9 as startPlayer};
|