static.wiai.de/technik/assets/Presenter-861ae81e.js
2023-06-26 12:00:45 +02:00

2 lines
4.7 KiB
JavaScript

import{o as d,f as y,g as e,B as S,C as H,v,d as V,i as E,a as M,D as k,x as h,E as B,h as t,_ as j,G as z,H as D,c as b,b as I,I as T,J as R,K as A,L,M as q,N as F,O,P as U,Q as W,p as u,t as Z,n as x,j as $,R as N,S as G,T as P,U as J,V as K,q as Q,W as X,l as Y,X as w,Y as ee,Z as te,F as se,$ as oe,a0 as ne,w as le,a1 as ae,a2 as ie,a3 as ce,a4 as re}from"./index-d096ab01.js";import{N as ue}from"./NoteDisplay-392ab409.js";import de from"./DrawingControls-8e5f370c.js";const _e={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},me=e("path",{fill:"currentColor",d:"M12 10H6.78A11 11 0 0 1 27 16h2A13 13 0 0 0 6 7.68V4H4v8h8zm8 12h5.22A11 11 0 0 1 5 16H3a13 13 0 0 0 23 8.32V28h2v-8h-8z"},null,-1),pe=[me];function he(n,a){return d(),y("svg",_e,pe)}const ve={name:"carbon-renew",render:he},fe={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},ge=e("path",{fill:"currentColor",d:"M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14Zm0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4Z"},null,-1),xe=e("path",{fill:"currentColor",d:"M20.59 22L15 16.41V7h2v8.58l5 5.01L20.59 22z"},null,-1),we=[ge,xe];function Se(n,a){return d(),y("svg",fe,we)}const ke={name:"carbon-time",render:Se},ye="/technik/assets/logo-title-horizontal-96c3c915.png";function Ce(){const n=S(Date.now()),a=H({interval:1e3}),_=v(()=>{const s=(a.value-n.value)/1e3,l=Math.floor(s%60).toString().padStart(2,"0");return`${Math.floor(s/60).toString().padStart(2,"0")}:${l}`});function m(){n.value=a.value}return{timer:_,resetTimer:m}}const be=V({__name:"NoteStatic",props:{class:{type:String,required:!1}},setup(n){const a=n;E(M);const _=v(()=>{var s,l,o;return(o=(l=(s=k.value)==null?void 0:s.meta)==null?void 0:l.slide)==null?void 0:o.note}),m=v(()=>{var s,l,o;return(o=(l=(s=k.value)==null?void 0:s.meta)==null?void 0:l.slide)==null?void 0:o.noteHTML});return(s,l)=>(d(),h(ue,{class:B(a.class),note:t(_),"note-html":t(m)},null,8,["class","note","note-html"]))}}),Te=j(be,[["__file","/home/jochenmehlich/Projekte/Präsentationen/TechnikEET/node_modules/@slidev/client/internals/NoteStatic.vue"]]),f=n=>(oe("data-v-574fd206"),n=n(),ne(),n),$e={class:"bg-main h-full slidev-presenter"},Ne={class:"grid-container"},Pe={class:"grid-section top flex"},Ve=f(()=>e("img",{src:ye,class:"ml-2 my-auto h-10 py-1 lg:h-14 lg:py-2"},null,-1)),Ee=f(()=>e("div",{class:"flex-auto"},null,-1)),Me={class:"text-2xl pl-2 pr-6 my-auto tabular-nums"},Be=f(()=>e("div",{class:"context"}," current ",-1)),je=f(()=>e("div",{class:"context"}," next ",-1)),He={class:"grid-section note overflow-auto"},ze={class:"grid-section bottom"},De={class:"progress-bar"},Ie=V({__name:"Presenter",setup(n){E(M);const a=S();z(),D(a);const _=b.titleTemplate.replace("%s",b.title||"Slidev");I({title:`Presenter - ${_}`});const{timer:m,resetTimer:s}=Ce(),l=S([]),o=v(()=>T.value<R.value?{route:k.value,clicks:T.value+1}:A.value?{route:L.value,clicks:0}:null);return q(()=>{const C=a.value.querySelector("#slide-content"),c=F(O()),g=U();W(()=>{if(!g.value||ae.value||!ie.value)return;const r=C.getBoundingClientRect(),i=(c.x-r.left)/r.width*100,p=(c.y-r.top)/r.height*100;if(!(i<0||i>100||p<0||p>100))return{x:i,y:p}},r=>{le.cursor=r})}),(C,c)=>{const g=ke,r=ve;return d(),y(se,null,[e("div",$e,[e("div",Ne,[e("div",Pe,[Ve,Ee,e("div",{class:"timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg",opacity:"50 hover:100",onClick:c[0]||(c[0]=(...i)=>t(s)&&t(s)(...i))},[u(g,{class:"absolute"}),u(r,{class:"absolute opacity-0"})]),e("div",Me,Z(t(m)),1)]),e("div",{ref_key:"main",ref:a,class:"relative grid-section main flex flex-col p-2 lg:p-4",style:x(t($))},[u(P,{key:"main",class:"h-full w-full"},{default:N(()=>[u(G,{context:"presenter"})]),_:1}),Be],4),e("div",{class:"relative grid-section next flex flex-col p-2 lg:p-4",style:x(t($))},[t(o)?(d(),h(P,{key:"next",class:"h-full w-full"},{default:N(()=>{var i;return[u(t(K),{is:(i=t(o).route)==null?void 0:i.component,"clicks-elements":l.value,"onUpdate:clicksElements":c[1]||(c[1]=p=>l.value=p),clicks:t(o).clicks,"clicks-disabled":!1,class:B(t(J)(t(o).route)),route:t(o).route,context:"previewNext"},null,8,["is","clicks-elements","clicks","class","route"])]}),_:1})):Q("v-if",!0),je],4),e("div",He,[(d(),h(Te,{key:1,class:"w-full h-full overflow-auto p-2 lg:p-4"}))]),e("div",ze,[u(ce,{persist:!0})]),(d(),h(de,{key:0}))]),e("div",De,[e("div",{class:"progress h-2px bg-primary transition-all",style:x({width:`${(t(X)-1)/(t(Y)-1)*100}%`})},null,4)])]),u(re),u(te,{modelValue:t(w),"onUpdate:modelValue":c[2]||(c[2]=i=>ee(w)?w.value=i:null)},null,8,["modelValue"])],64)}}});const qe=j(Ie,[["__scopeId","data-v-574fd206"],["__file","/home/jochenmehlich/Projekte/Präsentationen/TechnikEET/node_modules/@slidev/client/internals/Presenter.vue"]]);export{qe as default};