????
Current Path : /proc/self/cwd/wp-content/plugins/presto-player/dist/components/esm/ |
Current File : //proc/self/cwd/wp-content/plugins/presto-player/dist/components/esm/presto-timestamp.entry.js.map |
{"file":"presto-timestamp.entry.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AACnD,8BAAe,kBAAkB;;MCMpB,eAAe;;;;;IAG1B,WAAW,CAAC,CAAC;QACX,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACnD;;;;;IAMD,aAAa,CAAC,IAAI;QAChB,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,OAAO,CAAC;QACZ,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACrB,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;SACpC;QACD,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;KAChD;IAED,MAAM;QACJ,QACE,0DAAG,IAAI,EAAC,GAAG,EAAC,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IACpE,+DAAO,IAAI,CAAC,IAAI,CAAQ,CACtB,EACJ;KACH;;;;;;","names":[],"sources":["src/components/core/features/presto-timestamp/presto-timestamp.scss?tag=presto-timestamp","src/components/core/features/presto-timestamp/presto-timestamp.tsx"],"sourcesContent":[":host {\n display: inline;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'presto-timestamp',\n styleUrl: 'presto-timestamp.scss',\n shadow: false,\n})\nexport class PrestoTimestamp {\n @Prop() time: string;\n\n handleClick(e) {\n e.preventDefault();\n const player = document.body.querySelector('presto-player');\n if (!player) return;\n player.goToAndPlay(this.timeToSeconds(this.time));\n }\n\n /**\n * Formats Timestamp to seconds.\n * I.E. 12:34 to number of seconds.\n */\n timeToSeconds(time) {\n let pieces = time.split(':');\n let seconds;\n if (pieces.length > 1) {\n seconds = parseInt(pieces[0]) * 60;\n }\n return parseInt(pieces[1]) + parseInt(seconds);\n }\n\n render() {\n return (\n <a href=\"#\" class=\"presto-timestamp\" onClick={e => this.handleClick(e)}>\n <slot>{this.time}</slot>\n </a>\n );\n }\n}\n"],"version":3}