@getontime/cli
Version:
Time keeping for live events
3 lines (2 loc) • 1.4 kB
JavaScript
import"./vendor-q6fv0YT2.js";import{T as i,A as s,bk as a,f as l,M as f,m as d,r as c,be as g}from"./index-B81u4hxi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7da97877-75d9-4f36-8454-127d19cb35c5",e._sentryDebugIdIdentifier="sentry-dbid-7da97877-75d9-4f36-8454-127d19cb35c5")}catch{}})();function w(e,n,o,r,u){if(!r)return null;switch(u??n){case i.CountDown:return r.current===null?null:e?Math.max(r.current,0):r.current;case i.CountUp:return r.elapsed;case i.Clock:return o;case i.None:return null;default:return null}}function h(e){return e===null?!1:(e==null?void 0:e.toLowerCase())==="true"||e==="1"}function y(e){if(e)return e.startsWith("#")?e:`#${e}`}function I(e,n){var o;if(!(!e||typeof n!="string"||n==="none")){if(n.startsWith("custom-")){const r=n.split("custom-")[1];return(o=e.custom)==null?void 0:o[r]}return e[n]}}function S(e,n,o,r){if(e==null||n===i.None)return r.removeSeconds?s:a;if(n===i.Clock)return l(e);let u=e;r.removeSeconds&&u<-1e3&&n!==i.CountUp&&(u-=f);let t=d(u,{direction:n});return r.removeLeadingZero&&(t=c(t)),r.removeSeconds&&(t=m(t,o)),t}function m(e,n){return e=g(e),e.length<3?`${e} ${n}`:e}export{S as a,I as b,w as g,h as i,y as m};
//# sourceMappingURL=viewUtils-B8Dr4GHH.js.map