PageSourceSearch

https://mstudio.ai/build/assets/FilmLookDialog.C-5jROuI.js

js mstudio.ai collected 2026-10-05 12:18:34 UTC 3,932 bytes, 1 lines download raw bytes

1import{r as j}from"./rolldown-runtime.C1f3BsDW.js";import"./inertia.BE4YqsTM.js";import"./http.DWpeO7Ui.js";import{Qr as N,S as Y,Xt as L}from"./icons.ChOq_Y4q.js";import{t as T}from"./react-core.CAMe6Z4j.js";import"./utils.CgzVjNgC.js";import"./state.L8kQliOB.js";import{Tt as n,jt as A,k as y,ut as F}from"./entry-client.DX3aUoe5.js";import"./segmented.DHcH2lTJ.js";import"./input.GzdAc1Aj.js";import"./dist.CoNAZqlp.js";import"./dist.DxccqHSW.js";import"./dist.D4237Rk6.js";import"./dist.BhzTvz6X.js";import"./dist.B-JETxGF.js";import"./dist.zmknLG-d.js";import"./Tooltip.D5vWPvw2.js";import"./es2015.Cr2X04_P.js";import"./dist.DbqQa_sy.js";import{a as O,i as I,n as q,o as M,r as P,t as W}from"./dialog.Bb7MGeDP.js";import"./dist.D4LCotyC.js";import"./dist.C1cc-Zbw.js";import"./select.vYEvBl4E.js";import"./characterMention.DcxgzALo.js";import"./AssetGalleryModal.DteaM05Z.js";import"./imageValidation.BrtKjMLv.js";import"./badge.CK53iWwP.js";import{n as $}from"./locationStore.DwRNJtUf.js";import{t as w}from"./projectStore.B74RetxK.js";import{t as v}from"./filmLookStore.CfGPY-XO.js";import{t as B}from"./LookStep.CIeRezzD.js";var d=j(N(),1),r=j(T(),1),b=(e,m)=>e?.response?.data?.message??m;const wt=({projectUuid:e,aspectRatio:m,onRewritten:C})=>{const h=v(t=>t.open),S=v(t=>t.closeLook),u=w(t=>t.currentProject?.status==="scripting"),[i,f]=(0,d.useState)(null),[s,o]=(0,d.useState)(!1),[k,_]=(0,d.useState)(0),g=!!i&&!i.isCurrent,l=()=>{f(null),S()},x=async(t=i)=>{if(!(!t||t.isCurrent||s)){if(t.instructionsOnly){await D(t);return}if(!u){o(!0);try{await w.getState().generateScript(e,!0,t.body)}catch(c){n.error(b(c,"Could not change the Film look. Try again.")),o(!1);return}$.getState().fetch(e).catch(()=>{}),n.success(`Writing your film again in ${t.name}.`),o(!1),l(),C()}}},D=async t=>{o(!0);let c=!1;try{c=(await F.update(e,{film_instructions:t.body.instructions?.trim()||null})).data?.instructions_refused===!0}catch(p){n.error(b(p,"Could not save your instructions. Try again.")),o(!1);return}if(o(!1),c){n.warning("Your instructions are saved, but your AI Director cannot work with them as written."),_(p=>p+1);return}n.success("Your instructions are saved."),l()},a=!!i?.instructionsOnly;return(0,r.jsx)(W,{open:h,onOpenChange:t=>!t&&!s&&l(),children:(0,r.jsxs)(q,{className:"flex max-h-[calc(100dvh-2rem)] max-w-5xl flex-col gap-0 overflow-hidden p-0 sm:p-0",children:[(0,r.jsxs)(O,{className:"border-b border-border px-6 py-4",children:[(0,r.jsx)(M,{children:"Film look"}),(0,r.jsx)(P,{children:"The colour, light and texture of every shot. Your story and cast stay the same."})]}),(0,r.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-5",children:h&&(0,r.jsx)(B,{projectUuid:e,aspectRatio:m,onChoiceChange:f,onUse:t=>void x(t),using:s,bare:!0},k)}),(0,r.jsxs)(I,{className:"items-center gap-3 border-t border-border px-6 py-4 sm:justify-between",children:[(0,r.jsxs)("p",{className:A("flex items-start gap-2 text-xs leading-relaxed",a?"text-muted-foreground":"text-warning"),children:[!a&&(0,r.jsx)(Y,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{children:a?"Your shots stay as they are. Your AI Director follows your instructions from its next step, and the script the next time it is written.":u?"Your film is being written. Change the look when it is done.":"A new look writes every shot again and draws your film sets again. Your film as it is now, with its pictures and clips, is saved in Versions first, so you can bring it back."})]}),(0,r.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,r.jsx)(y,{type:"button",variant:"outline",onClick:l,disabled:s,children:"Cancel"}),(0,r.jsxs)(y,{type:"button",onClick:()=>void x(),disabled:!g||s||u&&!a,"data-look-apply":!0,children:[s&&(0,r.jsx)(L,{className:"h-4 w-4 animate-spin"}),a?"Save instructions":g?`Use ${i.name} and rewrite`:"Choose a new look"]})]})]})]})})};export{wt as FilmLookDialog};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.