9remote 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +35 -35
- package/dist/server.cjs +223 -205
- package/dist/ui/assets/index-BjdVz7mh.js +8 -0
- package/dist/ui/assets/index-NAPslvk3.css +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +2 -2
- package/dist/web/__next._full.txt +2 -2
- package/dist/web/__next._head.txt +1 -1
- package/dist/web/__next._index.txt +1 -1
- package/dist/web/__next._tree.txt +1 -1
- package/dist/web/_next/static/chunks/161-ccde05f90997adf7.js +1 -0
- package/dist/web/_next/static/chunks/{6552-5bb346448e83e0a2.js → 6552-09e2e0d864ebbc44.js} +1 -1
- package/dist/web/_next/static/chunks/9958-ccfdf26ae6776021.js +1 -0
- package/dist/web/_next/static/chunks/app/admin/admins/{page-4dd3a5a797a983ab.js → page-a83d0b3b92891389.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/login/{page-854bcdcb805c63c8.js → page-944e8499d7b8bc17.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/modes/{page-b0675a3cdae87688.js → page-567e8f7d4213406b.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/ota/{page-6de419e03b4822ef.js → page-8d387fa8da56b013.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/{page-ae83026dc795c35b.js → page-c008b84f3d009af1.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/turn/{page-8eb4a8792fca9bd9.js → page-4410571db9d99337.js} +1 -1
- package/dist/web/_next/static/chunks/app/dev/question/page-344ec1e850f0d8a2.js +1 -0
- package/dist/web/_next/static/chunks/app/login/{page-fda2e8572302edca.js → page-c9eba50fbf9af8b9.js} +1 -1
- package/dist/web/_next/static/chunks/app/{page-00c77a2e54c385ac.js → page-863e9695cfd65f93.js} +2 -2
- package/dist/web/_next/static/chunks/app/workspace/layout-08b1abf6c42c1416.js +14 -0
- package/dist/web/_not-found/__next._full.txt +1 -1
- package/dist/web/_not-found/__next._head.txt +1 -1
- package/dist/web/_not-found/__next._index.txt +1 -1
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/web/_not-found/__next._not-found.txt +1 -1
- package/dist/web/_not-found/__next._tree.txt +1 -1
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +1 -1
- package/dist/web/admin/__next._full.txt +2 -2
- package/dist/web/admin/__next._head.txt +1 -1
- package/dist/web/admin/__next._index.txt +1 -1
- package/dist/web/admin/__next._tree.txt +1 -1
- package/dist/web/admin/__next.admin.__PAGE__.txt +2 -2
- package/dist/web/admin/__next.admin.txt +1 -1
- package/dist/web/admin/admins/__next._full.txt +2 -2
- package/dist/web/admin/admins/__next._head.txt +1 -1
- package/dist/web/admin/admins/__next._index.txt +1 -1
- package/dist/web/admin/admins/__next._tree.txt +1 -1
- package/dist/web/admin/admins/__next.admin.admins.__PAGE__.txt +2 -2
- package/dist/web/admin/admins/__next.admin.admins.txt +1 -1
- package/dist/web/admin/admins/__next.admin.txt +1 -1
- package/dist/web/admin/admins.html +1 -1
- package/dist/web/admin/admins.txt +2 -2
- package/dist/web/admin/login/__next._full.txt +2 -2
- package/dist/web/admin/login/__next._head.txt +1 -1
- package/dist/web/admin/login/__next._index.txt +1 -1
- package/dist/web/admin/login/__next._tree.txt +1 -1
- package/dist/web/admin/login/__next.admin.login.__PAGE__.txt +2 -2
- package/dist/web/admin/login/__next.admin.login.txt +1 -1
- package/dist/web/admin/login/__next.admin.txt +1 -1
- package/dist/web/admin/login.html +1 -1
- package/dist/web/admin/login.txt +2 -2
- package/dist/web/admin/modes/__next._full.txt +2 -2
- package/dist/web/admin/modes/__next._head.txt +1 -1
- package/dist/web/admin/modes/__next._index.txt +1 -1
- package/dist/web/admin/modes/__next._tree.txt +1 -1
- package/dist/web/admin/modes/__next.admin.modes.__PAGE__.txt +2 -2
- package/dist/web/admin/modes/__next.admin.modes.txt +1 -1
- package/dist/web/admin/modes/__next.admin.txt +1 -1
- package/dist/web/admin/modes.html +1 -1
- package/dist/web/admin/modes.txt +2 -2
- package/dist/web/admin/ota/__next._full.txt +2 -2
- package/dist/web/admin/ota/__next._head.txt +1 -1
- package/dist/web/admin/ota/__next._index.txt +1 -1
- package/dist/web/admin/ota/__next._tree.txt +1 -1
- package/dist/web/admin/ota/__next.admin.ota.__PAGE__.txt +2 -2
- package/dist/web/admin/ota/__next.admin.ota.txt +1 -1
- package/dist/web/admin/ota/__next.admin.txt +1 -1
- package/dist/web/admin/ota.html +1 -1
- package/dist/web/admin/ota.txt +2 -2
- package/dist/web/admin/turn/__next._full.txt +2 -2
- package/dist/web/admin/turn/__next._head.txt +1 -1
- package/dist/web/admin/turn/__next._index.txt +1 -1
- package/dist/web/admin/turn/__next._tree.txt +1 -1
- package/dist/web/admin/turn/__next.admin.turn.__PAGE__.txt +2 -2
- package/dist/web/admin/turn/__next.admin.turn.txt +1 -1
- package/dist/web/admin/turn/__next.admin.txt +1 -1
- package/dist/web/admin/turn.html +1 -1
- package/dist/web/admin/turn.txt +2 -2
- package/dist/web/admin.html +1 -1
- package/dist/web/admin.txt +2 -2
- package/dist/web/agent-icons/claude.png +0 -0
- package/dist/web/dev/question/__next._full.txt +2 -2
- package/dist/web/dev/question/__next._head.txt +1 -1
- package/dist/web/dev/question/__next._index.txt +1 -1
- package/dist/web/dev/question/__next._tree.txt +1 -1
- package/dist/web/dev/question/__next.dev.question.__PAGE__.txt +2 -2
- package/dist/web/dev/question/__next.dev.question.txt +1 -1
- package/dist/web/dev/question/__next.dev.txt +1 -1
- package/dist/web/dev/question.html +1 -1
- package/dist/web/dev/question.txt +2 -2
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +2 -2
- package/dist/web/login/__next._full.txt +2 -2
- package/dist/web/login/__next._head.txt +1 -1
- package/dist/web/login/__next._index.txt +1 -1
- package/dist/web/login/__next._tree.txt +1 -1
- package/dist/web/login/__next.login.__PAGE__.txt +2 -2
- package/dist/web/login/__next.login.txt +1 -1
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +2 -2
- package/dist/web/workspace/__next._full.txt +2 -2
- package/dist/web/workspace/__next._head.txt +1 -1
- package/dist/web/workspace/__next._index.txt +1 -1
- package/dist/web/workspace/__next._tree.txt +1 -1
- package/dist/web/workspace/__next.workspace.__PAGE__.txt +1 -1
- package/dist/web/workspace/__next.workspace.txt +2 -2
- package/dist/web/workspace/browse/__next._full.txt +2 -2
- package/dist/web/workspace/browse/__next._head.txt +1 -1
- package/dist/web/workspace/browse/__next._index.txt +1 -1
- package/dist/web/workspace/browse/__next._tree.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.browse.__PAGE__.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.browse.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.txt +2 -2
- package/dist/web/workspace/browse.html +1 -1
- package/dist/web/workspace/browse.txt +2 -2
- package/dist/web/workspace/editor/__next._full.txt +2 -2
- package/dist/web/workspace/editor/__next._head.txt +1 -1
- package/dist/web/workspace/editor/__next._index.txt +1 -1
- package/dist/web/workspace/editor/__next._tree.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.editor.__PAGE__.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.editor.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.txt +2 -2
- package/dist/web/workspace/editor.html +1 -1
- package/dist/web/workspace/editor.txt +2 -2
- package/dist/web/workspace/files/__next._full.txt +2 -2
- package/dist/web/workspace/files/__next._head.txt +1 -1
- package/dist/web/workspace/files/__next._index.txt +1 -1
- package/dist/web/workspace/files/__next._tree.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.files.__PAGE__.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.files.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.txt +2 -2
- package/dist/web/workspace/files.html +1 -1
- package/dist/web/workspace/files.txt +2 -2
- package/dist/web/workspace/git/__next._full.txt +2 -2
- package/dist/web/workspace/git/__next._head.txt +1 -1
- package/dist/web/workspace/git/__next._index.txt +1 -1
- package/dist/web/workspace/git/__next._tree.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.git.__PAGE__.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.git.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.txt +2 -2
- package/dist/web/workspace/git.html +1 -1
- package/dist/web/workspace/git.txt +2 -2
- package/dist/web/workspace/mobile/__next._full.txt +2 -2
- package/dist/web/workspace/mobile/__next._head.txt +1 -1
- package/dist/web/workspace/mobile/__next._index.txt +1 -1
- package/dist/web/workspace/mobile/__next._tree.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.mobile.__PAGE__.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.mobile.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.txt +2 -2
- package/dist/web/workspace/mobile.html +1 -1
- package/dist/web/workspace/mobile.txt +2 -2
- package/dist/web/workspace/remote/__next._full.txt +2 -2
- package/dist/web/workspace/remote/__next._head.txt +1 -1
- package/dist/web/workspace/remote/__next._index.txt +1 -1
- package/dist/web/workspace/remote/__next._tree.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.remote.__PAGE__.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.remote.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.txt +2 -2
- package/dist/web/workspace/remote.html +1 -1
- package/dist/web/workspace/remote.txt +2 -2
- package/dist/web/workspace/terminal/default/__next._full.txt +2 -2
- package/dist/web/workspace/terminal/default/__next._head.txt +1 -1
- package/dist/web/workspace/terminal/default/__next._index.txt +1 -1
- package/dist/web/workspace/terminal/default/__next._tree.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.__PAGE__.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.txt +2 -2
- package/dist/web/workspace/terminal/default.html +1 -1
- package/dist/web/workspace/terminal/default.txt +2 -2
- package/dist/web/workspace/workspaces/__next._full.txt +2 -2
- package/dist/web/workspace/workspaces/__next._head.txt +1 -1
- package/dist/web/workspace/workspaces/__next._index.txt +1 -1
- package/dist/web/workspace/workspaces/__next._tree.txt +1 -1
- package/dist/web/workspace/workspaces/__next.workspace.txt +2 -2
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.__PAGE__.txt +1 -1
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.txt +1 -1
- package/dist/web/workspace/workspaces.html +1 -1
- package/dist/web/workspace/workspaces.txt +2 -2
- package/dist/web/workspace.html +1 -1
- package/dist/web/workspace.txt +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/index-CAvf0VPf.css +0 -1
- package/dist/ui/assets/index-CSihcjlv.js +0 -8
- package/dist/web/_next/static/chunks/7738-2439d4a20b745ce1.js +0 -1
- package/dist/web/_next/static/chunks/9958-9952a61eb6e17812.js +0 -1
- package/dist/web/_next/static/chunks/app/dev/question/page-a58ae088ccc40553.js +0 -1
- package/dist/web/_next/static/chunks/app/workspace/layout-90f9ac2ec0cf5aef.js +0 -14
- package/dist/web/agent-icons/claude.svg +0 -1
- /package/dist/web/_next/static/{aW3BVD9Z6dZG5uaKNzgmQ → YOawNeLZwNQHJ4nLya6K3}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{aW3BVD9Z6dZG5uaKNzgmQ → YOawNeLZwNQHJ4nLya6K3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9958],{8910:(e,a,t)=>{t.d(a,{e:()=>A});function A(e=10){if(navigator.vibrate)return void navigator.vibrate(e);if("u">typeof document){let e=document.createElement("div"),a=Math.random().toString(36).slice(2);e.innerHTML=`<input type="checkbox" id="${a}" switch /><label for="${a}"></label>`,e.setAttribute("style","display:none !important;opacity:0 !important;visibility:hidden !important;"),document.body.appendChild(e),e.querySelector("label").click(),setTimeout(()=>e.remove(),100)}}},30240:(e,a,t)=>{t.d(a,{A:()=>r});var A=t(73365);function r(){return(0,A.jsxs)("div",{className:"fixed inset-0 -z-10 overflow-hidden pointer-events-none landing-bg",children:[(0,A.jsx)("div",{className:"absolute inset-0 landing-grid"}),(0,A.jsx)("div",{className:"absolute inset-0 landing-vignette"})]})}},44976:(e,a,t)=>{t.d(a,{D:()=>n,ThemeProvider:()=>F});var A=t(73365),r=t(1521),l=t(79063);let o=(0,r.createContext)({theme:l.SS,setTheme:()=>{},toggleTheme:()=>{}}),c=e=>{if("u"<typeof document)return;let a=document.documentElement;a.classList.remove("light","dark"),a.classList.add(e),a.style.colorScheme=e;try{let a=window.__TAURI__?.window?.getCurrentWindow?.();a&&(a.setTheme?.(e)?.catch?.(()=>{}),a.setBackgroundColor?.("light"===e?"#e7e7e9":"#2a2a2a")?.catch?.(()=>{}))}catch{}},u=e=>{if(window.ReactNativeWebView)try{window.ReactNativeWebView.postMessage(JSON.stringify({type:"THEME_CHANGE",theme:e}))}catch(e){}};function F({children:e}){let[a,t]=(0,r.useState)(l.SS);(0,r.useEffect)(()=>{let e=localStorage.getItem(l.AQ)||localStorage.getItem("9remote-theme"),a=l.$.includes(e)?e:l.SS;t(a),c(a),u(a)},[]);let n=(0,r.useCallback)(e=>{l.$.includes(e)&&(t(e),c(e),u(e),localStorage.setItem(l.AQ,e),localStorage.setItem("9remote-theme",e))},[]),i=(0,r.useCallback)(()=>{n("dark"===a?"light":"dark")},[a,n]);return(0,A.jsx)(o.Provider,{value:{theme:a,setTheme:n,toggleTheme:i},children:e})}let n=()=>(0,r.useContext)(o)},64683:(e,a,t)=>{t.d(a,{$o:()=>eH.A,AX:()=>eE.A,Ay:()=>ar,BK:()=>e8.A,BZ:()=>Z.A,Bm:()=>z.A,Cp:()=>V.A,Do:()=>c.A,F1:()=>u.A,FE:()=>eZ.A,FW:()=>eP.A,GD:()=>H.A,GO:()=>eD.A,Gr:()=>L.A,Gv:()=>eb.A,Hx:()=>eA.A,Ir:()=>F.A,J4:()=>eX.A,JG:()=>d.A,JU:()=>I.A,Jl:()=>D.A,Kq:()=>at.A,LM:()=>ec.A,Lt:()=>k.A,M6:()=>eq.A,P6:()=>ee.A,QR:()=>v.A,Qp:()=>o.A,RI:()=>r.A,TB:()=>e9.A,Ud:()=>$.A,VA:()=>ed.A,Vn:()=>eI.A,W1:()=>es.A,WE:()=>b.A,We:()=>e0.A,Wn:()=>y.A,X:()=>aa.A,X_:()=>S.A,ZH:()=>G.A,ZU:()=>e6.A,Ze:()=>eM.A,Zr:()=>O.A,_O:()=>e2.A,_V:()=>Y.A,a4:()=>eg.A,aJ:()=>s.A,ak:()=>q.A,bE:()=>e3.A,bd:()=>eY.A,cC:()=>n.A,c_:()=>E.A,dJ:()=>N.A,de:()=>ae.A,dx:()=>j.A,e6:()=>ef.A,e9:()=>eT.A,eM:()=>eN.A,ek:()=>eJ.A,es:()=>eh.A,f2:()=>Q.A,f5:()=>w.A,gH:()=>ew.A,h1:()=>en.A,iU:()=>U.A,jG:()=>eS.A,jj:()=>eC.A,jl:()=>m.A,jz:()=>ek.A,kU:()=>M.A,kV:()=>ea.A,kr:()=>eo.A,kt:()=>e_.A,lM:()=>e1.A,lP:()=>eB.A,m0:()=>B.A,mN:()=>X.A,nU:()=>eF.A,qz:()=>J.A,rX:()=>g.A,s3:()=>et.A,sU:()=>e$.A,sv:()=>_.A,ue:()=>ey.A,vR:()=>ex.A,vW:()=>eR.A,vd:()=>W.A,vj:()=>ez.A,vv:()=>er.A,wB:()=>ej.A,wO:()=>eQ.A,ww:()=>K.A,xq:()=>ei.A,xv:()=>ep.A,y8:()=>el.A,yQ:()=>C.A,yU:()=>eL.A,yd:()=>l.A,zW:()=>e7.A});var A=t(73365),r=t(87821),l=t(21878),o=t(79376),c=t(61659),u=t(6504),F=t(74739),n=t(29967),i=t(17836),s=t(67494),D=t(66687),C=t(95188),d=t(54453),E=t(34582),g=t(70453),b=t(10949),m=t(64570),B=t(31258),h=t(59907),f=t(13374),y=t(17406),v=t(46431),k=t(29260),p=t(88433),x=t(49553),w=t(20478),L=t(17568),M=t(87831),S=t(1916),P=t(29418),G=t(18272),H=t(10550),R=t(9271),T=t(14251),U=t(50068),_=t(98173),N=t(10194),W=t(70362),z=t(17909),I=t(59437),O=t(33109),j=t(48433),V=t(86877),J=t(34271),Q=t(60919),$=t(35723),q=t(41046),X=t(64629),Z=t(6534),K=t(5370),Y=t(59711),ee=t(39831),ea=t(9560),et=t(44159),eA=t(20021),er=t(14797),el=t(15504),eo=t(93292),ec=t(92165),eu=t(94304),eF=t(40789),en=t(64871),ei=t(31805),es=t(19621),eD=t(40081),eC=t(38781),ed=t(88768),eE=t(68395),eg=t(88793),eb=t(25406),em=t(10998),eB=t(64446),eh=t(12925),ef=t(93354),ey=t(73243),ev=t(89317),ek=t(12283),ep=t(1578),ex=t(90612),ew=t(43959),eL=t(76621),eM=t(59833),eS=t(67236),eP=t(97038),eG=t(72147),eH=t(68859),eR=t(93285),eT=t(20178),eU=t(65062),e_=t(87030),eN=t(67519),eW=t(457),ez=t(58450),eI=t(48088),eO=t(56023),ej=t(59311),eV=t(38177),eJ=t(60659),eQ=t(1838),e$=t(34969),eq=t(42685),eX=t(99707),eZ=t(6830),eK=t(20248),eY=t(11384),e0=t(50211),e8=t(64342),e9=t(60151),e1=t(81610),e6=t(11990),e3=t(52715),e2=t(49387),e7=t(894),e5=t(2031),e4=t(58573),ae=t(51328),aa=t(3382),at=t(57717);let aA={AlertCircle:r.A,ArrowDown:l.A,ArrowRight:o.A,ArrowUp:c.A,ArrowUpRight:u.A,Bell:F.A,Bot:n.A,Bug:i.A,Check:s.A,CheckCircle2:D.A,ChevronDown:C.A,ChevronLeft:d.A,ChevronRight:E.A,ChevronUp:g.A,ChevronsDownUp:b.A,Circle:m.A,ClipboardPaste:B.A,Command:h.A,Compass:f.A,Columns2:y.A,Copy:v.A,CornerDownLeft:k.A,Crown:p.A,Delete:x.A,Download:w.A,ExternalLink:L.A,Eye:M.A,EyeOff:S.A,Facebook:P.A,File:G.A,FileCode:H.A,FileJson:R.A,FilePlus:T.A,FileText:U.A,Files:_.A,Filter:N.A,Folder:W.A,FolderOpen:z.A,FolderPlus:I.A,GitBranch:O.A,GitFork:j.A,Github:V.A,Globe:J.A,GripVertical:Q.A,Hand:$.A,HardDrive:q.A,HelpCircle:X.A,History:Z.A,Home:K.A,Image:Y.A,ImageOff:ee.A,KeyRound:ea.A,Keyboard:et.A,LayoutDashboard:eA.A,Link2:er.A,ListChecks:el.A,Loader2:eo.A,Lock:ec.A,LogIn:eu.A,LogOut:eF.A,Maximize2:en.A,Minimize2:ei.A,Menu:es.A,Mic:eD.A,MicOff:eC.A,Monitor:ed.A,Moon:eE.A,MoreHorizontal:eg.A,MoreVertical:eb.A,MousePointer2:em.A,Package:eB.A,Palette:eh.A,PanelLeft:ef.A,PanelLeftClose:ey.A,PanelLeftOpen:ev.A,PanelRight:ek.A,Paperclip:ep.A,Pause:ex.A,Pencil:ew.A,Pin:eL.A,PinOff:eM.A,Play:eS.A,Plus:eP.A,Power:eG.A,PowerOff:eH.A,QrCode:eR.A,RefreshCw:eT.A,Replace:eU.A,RotateCw:e_.A,Save:eN.A,Scissors:eW.A,Search:ez.A,Send:eI.A,SendHorizontal:eO.A,Settings:ej.A,Share:eV.A,Shield:eJ.A,Smartphone:eQ.A,Sparkles:e$.A,Square:eq.A,SquarePen:eX.A,Star:eZ.A,StickyNote:eK.A,Sun:eY.A,Target:e0.A,Terminal:e8.A,Trash2:e9.A,Triangle:e1.A,Type:e6.A,Undo2:e3.A,Upload:e2.A,Users:e7.A,Volume2:e5.A,VolumeX:e4.A,Wallpaper:ae.A,X:aa.A,Zap:at.A};function ar({name:e,size:a=20,className:t="",...r}){let l=aA[e];return l?(0,A.jsx)(l,{size:a,className:t,strokeWidth:2,...r}):(console.warn(`Icon "${e}" not found in the icon registry`),null)}},79063:(e,a,t)=>{t.d(a,{$:()=>A,AQ:()=>l,In:()=>n,SS:()=>r,aC:()=>c,g4:()=>F});let A=["dark","light"],r="dark",l="app_theme_v2";function o(e){return{background:e.bg,foreground:e.text,cursor:e.accent||e.peach||e.blue,cursorAccent:e.bg,selectionBackground:e.surface1,black:e.surfaceDim||e.bg,red:e.red,green:e.green,yellow:e.yellow,blue:e.blue,magenta:e.mauve,cyan:e.teal,white:e.subtext0||e.text,brightBlack:e.overlay0,brightRed:e.red,brightGreen:e.green,brightYellow:e.yellow,brightBlue:e.blue,brightMagenta:e.mauve,brightCyan:e.teal,brightWhite:e.text}}let c={dark:o({bg:"#1A1A1A",surface0:"#232323",surface1:"#2A2A2A",surfaceDim:"#101010",overlay0:"#5C5C5C",text:"#FFFFFF",subtext0:"#A0A0A0",red:"#FF8080",green:"#99FFE4",yellow:"#FFC799",blue:"#B0B0B0",mauve:"#FFD1A8",teal:"#66DDCC",peach:"#FFC799",accent:"#FFC799"}),light:o({bg:"#F5F5F5",surface0:"#E8E8E8",surface1:"#DDDDDD",surfaceDim:"#EFEFEF",overlay0:"#999999",text:"#1A1A1A",subtext0:"#5A5A5A",red:"#D9534F",green:"#2A9D8F",yellow:"#E07A3C",blue:"#6B6B6B",mauve:"#C97B5A",teal:"#3A9B8E",peach:"#E07A3C",accent:"#E07A3C"})},u={catppuccinMocha:o({bg:"#181825",surface0:"#31324A",surface1:"#45475A",surfaceDim:"#1E1E2E",overlay0:"#6C708E",text:"#CDD6F4",subtext0:"#A6ADC8",red:"#F38BA8",green:"#A6E3A1",yellow:"#F9E2AF",blue:"#89B4FA",mauve:"#CBA7F7",teal:"#94E2D5",peach:"#FAB387",accent:"#89B4FA"}),monokaiPro:o({bg:"#2D2A2E",surface0:"#353034",surface1:"#3D383C",surfaceDim:"#221F22",overlay0:"#72696A",text:"#FFF1F3",subtext0:"#C8C5C8",red:"#FD6883",green:"#ADDA78",yellow:"#F9CC6C",blue:"#F38D70",mauve:"#A8A9EB",teal:"#85DACC",peach:"#F38D70",accent:"#A8A9EB"}),gruvboxMaterial:o({bg:"#282828",surface0:"#3C3836",surface1:"#504945",surfaceDim:"#1D2021",overlay0:"#928374",text:"#D4BE98",subtext0:"#A89984",red:"#EA6962",green:"#A9B665",yellow:"#D8A657",blue:"#7DAEA3",mauve:"#D3869B",teal:"#89B482",peach:"#E78A4E",accent:"#E78A4E"}),dracula:o({bg:"#282A36",surface0:"#44475A",surface1:"#6272A4",surfaceDim:"#282A36",overlay0:"#6272A4",text:"#F8F8F2",subtext0:"#D2D2DC",red:"#FF5555",green:"#50FA7B",yellow:"#F1FA8C",blue:"#8BE9FD",mauve:"#FF79C6",teal:"#8BE9FD",peach:"#FFB86C",accent:"#BD93F9"}),everforest:o({bg:"#2D353B",surface0:"#343F44",surface1:"#3D484D",surfaceDim:"#232A2E",overlay0:"#7A8478",text:"#D3C6AA",subtext0:"#9DA9A0",red:"#E67E80",green:"#A7C080",yellow:"#DBBC7F",blue:"#7FBBB3",mauve:"#D699B6",teal:"#83C092",peach:"#E69875",accent:"#A7C080"}),linear:o({bg:"#08090A",surface0:"#0F1011",surface1:"#141516",surfaceDim:"#010102",overlay0:"#3E3E44",text:"#F7F8F8",subtext0:"#B4B4B8",red:"#F34E52",green:"#27A644",yellow:"#E4F222",blue:"#8FA6FF",mauve:"#8B5CF6",teal:"#02B8CC",peach:"#F7BF8B",accent:"#5E6AD2"}),synthwave:o({bg:"#262335",surface0:"#241B2F",surface1:"#34294F",surfaceDim:"#171520",overlay0:"#9D8BCA",text:"#FFFFFF",subtext0:"#FFFFFF99",red:"#FE4450",green:"#72F1B8",yellow:"#FEDE5D",blue:"#03EDF9",mauve:"#FF7EDB",teal:"#03EDF9",peach:"#F97E72",accent:"#FF7EDB"}),poimandres:o({bg:"#1B1E28",surface0:"#303340",surface1:"#3A4050",surfaceDim:"#14161F",overlay0:"#506477",text:"#E4F0FB",subtext0:"#A6ACCD",red:"#D0679D",green:"#5DE4C7",yellow:"#FFFAC2",blue:"#ADD7FF",mauve:"#F087BD",teal:"#5DE4C7",peach:"#F087BD",accent:"#5DE4C7"}),ayuMirage:o({bg:"#1F2430",surface0:"#212733",surface1:"#272D3A",surfaceDim:"#161B26",overlay0:"#686868",text:"#CBCCC6",subtext0:"#9A9B95",red:"#F08778",green:"#53BF97",yellow:"#FDCC60",blue:"#60B8D6",mauve:"#EC7171",teal:"#98E6CA",peach:"#FFA759",accent:"#FFCC66"}),githubDarkDimmed:o({bg:"#22272E",surface0:"#2D333B",surface1:"#373E47",surfaceDim:"#1C2128",overlay0:"#545D68",text:"#CDD9E5",subtext0:"#909DAB",red:"#F47067",green:"#57AB5A",yellow:"#C69026",blue:"#539BF5",mauve:"#B083F0",teal:"#39C5CF",peach:"#DAAA3F",accent:"#539BF5"}),palenight:o({bg:"#292D3E",surface0:"#313553",surface1:"#3A3F5F",surfaceDim:"#1F2233",overlay0:"#676E95",text:"#D0D0D0",subtext0:"#A0A0C0",red:"#E05252",green:"#2BE8A8",yellow:"#FFCB6B",blue:"#3FD0E0",mauve:"#C792EA",teal:"#3FD0E0",peach:"#FFCB6B",accent:"#82AAFF"}),nordDark:o({bg:"#2E3440",surface0:"#3B4252",surface1:"#434C5E",surfaceDim:"#232831",overlay0:"#4C566A",text:"#ECEFF4",subtext0:"#D8DEE9",red:"#BF616A",green:"#A3BE8C",yellow:"#EBCB8B",blue:"#81A1C1",mauve:"#B48EAD",teal:"#88C0D0",peach:"#D08770",accent:"#88C0D0"}),horizon:o({bg:"#1C1E26",surface0:"#232530",surface1:"#2E303E",surfaceDim:"#16161C",overlay0:"#6B6F8A",text:"#E0E0E0",subtext0:"#C5C8DA",red:"#E95678",green:"#29D398",yellow:"#FAB795",blue:"#26BBD9",mauve:"#EE64AC",teal:"#59E1E3",peach:"#FAB795",accent:"#EE64AC"}),kanagawaDragon:o({bg:"#181616",surface0:"#1D1C1C",surface1:"#252424",surfaceDim:"#0D0C0C",overlay0:"#7A6F7A",text:"#C5C9C5",subtext0:"#A6A69C",red:"#C4746E",green:"#87A987",yellow:"#E6C384",blue:"#8BA4B0",mauve:"#938AA9",teal:"#7AA89F",peach:"#FFA066",accent:"#8BA4B0"}),catppuccinLatte:o({bg:"#EFF1F5",surface0:"#CCD0DA",surface1:"#BCC0CC",surfaceDim:"#E6E9EF",overlay0:"#9CA0B0",text:"#4C4F69",subtext0:"#6C6F85",red:"#D20F39",green:"#40A02B",yellow:"#DF8E1D",blue:"#1E66F5",mauve:"#8839EF",teal:"#179299",peach:"#FE640B",accent:"#1E66F5"}),gruvboxLight:o({bg:"#FBF1C7",surface0:"#EBDBB2",surface1:"#D5C4A1",surfaceDim:"#F2E5BC",overlay0:"#928374",text:"#3C3836",subtext0:"#504945",red:"#9D0006",green:"#79740E",yellow:"#B57614",blue:"#076678",mauve:"#8F3F71",teal:"#427B58",peach:"#AF3A03",accent:"#B57614"}),githubLight:o({bg:"#FFFFFF",surface0:"#F6F8FA",surface1:"#EAEEF2",surfaceDim:"#EFF2F5",overlay0:"#8C959F",text:"#24292F",subtext0:"#57606A",red:"#CF222E",green:"#1A7F37",yellow:"#9A6700",blue:"#0969DA",mauve:"#8250DF",teal:"#1B7C83",peach:"#BC4C00",accent:"#0969DA"}),everforestLight:o({bg:"#FDF6E3",surface0:"#F4F0D9",surface1:"#EFEBD4",surfaceDim:"#E6E2CC",overlay0:"#9DA9A0",text:"#5C6A72",subtext0:"#7A8478",red:"#F85552",green:"#8DA101",yellow:"#DFA000",blue:"#3A94C5",mauve:"#DF69BA",teal:"#35A77C",peach:"#F57D3A",accent:"#8DA101"}),ayuLight:o({bg:"#FCFCFC",surface0:"#F3F3F3",surface1:"#E8E8E8",surfaceDim:"#F7F7F7",overlay0:"#C1C1C1",text:"#5C6166",subtext0:"#8A8F94",red:"#E7666A",green:"#80AB24",yellow:"#EBA54D",blue:"#4196DF",mauve:"#9870C3",teal:"#51B891",peach:"#E78F4D",accent:"#FF8552"}),tokyoDay:o({bg:"#D6D8DF",surface0:"#C8CBD4",surface1:"#B5B8C5",surfaceDim:"#E1E3EA",overlay0:"#9699AE",text:"#343B58",subtext0:"#565C70",red:"#C24242",green:"#41A6B5",yellow:"#8F5E15",blue:"#2959AA",mauve:"#7B43BA",teal:"#006C86",peach:"#D68910",accent:"#2959AA"}),roseDawn:o({bg:"#FAF4ED",surface0:"#F2E9E1",surface1:"#E9DDD2",surfaceDim:"#F5EBE0",overlay0:"#9893A5",text:"#576279",subtext0:"#797593",red:"#B4637A",green:"#618774",yellow:"#EA9D34",blue:"#286983",mauve:"#907AA9",teal:"#56949F",peach:"#D7827E",accent:"#D7827E"}),lavenderMist:o({bg:"#F6F3FB",surface0:"#EAE5F5",surface1:"#DDD6EE",surfaceDim:"#F0ECF8",overlay0:"#9B95B8",text:"#4A4467",subtext0:"#6B6491",red:"#C95D77",green:"#5FA17A",yellow:"#D9A441",blue:"#5B7FBE",mauve:"#8B7AB8",teal:"#5FA6A8",peach:"#D08A66",accent:"#8B7AB8"}),mintCream:o({bg:"#ECF6F0",surface0:"#DCEEE3",surface1:"#C9E3D2",surfaceDim:"#E2F1E9",overlay0:"#7FA396",text:"#2F4A40",subtext0:"#4E6B5F",red:"#C76B6B",green:"#3FA17A",yellow:"#C9A93E",blue:"#4A8DB8",mauve:"#9B6FA8",teal:"#3FA17A",peach:"#D58560",accent:"#3FA17A"})},F=[{key:"catppuccinMocha",label:"Catppuccin Mocha",mode:"dark"},{key:"monokaiPro",label:"Monokai Pro",mode:"dark"},{key:"dracula",label:"Dracula",mode:"dark"},{key:"everforest",label:"Everforest",mode:"dark"},{key:"gruvboxMaterial",label:"Gruvbox Material",mode:"dark"},{key:"linear",label:"Linear",mode:"dark"},{key:"synthwave",label:"Synthwave '84",mode:"dark"},{key:"poimandres",label:"Poimandres",mode:"dark"},{key:"ayuMirage",label:"Ayu Mirage",mode:"dark"},{key:"githubDarkDimmed",label:"GitHub Dimmed",mode:"dark"},{key:"palenight",label:"Palenight",mode:"dark"},{key:"nordDark",label:"Nord",mode:"dark"},{key:"horizon",label:"Horizon",mode:"dark"},{key:"kanagawaDragon",label:"Kanagawa Dragon",mode:"dark"},{key:"catppuccinLatte",label:"Catppuccin Latte",mode:"light"},{key:"gruvboxLight",label:"Gruvbox Light",mode:"light"},{key:"githubLight",label:"GitHub Light",mode:"light"},{key:"everforestLight",label:"Everforest Light",mode:"light"},{key:"ayuLight",label:"Ayu Light",mode:"light"},{key:"tokyoDay",label:"Tokyo Day",mode:"light"},{key:"roseDawn",label:"Rose Dawn",mode:"light"},{key:"lavenderMist",label:"Lavender Mist",mode:"light"},{key:"mintCream",label:"Mint Cream",mode:"light"}];function n(e,a){let t="light"===e?u.everforestLight:u.palenight;return a&&"default"!==a&&F.find(t=>t.key===a&&t.mode===e)&&u[a]||t}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4831],{37380:(e,t,s)=>{Promise.resolve().then(s.bind(s,68566))},68566:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var a=s(73365),r=s(1521),d=s(38334),n=s(80186),l=s(96042),i=s(64683),c=s(39457),o=s(24945),x=s(57042);let m={username:"",password:"",modeId:""};function u(){let{me:e,can:t}=(0,o.b)(),{get:s,post:u,patch:p,del:b}=(0,c.Z)(),[h,g]=(0,r.useState)([]),[f,j]=(0,r.useState)([]),[N,v]=(0,r.useState)(m),[y,w]=(0,r.useState)(null),[k,C]=(0,r.useState)(""),A=t(x.Jj.adminManage),I=(0,r.useCallback)(async()=>{let[e,t]=await Promise.all([s(x.lb.admins),s(x.lb.modes)]);g(e.items||[]),j(t.items||[]),!N.modeId&&(t.items||[]).length>0&&v(e=>({...e,modeId:t.items[0].id}))},[s]);(0,r.useEffect)(()=>{I()},[I]);let $=()=>{w(null),v({...m,modeId:f[0]?.id||""}),C("")},S=async()=>{C("");try{if(y)await p(`${x.lb.admins}/${y}`,{modeId:N.modeId,...N.password?{password:N.password}:{}});else{if(!N.username||!N.password||!N.modeId)return void C("All fields are required");await u(x.lb.admins,N)}$(),I()}catch(e){C(e.message)}},z=async e=>{if(confirm("Delete this admin account?"))try{await b(`${x.lb.admins}/${e}`),I()}catch(e){alert(e.message)}},E=e=>{if(!e)return"-";try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}};return(0,a.jsx)(d.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(i.zW,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Administrators"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Manage team operator access and privileged accounts"})]})}),A&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4 relative overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2",children:y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Edit admin:"}),(0,a.jsx)("span",{className:"font-mono text-brand-500 font-bold",children:N.username})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Create Administrator Account"})]})}),y&&(0,a.jsxs)("button",{onClick:$,className:"text-xs text-text-muted hover:text-text flex items-center gap-1",children:[(0,a.jsx)(i.X,{size:14})," Cancel"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,a.jsx)(l.A,{label:"Username",value:N.username,onChange:e=>v({...N,username:e.target.value}),disabled:!!y,placeholder:"operator username"}),(0,a.jsx)(l.A,{label:y?"New Password (optional)":"Password",type:"password",value:N.password,onChange:e=>v({...N,password:e.target.value}),placeholder:y?"Leave blank to keep":"••••••••"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-2",children:"Assigned Mode"}),(0,a.jsx)("select",{value:N.modeId,onChange:e=>v({...N,modeId:e.target.value}),className:"w-full px-3 py-2.5 bg-surface-2 border border-border-subtle rounded-xl text-text text-sm focus:outline-none focus:ring-2 focus:ring-brand-500/30 transition-all",children:f.map(e=>(0,a.jsxs)("option",{value:e.id,children:[e.name," (",e.id,")"]},e.id))})]})]}),k&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-2.5 rounded-lg border border-red-500/20",children:k}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)(n.A,{variant:"primary",onClick:S,className:"rounded-xl px-4 py-2",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",children:[(0,a.jsx)(i.eM,{size:14}),(0,a.jsx)("span",{children:y?"Update Account":"Create Administrator"})]})}),y&&(0,a.jsx)(n.A,{variant:"secondary",onClick:$,className:"rounded-xl px-4 py-2 text-xs",children:"Cancel"})]})]}),(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Username"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Security Role"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Created"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Last Login"}),A&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:h.map(t=>{let s=t.id===e?.id;return(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-3.5 font-medium text-text",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-xs",children:t.username}),s&&(0,a.jsx)("span",{className:"text-[10px] font-mono px-1.5 py-0.2 rounded-full bg-brand-500/10 text-brand-500 border border-brand-500/25",children:"you"})]})}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-surface-2 border border-border-subtle text-text",children:t.modeName||t.modeId})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted",children:E(t.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text font-medium",children:E(t.lastLoginAt)}),A&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>{w(t.id),v({username:t.username,password:"",modeId:t.modeId})},className:"text-xs text-brand-500 hover:text-brand-400 font-medium px-2 py-1 rounded hover:bg-brand-500/10 transition-colors",children:"Edit"}),!s&&(0,a.jsx)("button",{onClick:()=>z(t.id),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete admin",children:(0,a.jsx)(i.TB,{size:15})})]})})]},t.id)})})]})})]})})}},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({children:e,variant:t="primary",size:s="md",disabled:d=!1,loading:n=!1,onClick:l,className:i="",...c}){let o=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${d||n?"cursor-not-allowed":""} ${i}`;return(0,a.jsx)("button",{onClick:l,disabled:d||n,className:o,...c,children:n?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({label:e,type:t="text",value:s,onChange:d,onKeyDown:n,placeholder:l,disabled:i=!1,error:c,className:o="",...x}){let m=c?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",u=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${m} ${i?"opacity-50 cursor-not-allowed":""} ${o}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:t,value:s,onChange:d,onKeyDown:n,placeholder:l,disabled:i,className:u,...x}),c&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:c})]})}}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4831],{37380:(e,t,s)=>{Promise.resolve().then(s.bind(s,68566))},68566:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var a=s(73365),r=s(1521),d=s(38334),n=s(80186),l=s(96042),i=s(64683),c=s(39457),o=s(24945),x=s(57042);let m={username:"",password:"",modeId:""};function u(){let{me:e,can:t}=(0,o.b)(),{get:s,post:u,patch:p,del:b}=(0,c.Z)(),[h,g]=(0,r.useState)([]),[f,j]=(0,r.useState)([]),[N,v]=(0,r.useState)(m),[y,w]=(0,r.useState)(null),[k,C]=(0,r.useState)(""),A=t(x.Jj.adminManage),I=(0,r.useCallback)(async()=>{let[e,t]=await Promise.all([s(x.lb.admins),s(x.lb.modes)]);g(e.items||[]),j(t.items||[]),!N.modeId&&(t.items||[]).length>0&&v(e=>({...e,modeId:t.items[0].id}))},[s]);(0,r.useEffect)(()=>{I()},[I]);let $=()=>{w(null),v({...m,modeId:f[0]?.id||""}),C("")},S=async()=>{C("");try{if(y)await p(`${x.lb.admins}/${y}`,{modeId:N.modeId,...N.password?{password:N.password}:{}});else{if(!N.username||!N.password||!N.modeId)return void C("All fields are required");await u(x.lb.admins,N)}$(),I()}catch(e){C(e.message)}},z=async e=>{if(confirm("Delete this admin account?"))try{await b(`${x.lb.admins}/${e}`),I()}catch(e){alert(e.message)}},E=e=>{if(!e)return"-";try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}};return(0,a.jsx)(d.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(i.zW,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Administrators"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Manage team operator access and privileged accounts"})]})}),A&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4 relative overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2",children:y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Edit admin:"}),(0,a.jsx)("span",{className:"font-mono text-brand-500 font-bold",children:N.username})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Create Administrator Account"})]})}),y&&(0,a.jsxs)("button",{onClick:$,className:"text-xs text-text-muted hover:text-text flex items-center gap-1",children:[(0,a.jsx)(i.X,{size:14})," Cancel"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,a.jsx)(l.A,{label:"Username",value:N.username,onChange:e=>v({...N,username:e.target.value}),disabled:!!y,placeholder:"operator username"}),(0,a.jsx)(l.A,{label:y?"New Password (optional)":"Password",type:"password",value:N.password,onChange:e=>v({...N,password:e.target.value}),placeholder:y?"Leave blank to keep":"••••••••"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-2",children:"Assigned Mode"}),(0,a.jsx)("select",{value:N.modeId,onChange:e=>v({...N,modeId:e.target.value}),className:"w-full px-3 py-2.5 bg-surface-2 border border-border-subtle rounded-xl text-text text-sm focus:outline-none focus:ring-2 focus:ring-brand-500/30 transition-all",children:f.map(e=>(0,a.jsxs)("option",{value:e.id,children:[e.name," (",e.id,")"]},e.id))})]})]}),k&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-2.5 rounded-lg border border-red-500/20",children:k}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)(n.A,{variant:"primary",onClick:S,className:"rounded-xl px-4 py-2",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",children:[(0,a.jsx)(i.eM,{size:14}),(0,a.jsx)("span",{children:y?"Update Account":"Create Administrator"})]})}),y&&(0,a.jsx)(n.A,{variant:"secondary",onClick:$,className:"rounded-xl px-4 py-2 text-xs",children:"Cancel"})]})]}),(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Username"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Security Role"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Created"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Last Login"}),A&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:h.map(t=>{let s=t.id===e?.id;return(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-3.5 font-medium text-text",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-xs",children:t.username}),s&&(0,a.jsx)("span",{className:"text-[10px] font-mono px-1.5 py-0.2 rounded-full bg-brand-500/10 text-brand-500 border border-brand-500/25",children:"you"})]})}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-surface-2 border border-border-subtle text-text",children:t.modeName||t.modeId})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted",children:E(t.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text font-medium",children:E(t.lastLoginAt)}),A&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>{w(t.id),v({username:t.username,password:"",modeId:t.modeId})},className:"text-xs text-brand-500 hover:text-brand-400 font-medium px-2 py-1 rounded hover:bg-brand-500/10 transition-colors",children:"Edit"}),!s&&(0,a.jsx)("button",{onClick:()=>z(t.id),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete admin",children:(0,a.jsx)(i.TB,{size:15})})]})})]},t.id)})})]})})]})})}},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({children:e,variant:t="primary",size:s="md",disabled:d=!1,loading:n=!1,onClick:l,className:i="",...c}){let o=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${d||n?"cursor-not-allowed":""} ${i}`;return(0,a.jsx)("button",{onClick:l,disabled:d||n,className:o,...c,children:n?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({label:e,type:t="text",value:s,onChange:d,onKeyDown:n,placeholder:l,disabled:i=!1,error:c,className:o="",...x}){let m=c?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",u=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${m} ${i?"opacity-50 cursor-not-allowed":""} ${o}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:t,value:s,onChange:d,onKeyDown:n,placeholder:l,disabled:i,className:u,...x}),c&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:c})]})}}},e=>{e.O(0,[161,9568,9958,8334,2347,5158,7358],()=>e(e.s=37380)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2116],{29717:(e,t,s)=>{"use strict";var r=s(21505);s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},57042:(e,t,s)=>{"use strict";s.d(t,{GS:()=>d,Jj:()=>r,Qh:()=>a,Wm:()=>i,lb:()=>c,r6:()=>n,rK:()=>o,xp:()=>l});let r={sessionView:"session.view",sessionDelete:"session.delete",modeView:"mode.view",modeManage:"mode.manage",adminView:"admin.view",adminManage:"admin.manage",otaView:"ota.view",otaManage:"ota.manage",turnView:"turn.view",turnManage:"turn.manage",logView:"log.view"},n=Object.values(r),a=18e5,i=20,l=[10,20,50,100],d=["createdAt","lastAccessAt","expiresAt","machineId"],o=[{key:"loyal",label:"Loyal",minMs:6048e5,color:"text-success"},{key:"returning",label:"Returning",minMs:864e5,color:"text-brand-500"},{key:"active",label:"Active",minMs:3e5,color:"text-brand-400"},{key:"new",label:"New",minMs:0,color:"text-text-muted"}],c={login:"/api/admin/login",logout:"/api/admin/logout",me:"/api/admin/me",sessions:"/api/admin/sessions",stats:"/api/admin/stats",modes:"/api/admin/modes",admins:"/api/admin/admins",ota:"/api/admin/ota",turn:"/api/admin/turn",logins:"/api/admin/logins",turnstile:"/api/admin/turnstile"}},59893:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(73365);function n({children:e,centered:t=!0,className:s=""}){return(0,r.jsx)("div",{className:`min-h-screen ${t?"flex items-center justify-center p-4":""} ${s}`,children:e})}},73249:(e,t,s)=>{Promise.resolve().then(s.bind(s,79365))},79365:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var r=s(73365),n=s(1521),a=s(29717),i=s(99568),l=s(59893),d=s(80186),o=s(96042),c=s(90753),u=s(30240);function x({siteKey:e,onToken:t}){let s=(0,n.useRef)(null),a=(0,n.useRef)(t);return((0,n.useEffect)(()=>{a.current=t},[t]),(0,n.useEffect)(()=>{if(!e||!s.current)return;let t=null,r=()=>{window.turnstile?.render&&s.current&&(t=window.turnstile.render(s.current,{sitekey:e,callback:e=>a.current(e),"expired-callback":()=>a.current(""),"error-callback":()=>a.current("")}))};if(window.turnstile?.render)r();else{let e=document.createElement("script");e.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",e.async=!0,e.onload=r,document.head.appendChild(e)}return()=>{null!=t&&window.turnstile?.remove?.(t)}},[e]),e)?(0,r.jsx)("div",{ref:s,className:"flex justify-center min-h-[33px]","aria-label":"Captcha"}):null}var m=s(64683),h=s(57042);function b(){let e=(0,a.useRouter)(),[t,s]=(0,n.useState)(""),[b,g]=(0,n.useState)(""),[p,f]=(0,n.useState)(""),[w,j]=(0,n.useState)(!1),[v,y]=(0,n.useState)(""),[k,N]=(0,n.useState)("");(0,n.useEffect)(()=>{fetch(h.lb.turnstile).then(e=>e.json()).then(e=>y(e?.siteKey||"")).catch(()=>y(""))},[]);let A=async()=>{if(t&&b){j(!0),f("");try{let s=await fetch(h.lb.login,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:b,turnstileToken:k}),credentials:"include"}),r=await s.json();if(!s.ok)throw Error(r?.error||"Login failed");e.replace("/admin")}catch(e){f(e.message),N(""),window.turnstile?.reset?.()}finally{j(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{}),(0,r.jsx)(l.A,{children:(0,r.jsxs)("div",{className:"card-glass p-8 sm:p-10 max-w-md w-full relative overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-48 h-1 bg-brand-500/80 rounded-full blur-sm"}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-8",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg bg-brand-500 text-white shadow-[0_8px_24px_-6px_rgba(255,87,10,0.5)] ring-1 ring-white/20",children:"9"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-[11px] font-mono tracking-wider uppercase text-brand-500 font-semibold block",children:"Console"}),(0,r.jsx)("h1",{className:"text-xl font-bold tracking-tight text-text",children:"9Remote Admin"})]})]}),(0,r.jsx)(c.A,{className:"rounded-xl border border-border-subtle"})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad",children:"Welcome back"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Sign in with administrator credentials to manage node instances"})]}),p&&(0,r.jsxs)("div",{className:"mb-5 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-danger text-xs flex items-center gap-2",children:[(0,r.jsx)(m.RI,{size:15,className:"shrink-0"}),(0,r.jsx)("span",{children:p})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(o.A,{label:"Admin Username",value:t,onChange:e=>s(e.target.value),placeholder:"e.g. root",autoFocus:!0,onKeyDown:e=>"Enter"===e.key&&A()}),(0,r.jsx)(o.A,{label:"Password",type:"password",value:b,onChange:e=>g(e.target.value),placeholder:"••••••••",onKeyDown:e=>"Enter"===e.key&&A()}),(0,r.jsx)(x,{siteKey:v,onToken:N}),(0,r.jsx)(d.A,{variant:"primary",onClick:A,disabled:!t||!b||v&&!k,loading:w,className:"w-full py-2.5 rounded-xl shadow-[0_8px_20px_-6px_rgba(255,87,10,0.45)] font-semibold",children:(0,r.jsxs)("span",{className:"inline-flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{children:"Authenticate"}),(0,r.jsx)(m.Qp,{size:16})]})})]}),(0,r.jsxs)("div",{className:"mt-8 pt-5 border-t border-border-subtle flex items-center justify-between text-xs text-text-subtle",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(m.ek,{size:13,className:"text-brand-500"}),(0,r.jsx)("span",{children:"Restricted access"})]}),(0,r.jsx)(i,{href:"/login",className:"hover:text-brand-500 transition-colors",children:"User Login →"})]})]})})]})}},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(73365);function n({children:e,variant:t="primary",size:s="md",disabled:a=!1,loading:i=!1,onClick:l,className:d="",...o}){let c=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${a||i?"cursor-not-allowed":""} ${d}`;return(0,r.jsx)("button",{onClick:l,disabled:a||i,className:c,...o,children:i?(0,r.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},90753:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var r=s(73365),n=s(44976),a=s(8910);let i=({size:e=18})=>(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,r.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),l=({size:e=18})=>(0,r.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function d({className:e="",size:t=18}){let{theme:s,toggleTheme:o}=(0,n.D)(),c="dark"===s;return(0,r.jsx)("button",{type:"button",onClick:()=>{(0,a.e)(),o()},"aria-label":c?"Switch to light theme":"Switch to dark theme",title:c?"Light mode":"Dark mode",className:`p-1.5 rounded-brand transition-colors text-[var(--color-text-muted)] hover:text-[var(--color-text)] hover:bg-[var(--color-surface-2)] ${e}`,children:c?(0,r.jsx)(i,{size:t}):(0,r.jsx)(l,{size:t})})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(73365);function n({label:e,type:t="text",value:s,onChange:a,onKeyDown:i,placeholder:l,disabled:d=!1,error:o,className:c="",...u}){let x=o?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",m=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${x} ${d?"opacity-50 cursor-not-allowed":""} ${c}`;return(0,r.jsxs)("div",{className:"w-full",children:[e&&(0,r.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,r.jsx)("input",{type:t,value:s,onChange:a,onKeyDown:i,placeholder:l,disabled:d,className:m,...u}),o&&(0,r.jsx)("p",{className:"mt-1 text-sm text-red-400",children:o})]})}}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2116],{29717:(e,t,s)=>{"use strict";var r=s(21505);s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},57042:(e,t,s)=>{"use strict";s.d(t,{GS:()=>d,Jj:()=>r,Qh:()=>a,Wm:()=>i,lb:()=>c,r6:()=>n,rK:()=>o,xp:()=>l});let r={sessionView:"session.view",sessionDelete:"session.delete",modeView:"mode.view",modeManage:"mode.manage",adminView:"admin.view",adminManage:"admin.manage",otaView:"ota.view",otaManage:"ota.manage",turnView:"turn.view",turnManage:"turn.manage",logView:"log.view"},n=Object.values(r),a=18e5,i=20,l=[10,20,50,100],d=["createdAt","lastAccessAt","expiresAt","machineId"],o=[{key:"loyal",label:"Loyal",minMs:6048e5,color:"text-success"},{key:"returning",label:"Returning",minMs:864e5,color:"text-brand-500"},{key:"active",label:"Active",minMs:3e5,color:"text-brand-400"},{key:"new",label:"New",minMs:0,color:"text-text-muted"}],c={login:"/api/admin/login",logout:"/api/admin/logout",me:"/api/admin/me",sessions:"/api/admin/sessions",stats:"/api/admin/stats",modes:"/api/admin/modes",admins:"/api/admin/admins",ota:"/api/admin/ota",turn:"/api/admin/turn",logins:"/api/admin/logins",turnstile:"/api/admin/turnstile"}},59893:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(73365);function n({children:e,centered:t=!0,className:s=""}){return(0,r.jsx)("div",{className:`min-h-screen ${t?"flex items-center justify-center p-4":""} ${s}`,children:e})}},73249:(e,t,s)=>{Promise.resolve().then(s.bind(s,79365))},79365:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var r=s(73365),n=s(1521),a=s(29717),i=s(99568),l=s(59893),d=s(80186),o=s(96042),c=s(90753),u=s(30240);function x({siteKey:e,onToken:t}){let s=(0,n.useRef)(null),a=(0,n.useRef)(t);return((0,n.useEffect)(()=>{a.current=t},[t]),(0,n.useEffect)(()=>{if(!e||!s.current)return;let t=null,r=()=>{window.turnstile?.render&&s.current&&(t=window.turnstile.render(s.current,{sitekey:e,callback:e=>a.current(e),"expired-callback":()=>a.current(""),"error-callback":()=>a.current("")}))};if(window.turnstile?.render)r();else{let e=document.createElement("script");e.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",e.async=!0,e.onload=r,document.head.appendChild(e)}return()=>{null!=t&&window.turnstile?.remove?.(t)}},[e]),e)?(0,r.jsx)("div",{ref:s,className:"flex justify-center min-h-[33px]","aria-label":"Captcha"}):null}var m=s(64683),h=s(57042);function b(){let e=(0,a.useRouter)(),[t,s]=(0,n.useState)(""),[b,g]=(0,n.useState)(""),[p,f]=(0,n.useState)(""),[w,j]=(0,n.useState)(!1),[v,y]=(0,n.useState)(""),[k,N]=(0,n.useState)("");(0,n.useEffect)(()=>{fetch(h.lb.turnstile).then(e=>e.json()).then(e=>y(e?.siteKey||"")).catch(()=>y(""))},[]);let A=async()=>{if(t&&b){j(!0),f("");try{let s=await fetch(h.lb.login,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:b,turnstileToken:k}),credentials:"include"}),r=await s.json();if(!s.ok)throw Error(r?.error||"Login failed");e.replace("/admin")}catch(e){f(e.message),N(""),window.turnstile?.reset?.()}finally{j(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{}),(0,r.jsx)(l.A,{children:(0,r.jsxs)("div",{className:"card-glass p-8 sm:p-10 max-w-md w-full relative overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-48 h-1 bg-brand-500/80 rounded-full blur-sm"}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-8",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg bg-brand-500 text-white shadow-[0_8px_24px_-6px_rgba(255,87,10,0.5)] ring-1 ring-white/20",children:"9"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-[11px] font-mono tracking-wider uppercase text-brand-500 font-semibold block",children:"Console"}),(0,r.jsx)("h1",{className:"text-xl font-bold tracking-tight text-text",children:"9Remote Admin"})]})]}),(0,r.jsx)(c.A,{className:"rounded-xl border border-border-subtle"})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad",children:"Welcome back"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Sign in with administrator credentials to manage node instances"})]}),p&&(0,r.jsxs)("div",{className:"mb-5 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-danger text-xs flex items-center gap-2",children:[(0,r.jsx)(m.RI,{size:15,className:"shrink-0"}),(0,r.jsx)("span",{children:p})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(o.A,{label:"Admin Username",value:t,onChange:e=>s(e.target.value),placeholder:"e.g. root",autoFocus:!0,onKeyDown:e=>"Enter"===e.key&&A()}),(0,r.jsx)(o.A,{label:"Password",type:"password",value:b,onChange:e=>g(e.target.value),placeholder:"••••••••",onKeyDown:e=>"Enter"===e.key&&A()}),(0,r.jsx)(x,{siteKey:v,onToken:N}),(0,r.jsx)(d.A,{variant:"primary",onClick:A,disabled:!t||!b||v&&!k,loading:w,className:"w-full py-2.5 rounded-xl shadow-[0_8px_20px_-6px_rgba(255,87,10,0.45)] font-semibold",children:(0,r.jsxs)("span",{className:"inline-flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{children:"Authenticate"}),(0,r.jsx)(m.Qp,{size:16})]})})]}),(0,r.jsxs)("div",{className:"mt-8 pt-5 border-t border-border-subtle flex items-center justify-between text-xs text-text-subtle",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(m.ek,{size:13,className:"text-brand-500"}),(0,r.jsx)("span",{children:"Restricted access"})]}),(0,r.jsx)(i,{href:"/login",className:"hover:text-brand-500 transition-colors",children:"User Login →"})]})]})})]})}},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(73365);function n({children:e,variant:t="primary",size:s="md",disabled:a=!1,loading:i=!1,onClick:l,className:d="",...o}){let c=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${a||i?"cursor-not-allowed":""} ${d}`;return(0,r.jsx)("button",{onClick:l,disabled:a||i,className:c,...o,children:i?(0,r.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},90753:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var r=s(73365),n=s(44976),a=s(8910);let i=({size:e=18})=>(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,r.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),l=({size:e=18})=>(0,r.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function d({className:e="",size:t=18}){let{theme:s,toggleTheme:o}=(0,n.D)(),c="dark"===s;return(0,r.jsx)("button",{type:"button",onClick:()=>{(0,a.e)(),o()},"aria-label":c?"Switch to light theme":"Switch to dark theme",title:c?"Light mode":"Dark mode",className:`p-1.5 rounded-brand transition-colors text-[var(--color-text-muted)] hover:text-[var(--color-text)] hover:bg-[var(--color-surface-2)] ${e}`,children:c?(0,r.jsx)(i,{size:t}):(0,r.jsx)(l,{size:t})})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(73365);function n({label:e,type:t="text",value:s,onChange:a,onKeyDown:i,placeholder:l,disabled:d=!1,error:o,className:c="",...u}){let x=o?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",m=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${x} ${d?"opacity-50 cursor-not-allowed":""} ${c}`;return(0,r.jsxs)("div",{className:"w-full",children:[e&&(0,r.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,r.jsx)("input",{type:t,value:s,onChange:a,onKeyDown:i,placeholder:l,disabled:d,className:m,...u}),o&&(0,r.jsx)("p",{className:"mt-1 text-sm text-red-400",children:o})]})}}},e=>{e.O(0,[161,9568,9958,2347,5158,7358],()=>e(e.s=73249)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{16064:(e,s,t)=>{Promise.resolve().then(t.bind(t,91758))},80186:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({children:e,variant:s="primary",size:t="md",disabled:n=!1,loading:i=!1,onClick:d,className:l="",...c}){let x=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[s]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[t]} ${n||i?"cursor-not-allowed":""} ${l}`;return(0,a.jsx)("button",{onClick:d,disabled:n||i,className:x,...c,children:i?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},91758:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>p});var a=t(73365),r=t(1521),n=t(38334),i=t(80186),d=t(96042),l=t(64683),c=t(39457),x=t(24945),o=t(57042);let m={id:"",name:"",permissions:[]};function p(){let{can:e}=(0,x.b)(),{get:s,post:t,patch:p,del:u}=(0,c.Z)(),[b,h]=(0,r.useState)([]),[g,f]=(0,r.useState)(m),[j,N]=(0,r.useState)(null),[y,v]=(0,r.useState)(""),w=e(o.Jj.modeManage),k=(0,r.useCallback)(async()=>{h((await s(o.lb.modes)).items||[])},[s]);(0,r.useEffect)(()=>{k()},[k]);let C=()=>{N(null),f(m),v("")},$=async()=>{v("");try{if(j)await p(`${o.lb.modes}/${j}`,{name:g.name,permissions:g.permissions});else{if(!g.id||!g.name)return void v("ID and name are required");await t(o.lb.modes,g)}C(),k()}catch(e){v(e.message)}},_=async e=>{if(confirm(`Delete mode ${e}?`))try{await u(`${o.lb.modes}/${e}`),k()}catch(e){alert(e.message)}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(l.ek,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Modes & Permissions"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Configure security roles and granular permission sets"})]})}),w&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4 relative overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2",children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Edit role:"}),(0,a.jsx)("span",{className:"font-mono text-brand-500 font-bold",children:j})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Create New Security Mode"})]})}),j&&(0,a.jsxs)("button",{onClick:C,className:"text-xs text-text-muted hover:text-text flex items-center gap-1",children:[(0,a.jsx)(l.X,{size:14})," Cancel"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(d.A,{label:"Mode ID",value:g.id,onChange:e=>f({...g,id:e.target.value}),disabled:!!j,placeholder:"e.g. support-lead"}),(0,a.jsx)(d.A,{label:"Display Name",value:g.name,onChange:e=>f({...g,name:e.target.value}),placeholder:"e.g. Support Team Lead"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-2.5",children:"Permissions Granted"}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:o.r6.map(e=>{let s=g.permissions.includes(e);return(0,a.jsxs)("button",{type:"button",onClick:()=>{f(s=>({...s,permissions:s.permissions.includes(e)?s.permissions.filter(s=>s!==e):[...s.permissions,e]}))},className:`flex items-center justify-between px-3 py-2 rounded-xl text-xs font-mono border transition-all text-left ${s?"bg-brand-500/12 text-brand-500 border-brand-500/30 shadow-[0_2px_8px_-2px_rgba(255,87,10,0.2)]":"bg-surface-2/60 text-text-muted border-border-subtle hover:bg-surface-2 hover:text-text"}`,children:[(0,a.jsx)("span",{className:"truncate",children:e}),s?(0,a.jsx)(l.aJ,{size:13,className:"text-brand-500 shrink-0 ml-1.5"}):null]},e)})})]}),y&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-2.5 rounded-lg border border-red-500/20",children:y}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)(i.A,{variant:"primary",onClick:$,className:"rounded-xl px-4 py-2",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",children:[(0,a.jsx)(l.eM,{size:14}),(0,a.jsx)("span",{children:j?"Save Changes":"Create Mode"})]})}),j&&(0,a.jsx)(i.A,{variant:"secondary",onClick:C,className:"rounded-xl px-4 py-2 text-xs",children:"Cancel"})]})]}),(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"ID"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Role Name"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Assigned Permissions"}),w&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:b.map(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}return(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-3.5 font-mono text-xs font-semibold text-text",children:e.id}),(0,a.jsx)("td",{className:"px-4 py-3.5 font-medium text-text",children:e.name}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1 max-w-md",children:s.map(e=>(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-md bg-surface-2 border border-border-subtle text-[10px] font-mono text-text-muted",children:e},e))})}),w&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}N(e.id),f({id:e.id,name:e.name,permissions:s})})(e),className:"text-xs text-brand-500 hover:text-brand-400 font-medium px-2 py-1 rounded hover:bg-brand-500/10 transition-colors",children:"Edit"}),(0,a.jsx)("button",{onClick:()=>_(e.id),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete mode",children:(0,a.jsx)(l.TB,{size:15})})]})})]},e.id)})})]})})]})})}},96042:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({label:e,type:s="text",value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l=!1,error:c,className:x="",...o}){let m=c?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",p=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${m} ${l?"opacity-50 cursor-not-allowed":""} ${x}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:s,value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l,className:p,...o}),c&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:c})]})}}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{16064:(e,s,t)=>{Promise.resolve().then(t.bind(t,91758))},80186:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({children:e,variant:s="primary",size:t="md",disabled:n=!1,loading:i=!1,onClick:d,className:l="",...c}){let x=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[s]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[t]} ${n||i?"cursor-not-allowed":""} ${l}`;return(0,a.jsx)("button",{onClick:d,disabled:n||i,className:x,...c,children:i?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},91758:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>p});var a=t(73365),r=t(1521),n=t(38334),i=t(80186),d=t(96042),l=t(64683),c=t(39457),x=t(24945),o=t(57042);let m={id:"",name:"",permissions:[]};function p(){let{can:e}=(0,x.b)(),{get:s,post:t,patch:p,del:u}=(0,c.Z)(),[b,h]=(0,r.useState)([]),[g,f]=(0,r.useState)(m),[j,N]=(0,r.useState)(null),[y,v]=(0,r.useState)(""),w=e(o.Jj.modeManage),k=(0,r.useCallback)(async()=>{h((await s(o.lb.modes)).items||[])},[s]);(0,r.useEffect)(()=>{k()},[k]);let C=()=>{N(null),f(m),v("")},$=async()=>{v("");try{if(j)await p(`${o.lb.modes}/${j}`,{name:g.name,permissions:g.permissions});else{if(!g.id||!g.name)return void v("ID and name are required");await t(o.lb.modes,g)}C(),k()}catch(e){v(e.message)}},_=async e=>{if(confirm(`Delete mode ${e}?`))try{await u(`${o.lb.modes}/${e}`),k()}catch(e){alert(e.message)}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(l.ek,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Modes & Permissions"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Configure security roles and granular permission sets"})]})}),w&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4 relative overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2",children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Edit role:"}),(0,a.jsx)("span",{className:"font-mono text-brand-500 font-bold",children:j})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Create New Security Mode"})]})}),j&&(0,a.jsxs)("button",{onClick:C,className:"text-xs text-text-muted hover:text-text flex items-center gap-1",children:[(0,a.jsx)(l.X,{size:14})," Cancel"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(d.A,{label:"Mode ID",value:g.id,onChange:e=>f({...g,id:e.target.value}),disabled:!!j,placeholder:"e.g. support-lead"}),(0,a.jsx)(d.A,{label:"Display Name",value:g.name,onChange:e=>f({...g,name:e.target.value}),placeholder:"e.g. Support Team Lead"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-2.5",children:"Permissions Granted"}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:o.r6.map(e=>{let s=g.permissions.includes(e);return(0,a.jsxs)("button",{type:"button",onClick:()=>{f(s=>({...s,permissions:s.permissions.includes(e)?s.permissions.filter(s=>s!==e):[...s.permissions,e]}))},className:`flex items-center justify-between px-3 py-2 rounded-xl text-xs font-mono border transition-all text-left ${s?"bg-brand-500/12 text-brand-500 border-brand-500/30 shadow-[0_2px_8px_-2px_rgba(255,87,10,0.2)]":"bg-surface-2/60 text-text-muted border-border-subtle hover:bg-surface-2 hover:text-text"}`,children:[(0,a.jsx)("span",{className:"truncate",children:e}),s?(0,a.jsx)(l.aJ,{size:13,className:"text-brand-500 shrink-0 ml-1.5"}):null]},e)})})]}),y&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-2.5 rounded-lg border border-red-500/20",children:y}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)(i.A,{variant:"primary",onClick:$,className:"rounded-xl px-4 py-2",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",children:[(0,a.jsx)(l.eM,{size:14}),(0,a.jsx)("span",{children:j?"Save Changes":"Create Mode"})]})}),j&&(0,a.jsx)(i.A,{variant:"secondary",onClick:C,className:"rounded-xl px-4 py-2 text-xs",children:"Cancel"})]})]}),(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"ID"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Role Name"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Assigned Permissions"}),w&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:b.map(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}return(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-3.5 font-mono text-xs font-semibold text-text",children:e.id}),(0,a.jsx)("td",{className:"px-4 py-3.5 font-medium text-text",children:e.name}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1 max-w-md",children:s.map(e=>(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-md bg-surface-2 border border-border-subtle text-[10px] font-mono text-text-muted",children:e},e))})}),w&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}N(e.id),f({id:e.id,name:e.name,permissions:s})})(e),className:"text-xs text-brand-500 hover:text-brand-400 font-medium px-2 py-1 rounded hover:bg-brand-500/10 transition-colors",children:"Edit"}),(0,a.jsx)("button",{onClick:()=>_(e.id),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete mode",children:(0,a.jsx)(l.TB,{size:15})})]})})]},e.id)})})]})})]})})}},96042:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({label:e,type:s="text",value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l=!1,error:c,className:x="",...o}){let m=c?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",p=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${m} ${l?"opacity-50 cursor-not-allowed":""} ${x}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:s,value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l,className:p,...o}),c&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:c})]})}}},e=>{e.O(0,[161,9568,9958,8334,2347,5158,7358],()=>e(e.s=16064)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8535],{52840:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(73365),r=s(1521),n=s(38334),l=s(39457),d=s(24945),i=s(57042),o=s(64683);let x=["","ios","android"];function c(){let{can:e}=(0,d.b)(),{get:t,post:s}=(0,l.Z)(),[c,m]=(0,r.useState)([]),[u,p]=(0,r.useState)(!0),[h,b]=(0,r.useState)(""),[f,g]=(0,r.useState)({runtimeVersion:"",platform:"",channel:""}),[j,N]=(0,r.useState)(null),y=e(i.Jj.otaManage),v=(0,r.useCallback)(async()=>{p(!0),b("");try{let e=new URLSearchParams;f.runtimeVersion&&e.set("runtimeVersion",f.runtimeVersion),f.platform&&e.set("platform",f.platform),f.channel&&e.set("channel",f.channel);let s=await t(`${i.lb.ota}?${e}`);m(s.items||[])}catch(e){b(e.message)}finally{p(!1)}},[t,f.runtimeVersion,f.platform,f.channel]);(0,r.useEffect)(()=>{v()},[]);let w=async e=>{if(confirm(`Promote #${e.buildNumber} to serving for channel "${e.channel}" (${e.platform}, ${e.runtimeVersion})?`)){N(e.id);try{await s(`${i.lb.ota}/${e.id}/promote`),await v()}catch(e){b(e.message)}finally{N(null)}}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(o.lP,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"OTA Updates"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Publish, promote and rollback mobile application bundles"})]}),(0,a.jsxs)("button",{onClick:v,disabled:u,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(o.e9,{size:13,className:u?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"card-glass p-4 grid grid-cols-1 sm:grid-cols-4 gap-3",children:[(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Runtime (e.g. 0.1.7)",value:f.runtimeVersion,onChange:e=>g({...f,runtimeVersion:e.target.value})}),(0,a.jsx)("select",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.platform,onChange:e=>g({...f,platform:e.target.value}),children:x.map(e=>(0,a.jsx)("option",{value:e,children:e?e.toUpperCase():"All platforms"},e))}),(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Channel (e.g. production)",value:f.channel,onChange:e=>g({...f,channel:e.target.value})}),(0,a.jsx)("button",{onClick:v,className:"px-4 py-2 text-xs font-semibold bg-brand-500 text-white rounded-xl hover:bg-brand-600 shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)] transition-all",children:"Filter Bundles"})]}),h&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:h}),u?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(o.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading updates catalog..."]}):0===c.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(o.lP,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No updates published"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Publish an OTA update package with ",(0,a.jsx)("code",{className:"text-brand-500 font-mono px-1.5 py-0.5 rounded bg-surface-2",children:"npm run update"})]})]}):(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Build"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Runtime"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Platform"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Channel"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Published"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),y&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:c.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-medium text-text",children:[(0,a.jsxs)("span",{className:"text-brand-500 font-mono font-bold mr-2",children:["#",e.buildNumber]}),(0,a.jsx)("span",{children:e.message||"(no message)"})]}),(0,a.jsx)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:e.id.slice(0,8)})]}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs font-mono text-text-muted",children:e.runtimeVersion}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:`px-2 py-0.5 rounded-md text-[10px] font-mono font-bold uppercase tracking-wider border ${"ios"===e.platform?"bg-sky-500/10 text-sky-500 border-sky-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:e.platform})}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.channel})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"-";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.publishedAt||e.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.isServing?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(o.Jl,{size:13}),(0,a.jsx)("span",{children:"Serving"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:e.status})}),y&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:!e.isServing&&(0,a.jsxs)("button",{onClick:()=>w(e),disabled:j===e.id,className:"inline-flex items-center gap-1 text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors disabled:opacity-50",children:[(0,a.jsx)("span",{children:j===e.id?"Promoting...":"Promote"}),(0,a.jsx)(o.F1,{size:13})]})})]},e.id))})]})})]})})}},62554:(e,t,s)=>{Promise.resolve().then(s.bind(s,52840))}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8535],{52840:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(73365),r=s(1521),n=s(38334),l=s(39457),d=s(24945),i=s(57042),o=s(64683);let x=["","ios","android"];function c(){let{can:e}=(0,d.b)(),{get:t,post:s}=(0,l.Z)(),[c,m]=(0,r.useState)([]),[u,p]=(0,r.useState)(!0),[h,b]=(0,r.useState)(""),[f,g]=(0,r.useState)({runtimeVersion:"",platform:"",channel:""}),[j,N]=(0,r.useState)(null),y=e(i.Jj.otaManage),v=(0,r.useCallback)(async()=>{p(!0),b("");try{let e=new URLSearchParams;f.runtimeVersion&&e.set("runtimeVersion",f.runtimeVersion),f.platform&&e.set("platform",f.platform),f.channel&&e.set("channel",f.channel);let s=await t(`${i.lb.ota}?${e}`);m(s.items||[])}catch(e){b(e.message)}finally{p(!1)}},[t,f.runtimeVersion,f.platform,f.channel]);(0,r.useEffect)(()=>{v()},[]);let w=async e=>{if(confirm(`Promote #${e.buildNumber} to serving for channel "${e.channel}" (${e.platform}, ${e.runtimeVersion})?`)){N(e.id);try{await s(`${i.lb.ota}/${e.id}/promote`),await v()}catch(e){b(e.message)}finally{N(null)}}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(o.lP,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"OTA Updates"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Publish, promote and rollback mobile application bundles"})]}),(0,a.jsxs)("button",{onClick:v,disabled:u,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(o.e9,{size:13,className:u?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"card-glass p-4 grid grid-cols-1 sm:grid-cols-4 gap-3",children:[(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Runtime (e.g. 0.1.7)",value:f.runtimeVersion,onChange:e=>g({...f,runtimeVersion:e.target.value})}),(0,a.jsx)("select",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.platform,onChange:e=>g({...f,platform:e.target.value}),children:x.map(e=>(0,a.jsx)("option",{value:e,children:e?e.toUpperCase():"All platforms"},e))}),(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Channel (e.g. production)",value:f.channel,onChange:e=>g({...f,channel:e.target.value})}),(0,a.jsx)("button",{onClick:v,className:"px-4 py-2 text-xs font-semibold bg-brand-500 text-white rounded-xl hover:bg-brand-600 shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)] transition-all",children:"Filter Bundles"})]}),h&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:h}),u?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(o.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading updates catalog..."]}):0===c.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(o.lP,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No updates published"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Publish an OTA update package with ",(0,a.jsx)("code",{className:"text-brand-500 font-mono px-1.5 py-0.5 rounded bg-surface-2",children:"npm run update"})]})]}):(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Build"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Runtime"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Platform"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Channel"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Published"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),y&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:c.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-medium text-text",children:[(0,a.jsxs)("span",{className:"text-brand-500 font-mono font-bold mr-2",children:["#",e.buildNumber]}),(0,a.jsx)("span",{children:e.message||"(no message)"})]}),(0,a.jsx)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:e.id.slice(0,8)})]}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs font-mono text-text-muted",children:e.runtimeVersion}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:`px-2 py-0.5 rounded-md text-[10px] font-mono font-bold uppercase tracking-wider border ${"ios"===e.platform?"bg-sky-500/10 text-sky-500 border-sky-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:e.platform})}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.channel})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"-";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.publishedAt||e.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.isServing?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(o.Jl,{size:13}),(0,a.jsx)("span",{children:"Serving"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:e.status})}),y&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:!e.isServing&&(0,a.jsxs)("button",{onClick:()=>w(e),disabled:j===e.id,className:"inline-flex items-center gap-1 text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors disabled:opacity-50",children:[(0,a.jsx)("span",{children:j===e.id?"Promoting...":"Promote"}),(0,a.jsx)(o.F1,{size:13})]})})]},e.id))})]})})]})})}},62554:(e,t,s)=>{Promise.resolve().then(s.bind(s,52840))}},e=>{e.O(0,[161,9568,9958,8334,2347,5158,7358],()=>e(e.s=62554)),_N_E=e.O()}]);
|
package/dist/web/_next/static/chunks/app/admin/{page-ae83026dc795c35b.js → page-c008b84f3d009af1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3698],{42761:(e,t,s)=>{Promise.resolve().then(s.bind(s,68577))},68577:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var l=s(73365),a=s(1521),r=s(38334),n=s(64683);let i=[{key:"total",label:"Total",icon:n.BK,color:"text-text",iconColor:"text-text-muted bg-surface-2"},{key:"online",label:"Online (30m)",icon:n.Kq,color:"text-success",iconColor:"text-success bg-emerald-500/10",pulse:!0},{key:"newToday",label:"New (24h)",icon:n.sU,color:"text-brand-500",iconColor:"text-brand-500 bg-brand-500/10"},{key:"retention7d",label:"Retention 7d",icon:n.BZ,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"%"},{key:"stickiness",label:"Stickiness",icon:n.FE,color:"text-amber-500",iconColor:"text-amber-500 bg-amber-500/10",suffix:"%"},{key:"avgLifespanDays",label:"Avg Lifespan",icon:n.kt,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"d"}];function c({stats:e}){return(0,l.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 sm:gap-4",children:i.map(t=>{let s=t.icon,a=e?.[t.key];return(0,l.jsxs)("div",{className:"card-glass p-4 relative overflow-hidden transition-all duration-200 hover:-translate-y-0.5 group",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-[11px] font-mono tracking-wider uppercase text-text-muted truncate",children:t.label}),(0,l.jsx)("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center ${t.iconColor} transition-transform group-hover:scale-110`,children:(0,l.jsx)(s,{size:14})})]}),(0,l.jsxs)("div",{className:"flex items-baseline gap-1.5 mt-1",children:[(0,l.jsx)("div",{className:`text-2xl sm:text-3xl font-bold tracking-tight font-mono ${t.color}`,children:a??"-"}),null!=a&&t.suffix&&(0,l.jsx)("span",{className:"text-xs font-mono text-text-subtle font-semibold",children:t.suffix})]}),t.pulse&&(0,l.jsxs)("div",{className:"absolute bottom-2 right-2 flex items-center gap-1.5",children:[(0,l.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),(0,l.jsx)("span",{className:"text-[10px] font-mono text-emerald-500 font-medium",children:"live"})]})]},t.key)})})}var d=s(57042);let o=[{key:"machineId",label:"Machine ID",sortable:!0},{key:"publicIp",label:"Public IP",sortable:!1},{key:"localIp",label:"Local IP",sortable:!1},{key:"createdAt",label:"Created",sortable:!0},{key:"lastAccessAt",label:"Last Access",sortable:!0},{key:"expiresAt",label:"Expires",sortable:!0}],x=o.filter(e=>e.sortable);function m(e){let t=e?.lastAccessAt||e?.createdAt;return!!t&&Date.now()-new Date(t+"Z").getTime()<d.Qh}function u(e){if(!e)return"-";try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function p({session:e}){let{tier:t,ageMs:s}=function(e){let t={tier:d.rK[d.rK.length-1],ageMs:null};if(!e?.createdAt||!e?.lastAccessAt)return t;let s=new Date(e.lastAccessAt+"Z").getTime()-new Date(e.createdAt+"Z").getTime();return{tier:d.rK.find(e=>s>=e.minMs)||t.tier,ageMs:s}}(e),a="loyal"===t.key?"bg-emerald-500/10 text-emerald-500 border-emerald-500/20":"returning"===t.key?"bg-brand-500/10 text-brand-500 border-brand-500/20":"active"===t.key?"bg-amber-500/10 text-amber-500 border-amber-500/20":"bg-surface-2 text-text-muted border-border-subtle";return(0,l.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:`px-2 py-0.5 rounded-full text-[11px] font-medium border ${a}`,children:t.label}),null!=s&&(0,l.jsx)("span",{className:"text-text-subtle text-[11px] font-mono",children:function(e){if(null==e||e<0)return"-";let t=Math.floor(e/6e4);if(t<1)return"<1m";let s=Math.floor(t/1440),l=Math.floor(t%1440/60),a=t%60;return s>0?`${s}d ${l}h`:l>0?`${l}h ${a}m`:`${a}m`}(s)})]})}function b({items:e,sortBy:t,order:s,onSortChange:a,onDelete:r,canDelete:i}){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"md:hidden flex items-center justify-between mb-3 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Sort by:"}),(0,l.jsx)("select",{value:t,onChange:e=>a(e.target.value,s),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text focus:outline-none",children:x.map(e=>(0,l.jsx)("option",{value:e.key,children:e.label},e.key))})]}),(0,l.jsxs)("button",{onClick:()=>a(t,"asc"===s?"desc":"asc"),className:"flex items-center gap-1 bg-surface-2 hover:bg-surface-3 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text transition-colors","aria-label":"Toggle order",children:[(0,l.jsx)("span",{className:"font-mono uppercase",children:s}),"asc"===s?(0,l.jsx)(n.Do,{size:13}):(0,l.jsx)(n.yd,{size:13})]})]}),(0,l.jsxs)("div",{className:"md:hidden space-y-3",children:[0===e.length&&(0,l.jsxs)("div",{className:"card-glass p-8 text-center text-text-muted flex flex-col items-center justify-center",children:[(0,l.jsx)(n.BK,{size:24,className:"mb-2 text-text-subtle"}),(0,l.jsx)("p",{className:"text-sm",children:"No active sessions found"})]}),e.map(e=>{let t=m(e);return(0,l.jsxs)("div",{className:"card-glass overflow-hidden text-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 bg-surface-2/60 border-b border-border-subtle",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"relative flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})}),(0,l.jsx)("span",{className:"font-mono text-xs font-semibold tracking-tight text-text truncate",children:e.machineId})]}),i&&(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})]}),(0,l.jsxs)("div",{className:"p-3.5 space-y-2 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Loyalty"}),(0,l.jsx)(p,{session:e})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Public IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.publicIp||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Local IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.localIp||"-"})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40 text-[11px] text-text-muted",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Created"}),(0,l.jsx)("span",{children:u(e.createdAt)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Last Access"}),(0,l.jsx)("span",{className:"text-text",children:u(e.lastAccessAt)})]})]})]})]},e.machineId)})]}),(0,l.jsx)("div",{className:"hidden md:block card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-3 w-12 text-center",children:"Live"}),(0,l.jsx)("th",{className:"px-4 py-3",children:"Loyalty"}),o.map(e=>(0,l.jsx)("th",{onClick:()=>{var l;return e.sortable&&(l=e.key,void(d.GS.includes(l)&&(t===l?a(l,"asc"===s?"desc":"asc"):a(l,"desc"))))},className:`px-4 py-3 ${e.sortable?"cursor-pointer hover:text-text select-none group":""}`,children:(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[e.label,e.sortable&&(0,l.jsx)("span",{className:t===e.key?"text-brand-500":"text-text-subtle opacity-40 group-hover:opacity-100",children:t===e.key&&"asc"===s?(0,l.jsx)(n.Do,{size:12}):(0,l.jsx)(n.yd,{size:12})})]})},e.key)),i&&(0,l.jsx)("th",{className:"px-4 py-3 text-right",children:"Action"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsxs)("td",{colSpan:o.length+3,className:"px-4 py-12 text-center text-text-muted",children:[(0,l.jsx)(n.BK,{size:28,className:"mx-auto mb-2 text-text-subtle"}),(0,l.jsx)("p",{children:"No active sessions found"})]})}),e.map(e=>{let t=m(e);return(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-3 text-center",children:(0,l.jsx)("span",{className:"relative inline-flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})})}),(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsx)(p,{session:e})}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs font-medium text-text",children:e.machineId}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.publicIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.localIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text font-medium",children:u(e.lastAccessAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.expiresAt)}),i&&(0,l.jsx)("td",{className:"px-4 py-3 text-right",children:(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1.5 rounded-lg hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})})]},e.machineId)})]})]})})]})}function h({page:e,pageSize:t,total:s,onPageChange:a,onPageSizeChange:r}){let i=Math.max(1,Math.ceil(s/t));return(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 mt-4 text-xs text-text-muted",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 font-mono",children:[(0,l.jsx)("span",{children:"Total:"}),(0,l.jsx)("span",{className:"text-text font-semibold px-1.5 py-0.5 rounded bg-surface-2 border border-border-subtle",children:s})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsx)("select",{value:t,onChange:e=>r(parseInt(e.target.value,10)),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1 text-text text-xs focus:outline-none",children:d.xp.map(e=>(0,l.jsxs)("option",{value:e,children:[e," / page"]},e))}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)("button",{onClick:()=>a(Math.max(1,e-1)),disabled:e<=1,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Previous page",children:(0,l.jsx)(n.JG,{size:14})}),(0,l.jsxs)("span",{className:"px-2.5 py-1 font-mono text-xs text-text",children:[e," / ",i]}),(0,l.jsx)("button",{onClick:()=>a(Math.min(i,e+1)),disabled:e>=i,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Next page",children:(0,l.jsx)(n.c_,{size:14})})]})]})]})}let f={ok:"Success",badPassword:"Wrong password",unknownUser:"Unknown user",turnstile:"Captcha failed",locked:"Locked out"};function j({items:e}){return(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(n.ek,{size:16,className:"text-brand-500"}),(0,l.jsx)("h2",{className:"text-base font-semibold tracking-tight text-text",children:"Login Activity"}),(0,l.jsxs)("span",{className:"text-xs text-text-subtle font-mono",children:["last ",e.length]})]}),(0,l.jsx)("div",{className:"card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-2.5",children:"Time"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"User"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"IP"}),(0,l.jsx)("th",{className:"px-4 py-2.5 text-right",children:"Result"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:4,className:"px-4 py-8 text-center text-text-muted",children:"No login attempts recorded yet"})}),e.map((e,t)=>(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-2.5 text-xs text-text-muted whitespace-nowrap",children:function(e){try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text",children:e.username}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text-muted",children:e.ip}),(0,l.jsx)("td",{className:"px-4 py-2.5 text-right",children:e.ok?(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-emerald-500/10 text-emerald-500 border-emerald-500/20",children:[(0,l.jsx)(n.ek,{size:11})," OK"]}):(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-red-500/10 text-danger border-red-500/20",children:[(0,l.jsx)(n.RI,{size:11})," ",f[e.reason]||e.reason]})})]},t))]})]})})]})}var g=s(39457),N=s(24945);function y(){let{can:e}=(0,N.b)(),{get:t,del:s}=(0,g.Z)(),[i,o]=(0,a.useState)(null),[x,m]=(0,a.useState)([]),[u,p]=(0,a.useState)([]),[f,y]=(0,a.useState)(0),[v,k]=(0,a.useState)(""),[w,A]=(0,a.useState)("lastAccessAt"),[S,C]=(0,a.useState)("desc"),[I,z]=(0,a.useState)(1),[D,P]=(0,a.useState)(d.Wm),[L,$]=(0,a.useState)(!1),M=(0,a.useCallback)(async()=>{$(!0);try{let s=new URLSearchParams({search:v,sortBy:w,order:S,page:String(I),pageSize:String(D)}),l=[t(`${d.lb.sessions}?${s.toString()}`),t(d.lb.stats)];e(d.Jj.logView)&&l.push(t(d.lb.logins));let[a,r,n]=await Promise.all(l);p(a.items||[]),y(a.total||0),o(r),n&&m(n.items||[])}catch(e){console.error(e)}finally{$(!1)}},[e,t,v,w,S,I,D]);(0,a.useEffect)(()=>{M()},[M]);let T=async e=>{confirm(`Delete session ${e}?`)&&(await s(`${d.lb.sessions}/${e}`),M())};return(0,l.jsx)(r.A,{children:(0,l.jsxs)("div",{className:"space-y-8",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad",children:"System Overview"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Real-time telemetry and active host instances"})]}),(0,l.jsxs)("button",{onClick:M,disabled:L,className:"self-start sm:self-auto inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,l.jsx)(n.e9,{size:13,className:L?"animate-spin text-brand-500":""}),(0,l.jsx)("span",{children:"Refresh"})]})]}),(0,l.jsx)("section",{children:(0,l.jsx)(c,{stats:i})}),e(d.Jj.logView)&&(0,l.jsx)(j,{items:x}),(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-bold tracking-tight text-text",children:"Active Sessions"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Connected and registered client sessions"})]}),(0,l.jsxs)("div",{className:"relative w-full sm:w-80",children:[(0,l.jsx)(n.vj,{size:15,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-muted"}),(0,l.jsx)("input",{value:v,onChange:e=>{k(e.target.value),z(1)},placeholder:"Search machineId, IP address...",className:"w-full pl-9 pr-3.5 py-2 bg-surface-2/80 border border-border-subtle rounded-xl text-text text-xs placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40 transition-all font-mono"})]})]}),(0,l.jsx)(b,{items:u,sortBy:w,order:S,onSortChange:(e,t)=>{A(e),C(t),z(1)},onDelete:T,canDelete:e(d.Jj.sessionDelete)}),(0,l.jsx)(h,{page:I,pageSize:D,total:f,onPageChange:z,onPageSizeChange:e=>{P(e),z(1)}})]})]})})}}},e=>{e.O(0,[7738,9568,9958,8334,2347,5158,7358],()=>e(e.s=42761)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3698],{42761:(e,t,s)=>{Promise.resolve().then(s.bind(s,68577))},68577:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var l=s(73365),a=s(1521),r=s(38334),n=s(64683);let i=[{key:"total",label:"Total",icon:n.BK,color:"text-text",iconColor:"text-text-muted bg-surface-2"},{key:"online",label:"Online (30m)",icon:n.Kq,color:"text-success",iconColor:"text-success bg-emerald-500/10",pulse:!0},{key:"newToday",label:"New (24h)",icon:n.sU,color:"text-brand-500",iconColor:"text-brand-500 bg-brand-500/10"},{key:"retention7d",label:"Retention 7d",icon:n.BZ,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"%"},{key:"stickiness",label:"Stickiness",icon:n.FE,color:"text-amber-500",iconColor:"text-amber-500 bg-amber-500/10",suffix:"%"},{key:"avgLifespanDays",label:"Avg Lifespan",icon:n.kt,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"d"}];function c({stats:e}){return(0,l.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 sm:gap-4",children:i.map(t=>{let s=t.icon,a=e?.[t.key];return(0,l.jsxs)("div",{className:"card-glass p-4 relative overflow-hidden transition-all duration-200 hover:-translate-y-0.5 group",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-[11px] font-mono tracking-wider uppercase text-text-muted truncate",children:t.label}),(0,l.jsx)("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center ${t.iconColor} transition-transform group-hover:scale-110`,children:(0,l.jsx)(s,{size:14})})]}),(0,l.jsxs)("div",{className:"flex items-baseline gap-1.5 mt-1",children:[(0,l.jsx)("div",{className:`text-2xl sm:text-3xl font-bold tracking-tight font-mono ${t.color}`,children:a??"-"}),null!=a&&t.suffix&&(0,l.jsx)("span",{className:"text-xs font-mono text-text-subtle font-semibold",children:t.suffix})]}),t.pulse&&(0,l.jsxs)("div",{className:"absolute bottom-2 right-2 flex items-center gap-1.5",children:[(0,l.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),(0,l.jsx)("span",{className:"text-[10px] font-mono text-emerald-500 font-medium",children:"live"})]})]},t.key)})})}var d=s(57042);let o=[{key:"machineId",label:"Machine ID",sortable:!0},{key:"publicIp",label:"Public IP",sortable:!1},{key:"localIp",label:"Local IP",sortable:!1},{key:"createdAt",label:"Created",sortable:!0},{key:"lastAccessAt",label:"Last Access",sortable:!0},{key:"expiresAt",label:"Expires",sortable:!0}],x=o.filter(e=>e.sortable);function m(e){let t=e?.lastAccessAt||e?.createdAt;return!!t&&Date.now()-new Date(t+"Z").getTime()<d.Qh}function u(e){if(!e)return"-";try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function p({session:e}){let{tier:t,ageMs:s}=function(e){let t={tier:d.rK[d.rK.length-1],ageMs:null};if(!e?.createdAt||!e?.lastAccessAt)return t;let s=new Date(e.lastAccessAt+"Z").getTime()-new Date(e.createdAt+"Z").getTime();return{tier:d.rK.find(e=>s>=e.minMs)||t.tier,ageMs:s}}(e),a="loyal"===t.key?"bg-emerald-500/10 text-emerald-500 border-emerald-500/20":"returning"===t.key?"bg-brand-500/10 text-brand-500 border-brand-500/20":"active"===t.key?"bg-amber-500/10 text-amber-500 border-amber-500/20":"bg-surface-2 text-text-muted border-border-subtle";return(0,l.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:`px-2 py-0.5 rounded-full text-[11px] font-medium border ${a}`,children:t.label}),null!=s&&(0,l.jsx)("span",{className:"text-text-subtle text-[11px] font-mono",children:function(e){if(null==e||e<0)return"-";let t=Math.floor(e/6e4);if(t<1)return"<1m";let s=Math.floor(t/1440),l=Math.floor(t%1440/60),a=t%60;return s>0?`${s}d ${l}h`:l>0?`${l}h ${a}m`:`${a}m`}(s)})]})}function b({items:e,sortBy:t,order:s,onSortChange:a,onDelete:r,canDelete:i}){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"md:hidden flex items-center justify-between mb-3 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Sort by:"}),(0,l.jsx)("select",{value:t,onChange:e=>a(e.target.value,s),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text focus:outline-none",children:x.map(e=>(0,l.jsx)("option",{value:e.key,children:e.label},e.key))})]}),(0,l.jsxs)("button",{onClick:()=>a(t,"asc"===s?"desc":"asc"),className:"flex items-center gap-1 bg-surface-2 hover:bg-surface-3 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text transition-colors","aria-label":"Toggle order",children:[(0,l.jsx)("span",{className:"font-mono uppercase",children:s}),"asc"===s?(0,l.jsx)(n.Do,{size:13}):(0,l.jsx)(n.yd,{size:13})]})]}),(0,l.jsxs)("div",{className:"md:hidden space-y-3",children:[0===e.length&&(0,l.jsxs)("div",{className:"card-glass p-8 text-center text-text-muted flex flex-col items-center justify-center",children:[(0,l.jsx)(n.BK,{size:24,className:"mb-2 text-text-subtle"}),(0,l.jsx)("p",{className:"text-sm",children:"No active sessions found"})]}),e.map(e=>{let t=m(e);return(0,l.jsxs)("div",{className:"card-glass overflow-hidden text-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 bg-surface-2/60 border-b border-border-subtle",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"relative flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})}),(0,l.jsx)("span",{className:"font-mono text-xs font-semibold tracking-tight text-text truncate",children:e.machineId})]}),i&&(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})]}),(0,l.jsxs)("div",{className:"p-3.5 space-y-2 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Loyalty"}),(0,l.jsx)(p,{session:e})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Public IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.publicIp||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Local IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.localIp||"-"})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40 text-[11px] text-text-muted",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Created"}),(0,l.jsx)("span",{children:u(e.createdAt)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Last Access"}),(0,l.jsx)("span",{className:"text-text",children:u(e.lastAccessAt)})]})]})]})]},e.machineId)})]}),(0,l.jsx)("div",{className:"hidden md:block card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-3 w-12 text-center",children:"Live"}),(0,l.jsx)("th",{className:"px-4 py-3",children:"Loyalty"}),o.map(e=>(0,l.jsx)("th",{onClick:()=>{var l;return e.sortable&&(l=e.key,void(d.GS.includes(l)&&(t===l?a(l,"asc"===s?"desc":"asc"):a(l,"desc"))))},className:`px-4 py-3 ${e.sortable?"cursor-pointer hover:text-text select-none group":""}`,children:(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[e.label,e.sortable&&(0,l.jsx)("span",{className:t===e.key?"text-brand-500":"text-text-subtle opacity-40 group-hover:opacity-100",children:t===e.key&&"asc"===s?(0,l.jsx)(n.Do,{size:12}):(0,l.jsx)(n.yd,{size:12})})]})},e.key)),i&&(0,l.jsx)("th",{className:"px-4 py-3 text-right",children:"Action"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsxs)("td",{colSpan:o.length+3,className:"px-4 py-12 text-center text-text-muted",children:[(0,l.jsx)(n.BK,{size:28,className:"mx-auto mb-2 text-text-subtle"}),(0,l.jsx)("p",{children:"No active sessions found"})]})}),e.map(e=>{let t=m(e);return(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-3 text-center",children:(0,l.jsx)("span",{className:"relative inline-flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})})}),(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsx)(p,{session:e})}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs font-medium text-text",children:e.machineId}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.publicIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.localIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text font-medium",children:u(e.lastAccessAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.expiresAt)}),i&&(0,l.jsx)("td",{className:"px-4 py-3 text-right",children:(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1.5 rounded-lg hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})})]},e.machineId)})]})]})})]})}function h({page:e,pageSize:t,total:s,onPageChange:a,onPageSizeChange:r}){let i=Math.max(1,Math.ceil(s/t));return(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 mt-4 text-xs text-text-muted",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 font-mono",children:[(0,l.jsx)("span",{children:"Total:"}),(0,l.jsx)("span",{className:"text-text font-semibold px-1.5 py-0.5 rounded bg-surface-2 border border-border-subtle",children:s})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsx)("select",{value:t,onChange:e=>r(parseInt(e.target.value,10)),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1 text-text text-xs focus:outline-none",children:d.xp.map(e=>(0,l.jsxs)("option",{value:e,children:[e," / page"]},e))}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)("button",{onClick:()=>a(Math.max(1,e-1)),disabled:e<=1,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Previous page",children:(0,l.jsx)(n.JG,{size:14})}),(0,l.jsxs)("span",{className:"px-2.5 py-1 font-mono text-xs text-text",children:[e," / ",i]}),(0,l.jsx)("button",{onClick:()=>a(Math.min(i,e+1)),disabled:e>=i,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Next page",children:(0,l.jsx)(n.c_,{size:14})})]})]})]})}let f={ok:"Success",badPassword:"Wrong password",unknownUser:"Unknown user",turnstile:"Captcha failed",locked:"Locked out"};function j({items:e}){return(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(n.ek,{size:16,className:"text-brand-500"}),(0,l.jsx)("h2",{className:"text-base font-semibold tracking-tight text-text",children:"Login Activity"}),(0,l.jsxs)("span",{className:"text-xs text-text-subtle font-mono",children:["last ",e.length]})]}),(0,l.jsx)("div",{className:"card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-2.5",children:"Time"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"User"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"IP"}),(0,l.jsx)("th",{className:"px-4 py-2.5 text-right",children:"Result"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:4,className:"px-4 py-8 text-center text-text-muted",children:"No login attempts recorded yet"})}),e.map((e,t)=>(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-2.5 text-xs text-text-muted whitespace-nowrap",children:function(e){try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text",children:e.username}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text-muted",children:e.ip}),(0,l.jsx)("td",{className:"px-4 py-2.5 text-right",children:e.ok?(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-emerald-500/10 text-emerald-500 border-emerald-500/20",children:[(0,l.jsx)(n.ek,{size:11})," OK"]}):(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-red-500/10 text-danger border-red-500/20",children:[(0,l.jsx)(n.RI,{size:11})," ",f[e.reason]||e.reason]})})]},t))]})]})})]})}var g=s(39457),N=s(24945);function y(){let{can:e}=(0,N.b)(),{get:t,del:s}=(0,g.Z)(),[i,o]=(0,a.useState)(null),[x,m]=(0,a.useState)([]),[u,p]=(0,a.useState)([]),[f,y]=(0,a.useState)(0),[v,k]=(0,a.useState)(""),[w,A]=(0,a.useState)("lastAccessAt"),[S,C]=(0,a.useState)("desc"),[I,z]=(0,a.useState)(1),[D,P]=(0,a.useState)(d.Wm),[L,$]=(0,a.useState)(!1),M=(0,a.useCallback)(async()=>{$(!0);try{let s=new URLSearchParams({search:v,sortBy:w,order:S,page:String(I),pageSize:String(D)}),l=[t(`${d.lb.sessions}?${s.toString()}`),t(d.lb.stats)];e(d.Jj.logView)&&l.push(t(d.lb.logins));let[a,r,n]=await Promise.all(l);p(a.items||[]),y(a.total||0),o(r),n&&m(n.items||[])}catch(e){console.error(e)}finally{$(!1)}},[e,t,v,w,S,I,D]);(0,a.useEffect)(()=>{M()},[M]);let T=async e=>{confirm(`Delete session ${e}?`)&&(await s(`${d.lb.sessions}/${e}`),M())};return(0,l.jsx)(r.A,{children:(0,l.jsxs)("div",{className:"space-y-8",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad",children:"System Overview"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Real-time telemetry and active host instances"})]}),(0,l.jsxs)("button",{onClick:M,disabled:L,className:"self-start sm:self-auto inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,l.jsx)(n.e9,{size:13,className:L?"animate-spin text-brand-500":""}),(0,l.jsx)("span",{children:"Refresh"})]})]}),(0,l.jsx)("section",{children:(0,l.jsx)(c,{stats:i})}),e(d.Jj.logView)&&(0,l.jsx)(j,{items:x}),(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-bold tracking-tight text-text",children:"Active Sessions"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Connected and registered client sessions"})]}),(0,l.jsxs)("div",{className:"relative w-full sm:w-80",children:[(0,l.jsx)(n.vj,{size:15,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-muted"}),(0,l.jsx)("input",{value:v,onChange:e=>{k(e.target.value),z(1)},placeholder:"Search machineId, IP address...",className:"w-full pl-9 pr-3.5 py-2 bg-surface-2/80 border border-border-subtle rounded-xl text-text text-xs placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40 transition-all font-mono"})]})]}),(0,l.jsx)(b,{items:u,sortBy:w,order:S,onSortChange:(e,t)=>{A(e),C(t),z(1)},onDelete:T,canDelete:e(d.Jj.sessionDelete)}),(0,l.jsx)(h,{page:I,pageSize:D,total:f,onPageChange:z,onPageSizeChange:e=>{P(e),z(1)}})]})]})})}}},e=>{e.O(0,[161,9568,9958,8334,2347,5158,7358],()=>e(e.s=42761)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[540],{7116:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var a=s(73365),r=s(1521),l=s(38334),d=s(80186),n=s(96042),c=s(64683),o=s(39457),i=s(24945),x=s(57042);let u={keyId:"",secret:"",label:"",scope:"both"},b=["both","dev","prod"];function m(){let{can:e}=(0,i.b)(),{get:t,post:s,patch:m,del:h}=(0,o.Z)(),[p,g]=(0,r.useState)([]),[f,j]=(0,r.useState)(u),[y,N]=(0,r.useState)(!0),[v,w]=(0,r.useState)(!1),[k,C]=(0,r.useState)(""),[S,A]=(0,r.useState)(null),T=e(x.Jj.turnManage),$=(0,r.useCallback)(async()=>{N(!0);try{let e=await t(x.lb.turn);g(e.items||[])}catch(e){C(e.message)}finally{N(!1)}},[t]);(0,r.useEffect)(()=>{$()},[$]);let _=async()=>{C(""),w(!0),A(null);try{await s(x.lb.turn,f),A(f.secret),j(u),await $()}catch(e){C(e.message)}finally{w(!1)}},U=async e=>{try{await m(`${x.lb.turn}/${e.id}`,{enabled:!e.enabled}),$()}catch(e){C(e.message)}},z=async(e,t)=>{try{await m(`${x.lb.turn}/${e.id}`,{scope:t}),$()}catch(e){C(e.message)}},R=async e=>{if(confirm("Delete this TURN key? Clients using it fall back to STUN-only."))try{await h(`${x.lb.turn}/${e}`),$()}catch(e){C(e.message)}};return(0,a.jsx)(l.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(c.kV,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"TURN Keys"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Rotate Cloudflare TURN credentials for cross-network WebRTC relay"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("a",{href:"https://dash.cloudflare.com/?to=/:account/realtime/turn",target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-brand-500 hover:bg-brand-600 text-white text-xs font-semibold transition-colors shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)]",children:[(0,a.jsx)(c.Gr,{size:13}),(0,a.jsx)("span",{children:"Create on Cloudflare"})]}),(0,a.jsxs)("button",{onClick:$,disabled:y,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(c.e9,{size:13,className:y?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted bg-surface-2/60 border border-border-subtle rounded-xl p-3",children:"Up to 1,000 keys. 1,000 GB/month free per Cloudflare account (shared with SFU) — more keys do not add quota."}),k&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:k}),S&&(0,a.jsxs)("div",{className:"card-glass p-4 space-y-2 border border-brand-500/30",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text",children:"Key added — secret stored. Copy it if you need it elsewhere:"}),(0,a.jsx)("button",{onClick:()=>A(null),className:"text-text-muted hover:text-text",children:(0,a.jsx)(c.X,{size:14})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 text-[11px] font-mono text-text-muted bg-surface-2 rounded-lg px-3 py-2 break-all",children:S}),(0,a.jsx)("button",{onClick:()=>navigator.clipboard?.writeText(S),className:"p-2 rounded-lg bg-surface-2 hover:bg-surface-3 text-text-muted hover:text-text transition-colors","aria-label":"Copy secret",children:(0,a.jsx)(c.QR,{size:14})})]})]}),T&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4",children:[(0,a.jsxs)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2 border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)(c.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Add TURN Key"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(n.A,{label:"Key ID",value:f.keyId,onChange:e=>j({...f,keyId:e.target.value.trim()}),placeholder:"32-char hex from Cloudflare dashboard"}),(0,a.jsx)(n.A,{label:"API Token / Secret",type:"password",value:f.secret,onChange:e=>j({...f,secret:e.target.value.trim()}),placeholder:"Bearer secret"}),(0,a.jsx)(n.A,{label:"Label",value:f.label,onChange:e=>j({...f,label:e.target.value}),placeholder:"e.g. acc-1 (which Cloudflare account)"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-1.5",children:"Scope"}),(0,a.jsx)("select",{className:"w-full px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.scope,onChange:e=>j({...f,scope:e.target.value}),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(d.A,{onClick:_,disabled:v||!f.keyId||!f.secret,children:v?"Validating with Cloudflare...":"Add Key"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Scope ",(0,a.jsx)("span",{className:"font-mono",children:"dev"})," = credentials for pages on dev.9remote.cc only."]})]})]}),y?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(c.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading keys..."]}):0===p.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(c.kV,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No TURN keys configured"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Clients fall back to the deployed ",(0,a.jsx)("code",{className:"font-mono text-brand-500",children:"TURN_KEY_ID"})," secret, or STUN-only if that is gone."]})]}):(0,a.jsx)("div",{className:"card-glass overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Key"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Scope"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Last Used"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),T&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:p.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-mono text-xs text-text",children:[e.keyId.slice(0,12),"…"]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:[e.label||"(no label)"," \xb7 secret ",e.secretTail]})]}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:T?(0,a.jsx)("select",{className:"px-2 py-1 text-[11px] font-mono border border-border-subtle rounded-lg bg-surface-2/80 text-text focus:outline-none",value:e.scope,onChange:t=>z(e,t.target.value),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}):(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.scope})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"never";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.lastUsedAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.enabled?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(c.aJ,{size:13}),(0,a.jsx)("span",{children:"Active"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:"Disabled"})}),T&&(0,a.jsxs)("td",{className:"px-4 py-3.5 text-right whitespace-nowrap",children:[(0,a.jsx)("button",{onClick:()=>U(e),className:"text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors",children:e.enabled?"Disable":"Enable"}),(0,a.jsx)("button",{onClick:()=>R(e.id),className:"ml-1 p-1.5 rounded-lg text-text-muted hover:text-danger hover:bg-red-500/10 transition-colors","aria-label":"Delete key",children:(0,a.jsx)(c.TB,{size:14})})]})]},e.id))})]})})]})})}},56631:(e,t,s)=>{Promise.resolve().then(s.bind(s,7116))},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({children:e,variant:t="primary",size:s="md",disabled:l=!1,loading:d=!1,onClick:n,className:c="",...o}){let i=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${l||d?"cursor-not-allowed":""} ${c}`;return(0,a.jsx)("button",{onClick:n,disabled:l||d,className:i,...o,children:d?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({label:e,type:t="text",value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c=!1,error:o,className:i="",...x}){let u=o?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",b=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${u} ${c?"opacity-50 cursor-not-allowed":""} ${i}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:t,value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c,className:b,...x}),o&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:o})]})}}},e=>{e.O(0,[7738,9568,9958,8334,2347,5158,7358],()=>e(e.s=56631)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[540],{7116:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var a=s(73365),r=s(1521),l=s(38334),d=s(80186),n=s(96042),c=s(64683),o=s(39457),i=s(24945),x=s(57042);let u={keyId:"",secret:"",label:"",scope:"both"},b=["both","dev","prod"];function m(){let{can:e}=(0,i.b)(),{get:t,post:s,patch:m,del:h}=(0,o.Z)(),[p,g]=(0,r.useState)([]),[f,j]=(0,r.useState)(u),[y,N]=(0,r.useState)(!0),[v,w]=(0,r.useState)(!1),[k,C]=(0,r.useState)(""),[S,A]=(0,r.useState)(null),T=e(x.Jj.turnManage),$=(0,r.useCallback)(async()=>{N(!0);try{let e=await t(x.lb.turn);g(e.items||[])}catch(e){C(e.message)}finally{N(!1)}},[t]);(0,r.useEffect)(()=>{$()},[$]);let _=async()=>{C(""),w(!0),A(null);try{await s(x.lb.turn,f),A(f.secret),j(u),await $()}catch(e){C(e.message)}finally{w(!1)}},U=async e=>{try{await m(`${x.lb.turn}/${e.id}`,{enabled:!e.enabled}),$()}catch(e){C(e.message)}},z=async(e,t)=>{try{await m(`${x.lb.turn}/${e.id}`,{scope:t}),$()}catch(e){C(e.message)}},R=async e=>{if(confirm("Delete this TURN key? Clients using it fall back to STUN-only."))try{await h(`${x.lb.turn}/${e}`),$()}catch(e){C(e.message)}};return(0,a.jsx)(l.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(c.kV,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"TURN Keys"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Rotate Cloudflare TURN credentials for cross-network WebRTC relay"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("a",{href:"https://dash.cloudflare.com/?to=/:account/realtime/turn",target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-brand-500 hover:bg-brand-600 text-white text-xs font-semibold transition-colors shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)]",children:[(0,a.jsx)(c.Gr,{size:13}),(0,a.jsx)("span",{children:"Create on Cloudflare"})]}),(0,a.jsxs)("button",{onClick:$,disabled:y,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(c.e9,{size:13,className:y?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted bg-surface-2/60 border border-border-subtle rounded-xl p-3",children:"Up to 1,000 keys. 1,000 GB/month free per Cloudflare account (shared with SFU) — more keys do not add quota."}),k&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:k}),S&&(0,a.jsxs)("div",{className:"card-glass p-4 space-y-2 border border-brand-500/30",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text",children:"Key added — secret stored. Copy it if you need it elsewhere:"}),(0,a.jsx)("button",{onClick:()=>A(null),className:"text-text-muted hover:text-text",children:(0,a.jsx)(c.X,{size:14})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 text-[11px] font-mono text-text-muted bg-surface-2 rounded-lg px-3 py-2 break-all",children:S}),(0,a.jsx)("button",{onClick:()=>navigator.clipboard?.writeText(S),className:"p-2 rounded-lg bg-surface-2 hover:bg-surface-3 text-text-muted hover:text-text transition-colors","aria-label":"Copy secret",children:(0,a.jsx)(c.QR,{size:14})})]})]}),T&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4",children:[(0,a.jsxs)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2 border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)(c.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Add TURN Key"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(n.A,{label:"Key ID",value:f.keyId,onChange:e=>j({...f,keyId:e.target.value.trim()}),placeholder:"32-char hex from Cloudflare dashboard"}),(0,a.jsx)(n.A,{label:"API Token / Secret",type:"password",value:f.secret,onChange:e=>j({...f,secret:e.target.value.trim()}),placeholder:"Bearer secret"}),(0,a.jsx)(n.A,{label:"Label",value:f.label,onChange:e=>j({...f,label:e.target.value}),placeholder:"e.g. acc-1 (which Cloudflare account)"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-1.5",children:"Scope"}),(0,a.jsx)("select",{className:"w-full px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.scope,onChange:e=>j({...f,scope:e.target.value}),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(d.A,{onClick:_,disabled:v||!f.keyId||!f.secret,children:v?"Validating with Cloudflare...":"Add Key"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Scope ",(0,a.jsx)("span",{className:"font-mono",children:"dev"})," = credentials for pages on dev.9remote.cc only."]})]})]}),y?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(c.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading keys..."]}):0===p.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(c.kV,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No TURN keys configured"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Clients fall back to the deployed ",(0,a.jsx)("code",{className:"font-mono text-brand-500",children:"TURN_KEY_ID"})," secret, or STUN-only if that is gone."]})]}):(0,a.jsx)("div",{className:"card-glass overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Key"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Scope"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Last Used"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),T&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:p.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-mono text-xs text-text",children:[e.keyId.slice(0,12),"…"]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:[e.label||"(no label)"," \xb7 secret ",e.secretTail]})]}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:T?(0,a.jsx)("select",{className:"px-2 py-1 text-[11px] font-mono border border-border-subtle rounded-lg bg-surface-2/80 text-text focus:outline-none",value:e.scope,onChange:t=>z(e,t.target.value),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}):(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.scope})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"never";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.lastUsedAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.enabled?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(c.aJ,{size:13}),(0,a.jsx)("span",{children:"Active"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:"Disabled"})}),T&&(0,a.jsxs)("td",{className:"px-4 py-3.5 text-right whitespace-nowrap",children:[(0,a.jsx)("button",{onClick:()=>U(e),className:"text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors",children:e.enabled?"Disable":"Enable"}),(0,a.jsx)("button",{onClick:()=>R(e.id),className:"ml-1 p-1.5 rounded-lg text-text-muted hover:text-danger hover:bg-red-500/10 transition-colors","aria-label":"Delete key",children:(0,a.jsx)(c.TB,{size:14})})]})]},e.id))})]})})]})})}},56631:(e,t,s)=>{Promise.resolve().then(s.bind(s,7116))},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({children:e,variant:t="primary",size:s="md",disabled:l=!1,loading:d=!1,onClick:n,className:c="",...o}){let i=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${l||d?"cursor-not-allowed":""} ${c}`;return(0,a.jsx)("button",{onClick:n,disabled:l||d,className:i,...o,children:d?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({label:e,type:t="text",value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c=!1,error:o,className:i="",...x}){let u=o?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",b=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${u} ${c?"opacity-50 cursor-not-allowed":""} ${i}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:t,value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c,className:b,...x}),o&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:o})]})}}},e=>{e.O(0,[161,9568,9958,8334,2347,5158,7358],()=>e(e.s=56631)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[967],{8910:(e,A,o)=>{"use strict";function t(e=10){if(navigator.vibrate)return void navigator.vibrate(e);if("u">typeof document){let e=document.createElement("div"),A=Math.random().toString(36).slice(2);e.innerHTML=`<input type="checkbox" id="${A}" switch /><label for="${A}"></label>`,e.setAttribute("style","display:none !important;opacity:0 !important;visibility:hidden !important;"),document.body.appendChild(e),e.querySelector("label").click(),setTimeout(()=>e.remove(),100)}}o.d(A,{e:()=>t})},58506:(e,A,o)=>{"use strict";o.r(A),o.d(A,{default:()=>l});var t=o(73365),n=o(6552);let i=[{question:"Which background should the pane use?",multiSelect:!1,options:[{label:"Keep the global pool",description:"Every pane follows the workspace setting."},{label:"Pin a wallpaper",description:"Only this session gets its own image."},{label:"Solid colour",description:"No image, just the theme surface."}]}],r=[{question:"Which panes should the new layout open?",multiSelect:!0,options:[{label:"Terminal",description:"A shell in the workspace root."},{label:"AI chat",description:"The agent pane for the active engine."},{label:"Files",description:"The explorer panel on the right."}]},{question:"Anything else to note?",options:[{label:"No",description:"Just open them."}]}];function l(){return(0,t.jsxs)("div",{className:"min-h-screen bg-bg p-6 flex flex-col gap-6 max-w-md",children:[(0,t.jsx)(n.J,{questions:i,onResolve:()=>{}}),(0,t.jsx)(n.J,{questions:r,onResolve:()=>{}}),(0,t.jsx)(n.J,{questions:i,answers:'User has answered your questions: "Which background should the pane use?"="Pin a wallpaper".'})]})}},61436:(e,A,o)=>{Promise.resolve().then(o.bind(o,58506))},64683:(e,A,o)=>{"use strict";o.d(A,{$o:()=>ej.A,AX:()=>ef.A,Ay:()=>An,BK:()=>e3.A,BZ:()=>Q.A,Bm:()=>D.A,Cp:()=>z.A,Do:()=>l.A,F1:()=>a.A,FE:()=>eQ.A,FW:()=>eq.A,GD:()=>j.A,GO:()=>eh.A,Gr:()=>M.A,Gv:()=>eg.A,Hx:()=>et.A,Ir:()=>s.A,J4:()=>eK.A,JG:()=>m.A,JU:()=>_.A,Jl:()=>h.A,Kq:()=>Ao.A,LM:()=>el.A,Lt:()=>S.A,M6:()=>eZ.A,P6:()=>ee.A,QR:()=>P.A,Qp:()=>r.A,RI:()=>n.A,TB:()=>e6.A,Ud:()=>X.A,VA:()=>em.A,Vn:()=>e_.A,W1:()=>ed.A,WE:()=>g.A,We:()=>e1.A,Wn:()=>k.A,X:()=>AA.A,X_:()=>O.A,ZH:()=>R.A,ZU:()=>e5.A,Ze:()=>eU.A,Zr:()=>B.A,_O:()=>e7.A,_V:()=>Y.A,a4:()=>eb.A,aJ:()=>d.A,ak:()=>Z.A,bE:()=>e0.A,bd:()=>eY.A,cC:()=>c.A,c_:()=>f.A,dJ:()=>H.A,de:()=>Ae.A,dx:()=>N.A,e6:()=>eC.A,e9:()=>eW.A,eM:()=>eH.A,ek:()=>eV.A,es:()=>ey.A,f2:()=>I.A,f5:()=>L.A,gH:()=>eL.A,h1:()=>ec.A,iU:()=>E.A,jG:()=>eO.A,jj:()=>eu.A,jl:()=>v.A,jz:()=>eS.A,kU:()=>U.A,kV:()=>eA.A,kr:()=>er.A,kt:()=>eG.A,lM:()=>e8.A,lP:()=>ew.A,m0:()=>w.A,mN:()=>K.A,nU:()=>es.A,qz:()=>V.A,rX:()=>b.A,s3:()=>eo.A,sU:()=>eX.A,sv:()=>G.A,ue:()=>ek.A,vR:()=>eF.A,vW:()=>eT.A,vd:()=>J.A,vj:()=>eD.A,vv:()=>en.A,wB:()=>eN.A,wO:()=>eI.A,ww:()=>$.A,xq:()=>ep.A,xv:()=>ex.A,y8:()=>ei.A,yQ:()=>u.A,yU:()=>eM.A,yd:()=>i.A,zW:()=>e9.A});var t=o(73365),n=o(87821),i=o(21878),r=o(79376),l=o(61659),a=o(6504),s=o(74739),c=o(29967),p=o(17836),d=o(67494),h=o(66687),u=o(95188),m=o(54453),f=o(34582),b=o(70453),g=o(10949),v=o(64570),w=o(31258),y=o(59907),C=o(13374),k=o(17406),P=o(46431),S=o(29260),x=o(88433),F=o(49553),L=o(20478),M=o(17568),U=o(87831),O=o(1916),q=o(29418),R=o(18272),j=o(10550),T=o(9271),W=o(14251),E=o(50068),G=o(98173),H=o(10194),J=o(70362),D=o(17909),_=o(59437),B=o(33109),N=o(48433),z=o(86877),V=o(34271),I=o(60919),X=o(35723),Z=o(41046),K=o(64629),Q=o(6534),$=o(5370),Y=o(59711),ee=o(39831),eA=o(9560),eo=o(44159),et=o(20021),en=o(14797),ei=o(15504),er=o(93292),el=o(92165),ea=o(94304),es=o(40789),ec=o(64871),ep=o(31805),ed=o(19621),eh=o(40081),eu=o(38781),em=o(88768),ef=o(68395),eb=o(88793),eg=o(25406),ev=o(10998),ew=o(64446),ey=o(12925),eC=o(93354),ek=o(73243),eP=o(89317),eS=o(12283),ex=o(1578),eF=o(90612),eL=o(43959),eM=o(76621),eU=o(59833),eO=o(67236),eq=o(97038),eR=o(72147),ej=o(68859),eT=o(93285),eW=o(20178),eE=o(65062),eG=o(87030),eH=o(67519),eJ=o(457),eD=o(58450),e_=o(48088),eB=o(56023),eN=o(59311),ez=o(38177),eV=o(60659),eI=o(1838),eX=o(34969),eZ=o(42685),eK=o(99707),eQ=o(6830),e$=o(20248),eY=o(11384),e1=o(50211),e3=o(64342),e6=o(60151),e8=o(81610),e5=o(11990),e0=o(52715),e7=o(49387),e9=o(894),e2=o(2031),e4=o(58573),Ae=o(51328),AA=o(3382),Ao=o(57717);let At={AlertCircle:n.A,ArrowDown:i.A,ArrowRight:r.A,ArrowUp:l.A,ArrowUpRight:a.A,Bell:s.A,Bot:c.A,Bug:p.A,Check:d.A,CheckCircle2:h.A,ChevronDown:u.A,ChevronLeft:m.A,ChevronRight:f.A,ChevronUp:b.A,ChevronsDownUp:g.A,Circle:v.A,ClipboardPaste:w.A,Command:y.A,Compass:C.A,Columns2:k.A,Copy:P.A,CornerDownLeft:S.A,Crown:x.A,Delete:F.A,Download:L.A,ExternalLink:M.A,Eye:U.A,EyeOff:O.A,Facebook:q.A,File:R.A,FileCode:j.A,FileJson:T.A,FilePlus:W.A,FileText:E.A,Files:G.A,Filter:H.A,Folder:J.A,FolderOpen:D.A,FolderPlus:_.A,GitBranch:B.A,GitFork:N.A,Github:z.A,Globe:V.A,GripVertical:I.A,Hand:X.A,HardDrive:Z.A,HelpCircle:K.A,History:Q.A,Home:$.A,Image:Y.A,ImageOff:ee.A,KeyRound:eA.A,Keyboard:eo.A,LayoutDashboard:et.A,Link2:en.A,ListChecks:ei.A,Loader2:er.A,Lock:el.A,LogIn:ea.A,LogOut:es.A,Maximize2:ec.A,Minimize2:ep.A,Menu:ed.A,Mic:eh.A,MicOff:eu.A,Monitor:em.A,Moon:ef.A,MoreHorizontal:eb.A,MoreVertical:eg.A,MousePointer2:ev.A,Package:ew.A,Palette:ey.A,PanelLeft:eC.A,PanelLeftClose:ek.A,PanelLeftOpen:eP.A,PanelRight:eS.A,Paperclip:ex.A,Pause:eF.A,Pencil:eL.A,Pin:eM.A,PinOff:eU.A,Play:eO.A,Plus:eq.A,Power:eR.A,PowerOff:ej.A,QrCode:eT.A,RefreshCw:eW.A,Replace:eE.A,RotateCw:eG.A,Save:eH.A,Scissors:eJ.A,Search:eD.A,Send:e_.A,SendHorizontal:eB.A,Settings:eN.A,Share:ez.A,Shield:eV.A,Smartphone:eI.A,Sparkles:eX.A,Square:eZ.A,SquarePen:eK.A,Star:eQ.A,StickyNote:e$.A,Sun:eY.A,Target:e1.A,Terminal:e3.A,Trash2:e6.A,Triangle:e8.A,Type:e5.A,Undo2:e0.A,Upload:e7.A,Users:e9.A,Volume2:e2.A,VolumeX:e4.A,Wallpaper:Ae.A,X:AA.A,Zap:Ao.A};function An({name:e,size:A=20,className:o="",...n}){let i=At[e];return i?(0,t.jsx)(i,{size:A,className:o,strokeWidth:2,...n}):(console.warn(`Icon "${e}" not found in the icon registry`),null)}}},e=>{e.O(0,[161,6552,2347,5158,7358],()=>e(e.s=61436)),_N_E=e.O()}]);
|