1import{Y as J,z as b,d as N,b as p,D as s,n as w,o,Z as K,T as M,f as m,C as P,i as C,X as A,g as t,I as T,_ as L,r as z,K as V,J as X,L as Y,S as Z,$ as Q,e as c,a0 as ee,w as y,k as E,t as te,F as se}from"../modules/vue-D_ddf7Rt.js";import{h as oe,u as ne,p as le,w as re,x as ie,y as ae,z as ce,A as ue,l as de,s as ve,B as me,_ as pe}from"../index-Dz9TJiAI.js";import{c as fe,u as xe,b as R,S as _e}from"./SlideWrapper-B2FNXX4d.js";import{r as ke,u as ge,a as ye,_ as be,o as we,b as Ce,S as Se,G as he,c as $e,d as Te}from"./shortcuts-v3QtbZPb.js";import{_ as ze,C as Me}from"./NoteDisplay.vue_vue_type_style_index_0_lang-C5gESKY3.js";import{_ as Ne}from"./DrawingControls.vue_vue_type_style_index_0_lang-CAE-GoVA.js";import{_ as I}from"./IconButton.vue_vue_type_script_setup_true_lang-CutYzOaC.js";import"../modules/shiki-D_P0tUmz.js";import"./context-DdX0Wu8r.js";import"../modules/unplugin-icons-pgZ-UIv4.js";function Fe(){const{counter:f,isActive:n,reset:r,pause:l,resume:u}=J(1e3,{controls:!0});return{timer:b(()=>{const a=f.value,S=Math.floor(a%60).toString().padStart(2,"0");return`${Math.floor(a/60).toString().padStart(2,"0")}:${S}`}),isTimerActive:n,resetTimer:r,toggleTimer:()=>n.value?l():u()}}const De=N({__name:"NoteStatic",props:{no:{},class:{},clicksContext:{}},setup(f){const n=f,{info:r}=fe(n.no);return(l,u)=>{var d,a;return o(),p(ze,{class:w(n.class),note:(d=s(r))==null?void 0:d.note,"note-html":(a=s(r))==null?void 0:a.noteHTML,"clicks-context":l.clicksContext},null,8,["class","note","note-html","clicks-context"])}}}),je={"h-full":"","w-full":""},Be={key:0,"w-full":"","h-full":"",flex:"~ col gap-4 items-center justify-center"},Le=N({__name:"ScreenCaptureMirror",setup(f){const n=K("video"),r=M(null),l=M(!1);async function u(){r.value=await navigator.mediaDevices.getDisplayMedia({video:{cursor:"always"},audio:!1,selfBrowserSurface:"include",preferCurrentTab:!1}),n.value.srcObject=r.value,n.value.play(),l.value=!0,r.value.addEventListener("inactive",()=>{n.value.srcObject=null,l.value=!1}),r.value.addEventListener("ended",()=>{n.value.srcObject=null,l.value=!1})}return(d,a)=>(o(),m("div",je,[P(t("video",{ref_key:"video",ref:n,class:"w-full h-full object-contain"},null,512),[[A,l.value]]),l.value?C("v-if",!0):(o(),m("div",Be,[a[0]||(a[0]=t("div",{op50:""},[T(" Use screen capturing to mirror your main screen back to presenter view."),t("br"),T(" Click the button below and "),t("b",null,"select your other monitor or window"),T(". ")],-1)),t("button",{class:"slidev-form-button",onClick:u}," Start Screen Mirroring ")]))]))}}),Ve={class:"bg-main h-full slidev-presenter","pt-2px":""},Ee={flex:"~ gap-4 items-center",border:"b main",p1:""},Re={class:"relative grid-section next flex flex-col p-2 lg:p-4"},Ie={key:1,class:"h-full flex justify-center items-center"},Pe={key:0,class:"grid-section note of-auto"},Ae={key:1,class:"grid-section note grid grid-rows-[1fr_min-content] overflow-hidden"},We={class:"grid-section bottom flex"},Oe={class:"group flex items-center justify-center pl-4 select-none"},Ge={class:"w-22px cursor-pointer"},He={class:"group-not-hover:hidden flex flex-col items-center"},Ue={key:0,class:"i-carbon:pause text-lg"},qe={key:1,class:"i-carbon:play"},Je={class:"text-2xl px-3 my-auto tabular-nums"},Ke={class:"progress-bar"},Xe=N({__name:"presenter",setup(f){const n=L(),r=z();ke(),ge(r),ye();const{clicksContext:l,currentSlideNo:u,currentSlideRoute:d,hasNext:a,nextRoute:S,slides:F,getPrimaryClicks:W,total:O}=oe(),{isDrawing:G}=xe();ne({title:`Presenter - ${de}`}),z(!1);const{timer:H,isTimerActive:U,resetTimer:D,toggleTimer:j}=Fe(),q=b(()=>F.value.map(_=>{const e=z(0);return{context:le(_,e),clicks:e}})),v=b(()=>l.value.current<l.value.total?[d.value,l.value.current+1]:a.value?[S.value,0]:null),k=b(()=>v.value&&q.value[v.value[0].no-1]);V(v,()=>{k.value&&v.value&&(k.value.clicks.value=v.value[1])},{immediate:!0});const x=X("slidev-presenter-main-slide-mode","slides"),B=M();return Y(()=>{const _=r.value.querySelector("#slide-content"),e=Z(Q()),g=L();V(()=>{if(!g.value||G.value||!me.value||!_)return;const i=_.getBoundingClientRect(),h=(e.x-i.left)/i.width*100,$=(e.y-i.top)/i.height*100;if(!(h<0||h>100||$<0||$>100))return{x:h,y:$}},i=>{ve.cursor=i})}),(_,e)=>{var g;return o(),m(se,null,[t("div",Ve,[t("div",{class:w(["grid-container",`layout${s(re)}`])},[t("div",{ref_key:"main",ref:r,class:"relative grid-section main flex flex-col"}
1,[t("div",Ee,[e[5]||(e[5]=t("span",{op50:"",px2:""},"Current",-1)),e[6]||(e[6]=t("div",{"flex-auto":""},null,-1)),c(be,{modelValue:s(x),"onUpdate:modelValue":e[0]||(e[0]=i=>ee(x)?x.value=i:null),options:[{label:"Slides",value:"slides"},{label:"Screen Mirror",value:"mirror"}]},null,8,["modelValue"])]),s(x)==="mirror"?(o(),p(Le,{key:0})):C("v-if",!0),C(" We use v-show here to still infer the clicks context "),P(c(R,{key:"main",class:"p-2 lg:p-4 flex-auto","is-main":"",onContextmenu:s(we)},{default:y(()=>[c(Se,{"render-context":"presenter"})]),_:1},8,["onContextmenu"]),[[A,s(x)==="slides"]]),(o(),p(Me,{key:(g=s(d))==null?void 0:g.no,"clicks-context":s(W)(s(d)),class:"w-full pb2 px4 flex-none"},null,8,["clicks-context"]))],512),t("div",Re,[v.value&&k.value?(o(),p(R,{key:"next"},{default:y(()=>[(o(),p(_e,{key:v.value[0].no,"clicks-context":k.value.context,route:v.value[0],"render-context":"previewNext"},null,8,["clicks-context","route"]))]),_:1})):(o(),m("div",Ie,e[7]||(e[7]=[t("div",{class:"text-gray-500"}," End of the presentation ",-1)]))),e[8]||(e[8]=t("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Next ",-1))]),B.value&&s(ie)?(o(),m("div",Pe,[c(s(B))])):(o(),m("div",Ae,[(o(),p(De,{key:`static-${s(u)}`,no:s(u),class:"w-full max-w-full h-full overflow-auto p-2 lg:p-4",style:E({fontSize:`${s(ae)}em`}),"clicks-context":s(l)},null,8,["no","style","clicks-context"])),e[12]||(e[12]=t("div",{"border-t":"","border-main":""},null,-1)),t("div",{class:w(["py-1 px-2 text-sm transition",s(n)?"":"op25"])},[c(I,{title:"Increase font size",onClick:s(ce)},{default:y(()=>e[9]||(e[9]=[t("div",{class:"i-carbon:zoom-in"},null,-1)])),_:1},8,["onClick"]),c(I,{title:"Decrease font size",onClick:s(ue)},{default:y(()=>e[10]||(e[10]=[t("div",{class:"i-carbon:zoom-out"},null,-1)])),_:1},8,["onClick"]),C("v-if",!0)],2)])),t("div",We,[c(Ce,{persist:!0,class:w(["transition",s(n)?"":"op25"])},null,8,["class"]),e[15]||(e[15]=t("div",{"flex-auto":""},null,-1)),t("div",Oe,[t("div",Ge,[e[14]||(e[14]=t("div",{class:"i-carbon:time group-hover:hidden text-xl"},null,-1)),t("div",He,[t("div",{class:"relative op-80 hover:op-100",onClick:e[3]||(e[3]=(...i)=>s(j)&&s(j)(...i))},[s(U)?(o(),m("div",Ue)):(o(),m("div",qe))]),t("div",{class:"op-80 hover:op-100",onClick:e[4]||(e[4]=(...i)=>s(D)&&s(D)(...i))},e[13]||(e[13]=[t("div",{class:"i-carbon:renew"},null,-1)]))])]),t("div",Je,te(s(H)),1)])]),(o(),p(Ne,{key:2}))],2),t("div",Ke,[t("div",{class:"progress h-3px bg-primary transition-all",style:E({width:`${(s(u)-1)/(s(O)-1)*100+1}%`})},null,4)])]),c(he),c($e),c(Te)],64)}}}),it=pe(Xe,[["__scopeId","data-v-9c4d0758"]]);export{it 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.