<!-- https://github.com/eugenkiss/7guis/wiki#timer -->
<label>
	elapsed time:
	<progress value='{elapsed / duration}'></progress>
</label>

<div>{ ( elapsed / 1000 ).toFixed( 1 ) }s</div>

<label>
	duration:
	<input type='range' bind:value='duration' min='1' max='20000'>
</label>

<button on:click='reset()'>reset</button>

<script>
	export default {
		data() {
			return { elapsed: 0, duration: 5000 };
		},

		oncreate() {
			this.reset();

			const update = () => {
				this.frame = requestAnimationFrame(upd