Files
plume/.next/server/chunks/ssr/[root-of-the-server]__540aea7d._.js

3 lines
13 KiB
JavaScript

module.exports=[79080,a=>{"use strict";let b=(0,a.i(29892).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);a.s(["Loader2",()=>b],79080)},73258,a=>{"use strict";let b=(0,a.i(29892).default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);a.s(["BookOpen",()=>b],73258)},806,a=>{"use strict";let b=(0,a.i(29892).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);a.s(["Sparkles",()=>b],806)},40400,a=>{"use strict";let b=(0,a.i(29892).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);a.s(["X",()=>b],40400)},20769,a=>{"use strict";let b=(0,a.i(29892).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);a.s(["Settings",()=>b],20769)},82772,a=>{"use strict";let b=(0,a.i(29892).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);a.s(["User",()=>b],82772)},75108,a=>{"use strict";let b=(0,a.i(29892).default)("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);a.s(["Layout",()=>b],75108)},45044,76763,a=>{"use strict";var b=a.i(29892);let c=(0,b.default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);a.s(["RefreshCw",()=>c],45044);let d=(0,b.default)("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);a.s(["MousePointerClick",()=>d],76763)},63287,a=>{"use strict";let b=(0,a.i(29892).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",()=>b],63287)},95556,27197,a=>{"use strict";var b=a.i(29892);let c=(0,b.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);a.s(["Globe",()=>c],95556);let d=(0,b.default)("git-graph",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v6",key:"158jrl"}],["circle",{cx:"5",cy:"18",r:"3",key:"104gr9"}],["path",{d:"M12 3v18",key:"108xh3"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}],["path",{d:"M16 15.7A9 9 0 0 0 19 9",key:"1e3vqb"}]]);a.s(["GitGraph",()=>d],27197)},46451,a=>{"use strict";let b=(0,a.i(29892).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);a.s(["Trash2",()=>b],46451)},33782,a=>{"use strict";let b=(0,a.i(29892).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);a.s(["Plus",()=>b],33782)},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},97442,(a,b,c)=>{"use strict";b.exports=a.r(23642).vendored.contexts.AppRouterContext},42481,(a,b,c)=>{"use strict";b.exports=a.r(23642).vendored.contexts.HooksClientContext},70676,(a,b,c)=>{"use strict";b.exports=a.r(23642).vendored.contexts.ServerInsertedHtml},29892,a=>{"use strict";var b=a.i(28091);let c=(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim(),d=a=>{let b=a.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,b,c)=>c?c.toUpperCase():b.toLowerCase());return b.charAt(0).toUpperCase()+b.slice(1)};var e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let f=(0,b.forwardRef)(({color:a="currentColor",size:d=24,strokeWidth:f=2,absoluteStrokeWidth:g,className:h="",children:i,iconNode:j,...k},l)=>(0,b.createElement)("svg",{ref:l,...e,width:d,height:d,stroke:a,strokeWidth:g?24*Number(f)/Number(d):f,className:c("lucide",h),...!i&&!(a=>{for(let b in a)if(b.startsWith("aria-")||"role"===b||"title"===b)return!0;return!1})(k)&&{"aria-hidden":"true"},...k},[...j.map(([a,c])=>(0,b.createElement)(a,c)),...Array.isArray(i)?i:[i]])),g=(a,e)=>{let g=(0,b.forwardRef)(({className:g,...h},i)=>(0,b.createElement)(f,{ref:i,iconNode:e,className:c(`lucide-${d(a).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,g),...h}));return g.displayName=d(a),g};a.s(["default",()=>g],29892)},37620,a=>{"use strict";var b,c=((b={}).CHARACTER="Personnage",b.LOCATION="Lieu",b.OBJECT="Objet",b.NOTE="Note",b);a.s(["EntityType",()=>c])},72071,a=>{"use strict";let b=(0,a.i(29892).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);a.s(["Zap",()=>b],72071)},6111,a=>{"use strict";let b=(0,a.i(29892).default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);a.s(["MessageCircle",()=>b],6111)},14294,a=>{"use strict";let b=(0,a.i(29892).default)("book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);a.s(["Book",()=>b],14294)},3622,68239,a=>{"use strict";var b=a.i(28091),c=a.i(31715),d=a.i(37620);let e="Nouveau Roman",f="Auteur Inconnu",g={id:"chap-1",title:"Chapitre 1",content:"<p>Il était une fois...</p>",summary:"Début de l'histoire."},h={[d.EntityType.CHARACTER]:"👤",[d.EntityType.LOCATION]:"🏰",[d.EntityType.OBJECT]:"🗝️",[d.EntityType.NOTE]:"📝"},i={[d.EntityType.CHARACTER]:"bg-blue-100 text-blue-800 border-blue-200",[d.EntityType.LOCATION]:"bg-green-100 text-green-800 border-green-200",[d.EntityType.OBJECT]:"bg-amber-100 text-amber-800 border-amber-200",[d.EntityType.NOTE]:"bg-gray-100 text-gray-800 border-gray-200"};a.s(["ARCHETYPES",0,["Le Héros","L'Ombre / Le Méchant","Le Mentor","Le Gardien du Seuil","Le Shapeshifter (Changeforme)","Le Trickster (Farceur)","L'Allié","L'Élu","Le Rebelle","Le Séducteur","Le Sage","Le Guerrier","L'Innocent"],"DEFAULT_AUTHOR",0,f,"DEFAULT_BOOK_TITLE",0,e,"ENTITY_COLORS",0,i,"ENTITY_ICONS",0,h,"EYE_COLORS",0,["Marron","Bleu","Vert","Noisette","Gris","Noir","Vairons","Ambre"],"GENRES",0,["Fantasy","Science-Fiction","Thriller / Polar","Romance","Historique","Horreur","Aventure","Contemporain","Jeunesse / Young Adult","Dystopie"],"HAIR_COLORS",0,["Brun","Noir","Blond","Roux","Auburn","Gris","Blanc","Châtain","Chauve","Teinture (Bleu/Rose/Etc)"],"INITIAL_CHAPTER",0,g,"POV_OPTIONS",0,["1ère personne (Je)","3ème personne (Limitée au protagoniste)","3ème personne (Omnisciente)","Multi-points de vue (Alterné)"],"TENSE_OPTIONS",0,["Passé (Passé simple / Imparfait)","Présent de narration"],"TONES",0,["Sombre & Sérieux","Léger & Humoristique","Épique & Grandiose","Mélancolique","Mystérieux","Optimiste","Cynique","Romantique"]],68239),a.s(["useProjects",0,a=>{let[d,h]=(0,b.useState)([]),[i,j]=(0,b.useState)(null),[k,l]=(0,b.useState)(!1);(0,b.useEffect)(()=>{a?(async()=>{l(!0);try{let a=(await c.default.projects.list()||[]).map(a=>({id:a.id,title:a.title,author:a.author,lastModified:new Date(a.updatedAt).getTime(),chapters:[],entities:[],ideas:[],settings:a.settings||void 0}));h(a)}catch(a){console.error("Failed to load projects",a)}finally{l(!1)}})():h([])},[a]),(0,b.useEffect)(()=>{i&&(async()=>{try{let a=await c.default.projects.get(i),b={id:a.id,title:a.title,author:a.author,lastModified:new Date(a.updatedAt).getTime(),settings:a.settings||void 0,styleGuide:a.styleGuide||void 0,chapters:(a.chapters||[]).map(a=>({id:a.id,title:a.title,content:a.content,summary:a.summary})),entities:(a.entities||[]).map(a=>({id:a.id,type:a.type,name:a.name,description:a.description,details:a.details,storyContext:a.storyContext,attributes:a.attributes,customValues:a.customValues})),ideas:(a.ideas||[]).map(a=>({id:a.id,title:a.title,description:a.description,status:a.status,category:a.category,createdAt:new Date(a.createdAt).getTime()})),workflow:{nodes:(a.plotNodes||[]).map(a=>({id:a.id,x:a.x,y:a.y,title:a.title,description:a.description,color:a.color,type:a.type})),connections:(a.plotConnections||[]).map(a=>({id:a.id,source:a.source,target:a.target}))}};h(a=>a.map(a=>a.id===i?b:a))}catch(a){console.error("Failed to load project details",a)}})()},[i]);let m=async(a,b)=>{try{let d=await c.default.chapters.create({projectId:a,title:b.title||"New Chapter",content:b.content||"",summary:b.summary||void 0});return h(b=>b.map(b=>b.id!==a?b:{...b,chapters:[...b.chapters,{id:d.id,title:d.title,content:d.content,summary:d.summary}]})),d.id}catch(a){return console.error("Failed to add chapter",a),null}};return{projects:d,currentProjectId:i,setCurrentProjectId:j,createProject:async()=>{if(a)try{let b=await c.default.projects.create({title:e,author:a.name||f,settings:{genre:"Fantasy",targetAudience:"Adult",tone:"Epic"}}),d={id:b.id,title:b.title,author:b.author,lastModified:Date.now(),chapters:[],entities:[],ideas:[],settings:b.settings};return h(a=>[...a,d]),await m(b.id,g),b.id}catch(a){console.error("Failed to create project",a)}},updateProject:async(a,b)=>{h(c=>c.map(c=>c.id===a?{...c,...b}:c));try{let d={};void 0!==b.title&&(d.title=b.title),void 0!==b.author&&(d.author=b.author),void 0!==b.settings&&(d.settings=b.settings),void 0!==b.styleGuide&&(d.styleGuide=b.styleGuide),await c.default.projects.update(a,d)}catch(a){console.error("Failed to update project",a)}},addChapter:m,updateChapter:async(a,b,d)=>{h(c=>c.map(c=>c.id!==a?c:{...c,chapters:c.chapters.map(a=>a.id===b?{...a,...d}:a)}));try{await c.default.chapters.update(b,d)}catch(a){console.error("Failed to update chapter",a)}},createEntity:async(a,b,d)=>{try{let e=await c.default.entities.create({projectId:a,type:b,name:d?.name||`Nouveau ${b}`,description:d?.description||"",details:d?.details||"",attributes:d?.attributes||void 0,customValues:d?.customValues||void 0});return h(b=>b.map(b=>b.id!==a?b:{...b,entities:[...b.entities,{id:e.id,type:e.type,name:e.name,description:e.description,details:e.details,attributes:e.attributes,customValues:e.customValues||{}}]})),e.id}catch(a){throw console.error("Failed to create entity",a),a}},updateEntity:async(a,b,d)=>{h(c=>c.map(c=>c.id!==a?c:{...c,entities:c.entities.map(a=>a.id===b?{...a,...d}:a)}));try{await c.default.entities.update(b,d)}catch(a){console.error("Failed to update entity",a)}},deleteEntity:async(a,b)=>{h(c=>c.map(c=>c.id!==a?c:{...c,entities:c.entities.filter(a=>a.id!==b)}));try{await c.default.entities.delete(b)}catch(a){console.error("Failed to delete entity",a)}},deleteProject:async a=>{try{await c.default.projects.delete(a),h(b=>b.filter(b=>b.id!==a)),i===a&&j(null)}catch(a){console.error("Failed to delete project",a)}}}}],3622)},5127,38089,a=>{"use strict";var b=a.i(29892);let c=(0,b.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",()=>c],5127);let d=(0,b.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);a.s(["LogOut",()=>d],38089)}];
//# sourceMappingURL=%5Broot-of-the-server%5D__540aea7d._.js.map