Start at
{ let newTimestamp = getTimeStamp(e.currentTarget.value); if (newTimestamp !== undefined && lengthSeconds) { newTimestamp = Math.min(newTimestamp, lengthSeconds); } timestamp = newTimestamp; }} on:change={(e) => { timestampText = getFormattedTime(timestamp) ?? "0:00"; timestamp = getTimeStamp(timestampText); }} /> {#if checked} {#if timestamp !== undefined}
({timestamp}s)
{:else}
(Invalid time)
{/if} {/if}
{#if lengthSeconds && checked}
{ // @ts-ignore timestamp = e.currentTarget.value; }} class="range range-xs range-primary" /> {/if}