@getontime/cli
Version:
Time keeping for live events
2 lines • 24.8 kB
JavaScript
System.register(["./jsx-runtime-legacy-DMkDNnVj.js","./useSocket-legacy-C772wu7w.js","./Button-legacy-DpgzgT04.js","./Tooltip-legacy-DEkL5laM.js","./useIsSmallScreen-legacy-DavgXfPB.js","./Select-legacy-DHLEukf3.js","./constants-legacy-CvecvM28.js","./SwatchPicker-legacy-DpR2sNl5.js","./viewParamsEditor.store-legacy-BGER9MKV.js","./useFadeOutOnInactivity-legacy-BEtgAp2p.js","./useRundown-legacy-zes2lKPp.js","./Input-legacy-CNt711cd.js","./PresetContext-legacy-DMyxIOHO.js","./viewOptions-legacy-C48HYPwV.js","./index-legacy-NWDCUII5.js","./Info-legacy-6yM0-oGU.js","./Empty-legacy-ZRfHevNV.js","./ViewParamsEditor-legacy-5MW9MZnc.js","./viewUtils-legacy-djI28uVO.js","./useWindowTitle-legacy-2YHQ5qMQ.js","./useCustomFields-legacy-B9FQxHWS.js","./viewLoader.utils-legacy-ydrboL-R.js","./KeyboardShortcuts-legacy-DsHSxtUk.js"],function(e,t){var n,r,i,o,l,s,a,c,p,d,u,f,h,g,m,y,b,x,w,v,j,S,_,k,z,H,L,E,P,F,R,T,V,N,C,M,W,I,O,A,K,B,D,U,G,$,J,q,X,Y,Q,Z,ee,te,ne,re,ie,oe,le,se,ae;function ce(e,t){return pe(Math.round(e*X**t),12,400)}function pe(e,t,n){return Number.isNaN(e)?t:Math.min(Math.max(e,t),n)}function de({isRunning:e,speed:t,canReengageFollow:n,atEnd:r,controller:i,onToggleHelp:o}){const l=z(!0),s=e=>t=>{t.detail>0&&t.currentTarget.blur(),e()};return(0,Z.jsxs)("div",{className:b(["teleprompter__controls",!l&&"teleprompter__controls--idle"]),children:[(0,Z.jsx)(h,{text:e?"Pause (Space)":"Play (Space)",render:(0,Z.jsx)(L,{variant:"subtle-white",size:"large",onClick:s(i.togglePlay),"data-testid":"teleprompter-play","aria-label":e?"Pause":"Play"}),children:e?(0,Z.jsx)(x,{}):(0,Z.jsx)(v,{})}),(0,Z.jsx)(h,{text:"Slow down (Left arrow)",render:(0,Z.jsx)(L,{variant:"subtle-white",size:"large",onClick:s(()=>i.changeSpeed(-1)),"aria-label":"Slow down"}),children:(0,Z.jsx)(S,{})}),(0,Z.jsxs)("div",{className:"teleprompter__speed","data-testid":"teleprompter-speed",children:[t,(0,Z.jsx)("span",{className:"teleprompter__speed-unit",children:"lpm"})]}),(0,Z.jsx)(h,{text:"Speed up (Right arrow)",render:(0,Z.jsx)(L,{variant:"subtle-white",size:"large",onClick:s(()=>i.changeSpeed(1)),"aria-label":"Speed up"}),children:(0,Z.jsx)(w,{})}),(0,Z.jsx)(h,{text:"Rewind to the top (Home)",render:(0,Z.jsx)(L,{variant:r?"primary":"subtle-white",size:"large",onClick:s(()=>i.rewind()),"aria-label":"Rewind to top"}),children:(0,Z.jsx)(j,{})}),(0,Z.jsx)(h,{text:n?"Jump back to the loaded event and follow it again (L)":"Following the loaded event",render:(0,Z.jsx)(L,{variant:n?"primary":"subtle-white",size:"large",disabled:!n,onClick:s(i.reengageFollow),"data-testid":"teleprompter-follow","aria-label":"Follow the loaded event"}),children:(0,Z.jsx)(m,{})}),(0,Z.jsx)(h,{text:"Keyboard shortcuts (?)",render:(0,Z.jsx)(L,{variant:"subtle-white",size:"large",onClick:s(o),"aria-label":"Keyboard shortcuts"}),children:(0,Z.jsx)(y,{})})]})}function ue({isOpen:e,onClose:t}){return(0,Z.jsx)(u,{open:e,onOpenChange:e=>{e||t()},children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(c,{className:"teleprompter__help"}),(0,Z.jsxs)(f,{className:"teleprompter__help-card",children:[(0,Z.jsxs)("div",{className:"teleprompter__help-header",children:[(0,Z.jsx)(d,{className:"teleprompter__help-title",children:"Prompter shortcuts"}),(0,Z.jsx)(L,{variant:"subtle-white",size:"large",onClick:t,"aria-label":"Close",children:(0,Z.jsx)(_,{})})]}),(0,Z.jsxs)(K,{className:"teleprompter__help-groups",children:[(0,Z.jsxs)(B,{title:"Transport",children:[(0,Z.jsx)(U,{label:"Start / stop scrolling",children:(0,Z.jsx)(G,{keys:["Space"]})}),(0,Z.jsxs)(U,{label:"Slower / faster",children:[(0,Z.jsx)(G,{keys:["←"]}),(0,Z.jsx)(D,{}),(0,Z.jsx)(G,{keys:["→"]})]}),(0,Z.jsxs)(U,{label:"Larger speed steps",children:[(0,Z.jsx)(G,{keys:["Shift","←"]}),(0,Z.jsx)(D,{}),(0,Z.jsx)(G,{keys:["Shift","→"]})]})]}),(0,Z.jsxs)(B,{title:"Navigation",children:[(0,Z.jsxs)(U,{label:"Nudge one line",children:[(0,Z.jsx)(G,{keys:["↑"]}),(0,Z.jsx)(D,{}),(0,Z.jsx)(G,{keys:["↓"]})]}),(0,Z.jsxs)(U,{label:"Jump a screen",children:[(0,Z.jsx)(G,{keys:["PgUp"]}),(0,Z.jsx)(D,{}),(0,Z.jsx)(G,{keys:["PgDn"]})]}),(0,Z.jsxs)(U,{label:"Jump to top / end",children:[(0,Z.jsx)(G,{keys:["Home"]}),(0,Z.jsx)(D,{}),(0,Z.jsx)(G,{keys:["End"]})]}),(0,Z.jsx)(U,{label:"Rewind and stop",children:(0,Z.jsx)(G,{keys:["Esc"]})}),(0,Z.jsx)(U,{label:"Follow the loaded event again",children:(0,Z.jsx)(G,{keys:["L"]})})]}),(0,Z.jsxs)(B,{title:"Display",children:[(0,Z.jsxs)(U,{label:"Font size",children:[(0,Z.jsx)(G,{keys:["+"]}),(0,Z.jsx)(D,{}),(0,Z.jsx)(G,{keys:["-"]})]}),(0,Z.jsx)(U,{label:"Reset font size",children:(0,Z.jsx)(G,{keys:["0"]})}),(0,Z.jsxs)(U,{label:"Flip horizontally / vertically",children:[(0,Z.jsx)(G,{keys:["F"]}),(0,Z.jsx)(D,{}),(0,Z.jsx)(G,{keys:["Shift","F"]})]}),(0,Z.jsx)(U,{label:"Show this list",children:(0,Z.jsx)(G,{keys:["?"]})})]})]})]})]})})}function fe(e){const t=(0,J.c)(15),{block:n,registerRef:r}=e;let i;t[0]!==n.id||t[1]!==r?(i=e=>r(n.id,e),t[0]=n.id,t[1]=r,t[2]=i):i=t[2];const o=n.isLoaded||void 0;let l,s,a,c;return t[3]!==n.groupTitle?(l=n.groupTitle&&(0,Z.jsx)("div",{className:"teleprompter__group",children:n.groupTitle}),t[3]=n.groupTitle,t[4]=l):l=t[4],t[5]!==n.heading?(s=n.heading&&(0,Z.jsx)("h2",{className:"teleprompter__heading",children:n.heading}),t[5]=n.heading,t[6]=s):s=t[6],t[7]!==n.text?(a=(0,Z.jsx)("p",{className:"teleprompter__body",children:n.text}),t[7]=n.text,t[8]=a):a=t[8],t[9]!==i||t[10]!==o||t[11]!==l||t[12]!==s||t[13]!==a?(c=(0,Z.jsxs)("section",{className:"teleprompter__block",ref:i,"data-loaded":o,children:[l,s,a]}),t[9]=i,t[10]=o,t[11]=l,t[12]=s,t[13]=a,t[14]=c):c=t[14],c}function he(e,[t,n],r){if(null===e||""===e)return r;const i=Number(e);return Number.isFinite(i)?Math.min(Math.max(i,t),n):r}function ge(e,t){return null===e?t:M(e)}function me(){const[e]=g(),t=(0,q.use)(E);return(0,q.useMemo)(()=>function(e,t){const n=n=>t?.get(n)??e.get(n);return{scriptSource:n("script")??ne.script,heading:(r=n("heading"),i=te,o=ne.heading,i.includes(r)?r:o),hideEmpty:ge(n("hideEmpty"),ne.hideEmpty),showGroups:ge(n("showGroups"),ne.showGroups),speed:he(n("speed"),re.speed,ne.speed),followLoaded:ge(n("followLoaded"),ne.followLoaded),fontSize:he(n("fontSize"),re.fontSize,ne.fontSize),lineHeight:he(n("lineHeight"),re.lineHeight,ne.lineHeight),textWidth:he(n("textWidth"),re.textWidth,ne.textWidth),readingLine:ge(n("readingLine"),ne.readingLine),readingLinePos:he(n("readingLinePos"),re.readingLinePos,ne.readingLinePos),flipH:ge(n("flipH"),ne.flipH),flipV:ge(n("flipV"),ne.flipV)};var r,i,o}(e,t?new URLSearchParams(t.search):void 0),[t,e])}function ye(e,t,n){switch(e){case"cue":return t;case"title":return n;case"both":return[t,n].filter(Boolean).join(" · ");case"none":return""}}function be(e){const t=(0,q.useRef)(e);(0,q.useEffect)(()=>{t.current=e}),(0,q.useEffect)(()=>{function e(e){const n=e.target;if(n&&(le.has(n.tagName)||n.isContentEditable))return;if(k.getState().isOpen||t.current.isHelpOpen)return;const r=function(e){if(e.ctrlKey||e.metaKey||e.altKey)return null;switch(e.code){case"Space":return e.repeat?null:{type:"togglePlay"};case"ArrowDown":return{type:"nudge",lines:1};case"ArrowUp":return{type:"nudge",lines:-1};case"PageDown":return{type:"page",direction:1};case"PageUp":return{type:"page",direction:-1};case"ArrowRight":return{type:"speed",delta:e.shiftKey?5:1};case"ArrowLeft":return{type:"speed",delta:e.shiftKey?-5:-1};case"Home":return{type:"rewind"};case"End":return{type:"jumpToEnd"};case"Escape":return{type:"rewindAndPause"}}switch(e.key){case"?":return{type:"toggleHelp"};case"+":case"=":return{type:"fontSize",steps:1};case"-":case"_":return{type:"fontSize",steps:-1};case"0":return{type:"resetFontSize"}}const t=e.key.toLowerCase();return"f"===t?{type:"flip",axis:e.shiftKey?"v":"h"}:"l"===t?{type:"reengageFollow"}:null}(e);r&&(e.preventDefault(),function(e){const{controller:n,onFlip:r,onFontSize:i,onResetFontSize:o,onToggleHelp:l}=t.current;switch(e.type){case"togglePlay":return n.togglePlay();case"nudge":return n.nudge(e.lines);case"page":return n.page(e.direction);case"speed":return n.changeSpeed(e.delta);case"rewind":return n.rewind();case"rewindAndPause":return n.rewind(!0);case"jumpToEnd":return n.jumpToEnd();case"reengageFollow":return n.reengageFollow();case"flip":return r(e.axis);case"fontSize":return i(e.steps);case"resetFontSize":return o();case"toggleHelp":l()}}(r))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[])}function xe(e){let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent instanceof HTMLElement?n.offsetParent:null;return t}function we({initialSpeed:e,followLoaded:t,selectedEventId:n,readingLinePos:r,blocks:i}){const o=(0,q.useRef)(null),l=(0,q.useRef)(null),s=(0,q.useRef)(new Map),[a,c]=(0,q.useState)(!1),p=(0,q.useCallback)(e=>{o.current=e,c(Boolean(e&&l.current))},[]),d=(0,q.useCallback)(e=>{l.current=e,c(Boolean(e&&o.current))},[]),u=(0,q.useRef)(0),f=(0,q.useRef)(0),h=(0,q.useRef)(!1),g=(0,q.useRef)(e),m=(0,q.useRef)(0),y=(0,q.useRef)(0),b=(0,q.useRef)(null),x=(0,q.useRef)(0),[w,v]=(0,q.useState)(!1),[j,S]=(0,q.useState)(e),[_,k]=(0,q.useState)(!1),[z,H]=(0,q.useState)(!1),L=(0,q.useCallback)(e=>{const t=o.current;if(!t)return;Math.abs(t.scrollTop-u.current)>ae&&(u.current=t.scrollTop,b.current=null);const n=(r=e-f.current,!Number.isFinite(r)||r<0?0:Math.min(r,100)/1e3);var r;f.current=e;let i=u.current;if(0!==x.current&&(i+=x.current,x.current=0,b.current=null),null!==b.current)i=function(e,t,n){if(n<=0)return e;const r=t+(e-t)*Math.exp(-Y*n);return Math.abs(r-t)<Q?t:r}(i,b.current,n),i===b.current&&(b.current=null);else if(h.current){const e=function(e,t,n,r){const i=e+t*n;return{position:i,atEnd:r>0&&i>=r}}(i,(l=g.current,s=m.current,l/60*s),n,y.current);i=e.position,e.atEnd&&(h.current=!1,v(!1),H(!0))}var l,s;const a=pe(i,0,y.current);a!==u.current&&(u.current=a,t.scrollTop=a)},[]);(0,q.useEffect)(()=>{f.current=performance.now();let e=requestAnimationFrame(function t(n){L(n),e=requestAnimationFrame(t)});return()=>cancelAnimationFrame(e)},[L]);const E=(0,q.useCallback)(()=>{const e=o.current,t=l.current;if(!e||!t)return;y.current=Math.max(0,e.scrollHeight-e.clientHeight);const n=getComputedStyle(t),r=Number.parseFloat(n.lineHeight);if(Number.isFinite(r)&&r>0)m.current=r;else{const e=Number.parseFloat(n.fontSize);m.current=Number.isFinite(e)?1.2*e:0}},[]);(0,q.useEffect)(()=>{g.current=j},[j]);const[P,F]=(0,q.useState)(e);P!==e&&(F(e),S(e)),(0,q.useEffect)(()=>{E();const e=o.current,t=l.current;if(!e||!t)return;const n=new ResizeObserver(()=>E());return n.observe(e),n.observe(t),()=>n.disconnect()},[E,a]),(0,q.useEffect)(()=>{let e=!1;return document.fonts?.ready.then(()=>{e||E()}),()=>{e=!0}},[E]),(0,q.useEffect)(()=>{const e=()=>{f.current=performance.now()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,q.useEffect)(()=>{if(!t||_||!n)return;const e=o.current,i=s.current.get(n);if(!e||!i)return;const l=e.clientHeight*r/100;b.current=pe(xe(i)-xe(e)-l,0,y.current),H(!1)},[n,t,_,r,null!==n&&i.some(e=>e.id===n)]);const R=(0,q.useCallback)(()=>{t&&k(!0)},[t]);return{scrollerRef:p,contentRef:d,registerBlock:(0,q.useCallback)((e,t)=>{t?s.current.set(e,t):s.current.delete(e)},[]),handleUserScroll:R,controller:(0,q.useMemo)(()=>{const e=()=>{h.current=!1,v(!1)};return{togglePlay:()=>h.current?e():void(y.current>0&&u.current>=y.current||(h.current=!0,v(!0),H(!1))),nudge:e=>{x.current+=e*m.current,H(!1)},page:e=>{const t=o.current;if(!t)return;const n=t.clientHeight*se*e;b.current=pe(u.current+n,0,y.current),H(!1)},changeSpeed:e=>S(t=>pe(t+e,1,40)),rewind:(t=!1)=>{b.current=0,t&&e(),H(!1)},jumpToEnd:()=>{b.current=y.current,y.current>0&&(h.current=!1,v(!1),H(!0))},reengageFollow:()=>k(!1)}},[]),isRunning:w,speed:j,followLocked:_,atEnd:z}}function ve(e){const t=(0,J.c)(44),{rundown:n,rundownMetadata:r,customFields:i}=e,c=me(),p=a(),d=P(_e),[u,f]=(0,q.useState)(!1);let h;t[0]!==c.flipH||t[1]!==c.flipV||t[2]!==c.fontSize?(h={flipH:c.flipH,flipV:c.flipV,fontSize:c.fontSize},t[0]=c.flipH,t[1]=c.flipV,t[2]=c.fontSize,t[3]=h):h=t[3];const m=h,y=`${m.flipH}|${m.flipV}|${m.fontSize}`,[x,w]=(0,q.useState)(m),[v,j]=(0,q.useState)(y);let S;v!==y&&(j(y),w(m)),t[4]!==i?(S=ie(i),t[4]=i,t[5]=S):S=t[5];const _=S,k=function(e,t,n,r){const{scriptSource:i,heading:l,hideEmpty:a,showGroups:c}=r;if("none"===i||!function(e,t){return!e.startsWith("custom-")||"text"===t[e.slice(7)]?.type}(i,n))return[];const p=[];let d=null;for(const u of e.flatOrder){const n=e.entries[u];if(!s(n)||n.skip)continue;const r=t[u],f=W(n,i,e.entries)?.trim()??"";if(a&&!f)continue;const h=r?.groupId??null;let g=null;if(c&&h&&h!==d){const t=e.entries[h];g=o(t)?t.title:null}d=h,p.push({id:u,heading:ye(l,n.cue,n.title),text:f,groupTitle:g,isLoaded:Boolean(r?.isLoaded)})}return p}(n,r,i,{scriptSource:c.scriptSource,heading:c.heading,hideEmpty:c.hideEmpty,showGroups:c.showGroups}),{scrollerRef:z,contentRef:H,registerBlock:L,handleUserScroll:F,controller:R,isRunning:T,speed:V,followLocked:M,atEnd:I}=we({initialSpeed:c.speed,followLoaded:c.followLoaded,selectedEventId:p,readingLinePos:c.readingLinePos,blocks:k});let O;t[6]===Symbol.for("react.memo_cache_sentinel")?(O=e=>w(t=>{const n="h"===e?"flipH":"flipV";return{...t,[n]:!t[n]}}),t[6]=O):O=t[6];const A=O;let K;t[7]===Symbol.for("react.memo_cache_sentinel")?(K=e=>w(t=>({...t,fontSize:ce(t.fontSize,e)})),t[7]=K):K=t[7];const B=K;let D;t[8]===Symbol.for("react.memo_cache_sentinel")?(D=()=>w(Se),t[8]=D):D=t[8];const U=D;let G;t[9]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(je),t[9]=G):G=t[9];const $=G;let X,Y;t[10]!==x.flipH||t[11]!==x.flipV||t[12]!==x.fontSize||t[13]!==V?(X={speed:V,fontSize:x.fontSize,flipH:x.flipH,flipV:x.flipV},t[10]=x.flipH,t[11]=x.flipV,t[12]=x.fontSize,t[13]=V,t[14]=X):X=t[14],function({speed:e,fontSize:t,flipH:n,flipV:r}){const[,i]=g(),o=Boolean((0,q.use)(E));(0,q.useEffect)(()=>{if(o)return;const l=setTimeout(()=>{const o={speed:e===ne.speed?null:String(e),fontSize:t===ne.fontSize?null:String(t),flipH:n===ne.flipH?null:String(n),flipV:r===ne.flipV?null:String(r)};i(e=>{const t=new URLSearchParams(e);for(const[n,r]of Object.entries(o))null===r?t.delete(n):t.set(n,r);return t},{replace:!0})},oe);return()=>clearTimeout(l)},[n,r,t,o,i,e])}(X),t[15]!==R||t[16]!==$||t[17]!==u?(Y={controller:R,isHelpOpen:u,onFlip:A,onFontSize:B,onResetFontSize:U,onToggleHelp:$},t[15]=R,t[16]=$,t[17]=u,t[18]=Y):Y=t[18],be(Y);const Q="none"!==c.scriptSource;let ee,te,re;if(t[19]!==d||t[20]!==x.flipH||t[21]!==x.flipV||t[22]!==x.fontSize||t[23]!==c.lineHeight||t[24]!==c.readingLinePos||t[25]!==c.textWidth){const e=function(e,t,n){return{flipH:e!==n,flipV:t!==n}}(x.flipH,x.flipV,d),n=`${x.fontSize}px`,r=`${c.textWidth}%`;let i;t[28]!==c.lineHeight||t[29]!==c.readingLinePos||t[30]!==n||t[31]!==r?(i={"--tp-configured-font-size":n,"--tp-line-height":c.lineHeight,"--tp-text-width":r,"--tp-reading-line":c.readingLinePos},t[28]=c.lineHeight,t[29]=c.readingLinePos,t[30]=n,t[31]=r,t[32]=i):i=t[32],te=i,ee=b(["teleprompter",e.flipH&&"teleprompter--flip-h",e.flipV&&"teleprompter--flip-v"]),t[19]=d,t[20]=x.flipH,t[21]=x.flipV,t[22]=x.fontSize,t[23]=c.lineHeight,t[24]=c.readingLinePos,t[25]=c.textWidth,t[26]=ee,t[27]=te}else ee=t[26],te=t[27];t[33]!==_?(re=(0,Z.jsx)(C,{target:l.Teleprompter,viewOptions:_}),t[33]=_,t[34]=re):re=t[34];const le=Q?0===k.length?(0,Z.jsx)(N,{text:"There is no script text in the selected field"}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"teleprompter__scroller","data-testid":"teleprompter-scroller",ref:z,onWheel:F,onTouchMove:F,onPointerDown:F,children:(0,Z.jsx)("div",{className:"teleprompter__content",ref:H,children:k.map(e=>(0,Z.jsx)(fe,{block:e,registerRef:L},e.id))})}),(0,Z.jsx)("div",{className:"teleprompter__dim"}),c.readingLine&&(0,Z.jsx)("div",{className:"teleprompter__reading-line",children:(0,Z.jsx)("span",{className:"teleprompter__reading-marker"})}),(0,Z.jsx)(de,{isRunning:T,speed:V,canReengageFollow:M&&c.followLoaded,atEnd:I,controller:R,onToggleHelp:$})]}):(0,Z.jsx)(N,{text:"Select which field holds the script in the view options"});let se,ae;return t[35]!==$||t[36]!==u?(se=(0,Z.jsx)(ue,{isOpen:u,onClose:$}),t[35]=$,t[36]=u,t[37]=se):se=t[37],t[38]!==re||t[39]!==le||t[40]!==se||t[41]!==ee||t[42]!==te?(ae=(0,Z.jsxs)("div",{className:ee,style:te,"data-testid":"teleprompter-view",children:[re,le,se]}),t[38]=re,t[39]=le,t[40]=se,t[41]=ee,t[42]=te,t[43]=ae):ae=t[43],ae}function je(e){return!e}function Se(e){return{...e,fontSize:ne.fontSize}}function _e(e){return e.mirror}return e("default",function(){const{data:e,status:t}=function(){const{data:e,rundownMetadata:t,status:n}=H(),{data:r,status:i}=O();return{data:{rundown:e,rundownMetadata:t,customFields:r},status:A([n,i])}}();return I("Teleprompter"),"pending"===t?(0,Z.jsx)(R,{}):"error"===t?(0,Z.jsx)(N,{variant:"error",text:"There was an error fetching data, please refresh the page."}):(0,Z.jsx)(ve,{...e})}),{setters:[function(e){n=e.a,r=e.n,i=e.t},function(e){o=e.Ft,l=e.Kt,s=e.Pt,a=e.k},function(e){c=e.C,p=e.a,d=e.n,u=e.r,f=e.s},function(e){h=e.t},function(e){g=e.y},function(e){},function(e){m=e.Bt,y=e.It,b=e.K,x=e.Kt,w=e.Q,v=e.Yt,j=e.at,S=e.en,_=e.mt},function(e){},function(e){k=e.t},function(e){z=e.t},function(e){H=e.c},function(e){L=e.r},function(e){E=e.t},function(e){P=e.t},function(e){F=e.a,R=e.s},function(e){},function(e){},function(e){T=e.i,V=e.n,N=e.o,C=e.t},function(e){M=e.i,W=e.n},function(e){I=e.t},function(e){O=e.t},function(e){A=e.t},function(e){K=e.a,B=e.i,D=e.n,U=e.r,G=e.t}],execute:function(){($=document.createElement("style")).textContent='.blink{animation:1s step-start infinite blink}@keyframes blink{0%{opacity:1}50%{opacity:.2}}.fourtyfive{transform:rotate(45deg)}.mirror{transform:rotate(180deg)}.teleprompter{--tp-flip-x:1;--tp-flip-y:1;--tp-font-size:min(var(--tp-configured-font-size), 8vw);width:100%;height:100dvh;font-family:var(--font-family-override,"Open Sans", "Segoe UI", sans-serif);background:var(--background-color-override,#000);color:var(--color-override,#fff);transform:scale(var(--tp-flip-x), var(--tp-flip-y));transform-origin:50%;position:relative;overflow:hidden}.teleprompter--flip-h{--tp-flip-x:-1}.teleprompter--flip-v{--tp-flip-y:-1}.teleprompter__scroller{overscroll-behavior:contain;overflow-anchor:none;scroll-behavior:auto;scrollbar-width:none;height:100%;overflow-y:auto}.teleprompter__scroller::-webkit-scrollbar{display:none}.teleprompter__content{width:var(--tp-text-width);font-size:var(--tp-font-size);line-height:var(--tp-line-height);padding-top:calc(var(--tp-reading-line) * 1dvh);padding-bottom:calc(100dvh - var(--tp-reading-line) * 1dvh);margin-left:auto;margin-right:auto}.teleprompter__block{margin-bottom:1em}.teleprompter__block[data-loaded] .teleprompter__heading{color:#fa5656}.teleprompter__group{text-transform:uppercase;letter-spacing:.1em;color:rgba(255,255,255,.25);margin-bottom:.35em;font-size:.34em}.teleprompter__heading{text-transform:uppercase;letter-spacing:.05em;color:rgba(255,255,255,.45);margin-bottom:.3em;font-size:.38em;font-weight:600}.teleprompter__body{white-space:pre-wrap;overflow-wrap:break-word}.teleprompter__dim{height:calc(var(--tp-reading-line) * 1%);pointer-events:none;background:linear-gradient(rgba(0,0,0,.8),transparent);position:absolute;top:0;bottom:auto;left:0;right:0}.teleprompter__reading-line{top:calc(var(--tp-reading-line) * 1%);width:var(--tp-text-width);height:calc(var(--tp-font-size) * var(--tp-line-height));pointer-events:none;margin-left:auto;margin-right:auto;position:absolute;left:0;right:0}.teleprompter__reading-marker{clip-path:polygon(0 0,100% 50%,0 100%);font-size:var(--tp-font-size);--tp-gutter:max(0px, calc((100vw - 100%) / 2));width:min(1.2em, var(--tp-gutter) * .6);top:0;bottom:0;right:calc(100% + var(--tp-gutter) * .2);background:#fa5656;position:absolute}.teleprompter__controls{transform:translateX(-50%) scale(var(--tp-flip-x), var(--tp-flip-y));backdrop-filter:blur(6px);opacity:1;background:rgba(255,255,255,.08);border-radius:4px;align-items:center;gap:min(1vh,8px);padding:min(1vh,8px) max(8px,min(1vw,16px));transition:opacity .5s;display:flex;position:absolute;bottom:min(2vh,16px);left:50%}.teleprompter__controls--idle{opacity:0;pointer-events:none}.teleprompter__speed{font-variant-numeric:tabular-nums;justify-content:center;align-items:baseline;gap:.2em;min-width:4em;font-size:max(14px,min(1.4vw,22px));display:flex}.teleprompter__speed-unit{color:rgba(255,255,255,.25);font-size:.6em}.teleprompter__help{background:rgba(0,0,0,.75);position:fixed;top:0;bottom:0;left:0;right:0}.teleprompter__help-card{color:rgba(255,255,255,.8);background:#101010;border-radius:4px;width:min(92vw,32rem);max-height:85dvh;padding:1.5rem;font-size:1rem;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}.teleprompter__help-header{justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.25rem;display:flex}.teleprompter__help-title{font-size:1.25rem;font-weight:600}.teleprompter__help-groups{--shortcut-title-color:rgba(255,255,255,.25);--shortcut-label-color:rgba(255,255,255,.45);--shortcut-separator-color:rgba(255,255,255,.25)}\n/*$vite$:1*/',document.head.appendChild($),function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"f14ad0099eab1969fdd065b56af5fdd3cf530de6"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e5c8b20f-5c7f-4106-a73b-8877598b53a3",e._sentryDebugIdIdentifier="sentry-dbid-e5c8b20f-5c7f-4106-a73b-8877598b53a3")}catch(e){}}(),J=F(),q=n(r(),1),X=1.1,Y=8,Q=.5,Z=i(),te=(ee=[{value:"title",label:"Title"},{value:"cue",label:"Cue"},{value:"both",label:"Cue and title"},{value:"none",label:"None"}]).map(e=>e.value),ne={script:"none",heading:"title",hideEmpty:!0,showGroups:!0,speed:14,followLoaded:!0,fontSize:52,lineHeight:1.3,textWidth:80,readingLine:!0,readingLinePos:25,flipH:!1,flipV:!1},re={speed:[1,40],fontSize:[12,400],lineHeight:[1,4],textWidth:[20,100],readingLinePos:[0,100]},ie=e=>{const t=T(e,[{value:"none",label:"None"},{value:"note",label:"Note"},{value:"title",label:"Title"}]);return[{title:V.DataSources,collapsible:!0,options:[{id:"script",title:"Script",description:"Select the data source which holds the script to read",type:"option",values:t,defaultValue:ne.script},{id:"heading",title:"Segment heading",description:"What to show above each segment of the script",type:"option",values:ee,defaultValue:ne.heading}]},{title:V.BehaviourOptions,collapsible:!0,options:[{id:"speed",title:"Speed",description:"Scroll speed in lines per minute (1-40). Adjustable live with the arrow keys",type:"number",defaultValue:ne.speed},{id:"followLoaded",title:"Follow loaded event",description:"Scroll to the segment of the loaded event. Scrolling by hand releases the follow",type:"boolean",defaultValue:ne.followLoaded}]},{title:V.ElementVisibility,collapsible:!0,options:[{id:"hideEmpty",title:"Hide events without a script",description:"Prevents showing headings for events which have no script text",type:"boolean",defaultValue:ne.hideEmpty},{id:"showGroups",title:"Show group names",description:"Shows the group name when the script moves into a new group",type:"boolean",defaultValue:ne.showGroups}]},{title:V.StyleOverride,collapsible:!0,options:[{id:"fontSize",title:"Font size",description:"Base font size in pixels. Adjustable live with the + and - keys",type:"number",defaultValue:ne.fontSize},{id:"lineHeight",title:"Line height",description:"Spacing between lines, as a multiple of the font size",type:"number",defaultValue:ne.lineHeight},{id:"textWidth",title:"Text width",description:"Width of the text column as a percentage of the screen. Narrower means less eye movement",type:"number",defaultValue:ne.textWidth},{id:"readingLine",title:"Reading line",description:"Shows a marker beside the line which should be read",type:"boolean",defaultValue:ne.readingLine},{id:"readingLinePos",title:"Reading line position",description:"Position of the reading line as a percentage from the top of the screen",type:"number",defaultValue:ne.readingLinePos},{id:"flipH",title:"Flip horizontally",description:"Mirrors the view horizontally, which is what a beam splitter rig needs. Toggled live with F. Flip Screen in the navigation menu flips both axes at once, which is a rotation rather than a mirror",type:"boolean",defaultValue:ne.flipH},{id:"flipV",title:"Flip vertically",description:"Mirrors the view vertically. Note this also moves the reading line. Toggled live with Shift+F",type:"boolean",defaultValue:ne.flipV}]}]},oe=400,le=new Set(["INPUT","TEXTAREA","SELECT"]),se=.85,ae=2}}});
//# sourceMappingURL=Teleprompter-legacy-Ck_Wp0xp.js.map