PageSourceSearch

https://pepys.co/_next/static/immutable/chunks/1a7c2zwijsiog.js

js pepys.co collected 2026-09-24 13:44:27 UTC 46,706 bytes, 13 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,162400,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(174080),i=e.i(491967),o=e.i(672136),a=e.i(375602);function s(e){let{image:n,name:i,size:o=32,className:a}=e,[s,l]=(0,r.useState)(!1);if(n&&!s)return(0,t.jsx)("img",{src:n,alt:"",referrerPolicy:"no-referrer",onError:()=>l(!0),style:{width:o,height:o},className:`shrink-0 rounded-full object-cover ${a??""}`});let c=(i?.trim()?.[0]??"?").toUpperCase();return(0,t.jsx)("span",{"aria-hidden":!0,style:{width:o,height:o,fontSize:Math.round(.42*o)},className:`flex shrink-0 items-center justify-center rounded-full bg-accent font-semibold text-white ${a??""}`,children:c})}function l(e){let{className:r=""}=e;return(0,t.jsx)("span",{"aria-hidden":"true",className:`inline-block aspect-square animate-spin rounded-full border-2 border-current border-r-transparent motion-reduce:animate-none ${r}`})}function c(e){let{className:n,children:i,callbackURL:o}=e,[a,s]=(0,r.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>s(!0),className:n??"rounded-full bg-accent px-4 py-1.5 text-sm font-semibold text-white outline-none transition duration-150 ease-out hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-canvas motion-safe:active:scale-[0.97]",children:i??"Sign in"}),a&&(0,t.jsx)(h,{onClose:()=>s(!1),callbackURL:o})]})}let d="w-full rounded-xl border border-line bg-canvas px-3.5 py-2.5 text-sm text-ink outline-none transition duration-150 ease-out placeholder:text-muted focus:border-accent focus:ring-2 focus:ring-accent/30",u="pepys:last-auth-method",m=["google","microsoft","email","magic"];function p(e){try{localStorage.setItem(u,e)}catch{}}function f(){return(0,t.jsx)("span",{className:"pointer-events-none absolute -top-2 right-3 rounded-full bg-ink px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-canvas",children:"Last used"})}function h(e){let{onClose:s,onSuccess:c,initialMode:h="in",pitch:b,source:v,callbackURL:y}=e,[w,_]=(0,r.useState)(h),[N,j]=(0,r.useState)(""),[k,E]=(0,r.useState)(""),[C,S]=(0,r.useState)(null),[R,I]=(0,r.useState)(null),A=null!==R,[P,T]=(0,r.useState)(!1),[O,U]=(0,r.useState)("link"),[M,L]=(0,r.useState)(null);async function D(e){e.preventDefault(),I("email"),S(null);let{data:t,error:r}="in"===w?await o.signIn.email({email:N,password:k}):await o.signUp.email({email:N,password:k,name:N.split("@")[0],callbackURL:F});if(r){I(null),S(r.message??"Something went wrong. Try again.");return}if("in"!==w&&!t?.token){p("email"),(0,a.gaEvent)("sign_up",{method:"email"}),I(null),U("verify"),T(!0);return}p("email"),"in"!==w&&(0,a.gaEvent)("sign_up",{method:"email"}),c?(c(),s()):window.location.href=F}(0,r.useEffect)(()=>L(function(){try{let e=localStorage.getItem(u);return e&&m.includes(e)?e:null}catch{return null}}()),[]),(0,r.useEffect)(()=>{i.posthog.capture("auth_modal_opened",{source:v??"unknown",initial_mode:h})},[]),(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&s()};document.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=t}},[s]);let F=y??(c?window.location.href:"/dashboard");async function B(){S(null),I("google"),p("google");let{error:e}=await o.signIn.social({provider:"google",callbackURL:F});e&&(I(null),S(e.message??"Google sign-in failed."))}async function z(){S(null),I("microsoft"),p("microsoft");let{error:e}=await o.signIn.social({provider:"microsoft",callbackURL:F});e&&(I(null),S(e.message??"Microsoft sign-in failed."))}async function H(){if(!N)return void S("Enter your email first.");I("magic"),S(null);let{error:e}
1=await o.signIn.magicLink({email:N,callbackURL:F});(I(null),e)?S(e.message??"Couldn't send the link. Try again."):(p("magic"),T(!0))}return(0,n.createPortal)((0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Sign in or create an account",onClick:s,className:"fixed inset-0 z-50 grid place-items-center bg-ink/40 p-4 motion-safe:animate-[fadeIn_150ms_ease-out]",children:[(0,t.jsx)("style",{children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}"}),(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"w-full max-w-sm rounded-2xl border border-line bg-surface p-6 shadow-[0_24px_70px_-20px_rgba(70,45,25,0.40)]",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-3",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-ink",children:"in"===w?"Welcome back":b?.title??"Create your account"}),(0,t.jsx)("button",{type:"button","aria-label":"Close",onClick:s,className:"-mr-1 -mt-1 rounded-md p-1 text-muted outline-none transition hover:text-ink focus-visible:ring-2 focus-visible:ring-accent",children:(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),P?(0,t.jsxs)("div",{className:"space-y-3 py-2 text-center",children:[(0,t.jsx)("div",{className:"mx-auto grid size-10 place-items-center rounded-full bg-accent-soft text-accent",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 6h16v12H4z"}),(0,t.jsx)("path",{d:"m4 7 8 6 8-6"})]})}),(0,t.jsxs)("p",{className:"text-sm text-ink",children:["verify"===O?"Check your inbox – we sent a confirmation link to":"Check your inbox – we sent a sign-in link to"," ",(0,t.jsx)("strong",{className:"font-medium",children:N}),"."]}),(0,t.jsx)("p",{className:"text-xs text-muted",children:"verify"===O?"Click it to finish creating your account. You'll pick up right where you left off.":"It expires soon and can be used once."}),(0,t.jsx)("button",{type:"button",onClick:()=>{T(!1),S(null)},className:"text-sm font-medium text-accent outline-none hover:underline",children:"Use a different method"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mb-4 text-sm text-muted",children:"in"===w?"Sign in to your transcripts and credits.":b?.sub??"Start with free credits – no card required."}),(0,t.jsxs)("button",{type:"button",onClick:B,disabled:A,"aria-busy":"google"===R,className:"relative flex w-full items-center justify-center gap-2.5 rounded-xl border border-line bg-canvas px-4 py-2.5 text-sm font-medium text-ink outline-none transition duration-150 ease-out hover:bg-band focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-60 motion-safe:active:scale-[0.99]",children:["google"===M&&(0,t.jsx)(f,{}),"google"===R?(0,t.jsx)(l,{className:"size-4"}):(0,t.jsx)(x,{}),"google"===R?"Connecting…":"Continue with Google"]}),(0,t.jsxs)("button",{type:"button",onClick:z,disabled:A,"aria-busy":"microsoft"===R,className:"relative mt-2 flex w-full items-center justify-center gap-2.5 rounded-xl border border-line bg-canvas px-4 py-2.5 text-sm font-medium text-ink outline-none transition duration-150 ease-out hover:bg-band focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-60 motion-safe:active:scale-[0.99]",children:["microsoft"===M&&(0,t.jsx)(f,{}),"microsoft"===R?(0,t.jsx)(l,{className:"size-4"}):(0,t.jsx)(g,{}),"microsoft"===R?"Connecting…":"Continue with Microsoft"]}),(0,t.jsxs)("div",{className:"my-3 flex items-center gap-3 text-xs font-medium uppercase tracking-wider text-muted",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-line"}),"or",(0,t.jsx)("span",{className:"h-px flex-1 bg-line"})]}),(0,t.jsxs)("form",{onSubmit:D,className:"space-y-2.5",children:[(0,t.jsx)("input",{type:"email",required:!0,placeholder:"[email protected]",value:N,onChange:e=>j(e.target.value),className:d}),(0,t.jsx)("input",{type:"password",required:!0,minLength:8,placeholder:"in"===w?"Password":"Create a password (8+ characters)",value:k,onChange:e=>E(e.target.value),className:d}),(0,t.jsxs)("button",{disabled:A,"aria-busy":"email"===R,className:"relative flex w-full items-center justify-center gap-2 rounded-xl bg-accent px-4 py-2.5 text-sm font-semibold text-white outline-none transition duration-150 ease-out hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:bg-accent/70 motion-safe:active:scale-[0.99]",children:["email"===M&&(0,t.jsx)(f,{}),"email"===R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l,{className:"size-4"}),"in"===w?"Signing in…":"Creating account…"]}):"in"===w?"Sign in":"Create account"]})]}),(0,t.jsxs)("button",{type:"button",onClick:H,disabled:A,"aria-busy":"magic"===R,className:"relative mt-2 flex w-full items-center justify-center gap-2 rounded-xl border border-line bg-canvas px-4 py-2.5 text-sm font-medium text-ink outline-none transition duration-150 ease-out hover:bg-band focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-60",children:["magic"===M&&(0,t.jsx)(f,{}),"magic"===R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l,{className:"size-4"}),"Sending link…"]}):"Email me a sign-in link instead"]}),(0,t.jsxs)("p",{className:"mt-4 text-center text-sm text-muted",children:["in"===w?"New to Pepys? ":"Already have an account? ",(0,t.jsx)("button",{type:"button",onClick:()=>{_("in"===w?"up":"in"),S(null)},className:"font-medium text-accent outline-none hover:underline focus-visible:underline",children:"in"===w?"Create an account":"Sign in"})]})]}),C&&(0,t.jsx)("p",{role:"alert","aria-live":"polite",className:"mt-3 rounded-lg bg-accent-soft px-3 py-2 text-sm font-medium text-ink",children:C})]})]}),document.body)}function g(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 23 23","aria-hidden":"true",className:"shrink-0",children:[(0,t.jsx)("path",{fill:"#F25022",d:"M1 1h10v10H1z"}),(0,t.jsx)("path",{fill:"#7FBA00",d:"M12 1h10v10H12z"}),(0,t.jsx)("path",{fill:"#00A4EF",d:"M1 12h10v10H1z"}),(0,t.jsx)("path",{fill:"#FFB900",d:"M12 12h10v10H12z"})]})}function x(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 18 18","aria-hidden":"true",className:"shrink-0",children:[(0,t.jsx)("path",{fill:"#4285F4",d:"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.81.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.02-3.7H.96v2.33A9 9 0 0 0 9 18z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M3.98 10.72a5.4 5.4 0 0 1 0-3.44V4.95H.96a9 9 0 0 0 0 8.1l3.02-2.33z"}),(0,t.jsx)("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.47.89 11.43 0 9 0A9 9 0 0 0 .96 4.95l3.02 2.33C4.68 5.16 6.66 3.58 9 3.58z"})]})}e.s(["AuthBar",0,function(){let{signInLabel:e="Sign in",signOutLabel:n="Sign out"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:i,isPending:a}=(0,o.useSession)(),[d,u]=(0,r.useState)(!1);return((0,r.useEffect)(()=>u(!0),[]),!d||a)?(0,t.jsxs)("span",{className:"inline-flex items-center text-muted",children:[(0,t.jsx)(l,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading your account…"})]}):i?(0,t.jsxs)("div",{className:"flex items-center gap-2.5 text-sm",children:[(0,t.jsx)(s,{image:i.user.image,name:i.user.email,size:28}),(0,t.jsx)("span",{title:i.user.email,className:"hidden max-w-[14rem] truncate text-muted sm:inline",children:i.user.email}),(0,t.jsx)("button",{onClick:()=>(0,o.signOut)(),className:"rounded-full border border-line px-3.5 py-1.5 font-medium text-ink outline-none transition duration-150 ease-out hover:bg-band focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-canvas motion-safe:active:scale-[0.97]",children:n})]}):(0,t.jsx)(c,{children:e})},"AuthModal",0,h,"SignInButton",0,c],162400)},350375,984891,346138,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(491967);let i=/^[A-Za-z0-9_-]{1,200}$/,o=/^[A-Za-z0-9_-]{1,300}$/;e.s(["MAX_DRIVE_IMPORT_FILES",0,10,"parseDriveUrl",0,function(e){let t;if(!e||e.length>4096)return null;try{t=new URL(e.trim())}catch{return null}if("https:"!==t.protocol||t.username||t.password)return null;let r=t.hostname.toLowerCase();if("drive.google.com"===r){let e=t.pathname.match(/^\/file\/d\/([^/]+)/),r=e?.[1]??t.searchParams.get("id")??"";if(!i.test(r))return null;let n=t.searchParams.get("resourcekey")??void 0;return n&&!o.test(n)?null:{provider:"google_drive",itemId:r,...n?{resourceKey:n}:{}}}return"1drv.ms"===r||"onedrive.live.com"===r||r.endsWith(".sharepoint.com")?(t.hash="",{provider:"microsoft_drive",url:t.toString()}):null}],984891);let a=null;function s(){return a||(a=new Promise((e,t)=>
1{let r=window,n=()=>{if(!r.gapi)return t(Error("Google Picker could not load."));r.gapi.load("picker",{callback:e,onerror:()=>t(Error("Google Picker could not load."))})};if(r.gapi)return n();let i=document.querySelector('script[data-pepys-google-picker="true"]');if(i){i.addEventListener("load",n,{once:!0}),i.addEventListener("error",()=>t(Error("Google Picker could not load.")),{once:!0});return}let o=document.createElement("script");o.src="https://apis.google.com/js/api.js",o.async=!0,o.dataset.pepysGooglePicker="true",o.addEventListener("load",n,{once:!0}),o.addEventListener("error",()=>t(Error("Google Picker could not load.")),{once:!0}),document.head.appendChild(o)}))}async function l(e){await s();let t=window.google?.picker;if(!t)throw Error("Google Picker could not load.");let r=new t.DocsView;r.setIncludeFolders(!0),r.setSelectFolderEnabled(!0),r.setMimeTypes("application/vnd.google-apps.folder"),new t.PickerBuilder().addView(r).setAppId(e.appId).setDeveloperKey(e.apiKey).setOAuthToken(e.accessToken).setCallback(r=>{let n=r.docs?.[0];r.action===t.Action.PICKED&&n&&e.onPicked(n)}).build().setVisible(!0)}async function c(e){await s();let t=window.google?.picker;if(!t)throw Error("Google Picker could not load.");let r=new t.DocsView;r.setIncludeFolders(!1),r.setSelectFolderEnabled(!1),r.setMimeTypes("audio/aac,audio/flac,audio/mp4,audio/mpeg,audio/ogg,audio/wav,audio/webm,video/mp4,video/mpeg,video/quicktime,video/webm,video/x-matroska,video/x-msvideo");let n=new t.PickerBuilder().addView(r);e.multiselect&&(n=n.enableFeature(t.Feature.MULTISELECT_ENABLED)),n.setAppId(e.appId).setDeveloperKey(e.apiKey).setOAuthToken(e.accessToken).setCallback(r=>{r.action===t.Action.PICKED?e.onPicked(r.docs??[]):t.Action.CANCEL&&r.action===t.Action.CANCEL&&e.onCancel?.()}).build().setVisible(!0)}async function d(e){return await e.json().catch(()=>({}))}function u(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"size-4","aria-hidden":"true",children:[(0,t.jsx)("path",{fill:"#0F9D58",d:"M8.6 3h6.8l5.4 9.3-3.4 5.9L8.6 3Z"}),(0,t.jsx)("path",{fill:"#4285F4",d:"M3.2 12.3 6.6 6.4h6.8L6.6 18.2l-3.4-5.9Z"}),(0,t.jsx)("path",{fill:"#F4B400",d:"m6.6 18.2 3.4-5.9h10.8l-3.4 5.9H6.6Z"})]})}async function m(e){return await e.json().catch(()=>({}))}function p(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"size-4","aria-hidden":"true",children:[(0,t.jsx)("path",{fill:"#0078D4",d:"M9.7 7.2a5.3 5.3 0 0 1 9.9 2.1A3.9 3.9 0 0 1 19.1 17H6a4 4 0 0 1-.7-7.9 5.3 5.3 0 0 1 4.4-1.9Z"}),(0,t.jsx)("path",{fill:"#28A8EA",d:"M5.3 9.1A5.4 5.4 0 0 1 15 8a4 4 0 0 1 4.1 9H6a4 4 0 0 1-.7-7.9Z"})]})}e.s(["GoogleDriveIcon",0,u,"GoogleDrivePicker",0,function(e){let{paid:i,disabled:o,diarize:a,onJobStarted:s,onError:l,onUpgrade:m}=e,[p,f]=(0,r.useState)(null),[h,g]=(0,r.useState)(!1);async function x(){n.posthog.capture("drive_connection_clicked",{surface:"uploader"});let e=await fetch("/api/integrations/google/connect",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({returnPath:window.location.pathname})}),t=await d(e);if(!e.ok||"string"!=typeof t.authorizationUrl)throw Error("string"==typeof t.error?t.error:"Google Drive could not connect.");window.location.assign(t.authorizationUrl)}async function b(e){let t=e.filter(e=>"string"==typeof e.id).map(e=>({id:e.id,...e.resourceKey?{resourceKey:e.resourceKey}:{}}));if(!t.length)return;if(t.length>10)throw Error("Choose up to 10 Google Drive files at a time.");n.posthog.capture("drive_import_submitted",{surface:"uploader",file_count:t.length});let r=await fetch("/api/integrations/google/import",{method:"POST",headers:{"content-type":"application/json","idempotency-key":crypto.randomUUID()},body:JSON.stringify({items:t,diarize:a})}),i=await d(r),o=Array.isArray(i.jobIds)?i.jobIds.filter(e=>"string"==typeof e):[];if(!r.ok||!o.length)throw n.posthog.capture("drive_import_failed",{surface:"uploader",status:r.status,reason:"string"==typeof i.reason?i.reason:"unknown"}),!0===i.upgrade&&m("string"==typeof i.reason?i.reason:void 0),Error("string"==typeof i.error?i.error:"Google Drive import failed.");n.posthog.capture("drive_import_accepted",{surface:"uploader",file_count:o.length}),s(o[0])}async function v(){let e=await fetch("/api/integrations/google/picker-token",{method:"POST"}),t=await d(e);if(!e.ok||"string"!=typeof t.accessToken)throw t.reconnect&&f(e=>e?{...e,connected:!1,status:"reauthorize"}:e),Error("string"==typeof t.error?t.error:"Google Drive could not open.");n.posthog.capture("drive_picker_opened",{surface:"uploader"}
1),await c({apiKey:"AIzaSyDr5KWo8RYi_VjJnu7e2SF_6fVChPqmddQ",appId:"104568774365",accessToken:t.accessToken,multiselect:i,onPicked(e){b(e).catch(e=>l(e instanceof Error?e.message:"Google Drive import failed."))}})}async function y(){g(!0),l("");try{p?.connected?await v():await x()}catch(e){l(e instanceof Error?e.message:"Google Drive could not open.")}finally{g(!1)}}if((0,r.useEffect)(()=>{let e=!0;return fetch("/api/integrations/google",{cache:"no-store"}).then(async t=>{e&&t.ok&&f(await t.json())}).catch(()=>{}),()=>{e=!1}},[]),!p||!1===p.configured)return null;let w=p?.status==="reauthorize",_=p?.connected?"Choose from Google Drive":w?"Reconnect Google Drive":"Connect Google Drive";return(0,t.jsxs)("button",{type:"button",disabled:o||h,onClick:()=>void y(),className:"flex w-full items-center justify-center gap-2 rounded-xl border border-line bg-surface px-4 py-2.5 text-sm font-semibold text-ink transition-[border-color,background-color,transform] duration-150 hover:border-accent/50 hover:bg-accent-soft/35 active:scale-[0.99] disabled:cursor-not-allowed disabled:opacity-55 motion-reduce:transition-none",children:[(0,t.jsx)(u,{}),h?"Opening Google Drive…":_]})},"openGoogleDriveFilePicker",0,c,"openGoogleDriveFolderPicker",0,l],350375),e.s(["MicrosoftDriveBrowser",0,function(e){let{paid:i,disabled:o,diarize:a,onJobStarted:s,onError:l,onUpgrade:c=()=>{},mode:d="files",onFolderSelected:u}=e,[f,h]=(0,r.useState)(null),[g,x]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!1),[y,w]=(0,r.useState)([]),[_,N]=(0,r.useState)([]),[j,k]=(0,r.useState)([{id:"root",name:"My files"}]),[E,C]=(0,r.useState)(""),S=i?10:1;async function R(){n.posthog.capture("drive_connection_clicked",{provider:"microsoft_drive",surface:"uploader"});let e=await fetch("/api/integrations/microsoft/connect",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({returnPath:window.location.pathname})}),t=await m(e);if(!e.ok||"string"!=typeof t.authorizationUrl)throw Error("string"==typeof t.error?t.error:"OneDrive could not connect.");window.location.assign(t.authorizationUrl)}async function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(!0);try{let t=new URLSearchParams;e.query?t.set("query",e.query):t.set("parentId",e.parentId??j.at(-1)?.id??"root");let r=await fetch(`/api/integrations/microsoft/items?${t}`,{cache:"no-store"}),n=await r.json().catch(()=>({}));if(!r.ok)throw n.reconnect&&h(e=>e?{...e,connected:!1,status:"reauthorize"}:e),Error(n.error||"OneDrive could not load files.");w(n.items??[]),N([])}finally{v(!1)}}async function A(){l("");try{if(!f?.connected)return await R();x(!0),n.posthog.capture("drive_picker_opened",{provider:"microsoft_drive",surface:"uploader"}),await I({parentId:"root"})}catch(e){l(e instanceof Error?e.message:"OneDrive could not open.")}}async function P(e){k(t=>[...t,{id:e.id,name:e.name}]),C(""),await I({parentId:e.id})}async function T(){if(_.length){v(!0),n.posthog.capture("drive_import_submitted",{provider:"microsoft_drive",surface:"uploader",file_count:_.length});try{let e=await fetch("/api/integrations/microsoft/import",{method:"POST",headers:{"content-type":"application/json","idempotency-key":crypto.randomUUID()},body:JSON.stringify({items:_.map(e=>({id:e})),diarize:a})}),t=await m(e),r=Array.isArray(t.jobIds)?t.jobIds.filter(e=>"string"==typeof e):[];if(!e.ok||!r.length)throw!0===t.upgrade&&(c("string"==typeof t.reason?t.reason:void 0),x(!1)),Error("string"==typeof t.error?t.error:"OneDrive import failed.");n.posthog.capture("drive_import_accepted",{provider:"microsoft_drive",surface:"uploader",file_count:r.length}),x(!1),s?.(r[0])}catch(e){n.posthog.capture("drive_import_failed",{provider:"microsoft_drive",surface:"uploader"}),l(e instanceof Error?e.message:"OneDrive import failed.")}finally{v(!1)}}}if((0,r.useEffect)(()=>{let e=!0;return fetch("/api/integrations/microsoft",{cache:"no-store"}).then(async t=>{e&&t.ok&&h(await t.json())}).catch(()=>{}),()=>{e=!1}},[]),!f||!1===f.configured)return null;let O="reauthorize"===f.status,U=f.connected?"folder"===d?"Import a folder":"Choose from OneDrive":O?"Reconnect OneDrive":"Connect OneDrive";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",disabled:o||b,onClick:()=>void A(),className:"folder"===d?"flex items-center justify-center gap-2 rounded-full border border-accent/40 bg-accent-soft/35 px-3 py-1.5 text-xs font-semibold text-accent transition hover:border-accent disabled:cursor-not-allowed disabled:opacity-55":"flex w-full items-center justify-center gap-2 rounded-xl border border-line bg-surface px-4 py-2.5 text-sm font-semibold text-ink transition-[border-color,background-color,transform] duration-150 hover:border-accent/50 hover:bg-accent-soft/35 active:scale-[0.99] disabled:cursor-not-allowed disabled:opacity-55 motion-reduce:transition-none",children:["folder"!==d&&(0,t.jsx)(p,{}),b?"Opening OneDrive…":U]}),g&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/45 p-0 sm:items-center sm:p-6",role:"dialog","aria-modal":"true","aria-labelledby":"onedrive-browser-title",children:(0,t.jsxs)("div",{className:"flex max-h-[88dvh] w-full max-w-2xl flex-col rounded-t-2xl bg-surface shadow-2xl sm:rounded-2xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-line px-4 py-3 sm:px-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{id:"onedrive-browser-title",className:"font-semibold text-ink",children:"Choose from OneDrive"}),(0,t.jsx)("p",{className:"text-xs text-muted",children:"files"===d?"Select files, then start transcription":"Choose a folder to watch for new recordings"})]}),(0,t.jsx)("button",{type:"button","aria-label":"Close OneDrive browser",onClick:()=>x(!1),className:"rounded-full p-2 text-muted hover:bg-canvas hover:text-ink",children:"✕"})]}),(0,t.jsxs)("form",{className:"flex gap-2 border-b border-line p-4",onSubmit:e=>{e.preventDefault(),I(E.trim()?{query:E.trim()}:{parentId:j.at(-1)?.id})},children:[(0,t.jsx)("input",{"aria-label":"Search OneDrive",value:E,onChange:e=>C(e.target.value),placeholder:"Search recordings",maxLength:100,className:"min-w-0 flex-1 rounded-xl border border-line bg-canvas px-3 py-2 text-sm text-ink outline-none focus:border-accent"}),(0,t.jsx)("button",{type:"submit",disabled:b,className:"rounded-xl border border-line px-4 text-sm font-semibold text-ink disabled:opacity-50",children:"Search"})]}),(0,t.jsx)("div",{className:"flex gap-1 overflow-x-auto border-b border-line px-4 py-2 text-xs text-muted",children:j.map((e,r)=>(0,t.jsxs)("button",{type:"button",onClick:()=>{k(j.slice(0,r+1)),C(""),I({parentId:e.id})},className:"whitespace-nowrap hover:text-ink",children:[r?" / ":"",e.name]},e.id))}),(0,t.jsx)("div",{className:"min-h-48 flex-1 overflow-y-auto p-2 sm:min-h-80",children:b?(0,t.jsx)("p",{className:"p-4 text-sm text-muted",children:"Loading…"}):y.length?y.map(e=>e.isFolder?(0,t.jsxs)("button",{type:"button",onClick:()=>void P(e),className:"flex w-full items-center gap-3 rounded-xl px-3 py-3 text-left hover:bg-canvas",children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"📁"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-ink",children:e.name}),(0,t.jsx)("span",{className:"text-muted",children:"›"})]},e.id):"files"===d?(0,t.jsxs)("label",{className:`flex cursor-pointer items-center gap-3 rounded-xl px-3 py-3 transition-colors ${_.includes(e.id)?"bg-accent-soft/60":"hover:bg-canvas"}`,children:[(0,t.jsx)("input",{type:"checkbox",checked:_.includes(e.id),disabled:i&&!_.includes(e.id)&&_.length>=S,onChange:()=>(function(e){let t=_.includes(e);if(!t&&_.length>=S){i||(n.posthog.capture("premium_gate_hit",{feature:"connected_source_multiselect",provider:"microsoft_drive",surface:"picker",trigger:"second_selection"}),c("free_drive_batch_limit"),x(!1));return}N(r=>t?r.filter(t=>t!==e):[...r,e])})(e.id)}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-ink",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted",children:[Math.max(1,Math.round(e.size/1e6))," MB"]})]},e.id):null):(0,t.jsx)("p",{className:"p-4 text-sm text-muted",children:"folder"===d?"No folders here.":"No audio or video files here."})}),"files"===d?(0,t.jsxs)("div",{className:"sticky bottom-0 flex items-center justify-between gap-3 border-t border-line bg-surface p-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted",children:_.length?
1i?`${_.length} ${1===_.length?"file":"files"} ready`:"1 file ready. Select another to unlock Pro.":i?"Select up to 10 files":"Select 1 file on Free"}),(0,t.jsx)("button",{type:"button",disabled:b||!_.length,onClick:()=>void T(),className:"rounded-full bg-accent px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:_.length?b?"Starting…":1===_.length?"Transcribe 1 file":`Transcribe ${_.length} files`:"Select files"})]}):(0,t.jsxs)("div",{className:"sticky bottom-0 flex items-center justify-between gap-3 border-t border-line bg-surface p-4",children:[(0,t.jsxs)("p",{className:"min-w-0 truncate text-xs text-muted",children:["Watch ",j.at(-1)?.name]}),(0,t.jsx)("button",{type:"button",disabled:b,onClick:()=>{let e=j.at(-1);e&&u?.(e),x(!1)},className:"rounded-full bg-accent px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"Use this folder"})]})]})})]})},"OneDriveIcon",0,p],346138)},974367,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n="cubic-bezier(0.16, 1, 0.3, 1)";e.s(["default",0,function(e){let{children:i,delay:o=0,className:a}=e,s=(0,r.useRef)(null),[l,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=null,t=null,r=t=>{e=window.requestAnimationFrame(t)},n=()=>{null!==e&&window.cancelAnimationFrame(e),null!==t&&window.clearTimeout(t)};if("function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(()=>p(!0)),n;let i=s.current;if(!i)return;if(i.getBoundingClientRect().top<=window.innerHeight)return r(()=>{c(!0),u(!0)}),n;if(r(()=>c(!0)),"u"<typeof IntersectionObserver)return e=window.requestAnimationFrame(()=>u(!0)),n;let o=new IntersectionObserver((e,r)=>{for(let n of e)(n.isIntersecting||n.boundingClientRect.top<0)&&(u(!0),null!==t&&window.clearTimeout(t),r.unobserve(n.target))},{rootMargin:"0px 0px -10% 0px"});return o.observe(i),t=window.setTimeout(()=>{u(!0),o.disconnect()},1800),()=>{n(),o.disconnect()}},[]),(0,t.jsx)("div",{ref:s,className:a,style:l&&!m?{opacity:+!!d,transform:d?"translateY(0)":"translateY(12px)",transition:`opacity 600ms ${n}, transform 600ms ${n}`,transitionDelay:o?`${o}ms`:void 0,willChange:"opacity, transform"}:void 0,children:i})}])},15127,e=>{"use strict";var t=e.i(843476);function r(e){let{className:r}=e;return(0,t.jsx)("svg",{viewBox:"0 0 64 64",className:r,"aria-hidden":"true",focusable:"false",children:(0,t.jsxs)("g",{transform:"translate(10 8.5) scale(0.56)",stroke:"currentColor",strokeLinejoin:"round",strokeLinecap:"round",children:[(0,t.jsx)("path",{d:"M14 70 C26 38 48 18 72 10 C70 36 58 60 32 70 C26 72 19 72 14 70 Z",fill:"none",strokeWidth:"3.6"}),(0,t.jsx)("path",{d:"M22 62 L60 22",fill:"none",strokeWidth:"2.6",opacity:"0.8"}),(0,t.jsx)("path",{d:"M28 56 L40 60 M36 46 L48 50 M44 36 L56 40",fill:"none",strokeWidth:"2.3",opacity:"0.62"}),(0,t.jsx)("path",{d:"M14 70 L8 80 L22 74 Z",fill:"currentColor",stroke:"none"}),(0,t.jsx)("circle",{cx:"7",cy:"80",r:"3.4",className:"fill-coral",stroke:"none"})]})})}e.s(["LogoMark",0,r,"Wordmark",0,function(e){let{className:n,size:i="md"}=e,o=n?.includes("text-")?"":"text-ink";return(0,t.jsxs)("span",{className:`inline-flex items-center gap-2.5 ${o} ${n??""}`,children:[(0,t.jsx)(r,{className:`${"lg"===i?"h-10 w-10":"md"===i?"h-8 w-8":"h-7 w-7"} shrink-0`}),(0,t.jsx)("span",{className:`font-display ${"lg"===i?"text-2xl":"md"===i?"text-xl":"text-base"} font-semibold tracking-tight`,children:"Pepys"})]})}])},486486,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n=[40,70,95,55,80,100,50,72,90,60,96,44,84,64,100,52];function i(e){let{bars:r=n,animated:i=!1,height:o=28,className:a="",barClassName:s="bg-accent/70",decorative:l=!0,label:c="Audio waveform"}=e;return(0,t.jsxs)("div",{className:`flex items-center gap-[3px] ${a}`,style:{height:o},...l?{"aria-hidden":!0}:{role:"img","aria-label":c},children:[i&&(0,t.jsx)("style",{children:`
2          @keyframes pep-wave { 0%,100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
3          @media (prefers-reduced-motion: reduce) {
4            .pep-wave { animation: none !important; transform: scaleY(.5) !important; }
5          }
6        `}),r.map((e,r)=>(0,t.jsx)("span",{className:`w-[3px] origin-center rounded-full ${s} ${i?"pep-wave":""}`,style:{height:`${e}%`,...i?{animation:`pep-wave ${800+r%5*120}ms ease-in-out ${55*r}ms infinite`}:null}},r))]})}let o={extract:"Extracting audio",detect:"Detecting language",transcribe:"Transcribing",diarize:"Labeling speakers",summarize:"Writing summary"},a=new Intl.NumberFormat("en-US");function s(){return(0,t.jsx)("svg",{viewBox:"0 0 16 16",className:"size-2.5",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,
6children:(0,t.jsx)("path",{d:"M3.5 8.5l3 3 6-7"})})}e.s(["default",0,function(e){let n,l,c,{stage:d,pct:u,etaSeconds:m,diarize:p=!1,summarize:f=!0}=e,[h,g]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=Date.now(),t=setInterval(()=>g((Date.now()-e)/1e3),500);return()=>clearInterval(t)},[]);let x=(0,r.useMemo)(()=>{let e=["extract","detect","transcribe"];return p&&e.push("diarize"),f&&e.push("summarize"),e},[p,f]),b=null!=d&&x.includes(d),v="number"==typeof u&&Number.isFinite(u),y=Math.min(x.length-1,Math.floor(h/5)),w=b?x.indexOf(d):y,_=5*x.length+8,N=!b&&!v&&h>_,j=N&&!v;c=v?Math.max(0,Math.min(100,u)):Math.min(92,y/x.length*100+h%5/5*(100/x.length)*.85);let k=Math.floor(40/60*h),E=o[x[w]],C="number"==typeof m&&Number.isFinite(m)&&m>0&&!N;return(0,t.jsxs)("div",{className:"rounded-2xl border border-line bg-surface p-5",children:[(0,t.jsx)("style",{children:`
7        @keyframes ys-pw-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(220%); } }
8        @keyframes ys-pw-breathe { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
9        @media (prefers-reduced-motion: reduce) {
10          .ys-pw-shimmer { animation: none !important; }
11          .ys-pw-breathe { animation: none !important; opacity: 1 !important; }
12        }
13      `}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i,{animated:!0,height:28,className:"shrink-0",barClassName:"bg-accent/70"}),(0,t.jsx)("p",{className:"min-w-0 flex-1 text-sm font-medium text-ink","aria-live":"polite","aria-atomic":"true",children:N?(0,t.jsx)(t.Fragment,{children:"Still transcribing – larger files take a little longer"}):(0,t.jsxs)(t.Fragment,{children:[E,(0,t.jsx)("span",{className:"text-muted",children:"…"}),C&&(0,t.jsxs)("span",{className:"ml-2 font-mono text-xs tabular-nums text-muted",children:["~",Math.round(m),"s left"]})]})}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-xs tabular-nums text-muted",children:(l=Math.floor((n=Math.max(0,Math.floor(h)))/60),`${l}:${(n%60).toString().padStart(2,"0")}`)})]}),(0,t.jsx)("div",{className:"relative mt-4 h-1.5 overflow-hidden rounded-full bg-band",role:"progressbar","aria-label":N?"Still transcribing":E,...j?{"aria-valuetext":"in progress"}:{"aria-valuenow":Math.round(c),"aria-valuemin":0,"aria-valuemax":100},children:j?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-accent/15"}),(0,t.jsx)("div",{className:"ys-pw-shimmer absolute inset-y-0 left-0 w-1/3 rounded-full bg-gradient-to-r from-transparent via-accent to-transparent [animation:ys-pw-shimmer_1.6s_ease-in-out_infinite] motion-reduce:hidden"}),(0,t.jsx)("div",{className:"hidden h-full rounded-full bg-accent/40 motion-reduce:block"})]}):(0,t.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-500 ease-out motion-reduce:transition-none",style:{width:`${c}%`}})}),(0,t.jsx)("ul",{className:"mt-4 flex flex-wrap gap-x-4 gap-y-1.5",children:x.map((e,r)=>{let n=r<w,i=r===w;return(0,t.jsxs)("li",{className:`inline-flex items-center gap-1.5 text-xs ${n?"text-muted":i?"text-ink":"text-muted/50"}`,children:[(0,t.jsx)("span",{"aria-hidden":!0,className:`grid size-3.5 place-items-center rounded-full ${n?"bg-accent text-surface":i?"bg-accent-soft text-accent":"border border-line"}`,children:n?(0,t.jsx)(s,{}):i?(0,t.jsx)("span",{className:"ys-pw-breathe size-1 rounded-full bg-accent [animation:ys-pw-breathe_1.4s_ease-in-out_infinite]"}):null}),o[e]]},e)})}),(0,t.jsxs)("p",{className:"mt-4 text-xs leading-relaxed text-muted",children:["If you were typing this out yourself, you’d be on word"," ",(0,t.jsx)("span",{className:"font-mono font-medium tabular-nums text-accent",children:a.format(k)})," by now – and still going."]})]})}],486486)},676525,e=>{"use strict";var t=e.i(843476);let r={sm:"text-[13px] px-[14px] py-[7px]",md:"text-sm px-[18px] py-[10px]",lg:"text-[15px] px-[26px] py-[13px]"},n="active:scale-[0.97] motion-reduce:active:scale-100",i={primary:"bg-accent text-white hover:bg-accent-hover disabled:bg-band disabled:text-muted "+n,secondary:"bg-surface text-ink border-line hover:bg-band disabled:opacity-50 "+n,ghost:"bg-transparent text-muted hover:text-ink hover:bg-band disabled:opacity-50 "+n,inverted:"bg-canvas text-accent shadow-[3px_3px_0_0_#243f33] hover:bg-surface active:translate-y-[2px] active:shadow-none motion-reduce:active:translate-y-0 disabled:opacity-50"};e.s(["Button",0,function(e){let{variant:n="primary",size:o="md",type:a="button",as:s,className:l="",children:c,...d}=e,u=s||"button",m=`inline-flex items-center justify-center gap-[0.5em] font-sans font-semibold leading-none border border-transparent cursor-pointer whitespace-nowrap rounded-full transition-[color,background-color,border-color,transform,box-shadow] duration-150 ease-[
13cubic-bezier(0.16,1,0.3,1)] [-webkit-tap-highlight-color:transparent] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-canvas disabled:cursor-not-allowed ${i[n]} ${r[o]} ${l}`.trim();return(0,t.jsx)(u,{className:m,..."button"===u?{type:a}:{},...d,children:c})}])},760583,e=>{"use strict";function t(e){return!!e&&"object"==typeof e&&1===e.contractVersion&&"string"==typeof e.text&&Array.isArray(e.claims)&&Array.isArray(e.withheld)&&!!e.coverage&&["supported","partial","not_found"].includes(e.status??"")}async function r(e,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},i=e.headers.get("content-type")??"";if(i.includes("application/json")){let r=await e.json();if(!t(r))throw Error("Chat returned an invalid evidence response.");return{content:r.text,evidence:r}}if(!e.body)throw Error("Chat returned an empty response.");if(i.includes("application/x-ndjson")){let i,o=e.body.getReader(),a=new TextDecoder,s="",l="",c=e=>{let o;if(!e.trim())return;try{o=JSON.parse(e)}catch{throw Error("Chat returned an invalid stream event.")}if(!o||"object"!=typeof o||!("type"in o))throw Error("Chat returned an invalid stream event.");let a=o;if("status"===a.type&&"string"==typeof a.message)return void n(a.message);if("answer"===a.type&&"string"==typeof a.delta)return void r(l+=a.delta);if("evidence"===a.type&&t(a.answer)){i=a.answer;return}if("error"===a.type&&"string"==typeof a.message)throw Error(a.message);throw Error("Chat returned an invalid stream event.")};try{for(;;){let{done:e,value:t}=await o.read();if(e)break;let r=(s+=a.decode(t,{stream:!0})).split("\n");for(let e of(s=r.pop()??"",r))c(e)}if((s+=a.decode()).trim()&&c(s),!i)throw Error("Chat ended before verification completed.");return{content:i.text||l,evidence:i}}finally{o.releaseLock()}}let o=e.body.getReader(),a=new TextDecoder,s="";try{for(;;){let{done:e,value:t}=await o.read();if(e)break;s+=a.decode(t,{stream:!0}),r(s)}return{content:s+=a.decode()}}finally{o.releaseLock()}}e.s(["readChatResponse",0,r,"toChatRequestMessages",0,function(e){return e.slice(-12).map(e=>{let{role:t,content:r}=e;return{role:t,content:r}})}])},379911,e=>{"use strict";var t=e.i(161664);let r=["diarization","connected_source_import","connected_source_multiselect","connected_source_file_size","batch_concurrency","out_of_credits","company_wallet"],n=["uploader","integrations","team_settings"],i={diarization:{packId:"pack_10",eyebrow:"Unlock speaker labels",title:"Start with 10 hours",description:"Speaker identification uses 3× credits, so this covers about 3 hours 20 minutes of speaker-labelled audio."},connected_source_import:{packId:"pack_10",eyebrow:"Keep importing from your cloud drive",title:"Start with 10 hours",description:"Any purchase unlocks connected-source imports. Credits never expire and there is no subscription."},connected_source_multiselect:{packId:"pack_20",eyebrow:"Import a batch",title:"Get the $1/hour rate",description:"The 20-hour pack unlocks up to 10 connected files at once and reaches the lower $1/hour rate."},connected_source_file_size:{packId:"pack_10",eyebrow:"Transcribe the larger recording",title:"Start with 10 hours",description:"Any purchase unlocks the higher connected-file limit. Credits never expire and can be used on any recording."},batch_concurrency:{packId:"pack_20",eyebrow:"Run more than one transcription",title:"Unlock batches at $1/hour",description:"The 20-hour pack permanently unlocks bulk transcription. Credits never expire."},out_of_credits:{packId:t.POPULAR_PACK_ID,eyebrow:"Continue your transcription",title:"Top up at $1/hour",description:"The recommended 20-hour pack is ready to buy. Your credits never expire."},company_wallet:{eyebrow:"Company wallet",title:"Add shared hours without changing your plan",description:"One-time PAYG hours go to the Company wallet and never expire.",packId:t.POPULAR_PACK_ID}};e.s(["contextualBillingHref",0,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"uploader",r=i[e],n=new URLSearchParams({intent:e,pack:r.packId,surface:t});return`/billing?${n.toString()}#pay-as-you-go`},"contextualOffer",0,function(e){return r.includes(e)?{context:e,...i[e]}:null},"isPurchaseOriginSurface",0,function(e){return n.includes(e)}])},161664,e=>{"use strict";var t=e.i(247167);function r(e,r){let n=Number(t.default.env[e]);return Number.isFinite(n)&&n>0?Math.floor(n):r}t.default.env.EARNED_CREDITS_ENABLED,r("EARNED_CREDITS_ROLLOUT_PCT",0),t.default.env.TRANSCRIPT_CLASSIFICATION_ENABLED,r("STARTER_IMMEDIATE_MINUTES",30),r("ANON_CAPTION_MAX_MINUTES",90),Number.isFinite(Number(t.default.env.ASSISTANT_DAILY_LLM_CAP)),Number.isFinite(Number(t.default.env.ASSISTANT_LEAD_DAILY_CAP));let n=r("TRANSCRIBE_MAX_CONCURRENCY",5),i=r("TRANSCRIBE_PER_USER_CONCURRENCY",3),o=r("TRANSCRIBE_CHUNK_CONCURRENCY",2);r("TRANSCRIBE_PER_PROVIDER_CONCURRENCY",3);let a=Math.min(r("UPSTASH_TRANSCRIPTION_V2_PROVIDER_CONCURRENCY",n*o),50);r("UPSTASH_TRANSCRIPTION_V2_PER_USER_CONCURRENCY",i),r("UPSTASH_TRANSCRIPTION_V2_FREE_PER_USER_CONCURRENCY",1),r("UPSTASH_TRANSCRIPTION_V2_PRO_PER_USER_CONCURRENCY",5),r("UPSTASH_TRANSCRIPTION_V2_FREE_RESERVED_CONCURRENCY",2),r("UPSTASH_TRANSCRIPTION_V2_FREE_AGING_MS",3e5),r("UPSTASH_TRANSCRIPTION_V2_STEP_CONCURRENCY",Math.max(20,2*a)),r("UPSTASH_TRANSCRIPTION_V2_CHUNK_CONCURRENCY",1),r("TRANSCRIBE_CHUNK_LEASE_MS",9e5),/^(1|true)$/i.test(t.default.env.LONG_FORM_EXECUTION_ENABLED??""),/^(1|true)$/i.test(t.default.env.SPEAKER_CONTINUITY_REFERENCES_ENABLED??""),r("TRANSCRIBE_THROTTLE_LIMIT",0),t.default.env.TRANSCRIBE_THROTTLE_PERIOD,r("TRANSCRIBE_THROTTLE_BURST",0),!function(e){if(void 0===e||""===e.trim())return;let t=Number(e);Number.isFinite(t)}
13(t.default.env.MEDIA_RETENTION_DAYS),(t.default.env.OWNER_EMAILS??"").split(",").map(e=>e.trim().toLowerCase()).filter(Boolean);let s=[{id:"company_starter",label:"Starter",monthlyUsd:19,includedHours:20},{id:"company_team",label:"Team",monthlyUsd:49,includedHours:60,recommended:!0},{id:"company_scale",label:"Scale",monthlyUsd:99,includedHours:140}],l=[{minUsd:85,usdPerHour:.85},{minUsd:20,usdPerHour:1},{minUsd:0,usdPerHour:1.25}];function c(e){for(let t of l)if(e>=t.minUsd)return t.usdPerHour;return l[l.length-1].usdPerHour}/^(1|true)$/i.test(t.default.env.DRIVE_IMPORT_EDUCATION_ENABLED??""),(t.default.env.HALLUCINATION_FILTER??"shadow").trim().toLowerCase(),/^(1|true)$/i.test(t.default.env.CAPABILITIES_DRIP_ENABLED??""),/^(1|true)$/i.test(t.default.env.PAID_CUSTOMER_DRIP_ENABLED??"");let d=[{minUsd:85,usdPerHour:.85},{minUsd:0,usdPerHour:1}],u=t.default.env.NEXT_PUBLIC_CHROME_WEB_STORE_URL??"https://chromewebstore.google.com/detail/pepys-%E2%80%93-transcribe-this-p/oldlhklajpcplianloofchmleplfcema";t.default.env.NEXT_PUBLIC_ZAPIER_APP_URL,e.s(["AHA_SIGNUP_MINUTES",0,120,"ANON_JOB_TTL_HOURS",0,12,"AUTO_RELOAD_MIN_USD",0,10,"BATCH_MAX_ITEMS",0,100,"CHROME_WEB_STORE_URL",0,u,"CLIPS_ENABLED",0,!1,"CLIP_ASPECTS",0,{square:{w:1080,h:1080,label:"Square (1:1)"},portrait:{w:1080,h:1920,label:"Vertical (9:16)"},landscape:{w:1920,h:1080,label:"Wide (16:9)"}},"CLIP_MAX_SECONDS",0,90,"COHORT_PROFILER_ENABLED",0,!0,"COMPANY_PLANS",0,s,"CREDITS_PER_MINUTE",0,1,"CREDIT_PACKS",0,[{id:"pack_10",label:"10 hours",hours:10,priceUsd:12.5},{id:"pack_20",label:"20 hours",hours:20,priceUsd:20},{id:"pack_30",label:"30 hours",hours:30,priceUsd:30},{id:"pack_50",label:"50 hours",hours:50,priceUsd:50},{id:"pack_75",label:"75 hours",hours:75,priceUsd:75},{id:"pack_100",label:"100 hours",hours:100,priceUsd:85},{id:"pack_200",label:"200 hours",hours:200,priceUsd:170}],"CUSTOM_TOPUP_MIN_USD",0,5,"POPULAR_PACK_ID",0,"pack_20","REFERRAL_COOKIE",0,"pepys_ref","REFERRAL_REFEREE_MINUTES",0,30,"REFERRAL_REFERRER_MINUTES",0,60,"STARTER_GRANT_MINUTES",0,60,"autoReloadCredits",0,function(e){return Math.round(e/function(e){for(let t of d)if(e>=t.minUsd)return t.usdPerHour;return 1}(e)*60)},"autoReloadUsdForCredits",0,function(e){if(e<=0)return 0;let t=e/1/60,r=1/0;for(let e of d){let n=t*e.usdPerHour;n>=e.minUsd&&(r=Math.min(r,n)),e.minUsd>0&&e.minUsd/e.usdPerHour>=t&&(r=Math.min(r,e.minUsd))}return Math.ceil(r)},"customTopupCredits",0,function(e){return Math.round(e/c(e)*60)},"getCompanyPlan",0,function(e){return s.find(t=>t.id===e)},"ratePerHour",0,c,"usdForCredits",0,function(e){if(e<=0)return 0;let t=e/1/60,r=1/0;for(let e of l){let n=t*e.usdPerHour;n>=e.minUsd&&(r=Math.min(r,n)),e.minUsd>0&&e.minUsd/e.usdPerHour>=t&&(r=Math.min(r,e.minUsd))}return Math.ceil(r)}])},375602,e=>{"use strict";e.s(["gaEvent",0,function(e,t){let r=window.gtag;"function"==typeof r&&r("event",e,t??{})}])},956912,e=>{"use strict";var t=e.i(220911),r=e.i(672136);e.s(["usePaid",0,function(){let{data:e}=(0,r.useSession)(),{data:n}=(0,t.default)(e?["/api/entitlements",e.user.id]:null);return n?.paid??!1}])},940141,e=>{"use strict";var t=e.i(271645),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n=t.default.createContext&&t.default.createContext(r),i=["attr","size","title"];function o(){return(o=Object.assign.bind()).apply(null,arguments)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEac
13h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e){var a=r=>{var n,a=e.attr,l=e.size,c=e.title,d=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,i),u=l||r.size||"1em";return r.className&&(n=r.className),e.className&&(n=(n?n+" ":"")+e.className),t.default.createElement("svg",o({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,d,{className:n,style:s(s({color:e.color||r.color},r.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),c&&t.default.createElement("title",null,c),e.children)};return void 0!==n?t.default.createElement(n.Consumer,null,e=>a(e)):a(r)}e.s(["GenIcon",0,function(e){return r=>t.default.createElement(l,o({attr:s({},e.attr)},r),function e(r){return r&&r.map((r,n)=>t.default.createElement(r.tag,s({key:n},r.attr),e(r.child)))}(e.child))}],940141)},220911,e=>{"use strict";var t=e.i(183232);e.s(["default",()=>t.u])}]);

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.