@shumai-one/shumai 0.6.2 → 0.6.4
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/bin/{chunk-mcj1xpcc.js → chunk-01vx2chc.js} +2 -2
- package/bin/chunk-0epkrexd.js +2 -0
- package/bin/chunk-0h5239kt.js +2 -0
- package/bin/{chunk-jt0ykktx.js → chunk-0jnstdgf.js} +1 -1
- package/bin/{chunk-x03jwaga.js → chunk-0njsjy6x.js} +4 -4
- package/bin/{chunk-7naa7tpn.js → chunk-13rq2gtr.js} +2 -2
- package/bin/chunk-1aqs9sdh.js +3 -0
- package/bin/{chunk-m0q2cgfg.js → chunk-22jbsrka.js} +1 -1
- package/bin/chunk-2qknebmd.js +1 -0
- package/bin/{chunk-a411xhmm.js → chunk-2qzmh3ae.js} +4 -4
- package/bin/{chunk-2nhgdqdg.js → chunk-2tt0b8ym.js} +2 -2
- package/bin/{chunk-p3f5aevs.js → chunk-2zm7czk6.js} +1 -1
- package/bin/{chunk-p4s95471.js → chunk-396tfwdx.js} +1 -1
- package/bin/chunk-3mx4trvh.js +10 -0
- package/bin/{chunk-b5rhvzv9.js → chunk-45pb3kzz.js} +2 -2
- package/bin/{chunk-q83h0hkx.js → chunk-47fmhzwv.js} +2 -2
- package/bin/chunk-4awk4xhq.js +2 -0
- package/bin/{chunk-2cdxm1cp.js → chunk-4b2x2qba.js} +23 -23
- package/bin/{chunk-knj2s8mg.js → chunk-4rjy7ybr.js} +8 -8
- package/bin/{chunk-q8w4mbw4.js → chunk-598x693h.js} +2 -2
- package/bin/chunk-5c7ztqs7.js +1 -0
- package/bin/{chunk-2jj4j8cn.js → chunk-65dh7x4c.js} +2 -2
- package/bin/{chunk-hnkcgvcj.js → chunk-66e2vrky.js} +1 -1
- package/bin/{chunk-g22wmpk1.js → chunk-6j3beg6n.js} +2 -2
- package/bin/{chunk-cgmebxx6.js → chunk-6ke13k69.js} +1 -1
- package/bin/{chunk-7sgrtxbt.js → chunk-6rqakmg0.js} +2 -2
- package/bin/{chunk-4mws03es.js → chunk-6ty4tfmf.js} +3 -3
- package/bin/chunk-7e9ws6dh.js +129 -0
- package/bin/chunk-7mdddkfc.js +1 -0
- package/bin/{chunk-q2bew2vc.js → chunk-7q4mgd5x.js} +2 -2
- package/bin/chunk-7yv7shad.js +1 -0
- package/bin/{chunk-qwpkcp8d.js → chunk-81b8rfv7.js} +2 -2
- package/bin/{chunk-atfz7g7e.js → chunk-8a7ymmd4.js} +2 -2
- package/bin/chunk-8ac9at5y.js +2 -0
- package/bin/{chunk-gxepkvt2.js → chunk-8zcfgz9c.js} +1 -1
- package/bin/{chunk-mcw198kg.js → chunk-955kf5kc.js} +8 -8
- package/bin/{chunk-jzgbxqdg.js → chunk-978rm9a9.js} +2 -2
- package/bin/{chunk-jt02kpfc.js → chunk-9qzbrp4d.js} +2 -2
- package/bin/{chunk-tekwpkjf.js → chunk-a283dh05.js} +2 -2
- package/bin/chunk-aa2a06cc.js +1 -0
- package/bin/{chunk-8cjet7pp.js → chunk-ajr1w3vq.js} +6 -6
- package/bin/chunk-akafypge.js +218 -0
- package/bin/chunk-amk373q2.js +2 -0
- package/bin/chunk-apq2gvvp.js +4 -0
- package/bin/chunk-av2w1sez.js +2 -0
- package/bin/{chunk-5wapd171.js → chunk-b6kmj34z.js} +12 -12
- package/bin/chunk-bkzaw9p8.js +1 -0
- package/bin/{chunk-zezje74z.js → chunk-bssb9tar.js} +3 -3
- package/bin/chunk-bwvj1aqc.js +1 -0
- package/bin/chunk-by9esjn7.js +3 -0
- package/bin/chunk-bywk8mbc.js +2 -0
- package/bin/{chunk-9xhjy897.js → chunk-c61g9hfa.js} +4 -4
- package/bin/{chunk-zrszykjf.js → chunk-cdcgjh8k.js} +1 -1
- package/bin/{chunk-yk12hydf.js → chunk-d277evce.js} +4 -4
- package/bin/{chunk-55h9ze53.js → chunk-d3brvxh7.js} +2 -2
- package/bin/{chunk-9t3p4xp6.js → chunk-dcb1nzf1.js} +1 -1
- package/bin/{chunk-mzsw9var.js → chunk-dfbzatq9.js} +2 -2
- package/bin/chunk-e0bckx12.js +2 -0
- package/bin/{chunk-3ckkwdjx.js → chunk-e2p4s2pj.js} +3 -3
- package/bin/chunk-e8zzg57c.js +2 -0
- package/bin/{chunk-vp3czaeh.js → chunk-edfaqwaq.js} +2 -2
- package/bin/chunk-ehgrp0f9.js +1 -0
- package/bin/chunk-evs2aaav.js +12 -0
- package/bin/{chunk-s9ksftq2.js → chunk-f5bhcjhw.js} +1 -1
- package/bin/{chunk-ns33grgx.js → chunk-fb9dedm2.js} +2 -2
- package/bin/{chunk-srxp5jav.js → chunk-ff0mh9p3.js} +32 -32
- package/bin/chunk-fpfby5tz.js +1 -0
- package/bin/{chunk-eyjfhdp9.js → chunk-gd3b5akr.js} +2 -2
- package/bin/{chunk-1wfg56z3.js → chunk-gm1fy3hm.js} +5 -5
- package/bin/{chunk-9n1w5dw1.js → chunk-gqkjx7rz.js} +3 -3
- package/bin/{chunk-1nvd90g2.js → chunk-h7f5370s.js} +1 -1
- package/bin/chunk-hcyhsn8e.js +2 -0
- package/bin/{chunk-vcrmjtcz.js → chunk-jxm0gzmf.js} +2 -2
- package/bin/{chunk-b7bnp021.js → chunk-k3ggy3xk.js} +2 -2
- package/bin/{chunk-257dcd2f.js → chunk-k9vjs21p.js} +2 -2
- package/bin/chunk-ka40gv72.js +1 -0
- package/bin/chunk-km70p970.js +2 -0
- package/bin/{chunk-e4yscwen.js → chunk-m6v8rb39.js} +8 -8
- package/bin/chunk-m8spagwp.js +4 -0
- package/bin/{chunk-y241cxff.js → chunk-mfh7mg5b.js} +1 -1
- package/bin/chunk-n0cn0218.js +2 -0
- package/bin/chunk-n54ftsdx.js +2 -0
- package/bin/{chunk-02fvcrej.js → chunk-n7cvj15k.js} +7 -7
- package/bin/chunk-na5fh7er.js +2 -0
- package/bin/chunk-neazdbxy.js +1 -0
- package/bin/chunk-nk24qw3m.js +1 -0
- package/bin/{chunk-73yncv54.js → chunk-nsbbseff.js} +2 -2
- package/bin/chunk-nseef85h.js +1 -0
- package/bin/chunk-p35ztj2z.js +3 -0
- package/bin/chunk-pcjc9ygv.js +2 -0
- package/bin/{chunk-167z646e.js → chunk-pemmtd8q.js} +1 -1
- package/bin/{chunk-82tps5n1.js → chunk-pzrqnnpg.js} +1 -1
- package/bin/{chunk-a74g6h8a.js → chunk-q43m934j.js} +2 -2
- package/bin/{chunk-r1xer8gn.js → chunk-q57m34h0.js} +3 -3
- package/bin/chunk-q5k72jz9.js +3 -0
- package/bin/chunk-q9fsxakd.js +2 -0
- package/bin/chunk-qadpe0ct.js +2 -0
- package/bin/chunk-qeypjv4f.css +1 -0
- package/bin/chunk-qw92z3wf.js +2 -0
- package/bin/chunk-r0byfq1t.js +1 -0
- package/bin/chunk-r0q88qw3.js +2 -0
- package/bin/chunk-rjhczkh3.js +2 -0
- package/bin/{chunk-mwktrwtx.js → chunk-s0wxbybf.js} +1 -1
- package/bin/{chunk-q5vkxee3.js → chunk-s4hkcw24.js} +2 -2
- package/bin/chunk-szta50g1.js +1 -0
- package/bin/chunk-t6cb99gp.js +2 -0
- package/bin/chunk-tcr080b9.js +1 -0
- package/bin/{chunk-yq32evnn.js → chunk-v4nqx084.js} +5 -5
- package/bin/{chunk-ympbfzz4.js → chunk-v7jzc3ye.js} +1 -1
- package/bin/{chunk-9zsv6d2f.js → chunk-vbe8wred.js} +1 -1
- package/bin/{chunk-hpbn0k9n.js → chunk-vf9s8b5t.js} +2 -2
- package/bin/{chunk-m9adtgzk.js → chunk-vk3eqr65.js} +1 -1
- package/bin/{chunk-hpwv4am3.js → chunk-vm9bbk97.js} +4 -4
- package/bin/{chunk-v05rrxp5.js → chunk-w4gqg27w.js} +2 -2
- package/bin/{chunk-x8mjh387.js → chunk-w6ym7tsd.js} +4 -4
- package/bin/{chunk-hzkjgcre.js → chunk-ways29d1.js} +1 -1
- package/bin/chunk-wesg7tg9.js +1 -0
- package/bin/chunk-wmrrapwv.js +2 -0
- package/bin/chunk-wnwsjgj8.js +2 -0
- package/bin/{chunk-hw6czrya.js → chunk-wrb4xq9v.js} +1 -1
- package/bin/{chunk-v5cn90cf.js → chunk-wzrzc07t.js} +2 -2
- package/bin/chunk-xd1axsdv.js +2 -0
- package/bin/{chunk-cwat1jwx.js → chunk-xk0jmx4s.js} +2 -2
- package/bin/{chunk-g6sdezec.js → chunk-y545vfn0.js} +1 -1
- package/bin/{chunk-fatmqnp1.js → chunk-y6h885fs.js} +1 -1
- package/bin/{chunk-cz13a82m.js → chunk-yncmfr39.js} +2 -2
- package/bin/{chunk-01052ssf.js → chunk-yxnz4ypt.js} +11 -11
- package/bin/chunk-zc1asygg.js +2 -0
- package/bin/{chunk-m82tkhaa.js → chunk-zc7wzcvh.js} +7 -7
- package/bin/chunk-zdvhh8mk.js +2 -0
- package/bin/{chunk-kvhf12b4.js → chunk-zg0b902x.js} +2 -2
- package/bin/{chunk-7v7mypc6.js → chunk-zhq7a7hs.js} +2 -2
- package/bin/{chunk-f25fe9th.js → chunk-zmnvskn7.js} +11 -11
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +470 -389
- package/package.json +7 -7
- package/prisma/migrations/20261102032402_add_archive_storage/migration.sql +25 -0
- package/prisma/schema.prisma +12 -6
- package/bin/chunk-0bj887zm.js +0 -2
- package/bin/chunk-1ktk6764.js +0 -10
- package/bin/chunk-26qn7fek.js +0 -2
- package/bin/chunk-2ne2b54t.js +0 -2
- package/bin/chunk-2vbeqczj.js +0 -1
- package/bin/chunk-37p6bcx2.js +0 -1
- package/bin/chunk-3knfx6dm.js +0 -1
- package/bin/chunk-3z85zxkn.js +0 -1
- package/bin/chunk-54tbfvya.js +0 -2
- package/bin/chunk-56kh5fxc.js +0 -1
- package/bin/chunk-576nj64j.js +0 -2
- package/bin/chunk-6cnqjngz.js +0 -1
- package/bin/chunk-7g46e1wy.js +0 -3
- package/bin/chunk-84x8p7v5.js +0 -1
- package/bin/chunk-88jg9dq5.js +0 -2
- package/bin/chunk-8fyg9dy4.js +0 -2
- package/bin/chunk-8gtfgkrn.js +0 -2
- package/bin/chunk-8mqbztj8.js +0 -2
- package/bin/chunk-8qdtvfx3.css +0 -1
- package/bin/chunk-8xb6yz11.js +0 -2
- package/bin/chunk-8yjsmr7g.js +0 -2
- package/bin/chunk-91rb0jpb.js +0 -2
- package/bin/chunk-96qpjght.js +0 -2
- package/bin/chunk-9f1xk1nt.js +0 -1
- package/bin/chunk-9mk9cvbk.js +0 -1
- package/bin/chunk-9nw5w8vh.js +0 -1
- package/bin/chunk-ah8fjb6f.js +0 -2
- package/bin/chunk-cf5axr8c.js +0 -1
- package/bin/chunk-dk42gf7v.js +0 -2
- package/bin/chunk-e4f56spj.js +0 -4
- package/bin/chunk-eb7mzbfm.js +0 -1
- package/bin/chunk-er14d498.js +0 -3
- package/bin/chunk-f6avg5qe.js +0 -129
- package/bin/chunk-fvx9k1dc.js +0 -2
- package/bin/chunk-gtf19jc1.js +0 -2
- package/bin/chunk-h1n7jqnw.js +0 -1
- package/bin/chunk-hfm82066.js +0 -2
- package/bin/chunk-j2s311yc.js +0 -3
- package/bin/chunk-kj6h5j5a.js +0 -4
- package/bin/chunk-km4gn6b6.js +0 -1
- package/bin/chunk-ny1kbmxt.js +0 -2
- package/bin/chunk-p3j6ydk1.js +0 -1
- package/bin/chunk-pk406dgy.js +0 -2
- package/bin/chunk-s1e4qy3q.js +0 -14
- package/bin/chunk-swtwaaqe.js +0 -1
- package/bin/chunk-tagdrg7p.js +0 -1
- package/bin/chunk-twtxnzbv.js +0 -2
- package/bin/chunk-v5mcjwxy.js +0 -2
- package/bin/chunk-vkzasgxw.js +0 -2
- package/bin/chunk-x342vzdx.js +0 -2
- package/bin/chunk-xc54vhfz.js +0 -2
- package/bin/chunk-xvkwbczx.js +0 -3
- package/bin/chunk-z1p13dnc.js +0 -2
- package/bin/chunk-zarz3sqn.js +0 -211
package/bin/chunk-8xb6yz11.js
DELETED
package/bin/chunk-8yjsmr7g.js
DELETED
package/bin/chunk-91rb0jpb.js
DELETED
package/bin/chunk-96qpjght.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{w,Z,ie,ee,R,Xa,qp,j,Ir}from"./chunk-zarz3sqn.js";var U={x:0.5,y:0.5};class il extends qp{apply({activatorEvent:y,shape:m,transform:g}){if(!m||!(y instanceof PointerEvent))return g;let I=this.options?.anchor??U,{boundingRectangle:p}=m.initial,h=p.left+p.width*I.x,u=p.top+p.height*I.y;return{x:g.x+y.clientX-h,y:g.y+y.clientY-u}}static configure=Xa(il)}Z();function lu({teamId:y,projectId:m,assetId:g,folders:I,files:p,selectedIds:h,onClearSelection:u}){let F=ie(),[d,A]=w(void 0),k=(n,r)=>{let s=["search",y,g,n?"folder":"file"],i=F.getQueriesData({queryKey:s}),o=(t)=>{if(typeof t!=="object"||t===null)return!1;let e=t;return"field"in e&&"order"in e&&typeof e.field==="string"&&(e.order==="asc"||e.order==="desc")};for(let[t,e]of i){if(!e||!Array.isArray(e.pages))continue;let f=t.find(o),a=e.pages.flatMap((c)=>c.data??[]),S=a.findIndex((c)=>c.id===r.id);if(S===-1)continue;if(a[S]={...a[S],...r},f?.field==="custom"){let c=f.order==="desc";a.sort((D,E)=>{let T=D.sortIndex??"",b=E.sortIndex??"";if(T===b)return 0;if(c)return T<b?1:-1;else return T<b?-1:1})}let x=0,O=e.pages.map((c)=>{let D=c.data?c.data.length:0,E=a.slice(x,x+D);return x+=D,{...c,data:E}});F.setQueryData(t,{...e,pages:O})}},q=R.api.projects[":projectId"].reparent.$post,{mutate:v}=ee({mutationFn:async(n)=>{if(!(await q(n)).ok)throw Error("Failed to move assets");return null}}),P=R.api.folders[":folderId"].order.$patch,{mutate:C}=ee({mutationFn:async(n)=>{let r=await P(n);if(!r.ok)throw Error("Failed to reorder folder");return await r.json()}}),K=R.api.files[":fileId"].order.$patch,{mutate:Q}=ee({mutationFn:async(n)=>{let r=await K(n);if(!r.ok)throw Error("Failed to reorder file");return await r.json()}}),L=R.api.shares[":shareId"].assets.$post,{mutate:M}=ee({mutationFn:async(n)=>{let r=await L(n);if(!r.ok)throw Error("Failed to add asset to share");return await r.json()}});return{dragState:d,handleDragStart:(n)=>{let r=n.operation.source;if(!r)return;let l=r.id.split(":").pop(),s=r.data;if(!s)return;let i,o;if(h.has(l))i=new Set(h),o=[...I,...p].filter((f)=>h.has(f.id));else i=new Set([l]),o=[s.item];let t=o.some((f)=>f.type==="folder"),e=i.size===1&&o.length===1&&o[0].type==="file";A({isActive:!0,draggedIds:i,hasFolders:t,isSingleFile:e,itemCount:i.size})},handleDragEnd:(n)=>{let{target:r}=n.operation;if(r&&d){let l=r.id.split(":").pop(),s=r.data;if(s?.type==="chatbot-sidebar"){let t=[...I,...p].filter((e)=>d.draggedIds.has(e.id)).map((e)=>({id:e.id,name:e.name||"Unnamed",type:e.type}));Ir.getState().addAssets(t),u(),A(void 0);return}if(s?.type==="share-link"){let o=l,t=Array.from(d.draggedIds);M({param:{shareId:o},json:{assetIds:t}},{onSuccess:(e)=>{if(e.addedCount===0)j.info("Assets already exists in share");else j.success(`Added ${e.addedCount} item(s) to share link`);F.invalidateQueries({queryKey:["shares",m]}),u()},onError:(e)=>{j.error(`Failed to add to share: ${e.message}`)}}),A(void 0);return}let i=!1;if(s&&!d.draggedIds.has(l)){if(s.type==="folder"||s.type==="reorder")i=!0;else if(s.type==="file"||s.type==="version_stack"){if(d.isSingleFile)i=!0}}if(s?.type==="reorder"){let{position:o,item:t}=s,e=d.hasFolders,f=Array.from(d.draggedIds)[0];if(e)C({param:{folderId:f},json:o==="before"?{beforeIndex:t.sortIndex??void 0}:{afterIndex:t.sortIndex??void 0}},{onSuccess:(a)=>{j.success("Folder reordered"),k(!0,a),u()},onError:(a)=>{j.error(`Failed to reorder: ${a.message}`)}});else Q({param:{fileId:f},json:o==="before"?{beforeIndex:t.sortIndex??void 0}:{afterIndex:t.sortIndex??void 0}},{onSuccess:(a)=>{j.success("File reordered"),k(!1,a),u()},onError:(a)=>{j.error(`Failed to reorder: ${a.message}`)}})}else if(i)v({param:{projectId:m},json:{assetIds:Array.from(d.draggedIds),newParentId:l}},{onSuccess:()=>{j.success("Assets moved successfully"),F.invalidateQueries({queryKey:["search",y,g]}),F.invalidateQueries({queryKey:["folders"]}),u()},onError:()=>{j.error("Failed to move assets")}})}A(void 0)}}}
|
|
2
|
-
export{il,lu};
|
package/bin/chunk-9f1xk1nt.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S,Z,a,X,Je,R,Pt,qt,Pg}from"./chunk-zarz3sqn.js";import"./chunk-55h9ze53.js";import"./chunk-1ktk6764.js";import"./chunk-ah8fjb6f.js";import"./chunk-q5vkxee3.js";import{Kl}from"./chunk-srxp5jav.js";import"./chunk-b5rhvzv9.js";import"./chunk-8xb6yz11.js";import"./chunk-7sgrtxbt.js";import"./chunk-hpbn0k9n.js";import{gr}from"./chunk-pk406dgy.js";import"./chunk-257dcd2f.js";import"./chunk-91rb0jpb.js";import"./chunk-ny1kbmxt.js";Z();function m(){let{projectId:e,folderId:s}=c.useParams(),{teamId:r,ensureTeamIdForProject:t}=Pt();S(()=>{t(e)},[e,t]);let{data:d}=gr(Pg(e)),o=d?.rootFolder,{data:f}=X({queryKey:["folders",o],queryFn:async()=>{let n=await R.api.folders[":folderId"].$get({param:{folderId:o}});if(!n.ok)throw Error("failed to fetch folder");return await n.json()},enabled:!!o});if(!r||!o||!f)return a(qt,{});return a(Kl,{teamId:r,projectId:e,projectName:d.name??"",assetId:s,rootFolderId:o,isRoot:!1})}var c=Je("/projects/$projectId/folders/$folderId_/agentsmd")({component:m});export{c as Route};
|
package/bin/chunk-9mk9cvbk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,Je}from"./chunk-zarz3sqn.js";import"./chunk-s1e4qy3q.js";import"./chunk-ns33grgx.js";import"./chunk-q2bew2vc.js";import"./chunk-f6avg5qe.js";import"./chunk-55h9ze53.js";import"./chunk-8mqbztj8.js";import"./chunk-gtf19jc1.js";import"./chunk-zezje74z.js";import"./chunk-r1xer8gn.js";import"./chunk-1ktk6764.js";import"./chunk-z1p13dnc.js";import"./chunk-q5vkxee3.js";import{ba}from"./chunk-0bj887zm.js";import"./chunk-8yjsmr7g.js";import"./chunk-atfz7g7e.js";import"./chunk-257dcd2f.js";import"./chunk-91rb0jpb.js";import"./chunk-ny1kbmxt.js";import"./chunk-fvx9k1dc.js";import"./chunk-kvhf12b4.js";import"./chunk-qwpkcp8d.js";import"./chunk-v5cn90cf.js";function n(){let{shareId:r,fileId:i}=e.useParams(),{start:t,version:o,compare:c,cmpLeft:m,cmpRight:s,cmpActive:p}=e.useSearch();return a(ba,{shareId:r,initialFileId:i,startTime:t,versionId:o,compare:c,compareLeftId:m,compareRightId:s,compareActiveSide:p})}var e=Je("/share/$shareId/files/$fileId")({component:n});export{e as Route};
|
package/bin/chunk-9nw5w8vh.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S,M,w,Z,Y,a,g,ie,kl,X,ee,We,Wn,Je,R,K,Er,B,F,Ke,Mt,yd,vd,jE,fp,Fl,$x,O_,ms,Ck,wo,_t,yt,vt,bt,wt,Et,xt,Ct,Se,xe,ke,ot,Ce,re,Pt,Vt,j,Zn,An,ar,Ir,Fr,hs,Te,nm}from"./chunk-zarz3sqn.js";import"./chunk-ns33grgx.js";import"./chunk-q2bew2vc.js";import{un}from"./chunk-55h9ze53.js";import"./chunk-1ktk6764.js";import{va}from"./chunk-ah8fjb6f.js";import{Ps,gu,Ns,ci}from"./chunk-f6avg5qe.js";import{pu,mu}from"./chunk-z1p13dnc.js";import"./chunk-zezje74z.js";import{Ea}from"./chunk-r1xer8gn.js";import{Jr}from"./chunk-q5vkxee3.js";import"./chunk-hpbn0k9n.js";import"./chunk-8yjsmr7g.js";import"./chunk-atfz7g7e.js";import"./chunk-91rb0jpb.js";import"./chunk-ny1kbmxt.js";import"./chunk-fvx9k1dc.js";import"./chunk-qwpkcp8d.js";import"./chunk-v5cn90cf.js";Z();var Ft=({item:t})=>{if(t.preview?.thumbnailUrl)return a("img",{src:t.preview.thumbnailUrl,alt:"Preview",className:"w-full h-full object-cover"});if(t.preview?.proxyType==="audio"||t.proxyType==="audio")return a("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:a(Ps,{className:"w-5 h-5 text-muted-foreground"})});return a("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:a(Er,{className:"w-5 h-5 text-muted-foreground"})})},Me=({projectId:t,currentAssetId:n,parentFolderId:v,initialFiles:f,initialNextCursor:b,isLoading:s=!1})=>{let{ref:N,inView:C}=Vt({threshold:0,rootMargin:"200px"}),D=M(null),i=M(!0),[d,p]=w(f),[L,U]=w(b),[_,O]=w(!!b),[u,z]=w(!1);return S(()=>{p(f),U(b),O(!!b),i.current=!0},[f,b]),S(()=>{(async()=>{if(!L||u||!C||!_)return;z(!0);try{let m=await R.api.folders[":folderId"].search.$post({param:{folderId:v},json:{assetType:"file",after:L,first:200,recursively:!1,conditions:[]}});if(!m.ok)throw Error("Failed to fetch next page");let E=await m.json(),V=E.data||[];p((W)=>[...W,...V]),U(E.pageInfo?.cursor||void 0),O(!!E.pageInfo?.cursor&&V.length>0)}catch(m){console.error("Error fetching next page:",m)}finally{z(!1)}})()},[C,L,_,u,v]),S(()=>{if(d.some((m)=>m?.id===n)&&D.current)if(i.current)D.current.scrollIntoView({block:"center",inline:"center",behavior:"auto"}),i.current=!1;else D.current.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},[d,n]),a("div",{className:"h-24 md:h-full w-full md:w-24 bg-gray-100 dark:bg-gray-950 flex flex-row md:flex-col flex-shrink-0 select-none",children:g("div",{className:"flex-1 overflow-x-auto overflow-y-hidden md:overflow-y-auto md:overflow-x-hidden px-4 md:px-0 py-2 md:py-4 flex flex-row md:flex-col items-center gap-3 no-scrollbar",children:[s&&d.length===0?Array.from({length:6}).map((c,m)=>a(Te,{className:"w-[52px] h-[52px] rounded-lg shrink-0","data-testid":"carousel-skeleton-item"},m)):d.map((c)=>{if(!c)return null;let m=c.id===n;return a("div",{ref:c.id===n?D:null,className:"flex-shrink-0",children:g(Wn,{to:"/projects/$projectId/files/$fileId",params:{projectId:t,fileId:c.id},search:{version:void 0},className:B("rounded-lg border overflow-hidden flex items-center justify-center transition-all bg-muted/30 block relative",m?"w-[62px] h-[62px] opacity-100":"w-[52px] h-[52px] opacity-60 hover:opacity-100"),children:[a(Ft,{item:c}),c.agent&&a("span",{className:"absolute top-1 right-1 z-10 pointer-events-none select-none rounded bg-black/60 px-1 py-0.5 text-[10px] font-medium leading-none text-white",title:c.agent.name,"data-testid":"carousel-agent-badge",children:"AI"})]})},c.id)}),!s&&_&&a("div",{ref:N,className:"px-2 md:px-0 py-2 md:py-4 flex justify-center items-center h-full md:w-full flex-shrink-0",children:u&&a(K,{className:"h-5 w-5 animate-spin text-muted-foreground"})})]})})};Z();function kt(){let{projectId:t,fileId:n}=Ne.useParams(),v=Ne.useSearch(),{version:f,start:b}=v,s=f||n,{cmpLeft:N,cmpRight:C}=v,D=v.cmpActive??"left",i=!!v.compare&&!!N&&!!C,d=M(null),{teamId:p,ensureTeamIdForProject:L}=Pt(),[U,_]=w(360),[O,u]=w([]),{fileViewRightSidebarCollapsed:z}=ar(),{isChatbotOpen:c}=Ir(),m=Fr((e)=>Boolean(e.metadata["appearance.hideAgent"])),[E,V]=w(0),[W,T]=w(null),[pe,Le]=w(null),[Ee,ge]=w(void 0),[H,he]=w({show:!0,files:[],nextCursor:void 0,folderId:void 0}),[Ve,oe]=w(!0),Pe=R.api.files[":fileId"].metadata.$patch,{mutate:qe}=ee({mutationFn:async(e)=>{let o=await Pe(e);if(!o.ok)throw Error("Failed to patch metadata");return await o.json()}}),Q=ie(),{members:_e,fetchProjectMembers:Ie}=An(),Oe=hs();S(()=>{L(t)},[t,L]),S(()=>{if(t)Ie(t,!0)},[t,Ie]),S(()=>{if(t&&n)R.api.projects[":projectId"].recents.view.$post({param:{projectId:t},json:{assetId:n}}).catch(()=>{})},[t,n]);let{data:ye,isLoading:He,isError:Qe,isFetching:Be}=X({queryKey:["files",n],queryFn:async()=>{let e=await R.api.files[":fileId"].$get({param:{fileId:n}});if(!e.ok)throw Error("Failed to fetch stack");return await e.json()},enabled:!!p,placeholderData:kl}),{data:Ue,isLoading:ze,isError:Ge,isFetching:Xe}=X({queryKey:["files",f],queryFn:async()=>{let e=await R.api.files[":fileId"].$get({param:{fileId:f}});if(!e.ok)throw Error("Failed to fetch version");return await e.json()},enabled:!!p&&!!f,placeholderData:kl}),{data:Ye}=X({queryKey:["version_stacks",n,"versions"],queryFn:async()=>{let e=await R.api.version_stacks[":stackId"].versions.$get({param:{stackId:n}});if(!e.ok)throw Error("Failed to fetch versions");return await e.json()},enabled:!!t&&!!n&&(!!f||i)}),{data:A}=X({queryKey:["projects",t],queryFn:async()=>{let e=await R.api.projects[":projectId"].$get({param:{projectId:t}});if(!e.ok)throw Error("Failed to fetch project");return await e.json()}}),h=We(),{setProjectState:ve,clearProjectState:we}=Zn(),Ze=He||!!f&&ze,et=Qe||!!f&&Ge,tt=Be||!!f&&Xe,r=Ue||ye,k=f?Ye:ye?.versionStack?.versions,l=r?.ancestorFolders?.[0]?.id??A?.rootFolder??"",[ne,G]=w(!1),[J,Fe]=w(""),se=M(null),ae=M(!1),[nt,le]=w(!1),rt=R.api.files[":fileId"].$put,{mutate:st,mutateAsync:it,isPending:be}=ee({mutationFn:async(e)=>{let o=await rt(e);if(!o.ok)throw Error("Failed to rename file");return await o.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["files"]}),Q.invalidateQueries({queryKey:["version_stacks"]}),j.success(Ck?.()||"Renamed successfully"),G(!1)},onError:()=>{j.error($x?.()||"Failed to rename")}}),at=R.api.files.$delete,{mutate:lt,mutateAsync:dt,isPending:Ae}=ee({mutationFn:async(e)=>{if(!(await at(e)).ok)throw Error("Failed to delete file")},onSuccess:()=>{if(Q.invalidateQueries({queryKey:["files"]}),Q.invalidateQueries({queryKey:["version_stacks"]}),j.success(jE?.()||"Deleted"),le(!1),l&&l!==A?.rootFolder)h({to:"/projects/$projectId/folders/$folderId",params:{projectId:t,folderId:l}});else h({to:"/projects/$projectId",params:{projectId:t}})},onError:()=>{j.error(Fl?.()||"Failed to delete")}}),ct=(e)=>{if(e?.preventDefault(),!J.trim()||!s)return;st({param:{fileId:s},json:{name:J.trim()}})},ft=()=>{if(!s)return;lt({json:{ids:[s]}})};S(()=>{if(r&&A&&p)ve({teamId:p,projectId:t,projectName:A.name??"",ancestorFolders:r.ancestorFolders??[],currentAsset:{id:s||n,name:r.name,type:"file",version:k?k.find((e)=>e.id===s)?.version??k.length:void 0,proxyType:r.proxyType},isRootFolder:!1,fileId:n,downloadInfo:{originalKey:r.media?.original?.key,videoTranscodes:r.media?.videoTranscodes?.map((e)=>({key:e.key,width:e.width,height:e.height,resolution:e.resolution,hdr:e.hdr}))},versions:k,compareMode:i,canCompareVersions:(k?.length??0)>=2,onCompareVersions:()=>{let e=gu(k);if(!e)return;h({to:"/projects/$projectId/files/$fileId",params:{projectId:t,fileId:n},search:(o)=>({...o,version:void 0,compare:!0,cmpLeft:e.left.id,cmpRight:e.right.id,cmpActive:"left"})})},onFolderClick:(e)=>{h({to:"/projects/$projectId/folders/$folderId",params:{projectId:t,folderId:e}})},onRename:()=>{ae.current=!1,Fe(r?.name??""),G(!0)},onDelete:()=>{le(!0)}});return()=>we()},[p,t,A,r,k,s,n,i,ve,we,h]),S(()=>{if(!ne)return;let e=setTimeout(()=>{ae.current=!0},1000);return()=>clearTimeout(e)},[ne]);let ut=()=>{if(ae.current)return;setTimeout(()=>{if(se.current)ci(se.current)},0)};if(S(()=>{if(!l||!s)return;if(H.folderId===l){oe(!1);return}oe(!0);let e=!0;return(async()=>{try{let I="",y=!1,x=[],ce=void 0;for(let fe=0;fe<5;fe++){let ue=await R.api.folders[":folderId"].search.$post({param:{folderId:l},json:{assetType:"file",after:I,first:200,recursively:!1,conditions:[]}});if(!ue.ok)throw Error("Failed to search parent folder for carousel");let q=await ue.json(),me=q.data||[];if(x.push(...me),me.some((te)=>te.id===s)){if(y=!0,ce=q.pageInfo?.cursor||void 0,q.pageInfo?.cursor)try{let te=await R.api.folders[":folderId"].search.$post({param:{folderId:l},json:{assetType:"file",after:q.pageInfo.cursor,first:200,recursively:!1,conditions:[]}});if(te.ok){let $e=await te.json(),It=$e.data||[];x.push(...It),ce=$e.pageInfo?.cursor||void 0}}catch{}break}if(!q.pageInfo?.cursor||me.length<200)break;I=q.pageInfo.cursor}if(e)he({show:!0,files:y?x:r?[r]:[],nextCursor:y?ce:void 0,folderId:l})}catch(I){if(console.error(I),e)he({show:!0,files:r?[r]:[],nextCursor:void 0,folderId:l})}finally{if(e)oe(!1)}})(),()=>{e=!1}},[l,s,H.folderId,r]),S(()=>{V(0),T(null),u([])},[r?.id]),S(()=>{T(null),u([])},[pe?.id]),S(()=>{un.getState().reset(),un.getState().setIsDrawing(!1),u([]),T(null)},[s]),Ze&&!r)return a(nm,{});if(et||!r||!A||!p)return a("div",{children:O_()});let P=i?pe:r,je=P?.id??s,De=(e,o)=>{if(!p)return;qe({param:{fileId:je},json:[{key:e,value:o}]},{onSuccess:()=>{Q.invalidateQueries({queryKey:["files",je]})}})},de=(e)=>{h({to:"/projects/$projectId/files/$fileId",params:{projectId:t,fileId:n},search:(o)=>({...o,...e})})},mt=()=>{de({compare:void 0,cmpLeft:void 0,cmpRight:void 0,cmpActive:void 0,version:D==="left"?N:C})},pt=(e)=>{T(e.id||null);let o=e.annotations;if(o&&o.length>0)u(o);else u([]);if(i){if(e.second!==null&&e.second!==void 0)ge({second:e.second,nonce:Date.now()});return}if(e.second!==null&&e.second!==void 0)d.current?.seekTo(e.second),d.current?.pause();else if(o&&o.length>0)d.current?.pause()},gt=(e)=>{T(e.id||null);let I=e.details,y=I?.annotations;if(y&&y.length>0)u(y);else u([]);let x=I?.position?.type==="time"?I.position.seconds:I?.position?.type==="page"?I.position.page:void 0;if(i){if(x!==void 0)ge({second:x,nonce:Date.now()});return}if(x!==void 0)d.current?.seekTo(x),d.current?.pause();else if(y&&y.length>0)d.current?.pause()},Re=()=>{u([]),T(null)},ht=()=>{u([]),T(null)};if(Oe&&!i)return a(pu,{projectId:t,teamId:p,fileId:n,file:r,projectInfo:A,ancestorFolders:r.ancestorFolders??[],parentFolderId:l,versions:k,activeFileId:s,startTime:b,siblingFiles:H.files,onNavigateToFile:(e)=>{h({to:"/projects/$projectId/files/$fileId",params:{projectId:t,fileId:e}})},onNavigateBack:()=>{if(l&&l!==A?.rootFolder)h({to:"/projects/$projectId/folders/$folderId",params:{projectId:t,folderId:l}});else h({to:"/projects/$projectId",params:{projectId:t}})},onSelectVersion:(e)=>{h({to:"/projects/$projectId/files/$fileId",params:{projectId:t,fileId:n},search:(o)=>({...o,version:e})})},onRenameFile:async(e)=>{await it({param:{fileId:s},json:{name:e}})},onDeleteFile:async()=>{await dt({json:{ids:[s]}})},onSaveField:De});return g("div",{className:"h-full flex flex-1 flex-col bg-background",children:[g("div",{className:"h-full flex flex-1 overflow-hidden",children:[g("div",{className:"flex-1 relative",children:[tt&&!i&&a("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/50",children:a(K,{className:"h-8 w-8 animate-spin text-foreground"})}),i&&N&&C?a(mu,{versions:k??[],leftId:N,rightId:C,activeSide:D,annotations:O,seekRequest:Ee,onActiveSideChange:(e)=>de({cmpActive:e}),onSwitchVersion:(e,o)=>de(e==="left"?{cmpLeft:o}:{cmpRight:o}),onExit:mt,onActiveAssetChange:Le,onPlay:Re,onTimeUpdate:V}):a(Ns,{file:r,mediaControllerRef:d,onPlay:Re,onTimeUpdate:V,onSeek:ht,annotations:O,startTime:b,children:a(Me,{projectId:t,currentAssetId:s,parentFolderId:l,initialFiles:H.files,initialNextCursor:H.nextCursor,isLoading:Ve})})]}),(!z||c&&!m)&&g(Y,{children:[a(Jr,{onResize:(e)=>{_((o)=>Math.max(300,Math.min(600,o-e)))},className:"hidden md:block"}),a("div",{style:{width:U},className:"flex-shrink-0 bg-background flex flex-col",children:c&&!m?a(va,{projectId:t,contextAssetId:s,file:P,currentTime:E,frameRate:P?.media?.metadata?.frameRate||30,startTimecode:P?.media?.metadata?.startTimecode,onTyping:()=>{if(i)return;d.current?.pause()},onSelectMessage:gt,selectedMessageId:W}):a(Ea,{teamId:p,projectId:t,file:P,onSaveField:De,members:_e,onCommentSelect:pt,currentTime:E,onTyping:()=>{if(i)return;d.current?.pause()},selectedCommentId:W,hideAnnotationControl:P?.proxyType==="audio"})})]})]}),a(Se,{open:ne,onOpenChange:G,children:a(xe,{children:g("form",{onSubmit:ct,children:[a(ke,{children:a(Ce,{children:ms()})}),a("div",{className:"py-4",children:a(re,{ref:se,value:J,onChange:(e)=>Fe(e.target.value),placeholder:fp?.()||"Enter new name",onFocus:ut,autoFocus:!0})}),g(ot,{children:[a(F,{type:"button",variant:"outline",onClick:()=>G(!1),children:Ke()}),g(F,{type:"submit",disabled:be||!J.trim(),children:[be&&a(K,{className:"mr-2 h-4 w-4 animate-spin"}),wo()]})]})]})})}),a(_t,{open:nt,onOpenChange:le,children:g(yt,{children:[g(vt,{children:[a(wt,{children:vd?.()||"Delete Asset?"}),a(Et,{children:yd?.()||"Deleted items can be recovered for 30 days before being permanently deleted."})]}),g(bt,{children:[a(Ct,{children:Ke()}),g(xt,{onClick:ft,disabled:Ae,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[Ae&&a(K,{className:"mr-2 h-4 w-4 animate-spin"}),Mt()]})]})]})})]})}var Ne=Je("/projects/$projectId/files/$fileId")({component:kt});export{Ne as Route};
|
package/bin/chunk-ah8fjb6f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Q,S,M,w,Z,Y,a,g,ie,X,R,z,K,ao,$t,Be,Bt,Er,xr,Re,Ue,Ge,B,jb,qb,Vb,fw,Vm,e_,$w,dE,LE,ZE,Dr,B_,mh,yh,s0,tT,aT,RT,y0,Wh,Lp,PR,VM,dg,fg,bO,Jn,pg,Ie,Pt,ln,nn,ha,Xe,et,tt,rt,be,ts,Fi,ar,Ir}from"./chunk-zarz3sqn.js";import{ro}from"./chunk-55h9ze53.js";import{Gd,Bi}from"./chunk-1ktk6764.js";import{rs}from"./chunk-hpbn0k9n.js";var Ce=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],ae=z("brain",Ce);Z();function va({projectId:m,contextAssetId:k,file:f,currentTime:ne,frameRate:C,startTimecode:V,formatTimestamp:I,onTyping:le,onSelectMessage:W,selectedMessageId:de}){let{isHistoryMode:p,setIsHistoryMode:A,currentSessionId:me,chatAssets:ce,removeAsset:ue,messages:h,historySessions:J,isStreaming:_,fetchHistorySessions:U,loadSession:pe,deleteSession:fe,startNewSession:G,sendMessage:ge,abortActiveSession:xe,selectedAgentId:T,setSelectedAgentId:j,inputText:he,setInputText:ve}=Ir(),{teamId:c,ensureTeamIdForProject:ee}=Pt(),{videoTimeDisplayMode:ye}=ar(),[q,D]=w(null);S(()=>{if(m)ee(m)},[m,ee]);let{data:we=[],isSuccess:te}=X({queryKey:["chat-agents",m],queryFn:async()=>{if(!m)return[];let e=await R.api.projects[":projectId"]["chat-agents"].$get({param:{projectId:m}});if(!e.ok)throw Error("failed to fetch agents");return e.json()},enabled:!!m}),N=we.filter((e)=>e.type==="chat"&&e.enabled);S(()=>{if(!te)return;if(N.length>0){if(!N.some((t)=>t.id===T))j(N[0].id)}else if(T!==null)j(null)},[te,N,T,j]);let re=M(null),E=M(null),F=M(!0),H=M(!0);S(()=>{H.current=!0,F.current=!0},[m,k,p]),S(()=>{let e=E.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!e)return;let{scrollTop:t,isAtBottom:i}=Ir.getState(),r=setTimeout(()=>{if(i)e.scrollTop=e.scrollHeight;else e.scrollTop=t;let d=setTimeout(()=>{H.current=!1},50);return()=>clearTimeout(d)},0);return()=>clearTimeout(r)},[m,k,p]),S(()=>{let e=E.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!e)return;let t=()=>{if(H.current)return;let i=e.scrollTop,r=e.scrollHeight-i-e.clientHeight<10;Ir.getState().setScrollState(i,r)};return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}},[m,k,p]);let{ref:ke,isDropTarget:Ne}=ln({id:"chatbot-sidebar",data:{type:"chatbot-sidebar"}});S(()=>{if(!p){let{isAtBottom:e}=Ir.getState();if(e||_){let t=F.current?"auto":"smooth";re.current?.scrollIntoView({behavior:t})}F.current=!1}},[h,_,p]),S(()=>{if(p&&c)U(c)},[p,U,c]);let v=ie(),_e=Q(()=>{v.invalidateQueries({queryKey:["search"]}),v.invalidateQueries({queryKey:["folders"]}),v.invalidateQueries({queryKey:["files"]}),v.invalidateQueries({queryKey:["file"]}),v.invalidateQueries({queryKey:["version_stacks"]}),v.invalidateQueries({queryKey:["projects"]})},[v]),O=(e)=>{if(typeof e==="string")return e;if(Array.isArray(e))return e.map((t)=>{if(typeof t==="string")return t;if(t&&typeof t==="object"&&"type"in t&&t.type==="text"&&"text"in t)return String(t.text);return""}).join("");return""},oe=(e)=>e.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:"),Se=(e)=>{switch(e.role){case"user":case"custom":{let t=e;if(e.role==="custom"&&t.customType==="context_display_info"){let d=t.details?.assets||[];if(d.length===0)return null;return g("div",{className:"text-xs text-muted-foreground bg-muted/40 p-2.5 rounded-lg border border-border/50 space-y-1 my-1",children:[a("div",{className:"font-semibold",children:qb()}),a("ul",{className:"list-disc list-inside space-y-0.5",children:d.map((s)=>g("li",{className:"truncate",children:[s.name," ",g("span",{className:"text-muted-foreground/70",children:["(",s.type,")"]})]},s.id))})]},e.id)}if(e.role==="user"||t.customType==="shumai_message"){let r=t.details,d=r?.referencedAssets||[],s=r?.attachedFiles||[],n=r?.position,u=r?.annotation||r?.annotations&&r.annotations.length>0,l=!r?.currentAsset?.id||k&&r.currentAsset.id===k||f?.id&&r.currentAsset.id===f.id,x=de===e.id,y="";if(n?.type==="time")if(I)y=I(n.seconds);else if(C){let o=Math.round(n.seconds*C);y=ro(o,C,ye,V)}else{let o=Math.floor(n.seconds/60),b=Math.floor(n.seconds%60);y=`${o.toString().padStart(2,"0")}:${b.toString().padStart(2,"0")}`}else if(n?.type==="page")y=y0({page:n.page});let se=O(t.content),Te=s.length>0||d.length>0;return a("div",{onClick:()=>{if(l&&W)W(e)},className:B("flex flex-col items-end w-full group transition-all duration-150",l&&(u||n)&&"cursor-pointer"),children:g("div",{className:B("bg-primary text-primary-foreground rounded-lg px-3 py-2 text-sm whitespace-pre-wrap shadow-xs break-words transition-all border",Te?"w-full":"max-w-[85%]",x?"border-blue-500 dark:border-blue-400":"border-transparent"),children:[g("div",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:[u&&a("span",{className:"inline-flex items-center align-middle mr-1.5 p-0.5 rounded bg-primary-foreground/20 text-primary-foreground",title:$w(),children:a(ha,{className:"w-3.5 h-3.5"})}),n&&a("span",{className:"inline-flex items-center align-middle mr-1.5 px-1.5 py-0.5 rounded text-xs font-mono font-bold bg-primary-foreground/20 text-primary-foreground",children:y}),se&&a("span",{children:se})]}),s.length>0&&g("div",{className:"mt-2.5 w-full",children:[a("div",{className:"text-xs font-medium text-primary-foreground/70 mb-1",children:Vb()}),a("div",{className:"flex flex-col gap-1.5 w-full",children:s.map((o)=>{let b=o.name||"file",P=Fi(b)||o.mediaType==="image"||o.mimeType?.startsWith("image/");return g("div",{className:B("group/att relative flex items-center w-full max-w-full rounded-lg border border-primary-foreground/15 bg-primary-foreground/10 hover:bg-primary-foreground/15 transition-colors overflow-hidden",P?"h-18 p-1.5 gap-2.5 cursor-pointer":"h-9 px-2.5 gap-2.5"),onClick:(L)=>{if(L.stopPropagation(),o.url)if(P)D({url:o.url,name:b});else window.open(o.url,"_blank","noreferrer")},children:[P&&o.url?a("div",{className:"h-full aspect-square rounded-md overflow-hidden bg-black/20 shrink-0",children:a("img",{src:o.url,alt:b,className:"w-full h-full object-cover group-hover/att:scale-105 transition-transform duration-200"})}):a(Er,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}),a("div",{className:"min-w-0 flex-1 overflow-hidden",children:a("p",{className:"text-xs font-medium text-primary-foreground truncate block w-full",title:b,children:b})}),o.url&&a("a",{href:o.url,target:"_blank",rel:"noreferrer",download:b,className:"p-1 text-primary-foreground/70 hover:text-primary-foreground shrink-0 rounded-md hover:bg-primary-foreground/20 transition-colors opacity-0 group-hover/att:opacity-100",onClick:(L)=>L.stopPropagation(),title:Dr(),children:a(Bt,{className:"w-3.5 h-3.5"})})]},o.id)})})]}),d.length>0&&g("div",{className:"mt-2.5 w-full",children:[a("div",{className:"text-xs font-medium text-primary-foreground/70 mb-1",children:jb()}),a("div",{className:"flex flex-col gap-1.5 w-full",children:d.map((o)=>g("div",{className:"flex items-center justify-between w-full h-9 px-2.5 rounded-lg border border-primary-foreground/15 bg-primary-foreground/10 hover:bg-primary-foreground/15 transition-colors overflow-hidden",children:[g("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[o.type==="folder"?a(xr,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}):a(Er,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}),a("span",{className:"text-xs font-medium truncate text-primary-foreground",title:o.name,children:o.name})]}),a("span",{className:"text-[10px] text-primary-foreground/60 uppercase shrink-0 font-mono ml-2",children:o.type})]},o.id))})]})]})},e.id)}let i=t.content||"";return a("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:O(i)},e.id)}case"assistant":{let i=e.content;if(!i)return null;let r=[];if(i.forEach((s,n)=>{if(!s||typeof s!=="object")return;let u=s;switch(u.type){case"text":{let l=u.text;if(typeof l!=="string"||!l.trim())return;r.push(a("div",{className:"text-sm leading-[1.8] prose prose-sm dark:prose-invert max-w-none break-words",children:a(ts,{components:{pre:({node:x,...y})=>a("pre",{className:"whitespace-pre-wrap break-all break-words bg-muted text-foreground p-4 rounded-md border border-border/50 font-mono text-sm",...y})},children:oe(l)})},`txt-${n}`));break}case"thinking":{let l=u.thinking;if(typeof l!=="string"||!l.trim())return;r.push(g("details",{className:"group border border-border/50 rounded-lg bg-muted/20 my-2 overflow-hidden",children:[g("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-medium text-muted-foreground select-none cursor-pointer hover:bg-muted/40 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[a(ae,{className:"h-3.5 w-3.5 text-primary/70 animate-pulse"}),a("span",{children:Wh()||"Thinking"}),a(Be,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),a("div",{className:"p-3 pt-0 text-xs text-muted-foreground/90 border-t border-border/40 bg-muted/10 leading-relaxed prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap font-sans",children:a(ts,{children:oe(l)})})]},`think-${n}`));break}case"toolCall":{let l=String(u.name||u.toolName||Jn()),x=u.arguments||u.args;r.push(g("details",{className:"group border border-border/50 rounded-lg bg-violet-500/5 my-2 overflow-hidden",children:[g("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-semibold text-violet-600 dark:text-violet-400 select-none cursor-pointer hover:bg-violet-500/10 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[a(rs,{className:"h-3.5 w-3.5"}),a("span",{children:Vm()}),a("span",{className:"font-mono bg-violet-500/10 px-1.5 py-0.5 rounded text-[11px] text-violet-700 dark:text-violet-300",children:l}),a(Be,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),!!x&&g("div",{className:"p-3 pt-0 text-[10px] text-muted-foreground/90 border-t border-border/40 bg-violet-500/5 font-sans",children:[a("div",{className:"text-[9px] text-muted-foreground/60 uppercase font-bold tracking-wider mb-1.5",children:dg()||"Arguments"}),a("pre",{className:"font-mono bg-muted/30 p-2 rounded border border-border/30 overflow-x-auto max-h-32",children:JSON.stringify(x,null,2)})]})]},`tool-${n}`));break}case"image":{let l=String(u.mimeType||"image/png"),x=String(u.data||"");r.push(a("div",{className:"my-2 max-w-full",children:x?a("img",{src:x.startsWith("data:")?x:`data:${l};base64,${x}`,alt:"Attached asset",className:"max-h-60 rounded border border-border/50 object-contain shadow-xs"}):a("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:mh()})},`img-${n}`));break}default:{let l=JSON.stringify(s,null,2);if(l==="{}")return;r.push(a("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:l},`other-${n}`))}}}),r.length===0)return null;let d=!1;if(i.length>0){let s=i[i.length-1];if(typeof s==="string"&&s.trim().length>0)d=!0;else if(s&&typeof s==="object"){let n=s;if(n.type==="text"&&typeof n.text==="string"&&n.text.trim().length>0)d=!0}}return g("div",{className:"flex flex-col w-full space-y-1",children:[a("div",{className:"space-y-2 w-full",children:r}),d&&a("div",{className:"text-[10px] text-muted-foreground self-start italic pt-1",children:dE()})]},e.id)}case"toolResult":return a("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/40 p-2 rounded-md border border-border/50",children:a("span",{className:"font-semibold",children:fg({name:e.toolName||"tool"})})},e.id);case"thinking_level_change":{let i=e.content||"";return a("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:O(i)},e.id)}default:return null}};return g("div",{ref:ke,className:B("relative flex flex-col h-full bg-background transition-colors duration-200 min-h-0"),children:[Ne&&a("div",{className:"absolute inset-0 bg-accent/30 border-2 border-primary z-50 pointer-events-none flex items-center justify-center p-6 text-center animate-in fade-in duration-150",children:g("div",{className:"bg-background/95 text-foreground px-4 py-3 rounded-xl border border-border/80 flex flex-col items-center gap-2 shadow-lg max-w-[80%] animate-in zoom-in-95 duration-150",children:[a($t,{className:"h-6 w-6 text-primary animate-bounce"}),a("span",{className:"text-sm font-semibold text-foreground",children:e_()})]})}),g("div",{className:"h-12 border-b border-border flex items-center justify-between px-4 flex-shrink-0 bg-background/50 backdrop-blur-sm",children:[g("div",{className:"flex items-center gap-2",children:[p&&a("button",{onClick:()=>A(!1),className:"p-1 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:fw(),children:a(Gd,{className:"h-4 w-4"})}),a($t,{className:"h-5 w-5 text-primary"}),a("span",{className:"font-semibold text-sm",children:p?B_():PR()})]}),a("div",{className:"flex items-center gap-1",children:!p?g(Y,{children:[a("button",{onClick:G,className:"p-1.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:s0(),children:a(Re,{className:"h-4 w-4"})}),a("button",{onClick:()=>A(!0),className:"p-1.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:B_(),children:a(ao,{className:"h-4 w-4"})})]}):g("button",{onClick:()=>{G(),A(!1)},className:"flex items-center gap-1 text-xs bg-primary text-primary-foreground px-2.5 py-1 rounded-md hover:bg-primary/90 transition-colors shadow-xs cursor-pointer",children:[a(Re,{className:"h-3.5 w-3.5"}),a("span",{children:s0()})]})})]}),p?a(Ie,{className:"flex-1 p-3",children:J.length===0?a("div",{className:"text-center text-xs text-muted-foreground py-8",children:aT()}):a("div",{className:"space-y-1",children:J.map((e)=>{let t=e.id===me;return g("div",{onClick:()=>{if(c)pe(c,e.id),A(!1)},className:B("group flex items-center justify-between p-2.5 rounded-lg text-xs cursor-pointer transition-all border border-transparent",t?"bg-accent/80 text-accent-foreground font-medium border-border/40":"hover:bg-muted/60 text-muted-foreground hover:text-foreground"),children:[g("div",{className:"flex flex-col min-w-0 pr-2",children:[a("span",{className:"truncate text-foreground font-medium text-xs",children:e.name||pg()}),a("span",{className:"text-[10px] text-muted-foreground",children:nn(e.updatedAt)})]}),a("button",{onClick:(i)=>{if(i.stopPropagation(),c&&window.confirm(ZE()))fe(c,e.id)},className:"opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-destructive p-1 rounded hover:bg-muted cursor-pointer",title:LE(),children:a(Ue,{className:"h-4 w-4"})})]},e.id)})})}):g(Y,{children:[a(Ie,{ref:E,className:"flex-1 p-4 min-h-0 [&>div>div]:!block",children:h.length===0?g("div",{className:"flex flex-col items-center justify-center h-48 border-2 border-dashed border-border rounded-lg text-muted-foreground p-4 text-center",children:[a($t,{className:"h-8 w-8 mb-2 opacity-50 text-muted-foreground"}),a("p",{className:"text-sm",children:e_()})]}):g("div",{className:"space-y-4 pb-4",children:[h.map(Se),_&&h.length>0&&(h[h.length-1].role==="user"||h[h.length-1].customType==="shumai_message")&&g("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground italic",children:[a(K,{className:"h-3 w-3 animate-spin text-primary"}),a("span",{children:VM()})]}),a("div",{ref:re})]})}),a("div",{className:"p-2 flex-shrink-0 bg-background",children:a(Bi,{projectId:m,value:he,onChangeText:ve,placeholder:bO(),disabled:!T||!c,isStreaming:_,onAbort:()=>{if(c)xe(c)},allowMentions:!1,allowAttachments:!0,workspaceAssets:ce,onRemoveWorkspaceAsset:ue,allowMarkup:!0,canMarkup:!!f&&["image","video","pdf"].includes(f.proxyType||""),markupDisabledTooltip:!f?RT():yh(),allowTimestamp:f?.proxyType==="video"||f?.proxyType==="pdf",currentTime:ne,frameRate:C||f?.media?.metadata?.frameRate||30,startTimecode:V||f?.media?.metadata?.startTimecode,formatTimestamp:I||(f?.proxyType==="pdf"?(e)=>y0({page:Math.round(e)}):void 0),onTyping:le,onSendMessage:(e,t,i,r,d,s)=>{if(!c)return;ge(c,e,m,k,_e,t,i,d,s)},bottomLeftExtra:a("div",{className:"flex items-center gap-1.5 min-w-0 max-w-full",children:N.length>0?g(Xe,{value:T||"",onValueChange:(e)=>j(e),disabled:_,children:[a(tt,{className:"h-8 border-none bg-transparent hover:bg-muted text-muted-foreground hover:text-foreground focus:ring-0 focus:ring-offset-0 px-2 py-0 gap-1.5 text-xs shrink-0 select-none shadow-none max-w-full cursor-pointer",children:a(et,{placeholder:Lp()})}),a(rt,{children:N.map((e)=>a(be,{value:e.id,className:"cursor-pointer",children:g("div",{className:"flex items-center gap-2",children:[e.avatar?a("img",{src:e.avatar,alt:e.name,className:"w-4 h-4 rounded-full object-cover"}):a($t,{className:"w-4 h-4 text-muted-foreground"}),a("span",{className:"text-xs",children:e.name})]})},e.id))})]}):a("div",{className:"flex items-center gap-1.5 px-2 py-1 text-[11px] text-muted-foreground/60 italic select-none",children:a("span",{children:tT()})})})})})]}),q&&g("div",{className:"fixed inset-0 z-[100] bg-black/95 flex flex-col items-center justify-center p-4 animate-in fade-in duration-200",onClick:()=>D(null),children:[a("button",{className:"absolute top-4 right-4 text-white/70 hover:text-white hover:bg-white/20 rounded-full p-2 transition-colors z-50 cursor-pointer",children:a(Ge,{className:"w-8 h-8"})}),a("div",{className:"w-full h-full flex items-center justify-center p-2",children:a("img",{src:q.url,alt:q.name,className:"max-w-full max-h-[85vh] object-contain rounded shadow-2xl cursor-zoom-out",onClick:(e)=>{e.stopPropagation(),D(null)}})}),a("div",{className:"absolute bottom-6 text-white text-sm font-medium bg-black/50 px-4 py-2 rounded-full backdrop-blur-sm",children:q.name})]})]})}
|
|
2
|
-
export{va};
|
package/bin/chunk-cf5axr8c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S,M,w,Z,Y,a,g,ie,kl,X,ee,We,Je,R,z,Ar,K,qe,Re,Ge,B,F,$e,He,Qe,De,Ne,Fe,de,Vy,Ky,Ub,Ke,Zw,eE,oE,Jm,Mt,DE,NE,qE,Ix,Xx,eC,bd,FS,ET,_1,w1,Ip,C1,S1,I1,T1,I0,k1,vk,Di,Cd,Jc,JR,Yc,Sd,Id,XR,Td,tM,PM,wO,CO,TO,kO,gg,kd,_t,yt,vt,bt,wt,Et,xt,Ct,Se,xe,ke,ot,Ce,Ot,re,Xt,j,Zy,fe,Ve,Fr}from"./chunk-zarz3sqn.js";import{vu}from"./chunk-8mqbztj8.js";import{fu}from"./chunk-8fyg9dy4.js";import{ll}from"./chunk-vkzasgxw.js";import{zo}from"./chunk-kvhf12b4.js";import{qn}from"./chunk-qwpkcp8d.js";import"./chunk-v5cn90cf.js";var Ie=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],V=z("arrow-down-wide-narrow",Ie);var _e=[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],te=z("sliders-vertical",_e);Z();function ae({open:o,onOpenChange:l,mode:c,teamId:f,project:i}){let p=ie(),m=We(),[s,h]=w(""),[I,b]=w(!0),[_,y]=w(void 0),[k,v]=w(void 0),[u,C]=w(!1),x=M(null);S(()=>{if(o)if(c==="edit"&&i)h(i.name||""),y(i.coverImageKey),v(i.coverImage),b(i.enableNotification!==!1);else h(""),y(void 0),v(void 0),b(!0)},[o,c,i]);let P=R.api.teams[":teamId"].projects.$post,{mutate:U}=ee({mutationFn:async(n)=>{let r=await P({param:{teamId:f},json:n});if(!r.ok)throw Error(Ix());return await r.json()},onSuccess:(n)=>{p.invalidateQueries({queryKey:["teams",f,"projects"]}),l(!1);let r=n;if(r&&typeof r.id==="string")m({to:"/projects/$projectId",params:{projectId:r.id}})}}),A=R.api.projects[":projectId"].$put,{mutate:O}=ee({mutationFn:async(n)=>{let r=await A({param:{projectId:i.id},json:n});if(!r.ok)throw Error(Xx());return await r.json()},onSuccess:()=>{p.invalidateQueries({queryKey:["teams",f,"projects"]}),l(!1)}}),Q=R.api.teams[":teamId"].files.$post,{mutate:E}=ee({mutationFn:async({file:n})=>{let r=await Q({param:{teamId:f},form:{file:n}});if(!r.ok)throw Error(bd());return await r.json()},onSuccess:(n)=>{let r=n;if(r&&typeof r.key==="string")y(r.key);C(!1)},onError:()=>{C(!1)}}),d=(n)=>{let r=n.target.files?.[0];if(r){C(!0);let H=URL.createObjectURL(r);v(H),E({file:r})}},N=()=>{x.current?.click()},T=(n)=>{n.stopPropagation(),y(void 0),v(void 0)},D=()=>{if(!s.trim())return;if(c==="create")U({name:s.trim(),coverImageKey:_,enableNotification:I});else if(c==="edit"&&i?.id)O({name:s.trim(),coverImageKey:_,enableNotification:I})};return a(Se,{open:o,onOpenChange:l,children:g(xe,{className:"sm:max-w-[550px] overflow-hidden rounded-2xl border border-border/60 bg-background/95 backdrop-blur-md shadow-2xl p-0 gap-0",children:[g(ke,{className:"relative overflow-hidden bg-gradient-to-br from-primary/5 to-transparent p-6 border-b border-border/40",children:[a("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/10 rounded-full blur-2xl pointer-events-none"}),a("div",{className:"absolute bottom-0 left-10 w-32 h-12 bg-primary/5 rounded-full blur-xl pointer-events-none"}),a("div",{className:"flex items-center gap-3",children:g("div",{children:[a(Ce,{className:"text-xl font-semibold tracking-tight text-foreground",children:c==="create"?oE():I0()}),a(Ot,{className:"text-xs text-muted-foreground/80 mt-1",children:c==="create"?Zw():FS()})]})})]}),g("div",{className:"space-y-6 p-6 max-h-[75vh] overflow-y-auto",children:[g("div",{className:"space-y-2",children:[a(fe,{htmlFor:"name",className:"text-sm font-semibold tracking-tight text-foreground",children:Ip()}),g("div",{className:"relative",children:[a(re,{id:"name",value:s,onChange:(n)=>h(n.target.value),placeholder:S1(),className:"h-11 px-4 rounded-xl border-border/80 focus-visible:ring-ring/25 focus-visible:border-primary transition-all shadow-xs pr-10"}),s.trim()&&a("div",{className:"absolute inset-y-0 right-3 flex items-center",children:a(qe,{className:"w-4 h-4 text-primary"})})]}),a("p",{className:"text-[11px] text-muted-foreground",children:C1()})]}),g("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[g("div",{className:"flex items-center justify-between",children:[g(fe,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[a(qn,{className:"w-4 h-4 text-primary"}),w1()]}),k&&g("button",{type:"button",onClick:T,className:"text-xs text-muted-foreground hover:text-destructive hover:bg-destructive/5 px-2.5 py-1 rounded-lg transition-all flex items-center gap-1 font-medium",children:[a(Ge,{className:"w-3.5 h-3.5"}),vk()]})]}),g("div",{className:"relative aspect-square w-48 mx-auto rounded-2xl border border-dashed border-border flex items-center justify-center cursor-pointer overflow-hidden group shadow-inner bg-muted/20 transition-all duration-300 hover:border-primary/50 hover:bg-muted/40",onClick:N,children:[a("input",{type:"file",ref:x,className:"hidden",accept:"image/*",onChange:d}),u&&a("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-xs flex flex-col items-center justify-center gap-2 z-20",children:g("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-background border rounded-full shadow-lg",children:[a(K,{className:"w-4 h-4 animate-spin text-primary"}),a("span",{className:"text-xs font-semibold text-foreground",children:kd()})]})}),k?g(Y,{children:[a("img",{src:k,alt:eE(),className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),g("div",{className:"absolute inset-0 bg-black/45 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col items-center justify-center gap-1.5 text-white z-10",children:[a(zo,{className:"w-5 h-5 transform translate-y-1 group-hover:translate-y-0 transition-transform duration-300"}),a("span",{className:"text-xs font-semibold",children:gg()})]})]}):g("div",{className:"flex flex-col items-center gap-2 text-center p-4",children:[a("div",{className:"p-2.5 rounded-full bg-background border shadow-xs group-hover:scale-110 transition-transform duration-300",children:a(zo,{className:"w-4 h-4 text-muted-foreground"})}),g("div",{children:[a("p",{className:"text-xs font-medium text-foreground",children:TO()}),a("p",{className:"text-[11px] text-muted-foreground mt-0.5 max-w-[140px] mx-auto leading-normal",children:kO()})]})]})]})]}),g("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[g(fe,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[a(te,{className:"w-4 h-4 text-primary"}),T1()]}),g("div",{className:"flex items-start justify-between rounded-xl border border-border/50 bg-muted/10 p-4 transition-all duration-300 hover:bg-muted/20",children:[g("div",{className:"space-y-1 pr-4",children:[g("div",{className:"text-sm font-semibold flex items-center gap-2 text-foreground",children:[a(ll,{className:"w-4 h-4 text-primary"}),Vy()]}),a("p",{className:"text-xs text-muted-foreground leading-normal",children:Ky()})]}),a(Ve,{checked:I,onCheckedChange:b,disabled:u,className:"mt-0.5"})]})]})]}),g(ot,{className:"flex items-center justify-end gap-3 px-6 py-4 bg-muted/20 border-t border-border/40",children:[a(F,{type:"button",variant:"ghost",onClick:()=>l(!1),disabled:u,className:"rounded-xl h-10 px-4 hover:bg-muted font-medium text-sm text-muted-foreground hover:text-foreground transition-colors",children:Ke()}),a(F,{type:"submit",onClick:D,disabled:!s.trim()||u,className:"rounded-xl h-10 px-5 bg-primary text-primary-foreground hover:bg-primary/90 font-semibold text-sm shadow-lg shadow-primary/10 hover:shadow-primary/20 active:scale-98 transition-all flex items-center gap-2",children:u?g(Y,{children:[a(K,{className:"w-4 h-4 animate-spin"}),_1()]}):c==="create"?Jm():Di()})]})]})})}function se({sortBy:o,sortDirection:l,onSortChange:c}){let f=(s)=>{c(s,l)},i=()=>{c(o,l==="asc"?"desc":"asc")},p=(s)=>{switch(s){case"name":return Yc();case"created_at":return JR();case"updated_at":return XR();default:return s}},m=l==="asc";return g(De,{children:[a(Ne,{asChild:!0,children:g(F,{variant:"outline",className:"gap-2 bg-muted/50",children:[a("span",{className:"text-muted-foreground",children:tM()}),a("span",{className:"font-medium text-foreground",children:p(o)})]})}),g(Fe,{align:"end",className:"w-56 p-2",children:[a("div",{className:"text-xs font-semibold text-muted-foreground mb-2 px-2",children:Jc()}),g(De,{children:[a(Ne,{asChild:!0,children:g(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted mb-2 border",children:[a("span",{children:p(o)}),a(V,{className:"h-4 w-4 opacity-50"})]})}),a(Fe,{className:"w-52",children:["name","created_at","updated_at"].map((s)=>g(de,{onClick:()=>f(s),className:"justify-between",children:[p(s),o===s&&a(qe,{className:"h-4 w-4"})]},s))})]}),g(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted border",onClick:i,children:[a("span",{className:"text-muted-foreground",children:o==="name"?m?a(Y,{children:Cd()}):a(Y,{children:Td()}):m?a(Y,{children:Id()}):a(Y,{children:Sd()})}),m?a(fu,{className:"h-4 w-4 opacity-50"}):a(V,{className:"h-4 w-4 opacity-50"})]})]})]})}Z();function Me(){let{teamId:o}=Pe.useParams(),{canEdit:l,canAdmin:c}=Xt(),f=We(),i=ie(),[p,m]=w(null),[s,h]=w(!1),[I,b]=w("create"),[_,y]=w(void 0),[k,v]=w(!1),[u,C]=w(void 0),[x,P]=w(""),[U,A]=w(!1),{metadata:O,setMetadata:Q}=Fr(),E=`team:${o}:projects:sort`,d=O[E],[N,T]=w(()=>d?.sortBy||"name"),[D,n]=w(()=>d?.sortDirection||"asc");S(()=>{if(d?.sortBy&&d.sortBy!==N)T(d.sortBy);if(d?.sortDirection&&d.sortDirection!==D)n(d.sortDirection)},[d]);let r=R.api.teams[":teamId"].projects.$get,{data:H}=X({queryKey:["teams",o,"projects",N,D],queryFn:async()=>{let e=await r({param:{teamId:o},query:{sortBy:N,sortDirection:D}});if(!e.ok)throw Error("Failed to fetch projects");return await e.json()},placeholderData:kl}),{data:W}=X({queryKey:["teams",o,"members"],queryFn:async()=>{let e=await R.api.teams[":teamId"].members.$get({param:{teamId:o},query:{}});if(!e.ok)throw Error("Failed to fetch members");return await e.json()}}),{data:G}=X({queryKey:["teams",o,"me"],queryFn:async()=>{let e=await R.api.teams[":teamId"].me.$get({param:{teamId:o}});if(!e.ok)throw Error("Failed to fetch me");return await e.json()}}),ne=R.api.teams[":teamId"].invite.$post,le=ee({mutationFn:async(e)=>{let t=await ne(e);if(!t.ok)throw Error("Failed to invite");return await t.json()}}),q=ee({mutationFn:async(e)=>{if(!(await R.api.projects[":projectId"].$delete({param:{projectId:e}})).ok)throw Error("Failed to delete project")},onSuccess:()=>{i.invalidateQueries({queryKey:["teams",o,"projects"]})}}),ce=ee({mutationFn:async(e)=>{let t=await R.api.projects[":projectId"].$put({param:{projectId:e.id},json:{enableNotification:!e.enableNotification}});if(!t.ok)throw Error("Failed to update project notification settings");return await t.json()},onSuccess:()=>{i.invalidateQueries({queryKey:["teams",o,"projects"]}),j.success(I1())},onError:(e)=>{j.error(e instanceof Error?e.message:eC())}}),J=()=>{b("create"),y(void 0),h(!0)},me=()=>{m("create"),setTimeout(()=>{m(null)},100),setTimeout(()=>{J()},200)},pe=(e)=>{b("edit"),y(e),h(!0)},ue=(e)=>{C(e),P(""),v(!0)},ge=async()=>{if(u&&x==="delete")try{await q.mutateAsync(u.id),v(!1)}catch(e){console.error(e)}},ve=(e,t)=>{if(t.detail>1)return;m(e),setTimeout(()=>{m(null)},100),setTimeout(()=>{f({to:"/projects/$projectId",params:{projectId:e}})},200)},he=async(e)=>(await le.mutateAsync({param:{teamId:o},json:{role:e}})).code,ye=ee({mutationFn:async({userId:e,role:t})=>{if(!(await R.api.teams[":teamId"].members[":userId"].$patch({param:{teamId:o,userId:e},json:{role:t}})).ok)throw Error("Failed to update member role")},onSuccess:()=>{i.invalidateQueries({queryKey:["teams",o,"members"]})}}),be=ee({mutationFn:async(e)=>{if(!(await R.api.teams[":teamId"].members[":userId"].$delete({param:{teamId:o,userId:e}})).ok)throw Error("Failed to remove member")},onSuccess:()=>{i.invalidateQueries({queryKey:["teams",o,"members"]})}}),we=(e)=>{if(!e)return"??";return e.split(" ").map((t)=>t[0]).slice(0,2).join("").toUpperCase()},je=(e,t)=>{T(e),n(t),Q(o,E,{sortBy:e,sortDirection:t})},L=Array.isArray(W)?W:[];return g("div",{className:"flex-1 overflow-y-auto p-4",children:[g("div",{className:"flex flex-wrap items-center justify-between mb-4 gap-4",children:[a("h1",{className:"text-2xl font-bold",children:k1()}),g("div",{className:"flex flex-wrap items-center gap-4",children:[g("div",{className:"flex items-center -space-x-2 cursor-pointer hover:opacity-90",onClick:()=>A(!0),"data-testid":"team-members-trigger",children:[L.slice(0,3).map((e)=>g($e,{className:"border-2 border-background w-8 h-8",children:[e.image&&a(He,{src:e.image,alt:e.name,className:"object-cover"}),a(Qe,{className:"text-[10px]",children:we(e.name)})]},e.id)),L.length>3&&g("div",{className:"flex items-center justify-center w-8 h-8 rounded-full border-2 border-background bg-muted text-[10px] font-medium",children:["+",L.length-3]})]}),a(se,{sortBy:N,sortDirection:D,onSortChange:je}),l&&g(F,{className:"bg-orange-600 hover:bg-orange-700 text-white gap-2",onClick:J,children:[a(Re,{className:"w-4 h-4"}),Jm()]})]})]}),g("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4",children:[H?.data?.map((e)=>a("div",{className:B("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out",p===e.id?"scale-95":"scale-100"),onClick:(t)=>ve(e.id,t),children:g("div",{className:"flex flex-col",children:[g("div",{className:"relative w-full h-full aspect-square flex items-center justify-center bg-zinc-400/20",children:[e.coverImage?a("img",{src:e.coverImage,alt:e.name,className:"w-full h-full object-cover rounded"}):g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 180.95 164.7",preserveAspectRatio:"xMidYMid slice",className:"w-full h-full object-cover rounded",children:[a("polygon",{fill:"#FC9F8E",points:"0 18.5 0 76.0 151.69 164.7 180.95 164.7 180.95 113.6"}),a("polygon",{fill:"#FEBAB8",points:"0 0 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0"}),a("polyline",{fill:"#FAA5A5",points:"0 18.5 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0 0 0"}),a("polygon",{fill:"#EC5B6C",points:"0 76.0 0 164.7 151.69 164.7"}),a("polygon",{fill:"#E85C71",points:"180.95 18.9 110.33 63.9 117.37 68.0 117.26 73.4 180.95 113.6"}),a("polygon",{fill:"#C8405B",points:"117.26 73.4 117.37 99.0 90.53 114.9 174.35 164.7 180.95 164.7 180.95 113.6"}),a("polygon",{fill:"#FFCCBE",points:"90.53 51.6 63.69 68.1 90.53 83.4"}),a("path",{fill:"#FB9991",d:"M 90.53 51.6 L 90.53 61.3 L 100.87 67.4 L 90.53 73.5 L 90.53 83.4 L 117.37 68.0 C 117.15 67.6 90.53 51.6 90.53 51.6 Z"}),a("path",{fill:"#FFEACD",d:"M 63.69 68.1 C 63.47 68.5 64.02 99.3 64.02 99.3 C 64.02 99.3 64.46 99.6 64.9 99.9 L 90.53 83.4 L 63.69 68.1 Z"}),a("polygon",{fill:"#FFCFB5",points:"64.02 99.3 90.53 114.9 90.53 83.4"}),a("path",{fill:"#F67D73",d:"M 90.53 83.4 L 90.53 114.9 L 117.37 99.0 Z"}),a("path",{fill:"#F26560",d:"M 90.53 83.4 L 117.37 99.0 L 117.37 68.0 Z"}),a("polygon",{fill:"#EB5F5B",points:"80.08 67.5 90.53 73.5 90.53 61.3"}),a("polygon",{fill:"#DB4D50",points:"90.53 61.3 90.53 73.5 100.87 67.4"})]}),a("div",{className:"absolute bottom-0 left-0 w-full h-[65%] bg-linear-to-t from-black/35 to-black/0"}),a("p",{className:"absolute left-1 bottom-2 text-white",children:e.name})]}),g("div",{className:"px-2 h-10 flex justify-between items-center",children:[g("p",{className:"truncate pr-1 text-xs text-muted-foreground",children:[CO()," ",Zy(e.updatedAt??"")]}),a("div",{onClick:(t)=>t.stopPropagation(),children:g(De,{modal:!1,children:[a(Ne,{asChild:!0,children:a("button",{className:"hover:bg-muted outline-none flex px-1",children:a(Ar,{className:"w-5 h-5 text-muted-foreground"})})}),g(Fe,{align:"end",children:[l&&a(de,{onClick:(t)=>{t.stopPropagation(),pe(e)},children:I0()}),g(de,{className:"flex items-center justify-between gap-4 cursor-pointer",onSelect:(t)=>{t.preventDefault(),ce.mutate(e)},children:[a("span",{children:ET()}),a(Ve,{checked:e.enableNotification??!0,className:"pointer-events-none"})]}),c&&a(de,{className:"text-destructive focus:text-destructive",onClick:()=>ue(e),children:Mt()})]})]})})]})]})},e.id)),l&&a("div",{className:B("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out border-dashed hover:border-orange-600/50 group",p==="create"?"scale-95":"scale-100"),onClick:me,children:g("div",{className:"flex flex-col",children:[a("div",{className:"relative w-full aspect-square flex items-center justify-center bg-zinc-400/5 group-hover:bg-orange-600/5 transition-colors",children:a(Re,{className:"w-8 h-8 text-zinc-400 group-hover:text-orange-600 transition-colors"})}),a("div",{className:"px-2 h-10 flex items-center justify-center bg-zinc-400/10 border-t group-hover:bg-orange-600/10 transition-colors",children:a("p",{className:"text-sm text-muted-foreground group-hover:text-orange-600 transition-colors",children:Jm()})})]})})]}),a(ae,{open:s,onOpenChange:h,mode:I,teamId:o,project:_}),a(_t,{open:k,onOpenChange:v,children:g(yt,{children:[g(vt,{children:[a(wt,{children:Ub()}),g(Et,{children:[NE({name:u?.name??""}),g("div",{className:"mt-4 flex flex-col gap-2 text-foreground",children:[a("span",{className:"text-sm font-medium",children:wO()}),a(re,{value:x,onChange:(e)=>P(e.target.value),placeholder:DE(),className:"h-9",autoFocus:!0})]})]})]}),g(bt,{children:[a(Ct,{disabled:q.isPending,children:Ke()}),a(xt,{onClick:(e)=>{e.preventDefault(),ge()},disabled:x!=="delete"||q.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q.isPending?qE():Mt()})]})]})}),a(vu,{open:U,onOpenChange:A,title:PM(),type:"team",members:L,isOwner:G?.role==="owner",onInvite:he,onUpdateRole:async(e,t)=>{await ye.mutateAsync({userId:e,role:t})},onRemoveMember:async(e)=>{await be.mutateAsync(e)},currentUserId:G?.id})]})}var Pe=Je("/teams/$teamId/")({component:Me});export{Pe as Route};
|
package/bin/chunk-dk42gf7v.js
DELETED
package/bin/chunk-e4f56spj.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Pr,ra,sd,e,I,E,N,W,A,l,D,k,v,y}from"./chunk-2cdxm1cp.js";function ml(t){return{ok:!0,value:t}}function Fs(t){return{ok:!1,error:t}}async function V(t){let n=await t;if(!n.ok)throw n.error;return n.value}class C extends Error{rawValue;rawMessage;static[Symbol.hasInstance](t){if(!(t instanceof Error))return!1;if(!("rawValue"in t))return!1;if(!("rawMessage"in t))return!1;if(!("pretty"in t))return!1;if(typeof t.pretty!=="function")return!1;return!0}constructor(t,n,o){super(`${t}: ${n}`);this.name="SDKValidationError",this.cause=n,this.rawValue=o,this.rawMessage=t}pretty(){if(this.cause instanceof ra)return`${this.rawMessage}
|
|
3
|
-
${om(this.cause)}`;else return this.toString()}}function om(t){return sd(t)}function b(t,n){let o={};if(!Object.keys(n).length)return o=t,o;for(let[i,r]of Object.entries(t)){let a=n[i];if(a===null)continue;o[a??i]=r}return o}function O(t){let n={};for(let[o,i]of Object.entries(t))if(typeof i<"u")n[o]=i;return n}function P(t,n,o){try{return ml(n(t))}catch(i){return Fs(new C(o,i,t))}}function J(t){return d++,t}var d=0,U=0;function h(){U++;let t=d;return{end:(n)=>{let o=d-t;if(d=t+(n??o),--U===0)d=0;return o}}}function me(t){let n=Object.values(t);return D([...n.map((o)=>v(o)),e().transform((o)=>J(o))])}function nc(t){let n=Object.values(t).filter((o)=>typeof o==="number");return D([...n.map((o)=>v(o)),I().transform((o)=>J(o))])}function Lt(t){return e()}function Ng(t){return I()}var T=Symbol("UNKNOWN");function j(t){return typeof t==="object"&&t!==null&&T in t}function gt(t,n,o={}){let{unknownValue:i="UNKNOWN",outputPropertyName:r}=o;return W().transform((a)=>{let s=Object.defineProperties({raw:a,[r??t]:i,isUnknown:!0},{[T]:{value:!0,enumerable:!1,configurable:!1}});if(!(typeof a==="object"&&a!==null))return s;let m=a[t];if(typeof m!=="string")return s;if(!(m in n))return s;let g=n[m];if(!g)return s;let p=h(),f=g.safeParse(a);if(!f.success)return p.end(0),s;if(p.end(),r)f.data[r]=m;return f.data})}var w=/^\d{4}-\d{2}-\d{2}$/;class x{serialized;static today(){return new x(new Date)}constructor(t){if(typeof t==="string"&&!w.test(t))throw RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: "+t);let n=new Date(t);if(isNaN(+n))throw RangeError("RFCDate: invalid date provided: "+t);if(this.serialized=n.toISOString().slice(0,10),!w.test(this.serialized))throw TypeError(`RFCDate: failed to build valid date with given value: ${t} serialized to ${this.serialized}`)}toJSON(){return this.toString()}toString(){return this.serialized}}function q(t){return W().transform((n,o)=>{let i=[],r=t.map(()=>[]),a=h();for(let[c,m]of t.entries()){let g=h(),p=m.safeParse(n),f=g.end(),re=0;if(p.success){i.push({data:p.data,inexactCount:f,zeroDefaultCount:0,fieldCount:-1});continue}r[c].push(...p.error.issues)}if(i.length===0)return a.end(0),o.addIssue({input:n,code:"invalid_union",errors:r}),Pr;let s=i[0];for(let c of i){if(i.length>1)c.fieldCount=te(c.data);s=ee(c,s)}return a.end(s.inexactCount),s.data})}function ee(t,n){let o=t.inexactCount===0,i=n.inexactCount===0;if(o!==i)return o?t:n;let r=t.fieldCount-t.zeroDefaultCount,a=n.fieldCount-n.zeroDefaultCount;if(r!==a)return r>a?t:n;return t.inexactCount<n.inexactCount?t:n}function te(t){let n=0,o=[t],i=0;while(i<o.length){let r=o[i++];if(r===void 0||j(r))continue;let a=typeof r;if(r===null||a==="number"||a==="string"||a==="boolean"||a==="bigint"||r instanceof Date||r instanceof x){n++;continue}if(Array.isArray(r)){o.push(...r);continue}if(a==="object")o.push(...Object.values(r))}return n}var L=l({type:v("input_audio"),input_audio:e()}).transform((t)=>b(t,{input_audio:"inputAudio"})),M=l({type:v("input_audio"),inputAudio:e()}).transform((t)=>b(t,{inputAudio:"input_audio"}));var Ta=l({type:v("document_url").default("document_url"),document_url:e(),document_name:y(e()).optional()}).transform((t)=>b(t,{document_url:"documentUrl",document_name:"documentName"})),Ui=l({type:v("document_url").default("document_url"),documentUrl:e(),documentName:y(e()).optional()}).transform((t)=>b(t,{documentUrl:"document_url",documentName:"document_name"}));var K=l({type:v("file").default("file"),file_id:e()}).transform((t)=>b(t,{file_id:"fileId"})),Tu=l({type:v("file").default("file"),fileId:e()}).transform((t)=>b(t,{fileId:"file_id"}));var Y={Low:"low",Auto:"auto",High:"high"},B=me(Y),Z=Lt(Y);var R=l({url:e(),detail:y(B).optional()}),F=l({url:e(),detail:y(Z).optional()});var Ie=q([R,e()]),we=q([F,e()]);var ka=l({type:v("image_url").default("image_url"),image_url:q([R,e()])}).transform((t)=>b(t,{image_url:"imageUrl"})),zi=l({type:v("image_url").default("image_url"),imageUrl:q([F,e()])}).transform((t)=>b(t,{imageUrl:"image_url"}));var Ae=q([I(),e()]),ve=q([I(),e()]);var z=l({type:v("reference").default("reference"),reference_ids:A(q([I(),e()]))}).transform((t)=>b(t,{reference_ids:"referenceIds"})),S=l({type:v("reference").default("reference"),referenceIds:A(q([I(),e()]))}).transform((t)=>b(t,{referenceIds:"reference_ids"}));var Ls=l({type:v("text").default("text"),text:e()}),Zs=l({type:v("text").default("text"),text:e()});var G={WebSearch:"web_search",WebSearchPremium:"web_search_premium",CodeInterpreter:"code_interpreter",ImageGeneration:"image_generation",DocumentLibrary:"document_library"},$n=me(G),ji=Lt(G);var Ve=q([$n,e()]),We=q([ji,e()]);var hl=l({type:v("tool_reference").default("tool_reference"),tool:q([$n,e()]),title:e(),url:y(e()).optional(),favicon:y(e()).optional(),description:y(e()).optional()}),ku=l({type:v("tool_reference").default("tool_reference"),tool:q([ji,e()]),title:e(),url:y(e()).optional(),favicon:y(e()).optional(),description:y(e()).optional()});var Xe=q([hl,Ls,z]),et=q([ku,Zs,S]);var Ra=l({type:v("thinking").default("thinking"),thinking:A(q([hl,Ls,z])),signature:y(e()).optional(),closed:E().optional()}),Ma=l({type:v("thinking").default("thinking"),thinking:A(q([ku,Zs,S])),signature:y(e()).optional(),closed:E().optional()});var oc=gt("type",{image_url:ka.and(l({type:v("image_url")})),document_url:Ta.and(l({type:v("document_url")})),text:Ls.and(l({type:v("text")})),reference:z.and(l({type:v("reference")})),file:K.and(l({type:v("file")})),thinking:Ra.and(l({type:v("thinking")})),input_audio:L}),qi=D([zi.and(l({type:v("image_url")})),Ui.and(l({type:v("document_url")})),Zs.and(l({type:v("text")})),S.and(l({type:v("reference")})),Tu.and(l({type:v("file")})),Ma.and(l({type:v("thinking")})),M]);var pt=q([k(e(),N()),e()]),ft=q([k(e(),N()),e()]);var H=l({name:e(),arguments:q([k(e(),N()),e()])}),Q=l({name:e(),arguments:q([k(e(),N()),e()])});var Wd=l({id:e().default("null"),type:e().optional(),function:H,index:I().default(0)}),Fg=l({id:e().default("null"),type:e().optional(),function:Q,index:I().default(0)});var kt=q([e(),A(oc)]);var Jd=l({role:y(e()).optional(),content:y(q([e(),A(oc)])).optional(),tool_calls:y(A(Wd)).optional(),tool_call_id:y(e()).optional(),index:y(I()).optional(),metadata:y(k(e(),N())).optional()}).transform((t)=>b(t,{tool_calls:"toolCalls",tool_call_id:"toolCallId"}));var ys=l({prompt_tokens:I().default(0),completion_tokens:I().default(0),total_tokens:I().default(0),prompt_audio_seconds:y(I()).optional()}).catchall(N()).transform((t)=>b(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",prompt_audio_seconds:"promptAudioSeconds"})),Ru=l({promptTokens:I().default(0),completionTokens:I().default(0),totalTokens:I().default(0),promptAudioSeconds:y(I()).optional()}).catchall(N()).transform((t)=>({...b(t,{promptTokens:"prompt_tokens",completionTokens:"completion_tokens",totalTokens:"total_tokens",promptAudioSeconds:"prompt_audio_seconds"})}));var ne={Stop:"stop",Length:"length",Error:"error",ToolCalls:"tool_calls"},oe=me(ne),X=l({index:I(),delta:Jd,finish_reason:y(oe)}).transform((t)=>b(t,{finish_reason:"finishReason"}));var sm=l({id:e(),object:e().optional(),created:I().optional(),model:e(),usage:ys.optional(),choices:A(X)});function Lg(t){return P(t,(n)=>sm.parse(JSON.parse(n)),"Failed to parse 'CompletionChunk' from JSON")}
|
|
4
|
-
export{om,ml,Fs,V,P,b,O,me,nc,Lt,Ng,gt,q,Ta,Ui,Tu,ka,zi,Ls,Zs,$n,ji,hl,ku,Ra,Ma,oc,qi,Wd,Fg,Jd,ys,Ru,sm,Lg};
|
package/bin/chunk-eb7mzbfm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S,Z,a,X,Je,R,Pt,qt,Cg}from"./chunk-zarz3sqn.js";import"./chunk-f6avg5qe.js";import"./chunk-s1e4qy3q.js";import"./chunk-ns33grgx.js";import"./chunk-q2bew2vc.js";import"./chunk-55h9ze53.js";import"./chunk-1ktk6764.js";import"./chunk-ah8fjb6f.js";import"./chunk-96qpjght.js";import"./chunk-8mqbztj8.js";import"./chunk-gtf19jc1.js";import"./chunk-zezje74z.js";import"./chunk-r1xer8gn.js";import"./chunk-q5vkxee3.js";import{xo}from"./chunk-xc54vhfz.js";import"./chunk-hpbn0k9n.js";import{gr}from"./chunk-pk406dgy.js";import"./chunk-8yjsmr7g.js";import"./chunk-atfz7g7e.js";import"./chunk-257dcd2f.js";import"./chunk-91rb0jpb.js";import"./chunk-ny1kbmxt.js";import"./chunk-fvx9k1dc.js";import"./chunk-kvhf12b4.js";import"./chunk-qwpkcp8d.js";import"./chunk-v5cn90cf.js";Z();function m(){let{projectId:o}=c.useParams(),{teamId:r,ensureTeamIdForProject:t}=Pt();S(()=>{t(o)},[o,t]);let{data:n}=gr(Cg(o)),e=n?.rootFolder,{data:s}=X({queryKey:["folders",e],queryFn:()=>(async()=>await(await R.api.folders[":folderId"].$get({param:{folderId:e}})).json())(),enabled:!!e});if(!r||!e||!s)return a(qt,{});return a(xo,{teamId:r,projectId:o,projectName:n.name??"",assetId:"recents",rootFolderId:e})}var c=Je("/projects/$projectId/recents")({component:m});export{c as Route};
|