1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="75f29c8d-678a-4bdd-a620-522332e26ae9",e._sentryDebugIdIdentifier="sentry-dbid-75f29c8d-678a-4bdd-a620-522332e26ae9")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3523,7177],{1001:()=>{},10945:(e,t,r)=>{"use strict";r.d(t,{logger:()=>g});var n=r(38103),i=r(53604),o=r(70088),a=r(78483),s=r(84901),l=r.n(s),c=r(10986);let u=l()({level:c.env.NEXT_PUBLIC_LOG_LEVEL||"info",browser:{asObject:!0},redact:{paths:["password","token","*.secret"],remove:!0}});function d(e){return e?"object"!=typeof e||Array.isArray(e)?{value:e}:e:{}}function f(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let i=function(e){if(0===e.length)return{msg:""};if(1===e.length){let t=e[0];return"string"==typeof t?{msg:t}:t instanceof Error?{msg:t.message,err:t,obj:{err:t}}:{msg:"",obj:d(t)}}let t=e[0],r=e[1],n="",i,o,a="string"==typeof t,s="string"==typeof r;if(a&&!s?(n=t,i=r instanceof Error?{err:o=r}:d(r)):!a&&s?(i=t instanceof Error?{err:t}:d(t),t instanceof Error&&(o=t),n=r):a&&s?n="".concat(t," ").concat(r):i={...d(t),...d(r)},e.length>2){let t=e.slice(2),r={};t.forEach((e,t)=>{e instanceof Error&&!o?(o=e,r.err=e):"string"==typeof e?n=n?"".concat(n," ").concat(e):e:Object.assign(r,d(e))}),i={...i||{},...r}}return!o||i&&"err"in i||(i={...i||{},err:o}),{msg:n,obj:i,err:o}}(r),{msg:o,obj:a}=i,s=o||"(no message)";try{a&&Object.keys(a).length?u[e](a,s):u[e](s)}catch(e){}!function(e,t){1}(e,i)}}let g={debug:f("debug"),info:f("info"),warn:f("warn"),error:f("error"),fatal:f("error"),trace:f("debug")}},26123:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var n=r(30095),i=r(10945),o=r(21474),a=r(1521);function s(){let e=(0,n._r)(),t=(0,o.jE)(),r=(0,a.useRef)(!1),s=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{let{data:r}=e.auth.onAuthStateChange(e=>{"TOKEN_REFRESHED"===e&&s.current&&(s.current=!1,t.invalidateQueries()),"SIGNED_OUT"===e&&t.clear()});return()=>r.subscription.unsubscribe()},[e.auth,t]),(0,a.useEffect)(()=>{let t=async()=>{if(!r.current){r.current=!0;try{var t;let{data:{session:r}}=await e.auth.getSession();if(!r)return;(null!=(t=r.expires_at)?t:0)*1e3-Date.now()<6e4&&(i.logger.info("Proactively refreshing expired/expiring session on window focus"),s.current=!0,await e.auth.refreshSession())}catch(e){i.logger.warn("Failed to refresh session on window focus",{error:e})}finally{r.current=!1}}},n=()=>{"visible"===document.visibilityState&&t()};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",n),()=>{window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",n)}},[e.auth]),(0,a.useEffect)(()=>{let t=setInterval(async()=>{if(!r.current){r.current=!0;try{var t;let{data:{session:r}}=await e.auth.getSession();if(!r)return;(null!=(t=r.expires_at)?t:0)*1e3-Date.now()<12e4&&(i.logger.info("Proactively refreshing session (interval check)"),s.current=!0,await e.auth.refreshSession())}catch(e){i.logger.warn("Failed to refresh session on interval check",{error:e})}finally{r.current=!1}}},3e4);return()=>clearInterval(t)},[e.auth]),null}},31197:(e,t,r)=>{"use strict";r.d(t,{Q:()=>u,k_:()=>c,yE:()=>s});var n=r(16807),i=r(10945),o=r(70088);let a=new RegExp(/^organization\.[0-9a-f-]{36}\.(?:admin|user)$/);function s(e){var t;let r={};try{r=(0,n.i)(e)}catch(e){o.Cp(e),i.logger.error("Error while parsing access token to obtain organization scope",{error:e})}let s="string"==typeof r.scope?r.scope:"",l=null==s||null==(t=s.split(" "))?void 0:t.find(e=>a.test(e));return{organizationId:null==l?void 0:l.slice(13,49),organizationRole:null==l?void 0:l.slice(50)}}class l extends Error{constructor(e={},t="An authentication change is required to proceed."){super(t),this.signInOptions=e,this.name="AuthenticationChangeRequiredError"}}function c(e){return e instanceof l||"object"==typeof e&&"AuthenticationChangeRequiredError"===e.name&&"object"==typeof e.signInOptions}function u(e){let{loginHint:t,scopes:r,prompt:n,returnToPath:i=e.pathname}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new URL("/auth/callback",e);return o.searchParams.set("returnTo",i),{provider:"google",options:{redirectTo:o.toString(),scopes:null==r?void 0:r.join(" "),queryParams:{login_hint:null!=t?t:"",access_type:"offline",include_granted_scopes:"true",prompt:null!=n?n:"select_account"}}}}},38253:(e,t,r)=>{"use strict";r.d(t,{SegmentProvider:()=>a});
1var n=r(73365),i=r(43523),o=r(1521);function a(e){let{children:t}=e;return(0,o.useEffect)(()=>{(0,i.initSegmentClient)()},[]),(0,n.jsx)(n.Fragment,{children:t})}},39391:(e,t,r)=>{"use strict";let n;r.d(t,{default:()=>w});var i=r(73365),o=r(30095);function a(e){if("object"==typeof e&&null!==e&&"message"in e){let t=e.message;return"string"==typeof t&&t.toLowerCase().includes("jwt expired")}return!1}function s(e){if(e instanceof DOMException&&"AbortError"===e.name)return!0;if(e instanceof TypeError){let t=e.message.toLowerCase();return t.includes("failed to fetch")||t.includes("load failed")||t.includes("networkerror")||t.includes("cancelled")||t.includes("network request failed")}if("object"==typeof e&&null!==e&&"message"in e){let t=String(e.message).toLowerCase();return t.includes("failed to fetch")||t.includes("load failed")||t.includes("networkerror")}return!1}var l=r(10945),c=r(62812),u=r(47954),d=r(21474),f=r(20830),g=r(1457),h=r(1521);let p=(0,h.lazy)(()=>r.e(4879).then(r.bind(r,74879)).then(e=>({default:e.ReactQueryDevtools}))),v=new u.E({defaultOptions:{queries:{refetchInterval:3e4,refetchIntervalInBackground:!1,refetchOnWindowFocus:!0,refetchOnReconnect:!0,gcTime:864e5,retry:(e,t)=>s(t)?e<5:(a(t)&&(0,o.UZ)().auth.refreshSession().catch(()=>{}),e<3),retryDelay:(e,t)=>a(t)?Math.min(1e3*2**e,5e3):s(t)?Math.min(500*2**e,15e3):Math.min(1e3*2**e,3e4),throwOnError:e=>!s(e)&&!a(e)}}});function w(e){let{children:t}=e,[r,o]=(0,h.useState)(!1),[a,s]=(0,h.useState)(!1);if((0,h.useEffect)(()=>{o(!0),window.toggleReactQueryDevTools=()=>s(e=>!e)},[]),!r)return null;let l=(0,i.jsxs)(i.Fragment,{children:[t,a&&(0,i.jsx)(h.Suspense,{fallback:null,children:(0,i.jsx)(p,{})})]});return n?(0,i.jsx)(g.t,{client:v,persistOptions:{persister:n},children:l}):(0,i.jsx)(d.Ht,{client:v,children:l})}window.localStorage?(l.logger.info("Using localStorage for react-query persistance"),n=(0,c.s)({storage:window.localStorage,retry:f.Q,throttleTime:5e3})):l.logger.warn("localStorage not available, react-query persistance disabled")},42566:(e,t,r)=>{"use strict";let n,i,o;r.d(t,{default:()=>y});let a={rE:"1.0.1"};var s=r(30095),l=r(11782),c=r(48622),u=r(62520),d=r(8350),f=r(2930),g=r(42445),h=r(88186),p=r(73811),v=r(55253),w=r(1702),m=r(1521);let E=new f.Q({url:"https://api.honeycomb.io/v1/traces",headers:{"x-honeycomb-team":(0,l._)("NEXT_PUBLIC_HONEYCOMB_API_SEND_KEY")}});function y(e){let{children:t}=e,r=(0,s._r)(),a=(0,w.usePathname)(),d=(0,w.useSearchParams)();return(0,m.useEffect)(()=>{r.auth.onAuthStateChange((e,t)=>{n=null!=t?t:void 0})},[r]),(0,m.useEffect)(()=>{if(i){if(i.pathname===a)return;i.span.end(),i=void 0}i={pathname:a,span:c.u.getTracer((0,l._)("NEXT_PUBLIC_HONEYCOMB_WEB_BROWSER_SERVICE_NAME")).startSpan("URL path: ".concat(a),void 0,u._.active())}},[a]),(0,m.useEffect)(()=>{if(o){if(o.pathname===a&&o.searchParams===d.toString())return;o.span.end(),o=void 0}o={pathname:a,searchParams:d.toString(),span:c.u.getTracer((0,l._)("NEXT_PUBLIC_HONEYCOMB_WEB_BROWSER_SERVICE_NAME")).startSpan("URL search params: ".concat(d.toString()),{links:i?[{context:null==i?void 0:i.span.spanContext()}]:void 0},u._.active())}},[a,d]),t}(async function e(){await r.e(2934).then(r.t.bind(r,22934,23));let e=new h.Z({resource:new g.F({[v.AV]:(0,l._)("NEXT_PUBLIC_HONEYCOMB_WEB_BROWSER_SERVICE_NAME")})});e.addSpanProcessor({forceFlush:()=>Promise.resolve(),onStart(e){var t,r,s;e.setAttribute("app.version",a.rE),e.setAttribute("app.session.expires_at",null==n?void 0:n.expires_at),e.setAttribute("app.session.user.id",null==n||null==(t=n.user)?void 0:t.id),e.setAttribute("app.session.user.provider",null==n||null==(s=n.user)||null==(r=s.app_metadata)?void 0:r.provider),e.setAttribute("app.location.pathname",window.location.pathname),e!==(null==i?void 0:i.span)&&e!==(null==o?void 0:o.span)&&(i&&e.links.push({context:i.span.spanContext()}),o&&e.links.push({context:o.span.spanContext()}))},onEnd(){},shutdown:()=>Promise.resolve()}),e.addSpanProcessor(new p.J(E)),e.register({contextManager:new d.T})})()},43523:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getSegmentClient:()=>l,identifyClient:()=>u,initSegmentClient:()=>s,setUserTraitsClient:()=>d,trackClient:()=>c});var n=r(10945),i=r(68166),o=r(70088);let a=null;function s(){if(a)return a;let e="kZwChWIonYO13bHHvqG5Tv0iZ8RUvB46";return e?a=i.N.load({writeKey:e}):(n.logger.warn("Segment write key not found. Analytics will be disabled."),null)}function l(){return a||s()}async function c(e,t,r){let i=l();if(!i)return void n.logger.warn("Segment client not initialized. Event not tracked:",e);let a={...t||{},environment:(null==t?void 0:t.environment)||"production"};try{r&&await i.identify(r),await i.track(e,a)}catch(e){o.Cp(e),n.logger.error("Segment track error:",e)}}async function u(e,t){let r=l();if(r)try{await r.identify(e,t)}catch(e){n.logger.error("Segment identify error:",e)}}async function d(e){let t=l();if(t)try{await t.identify(e)}catch(e){n.logger.error("Segment set traits error:",e)}}},43598:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var n=r(47909),i=r(1521),o=r(48158);let a="stale-deployment-reload-ts";function s(){return(0,i.useEffect)(()=>{function e(e){if(!(0,n.XS)(e.reason))return;e.preventDefault();let t=Number(sessionStorage.getItem(a)||"0");Date.now()-t<1e4||(sessionStorage.setItem(a,String(Date.now())),o.o.info("Applying latest update..."),window.location.reload())}return window.addEventListener("unhandledrejection",e),()=>window.removeEventListener("unhandledrejection",e)},[]),null}},47909:(e,t,r)=>{"use strict";function n(e){if(null==e)return!1;if("object"==typeof e&&"name"in e&&"AuthSessionMissingError"===e.name)return!0;
1if("object"==typeof e&&"message"in e){let t=e.message;if("string"==typeof t&&t.toLowerCase().includes("auth session missing"))return!0}return!1}function i(e){return e instanceof Error&&e.message.includes("was not found on the server")}r.d(t,{XS:()=>i,zq:()=>n}),r(10945)},62152:(e,t,r)=>{"use strict";r.d(t,{AuthenticationProvider:()=>p,u:()=>h});var n=r(73365),i=r(8604);let o=(0,i.createServerReference)("008210f3c0a1cfa4e9c445297fe54b7b6accd17478",i.callServer,void 0,i.findSourceMapURL,"resetRouterCache");var a=r(30095),s=r(31197),l=r(10945),c=r(21474),u=r(1702),d=r(1521),f=r(93615).Buffer;let g=(0,d.createContext)(void 0);function h(){let e=(0,d.useContext)(g);if(!e)throw Error("useAuthentication must be used within an AuthenticationProvider");return e}let p=e=>{let{mode:t="redirect",children:r}=e,i=(0,u.useRouter)(),h=(0,a._r)(),[p,v]=(0,d.useState)(t),w=(0,c.jE)(),[m,E]=(0,d.useState)(!1),[y,b]=(0,d.useState)(!1),S=(0,d.useCallback)(async function(e){var t,r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;E(!0);let a=new URL(null!=(r=null==(t=e.options)?void 0:t.redirectTo)?r:window.location.href),s="redirect"!==n;a.searchParams.set("mode",n);let{error:c,data:u}=await h.auth.signInWithOAuth({...e,options:{...e.options,redirectTo:a.href,skipBrowserRedirect:s}});if(c||s&&!u.url)throw null!=c?c:Error("Failed to obtain sign-in URL");if("redirect"===n)return new Promise(()=>{});await new Promise((e,t)=>{let r,n=window.open(u.url,"popup-session","popup=true,width=400,height=600");function a(){null==n||n.close(),r&&clearInterval(r),window.removeEventListener("message",s)}let s=async t=>{if(t.origin===window.location.origin){var r;let n=function(e){try{var t;let r=JSON.parse(f.from(e,"base64").toString("utf-8"));if(t=r,"object"==typeof t&&"string"==typeof t.access_token&&"string"==typeof t.refresh_token)return r}catch(e){return}}(null!=(r=t.data.session)?r:"");if(n){a();let{error:t}=await h.auth.setSession(n);if(t)throw t;await o(),i.refresh(),e()}else if(t.data.code){a();let e=new URLSearchParams({code:t.data.code});t.data.returnTo&&e.append("returnTo",t.data.returnTo),window.location.assign("/auth/callback?".concat(e.toString()))}}};window.addEventListener("message",s);let c=Date.now();r=setInterval(()=>{(null==n?void 0:n.closed)?(clearInterval(r),window.removeEventListener("message",s),t(Error("Popup closed without returning authentication data"))):Date.now()-c>3e5&&(l.logger.warn("Popup sign-in timed out"),clearInterval(r),window.removeEventListener("message",s),t(Error("Popup sign-in timed out")))},250)}),E(!1)},[h.auth,p,i]),_=(0,d.useCallback)(async()=>(b(!0),w.clear(),await fetch("/api/logout",{method:"POST",credentials:"include"}),await h.auth.signOut(),window.location.href="/login",new Promise(()=>{})),[w,h]),P=(0,d.useCallback)(e=>e&&(0,s.k_)(e)?Promise.resolve(!0):Promise.resolve(!e),[]),C=(0,d.useMemo)(()=>({currentMode:p,setMode:v,signIn:S,signOut:_,signInPending:m,signOutPending:y,handleAuthenticationChangeError:P}),[p,S,_,m,y,P]);return(0,n.jsx)(g.Provider,{value:C,children:r})}},78390:(e,t,r)=>{Promise.resolve().then(r.bind(r,6921)),Promise.resolve().then(r.t.bind(r,50450,23)),Promise.resolve().then(r.bind(r,48158)),Promise.resolve().then(r.t.bind(r,1001,23)),Promise.resolve().then(r.bind(r,42566)),Promise.resolve().then(r.bind(r,62152)),Promise.resolve().then(r.bind(r,39391)),Promise.resolve().then(r.bind(r,38253)),Promise.resolve().then(r.bind(r,26123)),Promise.resolve().then(r.bind(r,43598))}},e=>{e.O(0,[7108,5248,7223,8166,9409,3615,6902,8158,651,95,6562,2347,686,7358],()=>e(e.s=78390)),_N_E=e.O()}]); 2//# sourceMappingURL=layout-aa7c7820a22c83e0.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.