__vite_ssr_exportName__("jobSubject", () => { try { return jobSubject } catch {} });
const VIDEO_ID = /(?:v=|youtu\.be\/|\/live\/|\/shorts\/)([\w-]{11})/;
/** What a job works on, for its row: the video's title when known, else the video id or link. */
function jobSubject(job) {
	const title = job.params["title"];
	if (title) return title;
	const url = job.params["url"];
	if (!url) return null;
	return VIDEO_ID.exec(url)?.[1] ?? url;
}

//# vitestCache=W3siZmlsZSI6IjEiLCJpZCI6IjEiLCJpbXBvcnRzIjoiMiIsIm1hcHBpbmdzIjpmYWxzZSwiZGVwcyI6IjMiLCJkeW5hbWljRGVwcyI6IjQiLCJzdGF0aWNNb2NrcyI6bnVsbCwiaGFzQ292ZXJhZ2VEYXRhIjpmYWxzZX0sIkQ6L0dpdEh1Yi9WaWNlQ3V0L3dlYi9zcmMvZW50aXRpZXMvam9iL3N1YmplY3QudHMiLHsidXJscyI6IjUiLCJpZHMiOiI2In0sW10sW10sW10se31d
//# vitestSourceMap={"version":3,"mappings":"AAAA,CAAA;AAEA,MAAM,WAAW;;AAGV,SAAS,WAAW,KAAyB;CAClD,MAAM,QAAQ,IAAI,OAAO;CACzB,IAAI,OAAO,OAAO;CAClB,MAAM,MAAM,IAAI,OAAO;CACvB,IAAI,CAAC,KAAK,OAAO;CACjB,OAAO,SAAS,KAAK,GAAG,CAAC,GAAG,MAAM;AACpC","names":[],"ignoreList":[],"sources":["subject.ts"],"sourcesContent":["import type { Job } from \"./api\";\n\nconst VIDEO_ID = /(?:v=|youtu\\.be\\/|\\/live\\/|\\/shorts\\/)([\\w-]{11})/;\n\n/** What a job works on, for its row: the video's title when known, else the video id or link. */\nexport function jobSubject(job: Job): string | null {\n  const title = job.params[\"title\"];\n  if (title) return title;\n  const url = job.params[\"url\"];\n  if (!url) return null;\n  return VIDEO_ID.exec(url)?.[1] ?? url;\n}\n"],"file":"/web/src/entities/job/subject.ts"}