PageSourceSearch

https://kibin.com/_next/static/chunks/a79344fdd0e2cecb.js

js kibin.com collected 2026-10-02 07:52:56 UTC 24,259 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96086,(e,t,r)=>{t.exports=e.r(9187)},42932,1831,71429,44840,e=>{"use strict";var t=e.i(48277),r=e.i(30668),i=e.i(96086);e.i(39057);let a="https://kibin-api-prod-production.up.railway.app";function n(){return localStorage.getItem("kibin_token")}function o(e){localStorage.setItem("kibin_token",e)}function s(){localStorage.removeItem("kibin_token")}async function l(e,t={}){let r,i=n(),o={...t.headers};i&&(o.Authorization=`Bearer ${i}`),!t.body||t.body instanceof FormData||(o["Content-Type"]="application/json");let s=t.body instanceof FormData,u=new AbortController,d=setTimeout(()=>u.abort(),s?18e5:18e4);try{r=await fetch(`${a}${e}`,{...t,headers:o,signal:u.signal})}catch(e){if(clearTimeout(d),"AbortError"===e.name)throw Error("Request timed out. Please refresh and try again.");throw e}clearTimeout(d);let c=await r.json();if(!r.ok){let e=Error(c.error||"Request failed");throw e.status=r.status,c.upgrade_required&&(e.upgrade_required=!0),e}return c}let u={googleAuth:e=>l("/api/auth/google",{method:"POST",body:JSON.stringify(e)}),appleAuth:(e,t,r,i)=>l("/api/auth/apple",{method:"POST",body:JSON.stringify({identity_token:e,full_name:t,attribution:r,from_pseo:i})}),getMe:()=>l("/api/auth/me"),updateProfile:e=>l("/api/auth/profile",{method:"PATCH",body:JSON.stringify(e)}),getUserUsage:()=>l("/api/user/usage"),getReviewQueue:e=>{let t=new URLSearchParams;return e?.material_id&&t.set("material_id",String(e.material_id)),e?.course_id&&t.set("course_id",String(e.course_id)),l(`/api/review/queue?${t.toString()}`)},submitReviewQueueAnswer:(e,t)=>l("/api/review/answer",{method:"POST",body:JSON.stringify({progress_id:e,correct:t})}),getConceptForReview:e=>l(`/api/review/${e}`),submitReviewAnswer:(e,t)=>l(`/api/review/${e}/submit`,{method:"POST",body:JSON.stringify(t)}),gradeShortAnswer:(e,t)=>l(`/review/${e}/grade`,{method:"POST",body:JSON.stringify({answer:t})}),updateMastery:(e,t)=>l(`/review/${e}/mastery`,{method:"PATCH",body:JSON.stringify({delta:t})}),listMaterials:()=>l("/api/materials"),getMaterial:e=>l(`/api/materials/${e}`),deleteMaterial:e=>l(`/api/materials/${e}`,{method:"DELETE"}),uploadText:(e,t,r)=>l("/api/materials",{method:"POST",body:JSON.stringify({type:"text",title:e,content:t,course_id:r||null})}),uploadYoutube:(e,t,r)=>l("/api/materials",{method:"POST",body:JSON.stringify({type:"youtube",url:e,title:t,course_id:r||null})}),uploadPdf:(e,t,r)=>{let i=new FormData;return i.append("file",e),i.append("type","pdf"),t&&i.append("title",t),r&&i.append("course_id",String(r)),l("/api/materials",{method:"POST",body:i})},uploadImage:(e,t,r)=>{let i=new FormData;return i.append("file",e),i.append("type","image"),t&&i.append("title",t),r&&i.append("course_id",String(r)),l("/api/materials",{method:"POST",body:i})},uploadAudio:(e,t,r)=>{let i=new FormData;return i.append("file",e),i.append("type","audio"),t&&i.append("title",t),r&&i.append("course_id",String(r)),l("/api/materials",{method:"POST",body:i})},updateMaterial:(e,t)=>l(`/api/materials/${e}`,{method:"PATCH",body:JSON.stringify(t)}),moveMaterial:(e,t)=>l(`/api/materials/${e}/move`,{method:"POST",body:JSON.stringify({course_id:t})}),setTestDate:(e,t,r)=>l(`/api/materials/${e}/test-date`,{method:"POST",body:JSON.stringify({test_name:t,test_date:r})}),deleteTestDate:e=>l(`/api/materials/${e}/test-date`,{method:"DELETE"}),generateStudyContent:e=>l(`/api/materials/${e}/study`,{method:"POST"}),generateQuiz:(e,t)=>l(`/api/materials/${e}/quiz${t?.refill?"?refill=true":""}`,{method:"POST"}),quizStatus:e=>l(`/api/materials/${e}/quiz/status`),generateFlashcards:(e,t)=>{let r=t?.refill?"?refill=true":t?.regenerate?"?regenerate=true":"";return l(`/api/materials/${e}/flashcards${r}`,{method:"POST"})},flashcardStatus:e=>l(`/api/materials/${e}/flashcards/status`),submitQuiz:(e,t,r)=>l(`/api/quiz/${e}/submit`,{method:"POST",body:JSON.stringify({answers:t,...r?{session_id:r}:{}})}),recordQuizAnswer:(e,t,r)=>l(`/api/quiz/${e}/record-answer`,{method:"POST",body:JSON.stringify({question_id:t,answer:r})}),resumeQuiz:e=>l(`/api/quiz/${e}/resume`),saveQuizAnswer:(e,t,r,i,a)=>l(`/api/quiz/${e}/save-answer`,{method:"POST",body:JSON.stringify({session_id:t||void 0,question_id:r,answer:i,...a?{question_order:a}:{}})}),getLatestQuiz:e=>l(`/api/materials/${e}/quiz/latest`),getQuizSession:e=>l(`/api/materials/${e}
1/quiz/session`),getLatestFlashcards:e=>l(`/api/materials/${e}/flashcards/latest`),generateAudio:(e,t)=>l(`/api/materials/${e}/audio/${t}`,{method:"POST"}),getAudioUrl:(e,t)=>{let r=localStorage.getItem("kibin_token");return`https://kibin-api-prod-production.up.railway.app/api/materials/${e}/audio/${t}?token=${r}`},getQuizHistory:e=>l(`/api/materials/${e}/quiz-history`),getNeedsReview:e=>l(`/api/quiz/session/${e}/needs-review`),explainQuizAnswer:(e,t,r,i)=>l(`/api/quiz/${e}/explain-answer`,{method:"POST",body:JSON.stringify({question_id:t,...r?{follow_up:r,previous_explanation:i}:{}})}),updateFlashcardProgress:(e,t)=>l(`/api/flashcards/${e}/progress`,{method:"POST",body:JSON.stringify({card_progress:t})}),recordFlashcardAttempt:(e,t,r)=>l(`/api/flashcards/${e}/cards/${t}/attempt`,{method:"POST",body:JSON.stringify({correct:r})}),getDeckMastery:e=>l(`/api/flashcards/${e}/mastery`),getFlashcardHistory:e=>l(`/api/materials/${e}/flashcard-history`),resumeFlashcards:e=>l(`/api/flashcards/resume/${e}`),saveFlashcardSessionProgress:(e,t,r,i,a)=>l(`/api/flashcards/${e}/save-progress`,{method:"POST",body:JSON.stringify({session_id:t||void 0,card_index:r,knew_it:i,...a?{card_order:a}:{}})}),listCourses:()=>l("/api/courses"),getCourse:e=>l(`/api/courses/${e}`),createCourse:(e,t)=>l("/api/courses",{method:"POST",body:JSON.stringify({name:e,description:t||""})}),updateCourse:(e,t)=>l(`/api/courses/${e}`,{method:"PUT",body:JSON.stringify(t)}),deleteCourse:(e,t=!1)=>l(`/api/courses/${e}?delete_materials=${t}`,{method:"DELETE"}),courseQuiz:(e,t,r)=>{let i=new URLSearchParams;t&&i.set("count",String(t)),r&&i.set("exam_type",r);let a=i.toString();return l(`/api/courses/${e}/quiz${a?`?${a}`:""}`)},courseFlashcards:(e,t)=>l(`/api/courses/${e}/flashcards${t?`?count=${t}`:""}`),courseStudyPool:e=>l(`/api/courses/${e}/study-pool`),courseQuizSubmit:(e,t)=>l(`/api/courses/${e}/quiz/submit`,{method:"POST",body:JSON.stringify({answers:t})}),courseExamSubmit:(e,t,r)=>l(`/api/courses/${e}/exam/submit`,{method:"POST",body:JSON.stringify({exam_type:t,answers:r})}),courseProgress:e=>l(`/api/courses/${e}/progress`),courseExamHistory:e=>l(`/api/courses/${e}/exam-history`),courseExamResume:e=>l(`/api/courses/${e}
1/exam/resume`),courseExamSaveProgress:(e,t)=>l(`/api/courses/${e}/exam/save-progress`,{method:"POST",body:JSON.stringify(t)}),courseExamAbandon:e=>l(`/api/courses/${e}/exam/abandon`,{method:"POST"}),courseExplainStart:(e,t,r)=>l(`/api/courses/${e}/explain/start`,{method:"POST",body:JSON.stringify({count:t||5,regenerate:r||!1})}),getExams:e=>l(`/api/courses/${e}/exams`),createExam:(e,t,r)=>l(`/api/courses/${e}/exams`,{method:"POST",body:JSON.stringify({exam_name:t,exam_date:r})}),deleteExam:(e,t)=>l(`/api/courses/${e}/exams/${t}`,{method:"DELETE"}),getNextExam:e=>l(`/api/courses/${e}/exams/next`),dashboardProgress:()=>l("/api/progress"),materialProgress:e=>l(`/api/materials/${e}/progress`),updateProgress:(e,t,r)=>l("/api/progress/update",{method:"POST",body:JSON.stringify({material_id:e,activity:t,concepts:r})}),explainConcept:(e,t,r)=>l("/api/explain",{method:"POST",body:JSON.stringify({concept:e,level:t,material_id:r})}),explainStart:(e,t,r)=>l(`/api/materials/${e}/explain/start`,{method:"POST",body:JSON.stringify({count:t||5,regenerate:r||!1})}),explainGrade:(e,t,r,i)=>l(`/api/materials/${e}/explain/grade`,{method:"POST",body:JSON.stringify({concept:t,explanation:r,difficulty:i})}),explainHistory:e=>l(`/api/materials/${e}/explain/history`),explainResume:e=>l(`/api/materials/${e}/explain/resume`),explainSaveProgress:(e,t,r,i,a,n,o)=>l(`/api/materials/${e}/explain/save-progress`,{method:"POST",body:JSON.stringify({session_id:t||void 0,concept_index:r,graded:!0,...i?{concepts:i}:{},...a?{total_concepts:a}:{},...n?{difficulty:n}:{},...o?{grade_scores:o}:{}})}),getExplainHistory:e=>l(`/api/materials/${e}/explain/history`),explainTranscribe:(e,t)=>{let r=new FormData;return r.append("audio",t,"recording.webm"),l(`/api/materials/${e}/explain/transcribe`,{method:"POST",body:r})},createCheckout:(e,t,r)=>l("/api/billing/create-checkout",{method:"POST",body:JSON.stringify({plan:e,embedded:t||!1,...r?{pseo_material_id:r}:{}})}),getSessionStatus:e=>l(`/api/billing/session-status?session_id=${e}`),getTrialEligibility:()=>l("/api/billing/trial-eligibility"),getPortal:()=>l("/api/billing/portal",{method:"POST"}),claimPseoClone:(e,t)=>l("/api/study-packs/claim-pseo-clone",{method:"POST",body:JSON.stringify({course:e,topic:t})}),completeOnboarding:e=>l("/api/onboarding",{method:"POST",body:JSON.stringify(e)}),skipOnboarding:()=>l("/api/onboarding/skip",{method:"POST"}),submitFeedback:(e,t)=>l("/api/user/feedback",{method:"POST",body:JSON.stringify({message:e,page:t})}),deleteAccount:()=>l("/api/user/delete",{method:"POST"}),exportUserData:async()=>{let e=n(),t={};e&&(t.Authorization=`Bearer ${e}`);let r=await fetch(`${a}/api/user/export`,{headers:t});if(!r.ok){let e="Export failed",t=!1;try{let i=await r.json();e=i.error||e,t=!!i.upgrade_required}catch{}let i=Error(e);throw i.status=r.status,t&&(i.upgrade_required=!0),i}return r.blob()},adminStats:()=>l("/api/admin/stats"),adminRevenue:(e=!1)=>l(`/api/admin/revenue${e?"?refresh=1":""}`),adminListUsers:(e={})=>{let t=new URLSearchParams;Object.entries(e).forEach(([e,r])=>{void 0!==r&&""!==r&&t.set(e,String(r))});let r=t.toString();return l(`/api/admin/users${r?"?"+r:""}`)},adminExportUsers:async(e={})=>{let t=new URLSearchParams;Object.entries(e).forEach(([e,r])=>{void 0!==r&&""!==r&&t.set(e,String(r))});let r=t.toString(),i=n(),o={};i&&(o.Authorization=`Bearer ${i}`);let s=await fetch(`${a}/api/admin/users/export${r?"?"+r:""}`,{headers:o});if(!s.ok){let e="Export failed";try{e=(await s.json()).error||e}catch{}let t=Error(e);throw t.status=s.status,t}return s.blob()},adminGetUser:e=>l(`/api/admin/users/${e}`),adminUpdateUser:(e,t)=>l(`/api/admin/users/${e}`,{method:"PATCH",body:JSON.stringify(t)}),adminDeleteUser:e=>l(`/api/admin/users/${e}`,{method:"DELETE"}),adminImpersonate:e=>l(`/api/admin/users/${e}/impersonate`,{method:"POST"}),adminListUploads:(e={})=>{let t=new URLSearchParams;Object.entries(e).forEach(([e,r])=>{void 0!==r&&""!==r&&t.set(e,String(r))});let r=t.toString();return l(`/api/admin/uploads${r?"?"+r:""}`)},adminBackfillFirstPaid:()=>l("/api/admin/backfill-first-paid",{method:"POST"}),adminGetMaterial:e=>l(`/api/admin/materials/${e}`)};e.s(["api",0,u,"clearToken",()=>s,"setToken",()=>o],1831);let d="kibin_attribution";function c(e){if("u"<typeof document)return null;let t=document.cookie.match(RegExp("(?:^|; )"+e.replace(/[.$?*|{}()[\]\\/+^]/g,"\\$&")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}function p(){let e=c(d);if(e)try{return JSON.parse(e)}catch{}try{let e=localStorage.getItem(d);if(!e)return null;return JSON.parse(e)}catch{return null}}var m=e.i(33170);let f={weekly:9.99,monthly:9.99,yearly:59.99,monthly_soft:9.99,yearly_soft:59.99};function g(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e);let{event:t,...r}=e;(0,m.initPostHog)();let i="begin_checkout"===t||"purchase"===t;(0,m.captureEvent)(t,r,i?{send_instantly:!0,transport:"sendBeacon"}:void 0)}let h=null;function y(e){let t=String(e);h!==t&&(h=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_id:t}))}let S="kibin_pending_purchase";function b(e,t){try{sessionStorage.setItem(S,JSON.stringify({plan:e,value:f[e],email:t}))}catch{}}function _(){try{let e=sessionStorage.getItem(S);if(!e)return null;sessionStorage.removeItem(S);let t=JSON.parse(e);return{...t,email:t.email??""}}catch{return null}}e.s(["PLAN_ITEM_NAMES",0,{weekly:"Kibin Pro Weekly",monthly:"Kibin Pro Monthly",yearly:"Kibin Pro Annual",monthly_soft:"Kibin Pro Monthly (Soft)",yearly_soft:"Kibin Pro Annual (Soft)"},"PLAN_NAMES",0,{weekly:"pro_weekly",monthly:"pro_monthly",yearly:"pro_yearly",monthly_soft:"pro_monthly_soft",yearly_soft:"pro_yearly_soft"},"PLAN_VALUES",0,f,"consumePendingPurchase",()=>_,"pushAnalyticsEvent",()=>g,"savePendingPurchase",()=>b,"setAnalyticsUser",()=>y],71429);let w="kibin_last_oauth_provider";function O(e){try{window.localStorage.setItem(w,e)}catch{}}function v(){try{let e=window.localStorage.getItem(w);return"google"===e||"apple"===e?e:null}catch{return null}}e.s(["getLastOAuthProvider",()=>v,"rememberOAuthProvider",()=>O],44840);let P=(0,r.createContext)(void 0);function x(){let e=new URLSearchParams(window.location.search).get("from_pseo");return e&&e.trim()?e:void 0}function $({children:e}){let[a,n]=(0,r.useState)(null),[l,f]=(0,r.useState)(!0),h=(0,i.useRouter)();(0,r.useEffect)(()=>{!function(){if(c(d))return;try{if(localStorage.getItem(d))return}catch{}let e=new URLSearchParams(window.location.search),t=e.get("utm_source"),r=e.get("utm_medium"),i=e.get("utm_campaign"),a=document.referrer||null;try{if(a){let e=new URL(a);("kibin.com"===e.hostname||e.hostname.endsWith(".kibin.com"))&&(a=null)}}catch{a=null}(t||r||i||a)&&function(e,t){let r;if("u"<typeof document)return;let i=[`${e}=${encodeURIComponent(t)}`,"Max-Age=31536000","Path=/","SameSite=Lax"];"https:"===window.location.protocol&&i.push("Secure");let a="kibin.com"===(r=window.location.hostname)||r.endsWith(".kibin.com")?".kibin.com":null;a&&i.push(`Domain=${a}`),document.cookie=i.join("; ")}(d,JSON.stringify({utm_source:t,utm_medium:r,utm_campaign:i,referrer:a,captured_at:new Date().toISOString()}))}(),localStorage.getItem("kibin_token")?u.getMe().then(e=>{n(e.user),(0,m.identifyUser)(e.user),y(e.user.id)}).catch(()=>{s()}).finally(()=>f(!1)):f(!1)},[]);let S=async()=>{let e=await u.getMe();n(e.user),(0,m.identifyUser)(e.user),y(e.user.id)},b=async e=>{let t=x(),r=await u.googleAuth({...e,attribution:p()??void 0,from_pseo:t});o(r.token),n(r.user),(0,m.identifyUser)(r.user),y(r.user.id),O("google"),r.is_new&&((0,m.captureEvent)("signup_completed",{provider:"google",pseo_material_id:r.pseo_material_id??null}),g({event:"sign_up",method:"google"})),w(r,t)},_=async(e,t)=>{let r=x(),i=await u.appleAuth(e,t,p()??void 0,r);o(i.token),n(i.user),(0,m.identifyUser)(i.user),y(i.user.id),O("apple"),i.is_new&&((0,m.captureEvent)("signup_completed",{provider:"apple",pseo_material_id:i.pseo_material_id??null}),g({event:"sign_up",method:"apple"})),w(i,r)};function w(e,t){if(e.pseo_material_id){let r=new URLSearchParams({material_id:String(e.pseo_material_id)});t&&r.set("from_pseo",t),h.push(`/paywall?${r.toString()}`);return}e.is_new||!e.user.onboarding_completed?h.push("/onboarding"):h.push("/dashboard")}return(0,t.jsx)(P.Provider,{value:{user:a,loading:l,login:b,loginWithApple:_,loginWithToken:e=>{o(e),u.getMe().then(e=>{n(e.user),(0,m.identifyUser)(e.user),e.user.onboarding_completed?h.push("/dashboard"):h.push("/onboarding")})},logout:()=>{s(),n(null),(0,m.resetPostHog)()},refreshUser:S},children:e})}function T(){let e=(0,r.useContext)(P);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e}e.s(["AuthProvider",()=>$,"useAuth",()=>T],42932)},11193,e=>{"use strict";let t="kibin_admin_token",r="kibin_impersonation_target",i="kibin_token";function a(e,a){let n=localStorage.getItem(i);n&&localStorage.setItem(t,n),localStorage.setItem(i,e),localStorage.setItem(r,JSON.stringify(a)),window.location.href="/dashboard"}function n(){let e=localStorage.getItem(t);e?localStorage.setItem(i,e):localStorage.removeItem(i),localStorage.removeItem(t),localStorage.removeItem(r),window.location.href="/admin"}function o(){return!!localStorage.getItem(t)}function s(){let e=localStorage.getItem(r);if(!e)return null;try{return JSON.parse(e)}catch{return null}}e.s(["exitImpersonation",()=>n,"getImpersonationTarget",()=>s,"isImpersonating",()=>o,"startImpersonation",()=>a])},90318,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var i={cancelIdleCallback:function(){return o},requestIdleCallback:function(){return n}};for(var a in i)Object.defineProperty(r,a,{enumerable:!0,get:i[a]});let n="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},o="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77878,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={default:function(){return b},handleClientScriptLoad:function(){return h},initScriptLoader:function(){return y}};for(var a in i)Object.defineProperty(r,a,{enumerable:!0,get:i[a]});let n=e.r(35856),o=e.r(61909),s=e.r(48277),l=n._(e.r(69941)),u=o._(e.r(30668)),d=e.r(98084),c=e.r(78436),p=e.r(90318),m=new Map,f=new Set,g=e=>{let{src:t,id:r,onLoad:i=()=>{},onReady:a=null,dangerouslySetInnerHTML:n,children:o="",strategy:s="afterInteractive",onError:u,stylesheets:d}=e,p=r||t;if(p&&f.has(p))return;if(m.has(t)){f.add(p),m.get(t).then(i,u);return}let g=()=>{a&&a(),f.add(p)},h=document.createElement("script"),y=new Promise((e,t)=>{h.addEventListener("load",function(t){e(),i&&i.call(this,t),g()}),h.addEventListener("error",function(e){t(e)})}).catch(function(e){u&&u(e)});n?(h.innerHTML=n.__html||"",g()):o?(h.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):"",g()):t&&(h.src=t,m.set(t,y)),(0,c.setAttributesFromProps)(h,e),"worker"===s&&h.setAttribute("type","text/partytown"),h.setAttribute("data-nscript",s),d&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(d),document.body.appendChild(h)};function h(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>g(e))}):g(e)}function y(e){e.forEach(h),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}function S(e){let{id:t,src:r="",onLoad:i=()=>{},onReady:a=null,strategy:n="afterInteractive",onError:o,stylesheets:c,...m}=e,{updateScripts:h,scripts:y,getIsSsr:S,appDir:b,nonce:_}=(0,u.useContext)(d.HeadManagerContext);_=m.nonce||_;let w=(0,u.useRef)(!1);(0,u.useEffect)(()=>{let e=t||r;w.current||(a&&e&&f.has(e)&&a(),w.current=!0)},[a,t,r]);let O=(0,u.useRef)(!1);if((0,u.useEffect)(()=>{if(!O.current){if("afterInteractive"===n)g(e);else"lazyOnload"===n&&("complete"===document.readyState?(0,p.requestIdleCallback)(()=>g(e)):window.addEventListener("load",()=>{(0,p.requestIdleCallback)(()=>g(e))}));O.current=!0}},[e,n]),("beforeInteractive"===n||"worker"===n)&&(h?(y[n]=(y[n]||[]).concat([{id:t,src:r,onLoad:i,onReady:a,onError:o,...m,nonce:_}]),h(y)):S&&S()?f.add(t||r):S&&!S()&&g({...e,nonce:_})),b){if(c&&c.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===n)if(!r)return m.dangerouslySetInnerHTML&&(m.children=m.dangerouslySetInnerHTML.__html,delete m.dangerouslySetInnerHTML),(0,s.jsx)("script",{nonce:_,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([0,{...m,id:t}])})`}});else return l.default.preload(r,m.integrity?{as:"script",integrity:m.integrity,nonce:_,crossOrigin:m.crossOrigin}:{as:"script",nonce:_,crossOrigin:m.crossOrigin}),(0,s.jsx)("script",{nonce:_,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([r,{...m,id:t}])})`}});"afterInteractive"===n&&r&&l.default.preload(r,m.integrity?{as:"script",integrity:m.integrity,nonce:_,crossOrigin:m.crossOrigin}:{as:"script",nonce:_,crossOrigin:m.crossOrigin})}return null}Object.defineProperty(S,"__nextScript",{value:!0});let b=S;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},71014,e=>{"use strict";var t=e.i(30668);let r=(0,t.createContext)(null);function i({clientId:e,nonce:i,locale:a,onScriptLoadSuccess:n,onScriptLoadError:o,children:s}){let l=function(e={}){let{nonce:r,locale:i,onScriptLoadSuccess:a,onScriptLoadError:n}=e,[o,s]=(0,t.useState)(!1),l=(0,t.useRef)(a);l.current=a;let u=(0,t.useRef)(n);return u.current=n,(0,t.useEffect)(()=>{let e=document.createElement("script");return e.src="https://accounts.google.com/gsi/client",i&&(e.src+=`?hl=${i}`),e.async=!0,e.defer=!0,e.nonce=r,e.onload=()=>{var e;s(!0),null==(e=l.current)||e.call(l)},e.onerror=()=>{var e;s(!1),null==(e=u.current)||e.call(u)},document.body.appendChild(e),()=>{document.body.removeChild(e)}},[r]),o}({nonce:i,onScriptLoadSuccess:n,onScriptLoadError:o,locale:a}),u=(0,t.useMemo)(()=>({locale:a,clientId:e,scriptLoadedSuccessfully:l}),[e,l]);return t.default.createElement(r.Provider,{value:u},s)}function a({flow:e="implicit",scope:i="",onSuccess:a,onError:n,onNonOAuthError:o,overrideScope:s,state:l,...u}){let{clientId:d,scriptLoadedSuccessfully:c}=function(){let e=(0,t.useContext)(r);if(!e)throw Error("Google OAuth components must be used within GoogleOAuthProvider");return e}(),p=(0,t.useRef)(),m=(0,t.useRef)(a);m.current=a;let f=(0,t.useRef)(n);f.current=n;let g=(0,t.useRef)(o);g.current=o,(0,t.useEffect)(()=>{var t,r;if(!c)return;let a="implicit"===e?"initTokenClient":"initCodeClient";p.current=null==(r=null==(t=null==window?void 0:window.google)?void 0:t.accounts)?void 0:r.oauth2[a]({client_id:d,scope:s?i:`openid profile email ${i}`,callback:e=>{var t,r;if(e.error)return null==(t=f.current)?void 0:t.call(f,e);null==(r=m.current)||r.call(m,e)},error_callback:e=>{var t;null==(t=g.current)||t.call(g,e)},state:l,...u})},[d,c,e,i,l]);let h=(0,t.useCallback)(e=>{var t;return null==(t=p.current)?void 0:t.requestAccessToken(e)},[]),y=(0,t.useCallback)(()=>{var e;return null==(e=p.current)?void 0:e.requestCode()},[]);return"implicit"===e?h:y}e.s(["GoogleOAuthProvider",()=>i,"useGoogleLogin",()=>a])},96282,e=>{"use strict";e.i(39057);var t=e.i(48277),r=e.i(71014),i=e.i(42932),a=e.i(30668),n=e.i(11193);function o(){let[e,r]=(0,a.useState)(!1),[i,o]=(0,a.useState)(null);return((0,a.useEffect)(()=>{r((0,n.isImpersonating)()),o((0,n.getImpersonationTarget)())},[]),e)?(0,t.jsx)("div",{className:"sticky top-0 z-[100] w-full bg-red-600 text-white text-sm",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-2 flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("svg",{className:"w-4 h-4 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M5.07 19h13.86c1.54 0 2.5-1.67 1.73-3L13.73 4a2 2 0 00-3.46 0L3.34 16c-.77 1.33.19 3 1.73 3z"})}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Impersonating"}),i?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("span",{className:"font-mono",children:i.email})," ",(0,t.jsxs)("span",{className:"opacity-80",children:["(id ",i.id," · plan ",i.plan,")"]})]}):" another user"]})]}),(0,t.jsx)("button",{onClick:n.exitImpersonation,className:"shrink-0 px-3 py-1 rounded-md bg-white/15 hover:bg-white/25 font-semibold transition-colors",children:"Exit"})]})}):null}var s=e.i(33170);function l({children:e}){return(0,a.useEffect)(()=>{(0,s.initPostHog)()},[]),(0,t.jsx)(r.GoogleOAuthProvider,{clientId:"1061739262573-31b1h10pche3v31nfm9s9fg6jgurv2q0.apps.googleusercontent.com",children:(0,t.jsxs)(i.AuthProvider,{children:[(0,t.jsx)(o,{}),e]})})}e.s(["Providers",()=>l],96282)}]);

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.