module.exports=[69208,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d="patchtrail-forge-oauth";a.s(["ForgeOAuthCallbackClient",0,function(){let[a,e]=(0,c.useState)({phase:"relaying"});return(0,c.useEffect)(()=>{let a=window.setTimeout(()=>{let a=new URLSearchParams(window.location.search),b=a.get("error"),c=a.get("code"),f=a.get("state"),g=window.opener;if(!g||g.closed)return void e({phase:"error",message:"This window was not opened by PatchTrail. Close it and start the GitHub connection again from Settings."});let h=window.location.origin;if(b){g.postMessage({type:d,error:String(b).slice(0,200)},h),e({phase:"done"}),window.close();return}if(!c||!f){g.postMessage({type:d,error:"missing_code_or_state"},h),e({phase:"error",message:"GitHub did not return an authorization code."}),window.close();return}g.postMessage({type:d,code:c,state:f},h),e({phase:"done"}),window.close()},0);return()=>window.clearTimeout(a)},[]),(0,b.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"system-ui, sans-serif",textAlign:"center"},children:(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{style:{fontWeight:600},children:"error"===a.phase?"GitHub connection could not complete":"Finishing GitHub connection…"}),(0,b.jsx)("p",{style:{marginTop:"0.5rem",color:"#666"},children:"error"===a.phase?a.message:"You can close this window and return to PatchTrail."})]})})}])}];

//# sourceMappingURL=src_app_forge_callback_forge-oauth-callback-client_tsx_0z9jc8c._.js.map