PageSourceSearch

https://brickfilms.com/assets/EditBrickfilm-CSSgMNu6.js

js brickfilms.com collected 2026-09-24 09:24:47 UTC 22,643 bytes, 123 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./jsx-runtime-Bbmj7Sro.js";import{t as n}from"./react-C21x__mS.js";import{t as r}from"./withTranslation-B3sbfl5p.js";import{d as i,p as a}from"./chunk-BV7QT456-CmTLkSzp.js";import{$n as o,It as s,Zt as c,dr as l,or as u,rr as d,vn as f}from"./pro-solid-svg-icons-fwFcmN_U.js";import{t as p}from"./Loader-DkObBfvq.js";import{Q as m,a as h,dt as g,ft as _,g as v,h as y,ot as b,rt as x,s as ee,st as S,t as C,tt as w,u as T}from"./index-_WGeRyKy.js";import{t as E}from"./Card-Btw4zJWl.js";import{t as D}from"./useLayoutUpdate-hY0ArPJ-.js";import{t as O}from"./ErrorPage-9VZlwQfC.js";import{t as te}from"./Editor-C4KLBuhX.js";import{t as k}from"./Input-BxDB3KTF.js";import{t as A}from"./FormGrid-BDifxQPZ.js";import{t as j}from"./FormGroup-DYhG67Gb.js";import{t as M}from"./Select-CN5Z9-5h.js";import{t as N}from"./Switch-xji8DAZr.js";import{t as P}from"./SideViewContainer-gqen1DPS.js";import{t as F}from"./BBcodeFragment-D_Sb3NKB.js";import{t as ne}from"./brickfilms-buPKSlWm.js";import{t as re}from"./UploadInput-QlDmYku_.js";import{n as I}from"./LinkInput-jZfyuynb.js";import{t as ie}from"./List-B--6-xvx.js";import{n as ae,t as oe}from"./TeamForm-BdshM6vU.js";var se=y(),L=e(n()),R=t(),z=`RIGHT`,B=r()(({t:e,brickfilm:t={title:``,type:`FILM`,description:``,language:x(),isAbandoned:!1,isArchived:!1,isRecommended:!1,isFilmOfTheWeek:!1,isFilmOfTheMonth:!1,isSponsored:!1,allowedToReuse:!0,containsExplicitContent:!1,picturePath:``},onSubmit:n=()=>{},loading:r=!1,buttonLabel:i})=>{var a,d,p;let g=ee({mode:`all`,defaultValues:{...(0,se.pick)(t,[`title`,`type`,`description`,`language`,`isAbandoned`,`isRecommended`,`isFilmOfTheWeek`,`isFilmOfTheMonth`,`isSponsored`,`allowedToReuse`,`containsExplicitContent`,`picturePath`,`videoLinks`,`teaserLinks`,`isArchived`,`includesPeter`]),type:t==null||(a=t.type)==null?void 0:a.replaceAll(`PROJECT`,`FILM`),makingOf:t==null||(d=t.makingOf)==null?void 0:d.value,castMembers:t==null?void 0:t.castMembers.map(e=>({id:e.id,user:{member:e.member,memberName:e.memberName},role:e.role,additionnalInformation:e.additionnalInformation})),productionNotes:t==null||(p=t.productionNotes)==null?void 0:p.map(e=>({id:e.id,content:e.content.value,createdAt:e.createdAt}))}}),_=(0,L.useRef)(null),[v,y]=(0,L.useState)(!1),[b,T]=(0,L.useState)(!1),[D,O]=(0,L.useState)(0),{watch:F,register:B,handleSubmit:V,control:H,formState:{errors:U,isDirty:W,isValid:G}}=g,K=[`EDIT_BRICKFILM_OF_THE_MONTH`,`EDIT_BRICKFILM_OF_THE_WEEK`,`EDIT_RECOMMENDED_BRICKFILM`,`EDIT_SPONSORED_BRICKFILM`,`EDIT_PETER_STATUS`].some(e=>t.allowedActions.includes(e)),q=[{value:`FILM`,label:e(`Brickfilm`)},{value:`TEST`,label:e(`Animation test`)}],J=ne(e),ce=Object.keys(J).map(e=>({value:e,label:J[e]})),Y=e(`Required field`),X={title:B(`title`,{required:Y,minLength:{value:3,message:e(`The title need to be at least 3 characters long`)}}),type:B(`type`,{required:Y}),language:B(`language`,{required:Y}),description:B(`description`),isAbandoned:B(`isAbandoned`),isRecommended:B(`isRecommended`),isFilmOfTheWeek:B(`isFilmOfTheWeek`),isFilmOfTheMonth:B(`isFilmOfTheMonth`),isArchived:B(`isArchived`),isSponsored:B(`isSponsored`),allowedToReuse:B(`allowedToReuse`),containsExplicitContent:B(`containsExplicitContent`),picturePath:B(`picturePath`),videoLinks:B(`videoLinks`),teaserLinks:B(`teaserLinks`),makingOf:B(`makingOf`),castMembers:B(`castMembers`),productionNotes:B(`productionNotes`),includesPeter:B(`includesPeter`)},le=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C,{h:1,children:e(`Edit general information`)}),(0,R.jsxs)(A,{children:[(0,R.jsx)(j,{label:e(`Title`),id:`title`,error:U.title,required:!0,children:(0,R.jsx)(k,{id:`title`,register:X.title})}),(0,R.jsx)(j,{label:e(`Language`),id:`language`,error:U.language,required:!0,children:(0,R.jsx)(M,{control:H,options:w(),register:X.language})}),(0,R.jsx)(j,{label:e(`Type`),id:`type`,error:U.type,required:!0,children:(0,R.jsx)(M,{control:H,options:q,register:X.type})}),(0,R.jsx)(j,{label:e(`This brickfilm is private`),id:`isArchived`,error:U.isArchived,children:(0,R.jsx)(N,{id:`isArchived`,register:X.isArchived})})]}),(0,R.jsx)(j,{label:e(`Description`),id:`description`,error:U.description,required:!0,children:(0,R.jsx)(k,{type:`TEXT`,
1id:`description`,register:X.description})}),(0,R.jsxs)(A,{children:[(0,R.jsx)(j,{label:e(`This brickfilm is abandoned`),id:`isAbandoned`,error:U.isAbandoned,children:(0,R.jsx)(N,{id:`isAbandoned`,register:X.isAbandoned})}),(0,R.jsx)(j,{label:F(`type`)===`FILM`?e(`Allow Brickfilms.com to use this film during events or for the site promotion`):e(`Allow Brickfilms.com to use this animation test during events or for the site promotion`),id:`allowedToReuse`,error:U.allowedToReuse,children:(0,R.jsx)(N,{id:`allowedToReuse`,register:X.allowedToReuse})})]}),(0,R.jsx)(j,{label:e(`Thumbnail`),children:(0,R.jsx)(re,{control:H,register:X.picturePath,type:`THUMBNAIL_BRICKFILM`})})]}),ue=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C,{h:1,children:e(`Admin area`)}),(0,R.jsxs)(A,{children:[t.allowedActions.includes(`EDIT_RECOMMENDED_BRICKFILM`)&&(0,R.jsx)(j,{label:e(`Recommended (Can send a notification)`),id:`isRecommended`,error:U.isRecommended,children:(0,R.jsx)(N,{id:`isRecommended`,register:X.isRecommended})}),t.allowedActions.includes(`EDIT_BRICKFILM_OF_THE_WEEK`)&&(0,R.jsx)(j,{label:e(`Brickfilm of the week (Can send a notification)`),id:`isFilmOfTheWeek`,error:U.isFilmOfTheWeek,children:(0,R.jsx)(N,{id:`isFilmOfTheWeek`,register:X.isFilmOfTheWeek})}),t.allowedActions.includes(`EDIT_BRICKFILM_OF_THE_MONTH`)&&(0,R.jsx)(j,{label:e(`Brickfilm of the month (Can send a notification)`),id:`isFilmOfTheMonth`,error:U.isFilmOfTheMonth,children:(0,R.jsx)(N,{id:`isFilmOfTheMonth`,register:X.isFilmOfTheMonth})}),t.allowedActions.includes(`EDIT_SPONSORED_BRICKFILM`)&&(0,R.jsx)(j,{label:e(`Sponsored by LEGO`),id:`isSponsored`,error:U.isSponsored,children:(0,R.jsx)(N,{id:`isSponsored`,register:X.isSponsored})}),t.allowedActions.includes(`EDIT_PETER_STATUS`)&&(0,R.jsx)(j,{label:e(`This brickfilm includes Peter Valerius`),id:`includesPeter`,error:U.includesPeter,children:(0,R.jsx)(N,{id:`includesPeter`,register:X.includesPeter})})]})]}),de=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C,{h:1,children:e(`Edit the making-of`)}),(0,R.jsx)(j,{label:e(`Making-of`),id:`makingOf`,error:U.makingOf,children:(0,R.jsx)(te,{ref:_,control:H,placeholder:e(`Write your making-of…`),t:e,register:X.makingOf,onUploadStatusChange:y})})]}),Z=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C,{h:1,children:e(`Edit the broadcast`)}),(0,R.jsx)(j,{label:e(`Brickfilm links`),id:`videoLinks`,error:U.videoLinks,children:(0,R.jsx)(I,{name:`videoLinks`})}),(0,R.jsx)(j,{label:e(`Teaser links`),id:`teaserLinks`,error:U.teaserLinks,children:(0,R.jsx)(I,{name:`teaserLinks`})}),(0,R.jsx)(A,{children:(0,R.jsx)(j,{label:e(`This film contains content not suitable for a young audience`),id:`containsExplicitContent`,error:U.containsExplicitContent,children:(0,R.jsx)(N,{id:`containsExplicitContent`,register:X.containsExplicitContent})})})]}),fe=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C,{h:1,children:e(`Edit production notes`)}),(0,R.jsx)(ae,{name:`productionNotes`,order:`DESC`,tAdd:e(`Add the note`),tRemove:e(`Remove this note`),tPlaceholder:e(`Write your production note…`),hideInput:!0,onUploadStatusChange:T})]}),pe=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C,{h:1,children:e(`Edit the crew team`)}),(0,R.jsx)(j,{label:e(`Crew team`),id:`castMembers`,error:U.castMembers,children:(0,R.jsx)(oe,{control:H,roles:ce,name:`castMembers`})})]}),Q=[{id:`general`,title:e(`General`),color:``,icon:s,selected:!0,form:le},{id:`production`,title:e(`Production`),color:``,icon:f,form:fe},{id:`makingof`,title:e(`Making-of`),color:``,icon:o,form:de},{id:`crewteam`,title:e(`Crew team`),color:``,icon:l,form:pe},{id:`watch`,title:e(`Watch`),color:``,icon:u,form:Z},...K?[{id:`admin`,title:e(`Admin`),color:``,icon:c,form:ue}]:[]],$=Q[D];return(0,R.jsx)(P,{sideSize:`SMALL`,sideChildren:(0,R.jsx)(ie,{selectedIndex:D,list:Q,onChangeSelected:(e,t)=>O(t)}),reverse:!0,children:(0,R.jsx)(E,{children:(0,R.jsx)(h,{...g,children:(0,R.jsxs)(`form`,{id:`brickfilm`,children:[(0,R.jsx)(L.Fragment,{children:$==null?void 0:$.form},$.id),(0,R.jsx)(m,{position:z,children:(0,R.jsx)(S,{action:V(n),disabled:!W||!G||v||b,loading:r,type:`submit`,form:`brickfilm`,label:i})})]})})})})}),V=`#import "../../fragments/UserFragment.graphql"
2#import "../../fragments/BBcodeFragment.graphql"
3
4mutation EditBrickfilmMutation($input: EditBrickfilmInput!) {
5  editBrickfilm(input: $input) {
6    brickfilm {
7      id
8      title
9      description
10      type
11      language
12      slug
13      runtime
14      containsExplicitContent
15      picture
16      isArchived
17      picturePath
18      isAbandoned
19      containsExplicitContent
20      allowedToReuse
21      isUnavailable
22      videoLinks: links(isEditable: true, kind: FILM) {
23        id
24        link
25        type
26        reference
27      }
28      teaserLinks: links(isEditable: true, kind: TEASER) {
29        id
30        link
31        type
32        reference
33      }
34
35      castMembers {
36        id
37        role
38        additionnalInformation
39        memberName
40        member {
41          ...UserFragment
42        }
43      }
44      productionNotes {
45        id
46        createdAt
47        content {
48          ...BBcodeFragment
49        }
50      }
51      makingOf {
52        ...BBcodeFragment
53      }
54      allowedActions
55    }
56  }
57}`,H={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`mutation`,name:{kind:`N
57ame`,value:`EditBrickfilmMutation`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`EditBrickfilmInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`editBrickfilm`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`brickfilm`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`description`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`slug`}},{kind:`Field`,name:{kind:`Name`,value:`runtime`}},{kind:`Field`,name:{kind:`Name`,value:`containsExplicitContent`}},{kind:`Field`,name:{kind:`Name`,value:`picture`}},{kind:`Field`,name:{kind:`Name`,value:`isArchived`}},{kind:`Field`,name:{kind:`Name`,value:`picturePath`}},{kind:`Field`,name:{kind:`Name`,value:`isAbandoned`}},{kind:`Field`,name:{kind:`Name`,value:`containsExplicitContent`}},{kind:`Field`,name:{kind:`Name`,value:`allowedToReuse`}},{kind:`Field`,name:{kind:`Name`,value:`isUnavailable`}},{kind:`Field`,alias:{kind:`Name`,value:`videoLinks`},name:{kind:`Name`,value:`links`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`isEditable`},value:{kind:`BooleanValue`,value:!0}},{kind:`Argument`,name:{kind:`Name`,value:`kind`},value:{kind:`EnumValue`,value:`FILM`}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`link`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`reference`}}]}},{kind:`Field`,alias:{kind:`Name`,value:`teaserLinks`},name:{kind:`Name`,value:`links`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`isEditable`},value:{kind:`BooleanValue`,value:!0}},{kind:`Argument`,name:{kind:`Name`,value:`kind`},value:{kind:`EnumValue`,value:`TEASER`}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`link`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`reference`}}]}},{kind:`Field`,name:{kind:`Name`,value:`castMembers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`role`}},{kind:`Field`,name:{kind:`Name`,value:`additionnalInformation`}},{kind:`Field`,name:{kind:`Name`,value:`memberName`}},{kind:`Field`,name:{kind:`Name`,value:`member`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`UserFragment`}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`productionNotes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`createdAt`}},{kind:`Field`,name:{kind:`Name`,value:`content`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`BBcodeFragment`}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`makingOf`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`BBcodeFragment`}}]}},{kind:`Field`,name:{kind:`Name`,value:`allowedActions`}}]}}]}}]}}],loc:{start:0,end:1101}};H.loc.source={name:`GraphQL request`,locationOffset:{line:1,column:1}},H.loc.source.body=V;var U=e=>{let t=Object.create(null);return e.filter(function(e){if(e.kind!==`FragmentDefinition`)return!0;let n=e.name.value;return!t[n]&&(t[n]=!0,!0)})};H.definitions=U(H.definitions.concat(T.definitions)),H.definitions=U(H.definitions.concat(F.definitions)),((e,t)=>{let n=(e,t)=>{if(e.kind===`FragmentSpread`)t.add(e.name.value);else if(e.kind===`VariableDefinition`){let n=e.type;n.kind===`NamedType`&&t.add(n.name.value)}return e&&`selectionSet`in e&&e.selectionSet&&e.selectionSet.selections.forEach(e
57=>{n(e,t)}),e&&`variableDefinitions`in e&&e.variableDefinitions&&e.variableDefinitions.forEach(e=>{n(e,t)}),e&&`definitions`in e&&e.definitions&&e.definitions.forEach(e=>{n(e,t)}),t},r=e=>{let t=Object.create(null);return e.definitions.forEach(function(e){`name`in e&&e.name&&(t[e.name.value]=n(e,new Set))}),t},i=(e,t)=>{for(let n=0;n<e.definitions.length;n++){let r=e.definitions[n];if(r&&`name`in r&&r.name&&r.name.value===t)return r}},a=r(e),o=i(e,t);if(!o)throw Error(`vite-plugin-graphql-loader: operation "${t}" not found in document`);let s=Object.assign({},e,{definitions:[o]}),c=a[t]||new Set,l=new Set,u=new Set;for(c.forEach(e=>{u.add(e)});u.size>0;){let e=u;u=new Set,e.forEach(e=>{l.has(e)||(l.add(e),(a[e]||new Set).forEach(e=>{u.add(e)}))})}return l.forEach(t=>{let n=i(e,t);n&&s.definitions.push(n)}),s})(H,`EditBrickfilmMutation`);var W=`#import "../../fragments/UserFragment.graphql"
58#import "../../fragments/BBcodeFragment.graphql"
59
60query GetBrickfilmQuery($id: ID!) {
61  node(id: $id) {
62    id
63    ... on Brickfilm {
64      author {
65        ...UserFragment
66      }
67      title
68      description
69      type
70      language
71      slug
72      runtime
73      includesPeter
74      containsExplicitContent
75      picture
76      isArchived
77      isFilmOfTheMonth
78      isFilmOfTheWeek
79      isSponsored
80      isRecommended
81      picturePath
82      isAbandoned
83      containsExplicitContent
84      allowedToReuse
85      isUnavailable
86      videoLinks: links(isEditable: true, kind: FILM) {
87        id
88        link
89        type
90        reference
91      }
92      teaserLinks: links(isEditable: true, kind: TEASER) {
93        id
94        link
95        type
96        reference
97      }
98
99      castMembers {
100        id
101        role
102        additionnalInformation
103        memberName
104        member {
105          ...UserFragment
106        }
107      }
108      productionNotes {
109        id
110        createdAt
111        content {
112          ...BBcodeFragment
113        }
114      }
115      makingOf {
116        ...BBcodeFragment
117      }
118      allowedActions
119    }
120  }
121}
122`,G={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`query`,name:{kind:`Name`,value:`GetBrickfilmQuery`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`id`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`ID`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`node`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`id`},value:{kind:`Variable`,name:{kind:`Name`,value:`id`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`InlineFragment`,typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Brickfilm`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`author`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`UserFragment`}}]}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`description`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`slug`}},{kind:`Field`,name:{kind:`Name`,value:`runtime`}},{kind:`Field`,name:{kind:`Name`,value:`includesPeter`}},{kind:`Field`,name:{kind:`Name`,value:`containsExplicitContent`}},{kind:`Field`,name:{kind:`Name`,value:`picture`}},{kind:`Field`,name:{kind:`Name`,value:`isArchived`}},{kind:`Field`,name:{kind:`Name`,value:`isFilmOfTheMonth`}},{kind:`Field`,name:{kind:`Name`,value:`isFilmOfTheWeek`}},{kind:`Field`,name:{kind:`Name`,value:`isSponsored`}},{kind:`Field`,name:{kind:`Name`,value:`isRecommended`}},{kind:`Field`,name:{kind:`Name`,value:`picturePath`}},{kind:`Field`,name:{kind:`Name`,value:`isAbandoned`}},{kind:`Field`,name:{kind:`Name`,value:`containsExplicitContent`}},{kind:`Field`,name:{kind:`Name`,value:`allowedToReuse`}},{kind:`Field`,name:{kind:`Name`,value:`isUnavailable`}},{kind:`Field`,alias:{kind:`Name`,value:`videoLinks`},name:{kind:`Name`,value:`links`}
122,arguments:[{kind:`Argument`,name:{kind:`Name`,value:`isEditable`},value:{kind:`BooleanValue`,value:!0}},{kind:`Argument`,name:{kind:`Name`,value:`kind`},value:{kind:`EnumValue`,value:`FILM`}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`link`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`reference`}}]}},{kind:`Field`,alias:{kind:`Name`,value:`teaserLinks`},name:{kind:`Name`,value:`links`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`isEditable`},value:{kind:`BooleanValue`,value:!0}},{kind:`Argument`,name:{kind:`Name`,value:`kind`},value:{kind:`EnumValue`,value:`TEASER`}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`link`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`reference`}}]}},{kind:`Field`,name:{kind:`Name`,value:`castMembers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`role`}},{kind:`Field`,name:{kind:`Name`,value:`additionnalInformation`}},{kind:`Field`,name:{kind:`Name`,value:`memberName`}},{kind:`Field`,name:{kind:`Name`,value:`member`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`UserFragment`}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`productionNotes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`createdAt`}},{kind:`Field`,name:{kind:`Name`,value:`content`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`BBcodeFragment`}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`makingOf`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`BBcodeFragment`}}]}},{kind:`Field`,name:{kind:`Name`,value:`allowedActions`}}]}}]}}]}}],loc:{start:0,end:1216}};G.loc.source={name:`GraphQL request`,locationOffset:{line:1,column:1}},G.loc.source.body=W;var K=e=>{let t=Object.create(null);return e.filter(function(e){if(e.kind!==`FragmentDefinition`)return!0;let n=e.name.value;return!t[n]&&(t[n]=!0,!0)})};G.definitions=K(G.definitions.concat(T.definitions)),G.definitions=K(G.definitions.concat(F.definitions)),((e,t)=>{let n=(e,t)=>{if(e.kind===`FragmentSpread`)t.add(e.name.value);else if(e.kind===`VariableDefinition`){let n=e.type;n.kind===`NamedType`&&t.add(n.name.value)}return e&&`selectionSet`in e&&e.selectionSet&&e.selectionSet.selections.forEach(e=>{n(e,t)}),e&&`variableDefinitions`in e&&e.variableDefinitions&&e.variableDefinitions.forEach(e=>{n(e,t)}),e&&`definitions`in e&&e.definitions&&e.definitions.forEach(e=>{n(e,t)}),t},r=e=>{let t=Object.create(null);return e.definitions.forEach(function(e){`name`in e&&e.name&&(t[e.name.value]=n(e,new Set))}),t},i=(e,t)=>{for(let n=0;n<e.definitions.length;n++){let r=e.definitions[n];if(r&&`name`in r&&r.name&&r.name.value===t)return r}},a=r(e),o=i(e,t);if(!o)throw Error(`vite-plugin-graphql-loader: operation "${t}" not found in document`);let s=Object.assign({},e,{definitions:[o]}),c=a[t]||new Set,l=new Set,u=new Set;for(c.forEach(e=>{u.add(e)});u.size>0;){let e=u;u=new Set,e.forEach(e=>{l.has(e)||(l.add(e),(a[e]||new Set).forEach(e=>{u.add(e)}))})}return l.forEach(t=>{let n=i(e,t);n&&s.definitions.push(n)}),s})(G,`GetBrickfilmQuery`);var q=({t:e})=>{let{id:t}=a(),n=i(),{user:r}=v(),[o,{loading:s}]=_(H),{loading:c,error:l,data:u}=g(G,{variables:{id:t}}),f=u==null?void 0:u.node;return D({title:e(`Edit a brickfilm`),history:[{title:e(`Brickfilms`),action:`/brickfilms/`},...f?[{title:f.title,action:`/brickfilms/${f.id}/${f.slug}`},{title:e(`Edit`)}]:[]]}),c?(0,R.jsx)(p,{}):l?(0,R.jsx)(b,{icon:d,message:e(`An error occurred while loading the brickfilm.`)}):f?(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(B,{user:r,brickfilm:f,onSubmit:async e=>{var r;let i=await o({variables:{input:{...e,picturePath:e.picturePath||``,videoLinks:e.videoLinks.map(e=>e.link),teaserLinks:e.teaserLinks.map(e=>e.link),productionNotes:e.productionNotes.map(e=>({id:e.id,content:e.content})).filter(e=>!!e.content),castMembers:e.castMembers.map(e=>{var t,n;return{memberId:(e==null||(t=e.user)==null||(t=t.member)==null?void 0:t.id)||null,memberName:(e==null||(n=e.user)==null?void 0:n.memberName)||``,role:e.role,additionnalInformation:e.additionnalInformation}}),id:void 0,brickfilmId:t}}});if(i!=null&&(r=i.data)!=null&&(r=r.editBrickfilm)!=null&&(r=r.brickfilm)!=null&&r.id){let e=i.data.editBrickfilm.brickfilm;n(`/brickfilms/${e.id}/${e.slug}`)}}
122,loading:s,buttonLabel:e(`Save`)})}):(0,R.jsx)(O,{type:`not-found`})},J=r()(q);export{q as EditBrickfilmView,J as default};
123//# sourceMappingURL=EditBrickfilm-CSSgMNu6.js.map

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.