@shumai-one/shumai 0.4.7 → 0.4.9

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.
Files changed (151) hide show
  1. package/bin/chunk-01v2xh5b.js +1 -0
  2. package/bin/{chunk-4m8gk79m.js → chunk-09367z2r.js} +2 -2
  3. package/bin/{chunk-781990k7.js → chunk-0g7ayjb5.js} +4 -4
  4. package/bin/{chunk-5wp37g6w.js → chunk-0mv8jp7h.js} +6 -6
  5. package/bin/{chunk-11c93g1m.js → chunk-0w3388vp.js} +2 -2
  6. package/bin/chunk-15n1v8mm.js +1 -0
  7. package/bin/chunk-17k9a427.js +211 -0
  8. package/bin/{chunk-dyq6h9ha.js → chunk-1kr1jsrt.js} +1 -1
  9. package/bin/{chunk-njabdtvb.js → chunk-1v11geh0.js} +2 -2
  10. package/bin/chunk-258tjpym.js +1 -0
  11. package/bin/chunk-2ar64j3z.js +2 -0
  12. package/bin/{chunk-ebf1r872.js → chunk-2j31y48k.js} +5 -5
  13. package/bin/{chunk-z9jpgxf1.js → chunk-2txahdj8.js} +2 -2
  14. package/bin/{chunk-gc6m7agb.js → chunk-315w58w6.js} +2 -2
  15. package/bin/{chunk-0ygtayqf.js → chunk-41fbx9mc.js} +1 -1
  16. package/bin/{chunk-zz0522zr.js → chunk-46brm12f.js} +4 -4
  17. package/bin/{chunk-q1d7x1cc.js → chunk-46hmh2ag.js} +1 -1
  18. package/bin/{chunk-zbt4h7n0.js → chunk-4cj3pz27.js} +1 -1
  19. package/bin/{chunk-camzbwqh.js → chunk-4sqbjvjt.js} +1 -1
  20. package/bin/{chunk-jde9r5mj.js → chunk-5e4de0a1.js} +1 -1
  21. package/bin/{chunk-b3aqmcps.js → chunk-5w7yxz6p.js} +2 -2
  22. package/bin/{chunk-ebx3bd4c.js → chunk-6m44n3ms.js} +1 -1
  23. package/bin/{chunk-hye75kp0.js → chunk-6mnj9adr.js} +2 -2
  24. package/bin/{chunk-twyxs4z2.js → chunk-6snwrej9.js} +1 -1
  25. package/bin/{chunk-mm1a0zja.js → chunk-6vqga3ma.js} +1 -1
  26. package/bin/{chunk-t3t7dcfq.js → chunk-6yayg55q.js} +1 -1
  27. package/bin/{chunk-9va1mzeq.js → chunk-7hmt2gs5.js} +2 -2
  28. package/bin/{chunk-3h9c5ak3.js → chunk-7zfyrt40.js} +1 -1
  29. package/bin/{chunk-fvgb6rps.js → chunk-82cg5497.js} +2 -2
  30. package/bin/{chunk-628k58ek.js → chunk-8mhj6r2q.js} +2 -2
  31. package/bin/{chunk-radcwage.js → chunk-8mjb093y.js} +2 -2
  32. package/bin/{chunk-h3wr8nnk.js → chunk-8r9q7xcv.js} +1 -1
  33. package/bin/{chunk-wvq717b5.js → chunk-9fe75ns9.js} +2 -2
  34. package/bin/{chunk-05tnmf8h.js → chunk-aant41bd.js} +2 -2
  35. package/bin/{chunk-v1sgrg0r.js → chunk-anky1dmg.js} +1 -1
  36. package/bin/{chunk-k810fstm.js → chunk-bg2vgnzt.js} +1 -1
  37. package/bin/{chunk-3tyk9xgf.js → chunk-c0wqfya9.js} +2 -2
  38. package/bin/{chunk-8b1w6bj9.js → chunk-c3010erf.js} +1 -1
  39. package/bin/{chunk-vdnmq163.js → chunk-c7hr2jga.js} +2 -2
  40. package/bin/chunk-c8aw8dye.js +2 -0
  41. package/bin/{chunk-zr11zfwc.js → chunk-ckd5hnd0.js} +2 -2
  42. package/bin/{chunk-dkzyv61a.js → chunk-cphwmdq5.js} +2 -2
  43. package/bin/{chunk-typ46eqd.js → chunk-d70acjwn.js} +5 -5
  44. package/bin/{chunk-xznabrt2.js → chunk-dzj91k6v.js} +1 -1
  45. package/bin/chunk-e2724ggn.js +2 -0
  46. package/bin/chunk-e2j3vwcv.js +2 -0
  47. package/bin/{chunk-k3qypq3x.js → chunk-e2qn4d57.js} +1 -1
  48. package/bin/{chunk-kg2c445x.js → chunk-eedhf8eb.js} +1 -1
  49. package/bin/chunk-ef3av8ay.js +1 -0
  50. package/bin/{chunk-j41mya13.js → chunk-f3f6cary.js} +3 -3
  51. package/bin/chunk-fjvbgahx.css +1 -0
  52. package/bin/chunk-fw0f45qw.js +2 -0
  53. package/bin/{chunk-s30fjvzs.js → chunk-fw5xzcnf.js} +4 -4
  54. package/bin/{chunk-8sf106rq.js → chunk-g6rw4jj5.js} +1 -1
  55. package/bin/{chunk-dscq4a4k.js → chunk-g7qejgap.js} +2 -2
  56. package/bin/{chunk-4jgq9m51.js → chunk-gj0yxtqz.js} +7 -7
  57. package/bin/{chunk-m2h7a172.js → chunk-gvbajsje.js} +1 -1
  58. package/bin/{chunk-s63vj79f.js → chunk-h29rwayb.js} +1 -1
  59. package/bin/chunk-h37zfvmp.js +3 -0
  60. package/bin/{chunk-m638fg4n.js → chunk-ht4chp45.js} +5 -5
  61. package/bin/{chunk-3g5pyw2e.js → chunk-jpjc44j6.js} +2 -2
  62. package/bin/{chunk-9v6eqa3n.js → chunk-jraqe5z0.js} +2 -2
  63. package/bin/{chunk-yqvhgtez.js → chunk-jxfz4h24.js} +2 -2
  64. package/bin/chunk-jy8by162.js +1 -0
  65. package/bin/{chunk-53vtc74g.js → chunk-jyg525f5.js} +2 -2
  66. package/bin/chunk-jz9mcrj6.js +1 -0
  67. package/bin/chunk-k4n9rdq3.js +1 -0
  68. package/bin/{chunk-e17daz1x.js → chunk-kemfwmyq.js} +2 -2
  69. package/bin/{chunk-6rjkbwz6.js → chunk-kmx350y5.js} +9 -9
  70. package/bin/{chunk-887pj9xd.js → chunk-kn82bccp.js} +2 -2
  71. package/bin/chunk-kx0qbs28.js +1 -0
  72. package/bin/{chunk-nnq8g9yy.js → chunk-m0xbfmf0.js} +3 -3
  73. package/bin/{chunk-rbagbd0e.js → chunk-n6sny5c8.js} +1 -1
  74. package/bin/{chunk-ayq8dskd.js → chunk-nhfbnqdr.js} +2 -2
  75. package/bin/{chunk-5qkwpy8c.js → chunk-nr80mrry.js} +2 -2
  76. package/bin/{chunk-4f5pnnah.js → chunk-ns8whqp6.js} +30 -30
  77. package/bin/{chunk-p5fwjk5c.js → chunk-nz16584e.js} +1 -1
  78. package/bin/{chunk-yr03tf5r.js → chunk-p46em0kf.js} +3 -3
  79. package/bin/{chunk-gf4n4ahk.js → chunk-p4nbgn3v.js} +1 -1
  80. package/bin/chunk-p7j6zgdg.js +2 -0
  81. package/bin/chunk-pbyp1xnb.js +2 -0
  82. package/bin/{chunk-r55htzxr.js → chunk-pw81eh3g.js} +2 -2
  83. package/bin/{chunk-rkafv27g.js → chunk-q6k1ctph.js} +2 -2
  84. package/bin/{chunk-fhazy8f9.js → chunk-qa7pphr5.js} +1 -1
  85. package/bin/chunk-qah2r4xa.js +2 -0
  86. package/bin/chunk-r4w1e3bd.js +2 -0
  87. package/bin/{chunk-6kdf411z.js → chunk-rbh4w2v2.js} +1 -1
  88. package/bin/{chunk-3p1bb08a.js → chunk-rd5ek2sk.js} +2 -2
  89. package/bin/{chunk-8ystwvdt.js → chunk-rv15x8aw.js} +2 -2
  90. package/bin/{chunk-b0rjvx5g.js → chunk-ryvq9pbw.js} +2 -2
  91. package/bin/{chunk-4a88wwg2.js → chunk-s9whhdb3.js} +2 -2
  92. package/bin/{chunk-ycw3rwhx.js → chunk-sby10fz6.js} +3 -3
  93. package/bin/{chunk-q45n02fs.js → chunk-sedbz4km.js} +1 -1
  94. package/bin/{chunk-ccvjwhqq.js → chunk-sfwmwrq3.js} +1 -1
  95. package/bin/{chunk-zmjtv19e.js → chunk-sg8hjkyg.js} +1 -1
  96. package/bin/{chunk-3r5yc5wm.js → chunk-snedd3at.js} +6 -6
  97. package/bin/{chunk-an6nsq1t.js → chunk-spm13ndr.js} +2 -2
  98. package/bin/chunk-ss1jchgx.js +1 -0
  99. package/bin/{chunk-rdscv38p.js → chunk-szjkmkwc.js} +1 -1
  100. package/bin/chunk-t0nktwrm.js +1 -0
  101. package/bin/{chunk-1ntn42d2.js → chunk-t9eb2mdq.js} +3 -3
  102. package/bin/{chunk-njqf50vw.js → chunk-tcyp8qtg.js} +2 -2
  103. package/bin/{chunk-nn5hyf6f.js → chunk-tefct00a.js} +1 -1
  104. package/bin/{chunk-xca338dw.js → chunk-thzf89fp.js} +3 -3
  105. package/bin/{chunk-pcspeqwq.js → chunk-tnv4ggx2.js} +4 -4
  106. package/bin/chunk-tptgxbqa.js +2 -0
  107. package/bin/{chunk-xzyfnfck.js → chunk-v2901ff5.js} +8 -8
  108. package/bin/{chunk-vx66rms0.js → chunk-v2vdm22x.js} +1 -1
  109. package/bin/{chunk-5rk7dyx9.js → chunk-v8ngtwzx.js} +53 -53
  110. package/bin/chunk-xex9v0rn.js +2 -0
  111. package/bin/chunk-xs2w45vp.js +1 -0
  112. package/bin/{chunk-s41mgkse.js → chunk-xw7jea6g.js} +1 -1
  113. package/bin/chunk-xza8wate.js +2 -0
  114. package/bin/{chunk-pa1fmskf.js → chunk-yet4fnab.js} +1 -1
  115. package/bin/{chunk-ny7qjn6s.js → chunk-yfjyjjpz.js} +1 -1
  116. package/bin/{chunk-5vvvgjvz.js → chunk-ytffpk7c.js} +2 -2
  117. package/bin/{chunk-kq2qbwx1.js → chunk-yyj21k15.js} +1 -1
  118. package/bin/{chunk-5v4s2kp4.js → chunk-zhtc1j3r.js} +1 -1
  119. package/bin/{chunk-8gna37dd.js → chunk-zpk482rb.js} +2 -2
  120. package/bin/{chunk-zcdqsp1e.js → chunk-zy32pf0s.js} +1 -1
  121. package/bin/shumai-app.html +1 -1
  122. package/bin/shumai-app.js +562 -317
  123. package/package.json +7 -7
  124. package/prisma/migrations/20260927092537_add_notification_email_status/migration.sql +11 -0
  125. package/prisma/schema.prisma +10 -0
  126. package/bin/chunk-0xsgx9ep.js +0 -1
  127. package/bin/chunk-1ajgdv26.js +0 -1
  128. package/bin/chunk-30dsxm8s.js +0 -1
  129. package/bin/chunk-3b6h719s.js +0 -3
  130. package/bin/chunk-3m5kwcj7.js +0 -2
  131. package/bin/chunk-58e1a3re.js +0 -2
  132. package/bin/chunk-6ksrrayx.css +0 -1
  133. package/bin/chunk-bgm76rzj.js +0 -1
  134. package/bin/chunk-btmxr226.js +0 -1
  135. package/bin/chunk-ee3mrvqp.js +0 -2
  136. package/bin/chunk-fg6zf2gb.js +0 -2
  137. package/bin/chunk-fk712d68.js +0 -2
  138. package/bin/chunk-g9gmht89.js +0 -2
  139. package/bin/chunk-htpjtarr.js +0 -2
  140. package/bin/chunk-j547gtag.js +0 -2
  141. package/bin/chunk-jf4kcad0.js +0 -1
  142. package/bin/chunk-jt04mf5s.js +0 -2
  143. package/bin/chunk-k5hnrtrt.js +0 -1
  144. package/bin/chunk-q6jsw0rr.js +0 -211
  145. package/bin/chunk-qjzyze00.js +0 -1
  146. package/bin/chunk-rfhmk32e.js +0 -1
  147. package/bin/chunk-rkqpnyzx.js +0 -2
  148. package/bin/chunk-xbge27m4.js +0 -1
  149. package/bin/chunk-xcsz1wp7.js +0 -1
  150. package/bin/chunk-zb0az2tq.js +0 -2
  151. package/bin/chunk-zej27b5c.js +0 -2
@@ -1 +0,0 @@
1
- import{h,S,t,Z,Ue,A,lt,wt,Vp}from"./chunk-q6jsw0rr.js";import"./chunk-5rk7dyx9.js";import"./chunk-6rjkbwz6.js";import"./chunk-camzbwqh.js";import"./chunk-3p1bb08a.js";import"./chunk-887pj9xd.js";import"./chunk-zz0522zr.js";import"./chunk-rkafv27g.js";import"./chunk-r55htzxr.js";import"./chunk-ayq8dskd.js";import"./chunk-4a88wwg2.js";import"./chunk-j41mya13.js";import"./chunk-xca338dw.js";import"./chunk-xznabrt2.js";import{Gn}from"./chunk-kq2qbwx1.js";import{rr}from"./chunk-zej27b5c.js";import"./chunk-4m8gk79m.js";import"./chunk-9va1mzeq.js";import"./chunk-jt04mf5s.js";import"./chunk-8ystwvdt.js";import"./chunk-8sf106rq.js";import"./chunk-q1d7x1cc.js";import"./chunk-fhazy8f9.js";import"./chunk-0ygtayqf.js";S();function i(){let{projectId:o}=l.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:s}=rr(Vp(o)),e=s?.rootFolder,{data:n}=Z({queryKey:["folders",e],queryFn:()=>(async()=>await(await A.api.folders[":folderId"].$get({param:{folderId:e}})).json())(),enabled:!!e});if(!r||!e||!n)return t(wt,{});return t(Gn,{teamId:r,projectId:o,projectName:s.name??"",assetId:"recents",rootFolderId:e})}var l=Ue("/projects/$projectId/recents")({component:i});export{l as Route};
@@ -1 +0,0 @@
1
- import{h,S,t,Z,Ue,A,lt,wt,Gp}from"./chunk-q6jsw0rr.js";import"./chunk-5rk7dyx9.js";import"./chunk-6rjkbwz6.js";import"./chunk-camzbwqh.js";import"./chunk-3p1bb08a.js";import"./chunk-887pj9xd.js";import"./chunk-zz0522zr.js";import"./chunk-rkafv27g.js";import"./chunk-r55htzxr.js";import"./chunk-ayq8dskd.js";import"./chunk-4a88wwg2.js";import"./chunk-j41mya13.js";import"./chunk-xca338dw.js";import"./chunk-xznabrt2.js";import{Gn}from"./chunk-kq2qbwx1.js";import{rr}from"./chunk-zej27b5c.js";import"./chunk-4m8gk79m.js";import"./chunk-9va1mzeq.js";import"./chunk-jt04mf5s.js";import"./chunk-8ystwvdt.js";import"./chunk-8sf106rq.js";import"./chunk-q1d7x1cc.js";import"./chunk-fhazy8f9.js";import"./chunk-0ygtayqf.js";S();function l(){let{projectId:o}=c.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:s}=rr(Gp(o)),e=s?.rootFolder,{data:i}=Z({queryKey:["folders",e],queryFn:async()=>{let n=await A.api.folders[":folderId"].$get({param:{folderId:e}});if(!n.ok)throw Error("failed to fetch folder");return await n.json()},enabled:!!e});if(!r||!e||!i)return t(wt,{});return t(Gn,{teamId:r,projectId:o,projectName:s.name??"",assetId:e,rootFolderId:e})}var c=Ue("/projects/$projectId/")({component:l});export{c as Route};
@@ -1,2 +0,0 @@
1
- import{P,h,D,b,u,S,L,t,o,K,Z,B,ft,A,I,wr,F,Do,ke,ve,rn,bt,vt,er,we,Re,C,E,he,Ja,ge,Ae,W,Vr,Vt,fs,ps,ms,yf,Ne,ld,it,Fc,Lc,mr,dd,_b,Ob,Ri,qf,Wf,Kh,Wh,xl,ug,cp,Oo,Fo,Od,Je,Xe,et,tt,rt,nt,ot,st,ue,ie,me,Ge,le,H,ce,Pt,Nt,k,xo,So,Qr,kn,be,Ur,Kd}from"./chunk-q6jsw0rr.js";import{Ea,Ca,Or,lu,cu,es,ts,ys,vs}from"./chunk-5rk7dyx9.js";import{Ui,au}from"./chunk-xca338dw.js";import{qs}from"./chunk-zz0522zr.js";var ct=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ze=I("pencil",ct);S();S();function Qe({teamId:d,projectId:s,file:r,onSaveField:l,members:z,onCommentSelect:f,hideAnnotationControl:V=!1,readOnly:w=!1,publicFields:y,isPublic:m=!1,shareId:N,currentTime:q,onTyping:te,selectedCommentId:p,heightPercent:j,onHeightPercentChange:Q}){let{canEdit:O}=Pt(s),{fields:c,setFields:J}=Or(),se=K(),{ref:re,inView:fe}=Nt(),[a,M]=u(null),[U,ne]=u(!1),[Te,ze]=u(null),G=b(!1),Ve=b(0),Y=b(j),je=(e)=>{G.current=!0,Ve.current=e.clientY,Y.current=j,e.target.setPointerCapture?.(e.pointerId)},Me=P((e)=>{if(!G.current)return;let v=(Ve.current-e.clientY)/window.innerHeight*100,oe=Math.min(85,Math.max(10,Y.current+v));Q(oe)},[Q]),De=(e)=>{G.current=!1;try{e.target.releasePointerCapture?.(e.pointerId)}catch{}},{data:ee}=Z({queryKey:["fields",s],queryFn:async()=>{let e=await A.api.projects[":projectId"].fields.$get({param:{projectId:s}});if(!e.ok)throw Error("Failed to fetch fields");return await e.json()},enabled:!!s&&!y}),T=es(r);h(()=>{if(y)J(y,s);else if(ee)J(ee,s)},[ee,y,s,J]);let{data:xe,fetchNextPage:X,hasNextPage:Ie}=ft({queryKey:m?["shares",N,"files",r?.id,"comments"]:["files",r?.id,"comments"],queryFn:async({pageParam:e})=>{if(m){let i=localStorage.getItem(`share_pwd_${N}`)||"",v=await A.api.shares[":shareId"].files[":fileId"].comments.$get({param:{shareId:N,fileId:r.id},query:{after:e}},{headers:{"x-share-password":i}});if(!v.ok)throw Error("Failed to fetch comments");return await v.json()}else{let i=await A.api.files[":fileId"].comments.$get({param:{fileId:r.id},query:{after:e}});if(!i.ok)throw Error("Failed to fetch comments");return await i.json()}},enabled:!!r?.id&&(!m||!!N),initialPageParam:"",refetchInterval:2000,getNextPageParam:(e)=>e.pageInfo?.cursor||void 0}),{mutate:Pe}=B({mutationFn:async({text:e,attachmentIds:i,annotations:v,replyToId:oe,guestUserId:ye,second:Ce})=>{if(m){let de=localStorage.getItem(`share_pwd_${N}`)||"",Be=await A.api.shares[":shareId"].files[":fileId"].comments.$post({param:{shareId:N,fileId:r.id},json:{message:e,attachmentIds:i,replyToId:oe??void 0,annotations:v,second:Ce??void 0}},{headers:{"x-share-password":de,...ye?{"x-guest-user-id":ye}:{}}});if(!Be.ok)throw Error("Failed to create comment");return await Be.json()}else{let de=await A.api.files[":fileId"].comments.$post({param:{fileId:r.id},json:{message:e,attachmentIds:i,replyToId:oe??void 0,annotations:v,second:Ce??void 0}});if(!de.ok)throw Error("Failed to create comment");return await de.json()}},onSuccess:()=>{se.invalidateQueries({queryKey:m?["shares",N,"files",r?.id,"comments"]:["files",r?.id,"comments"]})},onError:()=>{k.error(Ob?.()||"Failed to post comment")}}),Se=xe?.pages?.[0]?.pageInfo?.total??xe?.pages.reduce((e,i)=>e+(i.data?.length||0),0)??0;h(()=>{if(fe&&Ie)X()},[fe,X,Ie]);let _=D(()=>(r?.fieldValues||[]).reduce((e,i)=>(e[i.fieldId]=i,e),{}),[r?.fieldValues]),ae=D(()=>[...c].sort((e,i)=>{let v=e.config?.name?.toLowerCase()||"",oe=i.config?.name?.toLowerCase()||"";if(v<oe)return-1;if(v>oe)return 1;return 0}),[c]),Ee=xe?.pages.flatMap((e)=>e.data??[])??[],_e=(e,i,v=[],oe,ye)=>{if(!e.trim()&&i.length===0&&v.length===0)return;let Ce=oe||a?.id||null;if(m){let de=localStorage.getItem(`guest_user_id_${N}`);if(!de)ze({text:e,attachmentIds:i,annotations:v,replyToId:Ce,second:ye}),ne(!0);else Pe({text:e,attachmentIds:i,annotations:v,replyToId:Ce,guestUserId:de,second:ye})}else Pe({text:e,attachmentIds:i,annotations:v,replyToId:Ce,second:ye});M(null)},Oe=(e)=>{if(Te)Pe({...Te,guestUserId:e}),ze(null),M(null)},Fe=(e)=>{let i=z.find((v)=>v.id===e);if(i)return i;return{id:"unknown",name:"Unknown",role:"unknown"}},Le=j<=15;return o("div",{style:{height:`${j}dvh`},className:"shrink-0 flex flex-col bg-background border-t border-border shadow-2xl rounded-t-2xl overflow-hidden select-none z-20","data-testid":"mobile-bottom-sheet",children:[t("div",{onPointerDown:je,onPointerMove:Me,onPointerUp:De,onPointerCancel:De,className:"w-full pt-2 pb-1.5 flex flex-col items-center justify-center cursor-grab active:cursor-grabbing touch-none shrink-0","aria-label":"Drag to resize bottom sheet",children:t("div",{className:"w-10 h-1 rounded-full bg-muted-foreground/30 hover:bg-muted-foreground/50 transition-colors"})}),o(xo,{defaultValue:"comments",className:"flex-1 flex flex-col min-h-0 px-2 pb-1 overflow-hidden",children:[o(So,{className:"w-full shrink-0 h-9 bg-muted/60 p-1",children:[o(Qr,{value:"comments",className:"flex-1 text-xs font-semibold py-1",children:[ld()," ",Se>0&&`(${Se})`]}),t(Qr,{value:"fields",className:"flex-1 text-xs font-semibold py-1",children:Ri()})]}),o(kn,{value:"comments",className:C("flex-1 flex flex-col overflow-hidden min-h-0 mt-2",Le&&"hidden"),children:[t("div",{className:"flex items-center justify-between px-2 pb-1.5 shrink-0 border-b border-border/50",children:o("span",{className:"text-xs font-bold text-foreground",children:[yf?.()||"All comments",Se>0?` (${Se})`:""]})}),t(ce,{className:"flex-1 min-h-0 px-2 py-2 [&>div>div]:block!",children:Ee.length===0?t("div",{className:"py-8 text-center text-xs text-muted-foreground",children:Wh()}):o("div",{className:"space-y-3",children:[Ee.map((e)=>o("div",{children:[t(Ui,{teamId:d,message:e,getUser:Fe,onReply:M,hasReplies:!!e.replies?.length,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,isSelected:p===e.id,onSelect:()=>{f?.(e)},readOnly:w,isPublic:m}),e.replies?.map((i,v)=>t("div",{children:t(Ui,{teamId:d,isReply:!0,message:i,getUser:Fe,onReply:M,hasReplies:!1,isLastReply:v===(e.replies?.length??0)-1,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,isSelected:p===i.id,onSelect:()=>{f?.(i)},readOnly:w,isPublic:m})},i.id))]},e.id)),t("div",{ref:re})]})}),(!w||m)&&t("div",{className:"mt-auto shrink-0 bg-background border-t border-border pt-1",children:t(au,{isOpen:U,onClose:()=>ne(!1),onSuccess:Oe,children:t(qs,{projectId:s,onSendMessage:_e,replyingTo:a,onCancelReply:()=>M(null),hideAnnotationControl:V,disableMentions:m,currentTime:T?.commentsConfig?.hasTimestamp?q:void 0,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,onTyping:te})})})]}),t(kn,{value:"fields",className:C("flex-1 flex flex-col overflow-hidden min-h-0 mt-2",Le&&"hidden"),children:t(ce,{className:"flex-1 px-3 py-2 min-h-0 [&>div>div]:block!",children:ae&&ae.length>0?t("div",{className:"space-y-4 pb-6",children:ae.map((e)=>o("div",{className:"space-y-1.5",children:[t("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:e.config?.name}),t("div",{className:"min-h-[32px]",children:t(vs,{fieldId:e.id,config:e.config,value:_[e.id]?.value,onSave:O?(i)=>l(e.id,i):void 0,readOnly:w||e.readOnly||!O})})]},e.id))}):t("div",{className:"py-8 text-center text-xs text-muted-foreground",children:"No custom fields defined"})})})]})]})}function Ye({fileName:d,folderName:s,version:r,versions:l,activeFileId:z,isPublic:f=!1,shareId:V,allowDownload:w=!0,downloadInfo:y,canEdit:m=!1,onBack:N,onPrevFile:q,onNextFile:te,hasPrevFile:p=!1,hasNextFile:j=!1,onSelectVersion:Q,onRename:O,onDelete:c,onLinkedTasks:J,linkedTaskCount:se=0}){let re=async(a)=>{try{let M=f&&V?await A.api.shares[":shareId"].files[":fileId"]["download-url"].$post({param:{shareId:V,fileId:z},json:{key:a}}):await A.api.files["download-url"].$post({json:{key:a,assetId:z}});if(!M.ok)return;let{url:U}=await M.json(),ne=document.createElement("a");ne.href=U,ne.download="",document.body.appendChild(ne),ne.click(),document.body.removeChild(ne)}catch{}},fe=(y?.videoTranscodes?.length??0)>0;return o("header",{className:"flex h-12 w-full items-center justify-between border-b border-border bg-card px-2 py-1.5 shrink-0 select-none z-30",children:[t("div",{className:"flex items-center",children:t(E,{variant:"ghost",size:"icon",onClick:N,className:"h-8 w-8 text-foreground hover:bg-accent cursor-pointer","aria-label":cp(),children:t(rn,{className:"h-5 w-5"})})}),o("div",{className:"flex flex-1 items-center justify-center gap-1 min-w-0 px-1",children:[o("div",{className:"flex items-center min-w-0 max-w-[65vw]",children:[s&&o(L,{children:[t("span",{className:"truncate text-xs font-medium text-muted-foreground max-w-[80px]",children:s}),t("span",{className:"text-muted-foreground mx-1 text-xs",children:"/"})]}),l&&l.length>1?o(he,{modal:!1,children:[t(ge,{asChild:!0,children:o("button",{className:"flex items-center gap-1 min-w-0 truncate text-xs font-medium text-foreground hover:bg-accent rounded px-1 py-0.5 transition-colors cursor-pointer",children:[t("span",{className:"truncate max-w-[120px] font-semibold",children:d}),r!==void 0&&o(be,{variant:"outline",className:"px-1 py-0 text-[10px] shrink-0 font-normal",children:["v",r]}),t(ve,{className:"h-3 w-3 shrink-0 text-muted-foreground"})]})}),o(Ae,{align:"center",className:"w-48 z-40",children:[t(Vr,{className:"text-xs",children:Od()}),l.map((a)=>o(W,{onClick:()=>Q?.(a.id),className:C("flex items-center justify-between text-xs cursor-pointer",a.id===z?"bg-accent font-semibold text-accent-foreground":""),children:[o("span",{children:["v",a.version]}),t("span",{className:"text-[11px] text-muted-foreground truncate max-w-[120px]",children:a.name||d})]},a.id))]})]}):o("div",{className:"flex items-center gap-1 min-w-0 truncate",children:[t("span",{className:"truncate text-xs font-semibold text-foreground max-w-[140px]",children:d}),r!==void 0&&o(be,{variant:"outline",className:"px-1 py-0 text-[10px] shrink-0 font-normal",children:["v",r]})]})]}),(p||j)&&o("div",{className:"flex items-center gap-0.5 shrink-0 bg-muted/60 rounded p-0.5 ml-1",children:[t(E,{variant:"ghost",size:"icon",disabled:!p,onClick:q,className:"h-5 w-5 p-0 text-muted-foreground hover:text-foreground disabled:opacity-30 cursor-pointer",title:ug(),"aria-label":ug(),children:t(rn,{className:"h-3.5 w-3.5"})}),t(E,{variant:"ghost",size:"icon",disabled:!j,onClick:te,className:"h-5 w-5 p-0 text-muted-foreground hover:text-foreground disabled:opacity-30 cursor-pointer",title:Kh(),"aria-label":Kh(),children:t(bt,{className:"h-3.5 w-3.5"})})]})]}),t("div",{className:"flex items-center gap-1",children:o(he,{modal:!1,children:[t(ge,{asChild:!0,children:t(E,{variant:"ghost",size:"icon",className:"h-8 w-8 text-foreground hover:bg-accent cursor-pointer","aria-label":Wf(),children:t(wr,{className:"h-4 w-4"})})}),o(Ae,{align:"end",className:"w-52 z-40",children:[w&&(fe?o(fs,{children:[o(ps,{className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(vt,{className:"h-3.5 w-3.5"}),t("span",{children:mr()})]}),t(Ja,{children:o(ms,{className:"w-48 z-50",children:[t(Vr,{className:"text-xs",children:mr()}),y?.videoTranscodes?.map((a)=>{let M=Math.max(a.width,a.height),U=`${a.height}p`;if(M>=3840)U="2160p";else if(M>=1920)U="1080p";else if(M>=1280)U="720p";else if(M>=960)U="540p";else if(M>=640)U="360p";else if(M>=320)U="180p";return o(W,{onClick:()=>re(a.key),className:"flex items-center justify-between text-xs cursor-pointer",children:[t("span",{children:U}),t("span",{className:"text-[10px] text-muted-foreground",children:"MP4"})]},U)}),y?.originalKey&&o(L,{children:[t(Vt,{}),o(W,{onClick:()=>re(y.originalKey),className:"flex items-center justify-between text-xs cursor-pointer",children:[t("span",{children:xl?.()||"Original"}),t("span",{className:"text-[10px] text-muted-foreground",children:d.split(".").pop()?.toUpperCase()||"RAW"})]})]})]})})]}):o(W,{onClick:()=>y?.originalKey&&re(y.originalKey),disabled:!y?.originalKey,className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(vt,{className:"h-3.5 w-3.5"}),t("span",{children:mr()})]})),l&&l.length>1&&Q&&o(fs,{children:[t(ps,{className:"flex items-center gap-2 text-xs cursor-pointer",children:t("span",{children:Od?.()||"Switch version"})}),t(Ja,{children:o(ms,{className:"w-48 z-50",children:[t(Vr,{className:"text-xs",children:Od?.()||"Switch version"}),l.map((a)=>o(W,{onClick:()=>Q(a.id),className:C("flex items-center justify-between text-xs cursor-pointer",a.id===z?"bg-accent font-semibold text-accent-foreground":""),children:[o("span",{children:["v",a.version]}),t("span",{className:"text-[10px] text-muted-foreground truncate max-w-[120px]",children:a.name||d})]},a.id))]})})]}),J&&o(W,{onClick:J,className:"flex items-center justify-between text-xs cursor-pointer",children:[o("span",{className:"flex items-center gap-2",children:[t(Do,{className:"h-3.5 w-3.5"}),t("span",{children:qf?.()||"Linked Tasks"})]}),se>0&&t("span",{className:"inline-flex items-center justify-center px-1.5 py-0.2 text-[10px] font-semibold rounded-full bg-muted-foreground/15 text-foreground",children:se})]}),m&&O&&o(W,{onClick:O,className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(Ze,{className:"h-3.5 w-3.5"}),t("span",{children:Oo()})]}),m&&c&&o(L,{children:[t(Vt,{}),o(W,{onClick:c,className:"flex items-center gap-2 text-xs text-destructive focus:text-destructive cursor-pointer",children:[t(we,{className:"h-3.5 w-3.5"}),t("span",{children:it()})]})]})]})]})})]})}function Fl({projectId:d,teamId:s="",fileId:r,file:l,projectInfo:z,ancestorFolders:f=[],versions:V,activeFileId:w,startTime:y,isPublic:m=!1,shareId:N,allowDownload:q=!0,publicFields:te,siblingFiles:p=[],onNavigateToFile:j,onNavigateBack:Q,onRenameFile:O,onDeleteFile:c,onSaveField:J,onSelectVersion:se}){let{canEdit:re}=Pt(d),{members:fe}=Ur(),a=b(null),[M,U]=u(50),[ne,Te]=u([]),[ze,G]=u(0),[Ve,Y]=u(null),[je,Me]=u(!1),[De,ee]=u(""),T=b(null),[xe,X]=u(!1),[Ie,Pe]=u(!1),[Se,_]=u(!1),[ae,Ee]=u(!1),{data:_e}=Z({queryKey:["teams",s,"kanban","assets",w,"tasks"],queryFn:async()=>{if(!s||!w||m)return{data:[],total:0};let x=await A.api.teams[":teamId"].kanban.assets[":assetId"].tasks.$get({param:{teamId:s,assetId:w}});if(!x.ok)return{data:[],total:0};return await x.json()},enabled:!!s&&!!w&&!m}),Oe=_e?.total??_e?.data?.length??0,{prevFile:Fe,nextFile:Le}=D(()=>{if(!p||p.length===0)return{prevFile:null,nextFile:null};let x=p.findIndex((pe)=>pe.id===r||pe.id===w);if(x===-1)return{prevFile:null,nextFile:null};return{prevFile:x>0?p[x-1]:null,nextFile:x<p.length-1?p[x+1]:null}},[p,r,w]),e=f.length>0?f[0]?.name:z?.name,v=V?.find((x)=>x.id===w)?.version??(V&&V.length>0?V.length:void 0),oe=D(()=>({originalKey:l.media?.original?.key,videoTranscodes:l.media?.videoTranscodes?.map((x)=>({key:x.key,width:x.width,height:x.height}))}),[l.media]),ye=()=>{Te([]),Y(null)},Ce=(x)=>{Y(x.id||null);let pe=x.annotations;if(pe&&pe.length>0)Te(pe);else Te([]);if(x.second!==null&&x.second!==void 0)a.current?.seekTo(x.second),a.current?.pause();else if(pe&&pe.length>0)a.current?.pause()},de=async(x)=>{if(x?.preventDefault(),!De.trim()||!O)return;try{Pe(!0),await O(De.trim()),Me(!1)}finally{Pe(!1)}},Be=async()=>{if(!c)return;try{X(!0),await c(),_(!1)}finally{X(!1)}};return h(()=>{G(0),Y(null),Te([])},[l?.id]),o("div",{className:"flex h-[100dvh] w-full flex-col bg-background overflow-hidden relative",children:[t(Ye,{fileName:l.name,folderName:e,version:v,versions:V,activeFileId:w,isPublic:m,shareId:N,allowDownload:q,downloadInfo:oe,canEdit:re,onBack:Q,hasPrevFile:!!Fe,hasNextFile:!!Le,onPrevFile:()=>Fe&&j(Fe.id),onNextFile:()=>Le&&j(Le.id),onSelectVersion:se,onRename:()=>{ee(l.name),Me(!0)},onDelete:()=>_(!0),onLinkedTasks:!m?()=>Ee(!0):void 0,linkedTaskCount:Oe}),t("div",{className:"relative flex-1 min-h-0 bg-background overflow-hidden flex flex-col",children:t(ts,{file:l,mediaControllerRef:a,onPlay:ye,onTimeUpdate:G,annotations:ne,startTime:y,shareId:N,allowDownload:q})}),t(Qe,{teamId:s,projectId:d,file:l,onSaveField:J,members:fe,onCommentSelect:Ce,hideAnnotationControl:l.proxyType==="audio",readOnly:m||!re,publicFields:te,isPublic:m,shareId:N,currentTime:ze,onTyping:()=>a.current?.pause(),selectedCommentId:Ve,heightPercent:M,onHeightPercentChange:U}),!m&&ae&&t(Kd,{teamId:s,assetId:w,assetName:l.name,isOpen:ae,onClose:()=>Ee(!1)}),!m&&t(ue,{open:je,onOpenChange:Me,children:t(ie,{children:o("form",{onSubmit:de,children:[t(me,{children:t(le,{children:Oo()})}),t("div",{className:"py-4",children:t(H,{ref:T,value:De,onChange:(x)=>ee(x.target.value),placeholder:dd?.()||"Enter new name",onFocus:()=>{setTimeout(()=>{if(T.current)ys(T.current)},0)},autoFocus:!0})}),o(Ge,{children:[t(E,{type:"button",variant:"outline",onClick:()=>Me(!1),children:Ne()}),o(E,{type:"submit",disabled:Ie||!De.trim(),children:[Ie&&t(F,{className:"mr-2 h-4 w-4 animate-spin"}),Fo()]})]})]})})}),!m&&t(Je,{open:Se,onOpenChange:_,children:o(Xe,{children:[o(et,{children:[t(rt,{children:Lc?.()||"Delete Asset?"}),t(nt,{children:Fc?.()||"Deleted items can be recovered for 30 days before being permanently deleted."})]}),o(tt,{children:[t(st,{children:Ne()}),o(ot,{onClick:Be,disabled:xe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[xe&&t(F,{className:"mr-2 h-4 w-4 animate-spin"}),it()]})]})]})})]})}S();function We({activeState:d,activeAsset:s,previewUrl:r,isFullScreen:l,onTogglePlay:z,onToggleLoop:f,onSeek:V,onVolumeChange:w,onToggleMute:y,onChangePlaybackRate:m,onChangeResolution:N,onZoomIn:q,onZoomOut:te,onFit:p,onDownload:j,onToggleFullScreen:Q,allowDownload:O=!0}){if(d?.kind==="video"&&d.video&&s){let c=d.video,J=c.totalFrames/c.frameRate,se=c.currentFrame/c.frameRate,re={isPlaying:c.isPlaying,progress:J>0?se/J*100:0,currentTime:se,duration:J,volume:c.volume,isMuted:c.isMuted,isLooping:c.isLooping,playbackRate:c.playbackRate,isFullScreen:l,showFrames:!1,currentResolution:c.currentResolution},fe=r&&!s.media?.videoPreview?{...s,media:{...s.media,videoPreview:{url:r}}}:s;return t(lu,{state:re,zoom:d.zoom,isControlsVisible:!0,floatOverlayInFullScreen:!1,buffered:c.buffered,data:fe,resolutions:c.resolutions,togglePlay:z,toggleLoop:f,toggleMute:y,handleVolumeChange:w,changePlaybackRate:m,changeResolution:(a)=>N(a.resolution),handleDownload:(a)=>j(a),toggleFullScreen:Q,onZoomChange:(a)=>a>=d.zoom?q():te(),onZoomReset:p,frameRate:c.frameRate,totalFrames:c.totalFrames,currentFrame:c.currentFrame,seekToFrame:V,allowDownload:O})}if(d?.kind==="image")return t(cu,{zoom:d.zoom,onZoomIn:q,onZoomOut:te,onFit:p,onDownload:()=>j(),canDownload:!!s?.media?.original?.key,fullscreen:{isFullScreen:l,onToggle:Q},allowDownload:O});return t("div",{className:"relative z-10 flex items-center justify-end gap-2 border-t border-border bg-card px-4 py-3",children:t("button",{onClick:Q,className:"text-foreground transition-colors hover:text-primary",title:"Fullscreen",children:l?t(Ca,{className:"h-5 w-5"}):t(Ea,{className:"h-5 w-5"})})})}function qe({side:d,fileName:s,version:r,activeVersionId:l,versions:z,isActive:f,onActivate:V,onSwitchVersion:w,onExit:y}){let m=C("flex-shrink-0 rounded p-1 transition-colors hover:bg-muted",f?"text-foreground":"text-muted-foreground hover:text-foreground"),N=t("button",{onClick:y,title:_b(),className:m,children:t(Re,{className:"h-4 w-4"})}),q=o("button",{onClick:V,className:C("flex min-w-0 items-center gap-1 rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-muted",f?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[t("span",{className:"truncate",children:s}),r!==void 0&&o("span",{className:C("flex-shrink-0 rounded border px-1 py-0 text-xs",f?"border-foreground/40":"border-border"),children:["v",r]})]}),te=o(he,{children:[t(ge,{onClick:V,title:Od(),className:m,children:t(ve,{className:"h-4 w-4"})}),t(Ae,{align:d==="left"?"start":"end",className:"w-80 p-1",children:t("div",{className:"flex max-h-96 flex-col gap-1 overflow-y-auto",children:z.map((p)=>{let j=p.id===l;return o(W,{onClick:()=>w(p.id),className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2",children:[o("div",{className:"flex min-w-[2rem] flex-shrink-0 items-center justify-center rounded-full bg-muted px-2 py-0.5 text-xs font-semibold text-muted-foreground select-none",children:["v",p.version]}),t("div",{className:"flex h-10 w-16 flex-shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.previewUrl?t("img",{src:p.previewUrl,alt:p.name||void 0,className:"h-full w-full object-cover"}):t(er,{className:"h-4 w-4 text-muted-foreground"})}),o("div",{className:"flex min-w-0 flex-1 flex-col text-left",children:[t("span",{className:"truncate text-sm font-semibold text-foreground",children:p.name}),t("span",{className:"truncate text-xs text-muted-foreground",children:p.creator?.name||"Unknown"})]}),j&&t(ke,{className:"ml-auto h-4 w-4 flex-shrink-0 text-primary"})]},p.id)})})})]});return t("div",{onMouseDown:V,className:C("dark flex h-10 flex-shrink-0 items-center gap-1 border-b bg-background px-2 transition-colors",f?"border-b-2 border-primary":"border-border"),children:d==="left"?o(L,{children:[N,q,te]}):o(L,{children:[q,te,t("div",{className:"ml-auto"}),N]})})}function at(d,s,r){return Z({queryKey:s?["public-share-file",r,d,localStorage.getItem(`share_pwd_${r}`)||""]:["files",d],queryFn:async()=>{if(s){let z=localStorage.getItem(`share_pwd_${r}`)||"",f=await A.api.shares[":shareId"].files[":fileId"].$get({param:{shareId:r,fileId:d}},{headers:{"x-share-password":z}});if(!f.ok)throw Error("Failed to fetch version asset");return await f.json()}let l=await A.api.files[":fileId"].$get({param:{fileId:d}});if(!l.ok)throw Error("Failed to fetch version asset");return await l.json()},enabled:!!d&&(!s||!!r)})}function Ll({isPublic:d=!1,shareId:s,versions:r,leftId:l,rightId:z,activeSide:f,annotations:V,seekRequest:w,onActiveSideChange:y,onSwitchVersion:m,onExit:N,onActiveAssetChange:q,onPlay:te,onTimeUpdate:p,allowDownload:j=!0}){let Q=b(null),O=b(null),c=b(null),[J,se]=u(null),[re,fe]=u(null),[a,M]=u(1),[U,ne]=u(!1),[Te,ze]=u(!1),{data:G,isLoading:Ve}=at(l,d,s),{data:Y,isLoading:je}=at(z,d,s),Me=es(G),De=es(Y),ee=!!G&&!!Y&&Me.id===De.id,T=f==="left"?G:Y,xe=f==="left"?J:re,X=P(()=>f==="left"?O.current:c.current,[f]),Ie=P(()=>f==="left"?c.current:O.current,[f]);h(()=>{q(T??null)},[T,q]),h(()=>{if(!w)return;let n=X();if(n?.seekToSecond(w.second),n?.pause(),ee){let g=Ie();g?.seekToSecond(w.second),g?.pause()}},[w?.nonce]),h(()=>{let n=()=>ze(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",n),()=>document.removeEventListener("fullscreenchange",n)},[]);let Pe=P((n)=>se(n),[]),Se=P((n)=>fe(n),[]),_=P((n)=>{let g=X();if(g)n(g);if(ee){let R=Ie();if(R)n(R)}},[X,Ie,ee]),ae=P(()=>{let n=!xe?.video?.isPlaying;_((g)=>n?g.play():g.pause())},[xe?.video?.isPlaying,_]);h(()=>{let n=(g)=>{let R=document.activeElement;if(R&&(R.tagName==="INPUT"||R.tagName==="TEXTAREA"||R instanceof HTMLElement&&R.isContentEditable))return;let He=g.key===" ",Ue=R&&(R.tagName==="BUTTON"||R.tagName==="A"||R.tagName==="SELECT"||R.tagName==="OPTION"||R.getAttribute("role")==="button"||R.getAttribute("role")==="link"||R.getAttribute("role")==="checkbox"||R.getAttribute("role")==="radio"||R.getAttribute("role")==="menuitem");if(He&&Ue)return;if(g.key===" "||g.key.toLowerCase()==="k")g.preventDefault(),ae()};return window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}},[ae]);let Ee=P((n)=>_((g)=>g.seekToFrame(n)),[_]),_e=P(()=>X()?.toggleLoop(),[X]),Oe=P((n)=>{M(n),ne(n===0)},[]),Fe=P(()=>ne((n)=>!n),[]),Le=P((n)=>_((g)=>g.setPlaybackRate(n)),[_]),e=P((n)=>X()?.changeResolution(n),[X]),i=P(()=>_((n)=>n.zoomBy(1.2)),[_]),v=P(()=>_((n)=>n.zoomBy(0.8)),[_]),oe=P(()=>_((n)=>n.fit()),[_]),ye=P((n)=>{X()?.download(n)},[X]),Ce=P(()=>{let n=Q.current;if(!n||typeof n.requestFullscreen!=="function")return;if(!document.fullscreenElement)n.requestFullscreen().catch(()=>{});else if(document.exitFullscreen)document.exitFullscreen().catch(()=>{})},[]),de=P((n,g)=>{if(ee)c.current?.panBy(n,g)},[ee]),Be=P((n,g)=>{if(ee)O.current?.panBy(n,g)},[ee]),x=P(()=>ae(),[ae]),pe=P((n)=>r.find((g)=>g.id===n)?.version,[r]),lt=D(()=>T?.media?.videoPreview?.url,[T?.media?.videoPreview?.url]),Ke=(n,g)=>{let He=es(g)?.comparePane;if(!He)return t("div",{className:"flex flex-1 items-center justify-center bg-gray-100 dark:bg-gray-950",children:t("p",{className:"text-muted-foreground",children:"Preview unavailable"})});let Ue=f===n;return t(He,{ref:n==="left"?O:c,file:g,shareId:s,isActive:Ue,annotations:Ue?V:[],onStateChange:n==="left"?Pe:Se,onUserPan:n==="left"?de:Be,onActivate:()=>y(n),muted:Ue?U:!0,volume:a,onPlay:te,onTimeUpdate:p,onRequestTogglePlay:x},g.id)},dt=!!G&&!!Y,mt=Ve||je;return o("div",{ref:Q,className:"flex h-full flex-1 flex-col bg-background",children:[o("div",{className:"flex min-h-0 flex-1",children:[o("div",{className:"flex min-w-0 flex-1 flex-col border-r border-zinc-800",children:[G&&t(qe,{side:"left",fileName:G.name,version:pe(l),activeVersionId:l,versions:r,isActive:f==="left",onActivate:()=>y("left"),onSwitchVersion:(n)=>m("left",n),onExit:N}),t("div",{className:"relative flex min-h-0 flex-1",children:G?Ke("left",G):t("div",{className:"flex flex-1 items-center justify-center",children:t(F,{className:"h-6 w-6 animate-spin text-foreground"})})})]}),o("div",{className:"flex min-w-0 flex-1 flex-col",children:[Y&&t(qe,{side:"right",fileName:Y.name,version:pe(z),activeVersionId:z,versions:r,isActive:f==="right",onActivate:()=>y("right"),onSwitchVersion:(n)=>m("right",n),onExit:N}),t("div",{className:"relative flex min-h-0 flex-1",children:Y?Ke("right",Y):t("div",{className:"flex flex-1 items-center justify-center",children:t(F,{className:"h-6 w-6 animate-spin text-foreground"})})})]})]}),mt&&!dt&&t("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/30",children:t(F,{className:"h-8 w-8 animate-spin text-foreground"})}),t(We,{activeState:xe,activeAsset:T??null,previewUrl:lt,isFullScreen:Te,onTogglePlay:ae,onToggleLoop:_e,onSeek:Ee,onVolumeChange:Oe,onToggleMute:Fe,onChangePlaybackRate:Le,onChangeResolution:e,onZoomIn:i,onZoomOut:v,onFit:oe,onDownload:ye,onToggleFullScreen:Ce,allowDownload:j})]})}
2
- export{Fl,Ll};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{nf,Pn,ic,lc,cc,uc,_u,yu,im,yA,Ss,jo,zr}from"./chunk-t3t7dcfq.js";export{cc as EncryptJWT,lc as SignJWT,im as UnsecuredJWT,nf as base64url,uc as calculateJwkThumbprint,_u as createLocalJWKSet,yu as createRemoteJWKSet,zr as decodeJwt,jo as decodeProtectedHeader,Ss as importJWK,yA as importPKCS8,ic as jwtDecrypt,Pn as jwtVerify};
@@ -1,2 +0,0 @@
1
- import{I}from"./chunk-q6jsw0rr.js";var e=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ql=I("code",e);
2
- export{Ql};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{rf}from"./chunk-hye75kp0.js";export default rf();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{wc,xc,Fu}from"./chunk-rkqpnyzx.js";export{wc as ENV_KEY,xc as ENV_SECRET,Fu as fromEnv};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wi}from"./chunk-fvgb6rps.js";export default Wi();
@@ -1 +0,0 @@
1
- import{t,Ue}from"./chunk-q6jsw0rr.js";import"./chunk-6rjkbwz6.js";import"./chunk-camzbwqh.js";import"./chunk-3p1bb08a.js";import"./chunk-5rk7dyx9.js";import"./chunk-887pj9xd.js";import"./chunk-ayq8dskd.js";import"./chunk-4a88wwg2.js";import"./chunk-j41mya13.js";import"./chunk-xca338dw.js";import"./chunk-zz0522zr.js";import"./chunk-ee3mrvqp.js";import"./chunk-xznabrt2.js";import{va}from"./chunk-58e1a3re.js";import"./chunk-4m8gk79m.js";import"./chunk-jt04mf5s.js";import"./chunk-8ystwvdt.js";import"./chunk-8sf106rq.js";import"./chunk-q1d7x1cc.js";import"./chunk-fhazy8f9.js";import"./chunk-0ygtayqf.js";function p(){let{shareId:a,fileId:s}=e.useParams(),{start:n,version:o,compare:r,cmpLeft:i,cmpRight:l,cmpActive:c}=e.useSearch();return t(va,{shareId:a,initialFileId:s,startTime:n,versionId:o,compare:r,compareLeftId:i,compareRightId:l,compareActiveSide:c})}var e=Ue("/share/$shareId/files/$fileId")({component:p});export{e as Route};
@@ -1,2 +0,0 @@
1
- import{I}from"./chunk-q6jsw0rr.js";var e=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Io=I("terminal",e);
2
- export{Io};
@@ -1 +0,0 @@
1
- import{h,S,t,Z,Ue,A,lt,wt,Xp}from"./chunk-q6jsw0rr.js";import"./chunk-5rk7dyx9.js";import"./chunk-6rjkbwz6.js";import"./chunk-camzbwqh.js";import"./chunk-3p1bb08a.js";import"./chunk-887pj9xd.js";import"./chunk-zz0522zr.js";import"./chunk-rkafv27g.js";import"./chunk-r55htzxr.js";import"./chunk-ayq8dskd.js";import"./chunk-4a88wwg2.js";import"./chunk-j41mya13.js";import"./chunk-xca338dw.js";import"./chunk-xznabrt2.js";import{Gn}from"./chunk-kq2qbwx1.js";import{rr}from"./chunk-zej27b5c.js";import"./chunk-4m8gk79m.js";import"./chunk-9va1mzeq.js";import"./chunk-jt04mf5s.js";import"./chunk-8ystwvdt.js";import"./chunk-8sf106rq.js";import"./chunk-q1d7x1cc.js";import"./chunk-fhazy8f9.js";import"./chunk-0ygtayqf.js";S();function l(){let{projectId:o,folderId:n}=c.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:s}=rr(Xp(o)),e=s?.rootFolder,{data:i}=Z({queryKey:["folders",e],queryFn:()=>(async()=>await(await A.api.folders[":folderId"].$get({param:{folderId:e}})).json())(),enabled:!!e});if(!r||!e||!i)return t(wt,{});return t(Gn,{teamId:r,projectId:o,projectName:s.name??"",assetId:n,rootFolderId:e})}var c=Ue("/projects/$projectId/folders/$folderId")({component:l});export{c as Route};