@getontime/cli
Version:
Time keeping for live events
2 lines • 2.03 kB
JavaScript
System.register(["./useSocket-legacy-C772wu7w.js"],function(e,n){var s,i,t;function l(e){const n=Number(e);return isNaN(n)?0:Math.abs(n)}return e("t",function(e){const{isAM:n,isPM:u,value:d}=function(e){return e.endsWith("pm")?{isAM:!1,isPM:!0,value:e.slice(0,-2)}:e.endsWith("p")?{isAM:!1,isPM:!0,value:e.slice(0,-1)}:e.endsWith("am")?{isAM:!0,isPM:!1,value:e.slice(0,-2)}:e.endsWith("a")?{isAM:!0,isPM:!1,value:e.slice(0,-1)}:{isAM:!1,isPM:!1,value:e}}(e.toLowerCase()),r=function(e){const n=/(\d+)h(?:(\d+)(?!s))?/i.exec(e),u=n?l(n[1]):0,d=n?.[2]?l(n[2]):0,r=/(\d+)m(?:(\d+)?)/i.exec(e),f=r?l(r[1]):d,a=r?.[2]?l(r[2]):0,c=/(\d+)s/i.exec(e),o=c?l(c[1]):a;return n||r||c?u*i+f*s+o*t:null}(d);if(null!==r)return r;const[f,a,c]=d.split(/[\s,:.]+/);let o=0,b=u;if(null!=f&&null!=a&&null!=c){let e=l(f);12===e&&(n&&(e=0),b=!1),o=e*i,o+=l(a)*s,o+=l(c)*t}else if(null!=f&&null==a&&null==c){const{inferredMillis:e,addAM:d}=function(e,n,u){const d=e.length;let r=0,f=0;if(1===d)u||n?(r=l(e)*i,n&&(f=r)):r=l(e)*s;else if(2===d)u||n?(r="12"===e&&n?0:l(e)*i,(n||"12"===e)&&(f=12)):r=l(e)*s;else if(3===d)r=l(e[0])*i+l(e.substring(1))*s;else if(4===d)r=l(e.substring(0,2))*i+l(e.substring(2))*s;else if(d>=5){const n=l(e.substring(0,2)),u=l(e.substring(2,4)),d=l(e.substring(4));r=n*i+u*s+d*t}return{inferredMillis:r,addAM:f}}(f,n,u);o=e,b=d<12&&u}else if(null!=f&&null!=a&&null==c){let e=l(f);12===e&&(n&&(e=0),b=!1),o=e*i,o+=l(a)*s}return b&&(o+=12*i),o}),{setters:[function(e){s=e.Ct,i=e.St,t=e.wt}],execute:function(){!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 n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d26d83a9-13b3-4fb3-b505-5e90482ca0fa",e._sentryDebugIdIdentifier="sentry-dbid-d26d83a9-13b3-4fb3-b505-5e90482ca0fa")}catch(e){}}()}}});
//# sourceMappingURL=parseUserTime-legacy-BAw2X6qu.js.map