(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[480],{98710:function(e,t,s){Promise.resolve().then(s.bind(s,33422))},99376:function(e,t,s){"use strict";var a=s(35475);s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},33422:function(e,t,s){"use strict";s.r(t);var a=s(57437),n=s(2265),l=s(99376);let r=()=>{let e=window.location.pathname||"",t=e.indexOf("/ui");if(t>=0){let s=e.slice(0,t+3);return s.endsWith("/")?s:"".concat(s)}return"/"};t.default=()=>{let e=(0,l.useSearchParams)(),t=(0,n.useMemo)(()=>e?{type:"litellm-mcp-oauth",code:e.get("code"),state:e.get("state")}:null,[e]);return(0,n.useEffect)(()=>{if(!t)return;try{window.sessionStorage.setItem("litellm-mcp-oauth-result",JSON.stringify(t))}catch(e){console.error("Failed to persist OAuth callback payload",e)}let e=window.sessionStorage.getItem("litellm-mcp-oauth-return-url");console.info("[MCP OAuth callback] returnUrl",e);let s=e||r();window.location.replace(s)},[t]),(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 p-6",children:(0,a.jsxs)("div",{className:"max-w-lg w-full rounded-lg bg-white shadow-md p-8 text-center space-y-4",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-slate-900",children:"LiteLLM MCP OAuth"}),(0,a.jsx)("p",{className:"text-sm text-slate-700",children:"Authorization complete. You may close this window and return to the LiteLLM dashboard."}),(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"If the window does not close automatically, everything is still saved—you can close it manually."})]})})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=98710)}),_N_E=e.O()}]);