test-lah 1.0.6 → 1.0.8

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 (54) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +24 -24
  3. package/.next/standalone/.next/app-path-routes-manifest.json +5 -5
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/prerender-manifest.json +15 -15
  6. package/.next/standalone/.next/server/app/(dashboard)/integrations/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page.js +5 -5
  8. package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/summary/page.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/summary/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  16. package/.next/standalone/.next/server/app/api/e2e/route_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/api/generate/route_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/api/llm/encrypt/route_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/api/llm/test/route_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/api/weather/route_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/index.html +1 -1
  22. package/.next/standalone/.next/server/app/index.rsc +2 -2
  23. package/.next/standalone/.next/server/app/integrations.html +1 -1
  24. package/.next/standalone/.next/server/app/integrations.rsc +3 -3
  25. package/.next/standalone/.next/server/app/login/page.js +1 -1
  26. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app/login.html +1 -1
  28. package/.next/standalone/.next/server/app/login.rsc +2 -2
  29. package/.next/standalone/.next/server/app/page.js +1 -1
  30. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/projects.html +1 -1
  32. package/.next/standalone/.next/server/app/projects.rsc +3 -3
  33. package/.next/standalone/.next/server/app-paths-manifest.json +5 -5
  34. package/.next/standalone/.next/server/chunks/615.js +1 -1
  35. package/.next/standalone/.next/server/chunks/736.js +2 -2
  36. package/.next/standalone/.next/server/chunks/845.js +5 -5
  37. package/.next/standalone/.next/server/pages/404.html +1 -1
  38. package/.next/standalone/.next/server/pages/500.html +1 -1
  39. package/.next/standalone/.next/static/chunks/app/(dashboard)/{layout-69e4ea7abe9faff3.js → layout-a5bf2535f1470c77.js} +1 -1
  40. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-7205f74080ad5010.js +1 -0
  41. package/.next/standalone/.next/static/css/f78c165472d53f48.css +3 -0
  42. package/.next/standalone/package.json +1 -1
  43. package/.next/static/chunks/app/(dashboard)/{layout-69e4ea7abe9faff3.js → layout-a5bf2535f1470c77.js} +1 -1
  44. package/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-7205f74080ad5010.js +1 -0
  45. package/.next/static/css/f78c165472d53f48.css +3 -0
  46. package/package.json +1 -1
  47. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-3bb51b4a324c09b6.js +0 -1
  48. package/.next/standalone/.next/static/css/aef2f5f25a3c4a6a.css +0 -3
  49. package/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-3bb51b4a324c09b6.js +0 -1
  50. package/.next/static/css/aef2f5f25a3c4a6a.css +0 -3
  51. /package/.next/standalone/.next/static/{iIE9EA9ZHZT920YmMjduY → 5bU_Xo0_CNnVnb2HQeysr}/_buildManifest.js +0 -0
  52. /package/.next/standalone/.next/static/{iIE9EA9ZHZT920YmMjduY → 5bU_Xo0_CNnVnb2HQeysr}/_ssgManifest.js +0 -0
  53. /package/.next/static/{iIE9EA9ZHZT920YmMjduY → 5bU_Xo0_CNnVnb2HQeysr}/_buildManifest.js +0 -0
  54. /package/.next/static/{iIE9EA9ZHZT920YmMjduY → 5bU_Xo0_CNnVnb2HQeysr}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[305],{63:(e,t,r)=>{"use strict";var a=r(7260);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}})},265:(e,t,r)=>{"use strict";r.d(t,{Vx:()=>n,p1:()=>o});var a=r(5155),s=r(2115);let l=(0,s.createContext)(null);function o(){let e=(0,s.useContext)(l);if(!e)throw Error("useProgress must be used within ProgressProvider");return e}function n(e){let{children:t}=e,[r,o]=(0,s.useState)(0),[n,i]=(0,s.useState)(""),[c,d]=(0,s.useState)(!1),u=(0,s.useRef)(null),x=(0,s.useRef)(null),h=(0,s.useCallback)(()=>{u.current&&(clearInterval(u.current),u.current=null),x.current&&(clearTimeout(x.current),x.current=null)},[]),p=(0,s.useCallback)(()=>{d(!1),o(0),i("")},[]),m=(0,s.useCallback)(e=>{h(),o(0),i(e||""),d(!0),u.current=setInterval(()=>{o(e=>e>=90?(u.current&&clearInterval(u.current),u.current=null,90):e+15*Math.random())},300),x.current=setTimeout(()=>{p()},8e3)},[h,p]),v=(0,s.useCallback)((e,t)=>{o(Math.min(95,e)),t&&i(t)},[]),g=(0,s.useCallback)(e=>{h(),o(100),e&&i(e),setTimeout(()=>{p()},500)},[h,p]),b=(0,s.useCallback)(()=>{h(),p()},[h,p]);return(0,s.useEffect)(()=>()=>h(),[h]),(0,a.jsxs)(l.Provider,{value:{startProgress:m,updateProgress:v,completeProgress:g,cancelProgress:b,isProgressing:c},children:[t,(0,a.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 z-[600] transition-all duration-300 ease-out",style:{opacity:+!!c,transform:c?"translateY(0)":"translateY(100%)",pointerEvents:c?"auto":"none"},children:[(0,a.jsx)("div",{className:"h-1 w-full",style:{backgroundColor:"var(--bg-secondary)"},children:(0,a.jsx)("div",{className:"h-full transition-all duration-200 ease-out",style:{width:"".concat(r,"%"),backgroundColor:r>=100?"var(--status-pass-text)":"var(--accent)",boxShadow:r>=100?"0 0 10px var(--status-pass-text)":"none"}})}),n&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-2 px-4 text-xs font-medium cursor-pointer",onClick:b,style:{backgroundColor:"var(--bg-card)",color:r>=100?"var(--status-pass-text)":"var(--text-secondary)",borderTop:"1px solid var(--border)"},children:[r>=100&&(0,a.jsx)("svg",{className:"mr-2",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,a.jsx)("path",{d:"M2 6l3 3 5-5",stroke:"var(--status-pass-text)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),n]})]})]})}},854:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(2115);let s="qa-auth";function l(e){try{sessionStorage.setItem(s,JSON.stringify(e))}catch(e){}}function o(){let[e,t]=(0,a.useState)({name:"",isLoggedIn:!1}),[r,o]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t(function(){try{let e=sessionStorage.getItem(s);if(!e)return{name:"",isLoggedIn:!1};return JSON.parse(e)}catch(e){return{name:"",isLoggedIn:!1}}}()),o(!0)},[]);let n=(0,a.useCallback)(e=>{let r={name:e,isLoggedIn:!0};l(r),t(r)},[]),i=(0,a.useCallback)(()=>{let e={name:"",isLoggedIn:!1};l(e),t(e)},[]);return{...e,loaded:r,login:n,logout:i}}},8609:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>M});var a=r(5155),s=r(2115),l=r(63),o=r(7246),n=r(2619),i=r.n(n),c=r(854),d=r(8566);let u=["https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_11.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_12.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_13.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_14.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_15.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_16.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_17.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_18.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_19.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_20.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_21.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_22.png"],x=["https://i.pinimg.com/736x/ed/74/06/ed74063ade6d66fce2ca19acbe74babc.jpg","https://i.pinimg.com/736x/8c/6d/56/8c6d563311f0917d45d1f2ce5d7c1a2d.jpg","https://i.pinimg.com/736x/86/b8/be/86b8bea1c772cf5c540e6f01e6acce59.jpg","https://i.pinimg.com/736x/78/d4/b1/78d4b1787a4fd23c2a8d21e4fbbc016f.jpg","https://i.pinimg.com/1200x/87/de/e6/87dee6d33b04f1df28bc85702ee12d4b.jpg","https://i.pinimg.com/1200x/3b/e3/95/3be395c4a94705f95e0603afb04f9d56.jpg","https://media.licdn.com/dms/image/v2/D5603AQHBu4wrzFWoTw/profile-displayphoto-crop_800_800/B56Zq.Sy6LKsAI-/0/1764129191465?e=1782345600&v=beta&t=79y6xLivwcpvwy53sy1TuVopK4FMp6O8uAu7QxlIxDo"],h=["QA Engineer","QA Lead","Developer","Designer","Manager"];function p(e,t){let r=parseInt(e.replace("#",""),16),a=Math.min(255,(r>>16)+Math.round((255-(r>>16))*t)),s=Math.min(255,(r>>8&255)+Math.round((255-(r>>8&255))*t)),l=Math.min(255,(255&r)+Math.round((255-(255&r))*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}function m(e){let{profile:t,initials:r,onSetName:l,onSetBannerColor:o,onSetAvatarUrl:n,onSetRole:i}=e,[c,m]=(0,s.useState)(!1),[v,g]=(0,s.useState)(!1),[b,f]=(0,s.useState)(!1),[j,y]=(0,s.useState)(t.name),[k,w]=(0,s.useState)(t.role||""),C=(0,s.useRef)(null),N=(0,s.useRef)(null),S=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&m(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{v&&N.current&&N.current.focus()},[v]),(0,s.useEffect)(()=>{b&&S.current&&S.current.focus()},[b]);let M=()=>{l(j.trim()),g(!1)},L=()=>{i(k.trim()),f(!1)},E=!!t.avatarUrl;return(0,a.jsxs)("div",{className:"relative",ref:C,children:[(0,a.jsx)("button",{onClick:()=>m(!c),className:"w-9 h-9 rounded-full flex items-center justify-center text-xs font-medium overflow-hidden border-2 transition-all hover:scale-105",style:{borderColor:c?"var(--accent)":"transparent",boxShadow:c?"0 0 0 2px var(--accent), 0 2px 8px rgba(0,0,0,0.1)":"0 1px 3px rgba(0,0,0,0.08)"},children:E?(0,a.jsx)("img",{src:t.avatarUrl,alt:"Avatar",className:"w-full h-full object-cover"}):(0,a.jsx)("span",{className:"w-full h-full flex items-center justify-center",style:{backgroundColor:t.bannerColor,color:"#fff"},children:r})}),c&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-80 border z-50 overflow-hidden",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-xl)",animation:"fadeIn 150ms ease-out"},children:[(0,a.jsxs)("div",{className:"relative px-5 pt-5 pb-4",style:{background:"linear-gradient(135deg, ".concat(t.bannerColor," 0%, ").concat(p(t.bannerColor,.4)," 50%, ").concat(t.bannerColor," 100%)")},children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:"radial-gradient(circle at 20% 50%, white 1px, transparent 1px), radial-gradient(circle at 80% 20%, white 1px, transparent 1px)",backgroundSize:"30px 30px"}}),(0,a.jsxs)("div",{className:"relative flex items-end gap-4",children:[(0,a.jsxs)("div",{className:"relative group",children:[(0,a.jsx)("div",{className:"w-16 h-16 rounded-xl overflow-hidden border-3 flex-shrink-0",style:{borderColor:"rgba(255,255,255,0.3)",boxShadow:"0 4px 12px rgba(0,0,0,0.2)"},children:E?(0,a.jsx)("img",{src:t.avatarUrl,alt:"Avatar",className:"w-full h-full object-cover"}):(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center text-xl font-bold",style:{backgroundColor:t.bannerColor,color:"#fff"},children:r})}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-xl flex items-center justify-center opacity-0 group-hover:opacity-100 cursor-pointer transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.4)"},onClick:e=>{var t;e.stopPropagation(),null==(t=document.getElementById("avatar-gallery"))||t.scrollIntoView({behavior:"smooth"})},children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"white",children:(0,a.jsx)("path",{d:"M14 11V14H2V11H0V14C0 15.1.9 16 2 16H14C15.1 16 16 15.1 16 14V11H14ZM7 9L4.5 6.5L3 8L8 13L13 8L11.5 6.5L9 9V0H7V9Z"})})})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 pb-1",children:[v?(0,a.jsx)("input",{ref:N,value:j,onChange:e=>y(e.target.value),onBlur:M,onKeyDown:e=>{"Enter"===e.key&&M(),"Escape"===e.key&&g(!1)},className:"w-full bg-white/20 backdrop-blur-sm outline-none text-white text-sm font-semibold px-2 py-1 rounded placeholder-white/50",placeholder:"Your name..."}):(0,a.jsx)("div",{className:"text-sm font-semibold text-white cursor-pointer hover:opacity-80 truncate",onClick:()=>{y(t.name),g(!0)},children:t.name||"Click to set name"}),(0,a.jsx)("div",{className:"text-[11px] mt-0.5 px-2 py-0.5 rounded-full inline-block cursor-pointer hover:opacity-80",style:{backgroundColor:"rgba(255,255,255,0.15)",color:"rgba(255,255,255,0.9)"},onClick:()=>{w(t.role||""),f(!0)},children:b?(0,a.jsx)("input",{ref:S,value:k,onChange:e=>w(e.target.value),onBlur:L,onKeyDown:e=>{"Enter"===e.key&&L(),"Escape"===e.key&&f(!1)},className:"bg-transparent outline-none text-white text-[11px] w-24 placeholder-white/50",placeholder:"Your role..."}):t.role||"Set role..."})]})]})]}),(0,a.jsxs)("div",{className:"px-4 pt-3 pb-2",children:[(0,a.jsx)("label",{className:"text-[10px] font-semibold uppercase tracking-wider block mb-2",style:{color:"var(--text-tertiary)"},children:"Role"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,a.jsx)("button",{onClick:()=>i(e),className:"px-2 py-1 text-[10px] rounded-md border transition-colors",style:{borderColor:t.role===e?"var(--accent)":"var(--border)",color:t.role===e?"var(--accent)":"var(--text-secondary)",backgroundColor:t.role===e?"var(--accent)10":"transparent",fontWeight:t.role===e?600:400},children:e},e))})]}),(0,a.jsxs)("div",{id:"avatar-gallery",className:"px-4 pt-2 pb-3",children:[(0,a.jsx)("label",{className:"text-[10px] font-semibold uppercase tracking-wider block mb-2",style:{color:"var(--text-tertiary)"},children:"Choose Avatar"}),(0,a.jsx)("div",{className:"grid grid-cols-6 gap-2",children:u.map((e,r)=>(0,a.jsx)("button",{onClick:()=>n(e),className:"w-10 h-10 rounded-lg overflow-hidden border-2 transition-all hover:scale-110 hover:shadow-md",style:{borderColor:t.avatarUrl===e?"var(--accent)":"transparent",boxShadow:t.avatarUrl===e?"0 0 0 2px var(--accent)":"none"},children:(0,a.jsx)("img",{src:e,alt:"Avatar ".concat(r+11),className:"w-full h-full object-cover",loading:"lazy"})},e))}),(0,a.jsx)("div",{className:"grid grid-cols-6 gap-2 mt-2",children:x.map((e,r)=>(0,a.jsx)("button",{onClick:()=>n(e),className:"w-10 h-10 rounded-lg overflow-hidden border-2 transition-all hover:scale-110 hover:shadow-md",style:{borderColor:t.avatarUrl===e?"var(--accent)":"transparent",boxShadow:t.avatarUrl===e?"0 0 0 2px var(--accent)":"none"},children:(0,a.jsx)("img",{src:e,alt:"Avatar ".concat(r+23),className:"w-full h-full object-cover",loading:"lazy"})},e))})]}),(0,a.jsxs)("div",{className:"px-4 pb-4",children:[(0,a.jsx)("label",{className:"text-[10px] font-semibold uppercase tracking-wider block mb-2",style:{color:"var(--text-tertiary)"},children:"Banner Color"}),(0,a.jsx)("div",{className:"grid grid-cols-8 gap-1.5",children:d.T7.map(e=>(0,a.jsx)("button",{onClick:()=>o(e),className:"w-6 h-6 rounded-full transition-transform hover:scale-110 relative overflow-hidden",style:{background:"linear-gradient(135deg, ".concat(function(e,t){let r=parseInt(e.replace("#",""),16),a=Math.max(0,(r>>16)-Math.round((r>>16)*.3)),s=Math.max(0,(r>>8&255)-Math.round((r>>8&255)*.3)),l=Math.max(0,(255&r)-Math.round((255&r)*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}(e,.3)," 0%, ").concat(e," 50%, ").concat(p(e,.3)," 100%)"),outline:t.bannerColor!==e||t.avatarUrl?"none":"2px solid var(--accent)",outlineOffset:2},children:(0,a.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%)",animation:"shimmer 2s ease-in-out infinite"}})},e))})]}),(0,a.jsxs)("div",{className:"px-4 py-2.5 border-t flex items-center justify-between",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:"Profile data stored locally"}),(0,a.jsx)("button",{onClick:()=>m(!1),className:"text-[10px] font-medium px-2 py-0.5 rounded",style:{color:"var(--accent)"},children:"Done"})]})]})]})}function v(e){let{open:t,onClose:r,profile:l,initials:o,stats:n}=e,[i,c]=(0,s.useState)(!1);if(!t)return null;let d="My Test Lah!:\n".concat(n.projects," Projects | ").concat(n.testCases," Cases | ").concat(n.passRate,"% Pass Rate"),u=async()=>{if(navigator.share)try{await navigator.share({title:"Test Lah! Stats",text:d})}catch(e){}else navigator.clipboard.writeText(d)};return(0,a.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,children:(0,a.jsxs)("div",{className:"w-72 mx-4",onClick:e=>e.stopPropagation(),style:{perspective:"1000px"},children:[(0,a.jsxs)("div",{className:"relative w-full",style:{transformStyle:"preserve-3d",transform:i?"rotateY(180deg)":"rotateY(0)",transition:"transform 0.5s ease",height:"380px"},children:[(0,a.jsxs)("div",{className:"absolute inset-0 rounded-xl overflow-hidden border",style:{backfaceVisibility:"hidden",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)"},children:[(0,a.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(160deg, ".concat(function(e,t){let r=parseInt(e.replace("#",""),16),a=Math.max(0,(r>>16)-Math.round((r>>16)*.25)),s=Math.max(0,(r>>8&255)-Math.round((r>>8&255)*t)),l=Math.max(0,(255&r)-Math.round((255&r)*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}(l.bannerColor,.25)," 0%, ").concat(l.bannerColor," 50%, ").concat(function(e,t){let r=parseInt(e.replace("#",""),16),a=Math.min(255,(r>>16)+Math.round((255-(r>>16))*.2)),s=Math.min(255,(r>>8&255)+Math.round((255-(r>>8&255))*t)),l=Math.min(255,(255&r)+Math.round((255-(255&r))*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}(l.bannerColor,.2)," 100%)")}}),(0,a.jsxs)("div",{className:"relative h-full flex flex-col items-center justify-center px-4",children:[(0,a.jsx)("div",{className:"w-20 h-20 rounded-xl overflow-hidden border-2 mb-3",style:{borderColor:"rgba(255,255,255,0.3)"},children:l.avatarUrl?(0,a.jsx)("img",{src:l.avatarUrl,alt:"Avatar",className:"w-full h-full object-cover"}):(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center text-2xl font-bold",style:{backgroundColor:"rgba(0,0,0,0.2)",color:"#fff"},children:o})}),(0,a.jsx)("h3",{className:"text-base font-semibold text-white drop-shadow-sm",children:l.name||"Anonymous Tester"}),(0,a.jsx)("p",{className:"text-xs mt-0.5 text-white/70",children:l.role||"No role set"}),(0,a.jsxs)("div",{className:"flex items-center gap-4 mt-4",children:[(0,a.jsx)(g,{value:n.projects,label:"Projects"}),(0,a.jsx)("div",{className:"w-px h-6 bg-white/20"}),(0,a.jsx)(g,{value:n.testCases,label:"Cases"}),(0,a.jsx)("div",{className:"w-px h-6 bg-white/20"}),(0,a.jsx)(g,{value:"".concat(n.passRate,"%"),label:"Pass"})]}),(0,a.jsx)("button",{onClick:()=>c(!0),className:"mt-5 px-4 py-1.5 text-[11px] font-medium rounded-full transition-colors",style:{backgroundColor:"rgba(255,255,255,0.2)",color:"#fff"},children:"View stats"})]})]}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-xl overflow-hidden border",style:{backfaceVisibility:"hidden",transform:"rotateY(180deg)",borderColor:"var(--border)",backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[(0,a.jsxs)("div",{className:"px-4 py-3 border-b flex items-center justify-between",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("span",{className:"text-xs font-semibold",style:{color:"var(--text-primary)"},children:"Statistics"}),(0,a.jsx)("button",{onClick:()=>c(!1),className:"text-[10px] px-2 py-0.5 rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{color:"var(--text-tertiary)",borderColor:"var(--border)"},children:"Back"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Pass Rate"}),(0,a.jsxs)("span",{className:"text-sm font-semibold",style:{color:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"},children:[n.passRate,"%"]})]}),(0,a.jsx)("div",{className:"h-1.5 rounded-full overflow-hidden",style:{backgroundColor:"var(--bg-secondary)"},children:(0,a.jsx)("div",{className:"h-full rounded-full",style:{width:"".concat(n.passRate,"%"),backgroundColor:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"}})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-1.5",children:[(0,a.jsx)(b,{label:"Pass",value:n.pass,color:"var(--status-pass-text)"}),(0,a.jsx)(b,{label:"Fail",value:n.fail,color:"var(--status-fail-text)"}),(0,a.jsx)(b,{label:"Skip",value:n.skip,color:"var(--status-skip-text)"}),(0,a.jsx)(b,{label:"New",value:n.untested})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(f,{label:"Test Cases",value:n.testCases}),(0,a.jsx)(f,{label:"Flow Nodes",value:n.nodes}),(0,a.jsx)(f,{label:"Edges",value:n.edges}),(0,a.jsx)(f,{label:"Projects",value:n.projects})]}),(0,a.jsxs)("button",{onClick:u,className:"w-full px-3 py-2 text-[11px] font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)] flex items-center justify-center gap-1.5",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:[(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8"}),(0,a.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,a.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]}),"Share"]})]})]})})]}),(0,a.jsx)("button",{onClick:r,className:"w-full mt-2 px-3 py-2 text-[11px] font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"Close"})]})})}function g(e){let{value:t,label:r}=e;return(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"text-sm font-semibold text-white",children:t}),(0,a.jsx)("div",{className:"text-[9px] uppercase tracking-wider text-white/60",children:r})]})}function b(e){let{label:t,value:r,color:s}=e;return(0,a.jsxs)("div",{className:"py-2 rounded-lg text-center",style:{backgroundColor:"var(--bg-secondary)"},children:[(0,a.jsx)("div",{className:"text-sm font-medium",style:{color:null!=s?s:"var(--text-secondary)"},children:r}),(0,a.jsx)("div",{className:"text-[8px] uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:t})]})}function f(e){let{label:t,value:r}=e;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg",style:{backgroundColor:"var(--bg-secondary)"},children:[(0,a.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:t}),(0,a.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:r})]})}var j=r(265);function y(){let{projects:e,activeProject:t,activeProjectId:r,profile:n,profileInitials:d,setProfileName:u,setProfileBannerColor:x,setProfileAvatarUrl:h,setProfileRole:p}=(0,o.M)(),{logout:g}=(0,c.A)(),b=(0,l.useRouter)(),f=(0,l.usePathname)(),{startProgress:y,completeProgress:w}=(0,j.p1)(),[C,N]=(0,s.useState)(!1),[S,M]=(0,s.useState)(!1),L=Object.values(e),E=(0,s.useMemo)(()=>{let e=L.flatMap(e=>Object.values(e.testCases).flat()),t=e.length,r=e.filter(e=>"pass"===e.status).length,a=e.filter(e=>"fail"===e.status).length,s=e.filter(e=>"skip"===e.status).length,l=e.filter(e=>"untested"===e.status).length,o=L.reduce((e,t)=>e+t.flows.length,0),n=L.reduce((e,t)=>{var r;return e+(null!=(r=t.edges)?r:[]).length},0),i=t-s,c=i>0?Math.round(r/i*100):0;return{projects:L.length,testCases:t,passRate:c,nodes:o,edges:n,pass:r,fail:a,skip:s,untested:l}},[L]),P=f.startsWith("/integrations")?"integrations":"projects";return(0,a.jsxs)("header",{className:"flex flex-col border-b flex-shrink-0 relative",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)"},children:[(0,a.jsx)("div",{className:"absolute inset-0 overflow-hidden flex items-center justify-center pointer-events-none group/duck",children:(0,a.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"",className:"h-[85%] object-contain select-none transition-all duration-300 group-hover/duck:scale-110 group-hover/duck:opacity-[0.15] cursor-pointer",style:{opacity:.09,pointerEvents:"auto"},onClick:()=>b.push("/projects"),title:"Quack! \uD83E\uDD86"})}),(0,a.jsxs)("div",{className:"relative z-10 flex items-center justify-between px-6 py-2.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsxs)(i(),{href:"/projects",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-md overflow-hidden bg-white flex-shrink-0",style:{boxShadow:"0 1px 4px rgba(0,0,0,0.08)"},children:(0,a.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"Logo",width:32,height:32,className:"w-full h-full object-contain"})}),(0,a.jsx)("span",{className:"shimmer-text text-sm font-bold tracking-wide select-none",style:{background:"linear-gradient(90deg, var(--text-primary) 0%, var(--text-primary) 40%, #FFD54F 50%, var(--text-primary) 60%, var(--text-primary) 100%)",backgroundSize:"200% 100%",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",animation:"shimmerText 3s ease-in-out infinite"},children:"Test Lah!"})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>N(!0),className:"hidden md:block px-3 py-1.5 text-[11px] font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"My Card"}),(0,a.jsx)("div",{className:"hidden md:block w-px h-5 mx-0.5",style:{backgroundColor:"var(--border)"}}),(0,a.jsx)("div",{className:"relative z-[60]",children:(0,a.jsx)(m,{profile:n,initials:d,onSetName:u,onSetBannerColor:x,onSetAvatarUrl:h,onSetRole:p})}),(0,a.jsx)("button",{onClick:()=>{M(!0)},className:"w-8 h-8 flex items-center justify-center text-xs rounded-md border transition-colors hover:bg-[var(--bg-secondary)] hover:border-[var(--status-fail-text)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},title:"Logout",children:(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,a.jsx)("path",{d:"M5 2H3.5A1.5 1.5 0 002 3.5v7A1.5 1.5 0 003.5 12H5M9 10l3-3-3-3M6 7h6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),(0,a.jsxs)("div",{className:"relative z-10 flex items-center gap-1 px-6 pb-1.5",children:[(0,a.jsx)(k,{label:"All Projects",href:"/projects",icon:(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:[(0,a.jsx)("rect",{x:"1",y:"1",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("rect",{x:"8",y:"1",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("rect",{x:"1",y:"8",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("rect",{x:"8",y:"8",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"})]}),active:"projects"===P}),(0,a.jsx)(k,{label:"Integrations",href:"/integrations",icon:(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:[(0,a.jsx)("circle",{cx:"5",cy:"5",r:"2.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("circle",{cx:"9",cy:"9",r:"2.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("path",{d:"M7.5 5.5L6.5 8.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),active:"integrations"===P})]}),(0,a.jsx)(v,{open:C,onClose:()=>N(!1),profile:n,initials:d,stats:E}),S&&(0,a.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>M(!1),children:(0,a.jsxs)("div",{className:"w-full max-w-sm mx-4 rounded-xl border overflow-hidden",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 200ms ease-out"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"px-6 pt-6 pb-4 text-center",children:[(0,a.jsx)("div",{className:"w-14 h-14 mx-auto mb-4 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--status-skip-bg)"},children:(0,a.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--status-skip-text)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),(0,a.jsx)("polyline",{points:"16 17 21 12 16 7"}),(0,a.jsx)("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})}),(0,a.jsx)("h3",{className:"text-base font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Mau Keluar? Sedekahnya mana??"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-tertiary)"},children:"Sebelum keluar, mungkin bisa traktir developer secangkir kopi? ☕"})]}),(0,a.jsxs)("div",{className:"px-6 pb-5 flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>M(!1),className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Batal"}),(0,a.jsx)("button",{onClick:()=>{M(!1),y("Logging out..."),g(),setTimeout(()=>{w("Logged out!"),b.push("/login")},500)},className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-opacity hover:opacity-80",style:{backgroundColor:"var(--status-fail-text)",color:"#fff"},children:"Keluar"})]})]})})]})}function k(e){let{label:t,icon:r,active:s,href:l,badge:o}=e;return(0,a.jsxs)(i(),{href:l,className:"flex items-center gap-2 px-3 py-2 text-xs font-medium rounded-t-md transition-colors relative",style:{color:s?"var(--accent)":"var(--text-tertiary)",backgroundColor:s?"var(--bg-secondary)":"transparent"},children:[r,t,o&&(0,a.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold rounded-full leading-none",style:{backgroundColor:s?"var(--accent)":"var(--bg-secondary)",color:s?"#fff":"var(--text-tertiary)"},children:o}),s&&(0,a.jsx)("div",{className:"absolute bottom-0 left-2 right-2 h-0.5 rounded-t-full",style:{backgroundColor:"var(--accent)"}})]})}var w=r(7065);function C(e){let{children:t}=e,r=(0,l.useRouter)(),{isLoggedIn:o,loaded:n}=(0,c.A)();return((0,s.useEffect)(()=>{n&&!o&&r.replace("/login")},[n,o,r]),n)?o?(0,a.jsx)(a.Fragment,{children:t}):null:(0,a.jsx)("div",{className:"h-screen flex items-center justify-center",style:{backgroundColor:"var(--bg-primary)"},children:(0,a.jsx)("div",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:"Loading..."})})}function N(){let{undo:e,redo:t,canUndo:r,canRedo:a}=(0,o.M)();return(0,s.useEffect)(()=>{let s=s=>{(s.ctrlKey||s.metaKey)&&"z"===s.key&&!s.shiftKey&&(s.preventDefault(),r&&e()),(s.ctrlKey||s.metaKey)&&("Z"===s.key||"z"===s.key&&s.shiftKey)&&(s.preventDefault(),a&&t()),(s.ctrlKey||s.metaKey)&&"y"===s.key&&(s.preventDefault(),a&&t())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t,r,a]),null}function S(e){let{children:t}=e,{dialog:r}=(0,o.M)();return(0,a.jsxs)(a.Fragment,{children:[t,(0,a.jsx)(w.q,{dialog:r})]})}function M(e){let{children:t}=e;return(0,a.jsx)(C,{children:(0,a.jsx)(o.q,{children:(0,a.jsx)(S,{children:(0,a.jsxs)("div",{className:"h-screen flex flex-col",style:{backgroundColor:"var(--bg-primary)"},children:[(0,a.jsx)(N,{}),(0,a.jsx)(y,{}),(0,a.jsx)("div",{className:"flex-1 min-h-0",children:t})]})})})})}},9715:(e,t,r)=>{Promise.resolve().then(r.bind(r,8609))}},e=>{e.O(0,[619,246,441,255,358],()=>e(e.s=9715)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[305],{63:(e,t,r)=>{"use strict";var a=r(7260);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}})},265:(e,t,r)=>{"use strict";r.d(t,{Vx:()=>n,p1:()=>o});var a=r(5155),s=r(2115);let l=(0,s.createContext)(null);function o(){let e=(0,s.useContext)(l);if(!e)throw Error("useProgress must be used within ProgressProvider");return e}function n(e){let{children:t}=e,[r,o]=(0,s.useState)(0),[n,i]=(0,s.useState)(""),[c,d]=(0,s.useState)(!1),u=(0,s.useRef)(null),x=(0,s.useRef)(null),h=(0,s.useCallback)(()=>{u.current&&(clearInterval(u.current),u.current=null),x.current&&(clearTimeout(x.current),x.current=null)},[]),p=(0,s.useCallback)(()=>{d(!1),o(0),i("")},[]),m=(0,s.useCallback)(e=>{h(),o(0),i(e||""),d(!0),u.current=setInterval(()=>{o(e=>e>=90?(u.current&&clearInterval(u.current),u.current=null,90):e+15*Math.random())},300),x.current=setTimeout(()=>{p()},8e3)},[h,p]),v=(0,s.useCallback)((e,t)=>{o(Math.min(95,e)),t&&i(t)},[]),g=(0,s.useCallback)(e=>{h(),o(100),e&&i(e),setTimeout(()=>{p()},500)},[h,p]),b=(0,s.useCallback)(()=>{h(),p()},[h,p]);return(0,s.useEffect)(()=>()=>h(),[h]),(0,a.jsxs)(l.Provider,{value:{startProgress:m,updateProgress:v,completeProgress:g,cancelProgress:b,isProgressing:c},children:[t,(0,a.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 z-[600] transition-all duration-300 ease-out",style:{opacity:+!!c,transform:c?"translateY(0)":"translateY(100%)",pointerEvents:c?"auto":"none"},children:[(0,a.jsx)("div",{className:"h-1 w-full",style:{backgroundColor:"var(--bg-secondary)"},children:(0,a.jsx)("div",{className:"h-full transition-all duration-200 ease-out",style:{width:"".concat(r,"%"),backgroundColor:r>=100?"var(--status-pass-text)":"var(--accent)",boxShadow:r>=100?"0 0 10px var(--status-pass-text)":"none"}})}),n&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-2 px-4 text-xs font-medium cursor-pointer",onClick:b,style:{backgroundColor:"var(--bg-card)",color:r>=100?"var(--status-pass-text)":"var(--text-secondary)",borderTop:"1px solid var(--border)"},children:[r>=100&&(0,a.jsx)("svg",{className:"mr-2",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,a.jsx)("path",{d:"M2 6l3 3 5-5",stroke:"var(--status-pass-text)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),n]})]})]})}},854:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(2115);let s="qa-auth";function l(e){try{sessionStorage.setItem(s,JSON.stringify(e))}catch(e){}}function o(){let[e,t]=(0,a.useState)({name:"",isLoggedIn:!1}),[r,o]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t(function(){try{let e=sessionStorage.getItem(s);if(!e)return{name:"",isLoggedIn:!1};return JSON.parse(e)}catch(e){return{name:"",isLoggedIn:!1}}}()),o(!0)},[]);let n=(0,a.useCallback)(e=>{let r={name:e,isLoggedIn:!0};l(r),t(r)},[]),i=(0,a.useCallback)(()=>{let e={name:"",isLoggedIn:!1};l(e),t(e)},[]);return{...e,loaded:r,login:n,logout:i}}},8609:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>M});var a=r(5155),s=r(2115),l=r(63),o=r(7246),n=r(2619),i=r.n(n),c=r(854),d=r(8566);let u=["https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_11.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_12.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_13.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_14.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_15.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_16.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_17.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_18.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_19.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_20.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_21.png","https://cdn.jsdelivr.net/gh/alohe/avatars/png/upstream_22.png"],x=["https://i.pinimg.com/736x/ed/74/06/ed74063ade6d66fce2ca19acbe74babc.jpg","https://i.pinimg.com/736x/8c/6d/56/8c6d563311f0917d45d1f2ce5d7c1a2d.jpg","https://i.pinimg.com/736x/86/b8/be/86b8bea1c772cf5c540e6f01e6acce59.jpg","https://i.pinimg.com/736x/78/d4/b1/78d4b1787a4fd23c2a8d21e4fbbc016f.jpg","https://i.pinimg.com/1200x/87/de/e6/87dee6d33b04f1df28bc85702ee12d4b.jpg","https://i.pinimg.com/1200x/3b/e3/95/3be395c4a94705f95e0603afb04f9d56.jpg","https://media.licdn.com/dms/image/v2/D5603AQHBu4wrzFWoTw/profile-displayphoto-crop_800_800/B56Zq.Sy6LKsAI-/0/1764129191465?e=1782345600&v=beta&t=79y6xLivwcpvwy53sy1TuVopK4FMp6O8uAu7QxlIxDo"],h=["QA Engineer","QA Lead","Developer","Designer","Manager"];function p(e,t){let r=parseInt(e.replace("#",""),16),a=Math.min(255,(r>>16)+Math.round((255-(r>>16))*t)),s=Math.min(255,(r>>8&255)+Math.round((255-(r>>8&255))*t)),l=Math.min(255,(255&r)+Math.round((255-(255&r))*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}function m(e){let{profile:t,initials:r,onSetName:l,onSetBannerColor:o,onSetAvatarUrl:n,onSetRole:i}=e,[c,m]=(0,s.useState)(!1),[v,g]=(0,s.useState)(!1),[b,f]=(0,s.useState)(!1),[j,y]=(0,s.useState)(t.name),[k,w]=(0,s.useState)(t.role||""),C=(0,s.useRef)(null),N=(0,s.useRef)(null),S=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&m(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{v&&N.current&&N.current.focus()},[v]),(0,s.useEffect)(()=>{b&&S.current&&S.current.focus()},[b]);let M=()=>{l(j.trim()),g(!1)},L=()=>{i(k.trim()),f(!1)},E=!!t.avatarUrl;return(0,a.jsxs)("div",{className:"relative",ref:C,children:[(0,a.jsx)("button",{onClick:()=>m(!c),className:"w-9 h-9 rounded-full flex items-center justify-center text-xs font-medium overflow-hidden border-2 transition-all hover:scale-105",style:{borderColor:c?"var(--accent)":"transparent",boxShadow:c?"0 0 0 2px var(--accent), 0 2px 8px rgba(0,0,0,0.1)":"0 1px 3px rgba(0,0,0,0.08)"},children:E?(0,a.jsx)("img",{src:t.avatarUrl,alt:"Avatar",className:"w-full h-full object-cover"}):(0,a.jsx)("span",{className:"w-full h-full flex items-center justify-center",style:{backgroundColor:t.bannerColor,color:"#fff"},children:r})}),c&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-80 border z-50 overflow-hidden",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-xl)",animation:"fadeIn 150ms ease-out"},children:[(0,a.jsxs)("div",{className:"relative px-5 pt-5 pb-4",style:{background:"linear-gradient(135deg, ".concat(t.bannerColor," 0%, ").concat(p(t.bannerColor,.4)," 50%, ").concat(t.bannerColor," 100%)")},children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:"radial-gradient(circle at 20% 50%, white 1px, transparent 1px), radial-gradient(circle at 80% 20%, white 1px, transparent 1px)",backgroundSize:"30px 30px"}}),(0,a.jsxs)("div",{className:"relative flex items-end gap-4",children:[(0,a.jsxs)("div",{className:"relative group",children:[(0,a.jsx)("div",{className:"w-16 h-16 rounded-xl overflow-hidden border-3 flex-shrink-0",style:{borderColor:"rgba(255,255,255,0.3)",boxShadow:"0 4px 12px rgba(0,0,0,0.2)"},children:E?(0,a.jsx)("img",{src:t.avatarUrl,alt:"Avatar",className:"w-full h-full object-cover"}):(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center text-xl font-bold",style:{backgroundColor:t.bannerColor,color:"#fff"},children:r})}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-xl flex items-center justify-center opacity-0 group-hover:opacity-100 cursor-pointer transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.4)"},onClick:e=>{var t;e.stopPropagation(),null==(t=document.getElementById("avatar-gallery"))||t.scrollIntoView({behavior:"smooth"})},children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"white",children:(0,a.jsx)("path",{d:"M14 11V14H2V11H0V14C0 15.1.9 16 2 16H14C15.1 16 16 15.1 16 14V11H14ZM7 9L4.5 6.5L3 8L8 13L13 8L11.5 6.5L9 9V0H7V9Z"})})})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 pb-1",children:[v?(0,a.jsx)("input",{ref:N,value:j,onChange:e=>y(e.target.value),onBlur:M,onKeyDown:e=>{"Enter"===e.key&&M(),"Escape"===e.key&&g(!1)},className:"w-full bg-white/20 backdrop-blur-sm outline-none text-white text-sm font-semibold px-2 py-1 rounded placeholder-white/50",placeholder:"Your name..."}):(0,a.jsx)("div",{className:"text-sm font-semibold text-white cursor-pointer hover:opacity-80 truncate",onClick:()=>{y(t.name),g(!0)},children:t.name||"Click to set name"}),(0,a.jsx)("div",{className:"text-[11px] mt-0.5 px-2 py-0.5 rounded-full inline-block cursor-pointer hover:opacity-80",style:{backgroundColor:"rgba(255,255,255,0.15)",color:"rgba(255,255,255,0.9)"},onClick:()=>{w(t.role||""),f(!0)},children:b?(0,a.jsx)("input",{ref:S,value:k,onChange:e=>w(e.target.value),onBlur:L,onKeyDown:e=>{"Enter"===e.key&&L(),"Escape"===e.key&&f(!1)},className:"bg-transparent outline-none text-white text-[11px] w-24 placeholder-white/50",placeholder:"Your role..."}):t.role||"Set role..."})]})]})]}),(0,a.jsxs)("div",{className:"px-4 pt-3 pb-2",children:[(0,a.jsx)("label",{className:"text-[10px] font-semibold uppercase tracking-wider block mb-2",style:{color:"var(--text-tertiary)"},children:"Role"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,a.jsx)("button",{onClick:()=>i(e),className:"px-2 py-1 text-[10px] rounded-md border transition-colors",style:{borderColor:t.role===e?"var(--accent)":"var(--border)",color:t.role===e?"var(--accent)":"var(--text-secondary)",backgroundColor:t.role===e?"var(--accent)10":"transparent",fontWeight:t.role===e?600:400},children:e},e))})]}),(0,a.jsxs)("div",{id:"avatar-gallery",className:"px-4 pt-2 pb-3",children:[(0,a.jsx)("label",{className:"text-[10px] font-semibold uppercase tracking-wider block mb-2",style:{color:"var(--text-tertiary)"},children:"Choose Avatar"}),(0,a.jsx)("div",{className:"grid grid-cols-6 gap-2",children:u.map((e,r)=>(0,a.jsx)("button",{onClick:()=>n(e),className:"w-10 h-10 rounded-lg overflow-hidden border-2 transition-all hover:scale-110 hover:shadow-md",style:{borderColor:t.avatarUrl===e?"var(--accent)":"transparent",boxShadow:t.avatarUrl===e?"0 0 0 2px var(--accent)":"none"},children:(0,a.jsx)("img",{src:e,alt:"Avatar ".concat(r+11),className:"w-full h-full object-cover",loading:"lazy"})},e))}),(0,a.jsx)("div",{className:"grid grid-cols-6 gap-2 mt-2",children:x.map((e,r)=>(0,a.jsx)("button",{onClick:()=>n(e),className:"w-10 h-10 rounded-lg overflow-hidden border-2 transition-all hover:scale-110 hover:shadow-md",style:{borderColor:t.avatarUrl===e?"var(--accent)":"transparent",boxShadow:t.avatarUrl===e?"0 0 0 2px var(--accent)":"none"},children:(0,a.jsx)("img",{src:e,alt:"Avatar ".concat(r+23),className:"w-full h-full object-cover",loading:"lazy"})},e))})]}),(0,a.jsxs)("div",{className:"px-4 pb-4",children:[(0,a.jsx)("label",{className:"text-[10px] font-semibold uppercase tracking-wider block mb-2",style:{color:"var(--text-tertiary)"},children:"Banner Color"}),(0,a.jsx)("div",{className:"grid grid-cols-8 gap-1.5",children:d.T7.map(e=>(0,a.jsx)("button",{onClick:()=>o(e),className:"w-6 h-6 rounded-full transition-transform hover:scale-110 relative overflow-hidden",style:{background:"linear-gradient(135deg, ".concat(function(e,t){let r=parseInt(e.replace("#",""),16),a=Math.max(0,(r>>16)-Math.round((r>>16)*.3)),s=Math.max(0,(r>>8&255)-Math.round((r>>8&255)*.3)),l=Math.max(0,(255&r)-Math.round((255&r)*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}(e,.3)," 0%, ").concat(e," 50%, ").concat(p(e,.3)," 100%)"),outline:t.bannerColor!==e||t.avatarUrl?"none":"2px solid var(--accent)",outlineOffset:2},children:(0,a.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%)",animation:"shimmer 2s ease-in-out infinite"}})},e))})]}),(0,a.jsxs)("div",{className:"px-4 py-2.5 border-t flex items-center justify-between",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,a.jsx)("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:"Profile data stored locally"}),(0,a.jsx)("button",{onClick:()=>m(!1),className:"text-[10px] font-medium px-2 py-0.5 rounded",style:{color:"var(--accent)"},children:"Done"})]})]})]})}function v(e){let{open:t,onClose:r,profile:l,initials:o,stats:n}=e,[i,c]=(0,s.useState)(!1);if(!t)return null;let d="My Test Lah!:\n".concat(n.projects," Projects | ").concat(n.testCases," Cases | ").concat(n.passRate,"% Pass Rate"),u=async()=>{if(navigator.share)try{await navigator.share({title:"Test Lah! Stats",text:d})}catch(e){}else navigator.clipboard.writeText(d)};return(0,a.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,children:(0,a.jsxs)("div",{className:"w-72 mx-4",onClick:e=>e.stopPropagation(),style:{perspective:"1000px"},children:[(0,a.jsxs)("div",{className:"relative w-full",style:{transformStyle:"preserve-3d",transform:i?"rotateY(180deg)":"rotateY(0)",transition:"transform 0.5s ease",height:"380px"},children:[(0,a.jsxs)("div",{className:"absolute inset-0 rounded-xl overflow-hidden border",style:{backfaceVisibility:"hidden",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)"},children:[(0,a.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(160deg, ".concat(function(e,t){let r=parseInt(e.replace("#",""),16),a=Math.max(0,(r>>16)-Math.round((r>>16)*.25)),s=Math.max(0,(r>>8&255)-Math.round((r>>8&255)*t)),l=Math.max(0,(255&r)-Math.round((255&r)*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}(l.bannerColor,.25)," 0%, ").concat(l.bannerColor," 50%, ").concat(function(e,t){let r=parseInt(e.replace("#",""),16),a=Math.min(255,(r>>16)+Math.round((255-(r>>16))*.2)),s=Math.min(255,(r>>8&255)+Math.round((255-(r>>8&255))*t)),l=Math.min(255,(255&r)+Math.round((255-(255&r))*t));return"#".concat((a<<16|s<<8|l).toString(16).padStart(6,"0"))}(l.bannerColor,.2)," 100%)")}}),(0,a.jsxs)("div",{className:"relative h-full flex flex-col items-center justify-center px-4",children:[(0,a.jsx)("div",{className:"w-20 h-20 rounded-xl overflow-hidden border-2 mb-3",style:{borderColor:"rgba(255,255,255,0.3)"},children:l.avatarUrl?(0,a.jsx)("img",{src:l.avatarUrl,alt:"Avatar",className:"w-full h-full object-cover"}):(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center text-2xl font-bold",style:{backgroundColor:"rgba(0,0,0,0.2)",color:"#fff"},children:o})}),(0,a.jsx)("h3",{className:"text-base font-semibold text-white drop-shadow-sm",children:l.name||"Anonymous Tester"}),(0,a.jsx)("p",{className:"text-xs mt-0.5 text-white/70",children:l.role||"No role set"}),(0,a.jsxs)("div",{className:"flex items-center gap-4 mt-4",children:[(0,a.jsx)(g,{value:n.projects,label:"Projects"}),(0,a.jsx)("div",{className:"w-px h-6 bg-white/20"}),(0,a.jsx)(g,{value:n.testCases,label:"Cases"}),(0,a.jsx)("div",{className:"w-px h-6 bg-white/20"}),(0,a.jsx)(g,{value:"".concat(n.passRate,"%"),label:"Pass"})]}),(0,a.jsx)("button",{onClick:()=>c(!0),className:"mt-5 px-4 py-1.5 text-[11px] font-medium rounded-full transition-colors",style:{backgroundColor:"rgba(255,255,255,0.2)",color:"#fff"},children:"View stats"})]})]}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-xl overflow-hidden border",style:{backfaceVisibility:"hidden",transform:"rotateY(180deg)",borderColor:"var(--border)",backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[(0,a.jsxs)("div",{className:"px-4 py-3 border-b flex items-center justify-between",style:{borderColor:"var(--border)"},children:[(0,a.jsx)("span",{className:"text-xs font-semibold",style:{color:"var(--text-primary)"},children:"Statistics"}),(0,a.jsx)("button",{onClick:()=>c(!1),className:"text-[10px] px-2 py-0.5 rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{color:"var(--text-tertiary)",borderColor:"var(--border)"},children:"Back"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Pass Rate"}),(0,a.jsxs)("span",{className:"text-sm font-semibold",style:{color:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"},children:[n.passRate,"%"]})]}),(0,a.jsx)("div",{className:"h-1.5 rounded-full overflow-hidden",style:{backgroundColor:"var(--bg-secondary)"},children:(0,a.jsx)("div",{className:"h-full rounded-full",style:{width:"".concat(n.passRate,"%"),backgroundColor:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"}})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-1.5",children:[(0,a.jsx)(b,{label:"Pass",value:n.pass,color:"var(--status-pass-text)"}),(0,a.jsx)(b,{label:"Fail",value:n.fail,color:"var(--status-fail-text)"}),(0,a.jsx)(b,{label:"Skip",value:n.skip,color:"var(--status-skip-text)"}),(0,a.jsx)(b,{label:"New",value:n.untested})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(f,{label:"Test Cases",value:n.testCases}),(0,a.jsx)(f,{label:"Flow Nodes",value:n.nodes}),(0,a.jsx)(f,{label:"Edges",value:n.edges}),(0,a.jsx)(f,{label:"Projects",value:n.projects})]}),(0,a.jsxs)("button",{onClick:u,className:"w-full px-3 py-2 text-[11px] font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)] flex items-center justify-center gap-1.5",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:[(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8"}),(0,a.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,a.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]}),"Share"]})]})]})})]}),(0,a.jsx)("button",{onClick:r,className:"w-full mt-2 px-3 py-2 text-[11px] font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"Close"})]})})}function g(e){let{value:t,label:r}=e;return(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"text-sm font-semibold text-white",children:t}),(0,a.jsx)("div",{className:"text-[9px] uppercase tracking-wider text-white/60",children:r})]})}function b(e){let{label:t,value:r,color:s}=e;return(0,a.jsxs)("div",{className:"py-2 rounded-lg text-center",style:{backgroundColor:"var(--bg-secondary)"},children:[(0,a.jsx)("div",{className:"text-sm font-medium",style:{color:null!=s?s:"var(--text-secondary)"},children:r}),(0,a.jsx)("div",{className:"text-[8px] uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:t})]})}function f(e){let{label:t,value:r}=e;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg",style:{backgroundColor:"var(--bg-secondary)"},children:[(0,a.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:t}),(0,a.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:r})]})}var j=r(265);function y(){let{projects:e,activeProject:t,activeProjectId:r,profile:n,profileInitials:d,setProfileName:u,setProfileBannerColor:x,setProfileAvatarUrl:h,setProfileRole:p}=(0,o.M)(),{logout:g}=(0,c.A)(),b=(0,l.useRouter)(),f=(0,l.usePathname)(),{startProgress:y,completeProgress:w}=(0,j.p1)(),[C,N]=(0,s.useState)(!1),[S,M]=(0,s.useState)(!1),L=Object.values(e),E=(0,s.useMemo)(()=>{let e=L.flatMap(e=>Object.values(e.testCases).flat()),t=e.length,r=e.filter(e=>"pass"===e.status).length,a=e.filter(e=>"fail"===e.status).length,s=e.filter(e=>"skip"===e.status).length,l=e.filter(e=>"untested"===e.status).length,o=L.reduce((e,t)=>e+t.flows.length,0),n=L.reduce((e,t)=>{var r;return e+(null!=(r=t.edges)?r:[]).length},0),i=t-s,c=i>0?Math.round(r/i*100):0;return{projects:L.length,testCases:t,passRate:c,nodes:o,edges:n,pass:r,fail:a,skip:s,untested:l}},[L]),P=f.startsWith("/integrations")?"integrations":"projects";return(0,a.jsxs)("header",{className:"flex flex-col border-b flex-shrink-0 relative",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)"},children:[(0,a.jsx)("div",{className:"absolute inset-0 overflow-hidden flex items-center justify-center pointer-events-none group/duck",children:(0,a.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"",className:"h-[85%] object-contain select-none transition-all duration-300 group-hover/duck:scale-110 group-hover/duck:opacity-[0.15] cursor-pointer",style:{opacity:.09,pointerEvents:"auto"},onClick:()=>b.push("/projects"),title:"Quack! \uD83E\uDD86"})}),(0,a.jsxs)("div",{className:"relative z-10 flex items-center justify-between px-6 py-2.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsxs)(i(),{href:"/projects",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-md overflow-hidden bg-white flex-shrink-0",style:{boxShadow:"0 1px 4px rgba(0,0,0,0.08)"},children:(0,a.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"Logo",width:32,height:32,className:"w-full h-full object-contain"})}),(0,a.jsx)("span",{className:"shimmer-text text-sm font-bold tracking-wide select-none",style:{background:"linear-gradient(90deg, var(--text-primary) 0%, var(--text-primary) 40%, #FFD54F 50%, var(--text-primary) 60%, var(--text-primary) 100%)",backgroundSize:"200% 100%",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",animation:"shimmerText 3s ease-in-out infinite"},children:"Test Lah!"})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>N(!0),className:"hidden md:block px-3 py-1.5 text-[11px] font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"My Card"}),(0,a.jsx)("div",{className:"hidden md:block w-px h-5 mx-0.5",style:{backgroundColor:"var(--border)"}}),(0,a.jsx)("div",{className:"relative z-[60]",children:(0,a.jsx)(m,{profile:n,initials:d,onSetName:u,onSetBannerColor:x,onSetAvatarUrl:h,onSetRole:p})}),(0,a.jsx)("button",{onClick:()=>{M(!0)},className:"w-8 h-8 flex items-center justify-center text-xs rounded-md border transition-colors hover:bg-[var(--bg-secondary)] hover:border-[var(--status-fail-text)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},title:"Logout",children:(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,a.jsx)("path",{d:"M5 2H3.5A1.5 1.5 0 002 3.5v7A1.5 1.5 0 003.5 12H5M9 10l3-3-3-3M6 7h6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),(0,a.jsxs)("div",{className:"relative z-10 flex items-center gap-1 px-6",children:[(0,a.jsx)(k,{label:"All Projects",href:"/projects",icon:(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:[(0,a.jsx)("rect",{x:"1",y:"1",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("rect",{x:"8",y:"1",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("rect",{x:"1",y:"8",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("rect",{x:"8",y:"8",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.2",fill:"none"})]}),active:"projects"===P}),(0,a.jsx)(k,{label:"Integrations",href:"/integrations",icon:(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:[(0,a.jsx)("circle",{cx:"5",cy:"5",r:"2.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("circle",{cx:"9",cy:"9",r:"2.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),(0,a.jsx)("path",{d:"M7.5 5.5L6.5 8.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),active:"integrations"===P})]}),(0,a.jsx)(v,{open:C,onClose:()=>N(!1),profile:n,initials:d,stats:E}),S&&(0,a.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>M(!1),children:(0,a.jsxs)("div",{className:"w-full max-w-sm mx-4 rounded-xl border overflow-hidden",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 200ms ease-out"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"px-6 pt-6 pb-4 text-center",children:[(0,a.jsx)("div",{className:"w-14 h-14 mx-auto mb-4 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--status-skip-bg)"},children:(0,a.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--status-skip-text)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),(0,a.jsx)("polyline",{points:"16 17 21 12 16 7"}),(0,a.jsx)("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})}),(0,a.jsx)("h3",{className:"text-base font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Mau Keluar? Sedekahnya mana??"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-tertiary)"},children:"Sebelum keluar, mungkin bisa traktir developer secangkir kopi? ☕"})]}),(0,a.jsxs)("div",{className:"px-6 pb-5 flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>M(!1),className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Batal"}),(0,a.jsx)("button",{onClick:()=>{M(!1),y("Logging out..."),g(),setTimeout(()=>{w("Logged out!"),b.push("/login")},500)},className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-opacity hover:opacity-80",style:{backgroundColor:"var(--status-fail-text)",color:"#fff"},children:"Keluar"})]})]})})]})}function k(e){let{label:t,icon:r,active:s,href:l,badge:o}=e;return(0,a.jsxs)(i(),{href:l,className:"flex items-center gap-2 px-3 py-2 text-xs font-medium rounded-t-md transition-colors relative",style:{color:s?"var(--accent)":"var(--text-tertiary)",backgroundColor:s?"var(--bg-secondary)":"transparent"},children:[r,t,o&&(0,a.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold rounded-full leading-none",style:{backgroundColor:s?"var(--accent)":"var(--bg-secondary)",color:s?"#fff":"var(--text-tertiary)"},children:o}),s&&(0,a.jsx)("div",{className:"absolute bottom-0 left-2 right-2 h-0.5 rounded-t-full",style:{backgroundColor:"var(--accent)"}})]})}var w=r(7065);function C(e){let{children:t}=e,r=(0,l.useRouter)(),{isLoggedIn:o,loaded:n}=(0,c.A)();return((0,s.useEffect)(()=>{n&&!o&&r.replace("/login")},[n,o,r]),n)?o?(0,a.jsx)(a.Fragment,{children:t}):null:(0,a.jsx)("div",{className:"h-screen flex items-center justify-center",style:{backgroundColor:"var(--bg-primary)"},children:(0,a.jsx)("div",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:"Loading..."})})}function N(){let{undo:e,redo:t,canUndo:r,canRedo:a}=(0,o.M)();return(0,s.useEffect)(()=>{let s=s=>{(s.ctrlKey||s.metaKey)&&"z"===s.key&&!s.shiftKey&&(s.preventDefault(),r&&e()),(s.ctrlKey||s.metaKey)&&("Z"===s.key||"z"===s.key&&s.shiftKey)&&(s.preventDefault(),a&&t()),(s.ctrlKey||s.metaKey)&&"y"===s.key&&(s.preventDefault(),a&&t())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t,r,a]),null}function S(e){let{children:t}=e,{dialog:r}=(0,o.M)();return(0,a.jsxs)(a.Fragment,{children:[t,(0,a.jsx)(w.q,{dialog:r})]})}function M(e){let{children:t}=e;return(0,a.jsx)(C,{children:(0,a.jsx)(o.q,{children:(0,a.jsx)(S,{children:(0,a.jsxs)("div",{className:"h-screen flex flex-col",style:{backgroundColor:"var(--bg-primary)"},children:[(0,a.jsx)(N,{}),(0,a.jsx)(y,{}),(0,a.jsx)("div",{className:"flex-1 min-h-0",children:t})]})})})})}},9715:(e,t,r)=>{Promise.resolve().then(r.bind(r,8609))}},e=>{e.O(0,[619,246,441,255,358],()=>e(e.s=9715)),_N_E=e.O()}]);