UNPKG

@getontime/cli

Version:

Time keeping for live events

2 lines 2.33 kB
System.register(["./jsx-runtime-legacy-DMkDNnVj.js","./constants-legacy-CvecvM28.js"],function(e,t){var n,o,r,i,d,l,a,f,s;function c(e,t,n){if(!e.current||!t.current)return;const o=e.current.getBoundingClientRect(),r=t.current.getBoundingClientRect(),i=o.top-r.top+t.current.scrollTop-n;t.current.scrollTo({top:i,behavior:"smooth"})}return e({n:function({followRef:e,scrollRef:t,doFollow:n,topOffset:o=100,setScrollFlag:r,followTrigger:i}){return(0,a.useEffect)(()=>{n&&i&&e.current&&t.current&&(r?.(!0),window.requestAnimationFrame(()=>{c(e,t,o),r?.(!1)}))},[i,n,e,t,r,o]),(0,a.useCallback)((n=e,r=t,i=o)=>{n&&r&&c(n,r,i)},[e,t,o])},t:function(e){const{isVisible:t,onClickHandler:n}=e;return(0,s.jsxs)("button",{className:d([f.followButton,!t&&f.hidden]),onClick:n,type:"button",children:[(0,s.jsx)(i,{}),"Follow"]})}}),{setters:[function(e){n=e.a,o=e.n,r=e.t},function(e){i=e.Bt,d=e.K}],execute:function(){(l=document.createElement("style")).textContent="._blink_e5t0d_1{animation:1s step-start infinite _blink_e5t0d_1}@keyframes _blink_e5t0d_1{0%{opacity:1}50%{opacity:.2}}._fourtyfive_e5t0d_13{transform:rotate(45deg)}._followButton_e5t0d_17{bottom:1.5rem;bottom:calc(1.5rem + env(safe-area-inset-bottom));z-index:100;color:#fff;background-color:#2b5abc;border-radius:99px;align-items:center;gap:.5rem;padding:.25rem 1rem;font-size:1rem;transition:bottom .3s;display:flex;position:fixed;left:50%;transform:translate(-50%)}._followButton_e5t0d_17:active{background-color:#0036a6}._hidden_e5t0d_38{transition:bottom 1s;bottom:-50px}@media (min-width:500px){._followButton_e5t0d_17{gap:1rem;padding:.25rem 1rem;font-size:1.25rem}}\n/*$vite$:1*/",document.head.appendChild(l),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]="12d77038-ae1b-467e-81aa-d77b078dd9df",e._sentryDebugIdIdentifier="sentry-dbid-12d77038-ae1b-467e-81aa-d77b078dd9df")}catch(e){}}(),a=n(o(),1),f={blink:"_blink_e5t0d_1",fourtyfive:"_fourtyfive_e5t0d_13",followButton:"_followButton_e5t0d_17",hidden:"_hidden_e5t0d_38"},s=r()}}}); //# sourceMappingURL=FollowButton-legacy-Dn6DlMCn.js.map