1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9698],{1606:(e,t,r)=>{r.d(t,{ke:()=>l});var n=r(95155),o=r(5522),i=r(29684),a=r(44618),s=r(40980);function l({className:e,children:t,value:r,...i}){return(0,n.jsxs)(o.w,{value:r,"data-slot":"progress",className:(0,s.cn)("flex flex-wrap gap-3",e),...i,children:[t,(0,n.jsx)(d,{children:(0,n.jsx)(u,{})})]})}function d({className:e,...t}){return(0,n.jsx)(i.X,{className:(0,s.cn)("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function u({className:e,...t}){return(0,n.jsx)(a.Z,{"data-slot":"progress-indicator",className:(0,s.cn)("h-full bg-primary transition-all",e),...t})}},19919:(e,t,r)=>{r.d(t,{k:()=>l});var n=r(95155),o=r(97233),i=r(42021);let a={"aria-hidden":!0,focusable:"false"},s="grid size-6 shrink-0 place-items-center";function l({ariaLabel:e="Link source examples: YouTube, TikTok, Dropbox, Google Drive, Facebook, Instagram, Vimeo, X, and more"}){return(0,n.jsxs)("div",{"aria-label":e,className:"mb-3 flex min-h-6 items-center justify-center gap-1",role:"img",children:[(0,n.jsx)("span",{className:s,children:(0,n.jsx)(i.Vk6,{...a,className:"h-[21px] w-6 text-[#ff0000]"})}),(0,n.jsx)("span",{className:s,children:(0,n.jsx)(i.kkU,{...a,className:"size-[21px] text-black"})}),(0,n.jsx)("span",{className:s,children:(0,n.jsx)(i.KZi,{...a,className:"size-[22px] text-[#0061ff]"})}),(0,n.jsx)("span",{className:s,children:(0,n.jsxs)("svg",{...a,className:"size-[21px]",viewBox:"0 0 512 512",children:[(0,n.jsx)("path",{d:"M339 314.9 175.4 32h161.2l163.6 282.9H339Z",fill:"#f4b400"}),(0,n.jsx)("path",{d:"M201.5 338.5 120.9 480h310.5L512 338.5H201.5Z",fill:"#4285f4"}),(0,n.jsx)("path",{d:"M154.1 67.4 0 338.5 80.6 480 237 208.8 154.1 67.4Z",fill:"#0f9d58"})]})}),(0,n.jsx)("span",{className:s,children:(0,n.jsx)(i.iYk,{...a,className:"size-[21px] text-[#1877f2]"})}),(0,n.jsx)("span",{className:s,children:(0,n.jsx)("span",{className:"grid size-[22px] place-items-center rounded-[6px] p-[3px] text-white",style:{background:"linear-gradient(145deg, #8d57d8 5%, #db5b9c 45%, #ef8f6c 78%, #f5bd68)"},children:(0,n.jsx)(i.ao$,{...a,className:"size-full"})})}),(0,n.jsx)("span",{className:s,children:(0,n.jsx)(i.Wp_,{...a,className:"size-6 text-[#1ab7ea]"})}),(0,n.jsx)("span",{className:s,children:(0,n.jsx)(i.TCj,{...a,className:"size-6 text-[#0f1419]"})}),(0,n.jsx)("span",{className:s,children:(0,n.jsx)(o.A,{...a,className:"size-[22px] text-slate-500",strokeWidth:1.75})})]})}},21211:(e,t,r)=>{function n(e){try{let t=new URL(e.trim()).hostname.toLowerCase().replace(/^www\./,"").replace(/^m\./,"");if("youtu.be"===t||t.endsWith(".youtube.com"))return"youtube.com";if(t.endsWith(".tiktok.com"))return"tiktok.com";if("fb.watch"===t||t.endsWith(".facebook.com"))return"facebook.com";if(t.endsWith(".instagram.com"))return"instagram.com";if(t.endsWith(".google.com")||t.endsWith(".googleusercontent.com"))return"google.com";return t||"unknown"}catch{return"invalid"}}function o(e){let t,r=e.trim();if(!r)return"Paste a public audio or video link first.";try{t=new URL(r)}catch{return"Enter a valid public URL."}return"https:"!==t.protocol&&"http:"!==t.protocol?"Only public http or https links are supported.":null}r.d(t,{S:()=>n,Z:()=>o})},21319:(e,t,r)=>{r.d(t,{Gn:()=>l,IM:()=>o,QC:()=>i,R2:()=>n,hn:()=>a,mu:()=>s});let n={transcriptionUploadSelected:"transcription_upload_selected",transcriptionUploadValidationFailed:"transcription_upload_validation_failed",transcriptionUploadStarted:"transcription_upload_started",transcriptionUploadFailed:"transcription_upload_failed",transcriptionJobQueued:"transcription_job_queued",transcriptionJobCompleted:"transcription_job_completed",transcriptionJobFailed:"transcription_job_failed",transcriptionResultViewed:"transcription_result_viewed",transcriptionExported:"transcription_exported",transcriptionCopied:"transcription_copied",transcriptionTimestampsToggled:"transcription_timestamps_toggled",linkModeSelected:"link_mode_selected",linkInputStarted:"link_input_started",linkTranscribeClicked:"link_transcribe_clicked",linkIngestionStarted:"link_ingestion_started",linkIngestionCompleted:"link_ingestion_completed",linkIngestionFailed:"link_ingestion_failed",linkTranscriptionCompleted:"link_transcription_completed",linkTranscriptionFailed:"link_transcription_failed",recordingStarted:"recording_started",recordingCompleted:"recording_completed",recordingFailed:"recording_failed",recordingTranscriptionCompleted:"recording_transcription_completed",recordingTranscriptionFailed:"recording_transcription_failed"};function o(e){return e?"signed_in":"guest"}function i(e){return e.split(".").pop()?.toLowerCase()??"unknown"}function a(e){return Number((e/1048576).toFixed(2))}function s(e){return e.startsWith("Unsupported file type")?"unsupported_type":e.startsWith("File too large")?"file_too_large":e.toLowerCase().includes("empty")||e.toLowerCase().includes("no audio")?"empty_transcription":"unknown"}function l(e){return"network_error"===e?"network":"daily_limit_reached"===e||"pro_required"===e?"rate_limit":"missing_file"===e||"unsupported_type"===e||"file_too_large"===e||"empty_transcription"===e?"validation":"server"}},23336:(e,t,r)=>{r.d(t,{ew:()=>a,s6:()=>i});let n=/^[a-zA-Z0-9_-]{1,200}$/;function o(e){return"string"==typeof e&&n.test(e)}function i(e,t){if(void 0===t)return`${e.pathname}${e.search}${e.hash}`;let r=new URLSearchParams(e.search);o(t)?r.set("transcription",t):r.delete("transcription");let n=r.toString();return`${e.pathname}${n?`?${n}`:""}${e.hash}`}function a(e){let t=new URLSearchParams(e).get("transcription");return o(t)?t:null}},40980:(e,t,r)=>{r.d(t,{a3:()=>d,cn:()=>i,r6:()=>u,rj:()=>a,v7:()=>s,zS:()=>l});var n=r(29722),o=r(622);function i(...e){return(0,o.QP)((0,n.$)(e))}function a(e){let t=e.trim();return t?t.split(/\s+/).length:0}function s(e){if(!Number.isFinite(e)||e<0)return"--";let t=["B","KB","MB","GB","TB"],r=e,n=0;for(;r>=1024&&n<t.length-1;)r/=1024,n+=1;let o=r>=100||0===n?0:r>=10?1:2;return`${r.toFixed(o)} ${t[n]}`}function l(e){return s(1024*e*1024)}function d(e){if(null==e||Number.isNaN(e))return"--";let t=Math.max(0,Math.floor(e)),r=Math.floor(t/3600),n=Math.floor(t%3600/60),o=t%60;return r>0?`${r}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${n}:${o.toString().padStart(2,"0")}`}function u(e,t="en-US"){let r=e instanceof Date?e:new Date(e);return`${r.toLocaleDateString(t,{month:"short",day:"numeric",year:"numeric"})} ${r.toLocaleTimeString(t,{hour:"numeric",minute:"2-digit"})}`}},48686:(e,t,r)=>{r.d(t,{T6:()=>u,XA:()=>c,gn:()=>l,w6:()=>d});let n="initial_pathname";function o(e){let t=e?.split("").filter(e=>{let t=e.charCodeAt(0);return t>=32&&127!==t}).join("").trim();if(t)return t.slice(0,512)}function i(e){let t=e?.trim();if(!(!t||t.split("").some(e=>{let t=e.charCodeAt(0);return t<32||127===t})))try{let e=t.startsWith("http://")||t.startsWith("https://")?new URL(t).pathname:t.
1split(/[?#]/,1)[0];if(!e.startsWith("/"))return;return e.slice(0,2048)}catch{return}}function a(){return i(window.location.pathname)}function s(e){let t=e?.get_property?.(n);if("string"==typeof t){let e=i(t);if(e)return e}let r=e?.persistence?.get_initial_props?.(),o=r?.$initial_pathname;if("string"==typeof o){let e=i(o);if(e)return e}let s=e?.get_property?.("$initial_pathname");if("string"==typeof s){let e=i(s);if(e)return e}let l=e?.get_property?.("$initial_person_info");if(l&&"object"==typeof l&&"u"in l&&"string"==typeof l.u){let e=i(l.u);if(e)return e}return a()}function l(e){let t=s(e);return t&&e?.register_once?.({[n]:t}),t}function d(e){return{distinctId:o(e?.get_distinct_id?.()),initialPathname:s(e),pathname:a(),sessionId:o(e?.get_session_id?.())}}function u(e){let t={},r=o(e.distinctId),n=o(e.sessionId),a=i(e.pathname),s=i(e.initialPathname);return r&&(t["x-posthog-distinct-id"]=r),n&&(t["x-posthog-session-id"]=n),a&&(t["x-posthog-pathname"]=encodeURIComponent(a)),s&&(t["x-posthog-initial-pathname"]=encodeURIComponent(s)),t}function c(e){return u(d(e))}},75193:(e,t,r)=>{r.d(t,{c:()=>i,h:()=>o});var n=r(48686);function o(){return(0,n.XA)(window.posthog)}function i(e,t,r){e?.capture(t,r)}},78126:(e,t,r)=>{async function n(e,t){let n=await fetch(e,t);if(403!==n.status)return n;let o=await n.clone().json().catch(()=>null);if(o?.code!=="verification_required"||"string"!=typeof o.verification?.siteKey||"string"!=typeof o.verification?.cData)return n;let{requestTranscriptionVerification:i}=await r.e(4031).then(r.bind(r,94031));return await i(o.verification)?fetch(e,t):n}r.d(t,{ix:()=>d,d9:()=>y,Hg:()=>w,MR:()=>g});var o=r(65688),i=r(48686),a=r(80736),s=r(40980);let l={".aac":"audio/aac",".flac":"audio/flac",".m4a":"audio/mp4",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".ogg":"audio/ogg",".wav":"audio/wav",".webm":"audio/webm"};class d extends Error{constructor(e,t){super(e),this.name="TranscriptionRequestError",this.code=t?.code??"unknown",this.httpStatus=t?.httpStatus}}function u(e){return e.startsWith("Unsupported file type")?"unsupported_type":e.startsWith("File too large")||e.toLowerCase().includes("maximum allowed size")||e.toLowerCase().includes("too large")?"file_too_large":e.includes("daily uploads")?"daily_limit_reached":e.toLowerCase().includes("empty")||e.toLowerCase().includes("no audio")||e.toLowerCase().includes("does not contain")?"empty_transcription":"Failed to fetch"===e||"Load failed"===e||e.toLowerCase().includes("network")?"network_error":"unknown"}async function c(e){let t;try{t=await e.json()}catch{t=void 0}if(!e.ok)throw new d(t?.error||"Upload failed",{code:t?.code,httpStatus:e.status});return t}async function p(e){let t;for(let r=1;r<=3;r+=1)try{return await function(e){return new Promise((t,r)=>{let n=new XMLHttpRequest;for(let[t,r]of(n.open(e.method,e.uploadUrl),n.setRequestHeader("Content-Type",e.contentType),Object.entries(e.headers??{})))"content-type"!==t.toLowerCase()&&n.setRequestHeader(t,r);n.upload.onprogress=t=>{t.lengthComputable&&!(t.total<=0)&&e.onUploadProgress?.(Math.min(Math.round(t.loaded/t.total*100),100))},n.onload=()=>{if(n.status>=200&&n.status<300){e.onUploadProgress?.(100),t();return}r(new d("Could not upload the file.",{code:"network_error",httpStatus:n.status}))},n.onerror=()=>{r(new d("Could not upload the file.",{code:"network_error"}))},n.send(e.file)})}(e)}catch(n){if(t=n,!(n instanceof d&&(void 0===n.httpStatus||n.httpStatus>=500&&n.httpStatus<600)))throw n;r<3&&(e.onUploadProgress?.(0),await new Promise(e=>setTimeout(e,500*r)))}throw t}async function h(e){let t;for(let r=1;r<=3;r+=1)try{return await function(e){return new Promise((t,r)=>{let n=new XMLHttpRequest;n.open("PUT",e.url),n.upload.onprogress=t=>{t.lengthComputable&&e.onPartProgress(t.loaded)},n.onload=()=>{let o=n.getResponseHeader("ETag");if(n.status>=200&&n.status<300&&o){e.onPartProgress(e.body.size),t(o);return}r(new d("Could not upload the file.",{code:"network_error",httpStatus:n.status}))},n.onerror=()=>{r(new d("Could not upload the file.",{code:"network_error"}))},n.send(e.body)})}(e)}catch(n){t=n,e.onPartProgress(0),r<3&&await new Promise(e=>setTimeout(e,500*r))}throw t}async function f(e){let{file:t,multipart:r}=e,n=r.partSize,o=r.partUrls;if("number"!=typeof n||n<=0||!Array.isArray(o)||0===o.length||o.some(e=>"number"!=typeof e?.partNumber||"string"!=typeof e?.url))throw new d("Could not prepare the upload",{code:"unknown"});let i=Math.max(1,Math.ceil(t.size/n));if(o.length<i)throw new d("Could not prepare the upload",{code:"unknown"});let a=Array(i).fill(0),s=()=>{let r=a.reduce((e,t)=>
1e+t,0);e.onUploadProgress?.(Math.min(Math.round(r/t.size*100),100))},l=o.slice(0,i).slice().sort((e,t)=>e.partNumber-t.partNumber),u=[],c=0,p=async()=>{for(;c<l.length;){let e=c;c+=1;let r=l[e],o=r.partNumber,i=(o-1)*n,d=t.slice(i,Math.min(i+n,t.size)),p=await h({body:d,onPartProgress:t=>{a[e]=Math.min(t,d.size),s()},url:r.url});u.push({etag:p,partNumber:o})}};return await Promise.all(Array.from({length:Math.min(4,l.length)},p)),e.onUploadProgress?.(100),u}async function m(e){let t=await fetch("/api/uploads/transcription/multipart",{body:JSON.stringify(e),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok&&"complete"===e.action)throw new d("We uploaded your file, but could not finalize it. Please try again.",{code:"network_error",httpStatus:t.status})}function g(e,t){let r=`.${e.name.split(".").pop()?.toLowerCase()}`;if(!a.DY.includes(r))return`Unsupported file type. Accepted: ${a.DY.join(", ")}`;let n=e.size/1048576;if(e.size<=0)return"This file appears to be empty. Please choose a different audio or video file.";if(n>t){var o=e.size;return`File too large (${(0,s.v7)(o)}). Max: ${(0,s.v7)(Math.floor(1048576*t))}`}return null}async function w(e,t){let r=function(e){var t;let r,n="string"==typeof e.type?(0,a.N6)(e.type):"";if(n&&a.zu.includes(n))return n;let o=(t=e.name,r=`.${t.split(".").pop()?.toLowerCase()??""}`,a.DY.includes(r)?r:null);return o?l[o]:null}(e);if(!r)throw new d("Unsupported file type",{code:"unsupported_type"});try{var s;let a,l,h,g;try{a=await n("/api/uploads/transcription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contentType:r,filename:e.name,size:e.size,speaker_diarization:!0===t.speakerDiarization})})}catch{throw new d("Could not prepare the upload. Please try again.",{code:"network_error"})}try{l=await a.json()}catch{l=void 0}if(!a.ok)throw new d(l?.error||"Could not prepare the upload",{code:l?.code??u(l?.error||"Could not prepare the upload"),httpStatus:a.status});if(!l)throw new d("Could not prepare the upload",{code:"unknown",httpStatus:a.status});if(s=l.storage,"wasabi"===s||"r2"===s){if("string"!=typeof l.key)throw new d("Could not prepare the upload",{code:"unknown"});if(l.multipart){let r,n=l.multipart;if("string"!=typeof n.uploadId||!n.uploadId)throw new d("Could not prepare the upload",{code:"unknown"});try{r=await f({file:e,multipart:n,onUploadProgress:t.onUploadProgress})}catch(e){throw m({action:"abort",key:l.key,storage:l.storage,uploadId:n.uploadId}).catch(()=>{}),e}await m({action:"complete",key:l.key,parts:r,storage:l.storage,uploadId:n.uploadId})}else{if("string"!=typeof l.uploadUrl)throw new d("Could not prepare the upload",{code:"unknown"});await p({contentType:l.contentType??r,file:e,headers:l.headers,method:l.method??"PUT",onUploadProgress:t.onUploadProgress,uploadUrl:l.uploadUrl})}h={contentType:l.contentType??r,key:l.key,storage:l.storage}}else{if("string"!=typeof l?.clientToken||"string"!=typeof l?.pathname)throw new d("Could not prepare the upload",{code:"unknown"});let n=await (0,o.yJ)(l.pathname,e,{access:"public",contentType:l.contentType??r,multipart:e.size>0x6400000,onUploadProgress:({percentage:e})=>{t.onUploadProgress?.(Math.min(Math.round(e),100))},token:l.clientToken});h={contentType:n.contentType,pathname:n.pathname,storage:"vercel_blob",url:n.downloadUrl}}let w={"Content-Type":"application/json"};Object.assign(w,(0,i.T6)({...t.posthogContext,sessionId:t.posthogContext?.sessionId??t.posthogSessionId}));try{g=await n("/api/transcribe",{method:"POST",headers:w,body:JSON.stringify({analytics_source:t.source,contentType:h.contentType,filename:e.name,input_method:t.inputMethod,size:e.size,speaker_diarization:!0===t.speakerDiarization,source_duration_seconds:t.sourceDurationSeconds,..."vercel_blob"===h.storage?{pathname:h.pathname,storage:"vercel_blob",url:h.url}:{key:h.key,storage:h.storage}})})}catch{throw new d("We uploaded your file, but could not start the transcription. Please try again.",{code:"network_error"})}return await c(g)}catch(e){throw function(e){if(e instanceof d)return e;let t=e instanceof Error?e.message:"Upload failed";return new d(t,{code:u(t)})}(e)}}async function y(e,t){let r,o={"Content-Type":"application/json"};Object.assign(o,(0,i.T6)({...t.posthogContext,sessionId:t.posthogContext?.sessionId??t.posthogSessionId}));try{r=await n("/api/transcribe-link",{body:JSON.stringify({analytics_source:t.source,url:e}),headers:o,method:"POST"})}catch{throw new d("Could not process that link. Please try again.",{code:"network_error"})}return c(r)}},80736:(e,t,r)=>{r.d(t,{DJ:()=>o,DY:()=>l,N6:()=>a,iB:()=>n,vr:()=>i,zu:()=>s});let n={free:{label:"Free",maxFileSizeMB:500,dailyLimit:2,apiDailyLimit:10,priority:"standard"},pro:{label:"Pro",maxFileSizeMB:15360,dailyLimit:null,apiDailyLimit:null,priority:"priority"}},o=1200,i=20;function a(e){return e.split(";")[0].trim().toLowerCase()}let s=["audio/mpeg","audio/wav","audio/wave","audio/x-wav","audio/vnd.wave","audio/mp4","audio/x-m4a","audio/flac","audio/ogg","audio/webm","audio/aac","video/mp4","video/webm","video/quicktime"],l=[".mp3",".wav",".m4a",".flac",".ogg",".webm",".aac",".mp4",".mov"]},89239:(e,t,r)=>{r.d(t,{$:()=>l});var n=r(95155),o=r(6539),i=r(18460),a=r(40980);let s=(0,i.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-
1px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l({className:e,variant:t="default",size:r="default",...i}){return(0,n.jsx)(o.$,{"data-slot":"button",className:(0,a.cn)(s({variant:t,size:r,className:e})),...i})}},91789:(e,t,r)=>{r.d(t,{e:()=>a,r:()=>o});let n={autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0};async function o(e){let t=window.AudioContext||window.webkitAudioContext||null;if(!t)return{status:"unknown"};let r=null;try{let n=await e.arrayBuffer();if(0===n.byteLength)return{durationSeconds:0,peak:0,rms:0,status:"silent"};r=new t;let o=await r.decodeAudioData(n);if(0===o.length||0===o.numberOfChannels)return{durationSeconds:o.duration,peak:0,rms:0,status:"silent"};let i=Math.min(Math.floor(.1*o.sampleRate),Math.floor(o.length/4)),a=Math.max(i+1,o.length-i),s=Math.max(1,Math.floor((a-i)/12e4)),l=0,d=0,u=0;for(let e=0;e<o.numberOfChannels;e+=1){let t=o.getChannelData(e);for(let e=i;e<a;e+=s){let r=Math.abs(t[e]??0);Number.isFinite(r)&&(l=Math.max(l,r),u+=r*r,d+=1)}}let c=d>0?Math.sqrt(u/d):0,p=l>=.015||c>=.002;return{durationSeconds:o.duration,peak:l,rms:c,status:p?"audible":"silent"}}catch(e){return console.warn("Could not inspect recorded audio before upload",e),{status:"unknown"}}finally{r&&"closed"!==r.state&&await r.close()}}async function i(){if(!navigator.mediaDevices?.enumerateDevices)return n;try{let e=(await navigator.mediaDevices.enumerateDevices()).find(e=>"audioinput"===e.kind&&"default"===e.deviceId);if(e)return{...n,deviceId:{exact:e.deviceId}}}catch{}return n}async function a(){let e=await i();try{return await navigator.mediaDevices.getUserMedia({audio:e})}catch(r){var t;if("deviceId"in e&&(t=r)instanceof DOMException&&("OverconstrainedError"===t.name||"ConstraintNotSatisfiedError"===t.name))return navigator.mediaDevices.getUserMedia({audio:n});throw r}}}}]);
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.