PageSourceSearch

https://emprendeaprendiendo.com/_next/static/immutable/chunks/0sr63yco7h3vs.js

js emprendeaprendiendo.com collected 2026-10-02 03:57:30 UTC 32,176 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,866644,e=>{"use strict";var t=e.i(843476),s=e.i(840429),a=e.i(877285),r=e.i(9122),l=e.i(333290),i=e.i(271645),n=e.i(618566),c=e.i(948148),o=e.i(711241),d=e.i(856423),u=e.i(129768),m=e.i(758370),x=e.i(758925),h=e.i(474544),p=e.i(632781),f=e.i(627803),g=e.i(515281),v=e.i(21357),b=e.i(615331),j=e.i(284784),N=e.i(573474),w=e.i(882303),y=e.i(438583),C=e.i(676525),S=e.i(89857),k=e.i(832936),L=e.i(801206),T=e.i(61159),E=e.i(471213),P=e.i(771120),I=e.i(941501),D=e.i(880809),F=e.i(723502);function z(e){return"visitante"===new URLSearchParams(e).get("vista")}function H(e){return String(e).padStart(2,"0")}function A(){let e=new Date(Date.now()+36e5);return e.setMinutes(30>e.getMinutes()?30:60,0,0),{date:`${e.getFullYear()}-${H(e.getMonth()+1)}-${H(e.getDate())}`,time:`${H(e.getHours())}:${H(e.getMinutes())}`}}function B(e){return"es"===e?"":`/${e}`}function $({ownerBar:e=!1}){let s=(0,c.useTranslations)("CampusLiveLauncher"),a=(0,n.useSearchParams)();return(0,F.campusLiveLauncherViewAllowed)({ownerBar:e,studentPeek:!1,visitorView:z(a.toString())})?(0,t.jsxs)("button",{type:"button",onClick:()=>(0,F.openCampusLiveLauncher)("home"),"aria-label":s("launcherButton"),title:s("launcherButton"),className:"inline-flex h-11 w-full items-center justify-center gap-2 rounded-full border border-black/10 bg-white px-4 text-sm font-semibold text-neutral-950 shadow-sm transition-colors hover:bg-neutral-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg)]",children:[(0,t.jsx)(y.Video,{size:16,"aria-hidden":!0}),(0,t.jsx)("span",{children:s("launcherButton")})]}):null}e.s(["CampusLiveLauncher",0,function({locale:e,adminOrigin:_,teacher:M,ownerBar:R,showDesktopFallback:U,showMobileFallback:O}){let V=(0,c.useTranslations)("TeacherClassAccess"),q=(0,c.useTranslations)("CampusLiveLauncher"),J=(0,n.useSearchParams)(),K=(0,n.useRouter)(),Y=(0,i.useRef)(void 0),W=(0,i.useRef)(void 0),Z=(0,i.useRef)(!1),[G,Q]=(0,i.useState)(10),[X,ee]=(0,i.useState)(""),et=A(),[es,ea]=(0,i.useState)(!1),[er,el]=(0,i.useState)("home"),[ei,en]=(0,i.useState)(!1),[ec,eo]=(0,i.useState)(!1),[ed,eu]=(0,i.useState)({products:[],upcoming:[]}),[em,ex]=(0,i.useState)(!1),[eh,ep]=(0,i.useState)(null),[ef,eg]=(0,i.useState)(""),[ev,eb]=(0,i.useState)([]),[ej,eN]=(0,i.useState)(!1),[ew,ey]=(0,i.useState)(null),[eC,eS]=(0,i.useState)(null),[ek,eL]=(0,i.useState)(null),[eT,eE]=(0,i.useState)(null),[eP,eI]=(0,i.useState)(et.date),[eD,eF]=(0,i.useState)(et.time),[ez,eH]=(0,i.useState)("60"),[eA,eB]=(0,i.useState)(!1),[e$,e_]=(0,i.useState)("count"),[eM,eR]=(0,i.useState)(8),[eU,eO]=(0,i.useState)(""),[eV,eq]=(0,i.useState)(null),eJ=(0,i.useCallback)(e=>`/api/hosted/directos/open?slug=${encodeURIComponent(e)}`,[]),eK=(0,i.useCallback)(e=>{let t,s=(t=new Date(e.startIso),{date:`${t.getFullYear()}-${H(t.getMonth()+1)}-${H(t.getDate())}`,time:`${H(t.getHours())}:${H(t.getMinutes())}`});eq(e),ep(e.recordingFolderId??null),eg(e.title),eb(e.productIds),eN(!0),ey(e.sessionKind),eS(e.broadcastSource),eI(s.date),eF(s.time),eH(String(e.durationMinutes)),eB(!1),el("edit")},[]),eY=(0,i.useCallback)(async e=>{en(!0),ex(!1);try{let t=await fetch("/api/hosted/directos",{cache:"no-store"});if(!t.ok)throw Error("load_failed");let s=await t.json();if(eu(s),void 0!==Y.current){let e=s.upcoming.find(e=>e.id===Y.current);if(!e||!e.canEdit||"scheduled"!==e.status)throw Error("direct_unavailable");Y.current=void 0,eK(e);return}1===s.products.length&&eN(!1),eb(t=>{let a=new Set(s.products.map(e=>e.id));if(void 0!==e)return a.has(e)?[e]:[];let r=t.filter(e=>a.has(e));return r.length>0?r:1===s.products.length?[s.products[0].id]:[]})}catch{ex(!0)}finally{en(!1)}},[eK]),eW=(0,i.useCallback)((e="home",t,s)=>{Y.current=s,W.current=t,eb([]),eN(void 0===t),Q(10),ee(""),eq(null),ep(null),eE(null),el(e),eS(null),ea(!0),eY(t),ey("group_now"===e?"group":"broadcast_now"===e?"broadcast":null)},[eY]);(0,i.useEffect)(()=>{let e=e=>{let t=e.detail;eW(t?.mode??"home",t?.productId,t?.directId)};return window.addEventListener(F.CAMPUS_LIVE_LAUNCHER_EVENT,e),()=>window.removeEventListener(F.CAMPUS_LIVE_LAUNCHER_EVENT,e)},[eW]);let eZ=e=>{eq(null),el(e),eS(null),ey("group_now"===e?"group":"broadcast_now"===e?"broadcast":null)},eG=()=>{let e=A();eg(""),ep(null),eI(e.date),eF(e.time),eB(!1)},eQ=()=>{eq(null),ep(null),el("home")},eX=async e=>{if(await (0,I.confirm)({title:q("cancelConfirmTitle"),body:q("cancelConfirmBody",{title:e.title}),confirmLabel:q("cancelConfirmCta"),cancelLabel:q("back"),tone:"danger"})){eo(!0);try{if(!(await fetch(`/api/hosted/directos/${e.id}`,{method:"DELETE"})).ok)throw Error("cancel_failed");D.toast.show({tone:"success",message:q("cancelledSuccess")}),await eY(),K.refresh()}catch{D.toast.show({tone:"error",message:q("cancelError")})}finally{eo(!1)}}},e0=async()=>
1{if(Z.current||ei||em||!e5||"edit"===er&&!eV)return;let e="group_now"===er||"broadcast_now"===er,t=e?null:new Date(`${eP}T${eD}`);if(!(!e&&(!t||Number.isNaN(t.getTime())))){Z.current=!0,eo(!0);try{if("edit"===er&&eV){if(!(await fetch(`/api/hosted/directos/${eV.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:ef.trim(),...!M?{recordingFolderId:eh}:{},startAtIso:t?.toISOString(),durationMinutes:Number(ez),audienceProductIds:ev,broadcastSource:"broadcast"===ew?eC:"clonify"})})).ok)throw Error("update_failed");D.toast.show({tone:"success",message:q("updatedSuccess")}),eG(),eQ(),await eY(),K.refresh();return}let s="schedule"===er&&eA,a=s?"until"===e$?{endType:e$,untilAt:new Date(`${eU}T23:59:59`).toISOString()}:"count"===e$?{endType:e$,count:eM}:{endType:e$}:null,r=await fetch("/api/hosted/directos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:ef.trim(),...!M?{recordingFolderId:eh}:{},startNow:e,startAtIso:t?.toISOString(),durationMinutes:Number(ez),timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"Europe/Madrid"}catch{return"Europe/Madrid"}}(),audienceProductIds:ev,sessionKind:ew,broadcastSource:"broadcast"!==ew||e?"clonify":eC,recurrence:s?"weekly":"once",recurrenceEnd:a})}),l=await r.json();if(!r.ok||!l.webinar)throw Error(l.error);if(eG(),e)return void window.location.assign(eJ(l.webinar.publicSlug));eE("broadcast"===ew&&"external"===eC?{id:l.webinar.id,title:l.webinar.title}:null),D.toast.show({tone:"success",message:q("scheduledSuccess")}),eQ(),await eY(),K.refresh()}catch{D.toast.show({tone:"error",message:"edit"===er?q("updateError"):q("createError")})}finally{Z.current=!1,eo(!1)}}},e1=ed.upcoming.filter(t=>[t.title,...t.productTitles].join(" ").toLocaleLowerCase(e).includes(X.trim().toLocaleLowerCase(e))),e2=ed.products.length>0,e4=e2&&ed.products.every(e=>ev.includes(e.id)),e3=ev.length>0&&null!==ew&&("schedule"!==er||"broadcast"!==ew||null!==eC),e5=e3&&ef.trim().length>0&&ev.length>0&&null!==ew&&("schedule"!==er&&"edit"!==er||eP.length>0&&eD.length>0)&&("schedule"!==er||!eA||"until"!==e$||eU.length>0);return(0,F.campusLiveLauncherViewAllowed)({ownerBar:R,studentPeek:!1,visitorView:z(J.toString())})?(0,t.jsxs)(t.Fragment,{children:[O?(0,t.jsxs)("button",{type:"button",onClick:()=>eW("home"),className:"fixed bottom-4 right-4 z-40 inline-flex items-center justify-center gap-2 rounded-full border border-black/10 bg-white px-4 py-2.5 text-sm font-semibold text-neutral-950 shadow-lg transition-colors hover:bg-neutral-50 lg:hidden",children:[(0,t.jsx)(y.Video,{size:16,"aria-hidden":!0}),q("launcherButton")]}):null,U?(0,t.jsx)("div",{className:"fixed bottom-4 left-4 z-40 hidden w-56 lg:block",children:(0,t.jsx)($,{})}):null,(0,t.jsx)(k.Drawer,{open:es,onClose:()=>ea(!1),locked:ec,width:"md",colorScheme:"light",ariaLabel:q("drawerAria"),closeLabel:q("close"),title:"home"===er?q("title"):"edit"===er?q("editTitle"):q("formTitle"),subtitle:"home"===er?q("subtitle"):"edit"===er?q("editSubtitle"):q("formSubtitle"),footer:"home"===er?void 0:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(C.Button,{type:"button",variant:"ghost",onClick:eQ,disabled:ec,children:[(0,t.jsx)(o.ArrowLeft,{size:15,"aria-hidden":!0}),q("back")]}),e3?(0,t.jsx)(C.Button,{type:"button",onClick:()=>void e0(),loading:ec,disabled:ei||em||!e2||!e5,children:"schedule"===er?q("scheduleCta"):"edit"===er?q("saveChanges"):q("startCta")}):null]}),children:ei?(0,t.jsx)("div",{className:"grid min-h-48 place-items-center text-[var(--fg-muted)]",children:(0,t.jsx)(p.Loader2,{size:22,className:"animate-spin","aria-hidden":!0})}):em?(0,t.jsxs)("div",{className:"flex min-h-48 flex-col items-center justify-center gap-3 text-center",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)]",children:q("loadError")}),(0,t.jsx)(C.Button,{type:"button",variant:"secondary",onClick:()=>void eY(W.current),children:q("retry")})]}):"home"===er?(0,t.jsxs)("div",{className:"flex flex-col gap-7",children:[eT?(0,t.jsx)(T.ExternalIngestSetup,{title:eT.title,endpoint:`/api/hosted/directos/${eT.id}/ingest`,onClose:()=>eE(null)},eT.id):null,ed.upcoming.length>0?(0,t.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.CalendarDays,{size:16,className:"text-[var(--accent)]","aria-hidden":!0}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--fg)]",children:q("upcomingTitle")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(L.Input,{"aria-label":q("searchDirects"),placeholder:q("searchDirects"),value:X,onChange:e=>{ee(e.target.value),Q(10)}}),0===e1.length?(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)]",children:q("noMatchingDirects")}):null,e1.slice(0,G).map(s=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-[var(--radius-lg)] border border-[var(--border)] bg-[var(--surface)] p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 basis-48",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["live"===s.status?(0,t.jsx)("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-[var(--danger)]"}):null,(0,t.jsx)("p",{className:"truncate text-sm font-semibold text-[var(--fg)]",children:s.title})]}),(0,t.jsxs)("p",{className:"mt-1 text-xs text-[var(--fg-muted)]",children:[new Intl.DateTimeFormat(e,{dateStyle:"medium",timeStyle:"short"}).format(new Date(s.startIso)),s.productTitles.length>0?` \xb7 ${s.productTitles.join(" · ")}`:s.productTitle?` \xb7 ${s.productTitle}`:""]})]}),(0,t.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-1.5",children:[(0,t.jsx)(r.Teacher
1SessionMaterials,{webinarId:s.id}),s.canEdit&&"scheduled"===s.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>eK(s),"aria-label":q("editDirect"),title:q("editDirect"),className:"inline-flex items-center gap-1.5 rounded-[var(--radius)] p-2 text-sm text-[var(--fg-muted)] transition-colors hover:bg-[var(--bg-muted)] hover:text-[var(--fg)]",children:[(0,t.jsx)(g.Pencil,{size:14,"aria-hidden":!0}),q("editDirect")]}),(0,t.jsx)("button",{type:"button",onClick:()=>void eX(s),"aria-label":q("cancelDirect"),title:q("cancelDirect"),className:"rounded-[var(--radius)] p-2 text-[var(--fg-muted)] transition-colors hover:bg-[var(--danger)]/10 hover:text-[var(--danger)]",children:(0,t.jsx)(N.Trash2,{size:14,"aria-hidden":!0})})]}):null,"external"===s.broadcastSource?(0,t.jsxs)(C.Button,{type:"button",variant:"live"===s.status?"primary":"secondary",size:"sm",className:"flex-shrink-0",onClick:()=>eL(e=>e===s.id?null:s.id),children:[(0,t.jsx)(x.KeyRound,{size:13,"aria-hidden":!0}),ek===s.id?q("ingestHide"):q("ingestShow")]}):(0,t.jsxs)("a",{href:eJ(s.publicSlug),className:(0,C.buttonClasses)({variant:"live"===s.status?"primary":"secondary",size:"sm",flat:!0,className:"flex-shrink-0"}),children:[(0,t.jsx)(v.Play,{size:13,"aria-hidden":!0}),"live"===s.status?q("returnToLive"):q("prepareRoom")]})]})]}),"external"===s.broadcastSource&&ek===s.id?(0,t.jsx)(T.ExternalIngestPanel,{endpoint:`/api/hosted/directos/${s.id}/ingest`,onEnded:()=>void eY()}):null]},s.id)),e1.length>G?(0,t.jsx)(C.Button,{type:"button",variant:"secondary",onClick:()=>Q(e=>e+10),children:q("showMoreDirects",{count:e1.length-G})}):null]})]}):null,(ed.past?.length??0)>0?(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:V("pastClasses")}),0===ed.upcoming.length?(0,t.jsx)(L.Input,{"aria-label":q("searchDirects"),placeholder:q("searchDirects"),value:X,onChange:e=>ee(e.target.value)}):null,(0,t.jsx)("div",{className:"max-h-80 space-y-2 overflow-y-auto overscroll-contain",children:ed.past?.filter(e=>e.title.toLocaleLowerCase().includes(X.toLocaleLowerCase())).map(s=>(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-[var(--radius)] border border-[var(--border)] p-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 basis-40",children:[(0,t.jsx)("p",{className:"break-words text-sm font-medium",children:s.title}),(0,t.jsx)("p",{className:"text-xs text-[var(--fg-muted)]",children:new Intl.DateTimeFormat(e,{dateStyle:"medium"}).format(new Date(s.start_at))})]}),"broadcast"===s.session_kind&&s.broadcast_issue?(0,t.jsx)("div",{className:"basis-full",children:(0,t.jsx)(a.BroadcastNotice,{issue:s.broadcast_issue})}):null,(0,t.jsx)(r.TeacherSessionMaterials,{webinarId:s.id}),s.canEdit?(0,t.jsx)(l.PastDirectActions,{id:s.id,title:s.title,onChanged:e=>{eu(t=>({...t,past:t.past?.flatMap(t=>t.id!==e.id?[t]:null===e.title?[]:[{...t,title:e.title}])}))}}
1):null,s.replay_published?(0,t.jsx)("a",{href:`${B(e)}/calendario/${s.id}`,className:"text-sm text-[var(--accent)]",children:V("viewReplay")}):null]},s.id))})]}):null,!M||ed.products.length>0?(0,t.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--fg)]",children:q("chooseAction")}),(0,t.jsxs)("button",{type:"button",onClick:()=>eZ("schedule"),className:"flex items-start gap-4 rounded-[var(--radius-lg)] border border-[var(--border)] p-4 text-left transition-colors hover:border-[var(--accent)] hover:bg-[var(--accent-soft)]",children:[(0,t.jsx)("span",{className:"grid h-10 w-10 flex-shrink-0 place-items-center rounded-[var(--radius)] bg-[var(--accent-soft)] text-[var(--accent)]",children:(0,t.jsx)(u.CalendarDays,{size:20,"aria-hidden":!0})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-sm font-semibold text-[var(--fg)]",children:q("scheduleTitle")}),(0,t.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-[var(--fg-muted)]",children:q("scheduleHint")})]})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>
1eZ("group_now"),className:"flex items-start gap-4 rounded-[var(--radius-lg)] border border-[var(--border)] p-4 text-left transition-colors hover:border-[var(--accent)] hover:bg-[var(--accent-soft)]",children:[(0,t.jsx)("span",{className:"grid h-10 w-10 flex-shrink-0 place-items-center rounded-[var(--radius)] bg-[var(--accent-soft)] text-[var(--accent)]",children:(0,t.jsx)(w.Users,{size:20,"aria-hidden":!0})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-sm font-semibold text-[var(--fg)]",children:q("groupNowTitle")}),(0,t.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-[var(--fg-muted)]",children:q("groupNowHint")})]})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>eZ("broadcast_now"),className:"flex items-start gap-4 rounded-[var(--radius-lg)] border border-[var(--border)] p-4 text-left transition-colors hover:border-[var(--accent)] hover:bg-[var(--accent-soft)]",children:[(0,t.jsx)("span",{className:"grid h-10 w-10 flex-shrink-0 place-items-center rounded-[var(--radius)] bg-[var(--accent-soft)] text-[var(--accent)]",children:(0,t.jsx)(b.Radio,{size:20,"aria-hidden":!0})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-sm font-semibold text-[var(--fg)]",children:q("broadcastNowTitle")}),(0,t.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-[var(--fg-muted)]",children:q("broadcastNowHint")})]})]})]}):null,M&&ed.products.some(e=>e.editHref)?(0,t.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.BookOpen,{size:16,className:"text-[var(--accent)]","aria-hidden":!0}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--fg)]",children:q("yourCoursesTitle")})]}),(0,t.jsx)("ul",{className:"flex flex-col gap-2",children:ed.products.filter(e=>e.editHref).map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-3 rounded-[var(--radius-lg)] border border-[var(--border)] px-4 py-3",children:[(0,t.jsx)("span",{className:"min-w-0 truncate text-sm font-medium text-[var(--fg)]",children:e.title}),(0,t.jsx)("a",{href:e.editHref??"#",className:(0,C.buttonClasses)({variant:"secondary",size:"sm"}),children:q("editContent")})]},e.id))})]}):null]}):(0,t.jsxs)("fieldset",{disabled:ec,className:"flex min-w-0 flex-col gap-6",children:[e2?null:(0,t.jsxs)("div",{className:"rounded-[var(--radius-lg)] border border-[var(--warning)]/40 bg-[var(--warning)]/5 p-4",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-[var(--fg)]",children:q("noProductsTitle")}),(0,t.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-[var(--fg-muted)]",children:M?q("noTeacherProductsHint"):q("noProductsHint")}),M?null:(0,t.jsx)("a",{href:`${_}${B(e)}/admin/productos`,className:(0,C.buttonClasses)({variant:"secondary",size:"sm",className:"mt-3"}),children:q("goToProducts")})]}),(0,t.jsxs)("fieldset",{className:"min-w-0 space-y-2",children:[(0,t.jsx)("legend",{className:"text-sm font-medium text-[var(--fg)]",children:q("audienceLabel")}),e2?ev.length>0&&!ej?(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("p",{className:"min-w-0 break-words text-sm text-[var(--fg)]",children:ev.map(e=>ed.products.find(t=>t.id===e)?.title).filter(Boolean).join(", ")}),ed.products.length>1?(0,t.jsx)(C.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>eN(!0),children:q("changeAudience")}):null]}):(0,t.jsxs)("div",{className:"max-h-60 overflow-y-auto rounded-[var(--radius-md)] border border-[var(--border)]",children:[ed.products.length>1?(0,t.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-subtle)] px-3 py-2.5",children:[(0,t.jsx)("input",{type:"checkbox",checked:e4,onChange:()=>eb(e=>e4?[]:[...e,...ed.products.map(e=>e.id).filter(t=>!e.includes(t))]),className:"h-4 w-4 cursor-pointer rounded border-[var(--border)] accent-[var(--accent)]"}),(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"block text-sm font-medium text-[var(--fg)]",children:q("audienceAll")}),(0,t.jsx)("span",{className:"block text-xs text-[var(--fg-muted)]",children:q("audienceAllHint")})]})]}):null,ed.products.map(e=>(0,t.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-3 py-2.5 last:border-b-0",children:[(0,t.jsx)("input",{type:"checkbox",checked:ev.includes(e.id),onChange:()=>{let t;return t=e.id,eb(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 cursor-pointer rounded border-[var(--border)] accent-[var(--accent)]"}),(0,t.jsx)("span",{className:"min-w-0 break-words text-sm text-[var(--fg)]",children:e.title})]},e.id))]}):(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)]",children:q("audienceEmpty")}),(0,t.jsx)("p",{className:"text-xs text-[var(--fg-muted)]",children:e2&&0===ev.length?q("audienceRequiredHint"):q("audienceHint")})]}),ev.length>0?(0,t.jsxs)(t.Fragment,{children:["schedule"===er?(0,t.jsxs)("fieldset",{className:"min-w-0 space-y-3",children:[(0,t.jsx)("legend",{className:"text-sm font-medium text-[var(--fg)]",children:q("formatLabel")}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,t.jsx)(S.ChoiceCard,{active:"group"===ew,onClick:()=>ey("group"),Icon:w.Users,title:q("groupFormat"),hint:q("groupFormatHint")}),(0,t.jsx)(S.ChoiceCard,{active:"broadcast"===ew,onClick:()=>ey("broadcast"),Icon:f.MonitorPlay,title:q("broadcastFormat"),hint:q("broadcastFormatHint")})]}),null===ew?(0,t.jsx)("p",{className:"text-xs text-[var(--fg-muted)]",children:q("formatRequiredHint")}):null]}):(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-[var(--radius-lg)] bg-[var(--bg-subtle)] p-4",children:["group"===ew?(0,t.jsx)(w.Users,{size:18,className:"mt-0.5 text-[var(--accent)]","aria-hidden":!0}):(0,t.jsx)(f.MonitorPlay,{size:18,className:"mt-0.5 text-[var(--accent)]","aria-hidden":!0}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-[var(--fg)]",children:"group"===ew?q("groupFormat"):q("broadcastFormat")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--fg-muted)]",children:"group"===ew?q("groupFormatHint"):q("broadcastFormatHint")})]})]}),("schedule"===er||"edit"===er)&&"broadcast"===ew?(0,t.jsxs)("fieldset",{className:"min-w-0 space-y-3",children:[(0,t.jsx)("legend",{className:"text-sm font-medium text-[var(--fg)]",children:q("sourceLabel")}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,t.jsx)(S.ChoiceCard,{active:"clonify"===eC,onClick:()=>eS("clonify"),Icon:f.MonitorPlay,title:q("sourceClonify"),hint:q("sourceClonifyHint")}),(0,t.jsx)(S.ChoiceCard,{active:"external"===eC,onClick:()=>eS("external"),Icon:m.Cast,title:q("sourceExternal"),hint:q("sourceExternalHint")})]})]}):null]}):null,e3?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:"campus-direct-title",className:"text-sm font-medium text-[var(--fg)]",children:q("titleLabel")}),(0,t.jsx)(L.Input,{id:"campus-direct-title",value:ef,onChange:e=>eg(e.target.value),placeholder:q("titlePlaceholder"),maxLength:200})]}
1),"schedule"===er||"edit"===er?(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:"campus-direct-date",className:"text-sm font-medium text-[var(--fg)]",children:q("dateLabel")}),(0,t.jsx)(L.Input,{id:"campus-direct-date",type:"date",value:eP,onChange:e=>eI(e.target.value)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:"campus-direct-time",className:"text-sm font-medium text-[var(--fg)]",children:q("timeLabel")}),(0,t.jsx)(L.Input,{id:"campus-direct-time",type:"time",value:eD,onChange:e=>eF(e.target.value)})]})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("label",{htmlFor:"campus-direct-duration",className:"inline-flex items-center gap-2 text-sm font-medium text-[var(--fg)]",children:[(0,t.jsx)(h.Clock,{size:15,"aria-hidden":!0}),q("durationLabel")]}),(0,t.jsxs)(P.Select,{id:"campus-direct-duration",value:ez,onChange:e=>eH(e.target.value),children:[(0,t.jsx)("option",{value:"30",children:q("duration30")}),(0,t.jsx)("option",{value:"45",children:q("duration45")}),(0,t.jsx)("option",{value:"60",children:q("duration60")}),(0,t.jsx)("option",{value:"90",children:q("duration90")}),(0,t.jsx)("option",{value:"120",children:q("duration120")})]})]}),"schedule"===er?(0,t.jsxs)("div",{className:"flex flex-col gap-4 roun
1ded-[var(--radius-lg)] border border-[var(--border)] p-4",children:[(0,t.jsxs)("label",{className:"flex cursor-pointer items-start gap-3",children:[(0,t.jsx)("input",{type:"checkbox",checked:eA,onChange:e=>eB(e.target.checked),className:"mt-0.5 h-4 w-4 accent-[var(--accent)]"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--fg)]",children:[(0,t.jsx)(j.Repeat,{size:15,"aria-hidden":!0}),q("repeatWeekly")]}),(0,t.jsx)("span",{className:"mt-1 block text-xs text-[var(--fg-muted)]",children:q("repeatHint")})]})]}),eA?(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 border-t border-[var(--border)] pt-4 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:"campus-direct-end",className:"text-xs font-medium text-[var(--fg)]",children:q("repeatEndLabel")}),(0,t.jsxs)(P.Select,{id:"campus-direct-end",value:e$,onChange:e=>e_(e.target.value),children:[(0,t.jsx)("option",{value:"count",children:q("repeatEndCount")}),(0,t.jsx)("option",{value:"until",children:q("repeatEndUntil")}),(0,t.jsx)("option",{value:"forever",children:q("repeatEndForever")})]})]}),"count"===e$?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:"campus-direct-count",className:"text-xs font-medium text-[var(--fg)]",children:q("repeatCountLabel")}),(0,t.jsx)(E.NumberField,{id:"campus-direct-count",min:2,max:52,value:eM,onCommit:eR,className:"w-full rounded-[var(--radius)] border border-[var(--border-field)] bg-[var(--field)] px-3 py-2 text-sm text-[var(--fg)] transition-colors hover:border-[var(--fg-faint)]"})]}):"until"===e$?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:"campus-direct-until",className:"text-xs font-medium text-[var(--fg)]",children:q("repeatUntilLabel")}),(0,t.jsx)(L.Input,{id:"campus-direct-until",type:"date",value:eU,onChange:e=>eO(e.target.value)})]}):null]}):null]}):null,M?null:(0,t.jsx)(s.RecordingFolderPicker,{value:eh,onChange:ep,disabled:ec,endpoint:"/api/hosted/directos?folders=1"})]}):null]})})]}):null},"CampusLiveLauncherTrigger",0,$],866644)},333290,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(618566),r=e.i(948148),l=e.i(515281),i=e.i(573474),n=e.i(676525),c=e.i(801206),o=e.i(832936),d=e.i(941501),u=e.i(880809);e.s(["PastDirectActions",0,function({id:e,title:m,onChanged:x,endpoint:h=`/api/hosted/directos/${e}`}){let p=(0,r.useTranslations)("CampusLiveLauncher"),f=(0,a.useRouter)(),g=(0,s.useId)(),v=(0,s.useRef)(!1),[b,j]=(0,s.useState)(!1),[N,w]=(0,s.useState)(!1),[y,C]=(0,s.useState)(m),[S,k]=(0,s.useState)("");async function L(t){if(!v.current&&(t||y.trim())){v.current=!0,j(!0),k("");try{if(t&&!await (0,d.confirm)({title:p("deletePastTitle"),body:p("deletePastBody",{title:m}),confirmLabel:p("deletePast"),cancelLabel:p("back"),tone:"danger"}))return;let s=await fetch(h,{method:t?"DELETE":"PATCH",headers:t?void 0:{"Content-Type":"application/json"},body:t?void 0:JSON.stringify({title:y.trim()}),signal:AbortSignal.timeout(3e4)});if(!s.ok&&!(t&&404===s.status)){let e=403===s.status?"pastForbidden":409===s.status?"pastLive":404===s.status?"pastMissing":"pastSaveError";k(p(e));return}w(!1),u.toast.show({tone:"success",message:p(t?"deletedPastSuccess":"updatedSuccess")}),x({id:e,title:t?null:y.trim()}),f.refresh()}catch{k(p("pastSaveError"))}finally{v.current=!1,j(!1)}}}return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)(n.Button,{type:"button",variant:"secondary",size:"sm",disabled:b,className:"min-h-10",onClick:()=>{C(m),k(""),w(!0)},children:[(0,t.jsx)(l.Pencil,{size:14,"aria-hidden":!0}),p("editPastTitle")]}),(0,t.jsxs)(n.Button,{type:"button",variant:"secondary",size:"sm",disabled:b,loading:b&&!N,className:"min-h-10",onClick:()=>void L(!0),children:[(0,t.jsx)(i.Trash2,{size:14,"aria-hidden":!0}),p("deletePast")]})]}),S&&!N?(0,t.jsx)("p",{role:"alert",className:"max-w-sm text-sm text-[var(--danger)]",children:S}):null,(0,t.jsx)(o.Drawer,{open:N,onClose:()=>w(!1),locked:b,width:"sm",title:p("editPastTitle"),subtitle:p("editPastHint"),ariaLabel:p("editPastTitle"),closeLabel:p("back"),
1children:(0,t.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:e=>{e.preventDefault(),L(!1)},children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{htmlFor:g,className:"text-sm font-medium",children:p("titleLabel")}),(0,t.jsx)(c.Input,{id:g,value:y,onChange:e=>C(e.target.value),autoFocus:!0,required:!0,maxLength:200,disabled:b,className:"text-base"})]}),S?(0,t.jsx)("p",{role:"alert",className:"text-sm text-[var(--danger)]",children:S}):null,(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(n.Button,{type:"submit",disabled:b||!y.trim(),loading:b,children:p("saveChanges")}),(0,t.jsx)(n.Button,{type:"button",variant:"secondary",disabled:b,onClick:()=>w(!1),children:p("back")})]})]})})]})}])},9122,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(618566),l=e.i(676525),i=e.i(832936),n=e.i(801206),c=e.i(941501);e.s(["TeacherSessionMaterials",0,function({webinarId:e}){let o=(0,a.useTranslations)("TeacherClassAccess"),d=(0,r.useRouter)(),[u,m]=(0,s.useState)(!1),[x,h]=(0,s.use
1State)(null),[p,f]=(0,s.useState)(),[g,v]=(0,s.useState)(""),[b,j]=(0,s.useState)(""),[N,w]=(0,s.useState)(!1),[y,C]=(0,s.useState)(!1),[S,k]=(0,s.useState)(0),L=`/api/hosted/directos/${e}/materials`;async function T(e,t){if(!N){w(!0),C(!1);try{let s=await fetch(L,{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw Error();let a=await s.json();h(a.resources),v(""),j(""),f(void 0),d.refresh()}catch{C(!0)}finally{w(!1)}}}return(0,s.useEffect)(()=>{if(!u)return;let e=new AbortController;return fetch(L,{signal:e.signal}).then(async e=>{if(!e.ok)throw Error();h((await e.json()).resources),C(!1)}).catch(()=>{e.signal.aborted||C(!0)}),()=>e.abort()},[u,L,S]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Button,{variant:"secondary",size:"sm",onClick:()=>m(!0),children:o("materials")}),(0,t.jsx)(i.Drawer,{open:u,onClose:()=>m(!1),title:o("materials"),ariaLabel:o("materials"),closeLabel:o("close"),width:"sm",locked:N,children:(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)]",children:o("materialsHint")}),y?(0,t.jsxs)("div",{role:"alert",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--danger)]",children:o("error")}),null===x?(0,t.jsx)(l.Button,{onClick:()=>k(e=>e+1),children:o("retry")}):null]}):null,null===x?(0,t.jsx)("p",{role:"status",children:o("loading")}):0===x.length?(0,t.jsx)("p",{className:"text-sm text-[var(--fg-muted)]",children:o("emptyMaterials")}):(0,t.jsx)("ul",{className:"space-y-3",children:x.map(e=>(0,t.jsxs)("li",{className:"rounded-[var(--radius)] border border-[var(--border)] p-3",children:[(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"break-words text-sm font-medium text-[var(--accent)]",children:e.title}),(0,t.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",disabled:N,onClick:()=>{f(e.id),v(e.title),j(e.url)},children:o("edit")}),(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",disabled:N,onClick:async()=>{await (0,c.confirm)({title:o("removeConfirm"),confirmLabel:o("remove"),cancelLabel:o("cancel"),tone:"danger"})&&await T("DELETE",{id:e.id})},children:o("remove")})]})]},e.id))}),(0,t.jsxs)("form",{className:"space-y-3 border-t border-[var(--border)] pt-4",onSubmit:e=>{e.preventDefault(),T("POST",{id:p,title:g,url:b})},children:[(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:o("title")}),(0,t.jsx)(n.Input,{required:!0,maxLength:160,value:g,onChange:e=>v(e.target.value),disabled:N})]}),(0,t.jsxs)("label",{className:"block space-y-1 text-sm",children:[(0,t.jsx)("span",{children:o("url")}),(0,t.jsx)(n.Input,{type:"url",required:!0,maxLength:2048,value:b,onChange:e=>j(e.target.value),disabled:N})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.Button,{type:"submit",disabled:N||null===x||!g.trim()||!b.trim(),loading:N,children:o(p?"save":"add")}),p?(0,t.jsx)(l.Button,{variant:"ghost",onClick:()=>{f(void 0),v(""),j("")},children:o("cancel")}):null]})]})]})})]})}])},723502,e=>{"use strict";let t="clonify:open-campus-live-launcher";e.s(["CAMPUS_LIVE_LAUNCHER_EVENT",0,t,"campusLiveLauncherViewAllowed",0,function({ownerBar:e,studentPeek:t,visitorView:s}){return e||!t&&!s},"openCampusLiveLauncher",0,function(e="home",s,a){window.dispatchEvent(new CustomEvent(t,{detail:{mode:e,productId:s,directId:a}}))}])}]);

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.