1import{d as $,b as m,A as t,n as _,o,a6 as O,$ as D,f as c,G as P,i as b,a5 as G,g as e,H as j,C as h,F as W,t as C,r as B,N as V,M as U,Q as q,_ as A,a7 as J,e as a,a8 as K,w as S,k as Q,a9 as E}from"../modules/vue-CynRjMpH.js";import{j as X,u as Y,k as Z,G as ee,I as te,J as se,K as oe,L as ne,m as le,s as re,M as ae,_ as ie}from"../index-DCfA-xrU.js";import{u as ue,a as R,S as ce}from"./SlideWrapper-C4WqSzbE.js";import{r as de,u as ve,a as fe,_ as me,o as pe,b as xe,S as _e,G as ke,c as ge,d as ye}from"./shortcuts-DGlntWQJ.js";import{_ as be,C as we}from"./NoteDisplay.vue_vue_type_style_index_0_lang-DJw28j03.js";import{u as Ce,_ as Se,a as he}from"./TimerBar.vue_vue_type_script_setup_true_lang-DlHg0DE8.js";import{_ as $e}from"./DrawingControls.vue_vue_type_style_index_0_lang-BSPLCj4a.js";import{_ as I}from"./IconButton.vue_vue_type_script_setup_true_lang-DXa3lt18.js";import{a as Me}from"./useSlideInfo-CZAt3se8.js";import"../modules/shiki-CCaIuvDs.js";import"../modules/unplugin-icons-D3Nw-66L.js";import"./context-zDDIoJ0W.js";const Ne=$({__name:"NoteStatic",props:{no:{},class:{},clicksContext:{}},setup(k){const n=k,{info:l}=Me(n.no);return(r,u)=>(o(),m(be,{class:_(n.class),note:t(l)?.note,"note-html":t(l)?.noteHTML,"clicks-context":k.clicksContext},null,8,["class","note","note-html","clicks-context"]))}}),ze={"h-full":"","w-full":""},Fe={key:0,"w-full":"","h-full":"",flex:"~ col gap-4 items-center justify-center"},je=$({__name:"ScreenCaptureMirror",setup(k){const n=O("video"),l=D(null),r=D(!1);async function u(){l.value=await navigator.mediaDevices.getDisplayMedia({video:{cursor:"always"},audio:!1,selfBrowserSurface:"include",preferCurrentTab:!1}),n.value.srcObject=l.value,n.value.play(),r.value=!0,l.value.addEventListener("inactive",()=>{n.value.srcObject=null,r.value=!1}),l.value.addEventListener("ended",()=>{n.value.srcObject=null,r.value=!1})}return(v,f)=>(o(),c("div",ze,[P(e("video",{ref_key:"video",ref:n,class:"w-full h-full object-contain"},null,512),[[G,r.value]]),r.value?b("v-if",!0):(o(),c("div",Fe,[f[0]||(f[0]=e("div",{op50:""},[j(" Use screen capturing to mirror your main screen back to presenter view."),e("br"),j(" Click the button below and "),e("b",null,"select your other monitor or window"),j(". ")],-1)),e("button",{class:"slidev-form-button",onClick:u}," Start Screen Mirroring ")]))]))}}),Be={class:"w-22px cursor-pointer"},De={class:"group-not-hover:hidden flex flex-col items-center"},Le={key:0,class:"i-carbon:pause text-lg"},Te={key:1,class:"i-carbon:play"},Ve={class:"text-3xl px-3 my-auto font-mono"},Ee={class:"text-base op50"},Re=$({__name:"TimerInlined",setup(k){const{status:n,percentage:l,mode:r,timer:u,reset:v,toggle:f}=Ce(),M=h(()=>n.value==="stopped"?"op50":n.value==="paused"?"text-blue6 dark:text-blue3":l.value>80?"text-yellow6 dark:text-yellow3":l.value>100?"text-red6 dark:text-red3":"text-green6 dark:text-green3");return(L,i)=>(o(),c("div",{class:_(["group flex items-center justify-center pl-4 select-none",M.value])},[e("div",Be,[e("div",{class:_(["group-hover:hidden text-2xl",t(r)==="countdown"?"i-carbon:timer":"i-carbon:time"])},null,2),e("div",De,[e("div",{class:"relative op-80 hover:op-100",onClick:i[0]||(i[0]=(...g)=>t(f)&&t(f)(...g))},[t(n)==="running"?(o(),c("div",Le)):(o(),c("div",Te))]),e("div",{class:"op-80 hover:op-100",onClick:i[1]||(i[1]=(...g)=>t(v)&&t(v)(...g))},[...i[2]||(i[2]=[e("div",{class:"i-carbon:renew"},null,-1)])])])]),e("div",Ve,[t(u).h?(o(),c(W,{key:0},[e("span",null,C(t(u).h),1),i[3]||(i[3]=e("span",{op50:""},":",-1))],64)):b("v-if",!0),e("span",null,C(t(u).m),1),i[4]||(i[4]=e("span",{op50:""},":",-1)),e("span",null,C(t(u).s),1),e("span",Ee,"."+C(t(u).ms),1)])],2))}}),Ie={class:"bg-main h-full slidev-presenter grid grid-rows-[max-content_1fr] of-hidden"},Pe={flex:"~ gap-4 items-center",border:"b main",p1:""},Ge={class:"relative grid-section next flex flex-col p-2 lg:p-4"},We={key:1,class:"h-full flex justify-center items-center"},He={key:0,class:"grid-section note of-auto"},Oe={key:1,class:"grid-section note grid grid-rows-[1fr_min-content] overflow-hidden"},Ue={class:"grid-section bottom flex"},qe=$({__name:"presenter",setup(k){const n=E(),l=B();de(),ve(l),fe();const{clicksContext:r,currentSlideNo:u,currentSlideRoute:v,hasNext:f,nextRoute:M,slides:L,getPrimaryClicks:i}=X(),{isDrawing:g}=ue();Y({title:`Presenter - ${le}`}),B(!1);const H=h(()=>L.value.map(p=>{const s=B(0);return{context:Z(s,p?.meta.slide?.frontmatter.clicksStart??0,p?.meta.clicks),clicks:s}})),d=h(()=>r.value.current<r.value.total?[v.value,r.value.current+1]:f.value?[M.value,0]:null),w=h(()=>d.value&&H.value[d.value[0].no-1]);V(d,()=>{w.value&&d.value&&(w.value.clicks.value=d.value[1])},{immediate:!0});const y=U("slidev-presenter-main-slide-mode","slides"),T=D();return q(()=>{const p=l.value.querySelector("#slide-content"),s=A(J()),N=E();V(()=>
1{if(!N.value||g.value||!ae.value||!p)return;const x=p.getBoundingClientRect(),z=(s.x-x.left)/x.width*100,F=(s.y-x.top)/x.height*100;if(!(z<0||z>100||F<0||F>100))return{x:z,y:F}},x=>{re.cursor=x})}),(p,s)=>(o(),c(W,null,[e("div",Ie,[e("div",null,[a(Se),a(he)]),e("div",{class:_(["grid-container",`layout${t(ee)}`])},[e("div",{ref_key:"main",ref:l,class:"relative grid-section main flex flex-col"},[e("div",Pe,[s[3]||(s[3]=e("span",{op50:"",px2:""},"Current",-1)),s[4]||(s[4]=e("div",{"flex-auto":""},null,-1)),a(me,{modelValue:t(y),"onUpdate:modelValue":s[0]||(s[0]=N=>K(y)?y.value=N:null),options:[{label:"Slides",value:"slides"},{label:"Screen Mirror",value:"mirror"}]},null,8,["modelValue"])]),t(y)==="mirror"?(o(),m(je,{key:0})):b("v-if",!0),b(" We use v-show here to still infer the clicks context "),P(a(R,{key:"main",class:"p-2 lg:p-4 flex-auto","is-main":"",onContextmenu:t(pe)},{default:S(()=>[a(_e,{"render-context":"presenter"})]),_:1},8,["onContextmenu"]),[[G,t(y)==="slides"]]),(o(),m(we,{key:t(v)?.no,"clicks-context":t(i)(t(v)),class:"w-full pb2 px4 flex-none"},null,8,["clicks-context"]))],512),e("div",Ge,[d.value&&w.value?(o(),m(R,{key:"next"},{default:S(()=>[(o(),m(ce,{key:d.value[0].no,"clicks-context":w.value.context,route:d.value[0],"render-context":"previewNext"},null,8,["clicks-context","route"]))]),_:1})):(o(),c("div",We,[...s[5]||(s[5]=[e("div",{class:"text-gray-500"}," End of the presentation ",-1)])])),s[6]||(s[6]=e("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Next ",-1))]),T.value&&t(te)?(o(),c("div",He,[a(t(T))])):(o(),c("div",Oe,[(o(),m(Ne,{key:`static-${t(u)}`,no:t(u),class:"w-full max-w-full h-full overflow-auto p-2 lg:p-4",style:Q({fontSize:`${t(se)}em`}),"clicks-context":t(r)},null,8,["no","style","clicks-context"])),s[10]||(s[10]=e("div",{"border-t":"","border-main":""},null,-1)),e("div",{class:_(["py-1 px-2 text-sm transition",t(n)?"":"op25"])},[a(I,{title:"Increase font size",onClick:t(oe)},{default:S(()=>[...s[7]||(s[7]=[e("div",{class:"i-carbon:zoom-in"},null,-1)])]),_:1},8,["onClick"]),a(I,{title:"Decrease font size",onClick:t(ne)},{default:S(()=>[...s[8]||(s[8]=[e("div",{class:"i-carbon:zoom-out"},null,-1)])]),_:1},8,["onClick"]),b("v-if",!0)],2)])),e("div",Ue,[a(xe,{persist:!0,class:_(["transition",t(n)?"":"op25"])},null,8,["class"]),s[11]||(s[11]=e("div",{"flex-auto":""},null,-1)),a(Re)]),(o(),m($e,{key:2}))],2)]),a(ke),a(ge),a(ye)],64))}}),lt=ie(qe,[["__scopeId","data-v-1de38f6a"]]);export{lt as default};
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.