module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},650645,a=>{a.n(a.i(827572))},923576,a=>{a.n(a.i(104858))},517537,a=>{a.n(a.i(903363))},13718,a=>{a.n(a.i(685523))},118198,a=>{a.n(a.i(545518))},262212,a=>{a.n(a.i(866114))},318173,a=>{a.n(a.i(454309))},140625,a=>{a.n(a.i(119285))},479e3,a=>{a.n(a.i(581901))},533500,a=>a.a(async(b,c)=>{try{var d=a.i(766518),e=b([d]);[d]=e.then?(await e)():e;let l={authors:{include:{author:!0},orderBy:{sortOrder:"asc"}}};async function f(){return d.prisma.publication.findMany({include:l,orderBy:{createdAt:"desc"}})}async function g(a){return d.prisma.publication.findUnique({where:{id:a},include:l})}async function h(){return d.prisma.publication.findMany({where:{status:"PUBLISHED"},include:l,orderBy:{publishedDate:"desc"}})}async function i(a){return d.prisma.publication.findFirst({where:{slug:a,status:"PUBLISHED"},include:l})}async function j(){return d.prisma.publicationAuthor.findMany({orderBy:{name:"asc"},include:{publications:{include:{publication:{select:{id:!0,title:!0}}}}}})}async function k(a){return d.prisma.publicationAuthor.findUnique({where:{id:a}})}a.s(["getPublicationAuthorById",()=>k,"getPublicationAuthors",()=>j,"getPublicationById",()=>g,"getPublications",()=>f,"getPublishedPublicationBySlug",()=>i,"getPublishedPublications",()=>h]),c()}catch(a){c(a)}},!1),691429,a=>{"use strict";a.s(["AuthorForm",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call AuthorForm() from the server but AuthorForm is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(admin)/admin/publications/authors/_components/AuthorForm.tsx <module evaluation>","AuthorForm")},312705,a=>{"use strict";a.s(["AuthorForm",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call AuthorForm() from the server but AuthorForm is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(admin)/admin/publications/authors/_components/AuthorForm.tsx","AuthorForm")},578889,a=>{"use strict";a.i(691429);var b=a.i(312705);a.n(b)},357014,a=>a.a(async(b,c)=>{try{var d=a.i(907997);a.i(570396);var e=a.i(673727),f=a.i(109307),g=a.i(451569),h=a.i(533500),i=a.i(578889),j=b([f,h]);async function k({params:a}){let b=await (0,f.auth)();b?.user||(0,e.redirect)("/admin/login");let c=b.user.role;(0,g.hasPermission)(c,"publications.edit")||(0,e.redirect)("/admin/publications/authors");let{id:j}=await a,k=await (0,h.getPublicationAuthorById)(j);k||(0,e.notFound)();let l={name:k.name,title:k.title??void 0,bio:k.bio??void 0,avatar:k.avatar??void 0,institution:k.institution??void 0,email:k.email??void 0,linkedinUrl:k.linkedinUrl??void 0};return(0,d.jsx)(i.AuthorForm,{authorId:j,defaultValues:l})}[f,h]=j.then?(await j)():j,a.s(["default",()=>k]),c()}catch(a){c(a)}},!1)];

//# sourceMappingURL=%5Broot-of-the-server%5D__d8c4fe33._.js.map